From a78928552148ae3f8137b41aeabcdf534cfd87dc Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Thu, 12 Nov 2020 01:03:29 +0000 Subject: [PATCH 001/254] chore: add initial files for launch --- .../synth.py | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 packages/google-cloud-policytroubleshooter/synth.py diff --git a/packages/google-cloud-policytroubleshooter/synth.py b/packages/google-cloud-policytroubleshooter/synth.py new file mode 100644 index 00000000000..05cc16afe5b --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/synth.py @@ -0,0 +1,35 @@ +# 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. +"""This script is used to synthesize generated parts of this library.""" + +import synthtool as s +import synthtool.gcp as gcp +import synthtool.languages.node as node +import subprocess +import logging + +logging.basicConfig(level=logging.DEBUG) + +# run the gapic generator +gapic = gcp.GAPICBazel() +versions = ["v1"] +name = 'policytroubleshooter' +for version in versions: + library = gapic.node_library( + name, + version, + proto_path = f'google/cloud/policytroubleshooter/{version}') + s.copy(library, excludes=[]) + +# Copy common templates +common_templates = gcp.CommonTemplates() +templates = common_templates.node_library( + source_location='build/src', versions=["v1"], default_version="v1") +s.copy(templates, excludes=[]) + +node.postprocess_gapic_library() From fcffac436eb10122a3d855da73f4353436ea0f47 Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Fri, 4 Dec 2020 08:09:43 +0000 Subject: [PATCH 002/254] chore: add initial files for launch --- packages/google-cloud-policytroubleshooter/synth.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-policytroubleshooter/synth.py b/packages/google-cloud-policytroubleshooter/synth.py index 05cc16afe5b..54e9067ff63 100644 --- a/packages/google-cloud-policytroubleshooter/synth.py +++ b/packages/google-cloud-policytroubleshooter/synth.py @@ -1,3 +1,9 @@ +# Copyright 2020 Google LLC +# +# 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 @@ -23,7 +29,10 @@ library = gapic.node_library( name, version, - proto_path = f'google/cloud/policytroubleshooter/{version}') + bazel_target=f"//google/cloud/policytroubleshooter/{version}:file was automatically generated by BuildFileGenerator + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = [") s.copy(library, excludes=[]) # Copy common templates From ef73f44a924b9806fa5dbc726a9165cad49bb411 Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Wed, 16 Dec 2020 18:17:36 +0000 Subject: [PATCH 003/254] chore: add initial files for launch --- packages/google-cloud-policytroubleshooter/synth.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/google-cloud-policytroubleshooter/synth.py b/packages/google-cloud-policytroubleshooter/synth.py index 54e9067ff63..6f2f613cb5b 100644 --- a/packages/google-cloud-policytroubleshooter/synth.py +++ b/packages/google-cloud-policytroubleshooter/synth.py @@ -29,10 +29,7 @@ library = gapic.node_library( name, version, - bazel_target=f"//google/cloud/policytroubleshooter/{version}:file was automatically generated by BuildFileGenerator - -# This is an API workspace, having public visibility by default makes perfect sense. -package(default_visibility = [") + bazel_target=f"//google/cloud/policytroubleshooter/{version}:policytroubleshooter-{version}-nodejs") s.copy(library, excludes=[]) # Copy common templates From 44001912bcc1bf9b91bc0c85a2ad468bb7f1234e Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Wed, 16 Dec 2020 18:24:33 +0000 Subject: [PATCH 004/254] chore: add initial files for launch --- .../CODE_OF_CONDUCT.md | 94 ++++++++ .../CONTRIBUTING.md | 65 ++++++ .../google-cloud-policytroubleshooter/LICENSE | 202 ++++++++++++++++++ .../README.md | 120 +++++++++++ 4 files changed, 481 insertions(+) create mode 100644 packages/google-cloud-policytroubleshooter/CODE_OF_CONDUCT.md create mode 100644 packages/google-cloud-policytroubleshooter/CONTRIBUTING.md create mode 100644 packages/google-cloud-policytroubleshooter/LICENSE create mode 100644 packages/google-cloud-policytroubleshooter/README.md diff --git a/packages/google-cloud-policytroubleshooter/CODE_OF_CONDUCT.md b/packages/google-cloud-policytroubleshooter/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..2add2547a81 --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/CODE_OF_CONDUCT.md @@ -0,0 +1,94 @@ + +# Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +This Code of Conduct also applies outside the project spaces when the Project +Steward has a reasonable belief that an individual's behavior may have a +negative impact on the project or its community. + +## Conflict Resolution + +We do not believe that all conflict is bad; healthy debate and disagreement +often yield positive results. However, it is never okay to be disrespectful or +to engage in behavior that violates the project’s code of conduct. + +If you see someone violating the code of conduct, you are encouraged to address +the behavior directly with those involved. Many issues can be resolved quickly +and easily, and this gives people more control over the outcome of their +dispute. If you are unable to resolve the matter for any reason, or if the +behavior is threatening or harassing, report it. We are dedicated to providing +an environment where participants feel welcome and safe. + +Reports should be directed to *googleapis-stewards@google.com*, the +Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to +receive and address reported violations of the code of conduct. They will then +work with a committee consisting of representatives from the Open Source +Programs Office and the Google Open Source Strategy team. If for any reason you +are uncomfortable reaching out to the Project Steward, please email +opensource@google.com. + +We will investigate every complaint, but you may not receive a direct response. +We will use our discretion in determining when and how to follow up on reported +incidents, which may range from not taking action to permanent expulsion from +the project and project-sponsored spaces. We will notify the accused of the +report and provide them an opportunity to discuss it before any action is taken. +The identity of the reporter will be omitted from the details of the report +supplied to the accused. In potentially harmful situations, such as ongoing +harassment or threats to anyone's safety, we may take action without notice. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/packages/google-cloud-policytroubleshooter/CONTRIBUTING.md b/packages/google-cloud-policytroubleshooter/CONTRIBUTING.md new file mode 100644 index 00000000000..f6c4cf010e3 --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/CONTRIBUTING.md @@ -0,0 +1,65 @@ +# How to become a contributor and submit your own code + +**Table of contents** + +* [Contributor License Agreements](#contributor-license-agreements) +* [Contributing a patch](#contributing-a-patch) +* [Running the tests](#running-the-tests) +* [Releasing the library](#releasing-the-library) + +## Contributor License Agreements + +We'd love to accept your sample apps and patches! Before we can take them, we +have to jump a couple of legal hurdles. + +Please fill out either the individual or corporate Contributor License Agreement +(CLA). + + * If you are an individual writing original source code and you're sure you + own the intellectual property, then you'll need to sign an [individual CLA](https://developers.google.com/open-source/cla/individual). + * If you work for a company that wants to allow you to contribute your work, + then you'll need to sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate). + +Follow either of the two links above to access the appropriate CLA and +instructions for how to sign and return it. Once we receive it, we'll be able to +accept your pull requests. + +## Contributing A Patch + +1. Submit an issue describing your proposed change to the repo in question. +1. The repo owner will respond to your issue promptly. +1. If your proposed change is accepted, and you haven't already done so, sign a + Contributor License Agreement (see details above). +1. Fork the desired repo, develop and test your code changes. +1. Ensure that your code adheres to the existing style in the code to which + you are contributing. +1. Ensure that your code has an appropriate set of tests which all pass. +1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. +1. Submit a pull request. + +## Running the tests + +1. [Prepare your environment for Node.js setup][setup]. + +1. Install dependencies: + + npm install + +1. Run the tests: + + # Run unit tests. + npm test + + # Run sample integration tests. + gcloud auth application-default login + npm run samples-test + + # Run all system tests. + gcloud auth application-default login + npm run system-test + +1. Lint (and maybe fix) any changes: + + npm run fix + +[setup]: https://cloud.google.com/nodejs/docs/setup diff --git a/packages/google-cloud-policytroubleshooter/LICENSE b/packages/google-cloud-policytroubleshooter/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/LICENSE @@ -0,0 +1,202 @@ + + 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/packages/google-cloud-policytroubleshooter/README.md b/packages/google-cloud-policytroubleshooter/README.md new file mode 100644 index 00000000000..174fa6ea748 --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/README.md @@ -0,0 +1,120 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [IAM Policy Troubleshooter API: Node.js Client](https://github.com/googleapis/nodejs-policy-troubleshooter) + +[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![npm version](https://img.shields.io/npm/v/@google-cloud/policy-troubleshooter.svg)](https://www.npmjs.org/package/@google-cloud/policy-troubleshooter) +[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-policy-troubleshooter/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-policy-troubleshooter) + + + + +Policytroubleshooter client for Node.js + + +A comprehensive list of changes in each version may be found in +[the CHANGELOG](https://github.com/googleapis/nodejs-policy-troubleshooter/blob/master/CHANGELOG.md). + +* [IAM Policy Troubleshooter API Node.js Client API Reference][client-docs] +* [IAM Policy Troubleshooter API Documentation][product-docs] +* [github.com/googleapis/nodejs-policy-troubleshooter](https://github.com/googleapis/nodejs-policy-troubleshooter) + +Read more about the client libraries for Cloud APIs, including the older +Google APIs Client Libraries, in [Client Libraries Explained][explained]. + +[explained]: https://cloud.google.com/apis/docs/client-libraries-explained + +**Table of contents:** + + +* [Quickstart](#quickstart) + * [Before you begin](#before-you-begin) + * [Installing the client library](#installing-the-client-library) + + +* [Versioning](#versioning) +* [Contributing](#contributing) +* [License](#license) + +## Quickstart + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the IAM Policy Troubleshooter API API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + +### Installing the client library + +```bash +npm install @google-cloud/policy-troubleshooter +``` + + + + + +The [IAM Policy Troubleshooter API Node.js Client API Reference][client-docs] documentation +also contains samples. + +## Supported Node.js Versions + +Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). +Libraries are compatible with all current _active_ and _maintenance_ versions of +Node.js. + +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. + +_Legacy Node.js versions are supported as a best effort:_ + +* Legacy versions will not be tested in continuous integration. +* Some security patches may not be able to be backported. +* Dependencies will not be kept up-to-date, and features will not be backported. + +#### Legacy tags available + +* `legacy-8`: install client libraries from this dist-tag for versions + compatible with Node.js 8. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + + + + + + +More Information: [Google Cloud Platform Launch Stages][launch_stages] + +[launch_stages]: https://cloud.google.com/terms/launch-stages + +## Contributing + +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-policy-troubleshooter/blob/master/CONTRIBUTING.md). + +Please note that this `README.md`, the `samples/README.md`, +and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) +are generated from a central template. To edit one of these files, make an edit +to its template in this +[directory](https://github.com/googleapis/synthtool/tree/master/synthtool/gcp/templates/node_library). + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com/googleapis/nodejs-policy-troubleshooter/blob/master/LICENSE) + +[client-docs]: https://googleapis.dev/nodejs/policytroubleshooter/latest/ +[product-docs]: https://cloud.google.com/iam/docs/troubleshooting-access#rest-api/ +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=policytroubleshooter.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started From 39f033e8c3740d691680b3835cbd369df2790832 Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Tue, 22 Dec 2020 07:13:49 +0000 Subject: [PATCH 005/254] feat!: initial stub of library --- .../.eslintignore | 6 + .../.eslintrc.json | 3 + .../.gitattributes | 4 + .../.gitignore | 14 + .../.jsdoc.js | 55 + .../.mocharc.js | 29 + .../google-cloud-policytroubleshooter/.nycrc | 24 + .../.prettierignore | 6 + .../.prettierrc.js | 17 + .../.repo-metadata.json | 14 + .../README.md | 41 +- .../api-extractor.json | 369 + .../linkinator.config.json | 1 + .../package.json | 66 + .../policytroubleshooter/v1/checker.proto | 74 + .../v1/explanations.proto | 245 + .../protos/protos.d.ts | 4866 ++++++ .../protos/protos.js | 13134 ++++++++++++++++ .../protos/protos.json | 1390 ++ .../samples/README.md | 50 + .../samples/package.json | 23 + .../samples/quickstart.js | 51 + .../samples/test/quickstart.js | 50 + .../src/index.ts | 27 + .../src/v1/gapic_metadata.json | 33 + .../src/v1/iam_checker_client.ts | 393 + .../src/v1/iam_checker_client_config.json | 31 + .../src/v1/iam_checker_proto_list.json | 4 + .../src/v1/index.ts | 19 + .../synth.metadata | 37 + .../synth.py | 2 +- .../system-test/fixtures/sample/src/index.js | 26 + .../system-test/fixtures/sample/src/index.ts | 32 + .../system-test/install.ts | 51 + .../test/gapic_iam_checker_v1.ts | 226 + .../tsconfig.json | 19 + .../webpack.config.js | 64 + 37 files changed, 21493 insertions(+), 3 deletions(-) create mode 100644 packages/google-cloud-policytroubleshooter/.eslintignore create mode 100644 packages/google-cloud-policytroubleshooter/.eslintrc.json create mode 100644 packages/google-cloud-policytroubleshooter/.gitattributes create mode 100644 packages/google-cloud-policytroubleshooter/.gitignore create mode 100644 packages/google-cloud-policytroubleshooter/.jsdoc.js create mode 100644 packages/google-cloud-policytroubleshooter/.mocharc.js create mode 100644 packages/google-cloud-policytroubleshooter/.nycrc create mode 100644 packages/google-cloud-policytroubleshooter/.prettierignore create mode 100644 packages/google-cloud-policytroubleshooter/.prettierrc.js create mode 100644 packages/google-cloud-policytroubleshooter/.repo-metadata.json create mode 100644 packages/google-cloud-policytroubleshooter/api-extractor.json create mode 100644 packages/google-cloud-policytroubleshooter/linkinator.config.json create mode 100644 packages/google-cloud-policytroubleshooter/package.json create mode 100644 packages/google-cloud-policytroubleshooter/protos/google/cloud/policytroubleshooter/v1/checker.proto create mode 100644 packages/google-cloud-policytroubleshooter/protos/google/cloud/policytroubleshooter/v1/explanations.proto create mode 100644 packages/google-cloud-policytroubleshooter/protos/protos.d.ts create mode 100644 packages/google-cloud-policytroubleshooter/protos/protos.js create mode 100644 packages/google-cloud-policytroubleshooter/protos/protos.json create mode 100644 packages/google-cloud-policytroubleshooter/samples/README.md create mode 100644 packages/google-cloud-policytroubleshooter/samples/package.json create mode 100644 packages/google-cloud-policytroubleshooter/samples/quickstart.js create mode 100644 packages/google-cloud-policytroubleshooter/samples/test/quickstart.js create mode 100644 packages/google-cloud-policytroubleshooter/src/index.ts create mode 100644 packages/google-cloud-policytroubleshooter/src/v1/gapic_metadata.json create mode 100644 packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts create mode 100644 packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client_config.json create mode 100644 packages/google-cloud-policytroubleshooter/src/v1/iam_checker_proto_list.json create mode 100644 packages/google-cloud-policytroubleshooter/src/v1/index.ts create mode 100644 packages/google-cloud-policytroubleshooter/synth.metadata create mode 100644 packages/google-cloud-policytroubleshooter/system-test/fixtures/sample/src/index.js create mode 100644 packages/google-cloud-policytroubleshooter/system-test/fixtures/sample/src/index.ts create mode 100644 packages/google-cloud-policytroubleshooter/system-test/install.ts create mode 100644 packages/google-cloud-policytroubleshooter/test/gapic_iam_checker_v1.ts create mode 100644 packages/google-cloud-policytroubleshooter/tsconfig.json create mode 100644 packages/google-cloud-policytroubleshooter/webpack.config.js diff --git a/packages/google-cloud-policytroubleshooter/.eslintignore b/packages/google-cloud-policytroubleshooter/.eslintignore new file mode 100644 index 00000000000..9340ad9b86d --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/.eslintignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-cloud-policytroubleshooter/.eslintrc.json b/packages/google-cloud-policytroubleshooter/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/packages/google-cloud-policytroubleshooter/.gitattributes b/packages/google-cloud-policytroubleshooter/.gitattributes new file mode 100644 index 00000000000..33739cb74e4 --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/.gitattributes @@ -0,0 +1,4 @@ +*.ts text eol=lf +*.js text eol=lf +protos/* linguist-generated +**/api-extractor.json linguist-language=JSON-with-Comments diff --git a/packages/google-cloud-policytroubleshooter/.gitignore b/packages/google-cloud-policytroubleshooter/.gitignore new file mode 100644 index 00000000000..5d32b23782f --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/.gitignore @@ -0,0 +1,14 @@ +**/*.log +**/node_modules +.coverage +coverage +.nyc_output +docs/ +out/ +build/ +system-test/secrets.js +system-test/*key.json +*.lock +.DS_Store +package-lock.json +__pycache__ diff --git a/packages/google-cloud-policytroubleshooter/.jsdoc.js b/packages/google-cloud-policytroubleshooter/.jsdoc.js new file mode 100644 index 00000000000..5f5bba8931a --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2020 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +module.exports = { + opts: { + readme: './README.md', + package: './package.json', + template: './node_modules/jsdoc-fresh', + recurse: true, + verbose: true, + destination: './docs/' + }, + plugins: [ + 'plugins/markdown', + 'jsdoc-region-tag' + ], + source: { + excludePattern: '(^|\\/|\\\\)[._]', + include: [ + 'build/src', + 'protos' + ], + includePattern: '\\.js$' + }, + templates: { + copyright: 'Copyright 2020 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/policy-troubleshooter', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/packages/google-cloud-policytroubleshooter/.mocharc.js b/packages/google-cloud-policytroubleshooter/.mocharc.js new file mode 100644 index 00000000000..0b600509bed --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/.mocharc.js @@ -0,0 +1,29 @@ +// Copyright 2020 Google LLC +// +// 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. +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000, + "recursive": true +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} +module.exports = config diff --git a/packages/google-cloud-policytroubleshooter/.nycrc b/packages/google-cloud-policytroubleshooter/.nycrc new file mode 100644 index 00000000000..b18d5472b62 --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/.nycrc @@ -0,0 +1,24 @@ +{ + "report-dir": "./.coverage", + "reporter": ["text", "lcov"], + "exclude": [ + "**/*-test", + "**/.coverage", + "**/apis", + "**/benchmark", + "**/conformance", + "**/docs", + "**/samples", + "**/scripts", + "**/protos", + "**/test", + "**/*.d.ts", + ".jsdoc.js", + "**/.jsdoc.js", + "karma.conf.js", + "webpack-tests.config.js", + "webpack.config.js" + ], + "exclude-after-remap": false, + "all": true +} diff --git a/packages/google-cloud-policytroubleshooter/.prettierignore b/packages/google-cloud-policytroubleshooter/.prettierignore new file mode 100644 index 00000000000..9340ad9b86d --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-cloud-policytroubleshooter/.prettierrc.js b/packages/google-cloud-policytroubleshooter/.prettierrc.js new file mode 100644 index 00000000000..d1b95106f4c --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/.prettierrc.js @@ -0,0 +1,17 @@ +// Copyright 2020 Google LLC +// +// 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 +// +// https://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. + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/packages/google-cloud-policytroubleshooter/.repo-metadata.json b/packages/google-cloud-policytroubleshooter/.repo-metadata.json new file mode 100644 index 00000000000..e50bbc309e0 --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/.repo-metadata.json @@ -0,0 +1,14 @@ +{ + "name": "policytroubleshooter", + "name_pretty": "IAM Policy Troubleshooter API", + "product_documentation": "https://cloud.google.com/iam/docs/troubleshooting-access#rest-api/", + "client_documentation": "https://googleapis.dev/nodejs/policytroubleshooter/latest/", + "issue_tracker": "https://github.com/googleapis/nodejs-policy-troubleshooter/issues", + "release_level": "GA", + "language": "nodejs", + "repo": "googleapis/nodejs-policy-troubleshooter", + "distribution_name": "@google-cloud/policy-troubleshooter", + "api_id": "policytroubleshooter.googleapis.com", + "requires_billing": true +} + diff --git a/packages/google-cloud-policytroubleshooter/README.md b/packages/google-cloud-policytroubleshooter/README.md index 174fa6ea748..f54b61b845c 100644 --- a/packages/google-cloud-policytroubleshooter/README.md +++ b/packages/google-cloud-policytroubleshooter/README.md @@ -32,8 +32,8 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. * [Quickstart](#quickstart) * [Before you begin](#before-you-begin) * [Installing the client library](#installing-the-client-library) - - + * [Using the client library](#using-the-client-library) +* [Samples](#samples) * [Versioning](#versioning) * [Contributing](#contributing) * [License](#license) @@ -55,6 +55,43 @@ npm install @google-cloud/policy-troubleshooter ``` +### Using the client library + +```javascript +// Imports the Google Cloud client library + +// remove this line after package is released +// eslint-disable-next-line node/no-missing-require +const {IamCheckerClient} = require('@google-cloud/policy-troubleshooter'); + +// TODO(developer): replace with your prefered project ID. +// const projectId = 'my-project' + +// Creates a client +// eslint-disable-next-line no-unused-vars +const client = new {IamCheckerClient}(); + +//TODO(library generator): write the actual function you will be testing +async function doSomething() { + console.log('Developer! Change this code so that it shows how to use the library! See comments below on structure.') + // const [thing] = await client.methodName({ + // }); + // console.info(thing); +} +doSomething(); + +``` + + + +## Samples + +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-policy-troubleshooter/tree/master/samples) directory. The samples' `README.md` +has instructions for running the samples. + +| Sample | Source Code | Try it | +| --------------------------- | --------------------------------- | ------ | +| Quickstart | [source code](https://github.com/googleapis/nodejs-policy-troubleshooter/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-policy-troubleshooter&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | diff --git a/packages/google-cloud-policytroubleshooter/api-extractor.json b/packages/google-cloud-policytroubleshooter/api-extractor.json new file mode 100644 index 00000000000..de228294b23 --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/api-extractor.json @@ -0,0 +1,369 @@ +/** + * Config file for API Extractor. For more info, please visit: https://api-extractor.com + */ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + + /** + * Optionally specifies another JSON config file that this file extends from. This provides a way for + * standard settings to be shared across multiple projects. + * + * If the path starts with "./" or "../", the path is resolved relative to the folder of the file that contains + * the "extends" field. Otherwise, the first path segment is interpreted as an NPM package name, and will be + * resolved using NodeJS require(). + * + * SUPPORTED TOKENS: none + * DEFAULT VALUE: "" + */ + // "extends": "./shared/api-extractor-base.json" + // "extends": "my-package/include/api-extractor-base.json" + + /** + * Determines the "" token that can be used with other config file settings. The project folder + * typically contains the tsconfig.json and package.json config files, but the path is user-defined. + * + * The path is resolved relative to the folder of the config file that contains the setting. + * + * The default value for "projectFolder" is the token "", which means the folder is determined by traversing + * parent folders, starting from the folder containing api-extractor.json, and stopping at the first folder + * that contains a tsconfig.json file. If a tsconfig.json file cannot be found in this way, then an error + * will be reported. + * + * SUPPORTED TOKENS: + * DEFAULT VALUE: "" + */ + // "projectFolder": "..", + + /** + * (REQUIRED) Specifies the .d.ts file to be used as the starting point for analysis. API Extractor + * analyzes the symbols exported by this module. + * + * The file extension must be ".d.ts" and not ".ts". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + */ + "mainEntryPointFilePath": "/protos/protos.d.ts", + + /** + * A list of NPM package names whose exports should be treated as part of this package. + * + * For example, suppose that Webpack is used to generate a distributed bundle for the project "library1", + * and another NPM package "library2" is embedded in this bundle. Some types from library2 may become part + * of the exported API for library1, but by default API Extractor would generate a .d.ts rollup that explicitly + * imports library2. To avoid this, we can specify: + * + * "bundledPackages": [ "library2" ], + * + * This would direct API Extractor to embed those types directly in the .d.ts rollup, as if they had been + * local files for library1. + */ + "bundledPackages": [ ], + + /** + * Determines how the TypeScript compiler engine will be invoked by API Extractor. + */ + "compiler": { + /** + * Specifies the path to the tsconfig.json file to be used by API Extractor when analyzing the project. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * Note: This setting will be ignored if "overrideTsconfig" is used. + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/tsconfig.json" + */ + // "tsconfigFilePath": "/tsconfig.json", + + /** + * Provides a compiler configuration that will be used instead of reading the tsconfig.json file from disk. + * The object must conform to the TypeScript tsconfig schema: + * + * http://json.schemastore.org/tsconfig + * + * If omitted, then the tsconfig.json file will be read from the "projectFolder". + * + * DEFAULT VALUE: no overrideTsconfig section + */ + // "overrideTsconfig": { + // . . . + // } + + /** + * This option causes the compiler to be invoked with the --skipLibCheck option. This option is not recommended + * and may cause API Extractor to produce incomplete or incorrect declarations, but it may be required when + * dependencies contain declarations that are incompatible with the TypeScript engine that API Extractor uses + * for its analysis. Where possible, the underlying issue should be fixed rather than relying on skipLibCheck. + * + * DEFAULT VALUE: false + */ + // "skipLibCheck": true, + }, + + /** + * Configures how the API report file (*.api.md) will be generated. + */ + "apiReport": { + /** + * (REQUIRED) Whether to generate an API report. + */ + "enabled": true, + + /** + * The filename for the API report files. It will be combined with "reportFolder" or "reportTempFolder" to produce + * a full file path. + * + * The file extension should be ".api.md", and the string should not contain a path separator such as "\" or "/". + * + * SUPPORTED TOKENS: , + * DEFAULT VALUE: ".api.md" + */ + // "reportFileName": ".api.md", + + /** + * Specifies the folder where the API report file is written. The file name portion is determined by + * the "reportFileName" setting. + * + * The API report file is normally tracked by Git. Changes to it can be used to trigger a branch policy, + * e.g. for an API review. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/etc/" + */ + // "reportFolder": "/etc/", + + /** + * Specifies the folder where the temporary report file is written. The file name portion is determined by + * the "reportFileName" setting. + * + * After the temporary file is written to disk, it is compared with the file in the "reportFolder". + * If they are different, a production build will fail. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/temp/" + */ + // "reportTempFolder": "/temp/" + }, + + /** + * Configures how the doc model file (*.api.json) will be generated. + */ + "docModel": { + /** + * (REQUIRED) Whether to generate a doc model file. + */ + "enabled": true, + + /** + * The output path for the doc model file. The file extension should be ".api.json". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/temp/.api.json" + */ + // "apiJsonFilePath": "/temp/.api.json" + }, + + /** + * Configures how the .d.ts rollup file will be generated. + */ + "dtsRollup": { + /** + * (REQUIRED) Whether to generate the .d.ts rollup file. + */ + "enabled": true, + + /** + * Specifies the output path for a .d.ts rollup file to be generated without any trimming. + * This file will include all declarations that are exported by the main entry point. + * + * If the path is an empty string, then this file will not be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/dist/.d.ts" + */ + // "untrimmedFilePath": "/dist/.d.ts", + + /** + * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "beta" release. + * This file will include only declarations that are marked as "@public" or "@beta". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "betaTrimmedFilePath": "/dist/-beta.d.ts", + + + /** + * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "public" release. + * This file will include only declarations that are marked as "@public". + * + * If the path is an empty string, then this file will not be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "publicTrimmedFilePath": "/dist/-public.d.ts", + + /** + * When a declaration is trimmed, by default it will be replaced by a code comment such as + * "Excluded from this release type: exampleMember". Set "omitTrimmingComments" to true to remove the + * declaration completely. + * + * DEFAULT VALUE: false + */ + // "omitTrimmingComments": true + }, + + /** + * Configures how the tsdoc-metadata.json file will be generated. + */ + "tsdocMetadata": { + /** + * Whether to generate the tsdoc-metadata.json file. + * + * DEFAULT VALUE: true + */ + // "enabled": true, + + /** + * Specifies where the TSDoc metadata file should be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * The default value is "", which causes the path to be automatically inferred from the "tsdocMetadata", + * "typings" or "main" fields of the project's package.json. If none of these fields are set, the lookup + * falls back to "tsdoc-metadata.json" in the package folder. + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "tsdocMetadataFilePath": "/dist/tsdoc-metadata.json" + }, + + /** + * Specifies what type of newlines API Extractor should use when writing output files. By default, the output files + * will be written with Windows-style newlines. To use POSIX-style newlines, specify "lf" instead. + * To use the OS's default newline kind, specify "os". + * + * DEFAULT VALUE: "crlf" + */ + // "newlineKind": "crlf", + + /** + * Configures how API Extractor reports error and warning messages produced during analysis. + * + * There are three sources of messages: compiler messages, API Extractor messages, and TSDoc messages. + */ + "messages": { + /** + * Configures handling of diagnostic messages reported by the TypeScript compiler engine while analyzing + * the input .d.ts files. + * + * TypeScript message identifiers start with "TS" followed by an integer. For example: "TS2551" + * + * DEFAULT VALUE: A single "default" entry with logLevel=warning. + */ + "compilerMessageReporting": { + /** + * Configures the default routing for messages that don't match an explicit rule in this table. + */ + "default": { + /** + * Specifies whether the message should be written to the the tool's output log. Note that + * the "addToApiReportFile" property may supersede this option. + * + * Possible values: "error", "warning", "none" + * + * Errors cause the build to fail and return a nonzero exit code. Warnings cause a production build fail + * and return a nonzero exit code. For a non-production build (e.g. when "api-extractor run" includes + * the "--local" option), the warning is displayed but the build will not fail. + * + * DEFAULT VALUE: "warning" + */ + "logLevel": "warning", + + /** + * When addToApiReportFile is true: If API Extractor is configured to write an API report file (.api.md), + * then the message will be written inside that file; otherwise, the message is instead logged according to + * the "logLevel" option. + * + * DEFAULT VALUE: false + */ + // "addToApiReportFile": false + }, + + // "TS2551": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + }, + + /** + * Configures handling of messages reported by API Extractor during its analysis. + * + * API Extractor message identifiers start with "ae-". For example: "ae-extra-release-tag" + * + * DEFAULT VALUE: See api-extractor-defaults.json for the complete table of extractorMessageReporting mappings + */ + "extractorMessageReporting": { + "default": { + "logLevel": "warning", + // "addToApiReportFile": false + }, + + // "ae-extra-release-tag": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + }, + + /** + * Configures handling of messages reported by the TSDoc parser when analyzing code comments. + * + * TSDoc message identifiers start with "tsdoc-". For example: "tsdoc-link-tag-unescaped-text" + * + * DEFAULT VALUE: A single "default" entry with logLevel=warning. + */ + "tsdocMessageReporting": { + "default": { + "logLevel": "warning", + // "addToApiReportFile": false + } + + // "tsdoc-link-tag-unescaped-text": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + } + } + +} diff --git a/packages/google-cloud-policytroubleshooter/linkinator.config.json b/packages/google-cloud-policytroubleshooter/linkinator.config.json new file mode 100644 index 00000000000..fe98eb78cac --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/linkinator.config.json @@ -0,0 +1 @@ +{"recurse":true,"skip":["https://googleapis.dev/nodejs/policytroubleshooter/latest/","https://github.com/googleapis/nodejs-policy-troubleshooter/blob/master/CHANGELOG.md","https://github.com/googleapis/nodejs-policy-troubleshooter","https://github.com/googleapis/nodejs-policy-troubleshooter/blob/master/samples/quickstart.js","https://github.com/googleapis/nodejs-policy-troubleshooter/tree/master/samples","https://github.com/googleapis/nodejs-policy-troubleshooter/blob/master/LICENSE","https://github.com/googleapis/nodejs-policy-troubleshooter/blob/master/CONTRIBUTING.md","http://localhost:5244/","https://codecov.io/gh/googleapis/","www.googleapis.com","img.shields.io"],"silent":true,"concurrency":10} \ No newline at end of file diff --git a/packages/google-cloud-policytroubleshooter/package.json b/packages/google-cloud-policytroubleshooter/package.json new file mode 100644 index 00000000000..6f17c915f8e --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/package.json @@ -0,0 +1,66 @@ +{ + "name": "@google-cloud/policy-troubleshooter", + "version": "0.1.0", + "description": "Policytroubleshooter client for Node.js", + "repository": "googleapis/nodejs-policytroubleshooter", + "license": "Apache-2.0", + "author": "Google LLC", + "main": "build/src/index.js", + "files": [ + "build/src", + "build/protos" + ], + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google policytroubleshooter", + "policytroubleshooter", + "iam checker" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test", + "samples-test": "cd samples/ && npm link ../ && npm test", + "prelint": "cd samples; npm link ../; npm i" + }, + "dependencies": { + "google-gax": "^2.9.2" + }, + "devDependencies": { + "@types/mocha": "^8.0.4", + "@types/node": "^14.14.10", + "@types/sinon": "^9.0.9", + "c8": "^7.3.5", + "gts": "^3.0.3", + "jsdoc": "^3.6.6", + "jsdoc-fresh": "^1.0.2", + "jsdoc-region-tag": "^1.0.6", + "linkinator": "^2.7.0", + "mocha": "^8.2.1", + "null-loader": "^4.0.1", + "pack-n-play": "^1.0.0-2", + "sinon": "^9.2.1", + "ts-loader": "^8.0.11", + "typescript": "^4.1.2", + "webpack": "^5.9.0", + "webpack-cli": "^4.2.0" + }, + "engines": { + "node": ">=10.0.0" + } +} diff --git a/packages/google-cloud-policytroubleshooter/protos/google/cloud/policytroubleshooter/v1/checker.proto b/packages/google-cloud-policytroubleshooter/protos/google/cloud/policytroubleshooter/v1/checker.proto new file mode 100644 index 00000000000..1b20892ec70 --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/protos/google/cloud/policytroubleshooter/v1/checker.proto @@ -0,0 +1,74 @@ +// Copyright 2019 Google LLC. +// +// 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. +// + +syntax = "proto3"; + +package google.cloud.policytroubleshooter.v1; + +import public "google/cloud/policytroubleshooter/v1/explanations.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.PolicyTroubleshooter.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/policytroubleshooter/v1;policytroubleshooter"; +option java_multiple_files = true; +option java_outer_classname = "IAMCheckerProto"; +option java_package = "com.google.cloud.policytroubleshooter.v1"; +option php_namespace = "Google\\Cloud\\PolicyTroubleshooter\\V1"; +option ruby_package = "Google::Cloud::PolicyTroubleshooter::V1"; + +// IAM Policy Troubleshooter service. +// +// This service helps you troubleshoot access issues for Google Cloud resources. +service IamChecker { + option (google.api.default_host) = "policytroubleshooter.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Checks whether a member has a specific permission for a specific resource, + // and explains why the member does or does not have that permission. + rpc TroubleshootIamPolicy(TroubleshootIamPolicyRequest) returns (TroubleshootIamPolicyResponse) { + option (google.api.http) = { + post: "/v1/iam:troubleshoot" + body: "*" + }; + } +} + +// Request for [TroubleshootIamPolicy][google.cloud.policytroubleshooter.v1.IamChecker.TroubleshootIamPolicy]. +message TroubleshootIamPolicyRequest { + // The information to use for checking whether a member has a permission for a + // resource. + AccessTuple access_tuple = 1; +} + +// Response for [TroubleshootIamPolicy][google.cloud.policytroubleshooter.v1.IamChecker.TroubleshootIamPolicy]. +message TroubleshootIamPolicyResponse { + // Indicates whether the member has the specified permission for the specified + // resource, based on evaluating all of the applicable IAM policies. + AccessState access = 1; + + // List of IAM policies that were evaluated to check the member's permissions, + // with annotations to indicate how each policy contributed to the final + // result. + // + // The list of policies can include the policy for the resource itself. It can + // also include policies that are inherited from higher levels of the resource + // hierarchy, including the organization, the folder, and the project. + // + // To learn more about the resource hierarchy, see + // https://cloud.google.com/iam/help/resource-hierarchy. + repeated ExplainedPolicy explained_policies = 2; +} diff --git a/packages/google-cloud-policytroubleshooter/protos/google/cloud/policytroubleshooter/v1/explanations.proto b/packages/google-cloud-policytroubleshooter/protos/google/cloud/policytroubleshooter/v1/explanations.proto new file mode 100644 index 00000000000..1eb2a58ce7b --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/protos/google/cloud/policytroubleshooter/v1/explanations.proto @@ -0,0 +1,245 @@ +// Copyright 2019 Google LLC. +// +// 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. +// + +syntax = "proto3"; + +package google.cloud.policytroubleshooter.v1; + +import "google/api/field_behavior.proto"; +import "google/iam/v1/policy.proto"; +import "google/type/expr.proto"; + +option csharp_namespace = "Google.Cloud.PolicyTroubleshooter.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/policytroubleshooter/v1;policytroubleshooter"; +option php_namespace = "Google\\Cloud\\PolicyTroubleshooter\\V1"; +option ruby_package = "Google::Cloud::PolicyTroubleshooter::V1"; + +// Information about the member, resource, and permission to check. +message AccessTuple { + // Required. The member, or principal, whose access you want to check, in the form of + // the email address that represents that member. For example, + // `alice@example.com` or + // `my-service-account@my-project.iam.gserviceaccount.com`. + // + // The member must be a Google Account or a service account. Other types of + // members are not supported. + string principal = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The full resource name that identifies the resource. For example, + // `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`. + // + // For examples of full resource names for Google Cloud services, see + // https://cloud.google.com/iam/help/troubleshooter/full-resource-names. + string full_resource_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The IAM permission to check for the specified member and resource. + // + // For a complete list of IAM permissions, see + // https://cloud.google.com/iam/help/permissions/reference. + // + // For a complete list of predefined IAM roles and the permissions in each + // role, see https://cloud.google.com/iam/help/roles/reference. + string permission = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Details about how a specific IAM [Policy][google.iam.v1.Policy] contributed +// to the access check. +message ExplainedPolicy { + // Indicates whether _this policy_ provides the specified permission to the + // specified member for the specified resource. + // + // This field does _not_ indicate whether the member actually has the + // permission for the resource. There might be another policy that overrides + // this policy. To determine whether the member actually has the permission, + // use the `access` field in the + // [TroubleshootIamPolicyResponse][IamChecker.TroubleshootIamPolicyResponse]. + AccessState access = 1; + + // The full resource name that identifies the resource. For example, + // `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`. + // + // If the sender of the request does not have access to the policy, this field + // is omitted. + // + // For examples of full resource names for Google Cloud services, see + // https://cloud.google.com/iam/help/troubleshooter/full-resource-names. + string full_resource_name = 2; + + // The IAM policy attached to the resource. + // + // If the sender of the request does not have access to the policy, this field + // is empty. + google.iam.v1.Policy policy = 3; + + // Details about how each binding in the policy affects the member's ability, + // or inability, to use the permission for the resource. + // + // If the sender of the request does not have access to the policy, this field + // is omitted. + repeated BindingExplanation binding_explanations = 4; + + // The relevance of this policy to the overall determination in the + // [TroubleshootIamPolicyResponse][IamChecker.TroubleshootIamPolicyResponse]. + // + // If the sender of the request does not have access to the policy, this field + // is omitted. + HeuristicRelevance relevance = 5; +} + +// Details about how a binding in a policy affects a member's ability to use a +// permission. +message BindingExplanation { + // Details about whether the binding includes the member. + message AnnotatedMembership { + // Indicates whether the binding includes the member. + Membership membership = 1; + + // The relevance of the member's status to the overall determination for the + // binding. + HeuristicRelevance relevance = 2; + } + + // Whether a role includes a specific permission. + enum RolePermission { + // Reserved for future use. + ROLE_PERMISSION_UNSPECIFIED = 0; + + // The permission is included in the role. + ROLE_PERMISSION_INCLUDED = 1; + + // The permission is not included in the role. + ROLE_PERMISSION_NOT_INCLUDED = 2; + + // The sender of the request is not allowed to access the binding. + ROLE_PERMISSION_UNKNOWN_INFO_DENIED = 3; + } + + // Whether the binding includes the member. + enum Membership { + // Reserved for future use. + MEMBERSHIP_UNSPECIFIED = 0; + + // The binding includes the member. The member can be included directly + // or indirectly. For example: + // + // * A member is included directly if that member is listed in the binding. + // * A member is included indirectly if that member is in a Google group or + // G Suite domain that is listed in the binding. + MEMBERSHIP_INCLUDED = 1; + + // The binding does not include the member. + MEMBERSHIP_NOT_INCLUDED = 2; + + // The sender of the request is not allowed to access the binding. + MEMBERSHIP_UNKNOWN_INFO_DENIED = 3; + + // The member is an unsupported type. Only Google Accounts and service + // accounts are supported. + MEMBERSHIP_UNKNOWN_UNSUPPORTED = 4; + } + + // Required. Indicates whether _this binding_ provides the specified permission to the + // specified member for the specified resource. + // + // This field does _not_ indicate whether the member actually has the + // permission for the resource. There might be another binding that overrides + // this binding. To determine whether the member actually has the permission, + // use the `access` field in the + // [TroubleshootIamPolicyResponse][IamChecker.TroubleshootIamPolicyResponse]. + AccessState access = 1 [(google.api.field_behavior) = REQUIRED]; + + // The role that this binding grants. For example, + // `roles/compute.serviceAgent`. + // + // For a complete list of predefined IAM roles, as well as the permissions in + // each role, see https://cloud.google.com/iam/help/roles/reference. + string role = 2; + + // Indicates whether the role granted by this binding contains the specified + // permission. + RolePermission role_permission = 3; + + // The relevance of the permission's existence, or nonexistence, in the role + // to the overall determination for the entire policy. + HeuristicRelevance role_permission_relevance = 4; + + // Indicates whether each member in the binding includes the member specified + // in the request, either directly or indirectly. Each key identifies a member + // in the binding, and each value indicates whether the member in the binding + // includes the member in the request. + // + // For example, suppose that a binding includes the following members: + // + // * `user:alice@example.com` + // * `group:product-eng@example.com` + // + // You want to troubleshoot access for `user:bob@example.com`. This user is a + // member of the group `group:product-eng@example.com`. + // + // For the first member in the binding, the key is `user:alice@example.com`, + // and the `membership` field in the value is set to + // `MEMBERSHIP_NOT_INCLUDED`. + // + // For the second member in the binding, the key is + // `group:product-eng@example.com`, and the `membership` field in the value is + // set to `MEMBERSHIP_INCLUDED`. + map memberships = 5; + + // The relevance of this binding to the overall determination for the entire + // policy. + HeuristicRelevance relevance = 6; + + // A condition expression that prevents access unless the expression evaluates + // to `true`. + // + // To learn about IAM Conditions, see + // http://cloud.google.com/iam/help/conditions/overview. + google.type.Expr condition = 7; +} + +// Whether a member has a permission for a resource. +enum AccessState { + // Reserved for future use. + ACCESS_STATE_UNSPECIFIED = 0; + + // The member has the permission. + GRANTED = 1; + + // The member does not have the permission. + NOT_GRANTED = 2; + + // The member has the permission only if a condition expression evaluates to + // `true`. + UNKNOWN_CONDITIONAL = 3; + + // The sender of the request does not have access to all of the policies that + // Policy Troubleshooter needs to evaluate. + UNKNOWN_INFO_DENIED = 4; +} + +// The extent to which a single data point contributes to an overall +// determination. +enum HeuristicRelevance { + // Reserved for future use. + HEURISTIC_RELEVANCE_UNSPECIFIED = 0; + + // The data point has a limited effect on the result. Changing the data point + // is unlikely to affect the overall determination. + NORMAL = 1; + + // The data point has a strong effect on the result. Changing the data point + // is likely to affect the overall determination. + HIGH = 2; +} diff --git a/packages/google-cloud-policytroubleshooter/protos/protos.d.ts b/packages/google-cloud-policytroubleshooter/protos/protos.d.ts new file mode 100644 index 00000000000..e7e01db6bde --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/protos/protos.d.ts @@ -0,0 +1,4866 @@ +// Copyright 2020 Google LLC +// +// 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. + +import * as Long from "long"; +import {protobuf as $protobuf} from "google-gax"; +/** Namespace google. */ +export namespace google { + + /** Namespace cloud. */ + namespace cloud { + + /** Namespace policytroubleshooter. */ + namespace policytroubleshooter { + + /** Namespace v1. */ + namespace v1 { + + /** Represents an IamChecker */ + class IamChecker extends $protobuf.rpc.Service { + + /** + * Constructs a new IamChecker service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new IamChecker service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): IamChecker; + + /** + * Calls TroubleshootIamPolicy. + * @param request TroubleshootIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TroubleshootIamPolicyResponse + */ + public troubleshootIamPolicy(request: google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyRequest, callback: google.cloud.policytroubleshooter.v1.IamChecker.TroubleshootIamPolicyCallback): void; + + /** + * Calls TroubleshootIamPolicy. + * @param request TroubleshootIamPolicyRequest message or plain object + * @returns Promise + */ + public troubleshootIamPolicy(request: google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyRequest): Promise; + } + + namespace IamChecker { + + /** + * Callback as used by {@link google.cloud.policytroubleshooter.v1.IamChecker#troubleshootIamPolicy}. + * @param error Error, if any + * @param [response] TroubleshootIamPolicyResponse + */ + type TroubleshootIamPolicyCallback = (error: (Error|null), response?: google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse) => void; + } + + /** Properties of a TroubleshootIamPolicyRequest. */ + interface ITroubleshootIamPolicyRequest { + + /** TroubleshootIamPolicyRequest accessTuple */ + accessTuple?: (google.cloud.policytroubleshooter.v1.IAccessTuple|null); + } + + /** Represents a TroubleshootIamPolicyRequest. */ + class TroubleshootIamPolicyRequest implements ITroubleshootIamPolicyRequest { + + /** + * Constructs a new TroubleshootIamPolicyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyRequest); + + /** TroubleshootIamPolicyRequest accessTuple. */ + public accessTuple?: (google.cloud.policytroubleshooter.v1.IAccessTuple|null); + + /** + * Creates a new TroubleshootIamPolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns TroubleshootIamPolicyRequest instance + */ + public static create(properties?: google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyRequest): google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest; + + /** + * Encodes the specified TroubleshootIamPolicyRequest message. Does not implicitly {@link google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest.verify|verify} messages. + * @param message TroubleshootIamPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TroubleshootIamPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest.verify|verify} messages. + * @param message TroubleshootIamPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TroubleshootIamPolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TroubleshootIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest; + + /** + * Decodes a TroubleshootIamPolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TroubleshootIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest; + + /** + * Verifies a TroubleshootIamPolicyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TroubleshootIamPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TroubleshootIamPolicyRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest; + + /** + * Creates a plain object from a TroubleshootIamPolicyRequest message. Also converts values to other types if specified. + * @param message TroubleshootIamPolicyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TroubleshootIamPolicyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a TroubleshootIamPolicyResponse. */ + interface ITroubleshootIamPolicyResponse { + + /** TroubleshootIamPolicyResponse access */ + access?: (google.cloud.policytroubleshooter.v1.AccessState|keyof typeof google.cloud.policytroubleshooter.v1.AccessState|null); + + /** TroubleshootIamPolicyResponse explainedPolicies */ + explainedPolicies?: (google.cloud.policytroubleshooter.v1.IExplainedPolicy[]|null); + } + + /** Represents a TroubleshootIamPolicyResponse. */ + class TroubleshootIamPolicyResponse implements ITroubleshootIamPolicyResponse { + + /** + * Constructs a new TroubleshootIamPolicyResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyResponse); + + /** TroubleshootIamPolicyResponse access. */ + public access: (google.cloud.policytroubleshooter.v1.AccessState|keyof typeof google.cloud.policytroubleshooter.v1.AccessState); + + /** TroubleshootIamPolicyResponse explainedPolicies. */ + public explainedPolicies: google.cloud.policytroubleshooter.v1.IExplainedPolicy[]; + + /** + * Creates a new TroubleshootIamPolicyResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns TroubleshootIamPolicyResponse instance + */ + public static create(properties?: google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyResponse): google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse; + + /** + * Encodes the specified TroubleshootIamPolicyResponse message. Does not implicitly {@link google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse.verify|verify} messages. + * @param message TroubleshootIamPolicyResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TroubleshootIamPolicyResponse message, length delimited. Does not implicitly {@link google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse.verify|verify} messages. + * @param message TroubleshootIamPolicyResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TroubleshootIamPolicyResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TroubleshootIamPolicyResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse; + + /** + * Decodes a TroubleshootIamPolicyResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TroubleshootIamPolicyResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse; + + /** + * Verifies a TroubleshootIamPolicyResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TroubleshootIamPolicyResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TroubleshootIamPolicyResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse; + + /** + * Creates a plain object from a TroubleshootIamPolicyResponse message. Also converts values to other types if specified. + * @param message TroubleshootIamPolicyResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TroubleshootIamPolicyResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AccessTuple. */ + interface IAccessTuple { + + /** AccessTuple principal */ + principal?: (string|null); + + /** AccessTuple fullResourceName */ + fullResourceName?: (string|null); + + /** AccessTuple permission */ + permission?: (string|null); + } + + /** Represents an AccessTuple. */ + class AccessTuple implements IAccessTuple { + + /** + * Constructs a new AccessTuple. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.policytroubleshooter.v1.IAccessTuple); + + /** AccessTuple principal. */ + public principal: string; + + /** AccessTuple fullResourceName. */ + public fullResourceName: string; + + /** AccessTuple permission. */ + public permission: string; + + /** + * Creates a new AccessTuple instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessTuple instance + */ + public static create(properties?: google.cloud.policytroubleshooter.v1.IAccessTuple): google.cloud.policytroubleshooter.v1.AccessTuple; + + /** + * Encodes the specified AccessTuple message. Does not implicitly {@link google.cloud.policytroubleshooter.v1.AccessTuple.verify|verify} messages. + * @param message AccessTuple message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.policytroubleshooter.v1.IAccessTuple, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessTuple message, length delimited. Does not implicitly {@link google.cloud.policytroubleshooter.v1.AccessTuple.verify|verify} messages. + * @param message AccessTuple message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.policytroubleshooter.v1.IAccessTuple, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessTuple message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessTuple + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.policytroubleshooter.v1.AccessTuple; + + /** + * Decodes an AccessTuple message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessTuple + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.policytroubleshooter.v1.AccessTuple; + + /** + * Verifies an AccessTuple message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccessTuple message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessTuple + */ + public static fromObject(object: { [k: string]: any }): google.cloud.policytroubleshooter.v1.AccessTuple; + + /** + * Creates a plain object from an AccessTuple message. Also converts values to other types if specified. + * @param message AccessTuple + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.policytroubleshooter.v1.AccessTuple, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessTuple to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an ExplainedPolicy. */ + interface IExplainedPolicy { + + /** ExplainedPolicy access */ + access?: (google.cloud.policytroubleshooter.v1.AccessState|keyof typeof google.cloud.policytroubleshooter.v1.AccessState|null); + + /** ExplainedPolicy fullResourceName */ + fullResourceName?: (string|null); + + /** ExplainedPolicy policy */ + policy?: (google.iam.v1.IPolicy|null); + + /** ExplainedPolicy bindingExplanations */ + bindingExplanations?: (google.cloud.policytroubleshooter.v1.IBindingExplanation[]|null); + + /** ExplainedPolicy relevance */ + relevance?: (google.cloud.policytroubleshooter.v1.HeuristicRelevance|keyof typeof google.cloud.policytroubleshooter.v1.HeuristicRelevance|null); + } + + /** Represents an ExplainedPolicy. */ + class ExplainedPolicy implements IExplainedPolicy { + + /** + * Constructs a new ExplainedPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.policytroubleshooter.v1.IExplainedPolicy); + + /** ExplainedPolicy access. */ + public access: (google.cloud.policytroubleshooter.v1.AccessState|keyof typeof google.cloud.policytroubleshooter.v1.AccessState); + + /** ExplainedPolicy fullResourceName. */ + public fullResourceName: string; + + /** ExplainedPolicy policy. */ + public policy?: (google.iam.v1.IPolicy|null); + + /** ExplainedPolicy bindingExplanations. */ + public bindingExplanations: google.cloud.policytroubleshooter.v1.IBindingExplanation[]; + + /** ExplainedPolicy relevance. */ + public relevance: (google.cloud.policytroubleshooter.v1.HeuristicRelevance|keyof typeof google.cloud.policytroubleshooter.v1.HeuristicRelevance); + + /** + * Creates a new ExplainedPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns ExplainedPolicy instance + */ + public static create(properties?: google.cloud.policytroubleshooter.v1.IExplainedPolicy): google.cloud.policytroubleshooter.v1.ExplainedPolicy; + + /** + * Encodes the specified ExplainedPolicy message. Does not implicitly {@link google.cloud.policytroubleshooter.v1.ExplainedPolicy.verify|verify} messages. + * @param message ExplainedPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.policytroubleshooter.v1.IExplainedPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExplainedPolicy message, length delimited. Does not implicitly {@link google.cloud.policytroubleshooter.v1.ExplainedPolicy.verify|verify} messages. + * @param message ExplainedPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.policytroubleshooter.v1.IExplainedPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExplainedPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExplainedPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.policytroubleshooter.v1.ExplainedPolicy; + + /** + * Decodes an ExplainedPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExplainedPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.policytroubleshooter.v1.ExplainedPolicy; + + /** + * Verifies an ExplainedPolicy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExplainedPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExplainedPolicy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.policytroubleshooter.v1.ExplainedPolicy; + + /** + * Creates a plain object from an ExplainedPolicy message. Also converts values to other types if specified. + * @param message ExplainedPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.policytroubleshooter.v1.ExplainedPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExplainedPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a BindingExplanation. */ + interface IBindingExplanation { + + /** BindingExplanation access */ + access?: (google.cloud.policytroubleshooter.v1.AccessState|keyof typeof google.cloud.policytroubleshooter.v1.AccessState|null); + + /** BindingExplanation role */ + role?: (string|null); + + /** BindingExplanation rolePermission */ + rolePermission?: (google.cloud.policytroubleshooter.v1.BindingExplanation.RolePermission|keyof typeof google.cloud.policytroubleshooter.v1.BindingExplanation.RolePermission|null); + + /** BindingExplanation rolePermissionRelevance */ + rolePermissionRelevance?: (google.cloud.policytroubleshooter.v1.HeuristicRelevance|keyof typeof google.cloud.policytroubleshooter.v1.HeuristicRelevance|null); + + /** BindingExplanation memberships */ + memberships?: ({ [k: string]: google.cloud.policytroubleshooter.v1.BindingExplanation.IAnnotatedMembership }|null); + + /** BindingExplanation relevance */ + relevance?: (google.cloud.policytroubleshooter.v1.HeuristicRelevance|keyof typeof google.cloud.policytroubleshooter.v1.HeuristicRelevance|null); + + /** BindingExplanation condition */ + condition?: (google.type.IExpr|null); + } + + /** Represents a BindingExplanation. */ + class BindingExplanation implements IBindingExplanation { + + /** + * Constructs a new BindingExplanation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.policytroubleshooter.v1.IBindingExplanation); + + /** BindingExplanation access. */ + public access: (google.cloud.policytroubleshooter.v1.AccessState|keyof typeof google.cloud.policytroubleshooter.v1.AccessState); + + /** BindingExplanation role. */ + public role: string; + + /** BindingExplanation rolePermission. */ + public rolePermission: (google.cloud.policytroubleshooter.v1.BindingExplanation.RolePermission|keyof typeof google.cloud.policytroubleshooter.v1.BindingExplanation.RolePermission); + + /** BindingExplanation rolePermissionRelevance. */ + public rolePermissionRelevance: (google.cloud.policytroubleshooter.v1.HeuristicRelevance|keyof typeof google.cloud.policytroubleshooter.v1.HeuristicRelevance); + + /** BindingExplanation memberships. */ + public memberships: { [k: string]: google.cloud.policytroubleshooter.v1.BindingExplanation.IAnnotatedMembership }; + + /** BindingExplanation relevance. */ + public relevance: (google.cloud.policytroubleshooter.v1.HeuristicRelevance|keyof typeof google.cloud.policytroubleshooter.v1.HeuristicRelevance); + + /** BindingExplanation condition. */ + public condition?: (google.type.IExpr|null); + + /** + * Creates a new BindingExplanation instance using the specified properties. + * @param [properties] Properties to set + * @returns BindingExplanation instance + */ + public static create(properties?: google.cloud.policytroubleshooter.v1.IBindingExplanation): google.cloud.policytroubleshooter.v1.BindingExplanation; + + /** + * Encodes the specified BindingExplanation message. Does not implicitly {@link google.cloud.policytroubleshooter.v1.BindingExplanation.verify|verify} messages. + * @param message BindingExplanation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.policytroubleshooter.v1.IBindingExplanation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BindingExplanation message, length delimited. Does not implicitly {@link google.cloud.policytroubleshooter.v1.BindingExplanation.verify|verify} messages. + * @param message BindingExplanation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.policytroubleshooter.v1.IBindingExplanation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BindingExplanation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BindingExplanation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.policytroubleshooter.v1.BindingExplanation; + + /** + * Decodes a BindingExplanation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BindingExplanation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.policytroubleshooter.v1.BindingExplanation; + + /** + * Verifies a BindingExplanation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BindingExplanation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BindingExplanation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.policytroubleshooter.v1.BindingExplanation; + + /** + * Creates a plain object from a BindingExplanation message. Also converts values to other types if specified. + * @param message BindingExplanation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.policytroubleshooter.v1.BindingExplanation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BindingExplanation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace BindingExplanation { + + /** Properties of an AnnotatedMembership. */ + interface IAnnotatedMembership { + + /** AnnotatedMembership membership */ + membership?: (google.cloud.policytroubleshooter.v1.BindingExplanation.Membership|keyof typeof google.cloud.policytroubleshooter.v1.BindingExplanation.Membership|null); + + /** AnnotatedMembership relevance */ + relevance?: (google.cloud.policytroubleshooter.v1.HeuristicRelevance|keyof typeof google.cloud.policytroubleshooter.v1.HeuristicRelevance|null); + } + + /** Represents an AnnotatedMembership. */ + class AnnotatedMembership implements IAnnotatedMembership { + + /** + * Constructs a new AnnotatedMembership. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.policytroubleshooter.v1.BindingExplanation.IAnnotatedMembership); + + /** AnnotatedMembership membership. */ + public membership: (google.cloud.policytroubleshooter.v1.BindingExplanation.Membership|keyof typeof google.cloud.policytroubleshooter.v1.BindingExplanation.Membership); + + /** AnnotatedMembership relevance. */ + public relevance: (google.cloud.policytroubleshooter.v1.HeuristicRelevance|keyof typeof google.cloud.policytroubleshooter.v1.HeuristicRelevance); + + /** + * Creates a new AnnotatedMembership instance using the specified properties. + * @param [properties] Properties to set + * @returns AnnotatedMembership instance + */ + public static create(properties?: google.cloud.policytroubleshooter.v1.BindingExplanation.IAnnotatedMembership): google.cloud.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership; + + /** + * Encodes the specified AnnotatedMembership message. Does not implicitly {@link google.cloud.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership.verify|verify} messages. + * @param message AnnotatedMembership message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.policytroubleshooter.v1.BindingExplanation.IAnnotatedMembership, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnnotatedMembership message, length delimited. Does not implicitly {@link google.cloud.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership.verify|verify} messages. + * @param message AnnotatedMembership message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.policytroubleshooter.v1.BindingExplanation.IAnnotatedMembership, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnnotatedMembership message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnnotatedMembership + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership; + + /** + * Decodes an AnnotatedMembership message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnnotatedMembership + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership; + + /** + * Verifies an AnnotatedMembership message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AnnotatedMembership message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnnotatedMembership + */ + public static fromObject(object: { [k: string]: any }): google.cloud.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership; + + /** + * Creates a plain object from an AnnotatedMembership message. Also converts values to other types if specified. + * @param message AnnotatedMembership + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnnotatedMembership to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** RolePermission enum. */ + enum RolePermission { + ROLE_PERMISSION_UNSPECIFIED = 0, + ROLE_PERMISSION_INCLUDED = 1, + ROLE_PERMISSION_NOT_INCLUDED = 2, + ROLE_PERMISSION_UNKNOWN_INFO_DENIED = 3 + } + + /** Membership enum. */ + enum Membership { + MEMBERSHIP_UNSPECIFIED = 0, + MEMBERSHIP_INCLUDED = 1, + MEMBERSHIP_NOT_INCLUDED = 2, + MEMBERSHIP_UNKNOWN_INFO_DENIED = 3, + MEMBERSHIP_UNKNOWN_UNSUPPORTED = 4 + } + } + + /** AccessState enum. */ + enum AccessState { + ACCESS_STATE_UNSPECIFIED = 0, + GRANTED = 1, + NOT_GRANTED = 2, + UNKNOWN_CONDITIONAL = 3, + UNKNOWN_INFO_DENIED = 4 + } + + /** HeuristicRelevance enum. */ + enum HeuristicRelevance { + HEURISTIC_RELEVANCE_UNSPECIFIED = 0, + NORMAL = 1, + HIGH = 2 + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5 + } + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + + /** + * Verifies a Http message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get: string; + + /** HttpRule put. */ + public put: string; + + /** HttpRule post. */ + public post: string; + + /** HttpRule delete. */ + public delete: string; + + /** HttpRule patch. */ + public patch: string; + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions phpGenericServices */ + phpGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions phpGenericServices. */ + public phpGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** Namespace iam. */ + namespace iam { + + /** Namespace v1. */ + namespace v1 { + + /** Properties of a Policy. */ + interface IPolicy { + + /** Policy version */ + version?: (number|null); + + /** Policy bindings */ + bindings?: (google.iam.v1.IBinding[]|null); + + /** Policy etag */ + etag?: (Uint8Array|string|null); + } + + /** Represents a Policy. */ + class Policy implements IPolicy { + + /** + * Constructs a new Policy. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IPolicy); + + /** Policy version. */ + public version: number; + + /** Policy bindings. */ + public bindings: google.iam.v1.IBinding[]; + + /** Policy etag. */ + public etag: (Uint8Array|string); + + /** + * Creates a new Policy instance using the specified properties. + * @param [properties] Properties to set + * @returns Policy instance + */ + public static create(properties?: google.iam.v1.IPolicy): google.iam.v1.Policy; + + /** + * Encodes the specified Policy message. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @param message Policy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Policy message, length delimited. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @param message Policy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Policy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.Policy; + + /** + * Decodes a Policy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.Policy; + + /** + * Verifies a Policy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Policy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Policy + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.Policy; + + /** + * Creates a plain object from a Policy message. Also converts values to other types if specified. + * @param message Policy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.Policy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Policy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Binding. */ + interface IBinding { + + /** Binding role */ + role?: (string|null); + + /** Binding members */ + members?: (string[]|null); + + /** Binding condition */ + condition?: (google.type.IExpr|null); + } + + /** Represents a Binding. */ + class Binding implements IBinding { + + /** + * Constructs a new Binding. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IBinding); + + /** Binding role. */ + public role: string; + + /** Binding members. */ + public members: string[]; + + /** Binding condition. */ + public condition?: (google.type.IExpr|null); + + /** + * Creates a new Binding instance using the specified properties. + * @param [properties] Properties to set + * @returns Binding instance + */ + public static create(properties?: google.iam.v1.IBinding): google.iam.v1.Binding; + + /** + * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @param message Binding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @param message Binding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Binding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.Binding; + + /** + * Decodes a Binding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.Binding; + + /** + * Verifies a Binding message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Binding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Binding + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.Binding; + + /** + * Creates a plain object from a Binding message. Also converts values to other types if specified. + * @param message Binding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.Binding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Binding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PolicyDelta. */ + interface IPolicyDelta { + + /** PolicyDelta bindingDeltas */ + bindingDeltas?: (google.iam.v1.IBindingDelta[]|null); + + /** PolicyDelta auditConfigDeltas */ + auditConfigDeltas?: (google.iam.v1.IAuditConfigDelta[]|null); + } + + /** Represents a PolicyDelta. */ + class PolicyDelta implements IPolicyDelta { + + /** + * Constructs a new PolicyDelta. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IPolicyDelta); + + /** PolicyDelta bindingDeltas. */ + public bindingDeltas: google.iam.v1.IBindingDelta[]; + + /** PolicyDelta auditConfigDeltas. */ + public auditConfigDeltas: google.iam.v1.IAuditConfigDelta[]; + + /** + * Creates a new PolicyDelta instance using the specified properties. + * @param [properties] Properties to set + * @returns PolicyDelta instance + */ + public static create(properties?: google.iam.v1.IPolicyDelta): google.iam.v1.PolicyDelta; + + /** + * Encodes the specified PolicyDelta message. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @param message PolicyDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IPolicyDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PolicyDelta message, length delimited. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @param message PolicyDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IPolicyDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PolicyDelta message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.PolicyDelta; + + /** + * Decodes a PolicyDelta message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.PolicyDelta; + + /** + * Verifies a PolicyDelta message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PolicyDelta message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PolicyDelta + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.PolicyDelta; + + /** + * Creates a plain object from a PolicyDelta message. Also converts values to other types if specified. + * @param message PolicyDelta + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.PolicyDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PolicyDelta to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a BindingDelta. */ + interface IBindingDelta { + + /** BindingDelta action */ + action?: (google.iam.v1.BindingDelta.Action|keyof typeof google.iam.v1.BindingDelta.Action|null); + + /** BindingDelta role */ + role?: (string|null); + + /** BindingDelta member */ + member?: (string|null); + + /** BindingDelta condition */ + condition?: (google.type.IExpr|null); + } + + /** Represents a BindingDelta. */ + class BindingDelta implements IBindingDelta { + + /** + * Constructs a new BindingDelta. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IBindingDelta); + + /** BindingDelta action. */ + public action: (google.iam.v1.BindingDelta.Action|keyof typeof google.iam.v1.BindingDelta.Action); + + /** BindingDelta role. */ + public role: string; + + /** BindingDelta member. */ + public member: string; + + /** BindingDelta condition. */ + public condition?: (google.type.IExpr|null); + + /** + * Creates a new BindingDelta instance using the specified properties. + * @param [properties] Properties to set + * @returns BindingDelta instance + */ + public static create(properties?: google.iam.v1.IBindingDelta): google.iam.v1.BindingDelta; + + /** + * Encodes the specified BindingDelta message. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @param message BindingDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IBindingDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BindingDelta message, length delimited. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @param message BindingDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IBindingDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BindingDelta message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.BindingDelta; + + /** + * Decodes a BindingDelta message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.BindingDelta; + + /** + * Verifies a BindingDelta message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BindingDelta message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BindingDelta + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.BindingDelta; + + /** + * Creates a plain object from a BindingDelta message. Also converts values to other types if specified. + * @param message BindingDelta + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.BindingDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BindingDelta to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace BindingDelta { + + /** Action enum. */ + enum Action { + ACTION_UNSPECIFIED = 0, + ADD = 1, + REMOVE = 2 + } + } + + /** Properties of an AuditConfigDelta. */ + interface IAuditConfigDelta { + + /** AuditConfigDelta action */ + action?: (google.iam.v1.AuditConfigDelta.Action|keyof typeof google.iam.v1.AuditConfigDelta.Action|null); + + /** AuditConfigDelta service */ + service?: (string|null); + + /** AuditConfigDelta exemptedMember */ + exemptedMember?: (string|null); + + /** AuditConfigDelta logType */ + logType?: (string|null); + } + + /** Represents an AuditConfigDelta. */ + class AuditConfigDelta implements IAuditConfigDelta { + + /** + * Constructs a new AuditConfigDelta. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IAuditConfigDelta); + + /** AuditConfigDelta action. */ + public action: (google.iam.v1.AuditConfigDelta.Action|keyof typeof google.iam.v1.AuditConfigDelta.Action); + + /** AuditConfigDelta service. */ + public service: string; + + /** AuditConfigDelta exemptedMember. */ + public exemptedMember: string; + + /** AuditConfigDelta logType. */ + public logType: string; + + /** + * Creates a new AuditConfigDelta instance using the specified properties. + * @param [properties] Properties to set + * @returns AuditConfigDelta instance + */ + public static create(properties?: google.iam.v1.IAuditConfigDelta): google.iam.v1.AuditConfigDelta; + + /** + * Encodes the specified AuditConfigDelta message. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @param message AuditConfigDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IAuditConfigDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuditConfigDelta message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @param message AuditConfigDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IAuditConfigDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditConfigDelta; + + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditConfigDelta; + + /** + * Verifies an AuditConfigDelta message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AuditConfigDelta message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuditConfigDelta + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditConfigDelta; + + /** + * Creates a plain object from an AuditConfigDelta message. Also converts values to other types if specified. + * @param message AuditConfigDelta + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.AuditConfigDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuditConfigDelta to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace AuditConfigDelta { + + /** Action enum. */ + enum Action { + ACTION_UNSPECIFIED = 0, + ADD = 1, + REMOVE = 2 + } + } + } + } + + /** Namespace type. */ + namespace type { + + /** Properties of an Expr. */ + interface IExpr { + + /** Expr expression */ + expression?: (string|null); + + /** Expr title */ + title?: (string|null); + + /** Expr description */ + description?: (string|null); + + /** Expr location */ + location?: (string|null); + } + + /** Represents an Expr. */ + class Expr implements IExpr { + + /** + * Constructs a new Expr. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.IExpr); + + /** Expr expression. */ + public expression: string; + + /** Expr title. */ + public title: string; + + /** Expr description. */ + public description: string; + + /** Expr location. */ + public location: string; + + /** + * Creates a new Expr instance using the specified properties. + * @param [properties] Properties to set + * @returns Expr instance + */ + public static create(properties?: google.type.IExpr): google.type.Expr; + + /** + * Encodes the specified Expr message. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * @param message Expr message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.IExpr, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Expr message, length delimited. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * @param message Expr message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.IExpr, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Expr message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Expr + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Expr; + + /** + * Decodes an Expr message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Expr + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Expr; + + /** + * Verifies an Expr message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Expr message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Expr + */ + public static fromObject(object: { [k: string]: any }): google.type.Expr; + + /** + * Creates a plain object from an Expr message. Also converts values to other types if specified. + * @param message Expr + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.Expr, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Expr to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } +} diff --git a/packages/google-cloud-policytroubleshooter/protos/protos.js b/packages/google-cloud-policytroubleshooter/protos/protos.js new file mode 100644 index 00000000000..253dbb0947e --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/protos/protos.js @@ -0,0 +1,13134 @@ +// Copyright 2020 Google LLC +// +// 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. + +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("google-gax").protobufMinimal); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots._google_cloud_policy_troubleshooter_protos || ($protobuf.roots._google_cloud_policy_troubleshooter_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.policytroubleshooter = (function() { + + /** + * Namespace policytroubleshooter. + * @memberof google.cloud + * @namespace + */ + var policytroubleshooter = {}; + + policytroubleshooter.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.cloud.policytroubleshooter + * @namespace + */ + var v1 = {}; + + v1.IamChecker = (function() { + + /** + * Constructs a new IamChecker service. + * @memberof google.cloud.policytroubleshooter.v1 + * @classdesc Represents an IamChecker + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function IamChecker(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (IamChecker.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = IamChecker; + + /** + * Creates new IamChecker service using the specified rpc implementation. + * @function create + * @memberof google.cloud.policytroubleshooter.v1.IamChecker + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {IamChecker} RPC service. Useful where requests and/or responses are streamed. + */ + IamChecker.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.policytroubleshooter.v1.IamChecker#troubleshootIamPolicy}. + * @memberof google.cloud.policytroubleshooter.v1.IamChecker + * @typedef TroubleshootIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse} [response] TroubleshootIamPolicyResponse + */ + + /** + * Calls TroubleshootIamPolicy. + * @function troubleshootIamPolicy + * @memberof google.cloud.policytroubleshooter.v1.IamChecker + * @instance + * @param {google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyRequest} request TroubleshootIamPolicyRequest message or plain object + * @param {google.cloud.policytroubleshooter.v1.IamChecker.TroubleshootIamPolicyCallback} callback Node-style callback called with the error, if any, and TroubleshootIamPolicyResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IamChecker.prototype.troubleshootIamPolicy = function troubleshootIamPolicy(request, callback) { + return this.rpcCall(troubleshootIamPolicy, $root.google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest, $root.google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse, request, callback); + }, "name", { value: "TroubleshootIamPolicy" }); + + /** + * Calls TroubleshootIamPolicy. + * @function troubleshootIamPolicy + * @memberof google.cloud.policytroubleshooter.v1.IamChecker + * @instance + * @param {google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyRequest} request TroubleshootIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return IamChecker; + })(); + + v1.TroubleshootIamPolicyRequest = (function() { + + /** + * Properties of a TroubleshootIamPolicyRequest. + * @memberof google.cloud.policytroubleshooter.v1 + * @interface ITroubleshootIamPolicyRequest + * @property {google.cloud.policytroubleshooter.v1.IAccessTuple|null} [accessTuple] TroubleshootIamPolicyRequest accessTuple + */ + + /** + * Constructs a new TroubleshootIamPolicyRequest. + * @memberof google.cloud.policytroubleshooter.v1 + * @classdesc Represents a TroubleshootIamPolicyRequest. + * @implements ITroubleshootIamPolicyRequest + * @constructor + * @param {google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyRequest=} [properties] Properties to set + */ + function TroubleshootIamPolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TroubleshootIamPolicyRequest accessTuple. + * @member {google.cloud.policytroubleshooter.v1.IAccessTuple|null|undefined} accessTuple + * @memberof google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest + * @instance + */ + TroubleshootIamPolicyRequest.prototype.accessTuple = null; + + /** + * Creates a new TroubleshootIamPolicyRequest instance using the specified properties. + * @function create + * @memberof google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest + * @static + * @param {google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyRequest=} [properties] Properties to set + * @returns {google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest} TroubleshootIamPolicyRequest instance + */ + TroubleshootIamPolicyRequest.create = function create(properties) { + return new TroubleshootIamPolicyRequest(properties); + }; + + /** + * Encodes the specified TroubleshootIamPolicyRequest message. Does not implicitly {@link google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest + * @static + * @param {google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyRequest} message TroubleshootIamPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TroubleshootIamPolicyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.accessTuple != null && Object.hasOwnProperty.call(message, "accessTuple")) + $root.google.cloud.policytroubleshooter.v1.AccessTuple.encode(message.accessTuple, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TroubleshootIamPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest + * @static + * @param {google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyRequest} message TroubleshootIamPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TroubleshootIamPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TroubleshootIamPolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest} TroubleshootIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TroubleshootIamPolicyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.accessTuple = $root.google.cloud.policytroubleshooter.v1.AccessTuple.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TroubleshootIamPolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest} TroubleshootIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TroubleshootIamPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TroubleshootIamPolicyRequest message. + * @function verify + * @memberof google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TroubleshootIamPolicyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.accessTuple != null && message.hasOwnProperty("accessTuple")) { + var error = $root.google.cloud.policytroubleshooter.v1.AccessTuple.verify(message.accessTuple); + if (error) + return "accessTuple." + error; + } + return null; + }; + + /** + * Creates a TroubleshootIamPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest} TroubleshootIamPolicyRequest + */ + TroubleshootIamPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest) + return object; + var message = new $root.google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest(); + if (object.accessTuple != null) { + if (typeof object.accessTuple !== "object") + throw TypeError(".google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest.accessTuple: object expected"); + message.accessTuple = $root.google.cloud.policytroubleshooter.v1.AccessTuple.fromObject(object.accessTuple); + } + return message; + }; + + /** + * Creates a plain object from a TroubleshootIamPolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest + * @static + * @param {google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest} message TroubleshootIamPolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TroubleshootIamPolicyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.accessTuple = null; + if (message.accessTuple != null && message.hasOwnProperty("accessTuple")) + object.accessTuple = $root.google.cloud.policytroubleshooter.v1.AccessTuple.toObject(message.accessTuple, options); + return object; + }; + + /** + * Converts this TroubleshootIamPolicyRequest to JSON. + * @function toJSON + * @memberof google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest + * @instance + * @returns {Object.} JSON object + */ + TroubleshootIamPolicyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TroubleshootIamPolicyRequest; + })(); + + v1.TroubleshootIamPolicyResponse = (function() { + + /** + * Properties of a TroubleshootIamPolicyResponse. + * @memberof google.cloud.policytroubleshooter.v1 + * @interface ITroubleshootIamPolicyResponse + * @property {google.cloud.policytroubleshooter.v1.AccessState|null} [access] TroubleshootIamPolicyResponse access + * @property {Array.|null} [explainedPolicies] TroubleshootIamPolicyResponse explainedPolicies + */ + + /** + * Constructs a new TroubleshootIamPolicyResponse. + * @memberof google.cloud.policytroubleshooter.v1 + * @classdesc Represents a TroubleshootIamPolicyResponse. + * @implements ITroubleshootIamPolicyResponse + * @constructor + * @param {google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyResponse=} [properties] Properties to set + */ + function TroubleshootIamPolicyResponse(properties) { + this.explainedPolicies = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TroubleshootIamPolicyResponse access. + * @member {google.cloud.policytroubleshooter.v1.AccessState} access + * @memberof google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse + * @instance + */ + TroubleshootIamPolicyResponse.prototype.access = 0; + + /** + * TroubleshootIamPolicyResponse explainedPolicies. + * @member {Array.} explainedPolicies + * @memberof google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse + * @instance + */ + TroubleshootIamPolicyResponse.prototype.explainedPolicies = $util.emptyArray; + + /** + * Creates a new TroubleshootIamPolicyResponse instance using the specified properties. + * @function create + * @memberof google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse + * @static + * @param {google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyResponse=} [properties] Properties to set + * @returns {google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse} TroubleshootIamPolicyResponse instance + */ + TroubleshootIamPolicyResponse.create = function create(properties) { + return new TroubleshootIamPolicyResponse(properties); + }; + + /** + * Encodes the specified TroubleshootIamPolicyResponse message. Does not implicitly {@link google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse + * @static + * @param {google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyResponse} message TroubleshootIamPolicyResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TroubleshootIamPolicyResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.access != null && Object.hasOwnProperty.call(message, "access")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.access); + if (message.explainedPolicies != null && message.explainedPolicies.length) + for (var i = 0; i < message.explainedPolicies.length; ++i) + $root.google.cloud.policytroubleshooter.v1.ExplainedPolicy.encode(message.explainedPolicies[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TroubleshootIamPolicyResponse message, length delimited. Does not implicitly {@link google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse + * @static + * @param {google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyResponse} message TroubleshootIamPolicyResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TroubleshootIamPolicyResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TroubleshootIamPolicyResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse} TroubleshootIamPolicyResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TroubleshootIamPolicyResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.access = reader.int32(); + break; + case 2: + if (!(message.explainedPolicies && message.explainedPolicies.length)) + message.explainedPolicies = []; + message.explainedPolicies.push($root.google.cloud.policytroubleshooter.v1.ExplainedPolicy.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TroubleshootIamPolicyResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse} TroubleshootIamPolicyResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TroubleshootIamPolicyResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TroubleshootIamPolicyResponse message. + * @function verify + * @memberof google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TroubleshootIamPolicyResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.access != null && message.hasOwnProperty("access")) + switch (message.access) { + default: + return "access: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.explainedPolicies != null && message.hasOwnProperty("explainedPolicies")) { + if (!Array.isArray(message.explainedPolicies)) + return "explainedPolicies: array expected"; + for (var i = 0; i < message.explainedPolicies.length; ++i) { + var error = $root.google.cloud.policytroubleshooter.v1.ExplainedPolicy.verify(message.explainedPolicies[i]); + if (error) + return "explainedPolicies." + error; + } + } + return null; + }; + + /** + * Creates a TroubleshootIamPolicyResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse} TroubleshootIamPolicyResponse + */ + TroubleshootIamPolicyResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse) + return object; + var message = new $root.google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse(); + switch (object.access) { + case "ACCESS_STATE_UNSPECIFIED": + case 0: + message.access = 0; + break; + case "GRANTED": + case 1: + message.access = 1; + break; + case "NOT_GRANTED": + case 2: + message.access = 2; + break; + case "UNKNOWN_CONDITIONAL": + case 3: + message.access = 3; + break; + case "UNKNOWN_INFO_DENIED": + case 4: + message.access = 4; + break; + } + if (object.explainedPolicies) { + if (!Array.isArray(object.explainedPolicies)) + throw TypeError(".google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse.explainedPolicies: array expected"); + message.explainedPolicies = []; + for (var i = 0; i < object.explainedPolicies.length; ++i) { + if (typeof object.explainedPolicies[i] !== "object") + throw TypeError(".google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse.explainedPolicies: object expected"); + message.explainedPolicies[i] = $root.google.cloud.policytroubleshooter.v1.ExplainedPolicy.fromObject(object.explainedPolicies[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a TroubleshootIamPolicyResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse + * @static + * @param {google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse} message TroubleshootIamPolicyResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TroubleshootIamPolicyResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.explainedPolicies = []; + if (options.defaults) + object.access = options.enums === String ? "ACCESS_STATE_UNSPECIFIED" : 0; + if (message.access != null && message.hasOwnProperty("access")) + object.access = options.enums === String ? $root.google.cloud.policytroubleshooter.v1.AccessState[message.access] : message.access; + if (message.explainedPolicies && message.explainedPolicies.length) { + object.explainedPolicies = []; + for (var j = 0; j < message.explainedPolicies.length; ++j) + object.explainedPolicies[j] = $root.google.cloud.policytroubleshooter.v1.ExplainedPolicy.toObject(message.explainedPolicies[j], options); + } + return object; + }; + + /** + * Converts this TroubleshootIamPolicyResponse to JSON. + * @function toJSON + * @memberof google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse + * @instance + * @returns {Object.} JSON object + */ + TroubleshootIamPolicyResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TroubleshootIamPolicyResponse; + })(); + + v1.AccessTuple = (function() { + + /** + * Properties of an AccessTuple. + * @memberof google.cloud.policytroubleshooter.v1 + * @interface IAccessTuple + * @property {string|null} [principal] AccessTuple principal + * @property {string|null} [fullResourceName] AccessTuple fullResourceName + * @property {string|null} [permission] AccessTuple permission + */ + + /** + * Constructs a new AccessTuple. + * @memberof google.cloud.policytroubleshooter.v1 + * @classdesc Represents an AccessTuple. + * @implements IAccessTuple + * @constructor + * @param {google.cloud.policytroubleshooter.v1.IAccessTuple=} [properties] Properties to set + */ + function AccessTuple(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AccessTuple principal. + * @member {string} principal + * @memberof google.cloud.policytroubleshooter.v1.AccessTuple + * @instance + */ + AccessTuple.prototype.principal = ""; + + /** + * AccessTuple fullResourceName. + * @member {string} fullResourceName + * @memberof google.cloud.policytroubleshooter.v1.AccessTuple + * @instance + */ + AccessTuple.prototype.fullResourceName = ""; + + /** + * AccessTuple permission. + * @member {string} permission + * @memberof google.cloud.policytroubleshooter.v1.AccessTuple + * @instance + */ + AccessTuple.prototype.permission = ""; + + /** + * Creates a new AccessTuple instance using the specified properties. + * @function create + * @memberof google.cloud.policytroubleshooter.v1.AccessTuple + * @static + * @param {google.cloud.policytroubleshooter.v1.IAccessTuple=} [properties] Properties to set + * @returns {google.cloud.policytroubleshooter.v1.AccessTuple} AccessTuple instance + */ + AccessTuple.create = function create(properties) { + return new AccessTuple(properties); + }; + + /** + * Encodes the specified AccessTuple message. Does not implicitly {@link google.cloud.policytroubleshooter.v1.AccessTuple.verify|verify} messages. + * @function encode + * @memberof google.cloud.policytroubleshooter.v1.AccessTuple + * @static + * @param {google.cloud.policytroubleshooter.v1.IAccessTuple} message AccessTuple message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessTuple.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.principal != null && Object.hasOwnProperty.call(message, "principal")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.principal); + if (message.fullResourceName != null && Object.hasOwnProperty.call(message, "fullResourceName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullResourceName); + if (message.permission != null && Object.hasOwnProperty.call(message, "permission")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.permission); + return writer; + }; + + /** + * Encodes the specified AccessTuple message, length delimited. Does not implicitly {@link google.cloud.policytroubleshooter.v1.AccessTuple.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.policytroubleshooter.v1.AccessTuple + * @static + * @param {google.cloud.policytroubleshooter.v1.IAccessTuple} message AccessTuple message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessTuple.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccessTuple message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.policytroubleshooter.v1.AccessTuple + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.policytroubleshooter.v1.AccessTuple} AccessTuple + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessTuple.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.policytroubleshooter.v1.AccessTuple(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.principal = reader.string(); + break; + case 2: + message.fullResourceName = reader.string(); + break; + case 3: + message.permission = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccessTuple message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.policytroubleshooter.v1.AccessTuple + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.policytroubleshooter.v1.AccessTuple} AccessTuple + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessTuple.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccessTuple message. + * @function verify + * @memberof google.cloud.policytroubleshooter.v1.AccessTuple + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccessTuple.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.principal != null && message.hasOwnProperty("principal")) + if (!$util.isString(message.principal)) + return "principal: string expected"; + if (message.fullResourceName != null && message.hasOwnProperty("fullResourceName")) + if (!$util.isString(message.fullResourceName)) + return "fullResourceName: string expected"; + if (message.permission != null && message.hasOwnProperty("permission")) + if (!$util.isString(message.permission)) + return "permission: string expected"; + return null; + }; + + /** + * Creates an AccessTuple message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.policytroubleshooter.v1.AccessTuple + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.policytroubleshooter.v1.AccessTuple} AccessTuple + */ + AccessTuple.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.policytroubleshooter.v1.AccessTuple) + return object; + var message = new $root.google.cloud.policytroubleshooter.v1.AccessTuple(); + if (object.principal != null) + message.principal = String(object.principal); + if (object.fullResourceName != null) + message.fullResourceName = String(object.fullResourceName); + if (object.permission != null) + message.permission = String(object.permission); + return message; + }; + + /** + * Creates a plain object from an AccessTuple message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.policytroubleshooter.v1.AccessTuple + * @static + * @param {google.cloud.policytroubleshooter.v1.AccessTuple} message AccessTuple + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccessTuple.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.principal = ""; + object.fullResourceName = ""; + object.permission = ""; + } + if (message.principal != null && message.hasOwnProperty("principal")) + object.principal = message.principal; + if (message.fullResourceName != null && message.hasOwnProperty("fullResourceName")) + object.fullResourceName = message.fullResourceName; + if (message.permission != null && message.hasOwnProperty("permission")) + object.permission = message.permission; + return object; + }; + + /** + * Converts this AccessTuple to JSON. + * @function toJSON + * @memberof google.cloud.policytroubleshooter.v1.AccessTuple + * @instance + * @returns {Object.} JSON object + */ + AccessTuple.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AccessTuple; + })(); + + v1.ExplainedPolicy = (function() { + + /** + * Properties of an ExplainedPolicy. + * @memberof google.cloud.policytroubleshooter.v1 + * @interface IExplainedPolicy + * @property {google.cloud.policytroubleshooter.v1.AccessState|null} [access] ExplainedPolicy access + * @property {string|null} [fullResourceName] ExplainedPolicy fullResourceName + * @property {google.iam.v1.IPolicy|null} [policy] ExplainedPolicy policy + * @property {Array.|null} [bindingExplanations] ExplainedPolicy bindingExplanations + * @property {google.cloud.policytroubleshooter.v1.HeuristicRelevance|null} [relevance] ExplainedPolicy relevance + */ + + /** + * Constructs a new ExplainedPolicy. + * @memberof google.cloud.policytroubleshooter.v1 + * @classdesc Represents an ExplainedPolicy. + * @implements IExplainedPolicy + * @constructor + * @param {google.cloud.policytroubleshooter.v1.IExplainedPolicy=} [properties] Properties to set + */ + function ExplainedPolicy(properties) { + this.bindingExplanations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExplainedPolicy access. + * @member {google.cloud.policytroubleshooter.v1.AccessState} access + * @memberof google.cloud.policytroubleshooter.v1.ExplainedPolicy + * @instance + */ + ExplainedPolicy.prototype.access = 0; + + /** + * ExplainedPolicy fullResourceName. + * @member {string} fullResourceName + * @memberof google.cloud.policytroubleshooter.v1.ExplainedPolicy + * @instance + */ + ExplainedPolicy.prototype.fullResourceName = ""; + + /** + * ExplainedPolicy policy. + * @member {google.iam.v1.IPolicy|null|undefined} policy + * @memberof google.cloud.policytroubleshooter.v1.ExplainedPolicy + * @instance + */ + ExplainedPolicy.prototype.policy = null; + + /** + * ExplainedPolicy bindingExplanations. + * @member {Array.} bindingExplanations + * @memberof google.cloud.policytroubleshooter.v1.ExplainedPolicy + * @instance + */ + ExplainedPolicy.prototype.bindingExplanations = $util.emptyArray; + + /** + * ExplainedPolicy relevance. + * @member {google.cloud.policytroubleshooter.v1.HeuristicRelevance} relevance + * @memberof google.cloud.policytroubleshooter.v1.ExplainedPolicy + * @instance + */ + ExplainedPolicy.prototype.relevance = 0; + + /** + * Creates a new ExplainedPolicy instance using the specified properties. + * @function create + * @memberof google.cloud.policytroubleshooter.v1.ExplainedPolicy + * @static + * @param {google.cloud.policytroubleshooter.v1.IExplainedPolicy=} [properties] Properties to set + * @returns {google.cloud.policytroubleshooter.v1.ExplainedPolicy} ExplainedPolicy instance + */ + ExplainedPolicy.create = function create(properties) { + return new ExplainedPolicy(properties); + }; + + /** + * Encodes the specified ExplainedPolicy message. Does not implicitly {@link google.cloud.policytroubleshooter.v1.ExplainedPolicy.verify|verify} messages. + * @function encode + * @memberof google.cloud.policytroubleshooter.v1.ExplainedPolicy + * @static + * @param {google.cloud.policytroubleshooter.v1.IExplainedPolicy} message ExplainedPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExplainedPolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.access != null && Object.hasOwnProperty.call(message, "access")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.access); + if (message.fullResourceName != null && Object.hasOwnProperty.call(message, "fullResourceName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullResourceName); + if (message.policy != null && Object.hasOwnProperty.call(message, "policy")) + $root.google.iam.v1.Policy.encode(message.policy, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.bindingExplanations != null && message.bindingExplanations.length) + for (var i = 0; i < message.bindingExplanations.length; ++i) + $root.google.cloud.policytroubleshooter.v1.BindingExplanation.encode(message.bindingExplanations[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.relevance != null && Object.hasOwnProperty.call(message, "relevance")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.relevance); + return writer; + }; + + /** + * Encodes the specified ExplainedPolicy message, length delimited. Does not implicitly {@link google.cloud.policytroubleshooter.v1.ExplainedPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.policytroubleshooter.v1.ExplainedPolicy + * @static + * @param {google.cloud.policytroubleshooter.v1.IExplainedPolicy} message ExplainedPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExplainedPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExplainedPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.policytroubleshooter.v1.ExplainedPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.policytroubleshooter.v1.ExplainedPolicy} ExplainedPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExplainedPolicy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.policytroubleshooter.v1.ExplainedPolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.access = reader.int32(); + break; + case 2: + message.fullResourceName = reader.string(); + break; + case 3: + message.policy = $root.google.iam.v1.Policy.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.bindingExplanations && message.bindingExplanations.length)) + message.bindingExplanations = []; + message.bindingExplanations.push($root.google.cloud.policytroubleshooter.v1.BindingExplanation.decode(reader, reader.uint32())); + break; + case 5: + message.relevance = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExplainedPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.policytroubleshooter.v1.ExplainedPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.policytroubleshooter.v1.ExplainedPolicy} ExplainedPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExplainedPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExplainedPolicy message. + * @function verify + * @memberof google.cloud.policytroubleshooter.v1.ExplainedPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExplainedPolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.access != null && message.hasOwnProperty("access")) + switch (message.access) { + default: + return "access: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.fullResourceName != null && message.hasOwnProperty("fullResourceName")) + if (!$util.isString(message.fullResourceName)) + return "fullResourceName: string expected"; + if (message.policy != null && message.hasOwnProperty("policy")) { + var error = $root.google.iam.v1.Policy.verify(message.policy); + if (error) + return "policy." + error; + } + if (message.bindingExplanations != null && message.hasOwnProperty("bindingExplanations")) { + if (!Array.isArray(message.bindingExplanations)) + return "bindingExplanations: array expected"; + for (var i = 0; i < message.bindingExplanations.length; ++i) { + var error = $root.google.cloud.policytroubleshooter.v1.BindingExplanation.verify(message.bindingExplanations[i]); + if (error) + return "bindingExplanations." + error; + } + } + if (message.relevance != null && message.hasOwnProperty("relevance")) + switch (message.relevance) { + default: + return "relevance: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an ExplainedPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.policytroubleshooter.v1.ExplainedPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.policytroubleshooter.v1.ExplainedPolicy} ExplainedPolicy + */ + ExplainedPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.policytroubleshooter.v1.ExplainedPolicy) + return object; + var message = new $root.google.cloud.policytroubleshooter.v1.ExplainedPolicy(); + switch (object.access) { + case "ACCESS_STATE_UNSPECIFIED": + case 0: + message.access = 0; + break; + case "GRANTED": + case 1: + message.access = 1; + break; + case "NOT_GRANTED": + case 2: + message.access = 2; + break; + case "UNKNOWN_CONDITIONAL": + case 3: + message.access = 3; + break; + case "UNKNOWN_INFO_DENIED": + case 4: + message.access = 4; + break; + } + if (object.fullResourceName != null) + message.fullResourceName = String(object.fullResourceName); + if (object.policy != null) { + if (typeof object.policy !== "object") + throw TypeError(".google.cloud.policytroubleshooter.v1.ExplainedPolicy.policy: object expected"); + message.policy = $root.google.iam.v1.Policy.fromObject(object.policy); + } + if (object.bindingExplanations) { + if (!Array.isArray(object.bindingExplanations)) + throw TypeError(".google.cloud.policytroubleshooter.v1.ExplainedPolicy.bindingExplanations: array expected"); + message.bindingExplanations = []; + for (var i = 0; i < object.bindingExplanations.length; ++i) { + if (typeof object.bindingExplanations[i] !== "object") + throw TypeError(".google.cloud.policytroubleshooter.v1.ExplainedPolicy.bindingExplanations: object expected"); + message.bindingExplanations[i] = $root.google.cloud.policytroubleshooter.v1.BindingExplanation.fromObject(object.bindingExplanations[i]); + } + } + switch (object.relevance) { + case "HEURISTIC_RELEVANCE_UNSPECIFIED": + case 0: + message.relevance = 0; + break; + case "NORMAL": + case 1: + message.relevance = 1; + break; + case "HIGH": + case 2: + message.relevance = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an ExplainedPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.policytroubleshooter.v1.ExplainedPolicy + * @static + * @param {google.cloud.policytroubleshooter.v1.ExplainedPolicy} message ExplainedPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExplainedPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.bindingExplanations = []; + if (options.defaults) { + object.access = options.enums === String ? "ACCESS_STATE_UNSPECIFIED" : 0; + object.fullResourceName = ""; + object.policy = null; + object.relevance = options.enums === String ? "HEURISTIC_RELEVANCE_UNSPECIFIED" : 0; + } + if (message.access != null && message.hasOwnProperty("access")) + object.access = options.enums === String ? $root.google.cloud.policytroubleshooter.v1.AccessState[message.access] : message.access; + if (message.fullResourceName != null && message.hasOwnProperty("fullResourceName")) + object.fullResourceName = message.fullResourceName; + if (message.policy != null && message.hasOwnProperty("policy")) + object.policy = $root.google.iam.v1.Policy.toObject(message.policy, options); + if (message.bindingExplanations && message.bindingExplanations.length) { + object.bindingExplanations = []; + for (var j = 0; j < message.bindingExplanations.length; ++j) + object.bindingExplanations[j] = $root.google.cloud.policytroubleshooter.v1.BindingExplanation.toObject(message.bindingExplanations[j], options); + } + if (message.relevance != null && message.hasOwnProperty("relevance")) + object.relevance = options.enums === String ? $root.google.cloud.policytroubleshooter.v1.HeuristicRelevance[message.relevance] : message.relevance; + return object; + }; + + /** + * Converts this ExplainedPolicy to JSON. + * @function toJSON + * @memberof google.cloud.policytroubleshooter.v1.ExplainedPolicy + * @instance + * @returns {Object.} JSON object + */ + ExplainedPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExplainedPolicy; + })(); + + v1.BindingExplanation = (function() { + + /** + * Properties of a BindingExplanation. + * @memberof google.cloud.policytroubleshooter.v1 + * @interface IBindingExplanation + * @property {google.cloud.policytroubleshooter.v1.AccessState|null} [access] BindingExplanation access + * @property {string|null} [role] BindingExplanation role + * @property {google.cloud.policytroubleshooter.v1.BindingExplanation.RolePermission|null} [rolePermission] BindingExplanation rolePermission + * @property {google.cloud.policytroubleshooter.v1.HeuristicRelevance|null} [rolePermissionRelevance] BindingExplanation rolePermissionRelevance + * @property {Object.|null} [memberships] BindingExplanation memberships + * @property {google.cloud.policytroubleshooter.v1.HeuristicRelevance|null} [relevance] BindingExplanation relevance + * @property {google.type.IExpr|null} [condition] BindingExplanation condition + */ + + /** + * Constructs a new BindingExplanation. + * @memberof google.cloud.policytroubleshooter.v1 + * @classdesc Represents a BindingExplanation. + * @implements IBindingExplanation + * @constructor + * @param {google.cloud.policytroubleshooter.v1.IBindingExplanation=} [properties] Properties to set + */ + function BindingExplanation(properties) { + this.memberships = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BindingExplanation access. + * @member {google.cloud.policytroubleshooter.v1.AccessState} access + * @memberof google.cloud.policytroubleshooter.v1.BindingExplanation + * @instance + */ + BindingExplanation.prototype.access = 0; + + /** + * BindingExplanation role. + * @member {string} role + * @memberof google.cloud.policytroubleshooter.v1.BindingExplanation + * @instance + */ + BindingExplanation.prototype.role = ""; + + /** + * BindingExplanation rolePermission. + * @member {google.cloud.policytroubleshooter.v1.BindingExplanation.RolePermission} rolePermission + * @memberof google.cloud.policytroubleshooter.v1.BindingExplanation + * @instance + */ + BindingExplanation.prototype.rolePermission = 0; + + /** + * BindingExplanation rolePermissionRelevance. + * @member {google.cloud.policytroubleshooter.v1.HeuristicRelevance} rolePermissionRelevance + * @memberof google.cloud.policytroubleshooter.v1.BindingExplanation + * @instance + */ + BindingExplanation.prototype.rolePermissionRelevance = 0; + + /** + * BindingExplanation memberships. + * @member {Object.} memberships + * @memberof google.cloud.policytroubleshooter.v1.BindingExplanation + * @instance + */ + BindingExplanation.prototype.memberships = $util.emptyObject; + + /** + * BindingExplanation relevance. + * @member {google.cloud.policytroubleshooter.v1.HeuristicRelevance} relevance + * @memberof google.cloud.policytroubleshooter.v1.BindingExplanation + * @instance + */ + BindingExplanation.prototype.relevance = 0; + + /** + * BindingExplanation condition. + * @member {google.type.IExpr|null|undefined} condition + * @memberof google.cloud.policytroubleshooter.v1.BindingExplanation + * @instance + */ + BindingExplanation.prototype.condition = null; + + /** + * Creates a new BindingExplanation instance using the specified properties. + * @function create + * @memberof google.cloud.policytroubleshooter.v1.BindingExplanation + * @static + * @param {google.cloud.policytroubleshooter.v1.IBindingExplanation=} [properties] Properties to set + * @returns {google.cloud.policytroubleshooter.v1.BindingExplanation} BindingExplanation instance + */ + BindingExplanation.create = function create(properties) { + return new BindingExplanation(properties); + }; + + /** + * Encodes the specified BindingExplanation message. Does not implicitly {@link google.cloud.policytroubleshooter.v1.BindingExplanation.verify|verify} messages. + * @function encode + * @memberof google.cloud.policytroubleshooter.v1.BindingExplanation + * @static + * @param {google.cloud.policytroubleshooter.v1.IBindingExplanation} message BindingExplanation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BindingExplanation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.access != null && Object.hasOwnProperty.call(message, "access")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.access); + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.role); + if (message.rolePermission != null && Object.hasOwnProperty.call(message, "rolePermission")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.rolePermission); + if (message.rolePermissionRelevance != null && Object.hasOwnProperty.call(message, "rolePermissionRelevance")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.rolePermissionRelevance); + if (message.memberships != null && Object.hasOwnProperty.call(message, "memberships")) + for (var keys = Object.keys(message.memberships), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership.encode(message.memberships[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.relevance != null && Object.hasOwnProperty.call(message, "relevance")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.relevance); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BindingExplanation message, length delimited. Does not implicitly {@link google.cloud.policytroubleshooter.v1.BindingExplanation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.policytroubleshooter.v1.BindingExplanation + * @static + * @param {google.cloud.policytroubleshooter.v1.IBindingExplanation} message BindingExplanation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BindingExplanation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BindingExplanation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.policytroubleshooter.v1.BindingExplanation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.policytroubleshooter.v1.BindingExplanation} BindingExplanation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BindingExplanation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.policytroubleshooter.v1.BindingExplanation(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.access = reader.int32(); + break; + case 2: + message.role = reader.string(); + break; + case 3: + message.rolePermission = reader.int32(); + break; + case 4: + message.rolePermissionRelevance = reader.int32(); + break; + case 5: + if (message.memberships === $util.emptyObject) + message.memberships = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.memberships[key] = value; + break; + case 6: + message.relevance = reader.int32(); + break; + case 7: + message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BindingExplanation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.policytroubleshooter.v1.BindingExplanation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.policytroubleshooter.v1.BindingExplanation} BindingExplanation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BindingExplanation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BindingExplanation message. + * @function verify + * @memberof google.cloud.policytroubleshooter.v1.BindingExplanation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BindingExplanation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.access != null && message.hasOwnProperty("access")) + switch (message.access) { + default: + return "access: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.role != null && message.hasOwnProperty("role")) + if (!$util.isString(message.role)) + return "role: string expected"; + if (message.rolePermission != null && message.hasOwnProperty("rolePermission")) + switch (message.rolePermission) { + default: + return "rolePermission: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.rolePermissionRelevance != null && message.hasOwnProperty("rolePermissionRelevance")) + switch (message.rolePermissionRelevance) { + default: + return "rolePermissionRelevance: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.memberships != null && message.hasOwnProperty("memberships")) { + if (!$util.isObject(message.memberships)) + return "memberships: object expected"; + var key = Object.keys(message.memberships); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership.verify(message.memberships[key[i]]); + if (error) + return "memberships." + error; + } + } + if (message.relevance != null && message.hasOwnProperty("relevance")) + switch (message.relevance) { + default: + return "relevance: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.condition != null && message.hasOwnProperty("condition")) { + var error = $root.google.type.Expr.verify(message.condition); + if (error) + return "condition." + error; + } + return null; + }; + + /** + * Creates a BindingExplanation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.policytroubleshooter.v1.BindingExplanation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.policytroubleshooter.v1.BindingExplanation} BindingExplanation + */ + BindingExplanation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.policytroubleshooter.v1.BindingExplanation) + return object; + var message = new $root.google.cloud.policytroubleshooter.v1.BindingExplanation(); + switch (object.access) { + case "ACCESS_STATE_UNSPECIFIED": + case 0: + message.access = 0; + break; + case "GRANTED": + case 1: + message.access = 1; + break; + case "NOT_GRANTED": + case 2: + message.access = 2; + break; + case "UNKNOWN_CONDITIONAL": + case 3: + message.access = 3; + break; + case "UNKNOWN_INFO_DENIED": + case 4: + message.access = 4; + break; + } + if (object.role != null) + message.role = String(object.role); + switch (object.rolePermission) { + case "ROLE_PERMISSION_UNSPECIFIED": + case 0: + message.rolePermission = 0; + break; + case "ROLE_PERMISSION_INCLUDED": + case 1: + message.rolePermission = 1; + break; + case "ROLE_PERMISSION_NOT_INCLUDED": + case 2: + message.rolePermission = 2; + break; + case "ROLE_PERMISSION_UNKNOWN_INFO_DENIED": + case 3: + message.rolePermission = 3; + break; + } + switch (object.rolePermissionRelevance) { + case "HEURISTIC_RELEVANCE_UNSPECIFIED": + case 0: + message.rolePermissionRelevance = 0; + break; + case "NORMAL": + case 1: + message.rolePermissionRelevance = 1; + break; + case "HIGH": + case 2: + message.rolePermissionRelevance = 2; + break; + } + if (object.memberships) { + if (typeof object.memberships !== "object") + throw TypeError(".google.cloud.policytroubleshooter.v1.BindingExplanation.memberships: object expected"); + message.memberships = {}; + for (var keys = Object.keys(object.memberships), i = 0; i < keys.length; ++i) { + if (typeof object.memberships[keys[i]] !== "object") + throw TypeError(".google.cloud.policytroubleshooter.v1.BindingExplanation.memberships: object expected"); + message.memberships[keys[i]] = $root.google.cloud.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership.fromObject(object.memberships[keys[i]]); + } + } + switch (object.relevance) { + case "HEURISTIC_RELEVANCE_UNSPECIFIED": + case 0: + message.relevance = 0; + break; + case "NORMAL": + case 1: + message.relevance = 1; + break; + case "HIGH": + case 2: + message.relevance = 2; + break; + } + if (object.condition != null) { + if (typeof object.condition !== "object") + throw TypeError(".google.cloud.policytroubleshooter.v1.BindingExplanation.condition: object expected"); + message.condition = $root.google.type.Expr.fromObject(object.condition); + } + return message; + }; + + /** + * Creates a plain object from a BindingExplanation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.policytroubleshooter.v1.BindingExplanation + * @static + * @param {google.cloud.policytroubleshooter.v1.BindingExplanation} message BindingExplanation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BindingExplanation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.memberships = {}; + if (options.defaults) { + object.access = options.enums === String ? "ACCESS_STATE_UNSPECIFIED" : 0; + object.role = ""; + object.rolePermission = options.enums === String ? "ROLE_PERMISSION_UNSPECIFIED" : 0; + object.rolePermissionRelevance = options.enums === String ? "HEURISTIC_RELEVANCE_UNSPECIFIED" : 0; + object.relevance = options.enums === String ? "HEURISTIC_RELEVANCE_UNSPECIFIED" : 0; + object.condition = null; + } + if (message.access != null && message.hasOwnProperty("access")) + object.access = options.enums === String ? $root.google.cloud.policytroubleshooter.v1.AccessState[message.access] : message.access; + if (message.role != null && message.hasOwnProperty("role")) + object.role = message.role; + if (message.rolePermission != null && message.hasOwnProperty("rolePermission")) + object.rolePermission = options.enums === String ? $root.google.cloud.policytroubleshooter.v1.BindingExplanation.RolePermission[message.rolePermission] : message.rolePermission; + if (message.rolePermissionRelevance != null && message.hasOwnProperty("rolePermissionRelevance")) + object.rolePermissionRelevance = options.enums === String ? $root.google.cloud.policytroubleshooter.v1.HeuristicRelevance[message.rolePermissionRelevance] : message.rolePermissionRelevance; + var keys2; + if (message.memberships && (keys2 = Object.keys(message.memberships)).length) { + object.memberships = {}; + for (var j = 0; j < keys2.length; ++j) + object.memberships[keys2[j]] = $root.google.cloud.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership.toObject(message.memberships[keys2[j]], options); + } + if (message.relevance != null && message.hasOwnProperty("relevance")) + object.relevance = options.enums === String ? $root.google.cloud.policytroubleshooter.v1.HeuristicRelevance[message.relevance] : message.relevance; + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = $root.google.type.Expr.toObject(message.condition, options); + return object; + }; + + /** + * Converts this BindingExplanation to JSON. + * @function toJSON + * @memberof google.cloud.policytroubleshooter.v1.BindingExplanation + * @instance + * @returns {Object.} JSON object + */ + BindingExplanation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + BindingExplanation.AnnotatedMembership = (function() { + + /** + * Properties of an AnnotatedMembership. + * @memberof google.cloud.policytroubleshooter.v1.BindingExplanation + * @interface IAnnotatedMembership + * @property {google.cloud.policytroubleshooter.v1.BindingExplanation.Membership|null} [membership] AnnotatedMembership membership + * @property {google.cloud.policytroubleshooter.v1.HeuristicRelevance|null} [relevance] AnnotatedMembership relevance + */ + + /** + * Constructs a new AnnotatedMembership. + * @memberof google.cloud.policytroubleshooter.v1.BindingExplanation + * @classdesc Represents an AnnotatedMembership. + * @implements IAnnotatedMembership + * @constructor + * @param {google.cloud.policytroubleshooter.v1.BindingExplanation.IAnnotatedMembership=} [properties] Properties to set + */ + function AnnotatedMembership(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnnotatedMembership membership. + * @member {google.cloud.policytroubleshooter.v1.BindingExplanation.Membership} membership + * @memberof google.cloud.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership + * @instance + */ + AnnotatedMembership.prototype.membership = 0; + + /** + * AnnotatedMembership relevance. + * @member {google.cloud.policytroubleshooter.v1.HeuristicRelevance} relevance + * @memberof google.cloud.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership + * @instance + */ + AnnotatedMembership.prototype.relevance = 0; + + /** + * Creates a new AnnotatedMembership instance using the specified properties. + * @function create + * @memberof google.cloud.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership + * @static + * @param {google.cloud.policytroubleshooter.v1.BindingExplanation.IAnnotatedMembership=} [properties] Properties to set + * @returns {google.cloud.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership} AnnotatedMembership instance + */ + AnnotatedMembership.create = function create(properties) { + return new AnnotatedMembership(properties); + }; + + /** + * Encodes the specified AnnotatedMembership message. Does not implicitly {@link google.cloud.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership.verify|verify} messages. + * @function encode + * @memberof google.cloud.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership + * @static + * @param {google.cloud.policytroubleshooter.v1.BindingExplanation.IAnnotatedMembership} message AnnotatedMembership message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnnotatedMembership.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.membership != null && Object.hasOwnProperty.call(message, "membership")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.membership); + if (message.relevance != null && Object.hasOwnProperty.call(message, "relevance")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.relevance); + return writer; + }; + + /** + * Encodes the specified AnnotatedMembership message, length delimited. Does not implicitly {@link google.cloud.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership + * @static + * @param {google.cloud.policytroubleshooter.v1.BindingExplanation.IAnnotatedMembership} message AnnotatedMembership message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnnotatedMembership.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnnotatedMembership message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership} AnnotatedMembership + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnnotatedMembership.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.membership = reader.int32(); + break; + case 2: + message.relevance = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnnotatedMembership message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership} AnnotatedMembership + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnnotatedMembership.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnnotatedMembership message. + * @function verify + * @memberof google.cloud.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnnotatedMembership.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.membership != null && message.hasOwnProperty("membership")) + switch (message.membership) { + default: + return "membership: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.relevance != null && message.hasOwnProperty("relevance")) + switch (message.relevance) { + default: + return "relevance: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an AnnotatedMembership message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership} AnnotatedMembership + */ + AnnotatedMembership.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership) + return object; + var message = new $root.google.cloud.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership(); + switch (object.membership) { + case "MEMBERSHIP_UNSPECIFIED": + case 0: + message.membership = 0; + break; + case "MEMBERSHIP_INCLUDED": + case 1: + message.membership = 1; + break; + case "MEMBERSHIP_NOT_INCLUDED": + case 2: + message.membership = 2; + break; + case "MEMBERSHIP_UNKNOWN_INFO_DENIED": + case 3: + message.membership = 3; + break; + case "MEMBERSHIP_UNKNOWN_UNSUPPORTED": + case 4: + message.membership = 4; + break; + } + switch (object.relevance) { + case "HEURISTIC_RELEVANCE_UNSPECIFIED": + case 0: + message.relevance = 0; + break; + case "NORMAL": + case 1: + message.relevance = 1; + break; + case "HIGH": + case 2: + message.relevance = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an AnnotatedMembership message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership + * @static + * @param {google.cloud.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership} message AnnotatedMembership + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnnotatedMembership.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.membership = options.enums === String ? "MEMBERSHIP_UNSPECIFIED" : 0; + object.relevance = options.enums === String ? "HEURISTIC_RELEVANCE_UNSPECIFIED" : 0; + } + if (message.membership != null && message.hasOwnProperty("membership")) + object.membership = options.enums === String ? $root.google.cloud.policytroubleshooter.v1.BindingExplanation.Membership[message.membership] : message.membership; + if (message.relevance != null && message.hasOwnProperty("relevance")) + object.relevance = options.enums === String ? $root.google.cloud.policytroubleshooter.v1.HeuristicRelevance[message.relevance] : message.relevance; + return object; + }; + + /** + * Converts this AnnotatedMembership to JSON. + * @function toJSON + * @memberof google.cloud.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership + * @instance + * @returns {Object.} JSON object + */ + AnnotatedMembership.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AnnotatedMembership; + })(); + + /** + * RolePermission enum. + * @name google.cloud.policytroubleshooter.v1.BindingExplanation.RolePermission + * @enum {number} + * @property {number} ROLE_PERMISSION_UNSPECIFIED=0 ROLE_PERMISSION_UNSPECIFIED value + * @property {number} ROLE_PERMISSION_INCLUDED=1 ROLE_PERMISSION_INCLUDED value + * @property {number} ROLE_PERMISSION_NOT_INCLUDED=2 ROLE_PERMISSION_NOT_INCLUDED value + * @property {number} ROLE_PERMISSION_UNKNOWN_INFO_DENIED=3 ROLE_PERMISSION_UNKNOWN_INFO_DENIED value + */ + BindingExplanation.RolePermission = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ROLE_PERMISSION_UNSPECIFIED"] = 0; + values[valuesById[1] = "ROLE_PERMISSION_INCLUDED"] = 1; + values[valuesById[2] = "ROLE_PERMISSION_NOT_INCLUDED"] = 2; + values[valuesById[3] = "ROLE_PERMISSION_UNKNOWN_INFO_DENIED"] = 3; + return values; + })(); + + /** + * Membership enum. + * @name google.cloud.policytroubleshooter.v1.BindingExplanation.Membership + * @enum {number} + * @property {number} MEMBERSHIP_UNSPECIFIED=0 MEMBERSHIP_UNSPECIFIED value + * @property {number} MEMBERSHIP_INCLUDED=1 MEMBERSHIP_INCLUDED value + * @property {number} MEMBERSHIP_NOT_INCLUDED=2 MEMBERSHIP_NOT_INCLUDED value + * @property {number} MEMBERSHIP_UNKNOWN_INFO_DENIED=3 MEMBERSHIP_UNKNOWN_INFO_DENIED value + * @property {number} MEMBERSHIP_UNKNOWN_UNSUPPORTED=4 MEMBERSHIP_UNKNOWN_UNSUPPORTED value + */ + BindingExplanation.Membership = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MEMBERSHIP_UNSPECIFIED"] = 0; + values[valuesById[1] = "MEMBERSHIP_INCLUDED"] = 1; + values[valuesById[2] = "MEMBERSHIP_NOT_INCLUDED"] = 2; + values[valuesById[3] = "MEMBERSHIP_UNKNOWN_INFO_DENIED"] = 3; + values[valuesById[4] = "MEMBERSHIP_UNKNOWN_UNSUPPORTED"] = 4; + return values; + })(); + + return BindingExplanation; + })(); + + /** + * AccessState enum. + * @name google.cloud.policytroubleshooter.v1.AccessState + * @enum {number} + * @property {number} ACCESS_STATE_UNSPECIFIED=0 ACCESS_STATE_UNSPECIFIED value + * @property {number} GRANTED=1 GRANTED value + * @property {number} NOT_GRANTED=2 NOT_GRANTED value + * @property {number} UNKNOWN_CONDITIONAL=3 UNKNOWN_CONDITIONAL value + * @property {number} UNKNOWN_INFO_DENIED=4 UNKNOWN_INFO_DENIED value + */ + v1.AccessState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACCESS_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "GRANTED"] = 1; + values[valuesById[2] = "NOT_GRANTED"] = 2; + values[valuesById[3] = "UNKNOWN_CONDITIONAL"] = 3; + values[valuesById[4] = "UNKNOWN_INFO_DENIED"] = 4; + return values; + })(); + + /** + * HeuristicRelevance enum. + * @name google.cloud.policytroubleshooter.v1.HeuristicRelevance + * @enum {number} + * @property {number} HEURISTIC_RELEVANCE_UNSPECIFIED=0 HEURISTIC_RELEVANCE_UNSPECIFIED value + * @property {number} NORMAL=1 NORMAL value + * @property {number} HIGH=2 HIGH value + */ + v1.HeuristicRelevance = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HEURISTIC_RELEVANCE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NORMAL"] = 1; + values[valuesById[2] = "HIGH"] = 2; + return values; + })(); + + return v1; + })(); + + return policytroubleshooter; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + return values; + })(); + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + case 2: + message.fullyDecodeReservedExpansion = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = ""; + + /** + * HttpRule put. + * @member {string} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = ""; + + /** + * HttpRule post. + * @member {string} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = ""; + + /** + * HttpRule delete. + * @member {string} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = ""; + + /** + * HttpRule patch. + * @member {string} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = ""; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.selector = reader.string(); + break; + case 2: + message.get = reader.string(); + break; + case 3: + message.put = reader.string(); + break; + case 4: + message.post = reader.string(); + break; + case 5: + message["delete"] = reader.string(); + break; + case 6: + message.patch = reader.string(); + break; + case 8: + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + case 7: + message.body = reader.string(); + break; + case 12: + message.responseBody = reader.string(); + break; + case 11: + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.kind = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CustomHttpPattern; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FileDescriptorSet; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message["package"] = reader.string(); + break; + case 3: + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + case 10: + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + case 11: + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + case 4: + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + case 7: + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 8: + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + case 9: + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + case 12: + message.syntax = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + case 8: + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + case 7: + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + case 9: + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + case 10: + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + case 3: + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 3: + message.number = reader.int32(); + break; + case 4: + message.label = reader.int32(); + break; + case 5: + message.type = reader.int32(); + break; + case 6: + message.typeName = reader.string(); + break; + case 2: + message.extendee = reader.string(); + break; + case 7: + message.defaultValue = reader.string(); + break; + case 9: + message.oneofIndex = reader.int32(); + break; + case 10: + message.jsonName = reader.string(); + break; + case 8: + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + case 17: + message.proto3Optional = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + } + switch (object.type) { + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.number = reader.int32(); + break; + case 3: + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.inputType = reader.string(); + break; + case 3: + message.outputType = reader.string(); + break; + case 4: + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + case 5: + message.clientStreaming = reader.bool(); + break; + case 6: + message.serverStreaming = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions phpGenericServices. + * @member {boolean} phpGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices")) + writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.javaPackage = reader.string(); + break; + case 8: + message.javaOuterClassname = reader.string(); + break; + case 10: + message.javaMultipleFiles = reader.bool(); + break; + case 20: + message.javaGenerateEqualsAndHash = reader.bool(); + break; + case 27: + message.javaStringCheckUtf8 = reader.bool(); + break; + case 9: + message.optimizeFor = reader.int32(); + break; + case 11: + message.goPackage = reader.string(); + break; + case 16: + message.ccGenericServices = reader.bool(); + break; + case 17: + message.javaGenericServices = reader.bool(); + break; + case 18: + message.pyGenericServices = reader.bool(); + break; + case 42: + message.phpGenericServices = reader.bool(); + break; + case 23: + message.deprecated = reader.bool(); + break; + case 31: + message.ccEnableArenas = reader.bool(); + break; + case 36: + message.objcClassPrefix = reader.string(); + break; + case 37: + message.csharpNamespace = reader.string(); + break; + case 39: + message.swiftPrefix = reader.string(); + break; + case 40: + message.phpClassPrefix = reader.string(); + break; + case 41: + message.phpNamespace = reader.string(); + break; + case 44: + message.phpMetadataNamespace = reader.string(); + break; + case 45: + message.rubyPackage = reader.string(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + if (typeof message.phpGenericServices !== "boolean") + return "phpGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.phpGenericServices != null) + message.phpGenericServices = Boolean(object.phpGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpGenericServices = false; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + object.phpGenericServices = message.phpGenericServices; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.messageSetWireFormat = reader.bool(); + break; + case 2: + message.noStandardDescriptorAccessor = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 7: + message.mapEntry = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) { + writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.int32(message[".google.api.fieldBehavior"][i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.ctype = reader.int32(); + break; + case 2: + message.packed = reader.bool(); + break; + case 6: + message.jstype = reader.int32(); + break; + case 5: + message.lazy = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 10: + message.weak = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1052: + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.allowAlias = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.deprecated = false; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1049: + message[".google.api.defaultHost"] = reader.string(); + break; + case 1050: + message[".google.api.oauthScopes"] = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 34: + message.idempotencyLevel = reader.int32(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 72295728: + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + case 1051: + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + case 3: + message.identifierValue = reader.string(); + break; + case 4: + message.positiveIntValue = reader.uint64(); + break; + case 5: + message.negativeIntValue = reader.int64(); + break; + case 6: + message.doubleValue = reader.double(); + break; + case 7: + message.stringValue = reader.bytes(); + break; + case 8: + message.aggregateValue = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.namePart = reader.string(); + break; + case 2: + message.isExtension = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + case 2: + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + case 3: + message.leadingComments = reader.string(); + break; + case 4: + message.trailingComments = reader.string(); + break; + case 6: + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + case 2: + message.sourceFile = reader.string(); + break; + case 3: + message.begin = reader.int32(); + break; + case 4: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + return protobuf; + })(); + + google.iam = (function() { + + /** + * Namespace iam. + * @memberof google + * @namespace + */ + var iam = {}; + + iam.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.iam + * @namespace + */ + var v1 = {}; + + v1.Policy = (function() { + + /** + * Properties of a Policy. + * @memberof google.iam.v1 + * @interface IPolicy + * @property {number|null} [version] Policy version + * @property {Array.|null} [bindings] Policy bindings + * @property {Uint8Array|null} [etag] Policy etag + */ + + /** + * Constructs a new Policy. + * @memberof google.iam.v1 + * @classdesc Represents a Policy. + * @implements IPolicy + * @constructor + * @param {google.iam.v1.IPolicy=} [properties] Properties to set + */ + function Policy(properties) { + this.bindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Policy version. + * @member {number} version + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.version = 0; + + /** + * Policy bindings. + * @member {Array.} bindings + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.bindings = $util.emptyArray; + + /** + * Policy etag. + * @member {Uint8Array} etag + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.etag = $util.newBuffer([]); + + /** + * Creates a new Policy instance using the specified properties. + * @function create + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.IPolicy=} [properties] Properties to set + * @returns {google.iam.v1.Policy} Policy instance + */ + Policy.create = function create(properties) { + return new Policy(properties); + }; + + /** + * Encodes the specified Policy message. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.IPolicy} message Policy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Policy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.version); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.etag); + if (message.bindings != null && message.bindings.length) + for (var i = 0; i < message.bindings.length; ++i) + $root.google.iam.v1.Binding.encode(message.bindings[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Policy message, length delimited. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.IPolicy} message Policy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Policy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Policy message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.Policy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.Policy} Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Policy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Policy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.version = reader.int32(); + break; + case 4: + if (!(message.bindings && message.bindings.length)) + message.bindings = []; + message.bindings.push($root.google.iam.v1.Binding.decode(reader, reader.uint32())); + break; + case 3: + message.etag = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Policy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.Policy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.Policy} Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Policy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Policy message. + * @function verify + * @memberof google.iam.v1.Policy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Policy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version)) + return "version: integer expected"; + if (message.bindings != null && message.hasOwnProperty("bindings")) { + if (!Array.isArray(message.bindings)) + return "bindings: array expected"; + for (var i = 0; i < message.bindings.length; ++i) { + var error = $root.google.iam.v1.Binding.verify(message.bindings[i]); + if (error) + return "bindings." + error; + } + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!(message.etag && typeof message.etag.length === "number" || $util.isString(message.etag))) + return "etag: buffer expected"; + return null; + }; + + /** + * Creates a Policy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.Policy + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.Policy} Policy + */ + Policy.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.Policy) + return object; + var message = new $root.google.iam.v1.Policy(); + if (object.version != null) + message.version = object.version | 0; + if (object.bindings) { + if (!Array.isArray(object.bindings)) + throw TypeError(".google.iam.v1.Policy.bindings: array expected"); + message.bindings = []; + for (var i = 0; i < object.bindings.length; ++i) { + if (typeof object.bindings[i] !== "object") + throw TypeError(".google.iam.v1.Policy.bindings: object expected"); + message.bindings[i] = $root.google.iam.v1.Binding.fromObject(object.bindings[i]); + } + } + if (object.etag != null) + if (typeof object.etag === "string") + $util.base64.decode(object.etag, message.etag = $util.newBuffer($util.base64.length(object.etag)), 0); + else if (object.etag.length) + message.etag = object.etag; + return message; + }; + + /** + * Creates a plain object from a Policy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.Policy} message Policy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Policy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.bindings = []; + if (options.defaults) { + object.version = 0; + if (options.bytes === String) + object.etag = ""; + else { + object.etag = []; + if (options.bytes !== Array) + object.etag = $util.newBuffer(object.etag); + } + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = options.bytes === String ? $util.base64.encode(message.etag, 0, message.etag.length) : options.bytes === Array ? Array.prototype.slice.call(message.etag) : message.etag; + if (message.bindings && message.bindings.length) { + object.bindings = []; + for (var j = 0; j < message.bindings.length; ++j) + object.bindings[j] = $root.google.iam.v1.Binding.toObject(message.bindings[j], options); + } + return object; + }; + + /** + * Converts this Policy to JSON. + * @function toJSON + * @memberof google.iam.v1.Policy + * @instance + * @returns {Object.} JSON object + */ + Policy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Policy; + })(); + + v1.Binding = (function() { + + /** + * Properties of a Binding. + * @memberof google.iam.v1 + * @interface IBinding + * @property {string|null} [role] Binding role + * @property {Array.|null} [members] Binding members + * @property {google.type.IExpr|null} [condition] Binding condition + */ + + /** + * Constructs a new Binding. + * @memberof google.iam.v1 + * @classdesc Represents a Binding. + * @implements IBinding + * @constructor + * @param {google.iam.v1.IBinding=} [properties] Properties to set + */ + function Binding(properties) { + this.members = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Binding role. + * @member {string} role + * @memberof google.iam.v1.Binding + * @instance + */ + Binding.prototype.role = ""; + + /** + * Binding members. + * @member {Array.} members + * @memberof google.iam.v1.Binding + * @instance + */ + Binding.prototype.members = $util.emptyArray; + + /** + * Binding condition. + * @member {google.type.IExpr|null|undefined} condition + * @memberof google.iam.v1.Binding + * @instance + */ + Binding.prototype.condition = null; + + /** + * Creates a new Binding instance using the specified properties. + * @function create + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.IBinding=} [properties] Properties to set + * @returns {google.iam.v1.Binding} Binding instance + */ + Binding.create = function create(properties) { + return new Binding(properties); + }; + + /** + * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.IBinding} message Binding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Binding.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.role); + if (message.members != null && message.members.length) + for (var i = 0; i < message.members.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.members[i]); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.IBinding} message Binding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Binding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Binding message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.Binding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.Binding} Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Binding.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Binding(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.role = reader.string(); + break; + case 2: + if (!(message.members && message.members.length)) + message.members = []; + message.members.push(reader.string()); + break; + case 3: + message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Binding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.Binding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.Binding} Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Binding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Binding message. + * @function verify + * @memberof google.iam.v1.Binding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Binding.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.role != null && message.hasOwnProperty("role")) + if (!$util.isString(message.role)) + return "role: string expected"; + if (message.members != null && message.hasOwnProperty("members")) { + if (!Array.isArray(message.members)) + return "members: array expected"; + for (var i = 0; i < message.members.length; ++i) + if (!$util.isString(message.members[i])) + return "members: string[] expected"; + } + if (message.condition != null && message.hasOwnProperty("condition")) { + var error = $root.google.type.Expr.verify(message.condition); + if (error) + return "condition." + error; + } + return null; + }; + + /** + * Creates a Binding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.Binding + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.Binding} Binding + */ + Binding.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.Binding) + return object; + var message = new $root.google.iam.v1.Binding(); + if (object.role != null) + message.role = String(object.role); + if (object.members) { + if (!Array.isArray(object.members)) + throw TypeError(".google.iam.v1.Binding.members: array expected"); + message.members = []; + for (var i = 0; i < object.members.length; ++i) + message.members[i] = String(object.members[i]); + } + if (object.condition != null) { + if (typeof object.condition !== "object") + throw TypeError(".google.iam.v1.Binding.condition: object expected"); + message.condition = $root.google.type.Expr.fromObject(object.condition); + } + return message; + }; + + /** + * Creates a plain object from a Binding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.Binding} message Binding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Binding.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.members = []; + if (options.defaults) { + object.role = ""; + object.condition = null; + } + if (message.role != null && message.hasOwnProperty("role")) + object.role = message.role; + if (message.members && message.members.length) { + object.members = []; + for (var j = 0; j < message.members.length; ++j) + object.members[j] = message.members[j]; + } + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = $root.google.type.Expr.toObject(message.condition, options); + return object; + }; + + /** + * Converts this Binding to JSON. + * @function toJSON + * @memberof google.iam.v1.Binding + * @instance + * @returns {Object.} JSON object + */ + Binding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Binding; + })(); + + v1.PolicyDelta = (function() { + + /** + * Properties of a PolicyDelta. + * @memberof google.iam.v1 + * @interface IPolicyDelta + * @property {Array.|null} [bindingDeltas] PolicyDelta bindingDeltas + * @property {Array.|null} [auditConfigDeltas] PolicyDelta auditConfigDeltas + */ + + /** + * Constructs a new PolicyDelta. + * @memberof google.iam.v1 + * @classdesc Represents a PolicyDelta. + * @implements IPolicyDelta + * @constructor + * @param {google.iam.v1.IPolicyDelta=} [properties] Properties to set + */ + function PolicyDelta(properties) { + this.bindingDeltas = []; + this.auditConfigDeltas = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PolicyDelta bindingDeltas. + * @member {Array.} bindingDeltas + * @memberof google.iam.v1.PolicyDelta + * @instance + */ + PolicyDelta.prototype.bindingDeltas = $util.emptyArray; + + /** + * PolicyDelta auditConfigDeltas. + * @member {Array.} auditConfigDeltas + * @memberof google.iam.v1.PolicyDelta + * @instance + */ + PolicyDelta.prototype.auditConfigDeltas = $util.emptyArray; + + /** + * Creates a new PolicyDelta instance using the specified properties. + * @function create + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.IPolicyDelta=} [properties] Properties to set + * @returns {google.iam.v1.PolicyDelta} PolicyDelta instance + */ + PolicyDelta.create = function create(properties) { + return new PolicyDelta(properties); + }; + + /** + * Encodes the specified PolicyDelta message. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.IPolicyDelta} message PolicyDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PolicyDelta.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bindingDeltas != null && message.bindingDeltas.length) + for (var i = 0; i < message.bindingDeltas.length; ++i) + $root.google.iam.v1.BindingDelta.encode(message.bindingDeltas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.auditConfigDeltas != null && message.auditConfigDeltas.length) + for (var i = 0; i < message.auditConfigDeltas.length; ++i) + $root.google.iam.v1.AuditConfigDelta.encode(message.auditConfigDeltas[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PolicyDelta message, length delimited. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.IPolicyDelta} message PolicyDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PolicyDelta.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PolicyDelta message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.PolicyDelta} PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PolicyDelta.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.PolicyDelta(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.bindingDeltas && message.bindingDeltas.length)) + message.bindingDeltas = []; + message.bindingDeltas.push($root.google.iam.v1.BindingDelta.decode(reader, reader.uint32())); + break; + case 2: + if (!(message.auditConfigDeltas && message.auditConfigDeltas.length)) + message.auditConfigDeltas = []; + message.auditConfigDeltas.push($root.google.iam.v1.AuditConfigDelta.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PolicyDelta message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.PolicyDelta} PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PolicyDelta.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PolicyDelta message. + * @function verify + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PolicyDelta.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bindingDeltas != null && message.hasOwnProperty("bindingDeltas")) { + if (!Array.isArray(message.bindingDeltas)) + return "bindingDeltas: array expected"; + for (var i = 0; i < message.bindingDeltas.length; ++i) { + var error = $root.google.iam.v1.BindingDelta.verify(message.bindingDeltas[i]); + if (error) + return "bindingDeltas." + error; + } + } + if (message.auditConfigDeltas != null && message.hasOwnProperty("auditConfigDeltas")) { + if (!Array.isArray(message.auditConfigDeltas)) + return "auditConfigDeltas: array expected"; + for (var i = 0; i < message.auditConfigDeltas.length; ++i) { + var error = $root.google.iam.v1.AuditConfigDelta.verify(message.auditConfigDeltas[i]); + if (error) + return "auditConfigDeltas." + error; + } + } + return null; + }; + + /** + * Creates a PolicyDelta message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.PolicyDelta} PolicyDelta + */ + PolicyDelta.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.PolicyDelta) + return object; + var message = new $root.google.iam.v1.PolicyDelta(); + if (object.bindingDeltas) { + if (!Array.isArray(object.bindingDeltas)) + throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: array expected"); + message.bindingDeltas = []; + for (var i = 0; i < object.bindingDeltas.length; ++i) { + if (typeof object.bindingDeltas[i] !== "object") + throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: object expected"); + message.bindingDeltas[i] = $root.google.iam.v1.BindingDelta.fromObject(object.bindingDeltas[i]); + } + } + if (object.auditConfigDeltas) { + if (!Array.isArray(object.auditConfigDeltas)) + throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: array expected"); + message.auditConfigDeltas = []; + for (var i = 0; i < object.auditConfigDeltas.length; ++i) { + if (typeof object.auditConfigDeltas[i] !== "object") + throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: object expected"); + message.auditConfigDeltas[i] = $root.google.iam.v1.AuditConfigDelta.fromObject(object.auditConfigDeltas[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a PolicyDelta message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.PolicyDelta} message PolicyDelta + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PolicyDelta.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.bindingDeltas = []; + object.auditConfigDeltas = []; + } + if (message.bindingDeltas && message.bindingDeltas.length) { + object.bindingDeltas = []; + for (var j = 0; j < message.bindingDeltas.length; ++j) + object.bindingDeltas[j] = $root.google.iam.v1.BindingDelta.toObject(message.bindingDeltas[j], options); + } + if (message.auditConfigDeltas && message.auditConfigDeltas.length) { + object.auditConfigDeltas = []; + for (var j = 0; j < message.auditConfigDeltas.length; ++j) + object.auditConfigDeltas[j] = $root.google.iam.v1.AuditConfigDelta.toObject(message.auditConfigDeltas[j], options); + } + return object; + }; + + /** + * Converts this PolicyDelta to JSON. + * @function toJSON + * @memberof google.iam.v1.PolicyDelta + * @instance + * @returns {Object.} JSON object + */ + PolicyDelta.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PolicyDelta; + })(); + + v1.BindingDelta = (function() { + + /** + * Properties of a BindingDelta. + * @memberof google.iam.v1 + * @interface IBindingDelta + * @property {google.iam.v1.BindingDelta.Action|null} [action] BindingDelta action + * @property {string|null} [role] BindingDelta role + * @property {string|null} [member] BindingDelta member + * @property {google.type.IExpr|null} [condition] BindingDelta condition + */ + + /** + * Constructs a new BindingDelta. + * @memberof google.iam.v1 + * @classdesc Represents a BindingDelta. + * @implements IBindingDelta + * @constructor + * @param {google.iam.v1.IBindingDelta=} [properties] Properties to set + */ + function BindingDelta(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BindingDelta action. + * @member {google.iam.v1.BindingDelta.Action} action + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.action = 0; + + /** + * BindingDelta role. + * @member {string} role + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.role = ""; + + /** + * BindingDelta member. + * @member {string} member + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.member = ""; + + /** + * BindingDelta condition. + * @member {google.type.IExpr|null|undefined} condition + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.condition = null; + + /** + * Creates a new BindingDelta instance using the specified properties. + * @function create + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.IBindingDelta=} [properties] Properties to set + * @returns {google.iam.v1.BindingDelta} BindingDelta instance + */ + BindingDelta.create = function create(properties) { + return new BindingDelta(properties); + }; + + /** + * Encodes the specified BindingDelta message. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.IBindingDelta} message BindingDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BindingDelta.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.role); + if (message.member != null && Object.hasOwnProperty.call(message, "member")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.member); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BindingDelta message, length delimited. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.IBindingDelta} message BindingDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BindingDelta.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BindingDelta message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.BindingDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.BindingDelta} BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BindingDelta.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.BindingDelta(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.action = reader.int32(); + break; + case 2: + message.role = reader.string(); + break; + case 3: + message.member = reader.string(); + break; + case 4: + message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BindingDelta message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.BindingDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.BindingDelta} BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BindingDelta.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BindingDelta message. + * @function verify + * @memberof google.iam.v1.BindingDelta + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BindingDelta.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.action != null && message.hasOwnProperty("action")) + switch (message.action) { + default: + return "action: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.role != null && message.hasOwnProperty("role")) + if (!$util.isString(message.role)) + return "role: string expected"; + if (message.member != null && message.hasOwnProperty("member")) + if (!$util.isString(message.member)) + return "member: string expected"; + if (message.condition != null && message.hasOwnProperty("condition")) { + var error = $root.google.type.Expr.verify(message.condition); + if (error) + return "condition." + error; + } + return null; + }; + + /** + * Creates a BindingDelta message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.BindingDelta + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.BindingDelta} BindingDelta + */ + BindingDelta.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.BindingDelta) + return object; + var message = new $root.google.iam.v1.BindingDelta(); + switch (object.action) { + case "ACTION_UNSPECIFIED": + case 0: + message.action = 0; + break; + case "ADD": + case 1: + message.action = 1; + break; + case "REMOVE": + case 2: + message.action = 2; + break; + } + if (object.role != null) + message.role = String(object.role); + if (object.member != null) + message.member = String(object.member); + if (object.condition != null) { + if (typeof object.condition !== "object") + throw TypeError(".google.iam.v1.BindingDelta.condition: object expected"); + message.condition = $root.google.type.Expr.fromObject(object.condition); + } + return message; + }; + + /** + * Creates a plain object from a BindingDelta message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.BindingDelta} message BindingDelta + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BindingDelta.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; + object.role = ""; + object.member = ""; + object.condition = null; + } + if (message.action != null && message.hasOwnProperty("action")) + object.action = options.enums === String ? $root.google.iam.v1.BindingDelta.Action[message.action] : message.action; + if (message.role != null && message.hasOwnProperty("role")) + object.role = message.role; + if (message.member != null && message.hasOwnProperty("member")) + object.member = message.member; + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = $root.google.type.Expr.toObject(message.condition, options); + return object; + }; + + /** + * Converts this BindingDelta to JSON. + * @function toJSON + * @memberof google.iam.v1.BindingDelta + * @instance + * @returns {Object.} JSON object + */ + BindingDelta.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Action enum. + * @name google.iam.v1.BindingDelta.Action + * @enum {number} + * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value + * @property {number} ADD=1 ADD value + * @property {number} REMOVE=2 REMOVE value + */ + BindingDelta.Action = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADD"] = 1; + values[valuesById[2] = "REMOVE"] = 2; + return values; + })(); + + return BindingDelta; + })(); + + v1.AuditConfigDelta = (function() { + + /** + * Properties of an AuditConfigDelta. + * @memberof google.iam.v1 + * @interface IAuditConfigDelta + * @property {google.iam.v1.AuditConfigDelta.Action|null} [action] AuditConfigDelta action + * @property {string|null} [service] AuditConfigDelta service + * @property {string|null} [exemptedMember] AuditConfigDelta exemptedMember + * @property {string|null} [logType] AuditConfigDelta logType + */ + + /** + * Constructs a new AuditConfigDelta. + * @memberof google.iam.v1 + * @classdesc Represents an AuditConfigDelta. + * @implements IAuditConfigDelta + * @constructor + * @param {google.iam.v1.IAuditConfigDelta=} [properties] Properties to set + */ + function AuditConfigDelta(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuditConfigDelta action. + * @member {google.iam.v1.AuditConfigDelta.Action} action + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.action = 0; + + /** + * AuditConfigDelta service. + * @member {string} service + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.service = ""; + + /** + * AuditConfigDelta exemptedMember. + * @member {string} exemptedMember + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.exemptedMember = ""; + + /** + * AuditConfigDelta logType. + * @member {string} logType + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.logType = ""; + + /** + * Creates a new AuditConfigDelta instance using the specified properties. + * @function create + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.IAuditConfigDelta=} [properties] Properties to set + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta instance + */ + AuditConfigDelta.create = function create(properties) { + return new AuditConfigDelta(properties); + }; + + /** + * Encodes the specified AuditConfigDelta message. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.IAuditConfigDelta} message AuditConfigDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfigDelta.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.service); + if (message.exemptedMember != null && Object.hasOwnProperty.call(message, "exemptedMember")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.exemptedMember); + if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.logType); + return writer; + }; + + /** + * Encodes the specified AuditConfigDelta message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.IAuditConfigDelta} message AuditConfigDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfigDelta.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfigDelta.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfigDelta(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.action = reader.int32(); + break; + case 2: + message.service = reader.string(); + break; + case 3: + message.exemptedMember = reader.string(); + break; + case 4: + message.logType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfigDelta.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuditConfigDelta message. + * @function verify + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuditConfigDelta.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.action != null && message.hasOwnProperty("action")) + switch (message.action) { + default: + return "action: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) + if (!$util.isString(message.exemptedMember)) + return "exemptedMember: string expected"; + if (message.logType != null && message.hasOwnProperty("logType")) + if (!$util.isString(message.logType)) + return "logType: string expected"; + return null; + }; + + /** + * Creates an AuditConfigDelta message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta + */ + AuditConfigDelta.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.AuditConfigDelta) + return object; + var message = new $root.google.iam.v1.AuditConfigDelta(); + switch (object.action) { + case "ACTION_UNSPECIFIED": + case 0: + message.action = 0; + break; + case "ADD": + case 1: + message.action = 1; + break; + case "REMOVE": + case 2: + message.action = 2; + break; + } + if (object.service != null) + message.service = String(object.service); + if (object.exemptedMember != null) + message.exemptedMember = String(object.exemptedMember); + if (object.logType != null) + message.logType = String(object.logType); + return message; + }; + + /** + * Creates a plain object from an AuditConfigDelta message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.AuditConfigDelta} message AuditConfigDelta + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuditConfigDelta.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; + object.service = ""; + object.exemptedMember = ""; + object.logType = ""; + } + if (message.action != null && message.hasOwnProperty("action")) + object.action = options.enums === String ? $root.google.iam.v1.AuditConfigDelta.Action[message.action] : message.action; + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) + object.exemptedMember = message.exemptedMember; + if (message.logType != null && message.hasOwnProperty("logType")) + object.logType = message.logType; + return object; + }; + + /** + * Converts this AuditConfigDelta to JSON. + * @function toJSON + * @memberof google.iam.v1.AuditConfigDelta + * @instance + * @returns {Object.} JSON object + */ + AuditConfigDelta.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Action enum. + * @name google.iam.v1.AuditConfigDelta.Action + * @enum {number} + * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value + * @property {number} ADD=1 ADD value + * @property {number} REMOVE=2 REMOVE value + */ + AuditConfigDelta.Action = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADD"] = 1; + values[valuesById[2] = "REMOVE"] = 2; + return values; + })(); + + return AuditConfigDelta; + })(); + + return v1; + })(); + + return iam; + })(); + + google.type = (function() { + + /** + * Namespace type. + * @memberof google + * @namespace + */ + var type = {}; + + type.Expr = (function() { + + /** + * Properties of an Expr. + * @memberof google.type + * @interface IExpr + * @property {string|null} [expression] Expr expression + * @property {string|null} [title] Expr title + * @property {string|null} [description] Expr description + * @property {string|null} [location] Expr location + */ + + /** + * Constructs a new Expr. + * @memberof google.type + * @classdesc Represents an Expr. + * @implements IExpr + * @constructor + * @param {google.type.IExpr=} [properties] Properties to set + */ + function Expr(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Expr expression. + * @member {string} expression + * @memberof google.type.Expr + * @instance + */ + Expr.prototype.expression = ""; + + /** + * Expr title. + * @member {string} title + * @memberof google.type.Expr + * @instance + */ + Expr.prototype.title = ""; + + /** + * Expr description. + * @member {string} description + * @memberof google.type.Expr + * @instance + */ + Expr.prototype.description = ""; + + /** + * Expr location. + * @member {string} location + * @memberof google.type.Expr + * @instance + */ + Expr.prototype.location = ""; + + /** + * Creates a new Expr instance using the specified properties. + * @function create + * @memberof google.type.Expr + * @static + * @param {google.type.IExpr=} [properties] Properties to set + * @returns {google.type.Expr} Expr instance + */ + Expr.create = function create(properties) { + return new Expr(properties); + }; + + /** + * Encodes the specified Expr message. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * @function encode + * @memberof google.type.Expr + * @static + * @param {google.type.IExpr} message Expr message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Expr.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.expression != null && Object.hasOwnProperty.call(message, "expression")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.expression); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.location); + return writer; + }; + + /** + * Encodes the specified Expr message, length delimited. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * @function encodeDelimited + * @memberof google.type.Expr + * @static + * @param {google.type.IExpr} message Expr message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Expr.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Expr message from the specified reader or buffer. + * @function decode + * @memberof google.type.Expr + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.type.Expr} Expr + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Expr.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Expr(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.expression = reader.string(); + break; + case 2: + message.title = reader.string(); + break; + case 3: + message.description = reader.string(); + break; + case 4: + message.location = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Expr message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.type.Expr + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.type.Expr} Expr + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Expr.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Expr message. + * @function verify + * @memberof google.type.Expr + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Expr.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.expression != null && message.hasOwnProperty("expression")) + if (!$util.isString(message.expression)) + return "expression: string expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + return null; + }; + + /** + * Creates an Expr message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.type.Expr + * @static + * @param {Object.} object Plain object + * @returns {google.type.Expr} Expr + */ + Expr.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.Expr) + return object; + var message = new $root.google.type.Expr(); + if (object.expression != null) + message.expression = String(object.expression); + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + if (object.location != null) + message.location = String(object.location); + return message; + }; + + /** + * Creates a plain object from an Expr message. Also converts values to other types if specified. + * @function toObject + * @memberof google.type.Expr + * @static + * @param {google.type.Expr} message Expr + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Expr.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.expression = ""; + object.title = ""; + object.description = ""; + object.location = ""; + } + if (message.expression != null && message.hasOwnProperty("expression")) + object.expression = message.expression; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + return object; + }; + + /** + * Converts this Expr to JSON. + * @function toJSON + * @memberof google.type.Expr + * @instance + * @returns {Object.} JSON object + */ + Expr.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Expr; + })(); + + return type; + })(); + + return google; + })(); + + return $root; +}); diff --git a/packages/google-cloud-policytroubleshooter/protos/protos.json b/packages/google-cloud-policytroubleshooter/protos/protos.json new file mode 100644 index 00000000000..49507e1d1c6 --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/protos/protos.json @@ -0,0 +1,1390 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "policytroubleshooter": { + "nested": { + "v1": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.Cloud.PolicyTroubleshooter.V1", + "go_package": "google.golang.org/genproto/googleapis/cloud/policytroubleshooter/v1;policytroubleshooter", + "java_multiple_files": true, + "java_outer_classname": "IAMCheckerProto", + "java_package": "com.google.cloud.policytroubleshooter.v1", + "php_namespace": "Google\\Cloud\\PolicyTroubleshooter\\V1", + "ruby_package": "Google::Cloud::PolicyTroubleshooter::V1" + }, + "nested": { + "IamChecker": { + "options": { + "(google.api.default_host)": "policytroubleshooter.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "TroubleshootIamPolicy": { + "requestType": "TroubleshootIamPolicyRequest", + "responseType": "TroubleshootIamPolicyResponse", + "options": { + "(google.api.http).post": "/v1/iam:troubleshoot", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/iam:troubleshoot", + "body": "*" + } + } + ] + } + } + }, + "TroubleshootIamPolicyRequest": { + "fields": { + "accessTuple": { + "type": "AccessTuple", + "id": 1 + } + } + }, + "TroubleshootIamPolicyResponse": { + "fields": { + "access": { + "type": "AccessState", + "id": 1 + }, + "explainedPolicies": { + "rule": "repeated", + "type": "ExplainedPolicy", + "id": 2 + } + } + }, + "AccessTuple": { + "fields": { + "principal": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "fullResourceName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "permission": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ExplainedPolicy": { + "fields": { + "access": { + "type": "AccessState", + "id": 1 + }, + "fullResourceName": { + "type": "string", + "id": 2 + }, + "policy": { + "type": "google.iam.v1.Policy", + "id": 3 + }, + "bindingExplanations": { + "rule": "repeated", + "type": "BindingExplanation", + "id": 4 + }, + "relevance": { + "type": "HeuristicRelevance", + "id": 5 + } + } + }, + "BindingExplanation": { + "fields": { + "access": { + "type": "AccessState", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "role": { + "type": "string", + "id": 2 + }, + "rolePermission": { + "type": "RolePermission", + "id": 3 + }, + "rolePermissionRelevance": { + "type": "HeuristicRelevance", + "id": 4 + }, + "memberships": { + "keyType": "string", + "type": "AnnotatedMembership", + "id": 5 + }, + "relevance": { + "type": "HeuristicRelevance", + "id": 6 + }, + "condition": { + "type": "google.type.Expr", + "id": 7 + } + }, + "nested": { + "AnnotatedMembership": { + "fields": { + "membership": { + "type": "Membership", + "id": 1 + }, + "relevance": { + "type": "HeuristicRelevance", + "id": 2 + } + } + }, + "RolePermission": { + "values": { + "ROLE_PERMISSION_UNSPECIFIED": 0, + "ROLE_PERMISSION_INCLUDED": 1, + "ROLE_PERMISSION_NOT_INCLUDED": 2, + "ROLE_PERMISSION_UNKNOWN_INFO_DENIED": 3 + } + }, + "Membership": { + "values": { + "MEMBERSHIP_UNSPECIFIED": 0, + "MEMBERSHIP_INCLUDED": 1, + "MEMBERSHIP_NOT_INCLUDED": 2, + "MEMBERSHIP_UNKNOWN_INFO_DENIED": 3, + "MEMBERSHIP_UNKNOWN_UNSUPPORTED": 4 + } + } + } + }, + "AccessState": { + "values": { + "ACCESS_STATE_UNSPECIFIED": 0, + "GRANTED": 1, + "NOT_GRANTED": 2, + "UNKNOWN_CONDITIONAL": 3, + "UNKNOWN_INFO_DENIED": 4 + } + }, + "HeuristicRelevance": { + "values": { + "HEURISTIC_RELEVANCE_UNSPECIFIED": 0, + "NORMAL": 1, + "HIGH": 2 + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "ClientProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5 + } + }, + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + } + } + }, + "protobuf": { + "options": { + "go_package": "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "FileDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + } + } + }, + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "FieldDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REQUIRED": 2, + "LABEL_REPEATED": 3 + } + } + } + }, + "OneofDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "phpGenericServices": { + "type": "bool", + "id": 42, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + } + } + }, + "OneofOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + } + } + } + } + } + } + }, + "iam": { + "nested": { + "v1": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.Cloud.Iam.V1", + "go_package": "google.golang.org/genproto/googleapis/iam/v1;iam", + "java_multiple_files": true, + "java_outer_classname": "PolicyProto", + "java_package": "com.google.iam.v1", + "php_namespace": "Google\\Cloud\\Iam\\V1" + }, + "nested": { + "Policy": { + "fields": { + "version": { + "type": "int32", + "id": 1 + }, + "bindings": { + "rule": "repeated", + "type": "Binding", + "id": 4 + }, + "etag": { + "type": "bytes", + "id": 3 + } + } + }, + "Binding": { + "fields": { + "role": { + "type": "string", + "id": 1 + }, + "members": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "condition": { + "type": "google.type.Expr", + "id": 3 + } + } + }, + "PolicyDelta": { + "fields": { + "bindingDeltas": { + "rule": "repeated", + "type": "BindingDelta", + "id": 1 + }, + "auditConfigDeltas": { + "rule": "repeated", + "type": "AuditConfigDelta", + "id": 2 + } + } + }, + "BindingDelta": { + "fields": { + "action": { + "type": "Action", + "id": 1 + }, + "role": { + "type": "string", + "id": 2 + }, + "member": { + "type": "string", + "id": 3 + }, + "condition": { + "type": "google.type.Expr", + "id": 4 + } + }, + "nested": { + "Action": { + "values": { + "ACTION_UNSPECIFIED": 0, + "ADD": 1, + "REMOVE": 2 + } + } + } + }, + "AuditConfigDelta": { + "fields": { + "action": { + "type": "Action", + "id": 1 + }, + "service": { + "type": "string", + "id": 2 + }, + "exemptedMember": { + "type": "string", + "id": 3 + }, + "logType": { + "type": "string", + "id": 4 + } + }, + "nested": { + "Action": { + "values": { + "ACTION_UNSPECIFIED": 0, + "ADD": 1, + "REMOVE": 2 + } + } + } + } + } + } + } + }, + "type": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/type/expr;expr", + "java_multiple_files": true, + "java_outer_classname": "ExprProto", + "java_package": "com.google.type", + "objc_class_prefix": "GTP" + }, + "nested": { + "Expr": { + "fields": { + "expression": { + "type": "string", + "id": 1 + }, + "title": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "location": { + "type": "string", + "id": 4 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/google-cloud-policytroubleshooter/samples/README.md b/packages/google-cloud-policytroubleshooter/samples/README.md new file mode 100644 index 00000000000..2e1b0adef34 --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/samples/README.md @@ -0,0 +1,50 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [IAM Policy Troubleshooter API: Node.js Samples](https://github.com/googleapis/nodejs-policy-troubleshooter) + +[![Open in Cloud Shell][shell_img]][shell_link] + + + +## Table of Contents + +* [Before you begin](#before-you-begin) +* [Samples](#samples) + * [Quickstart](#quickstart) + +## Before you begin + +Before running the samples, make sure you've followed the steps outlined in +[Using the client library](https://github.com/googleapis/nodejs-policy-troubleshooter#using-the-client-library). + +`cd samples` + +`npm install` + +`cd ..` + +## Samples + + + +### Quickstart + +View the [source code](https://github.com/googleapis/nodejs-policy-troubleshooter/blob/master/samples/quickstart.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-policy-troubleshooter&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node samples/quickstart.js` + + + + + + +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-policy-troubleshooter&page=editor&open_in_editor=samples/README.md +[product-docs]: https://cloud.google.com/iam/docs/troubleshooting-access#rest-api/ diff --git a/packages/google-cloud-policytroubleshooter/samples/package.json b/packages/google-cloud-policytroubleshooter/samples/package.json new file mode 100644 index 00000000000..29643291eec --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/samples/package.json @@ -0,0 +1,23 @@ +{ + "name": "nodejs-policy-troubleshooter", + "private": true, + "license": "Apache-2.0", + "author": "Google LLC", + "engines": { + "node": ">=10" + }, + "files": [ + "*.js" + ], + "scripts": { + "test": "c8 mocha --timeout 600000 test/*.js" + }, + "dependencies": { + "@google-cloud/policy-troubleshooter": "^0.1.0" + }, + "devDependencies": { + "c8": "^7.1.0", + "chai": "^4.2.0", + "mocha": "^8.0.0" + } +} diff --git a/packages/google-cloud-policytroubleshooter/samples/quickstart.js b/packages/google-cloud-policytroubleshooter/samples/quickstart.js new file mode 100644 index 00000000000..f7491517c64 --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/samples/quickstart.js @@ -0,0 +1,51 @@ +// 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 +// +// https://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. +// + +'use strict'; + +async function main() { + // [START nodejs_policy_troubleshooter_quickstart] + // Imports the Google Cloud client library + + // remove this line after package is released + // eslint-disable-next-line node/no-missing-require + const {IamCheckerClient} = require('@google-cloud/policy-troubleshooter'); + + // TODO(developer): replace with your prefered project ID. + // const projectId = 'my-project' + + // Creates a client + // eslint-disable-next-line no-unused-vars + const client = new {IamCheckerClient}(); + + //TODO(library generator): write the actual function you will be testing + async function doSomething() { + console.log( + 'Developer! Change this code so that it shows how to use the library! See comments below on structure.' + ); + // const [thing] = await client.methodName({ + // }); + // console.info(thing); + } + doSomething(); + // [END nodejs_policy_troubleshooter_quickstart] +} + +main(...process.argv.slice(2)).catch(err => { + console.error(err.message); + process.exitCode = 1; +}); +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); diff --git a/packages/google-cloud-policytroubleshooter/samples/test/quickstart.js b/packages/google-cloud-policytroubleshooter/samples/test/quickstart.js new file mode 100644 index 00000000000..17ddd18c584 --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/samples/test/quickstart.js @@ -0,0 +1,50 @@ +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +const path = require('path'); +const cp = require('child_process'); +const {before, describe, it} = require('mocha'); +// eslint-disable-next-line node/no-missing-require +const {IamCheckerClient} = require('@google-cloud/policy-troubleshooter'); +// eslint-disable-next-line no-unused-vars, node/no-missing-require +const {assert} = require('chai'); + +const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); + +const cwd = path.join(__dirname, '..'); + +const client = new {IamCheckerClient}(); + +describe('Quickstart', () => { + //TODO: remove this if not using the projectId + // eslint-disable-next-line no-unused-vars + let projectId; + + before(async () => { + // eslint-disable-next-line no-unused-vars + projectId = await client.getProjectId(); + }); + + it('should run quickstart', async () => { + //TODO: remove this disability + // eslint-disable-next-line no-unused-vars + const stdout = execSync('node ./quickstart.js', {cwd}); + //assert(stdout, stdout !== null); + }); +}); diff --git a/packages/google-cloud-policytroubleshooter/src/index.ts b/packages/google-cloud-policytroubleshooter/src/index.ts new file mode 100644 index 00000000000..da90a392672 --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/src/index.ts @@ -0,0 +1,27 @@ +// Copyright 2020 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by synthtool. ** +// ** https://github.com/googleapis/synthtool ** +// ** All changes to this file may be overwritten. ** + +import * as v1 from './v1'; + +const IamCheckerClient = v1.IamCheckerClient; +type IamCheckerClient = v1.IamCheckerClient; + +export {v1, IamCheckerClient}; +export default {v1, IamCheckerClient}; +import * as protos from '../protos/protos'; +export {protos}; diff --git a/packages/google-cloud-policytroubleshooter/src/v1/gapic_metadata.json b/packages/google-cloud-policytroubleshooter/src/v1/gapic_metadata.json new file mode 100644 index 00000000000..daff31dc6c1 --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/src/v1/gapic_metadata.json @@ -0,0 +1,33 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.policytroubleshooter.v1", + "libraryPackage": "@google-cloud/policy-troubleshooter", + "services": { + "IamChecker": { + "clients": { + "grpc": { + "libraryClient": "IamCheckerClient", + "rpcs": { + "TroubleshootIamPolicy": { + "methods": [ + "troubleshootIamPolicy" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "IamCheckerClient", + "rpcs": { + "TroubleshootIamPolicy": { + "methods": [ + "troubleshootIamPolicy" + ] + } + } + } + } + } + } +} diff --git a/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts b/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts new file mode 100644 index 00000000000..036aaf0bb17 --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts @@ -0,0 +1,393 @@ +// Copyright 2020 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import * as gax from 'google-gax'; +import {Callback, CallOptions, Descriptors, ClientOptions} from 'google-gax'; +import * as path from 'path'; + +import * as protos from '../../protos/protos'; +/** + * Client JSON configuration object, loaded from + * `src/v1/iam_checker_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './iam_checker_client_config.json'; + +const version = require('../../../package.json').version; + +/** + * IAM Policy Troubleshooter service. + * + * This service helps you troubleshoot access issues for Google Cloud resources. + * @class + * @memberof v1 + */ +export class IamCheckerClient { + private _terminated = false; + private _opts: ClientOptions; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + innerApiCalls: {[name: string]: Function}; + iamCheckerStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of IamCheckerClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. + * In fallback mode, a special browser-compatible transport implementation is used + * instead of gRPC transport. In browser context (if the `window` object is defined) + * the fallback mode is enabled automatically; set `options.fallback` to `false` + * if you need to override this behavior. + */ + constructor(opts?: ClientOptions) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof IamCheckerClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gax.fallback : gax; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + // For Node.js, pass the path to JSON proto file. + // For browsers, pass the JSON content. + + const nodejsProtoPath = path.join( + __dirname, + '..', + '..', + 'protos', + 'protos.json' + ); + this._protos = this._gaxGrpc.loadProto( + opts.fallback + ? // eslint-disable-next-line @typescript-eslint/no-var-requires + require('../../protos/protos.json') + : nodejsProtoPath + ); + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.policytroubleshooter.v1.IamChecker', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.iamCheckerStub) { + return this.iamCheckerStub; + } + + // Put together the "service stub" for + // google.cloud.policytroubleshooter.v1.IamChecker. + this.iamCheckerStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.policytroubleshooter.v1.IamChecker' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.policytroubleshooter.v1.IamChecker, + this._opts + ) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const iamCheckerStubMethods = ['troubleshootIamPolicy']; + for (const methodName of iamCheckerStubMethods) { + const callPromise = this.iamCheckerStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const descriptor = undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.iamCheckerStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'policytroubleshooter.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'policytroubleshooter.googleapis.com'; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return ['https://www.googleapis.com/auth/cloud-platform']; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + troubleshootIamPolicy( + request: protos.google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyResponse, + ( + | protos.google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyRequest + | undefined + ), + {} | undefined + ] + >; + troubleshootIamPolicy( + request: protos.google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyResponse, + | protos.google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyRequest + | null + | undefined, + {} | null | undefined + > + ): void; + troubleshootIamPolicy( + request: protos.google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyRequest, + callback: Callback< + protos.google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyResponse, + | protos.google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Checks whether a member has a specific permission for a specific resource, + * and explains why the member does or does not have that permission. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.policytroubleshooter.v1.AccessTuple} request.accessTuple + * The information to use for checking whether a member has a permission for a + * resource. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [TroubleshootIamPolicyResponse]{@link google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.troubleshootIamPolicy(request); + */ + troubleshootIamPolicy( + request: protos.google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyResponse, + | protos.google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyResponse, + | protos.google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyResponse, + ( + | protos.google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + this.initialize(); + return this.innerApiCalls.troubleshootIamPolicy(request, options, callback); + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + this.initialize(); + if (!this._terminated) { + return this.iamCheckerStub!.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client_config.json b/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client_config.json new file mode 100644 index 00000000000..6d70cf67ac3 --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client_config.json @@ -0,0 +1,31 @@ +{ + "interfaces": { + "google.cloud.policytroubleshooter.v1.IamChecker": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "TroubleshootIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_proto_list.json b/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_proto_list.json new file mode 100644 index 00000000000..3da19f410cc --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_proto_list.json @@ -0,0 +1,4 @@ +[ + "../../protos/google/cloud/policytroubleshooter/v1/checker.proto", + "../../protos/google/cloud/policytroubleshooter/v1/explanations.proto" +] diff --git a/packages/google-cloud-policytroubleshooter/src/v1/index.ts b/packages/google-cloud-policytroubleshooter/src/v1/index.ts new file mode 100644 index 00000000000..c6a97b8131f --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/src/v1/index.ts @@ -0,0 +1,19 @@ +// Copyright 2020 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +export {IamCheckerClient} from './iam_checker_client'; diff --git a/packages/google-cloud-policytroubleshooter/synth.metadata b/packages/google-cloud-policytroubleshooter/synth.metadata new file mode 100644 index 00000000000..5479d501fc0 --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/synth.metadata @@ -0,0 +1,37 @@ +{ + "sources": [ + { + "git": { + "name": ".", + "remote": "sso://user/sofialeon/nodejs-policy-troubleshooter", + "sha": "8e8c2e15ffed9278832df68ace50441167f9d723" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "49e64a5a8eb24ab49a81049f3bb31df869515715", + "internalRef": "347844600" + } + }, + { + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "d73e8dea90af1b463a7f9d4a33244cf4612ada7c" + } + } + ], + "destinations": [ + { + "client": { + "source": "googleapis", + "apiName": "policytroubleshooter", + "apiVersion": "v1", + "language": "nodejs", + "generator": "bazel" + } + } + ] +} \ No newline at end of file diff --git a/packages/google-cloud-policytroubleshooter/synth.py b/packages/google-cloud-policytroubleshooter/synth.py index 6f2f613cb5b..1f6063d3f2c 100644 --- a/packages/google-cloud-policytroubleshooter/synth.py +++ b/packages/google-cloud-policytroubleshooter/synth.py @@ -30,7 +30,7 @@ name, version, bazel_target=f"//google/cloud/policytroubleshooter/{version}:policytroubleshooter-{version}-nodejs") - s.copy(library, excludes=[]) + s.copy(library, excludes=["package.json","linkinator.config.json", "system-test/fixtures/sample/src/index.js","system-test/fixtures/sample/src/index.ts"]) # Copy common templates common_templates = gcp.CommonTemplates() diff --git a/packages/google-cloud-policytroubleshooter/system-test/fixtures/sample/src/index.js b/packages/google-cloud-policytroubleshooter/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..33b4bb80eff --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/system-test/fixtures/sample/src/index.js @@ -0,0 +1,26 @@ +// Copyright 2020 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* eslint-disable node/no-missing-require, no-unused-vars */ +const policytroubleshooter = require('@google-cloud/policy-troubleshooter'); + +function main() { + const iamCheckerClient = new policytroubleshooter.IamCheckerClient(); +} + +main(); diff --git a/packages/google-cloud-policytroubleshooter/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-policytroubleshooter/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..8a3927bb7aa --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,32 @@ +// Copyright 2020 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {IamCheckerClient} from '@google-cloud/policy-troubleshooter'; + +// check that the client class type name can be used +function doStuffWithIamCheckerClient(client: IamCheckerClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const iamCheckerClient = new IamCheckerClient(); + doStuffWithIamCheckerClient(iamCheckerClient); +} + +main(); diff --git a/packages/google-cloud-policytroubleshooter/system-test/install.ts b/packages/google-cloud-policytroubleshooter/system-test/install.ts new file mode 100644 index 00000000000..39d90f771de --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/system-test/install.ts @@ -0,0 +1,51 @@ +// Copyright 2020 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; + +describe('📦 pack-n-play test', () => { + it('TypeScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync( + './system-test/fixtures/sample/src/index.ts' + ).toString(), + }, + }; + await packNTest(options); + }); + + it('JavaScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + ts: readFileSync( + './system-test/fixtures/sample/src/index.js' + ).toString(), + }, + }; + await packNTest(options); + }); +}); diff --git a/packages/google-cloud-policytroubleshooter/test/gapic_iam_checker_v1.ts b/packages/google-cloud-policytroubleshooter/test/gapic_iam_checker_v1.ts new file mode 100644 index 00000000000..12a7c339a0d --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/test/gapic_iam_checker_v1.ts @@ -0,0 +1,226 @@ +// Copyright 2020 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as iamcheckerModule from '../src'; + +import {protobuf} from 'google-gax'; + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message).toObject( + instance as protobuf.Message, + {defaults: true} + ); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +describe('v1.IamCheckerClient', () => { + it('has servicePath', () => { + const servicePath = iamcheckerModule.v1.IamCheckerClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = iamcheckerModule.v1.IamCheckerClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = iamcheckerModule.v1.IamCheckerClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new iamcheckerModule.v1.IamCheckerClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new iamcheckerModule.v1.IamCheckerClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new iamcheckerModule.v1.IamCheckerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.iamCheckerStub, undefined); + await client.initialize(); + assert(client.iamCheckerStub); + }); + + it('has close method', () => { + const client = new iamcheckerModule.v1.IamCheckerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new iamcheckerModule.v1.IamCheckerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new iamcheckerModule.v1.IamCheckerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + + describe('troubleshootIamPolicy', () => { + it('invokes troubleshootIamPolicy without error', async () => { + const client = new iamcheckerModule.v1.IamCheckerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse() + ); + client.innerApiCalls.troubleshootIamPolicy = stubSimpleCall( + expectedResponse + ); + const [response] = await client.troubleshootIamPolicy(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.troubleshootIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes troubleshootIamPolicy without error using callback', async () => { + const client = new iamcheckerModule.v1.IamCheckerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse() + ); + client.innerApiCalls.troubleshootIamPolicy = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.troubleshootIamPolicy( + request, + ( + err?: Error | null, + result?: protos.google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.troubleshootIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes troubleshootIamPolicy with error', async () => { + const client = new iamcheckerModule.v1.IamCheckerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.troubleshootIamPolicy = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.troubleshootIamPolicy(request), + expectedError + ); + assert( + (client.innerApiCalls.troubleshootIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); +}); diff --git a/packages/google-cloud-policytroubleshooter/tsconfig.json b/packages/google-cloud-policytroubleshooter/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2018", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts" + ] +} diff --git a/packages/google-cloud-policytroubleshooter/webpack.config.js b/packages/google-cloud-policytroubleshooter/webpack.config.js new file mode 100644 index 00000000000..4fd46e7745f --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/webpack.config.js @@ -0,0 +1,64 @@ +// Copyright 2020 Google LLC +// +// 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 +// +// https://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. + +const path = require('path'); + +module.exports = { + entry: './src/index.ts', + output: { + library: 'IamChecker', + filename: './iam-checker.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/, + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]gtoken/, + use: 'null-loader', + }, + ], + }, + mode: 'production', +}; From cc986807a277dbf8245e6123731cb5273c78e609 Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Tue, 23 Feb 2021 10:58:32 -0800 Subject: [PATCH 006/254] fix: naming on repo for status checks and submit samples (#11) * fix: naming on repo * fix samples * fix: pass naming * fix: working samples --- .../.jsdoc.js | 4 +-- .../CONTRIBUTING.md | 15 +++++++-- .../README.md | 25 +++++++++------ .../package.json | 2 +- .../protos/protos.d.ts | 2 +- .../protos/protos.js | 2 +- .../samples/package.json | 1 + .../samples/quickstart.js | 31 +++++++++---------- .../samples/test/quickstart.js | 16 ++++------ .../src/v1/iam_checker_client.ts | 2 +- .../src/v1/index.ts | 2 +- .../synth.metadata | 10 +++--- .../system-test/install.ts | 2 +- .../test/gapic_iam_checker_v1.ts | 2 +- 14 files changed, 64 insertions(+), 52 deletions(-) diff --git a/packages/google-cloud-policytroubleshooter/.jsdoc.js b/packages/google-cloud-policytroubleshooter/.jsdoc.js index 5f5bba8931a..9fafe924903 100644 --- a/packages/google-cloud-policytroubleshooter/.jsdoc.js +++ b/packages/google-cloud-policytroubleshooter/.jsdoc.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -40,7 +40,7 @@ module.exports = { includePattern: '\\.js$' }, templates: { - copyright: 'Copyright 2020 Google LLC', + copyright: 'Copyright 2021 Google LLC', includeDate: false, sourceFiles: false, systemName: '@google-cloud/policy-troubleshooter', diff --git a/packages/google-cloud-policytroubleshooter/CONTRIBUTING.md b/packages/google-cloud-policytroubleshooter/CONTRIBUTING.md index f6c4cf010e3..bfbf3886e9e 100644 --- a/packages/google-cloud-policytroubleshooter/CONTRIBUTING.md +++ b/packages/google-cloud-policytroubleshooter/CONTRIBUTING.md @@ -37,6 +37,15 @@ accept your pull requests. 1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. 1. Submit a pull request. +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the IAM Policy Troubleshooter API API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + + ## Running the tests 1. [Prepare your environment for Node.js setup][setup]. @@ -51,11 +60,9 @@ accept your pull requests. npm test # Run sample integration tests. - gcloud auth application-default login npm run samples-test # Run all system tests. - gcloud auth application-default login npm run system-test 1. Lint (and maybe fix) any changes: @@ -63,3 +70,7 @@ accept your pull requests. npm run fix [setup]: https://cloud.google.com/nodejs/docs/setup +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=policytroubleshooter.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-cloud-policytroubleshooter/README.md b/packages/google-cloud-policytroubleshooter/README.md index f54b61b845c..28d08aa7d88 100644 --- a/packages/google-cloud-policytroubleshooter/README.md +++ b/packages/google-cloud-policytroubleshooter/README.md @@ -60,23 +60,29 @@ npm install @google-cloud/policy-troubleshooter ```javascript // Imports the Google Cloud client library -// remove this line after package is released // eslint-disable-next-line node/no-missing-require const {IamCheckerClient} = require('@google-cloud/policy-troubleshooter'); // TODO(developer): replace with your prefered project ID. // const projectId = 'my-project' +const options = { + keyfilePath, + scopes: ['https://www.googleapis.com/auth/cloud-platform'], +}; + // Creates a client -// eslint-disable-next-line no-unused-vars -const client = new {IamCheckerClient}(); +const client = new IamCheckerClient(authenticate(options)); -//TODO(library generator): write the actual function you will be testing async function doSomething() { - console.log('Developer! Change this code so that it shows how to use the library! See comments below on structure.') - // const [thing] = await client.methodName({ - // }); - // console.info(thing); + const policy = await client.troubleshootIamPolicy({ + accessTuple: { + principal, + fullResourceName, + permission, + }, + }); + console.log(policy); } doSomething(); @@ -86,8 +92,7 @@ doSomething(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-policy-troubleshooter/tree/master/samples) directory. The samples' `README.md` -has instructions for running the samples. +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-policy-troubleshooter/tree/master/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | diff --git a/packages/google-cloud-policytroubleshooter/package.json b/packages/google-cloud-policytroubleshooter/package.json index 6f17c915f8e..69ebe0215f3 100644 --- a/packages/google-cloud-policytroubleshooter/package.json +++ b/packages/google-cloud-policytroubleshooter/package.json @@ -2,7 +2,7 @@ "name": "@google-cloud/policy-troubleshooter", "version": "0.1.0", "description": "Policytroubleshooter client for Node.js", - "repository": "googleapis/nodejs-policytroubleshooter", + "repository": "googleapis/nodejs-policy-troubleshooter", "license": "Apache-2.0", "author": "Google LLC", "main": "build/src/index.js", diff --git a/packages/google-cloud-policytroubleshooter/protos/protos.d.ts b/packages/google-cloud-policytroubleshooter/protos/protos.d.ts index e7e01db6bde..674d4d02ed2 100644 --- a/packages/google-cloud-policytroubleshooter/protos/protos.d.ts +++ b/packages/google-cloud-policytroubleshooter/protos/protos.d.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-policytroubleshooter/protos/protos.js b/packages/google-cloud-policytroubleshooter/protos/protos.js index 253dbb0947e..6323c376286 100644 --- a/packages/google-cloud-policytroubleshooter/protos/protos.js +++ b/packages/google-cloud-policytroubleshooter/protos/protos.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-policytroubleshooter/samples/package.json b/packages/google-cloud-policytroubleshooter/samples/package.json index 29643291eec..1fd0bb6254f 100644 --- a/packages/google-cloud-policytroubleshooter/samples/package.json +++ b/packages/google-cloud-policytroubleshooter/samples/package.json @@ -13,6 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { + "@google-cloud/local-auth": "^1.0.0", "@google-cloud/policy-troubleshooter": "^0.1.0" }, "devDependencies": { diff --git a/packages/google-cloud-policytroubleshooter/samples/quickstart.js b/packages/google-cloud-policytroubleshooter/samples/quickstart.js index f7491517c64..4e5bf99c641 100644 --- a/packages/google-cloud-policytroubleshooter/samples/quickstart.js +++ b/packages/google-cloud-policytroubleshooter/samples/quickstart.js @@ -13,31 +13,30 @@ 'use strict'; -async function main() { +async function main(principal, fullResourceName, permission) { // [START nodejs_policy_troubleshooter_quickstart] - // Imports the Google Cloud client library - // remove this line after package is released - // eslint-disable-next-line node/no-missing-require + // Imports the Google Cloud client library const {IamCheckerClient} = require('@google-cloud/policy-troubleshooter'); // TODO(developer): replace with your prefered project ID. // const projectId = 'my-project' // Creates a client - // eslint-disable-next-line no-unused-vars - const client = new {IamCheckerClient}(); - - //TODO(library generator): write the actual function you will be testing - async function doSomething() { - console.log( - 'Developer! Change this code so that it shows how to use the library! See comments below on structure.' - ); - // const [thing] = await client.methodName({ - // }); - // console.info(thing); + const client = new IamCheckerClient(); + + async function troubelshootPolicy() { + const policy = await client.troubleshootIamPolicy({ + accessTuple: { + principal, + fullResourceName, + permission, + }, + }); + console.log(policy); } - doSomething(); + + troubelshootPolicy(); // [END nodejs_policy_troubleshooter_quickstart] } diff --git a/packages/google-cloud-policytroubleshooter/samples/test/quickstart.js b/packages/google-cloud-policytroubleshooter/samples/test/quickstart.js index 17ddd18c584..02410235e48 100644 --- a/packages/google-cloud-policytroubleshooter/samples/test/quickstart.js +++ b/packages/google-cloud-policytroubleshooter/samples/test/quickstart.js @@ -20,31 +20,27 @@ const path = require('path'); const cp = require('child_process'); const {before, describe, it} = require('mocha'); -// eslint-disable-next-line node/no-missing-require const {IamCheckerClient} = require('@google-cloud/policy-troubleshooter'); -// eslint-disable-next-line no-unused-vars, node/no-missing-require const {assert} = require('chai'); const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); const cwd = path.join(__dirname, '..'); -const client = new {IamCheckerClient}(); +const client = new IamCheckerClient(); describe('Quickstart', () => { - //TODO: remove this if not using the projectId - // eslint-disable-next-line no-unused-vars let projectId; before(async () => { - // eslint-disable-next-line no-unused-vars projectId = await client.getProjectId(); }); it('should run quickstart', async () => { - //TODO: remove this disability - // eslint-disable-next-line no-unused-vars - const stdout = execSync('node ./quickstart.js', {cwd}); - //assert(stdout, stdout !== null); + const stdout = execSync( + `node ./quickstart.js example@example.com //cloudresourcemanager.googleapis.com/projects/${projectId} accessapproval.requests.approve`, + {cwd} + ); + assert.match(stdout, /'UNKNOWN_INFO_DENIED'/); }); }); diff --git a/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts b/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts index 036aaf0bb17..17e3046f62a 100644 --- a/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts +++ b/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-policytroubleshooter/src/v1/index.ts b/packages/google-cloud-policytroubleshooter/src/v1/index.ts index c6a97b8131f..9548a7f7215 100644 --- a/packages/google-cloud-policytroubleshooter/src/v1/index.ts +++ b/packages/google-cloud-policytroubleshooter/src/v1/index.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-policytroubleshooter/synth.metadata b/packages/google-cloud-policytroubleshooter/synth.metadata index 5479d501fc0..2fda76f376c 100644 --- a/packages/google-cloud-policytroubleshooter/synth.metadata +++ b/packages/google-cloud-policytroubleshooter/synth.metadata @@ -3,23 +3,23 @@ { "git": { "name": ".", - "remote": "sso://user/sofialeon/nodejs-policy-troubleshooter", - "sha": "8e8c2e15ffed9278832df68ace50441167f9d723" + "remote": "git@github.com:googleapis/nodejs-policy-troubleshooter.git", + "sha": "4749c7fa902cd909f9b878c8f5554751998747a6" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "49e64a5a8eb24ab49a81049f3bb31df869515715", - "internalRef": "347844600" + "sha": "178d16d9f99ee85ffa65dff304f40324c35d0668", + "internalRef": "357260962" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "d73e8dea90af1b463a7f9d4a33244cf4612ada7c" + "sha": "b32c87d2c087fb2a841acc623ab540105de821af" } } ], diff --git a/packages/google-cloud-policytroubleshooter/system-test/install.ts b/packages/google-cloud-policytroubleshooter/system-test/install.ts index 39d90f771de..d2d61c0396f 100644 --- a/packages/google-cloud-policytroubleshooter/system-test/install.ts +++ b/packages/google-cloud-policytroubleshooter/system-test/install.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-policytroubleshooter/test/gapic_iam_checker_v1.ts b/packages/google-cloud-policytroubleshooter/test/gapic_iam_checker_v1.ts index 12a7c339a0d..607fe1fe593 100644 --- a/packages/google-cloud-policytroubleshooter/test/gapic_iam_checker_v1.ts +++ b/packages/google-cloud-policytroubleshooter/test/gapic_iam_checker_v1.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From 02a921755faa6337d5a02a3452ef0e9dab265612 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 23 Feb 2021 11:14:17 -0800 Subject: [PATCH 007/254] chore: release 1.0.0 (#1) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- .../CHANGELOG.md | 17 +++++++++++++++++ .../package.json | 2 +- .../samples/package.json | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 packages/google-cloud-policytroubleshooter/CHANGELOG.md diff --git a/packages/google-cloud-policytroubleshooter/CHANGELOG.md b/packages/google-cloud-policytroubleshooter/CHANGELOG.md new file mode 100644 index 00000000000..70c76b74cf3 --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/CHANGELOG.md @@ -0,0 +1,17 @@ +# Changelog + +## 1.0.0 (2021-02-23) + + +### ⚠ BREAKING CHANGES + +* initial stub of library + +### Features + +* initial stub of library ([4749c7f](https://www.github.com/googleapis/nodejs-policy-troubleshooter/commit/4749c7fa902cd909f9b878c8f5554751998747a6)) + + +### Bug Fixes + +* naming on repo for status checks and submit samples ([#11](https://www.github.com/googleapis/nodejs-policy-troubleshooter/issues/11)) ([0232dce](https://www.github.com/googleapis/nodejs-policy-troubleshooter/commit/0232dce5f27bcaad08fa58aa2113aa928cf0b517)) diff --git a/packages/google-cloud-policytroubleshooter/package.json b/packages/google-cloud-policytroubleshooter/package.json index 69ebe0215f3..34eb26c6120 100644 --- a/packages/google-cloud-policytroubleshooter/package.json +++ b/packages/google-cloud-policytroubleshooter/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/policy-troubleshooter", - "version": "0.1.0", + "version": "1.0.0", "description": "Policytroubleshooter client for Node.js", "repository": "googleapis/nodejs-policy-troubleshooter", "license": "Apache-2.0", diff --git a/packages/google-cloud-policytroubleshooter/samples/package.json b/packages/google-cloud-policytroubleshooter/samples/package.json index 1fd0bb6254f..22768add2fd 100644 --- a/packages/google-cloud-policytroubleshooter/samples/package.json +++ b/packages/google-cloud-policytroubleshooter/samples/package.json @@ -14,7 +14,7 @@ }, "dependencies": { "@google-cloud/local-auth": "^1.0.0", - "@google-cloud/policy-troubleshooter": "^0.1.0" + "@google-cloud/policy-troubleshooter": "^1.0.0" }, "devDependencies": { "c8": "^7.1.0", From a64feb38d4295f3460d07fb09d74f3cb0e0136aa Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 24 Feb 2021 09:54:25 -0800 Subject: [PATCH 008/254] docs: update docs given new API name --- .../google-cloud-policytroubleshooter/README.md | 15 +++++---------- .../protos/protos.d.ts | 3 ++- .../protos/protos.js | 7 +++++++ .../protos/protos.json | 5 +++-- .../synth.metadata | 4 ++-- 5 files changed, 19 insertions(+), 15 deletions(-) diff --git a/packages/google-cloud-policytroubleshooter/README.md b/packages/google-cloud-policytroubleshooter/README.md index 28d08aa7d88..27e56355df0 100644 --- a/packages/google-cloud-policytroubleshooter/README.md +++ b/packages/google-cloud-policytroubleshooter/README.md @@ -58,23 +58,17 @@ npm install @google-cloud/policy-troubleshooter ### Using the client library ```javascript -// Imports the Google Cloud client library -// eslint-disable-next-line node/no-missing-require +// Imports the Google Cloud client library const {IamCheckerClient} = require('@google-cloud/policy-troubleshooter'); // TODO(developer): replace with your prefered project ID. // const projectId = 'my-project' -const options = { - keyfilePath, - scopes: ['https://www.googleapis.com/auth/cloud-platform'], -}; - // Creates a client -const client = new IamCheckerClient(authenticate(options)); +const client = new IamCheckerClient(); -async function doSomething() { +async function troubelshootPolicy() { const policy = await client.troubleshootIamPolicy({ accessTuple: { principal, @@ -84,7 +78,8 @@ async function doSomething() { }); console.log(policy); } -doSomething(); + +troubelshootPolicy(); ``` diff --git a/packages/google-cloud-policytroubleshooter/protos/protos.d.ts b/packages/google-cloud-policytroubleshooter/protos/protos.d.ts index 674d4d02ed2..f7a665c9183 100644 --- a/packages/google-cloud-policytroubleshooter/protos/protos.d.ts +++ b/packages/google-cloud-policytroubleshooter/protos/protos.d.ts @@ -744,7 +744,8 @@ export namespace google { REQUIRED = 2, OUTPUT_ONLY = 3, INPUT_ONLY = 4, - IMMUTABLE = 5 + IMMUTABLE = 5, + UNORDERED_LIST = 6 } /** Properties of a Http. */ diff --git a/packages/google-cloud-policytroubleshooter/protos/protos.js b/packages/google-cloud-policytroubleshooter/protos/protos.js index 6323c376286..b8235f1b75e 100644 --- a/packages/google-cloud-policytroubleshooter/protos/protos.js +++ b/packages/google-cloud-policytroubleshooter/protos/protos.js @@ -1979,6 +1979,7 @@ * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value * @property {number} INPUT_ONLY=4 INPUT_ONLY value * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value */ api.FieldBehavior = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -1988,6 +1989,7 @@ values[valuesById[3] = "OUTPUT_ONLY"] = 3; values[valuesById[4] = "INPUT_ONLY"] = 4; values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; return values; })(); @@ -8339,6 +8341,7 @@ case 3: case 4: case 5: + case 6: break; } } @@ -8434,6 +8437,10 @@ case 5: message[".google.api.fieldBehavior"][i] = 5; break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; } } return message; diff --git a/packages/google-cloud-policytroubleshooter/protos/protos.json b/packages/google-cloud-policytroubleshooter/protos/protos.json index 49507e1d1c6..8ba046c7010 100644 --- a/packages/google-cloud-policytroubleshooter/protos/protos.json +++ b/packages/google-cloud-policytroubleshooter/protos/protos.json @@ -225,7 +225,8 @@ "REQUIRED": 2, "OUTPUT_ONLY": 3, "INPUT_ONLY": 4, - "IMMUTABLE": 5 + "IMMUTABLE": 5, + "UNORDERED_LIST": 6 } }, "http": { @@ -335,7 +336,7 @@ }, "protobuf": { "options": { - "go_package": "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor", + "go_package": "google.golang.org/protobuf/types/descriptorpb", "java_package": "com.google.protobuf", "java_outer_classname": "DescriptorProtos", "csharp_namespace": "Google.Protobuf.Reflection", diff --git a/packages/google-cloud-policytroubleshooter/synth.metadata b/packages/google-cloud-policytroubleshooter/synth.metadata index 2fda76f376c..e566687d89a 100644 --- a/packages/google-cloud-policytroubleshooter/synth.metadata +++ b/packages/google-cloud-policytroubleshooter/synth.metadata @@ -3,8 +3,8 @@ { "git": { "name": ".", - "remote": "git@github.com:googleapis/nodejs-policy-troubleshooter.git", - "sha": "4749c7fa902cd909f9b878c8f5554751998747a6" + "remote": "https://github.com/googleapis/nodejs-policy-troubleshooter.git", + "sha": "a48c0b27a2e1d28a3f0f43faa8e4dbe595f73b81" } }, { From 5caa7b9d0854d1c019e1dfd0af0c356bc35848a7 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sun, 7 Mar 2021 09:00:42 -0800 Subject: [PATCH 009/254] build: update gapic-generator-typescript to v1.2.10. (#13) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/7de5fca1-c450-46ed-b4bd-ed0a7f991ee4/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 361273630 Source-Link: https://github.com/googleapis/googleapis/commit/5477122b3e8037a1dc5bc920536158edbd151dc4 --- packages/google-cloud-policytroubleshooter/synth.metadata | 6 +++--- .../google-cloud-policytroubleshooter/webpack.config.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-policytroubleshooter/synth.metadata b/packages/google-cloud-policytroubleshooter/synth.metadata index e566687d89a..730dd5cb3e2 100644 --- a/packages/google-cloud-policytroubleshooter/synth.metadata +++ b/packages/google-cloud-policytroubleshooter/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-policy-troubleshooter.git", - "sha": "a48c0b27a2e1d28a3f0f43faa8e4dbe595f73b81" + "sha": "1fef346172bb0f2c997b0a301c11ffb6a4f4f8ea" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "178d16d9f99ee85ffa65dff304f40324c35d0668", - "internalRef": "357260962" + "sha": "5477122b3e8037a1dc5bc920536158edbd151dc4", + "internalRef": "361273630" } }, { diff --git a/packages/google-cloud-policytroubleshooter/webpack.config.js b/packages/google-cloud-policytroubleshooter/webpack.config.js index 4fd46e7745f..f5a14136b2d 100644 --- a/packages/google-cloud-policytroubleshooter/webpack.config.js +++ b/packages/google-cloud-policytroubleshooter/webpack.config.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From fcf93326bcb8e817838465f464bd768b828148b6 Mon Sep 17 00:00:00 2001 From: Jeffrey Rennie Date: Thu, 18 Mar 2021 15:42:18 -0700 Subject: [PATCH 010/254] chore: migrate to owl bot (#14) --- .../.github/.OwlBot.yaml | 23 +++++++++++ .../.repo-metadata.json | 16 ++++---- .../linkinator.config.json | 11 ++++- .../synth.metadata | 37 ----------------- .../synth.py | 41 ------------------- .../system-test/fixtures/sample/src/index.js | 2 +- .../system-test/fixtures/sample/src/index.ts | 2 +- 7 files changed, 43 insertions(+), 89 deletions(-) create mode 100644 packages/google-cloud-policytroubleshooter/.github/.OwlBot.yaml delete mode 100644 packages/google-cloud-policytroubleshooter/synth.metadata delete mode 100644 packages/google-cloud-policytroubleshooter/synth.py diff --git a/packages/google-cloud-policytroubleshooter/.github/.OwlBot.yaml b/packages/google-cloud-policytroubleshooter/.github/.OwlBot.yaml new file mode 100644 index 00000000000..7755d95cc48 --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/.github/.OwlBot.yaml @@ -0,0 +1,23 @@ +# Copyright 2021 Google LLC +# +# 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. +docker: + image: gcr.io/repo-automation-bots/owlbot-nodejs:latest + +deep-remove-regex: + - /owl-bot-staging + +deep-copy-regex: + - source: /google/cloud/policytroubleshooter/(.*)/.*-nodejs/(.*) + dest: /owl-bot-staging/$1/$2 + diff --git a/packages/google-cloud-policytroubleshooter/.repo-metadata.json b/packages/google-cloud-policytroubleshooter/.repo-metadata.json index e50bbc309e0..836d9d71bf2 100644 --- a/packages/google-cloud-policytroubleshooter/.repo-metadata.json +++ b/packages/google-cloud-policytroubleshooter/.repo-metadata.json @@ -1,14 +1,14 @@ { - "name": "policytroubleshooter", - "name_pretty": "IAM Policy Troubleshooter API", - "product_documentation": "https://cloud.google.com/iam/docs/troubleshooting-access#rest-api/", "client_documentation": "https://googleapis.dev/nodejs/policytroubleshooter/latest/", - "issue_tracker": "https://github.com/googleapis/nodejs-policy-troubleshooter/issues", + "api_id": "policytroubleshooter.googleapis.com", + "distribution_name": "@google-cloud/policy-troubleshooter", "release_level": "GA", + "default_version": "v1", "language": "nodejs", + "name_pretty": "IAM Policy Troubleshooter API", "repo": "googleapis/nodejs-policy-troubleshooter", - "distribution_name": "@google-cloud/policy-troubleshooter", - "api_id": "policytroubleshooter.googleapis.com", - "requires_billing": true + "product_documentation": "https://cloud.google.com/iam/docs/troubleshooting-access#rest-api/", + "requires_billing": true, + "name": "policytroubleshooter", + "issue_tracker": "https://github.com/googleapis/nodejs-policy-troubleshooter/issues" } - diff --git a/packages/google-cloud-policytroubleshooter/linkinator.config.json b/packages/google-cloud-policytroubleshooter/linkinator.config.json index fe98eb78cac..29a223b6db6 100644 --- a/packages/google-cloud-policytroubleshooter/linkinator.config.json +++ b/packages/google-cloud-policytroubleshooter/linkinator.config.json @@ -1 +1,10 @@ -{"recurse":true,"skip":["https://googleapis.dev/nodejs/policytroubleshooter/latest/","https://github.com/googleapis/nodejs-policy-troubleshooter/blob/master/CHANGELOG.md","https://github.com/googleapis/nodejs-policy-troubleshooter","https://github.com/googleapis/nodejs-policy-troubleshooter/blob/master/samples/quickstart.js","https://github.com/googleapis/nodejs-policy-troubleshooter/tree/master/samples","https://github.com/googleapis/nodejs-policy-troubleshooter/blob/master/LICENSE","https://github.com/googleapis/nodejs-policy-troubleshooter/blob/master/CONTRIBUTING.md","http://localhost:5244/","https://codecov.io/gh/googleapis/","www.googleapis.com","img.shields.io"],"silent":true,"concurrency":10} \ No newline at end of file +{ + "recurse": true, + "skip": [ + "https://codecov.io/gh/googleapis/", + "www.googleapis.com", + "img.shields.io" + ], + "silent": true, + "concurrency": 10 +} diff --git a/packages/google-cloud-policytroubleshooter/synth.metadata b/packages/google-cloud-policytroubleshooter/synth.metadata deleted file mode 100644 index 730dd5cb3e2..00000000000 --- a/packages/google-cloud-policytroubleshooter/synth.metadata +++ /dev/null @@ -1,37 +0,0 @@ -{ - "sources": [ - { - "git": { - "name": ".", - "remote": "https://github.com/googleapis/nodejs-policy-troubleshooter.git", - "sha": "1fef346172bb0f2c997b0a301c11ffb6a4f4f8ea" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "5477122b3e8037a1dc5bc920536158edbd151dc4", - "internalRef": "361273630" - } - }, - { - "git": { - "name": "synthtool", - "remote": "https://github.com/googleapis/synthtool.git", - "sha": "b32c87d2c087fb2a841acc623ab540105de821af" - } - } - ], - "destinations": [ - { - "client": { - "source": "googleapis", - "apiName": "policytroubleshooter", - "apiVersion": "v1", - "language": "nodejs", - "generator": "bazel" - } - } - ] -} \ No newline at end of file diff --git a/packages/google-cloud-policytroubleshooter/synth.py b/packages/google-cloud-policytroubleshooter/synth.py deleted file mode 100644 index 1f6063d3f2c..00000000000 --- a/packages/google-cloud-policytroubleshooter/synth.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright 2020 Google LLC -# -# 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. -"""This script is used to synthesize generated parts of this library.""" - -import synthtool as s -import synthtool.gcp as gcp -import synthtool.languages.node as node -import subprocess -import logging - -logging.basicConfig(level=logging.DEBUG) - -# run the gapic generator -gapic = gcp.GAPICBazel() -versions = ["v1"] -name = 'policytroubleshooter' -for version in versions: - library = gapic.node_library( - name, - version, - bazel_target=f"//google/cloud/policytroubleshooter/{version}:policytroubleshooter-{version}-nodejs") - s.copy(library, excludes=["package.json","linkinator.config.json", "system-test/fixtures/sample/src/index.js","system-test/fixtures/sample/src/index.ts"]) - -# Copy common templates -common_templates = gcp.CommonTemplates() -templates = common_templates.node_library( - source_location='build/src', versions=["v1"], default_version="v1") -s.copy(templates, excludes=[]) - -node.postprocess_gapic_library() diff --git a/packages/google-cloud-policytroubleshooter/system-test/fixtures/sample/src/index.js b/packages/google-cloud-policytroubleshooter/system-test/fixtures/sample/src/index.js index 33b4bb80eff..29fb5bf4d4c 100644 --- a/packages/google-cloud-policytroubleshooter/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-policytroubleshooter/system-test/fixtures/sample/src/index.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-policytroubleshooter/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-policytroubleshooter/system-test/fixtures/sample/src/index.ts index 8a3927bb7aa..210e6787a3f 100644 --- a/packages/google-cloud-policytroubleshooter/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-policytroubleshooter/system-test/fixtures/sample/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From 89710b328f1edb084b44e3c782229071a78f30c0 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 14 Apr 2021 23:52:03 +0200 Subject: [PATCH 011/254] chore(deps): update dependency sinon to v10 (#30) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^9.2.1` -> `^10.0.0`](https://renovatebot.com/diffs/npm/sinon/9.2.4/10.0.0) | [![age](https://badges.renovateapi.com/packages/npm/sinon/10.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/10.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/10.0.0/compatibility-slim/9.2.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/10.0.0/confidence-slim/9.2.4)](https://docs.renovatebot.com/merge-confidence/) | | [@types/sinon](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | [`^9.0.9` -> `^10.0.0`](https://renovatebot.com/diffs/npm/@types%2fsinon/9.0.11/10.0.0) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fsinon/10.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fsinon/10.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fsinon/10.0.0/compatibility-slim/9.0.11)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fsinon/10.0.0/confidence-slim/9.0.11)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v10.0.0`](https://togithub.com/sinonjs/sinon/blob/master/CHANGELOG.md#​1000--2021-03-22) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v9.2.4...v10.0.0) ================== - Upgrade nise to 4.1.0 - Use [@​sinonjs/eslint-config](https://togithub.com/sinonjs/eslint-config)[@​4](https://togithub.com/4) => Adopts ES2017 => Drops support for IE 11, Legacy Edge and legacy Safari
--- ### Configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-policy-troubleshooter). --- packages/google-cloud-policytroubleshooter/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-policytroubleshooter/package.json b/packages/google-cloud-policytroubleshooter/package.json index 34eb26c6120..d13521d7299 100644 --- a/packages/google-cloud-policytroubleshooter/package.json +++ b/packages/google-cloud-policytroubleshooter/package.json @@ -44,7 +44,7 @@ "devDependencies": { "@types/mocha": "^8.0.4", "@types/node": "^14.14.10", - "@types/sinon": "^9.0.9", + "@types/sinon": "^10.0.0", "c8": "^7.3.5", "gts": "^3.0.3", "jsdoc": "^3.6.6", @@ -54,7 +54,7 @@ "mocha": "^8.2.1", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", - "sinon": "^9.2.1", + "sinon": "^10.0.0", "ts-loader": "^8.0.11", "typescript": "^4.1.2", "webpack": "^5.9.0", From cdacd08a3a7629b825720d4cfdb1c86c8c63f163 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 20 Apr 2021 00:56:50 +0200 Subject: [PATCH 012/254] chore(deps): update dependency ts-loader to v9 (#34) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [ts-loader](https://togithub.com/TypeStrong/ts-loader) | [`^8.0.11` -> `^9.0.0`](https://renovatebot.com/diffs/npm/ts-loader/8.1.0/9.0.0) | [![age](https://badges.renovateapi.com/packages/npm/ts-loader/9.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/ts-loader/9.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/ts-loader/9.0.0/compatibility-slim/8.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/ts-loader/9.0.0/confidence-slim/8.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
TypeStrong/ts-loader ### [`v9.0.0`](https://togithub.com/TypeStrong/ts-loader/blob/master/CHANGELOG.md#v900) [Compare Source](https://togithub.com/TypeStrong/ts-loader/compare/v8.1.0...v9.0.0) Breaking changes: - minimum webpack version: 5 - minimum node version: 12 Changes: - [webpack 5 migration](https://togithub.com/TypeStrong/ts-loader/pull/1251) - thanks [@​johnnyreilly](https://togithub.com/johnnyreilly), [@​jonwallsten](https://togithub.com/jonwallsten), [@​sokra](https://togithub.com/sokra), [@​appzuka](https://togithub.com/appzuka), [@​alexander-akait](https://togithub.com/alexander-akait)
--- ### Configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-policy-troubleshooter). --- packages/google-cloud-policytroubleshooter/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-policytroubleshooter/package.json b/packages/google-cloud-policytroubleshooter/package.json index d13521d7299..cc897eacb1f 100644 --- a/packages/google-cloud-policytroubleshooter/package.json +++ b/packages/google-cloud-policytroubleshooter/package.json @@ -55,7 +55,7 @@ "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", "sinon": "^10.0.0", - "ts-loader": "^8.0.11", + "ts-loader": "^9.0.0", "typescript": "^4.1.2", "webpack": "^5.9.0", "webpack-cli": "^4.2.0" From aa5186faacd5779ef27b9aadbdae37be76e04afe Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Thu, 6 May 2021 17:52:12 -0700 Subject: [PATCH 013/254] fix(deps): require google-gax v2.12.0 (#38) --- packages/google-cloud-policytroubleshooter/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-policytroubleshooter/package.json b/packages/google-cloud-policytroubleshooter/package.json index cc897eacb1f..1c38e4c50d7 100644 --- a/packages/google-cloud-policytroubleshooter/package.json +++ b/packages/google-cloud-policytroubleshooter/package.json @@ -39,7 +39,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^2.9.2" + "google-gax": "^2.12.0" }, "devDependencies": { "@types/mocha": "^8.0.4", From 8fdb3ad30ec863ca4834cd6f8a8b7a53806a52e3 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 10 May 2021 17:02:10 +0000 Subject: [PATCH 014/254] chore: new owl bot post processor docker image (#40) gcr.io/repo-automation-bots/owlbot-nodejs:latest@sha256:f93bb861d6f12574437bb9aee426b71eafd63b419669ff0ed029f4b7e7162e3f --- .../protos/protos.d.ts | 10 +++++----- .../protos/protos.js | 20 +++++++++---------- .../src/v1/iam_checker_client.ts | 15 +++++++------- .../test/gapic_iam_checker_v1.ts | 17 +++++++--------- 4 files changed, 30 insertions(+), 32 deletions(-) diff --git a/packages/google-cloud-policytroubleshooter/protos/protos.d.ts b/packages/google-cloud-policytroubleshooter/protos/protos.d.ts index f7a665c9183..63270726e0f 100644 --- a/packages/google-cloud-policytroubleshooter/protos/protos.d.ts +++ b/packages/google-cloud-policytroubleshooter/protos/protos.d.ts @@ -891,19 +891,19 @@ export namespace google { public selector: string; /** HttpRule get. */ - public get: string; + public get?: (string|null); /** HttpRule put. */ - public put: string; + public put?: (string|null); /** HttpRule post. */ - public post: string; + public post?: (string|null); /** HttpRule delete. */ - public delete: string; + public delete?: (string|null); /** HttpRule patch. */ - public patch: string; + public patch?: (string|null); /** HttpRule custom. */ public custom?: (google.api.ICustomHttpPattern|null); diff --git a/packages/google-cloud-policytroubleshooter/protos/protos.js b/packages/google-cloud-policytroubleshooter/protos/protos.js index b8235f1b75e..513edb9493c 100644 --- a/packages/google-cloud-policytroubleshooter/protos/protos.js +++ b/packages/google-cloud-policytroubleshooter/protos/protos.js @@ -2268,43 +2268,43 @@ /** * HttpRule get. - * @member {string} get + * @member {string|null|undefined} get * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype.get = ""; + HttpRule.prototype.get = null; /** * HttpRule put. - * @member {string} put + * @member {string|null|undefined} put * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype.put = ""; + HttpRule.prototype.put = null; /** * HttpRule post. - * @member {string} post + * @member {string|null|undefined} post * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype.post = ""; + HttpRule.prototype.post = null; /** * HttpRule delete. - * @member {string} delete + * @member {string|null|undefined} delete * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype["delete"] = ""; + HttpRule.prototype["delete"] = null; /** * HttpRule patch. - * @member {string} patch + * @member {string|null|undefined} patch * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype.patch = ""; + HttpRule.prototype.patch = null; /** * HttpRule custom. diff --git a/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts b/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts index 17e3046f62a..a9e1982f8f1 100644 --- a/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts +++ b/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts @@ -202,13 +202,14 @@ export class IamCheckerClient { const iamCheckerStubMethods = ['troubleshootIamPolicy']; for (const methodName of iamCheckerStubMethods) { const callPromise = this.iamCheckerStub.then( - stub => (...args: Array<{}>) => { - if (this._terminated) { - return Promise.reject('The client has already been closed.'); - } - const func = stub[methodName]; - return func.apply(stub, args); - }, + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, (err: Error | null | undefined) => () => { throw err; } diff --git a/packages/google-cloud-policytroubleshooter/test/gapic_iam_checker_v1.ts b/packages/google-cloud-policytroubleshooter/test/gapic_iam_checker_v1.ts index 607fe1fe593..178c50d0176 100644 --- a/packages/google-cloud-policytroubleshooter/test/gapic_iam_checker_v1.ts +++ b/packages/google-cloud-policytroubleshooter/test/gapic_iam_checker_v1.ts @@ -26,10 +26,9 @@ import * as iamcheckerModule from '../src'; import {protobuf} from 'google-gax'; function generateSampleMessage(instance: T) { - const filledObject = (instance.constructor as typeof protobuf.Message).toObject( - instance as protobuf.Message, - {defaults: true} - ); + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); return (instance.constructor as typeof protobuf.Message).fromObject( filledObject ) as T; @@ -145,9 +144,8 @@ describe('v1.IamCheckerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse() ); - client.innerApiCalls.troubleshootIamPolicy = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.troubleshootIamPolicy = + stubSimpleCall(expectedResponse); const [response] = await client.troubleshootIamPolicy(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -170,9 +168,8 @@ describe('v1.IamCheckerClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse() ); - client.innerApiCalls.troubleshootIamPolicy = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.troubleshootIamPolicy = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.troubleshootIamPolicy( request, From 0bbb65749f4aca7e90ddc6bed122230ee998f231 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 11 May 2021 21:58:21 +0000 Subject: [PATCH 015/254] fix: use require() to load JSON protos (#41) The library is regenerated with gapic-generator-typescript v1.3.1. Committer: @alexander-fenster PiperOrigin-RevId: 372468161 Source-Link: https://github.com/googleapis/googleapis/commit/75880c3e6a6aa2597400582848e81bbbfac51dea Source-Link: https://github.com/googleapis/googleapis-gen/commit/77b18044813d4c8c415ff9ea68e76e307eb8e904 --- .../src/v1/iam_checker_client.ts | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts b/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts index a9e1982f8f1..2ff395f0537 100644 --- a/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts +++ b/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts @@ -22,6 +22,7 @@ import {Callback, CallOptions, Descriptors, ClientOptions} from 'google-gax'; import * as path from 'path'; import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); /** * Client JSON configuration object, loaded from * `src/v1/iam_checker_client_config.json`. @@ -137,22 +138,7 @@ export class IamCheckerClient { clientHeader.push(`${opts.libName}/${opts.libVersion}`); } // Load the applicable protos. - // For Node.js, pass the path to JSON proto file. - // For browsers, pass the JSON content. - - const nodejsProtoPath = path.join( - __dirname, - '..', - '..', - 'protos', - 'protos.json' - ); - this._protos = this._gaxGrpc.loadProto( - opts.fallback - ? // eslint-disable-next-line @typescript-eslint/no-var-requires - require('../../protos/protos.json') - : nodejsProtoPath - ); + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); // Put together the default options sent with requests. this._defaults = this._gaxGrpc.constructSettings( From 96b08b8e6e4d98924411eb5bb481ca72dd32015d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 11 May 2021 23:12:45 +0000 Subject: [PATCH 016/254] chore: update gapic-generator-typescript to v1.3.2 (#42) Committer: @alexander-fenster PiperOrigin-RevId: 372656503 Source-Link: https://github.com/googleapis/googleapis/commit/6fa858c6489b1bbc505a7d7afe39f2dc45819c38 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d7c95df3ab1ea1b4c22a4542bad4924cc46d1388 --- .../src/v1/iam_checker_client.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts b/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts index 2ff395f0537..96bd8c0df27 100644 --- a/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts +++ b/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts @@ -19,7 +19,6 @@ /* global window */ import * as gax from 'google-gax'; import {Callback, CallOptions, Descriptors, ClientOptions} from 'google-gax'; -import * as path from 'path'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); From 14e7526a9b3cc41a545bdb24129536e5ab585ee0 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 13 May 2021 10:28:09 -0700 Subject: [PATCH 017/254] chore: release 1.0.1 (#39) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-policytroubleshooter/CHANGELOG.md | 8 ++++++++ packages/google-cloud-policytroubleshooter/package.json | 2 +- .../samples/package.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-policytroubleshooter/CHANGELOG.md b/packages/google-cloud-policytroubleshooter/CHANGELOG.md index 70c76b74cf3..6858d2aefe6 100644 --- a/packages/google-cloud-policytroubleshooter/CHANGELOG.md +++ b/packages/google-cloud-policytroubleshooter/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +### [1.0.1](https://www.github.com/googleapis/nodejs-policy-troubleshooter/compare/v1.0.0...v1.0.1) (2021-05-12) + + +### Bug Fixes + +* **deps:** require google-gax v2.12.0 ([#38](https://www.github.com/googleapis/nodejs-policy-troubleshooter/issues/38)) ([962dfae](https://www.github.com/googleapis/nodejs-policy-troubleshooter/commit/962dfae3d9440dec5f8477a66efb0516d4f5fff2)) +* use require() to load JSON protos ([#41](https://www.github.com/googleapis/nodejs-policy-troubleshooter/issues/41)) ([4bc12ce](https://www.github.com/googleapis/nodejs-policy-troubleshooter/commit/4bc12ce5ea6e4ab3a1eb3978c2a646523b0d3b13)) + ## 1.0.0 (2021-02-23) diff --git a/packages/google-cloud-policytroubleshooter/package.json b/packages/google-cloud-policytroubleshooter/package.json index 1c38e4c50d7..2f9a173e8c4 100644 --- a/packages/google-cloud-policytroubleshooter/package.json +++ b/packages/google-cloud-policytroubleshooter/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/policy-troubleshooter", - "version": "1.0.0", + "version": "1.0.1", "description": "Policytroubleshooter client for Node.js", "repository": "googleapis/nodejs-policy-troubleshooter", "license": "Apache-2.0", diff --git a/packages/google-cloud-policytroubleshooter/samples/package.json b/packages/google-cloud-policytroubleshooter/samples/package.json index 22768add2fd..e7c9b06e73d 100644 --- a/packages/google-cloud-policytroubleshooter/samples/package.json +++ b/packages/google-cloud-policytroubleshooter/samples/package.json @@ -14,7 +14,7 @@ }, "dependencies": { "@google-cloud/local-auth": "^1.0.0", - "@google-cloud/policy-troubleshooter": "^1.0.0" + "@google-cloud/policy-troubleshooter": "^1.0.1" }, "devDependencies": { "c8": "^7.1.0", From 788a2c9d28ebe5bcfe38885d8c51645edb5ddb9e Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Fri, 21 May 2021 19:20:40 +0000 Subject: [PATCH 018/254] feat: initial lib generation --- .../google-cloud-shell/.github/.OwlBot.yaml | 22 ++ .../google-cloud-shell/.repo-metadata.json | 14 ++ .../google-cloud-shell/CODE_OF_CONDUCT.md | 94 ++++++++ packages/google-cloud-shell/CONTRIBUTING.md | 76 +++++++ packages/google-cloud-shell/LICENSE | 202 ++++++++++++++++++ packages/google-cloud-shell/README.md | 120 +++++++++++ packages/google-cloud-shell/package.json | 64 ++++++ 7 files changed, 592 insertions(+) create mode 100644 packages/google-cloud-shell/.github/.OwlBot.yaml create mode 100644 packages/google-cloud-shell/.repo-metadata.json create mode 100644 packages/google-cloud-shell/CODE_OF_CONDUCT.md create mode 100644 packages/google-cloud-shell/CONTRIBUTING.md create mode 100644 packages/google-cloud-shell/LICENSE create mode 100644 packages/google-cloud-shell/README.md create mode 100644 packages/google-cloud-shell/package.json diff --git a/packages/google-cloud-shell/.github/.OwlBot.yaml b/packages/google-cloud-shell/.github/.OwlBot.yaml new file mode 100644 index 00000000000..f06430a74b5 --- /dev/null +++ b/packages/google-cloud-shell/.github/.OwlBot.yaml @@ -0,0 +1,22 @@ +# Copyright 2021 Google LLC +# +# 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. +docker: + image: gcr.io/repo-automation-bots/owlbot-nodejs:latest + +deep-remove-regex: + - /owl-bot-staging + +deep-copy-regex: + - source: /google/cloud/shell/(.*)/.*-nodejs/(.*) + dest: /owl-bot-staging/$1/$2 diff --git a/packages/google-cloud-shell/.repo-metadata.json b/packages/google-cloud-shell/.repo-metadata.json new file mode 100644 index 00000000000..e580a31d467 --- /dev/null +++ b/packages/google-cloud-shell/.repo-metadata.json @@ -0,0 +1,14 @@ +{ + "name": "cloudshell", + "name_pretty": "Cloud Shell", + "product_documentation": "https://cloud.google.com/shell/", + "client_documentation": "https://cloud.google.com/shell", + "issue_tracker": "https://github.com/googleapis/nodejs-cloud-shell/issues", + "release_level": "BETA", + "language": "nodejs", + "repo": "googleapis/nodejs-cloud-shell", + "distribution_name": "@google-cloud/cloud-shell,", + "api_id": "shell.googleapis.com", + "requires_billing": true +} + diff --git a/packages/google-cloud-shell/CODE_OF_CONDUCT.md b/packages/google-cloud-shell/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..2add2547a81 --- /dev/null +++ b/packages/google-cloud-shell/CODE_OF_CONDUCT.md @@ -0,0 +1,94 @@ + +# Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +This Code of Conduct also applies outside the project spaces when the Project +Steward has a reasonable belief that an individual's behavior may have a +negative impact on the project or its community. + +## Conflict Resolution + +We do not believe that all conflict is bad; healthy debate and disagreement +often yield positive results. However, it is never okay to be disrespectful or +to engage in behavior that violates the project’s code of conduct. + +If you see someone violating the code of conduct, you are encouraged to address +the behavior directly with those involved. Many issues can be resolved quickly +and easily, and this gives people more control over the outcome of their +dispute. If you are unable to resolve the matter for any reason, or if the +behavior is threatening or harassing, report it. We are dedicated to providing +an environment where participants feel welcome and safe. + +Reports should be directed to *googleapis-stewards@google.com*, the +Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to +receive and address reported violations of the code of conduct. They will then +work with a committee consisting of representatives from the Open Source +Programs Office and the Google Open Source Strategy team. If for any reason you +are uncomfortable reaching out to the Project Steward, please email +opensource@google.com. + +We will investigate every complaint, but you may not receive a direct response. +We will use our discretion in determining when and how to follow up on reported +incidents, which may range from not taking action to permanent expulsion from +the project and project-sponsored spaces. We will notify the accused of the +report and provide them an opportunity to discuss it before any action is taken. +The identity of the reporter will be omitted from the details of the report +supplied to the accused. In potentially harmful situations, such as ongoing +harassment or threats to anyone's safety, we may take action without notice. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/packages/google-cloud-shell/CONTRIBUTING.md b/packages/google-cloud-shell/CONTRIBUTING.md new file mode 100644 index 00000000000..037ea8c7d63 --- /dev/null +++ b/packages/google-cloud-shell/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# How to become a contributor and submit your own code + +**Table of contents** + +* [Contributor License Agreements](#contributor-license-agreements) +* [Contributing a patch](#contributing-a-patch) +* [Running the tests](#running-the-tests) +* [Releasing the library](#releasing-the-library) + +## Contributor License Agreements + +We'd love to accept your sample apps and patches! Before we can take them, we +have to jump a couple of legal hurdles. + +Please fill out either the individual or corporate Contributor License Agreement +(CLA). + + * If you are an individual writing original source code and you're sure you + own the intellectual property, then you'll need to sign an [individual CLA](https://developers.google.com/open-source/cla/individual). + * If you work for a company that wants to allow you to contribute your work, + then you'll need to sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate). + +Follow either of the two links above to access the appropriate CLA and +instructions for how to sign and return it. Once we receive it, we'll be able to +accept your pull requests. + +## Contributing A Patch + +1. Submit an issue describing your proposed change to the repo in question. +1. The repo owner will respond to your issue promptly. +1. If your proposed change is accepted, and you haven't already done so, sign a + Contributor License Agreement (see details above). +1. Fork the desired repo, develop and test your code changes. +1. Ensure that your code adheres to the existing style in the code to which + you are contributing. +1. Ensure that your code has an appropriate set of tests which all pass. +1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. +1. Submit a pull request. + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Cloud Shell API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + + +## Running the tests + +1. [Prepare your environment for Node.js setup][setup]. + +1. Install dependencies: + + npm install + +1. Run the tests: + + # Run unit tests. + npm test + + # Run sample integration tests. + npm run samples-test + + # Run all system tests. + npm run system-test + +1. Lint (and maybe fix) any changes: + + npm run fix + +[setup]: https://cloud.google.com/nodejs/docs/setup +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=shell.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-cloud-shell/LICENSE b/packages/google-cloud-shell/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/packages/google-cloud-shell/LICENSE @@ -0,0 +1,202 @@ + + 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/packages/google-cloud-shell/README.md b/packages/google-cloud-shell/README.md new file mode 100644 index 00000000000..479bf32101e --- /dev/null +++ b/packages/google-cloud-shell/README.md @@ -0,0 +1,120 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [Cloud Shell: Node.js Client](https://github.com/googleapis/nodejs-cloud-shell) + +[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![npm version](https://img.shields.io/npm/v/@google-cloud/cloud-shell,.svg)](https://www.npmjs.org/package/@google-cloud/cloud-shell,) +[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-cloud-shell/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-cloud-shell) + + + + +cloudshell client for Node.js + + +A comprehensive list of changes in each version may be found in +[the CHANGELOG](https://github.com/googleapis/nodejs-cloud-shell/blob/master/CHANGELOG.md). + +* [Cloud Shell Node.js Client API Reference][client-docs] +* [Cloud Shell Documentation][product-docs] +* [github.com/googleapis/nodejs-cloud-shell](https://github.com/googleapis/nodejs-cloud-shell) + +Read more about the client libraries for Cloud APIs, including the older +Google APIs Client Libraries, in [Client Libraries Explained][explained]. + +[explained]: https://cloud.google.com/apis/docs/client-libraries-explained + +**Table of contents:** + + +* [Quickstart](#quickstart) + * [Before you begin](#before-you-begin) + * [Installing the client library](#installing-the-client-library) + + +* [Versioning](#versioning) +* [Contributing](#contributing) +* [License](#license) + +## Quickstart + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Cloud Shell API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + +### Installing the client library + +```bash +npm install @google-cloud/cloud-shell, +``` + + + + + +The [Cloud Shell Node.js Client API Reference][client-docs] documentation +also contains samples. + +## Supported Node.js Versions + +Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). +Libraries are compatible with all current _active_ and _maintenance_ versions of +Node.js. + +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. + +_Legacy Node.js versions are supported as a best effort:_ + +* Legacy versions will not be tested in continuous integration. +* Some security patches may not be able to be backported. +* Dependencies will not be kept up-to-date, and features will not be backported. + +#### Legacy tags available + +* `legacy-8`: install client libraries from this dist-tag for versions + compatible with Node.js 8. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + + + + + + +More Information: [Google Cloud Platform Launch Stages][launch_stages] + +[launch_stages]: https://cloud.google.com/terms/launch-stages + +## Contributing + +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-cloud-shell/blob/master/CONTRIBUTING.md). + +Please note that this `README.md`, the `samples/README.md`, +and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) +are generated from a central template. To edit one of these files, make an edit +to its template in this +[directory](https://github.com/googleapis/synthtool/tree/master/synthtool/gcp/templates/node_library). + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com/googleapis/nodejs-cloud-shell/blob/master/LICENSE) + +[client-docs]: https://cloud.google.com/shell +[product-docs]: https://cloud.google.com/shell/ +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=shell.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started diff --git a/packages/google-cloud-shell/package.json b/packages/google-cloud-shell/package.json new file mode 100644 index 00000000000..3c9a4340132 --- /dev/null +++ b/packages/google-cloud-shell/package.json @@ -0,0 +1,64 @@ +{ + "name": "@google-cloud/cloud-shell,", + "version": "0.1.0", + "description": "cloudshell client for Node.js", + "repository": "googleapis/googleapis/nodejs-cloud-shell", + "license": "Apache-2.0", + "author": "Google LLC", + "main": "build/src/index.js", + "files": [ + "build/src", + "build/protos" + ], + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google cloudshell", + "cloudshell", + "cloudshell service" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" + }, + "dependencies": { + "google-gax": "^2.12.0" + }, + "devDependencies": { + "@types/mocha": "^8.2.2", + "@types/node": "^14.14.44", + "@types/sinon": "^10.0.0", + "c8": "^7.7.2", + "gts": "^3.1.0", + "jsdoc": "^3.6.6", + "jsdoc-fresh": "^1.0.2", + "jsdoc-region-tag": "^1.0.6", + "linkinator": "^2.13.6", + "mocha": "^8.4.0", + "null-loader": "^4.0.1", + "pack-n-play": "^1.0.0-2", + "sinon": "^10.0.0", + "ts-loader": "^9.1.2", + "typescript": "^4.2.4", + "webpack": "^5.36.2", + "webpack-cli": "^4.7.0" + }, + "engines": { + "node": ">=v12.0.0" + } +} From cb6fc55b1dc1f70b7be1a8b299186e7a5e3985a3 Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Fri, 21 May 2021 20:32:35 +0000 Subject: [PATCH 019/254] remove .github files --- .../google-cloud-shell/.github/.OwlBot.yaml | 22 ------------------- 1 file changed, 22 deletions(-) delete mode 100644 packages/google-cloud-shell/.github/.OwlBot.yaml diff --git a/packages/google-cloud-shell/.github/.OwlBot.yaml b/packages/google-cloud-shell/.github/.OwlBot.yaml deleted file mode 100644 index f06430a74b5..00000000000 --- a/packages/google-cloud-shell/.github/.OwlBot.yaml +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2021 Google LLC -# -# 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. -docker: - image: gcr.io/repo-automation-bots/owlbot-nodejs:latest - -deep-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/shell/(.*)/.*-nodejs/(.*) - dest: /owl-bot-staging/$1/$2 From 8776e3afd2986e7abd555572bb9de898b3f6dddf Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 25 May 2021 18:00:11 +0200 Subject: [PATCH 020/254] chore(deps): update dependency sinon to v11 (#45) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^10.0.0` -> `^11.0.0`](https://renovatebot.com/diffs/npm/sinon/10.0.0/11.1.0) | [![age](https://badges.renovateapi.com/packages/npm/sinon/11.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/11.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/11.1.0/compatibility-slim/10.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/11.1.0/confidence-slim/10.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v11.1.0`](https://togithub.com/sinonjs/sinon/blob/master/CHANGELOG.md#​1110--2021-05-25) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v11.0.0...31be9a5d5a4762ef01cb195f29024616dfee9ce8) \================== - Add sinon.promise() implementation ([#​2369](https://togithub.com/sinonjs/sinon/issues/2369)) - Set wrappedMethod on getters/setters ([#​2378](https://togithub.com/sinonjs/sinon/issues/2378)) - \[Docs] Update fake-server usage & descriptions ([#​2365](https://togithub.com/sinonjs/sinon/issues/2365)) - Fake docs improvement ([#​2360](https://togithub.com/sinonjs/sinon/issues/2360)) - Update nise to 5.1.0 (fixed [#​2318](https://togithub.com/sinonjs/sinon/issues/2318)) ### [`v11.0.0`](https://togithub.com/sinonjs/sinon/blob/master/CHANGELOG.md#​1100--2021-05-24) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v10.0.1...v11.0.0) \================== - Explicitly use samsam 6.0.2 with fix for [#​2345](https://togithub.com/sinonjs/sinon/issues/2345) - Update most packages ([#​2371](https://togithub.com/sinonjs/sinon/issues/2371)) - Update compatibility docs ([#​2366](https://togithub.com/sinonjs/sinon/issues/2366)) - Update packages (includes breaking fake-timers change, see [#​2352](https://togithub.com/sinonjs/sinon/issues/2352)) - Warn of potential memory leaks ([#​2357](https://togithub.com/sinonjs/sinon/issues/2357)) - Fix clock test errors ### [`v10.0.1`](https://togithub.com/sinonjs/sinon/blob/master/CHANGELOG.md#​1001--2021-04-08) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v10.0.0...v10.0.1) \================== - Upgrade sinon components (bumps y18n to 4.0.1) - Bump y18n from 4.0.0 to 4.0.1
--- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻️ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-policy-troubleshooter). --- packages/google-cloud-policytroubleshooter/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-policytroubleshooter/package.json b/packages/google-cloud-policytroubleshooter/package.json index 2f9a173e8c4..037095be026 100644 --- a/packages/google-cloud-policytroubleshooter/package.json +++ b/packages/google-cloud-policytroubleshooter/package.json @@ -54,7 +54,7 @@ "mocha": "^8.2.1", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", - "sinon": "^10.0.0", + "sinon": "^11.0.0", "ts-loader": "^9.0.0", "typescript": "^4.1.2", "webpack": "^5.9.0", From 65240ef65f70418017de3a8814750dd82d9ca43c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 25 May 2021 20:50:13 +0000 Subject: [PATCH 021/254] fix: GoogleAdsError missing using generator version after 1.3.0 (#46) [PR](https://github.com/googleapis/gapic-generator-typescript/pull/878) within updated gapic-generator-typescript version 1.4.0 Committer: @summer-ji-eng PiperOrigin-RevId: 375759421 Source-Link: https://github.com/googleapis/googleapis/commit/95fa72fdd0d69b02d72c33b37d1e4cc66d4b1446 Source-Link: https://github.com/googleapis/googleapis-gen/commit/f40a34377ad488a7c2bc3992b3c8d5faf5a15c46 --- .../src/v1/iam_checker_client.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts b/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts index 96bd8c0df27..6f67df81d95 100644 --- a/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts +++ b/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts @@ -132,6 +132,8 @@ export class IamCheckerClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { clientHeader.push(`${opts.libName}/${opts.libVersion}`); From 34c7b8698e219b81132d127feaefed5b02a68b2f Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 25 May 2021 18:18:43 -0400 Subject: [PATCH 022/254] chore: release 1.0.2 (#47) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-policytroubleshooter/CHANGELOG.md | 7 +++++++ packages/google-cloud-policytroubleshooter/package.json | 2 +- .../google-cloud-policytroubleshooter/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-policytroubleshooter/CHANGELOG.md b/packages/google-cloud-policytroubleshooter/CHANGELOG.md index 6858d2aefe6..643f0f86d9f 100644 --- a/packages/google-cloud-policytroubleshooter/CHANGELOG.md +++ b/packages/google-cloud-policytroubleshooter/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.0.2](https://www.github.com/googleapis/nodejs-policy-troubleshooter/compare/v1.0.1...v1.0.2) (2021-05-25) + + +### Bug Fixes + +* GoogleAdsError missing using generator version after 1.3.0 ([#46](https://www.github.com/googleapis/nodejs-policy-troubleshooter/issues/46)) ([59e135f](https://www.github.com/googleapis/nodejs-policy-troubleshooter/commit/59e135ff3cf2e39f0b8805ecd74bd5a8de1bdb93)) + ### [1.0.1](https://www.github.com/googleapis/nodejs-policy-troubleshooter/compare/v1.0.0...v1.0.1) (2021-05-12) diff --git a/packages/google-cloud-policytroubleshooter/package.json b/packages/google-cloud-policytroubleshooter/package.json index 037095be026..a6f2a24819a 100644 --- a/packages/google-cloud-policytroubleshooter/package.json +++ b/packages/google-cloud-policytroubleshooter/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/policy-troubleshooter", - "version": "1.0.1", + "version": "1.0.2", "description": "Policytroubleshooter client for Node.js", "repository": "googleapis/nodejs-policy-troubleshooter", "license": "Apache-2.0", diff --git a/packages/google-cloud-policytroubleshooter/samples/package.json b/packages/google-cloud-policytroubleshooter/samples/package.json index e7c9b06e73d..27f4524b5df 100644 --- a/packages/google-cloud-policytroubleshooter/samples/package.json +++ b/packages/google-cloud-policytroubleshooter/samples/package.json @@ -14,7 +14,7 @@ }, "dependencies": { "@google-cloud/local-auth": "^1.0.0", - "@google-cloud/policy-troubleshooter": "^1.0.1" + "@google-cloud/policy-troubleshooter": "^1.0.2" }, "devDependencies": { "c8": "^7.1.0", From 8a6960923d19be8ae543b4fba8fe1f83ab9221d6 Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Tue, 1 Jun 2021 23:05:46 +0000 Subject: [PATCH 023/254] feat: add initial template samples --- packages/google-cloud-shell/.eslintignore | 6 + packages/google-cloud-shell/.eslintrc.json | 3 + packages/google-cloud-shell/.gitattributes | 4 + .../google-cloud-shell/.github/.OwlBot.yaml | 22 + packages/google-cloud-shell/.mocharc.js | 29 + packages/google-cloud-shell/.nycrc | 24 + packages/google-cloud-shell/.prettierignore | 6 + packages/google-cloud-shell/.prettierrc.js | 17 + .../google-cloud-shell/.repo-metadata.json | 5 +- packages/google-cloud-shell/README.md | 6 +- .../google-cloud-shell/api-extractor.json | 369 + .../google-cloud-shell/linkinator.config.json | 1 + packages/google-cloud-shell/package.json | 65 +- .../google/cloud/shell/v1/cloudshell.proto | 388 + .../google-cloud-shell/protos/protos.d.ts | 6983 +++++++ packages/google-cloud-shell/protos/protos.js | 17386 ++++++++++++++++ .../google-cloud-shell/protos/protos.json | 1778 ++ .../src/v1/cloud_shell_service_client.ts | 879 + .../v1/cloud_shell_service_client_config.json | 64 + .../v1/cloud_shell_service_proto_list.json | 3 + .../src/v1/gapic_metadata.json | 73 + packages/google-cloud-shell/src/v1/index.ts | 19 + .../system-test/fixtures/sample/src/index.js | 27 + .../system-test/fixtures/sample/src/index.ts | 32 + .../google-cloud-shell/system-test/install.ts | 49 + .../test/gapic_cloud_shell_service_v1.ts | 837 + packages/google-cloud-shell/tsconfig.json | 19 + packages/google-cloud-shell/v1/README.md | 1 + .../v1/linkinator.config.json | 10 + packages/google-cloud-shell/v1/package.json | 64 + .../google/cloud/shell/v1/cloudshell.proto | 388 + packages/google-cloud-shell/v1/src/index.ts | 25 + .../v1/src/v1/cloud_shell_service_client.ts | 879 + .../v1/cloud_shell_service_client_config.json | 64 + .../v1/cloud_shell_service_proto_list.json | 3 + .../v1/src/v1/gapic_metadata.json | 73 + .../google-cloud-shell/v1/src/v1/index.ts | 19 + .../system-test/fixtures/sample/src/index.js | 27 + .../system-test/fixtures/sample/src/index.ts | 32 + .../v1/system-test/install.ts | 49 + .../v1/test/gapic_cloud_shell_service_v1.ts | 837 + packages/google-cloud-shell/v1/tsconfig.json | 19 + .../google-cloud-shell/v1/webpack.config.js | 64 + packages/google-cloud-shell/webpack.config.js | 64 + 44 files changed, 31643 insertions(+), 69 deletions(-) create mode 100644 packages/google-cloud-shell/.eslintignore create mode 100644 packages/google-cloud-shell/.eslintrc.json create mode 100644 packages/google-cloud-shell/.gitattributes create mode 100644 packages/google-cloud-shell/.github/.OwlBot.yaml create mode 100644 packages/google-cloud-shell/.mocharc.js create mode 100644 packages/google-cloud-shell/.nycrc create mode 100644 packages/google-cloud-shell/.prettierignore create mode 100644 packages/google-cloud-shell/.prettierrc.js create mode 100644 packages/google-cloud-shell/api-extractor.json create mode 100644 packages/google-cloud-shell/linkinator.config.json create mode 100644 packages/google-cloud-shell/protos/google/cloud/shell/v1/cloudshell.proto create mode 100644 packages/google-cloud-shell/protos/protos.d.ts create mode 100644 packages/google-cloud-shell/protos/protos.js create mode 100644 packages/google-cloud-shell/protos/protos.json create mode 100644 packages/google-cloud-shell/src/v1/cloud_shell_service_client.ts create mode 100644 packages/google-cloud-shell/src/v1/cloud_shell_service_client_config.json create mode 100644 packages/google-cloud-shell/src/v1/cloud_shell_service_proto_list.json create mode 100644 packages/google-cloud-shell/src/v1/gapic_metadata.json create mode 100644 packages/google-cloud-shell/src/v1/index.ts create mode 100644 packages/google-cloud-shell/system-test/fixtures/sample/src/index.js create mode 100644 packages/google-cloud-shell/system-test/fixtures/sample/src/index.ts create mode 100644 packages/google-cloud-shell/system-test/install.ts create mode 100644 packages/google-cloud-shell/test/gapic_cloud_shell_service_v1.ts create mode 100644 packages/google-cloud-shell/tsconfig.json create mode 100644 packages/google-cloud-shell/v1/README.md create mode 100644 packages/google-cloud-shell/v1/linkinator.config.json create mode 100644 packages/google-cloud-shell/v1/package.json create mode 100644 packages/google-cloud-shell/v1/protos/google/cloud/shell/v1/cloudshell.proto create mode 100644 packages/google-cloud-shell/v1/src/index.ts create mode 100644 packages/google-cloud-shell/v1/src/v1/cloud_shell_service_client.ts create mode 100644 packages/google-cloud-shell/v1/src/v1/cloud_shell_service_client_config.json create mode 100644 packages/google-cloud-shell/v1/src/v1/cloud_shell_service_proto_list.json create mode 100644 packages/google-cloud-shell/v1/src/v1/gapic_metadata.json create mode 100644 packages/google-cloud-shell/v1/src/v1/index.ts create mode 100644 packages/google-cloud-shell/v1/system-test/fixtures/sample/src/index.js create mode 100644 packages/google-cloud-shell/v1/system-test/fixtures/sample/src/index.ts create mode 100644 packages/google-cloud-shell/v1/system-test/install.ts create mode 100644 packages/google-cloud-shell/v1/test/gapic_cloud_shell_service_v1.ts create mode 100644 packages/google-cloud-shell/v1/tsconfig.json create mode 100644 packages/google-cloud-shell/v1/webpack.config.js create mode 100644 packages/google-cloud-shell/webpack.config.js diff --git a/packages/google-cloud-shell/.eslintignore b/packages/google-cloud-shell/.eslintignore new file mode 100644 index 00000000000..9340ad9b86d --- /dev/null +++ b/packages/google-cloud-shell/.eslintignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-cloud-shell/.eslintrc.json b/packages/google-cloud-shell/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/packages/google-cloud-shell/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/packages/google-cloud-shell/.gitattributes b/packages/google-cloud-shell/.gitattributes new file mode 100644 index 00000000000..33739cb74e4 --- /dev/null +++ b/packages/google-cloud-shell/.gitattributes @@ -0,0 +1,4 @@ +*.ts text eol=lf +*.js text eol=lf +protos/* linguist-generated +**/api-extractor.json linguist-language=JSON-with-Comments diff --git a/packages/google-cloud-shell/.github/.OwlBot.yaml b/packages/google-cloud-shell/.github/.OwlBot.yaml new file mode 100644 index 00000000000..f06430a74b5 --- /dev/null +++ b/packages/google-cloud-shell/.github/.OwlBot.yaml @@ -0,0 +1,22 @@ +# Copyright 2021 Google LLC +# +# 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. +docker: + image: gcr.io/repo-automation-bots/owlbot-nodejs:latest + +deep-remove-regex: + - /owl-bot-staging + +deep-copy-regex: + - source: /google/cloud/shell/(.*)/.*-nodejs/(.*) + dest: /owl-bot-staging/$1/$2 diff --git a/packages/google-cloud-shell/.mocharc.js b/packages/google-cloud-shell/.mocharc.js new file mode 100644 index 00000000000..0b600509bed --- /dev/null +++ b/packages/google-cloud-shell/.mocharc.js @@ -0,0 +1,29 @@ +// Copyright 2020 Google LLC +// +// 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. +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000, + "recursive": true +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} +module.exports = config diff --git a/packages/google-cloud-shell/.nycrc b/packages/google-cloud-shell/.nycrc new file mode 100644 index 00000000000..b18d5472b62 --- /dev/null +++ b/packages/google-cloud-shell/.nycrc @@ -0,0 +1,24 @@ +{ + "report-dir": "./.coverage", + "reporter": ["text", "lcov"], + "exclude": [ + "**/*-test", + "**/.coverage", + "**/apis", + "**/benchmark", + "**/conformance", + "**/docs", + "**/samples", + "**/scripts", + "**/protos", + "**/test", + "**/*.d.ts", + ".jsdoc.js", + "**/.jsdoc.js", + "karma.conf.js", + "webpack-tests.config.js", + "webpack.config.js" + ], + "exclude-after-remap": false, + "all": true +} diff --git a/packages/google-cloud-shell/.prettierignore b/packages/google-cloud-shell/.prettierignore new file mode 100644 index 00000000000..9340ad9b86d --- /dev/null +++ b/packages/google-cloud-shell/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-cloud-shell/.prettierrc.js b/packages/google-cloud-shell/.prettierrc.js new file mode 100644 index 00000000000..d1b95106f4c --- /dev/null +++ b/packages/google-cloud-shell/.prettierrc.js @@ -0,0 +1,17 @@ +// Copyright 2020 Google LLC +// +// 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 +// +// https://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. + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/packages/google-cloud-shell/.repo-metadata.json b/packages/google-cloud-shell/.repo-metadata.json index e580a31d467..decd26ff8d8 100644 --- a/packages/google-cloud-shell/.repo-metadata.json +++ b/packages/google-cloud-shell/.repo-metadata.json @@ -2,13 +2,14 @@ "name": "cloudshell", "name_pretty": "Cloud Shell", "product_documentation": "https://cloud.google.com/shell/", - "client_documentation": "https://cloud.google.com/shell", + "client_documentation": "https://cloud.google.com/shell/docs/reference/rest", "issue_tracker": "https://github.com/googleapis/nodejs-cloud-shell/issues", "release_level": "BETA", "language": "nodejs", "repo": "googleapis/nodejs-cloud-shell", - "distribution_name": "@google-cloud/cloud-shell,", + "distribution_name": "@google-cloud/cloud-shell", "api_id": "shell.googleapis.com", + "default_version": "", "requires_billing": true } diff --git a/packages/google-cloud-shell/README.md b/packages/google-cloud-shell/README.md index 479bf32101e..d0624d1c1fd 100644 --- a/packages/google-cloud-shell/README.md +++ b/packages/google-cloud-shell/README.md @@ -5,7 +5,7 @@ # [Cloud Shell: Node.js Client](https://github.com/googleapis/nodejs-cloud-shell) [![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) -[![npm version](https://img.shields.io/npm/v/@google-cloud/cloud-shell,.svg)](https://www.npmjs.org/package/@google-cloud/cloud-shell,) +[![npm version](https://img.shields.io/npm/v/@google-cloud/cloud-shell.svg)](https://www.npmjs.org/package/@google-cloud/cloud-shell) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-cloud-shell/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-cloud-shell) @@ -51,7 +51,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. ### Installing the client library ```bash -npm install @google-cloud/cloud-shell, +npm install @google-cloud/cloud-shell ``` @@ -111,7 +111,7 @@ Apache Version 2.0 See [LICENSE](https://github.com/googleapis/nodejs-cloud-shell/blob/master/LICENSE) -[client-docs]: https://cloud.google.com/shell +[client-docs]: https://cloud.google.com/shell/docs/reference/rest [product-docs]: https://cloud.google.com/shell/ [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png [projects]: https://console.cloud.google.com/project diff --git a/packages/google-cloud-shell/api-extractor.json b/packages/google-cloud-shell/api-extractor.json new file mode 100644 index 00000000000..de228294b23 --- /dev/null +++ b/packages/google-cloud-shell/api-extractor.json @@ -0,0 +1,369 @@ +/** + * Config file for API Extractor. For more info, please visit: https://api-extractor.com + */ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + + /** + * Optionally specifies another JSON config file that this file extends from. This provides a way for + * standard settings to be shared across multiple projects. + * + * If the path starts with "./" or "../", the path is resolved relative to the folder of the file that contains + * the "extends" field. Otherwise, the first path segment is interpreted as an NPM package name, and will be + * resolved using NodeJS require(). + * + * SUPPORTED TOKENS: none + * DEFAULT VALUE: "" + */ + // "extends": "./shared/api-extractor-base.json" + // "extends": "my-package/include/api-extractor-base.json" + + /** + * Determines the "" token that can be used with other config file settings. The project folder + * typically contains the tsconfig.json and package.json config files, but the path is user-defined. + * + * The path is resolved relative to the folder of the config file that contains the setting. + * + * The default value for "projectFolder" is the token "", which means the folder is determined by traversing + * parent folders, starting from the folder containing api-extractor.json, and stopping at the first folder + * that contains a tsconfig.json file. If a tsconfig.json file cannot be found in this way, then an error + * will be reported. + * + * SUPPORTED TOKENS: + * DEFAULT VALUE: "" + */ + // "projectFolder": "..", + + /** + * (REQUIRED) Specifies the .d.ts file to be used as the starting point for analysis. API Extractor + * analyzes the symbols exported by this module. + * + * The file extension must be ".d.ts" and not ".ts". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + */ + "mainEntryPointFilePath": "/protos/protos.d.ts", + + /** + * A list of NPM package names whose exports should be treated as part of this package. + * + * For example, suppose that Webpack is used to generate a distributed bundle for the project "library1", + * and another NPM package "library2" is embedded in this bundle. Some types from library2 may become part + * of the exported API for library1, but by default API Extractor would generate a .d.ts rollup that explicitly + * imports library2. To avoid this, we can specify: + * + * "bundledPackages": [ "library2" ], + * + * This would direct API Extractor to embed those types directly in the .d.ts rollup, as if they had been + * local files for library1. + */ + "bundledPackages": [ ], + + /** + * Determines how the TypeScript compiler engine will be invoked by API Extractor. + */ + "compiler": { + /** + * Specifies the path to the tsconfig.json file to be used by API Extractor when analyzing the project. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * Note: This setting will be ignored if "overrideTsconfig" is used. + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/tsconfig.json" + */ + // "tsconfigFilePath": "/tsconfig.json", + + /** + * Provides a compiler configuration that will be used instead of reading the tsconfig.json file from disk. + * The object must conform to the TypeScript tsconfig schema: + * + * http://json.schemastore.org/tsconfig + * + * If omitted, then the tsconfig.json file will be read from the "projectFolder". + * + * DEFAULT VALUE: no overrideTsconfig section + */ + // "overrideTsconfig": { + // . . . + // } + + /** + * This option causes the compiler to be invoked with the --skipLibCheck option. This option is not recommended + * and may cause API Extractor to produce incomplete or incorrect declarations, but it may be required when + * dependencies contain declarations that are incompatible with the TypeScript engine that API Extractor uses + * for its analysis. Where possible, the underlying issue should be fixed rather than relying on skipLibCheck. + * + * DEFAULT VALUE: false + */ + // "skipLibCheck": true, + }, + + /** + * Configures how the API report file (*.api.md) will be generated. + */ + "apiReport": { + /** + * (REQUIRED) Whether to generate an API report. + */ + "enabled": true, + + /** + * The filename for the API report files. It will be combined with "reportFolder" or "reportTempFolder" to produce + * a full file path. + * + * The file extension should be ".api.md", and the string should not contain a path separator such as "\" or "/". + * + * SUPPORTED TOKENS: , + * DEFAULT VALUE: ".api.md" + */ + // "reportFileName": ".api.md", + + /** + * Specifies the folder where the API report file is written. The file name portion is determined by + * the "reportFileName" setting. + * + * The API report file is normally tracked by Git. Changes to it can be used to trigger a branch policy, + * e.g. for an API review. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/etc/" + */ + // "reportFolder": "/etc/", + + /** + * Specifies the folder where the temporary report file is written. The file name portion is determined by + * the "reportFileName" setting. + * + * After the temporary file is written to disk, it is compared with the file in the "reportFolder". + * If they are different, a production build will fail. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/temp/" + */ + // "reportTempFolder": "/temp/" + }, + + /** + * Configures how the doc model file (*.api.json) will be generated. + */ + "docModel": { + /** + * (REQUIRED) Whether to generate a doc model file. + */ + "enabled": true, + + /** + * The output path for the doc model file. The file extension should be ".api.json". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/temp/.api.json" + */ + // "apiJsonFilePath": "/temp/.api.json" + }, + + /** + * Configures how the .d.ts rollup file will be generated. + */ + "dtsRollup": { + /** + * (REQUIRED) Whether to generate the .d.ts rollup file. + */ + "enabled": true, + + /** + * Specifies the output path for a .d.ts rollup file to be generated without any trimming. + * This file will include all declarations that are exported by the main entry point. + * + * If the path is an empty string, then this file will not be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/dist/.d.ts" + */ + // "untrimmedFilePath": "/dist/.d.ts", + + /** + * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "beta" release. + * This file will include only declarations that are marked as "@public" or "@beta". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "betaTrimmedFilePath": "/dist/-beta.d.ts", + + + /** + * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "public" release. + * This file will include only declarations that are marked as "@public". + * + * If the path is an empty string, then this file will not be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "publicTrimmedFilePath": "/dist/-public.d.ts", + + /** + * When a declaration is trimmed, by default it will be replaced by a code comment such as + * "Excluded from this release type: exampleMember". Set "omitTrimmingComments" to true to remove the + * declaration completely. + * + * DEFAULT VALUE: false + */ + // "omitTrimmingComments": true + }, + + /** + * Configures how the tsdoc-metadata.json file will be generated. + */ + "tsdocMetadata": { + /** + * Whether to generate the tsdoc-metadata.json file. + * + * DEFAULT VALUE: true + */ + // "enabled": true, + + /** + * Specifies where the TSDoc metadata file should be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * The default value is "", which causes the path to be automatically inferred from the "tsdocMetadata", + * "typings" or "main" fields of the project's package.json. If none of these fields are set, the lookup + * falls back to "tsdoc-metadata.json" in the package folder. + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "tsdocMetadataFilePath": "/dist/tsdoc-metadata.json" + }, + + /** + * Specifies what type of newlines API Extractor should use when writing output files. By default, the output files + * will be written with Windows-style newlines. To use POSIX-style newlines, specify "lf" instead. + * To use the OS's default newline kind, specify "os". + * + * DEFAULT VALUE: "crlf" + */ + // "newlineKind": "crlf", + + /** + * Configures how API Extractor reports error and warning messages produced during analysis. + * + * There are three sources of messages: compiler messages, API Extractor messages, and TSDoc messages. + */ + "messages": { + /** + * Configures handling of diagnostic messages reported by the TypeScript compiler engine while analyzing + * the input .d.ts files. + * + * TypeScript message identifiers start with "TS" followed by an integer. For example: "TS2551" + * + * DEFAULT VALUE: A single "default" entry with logLevel=warning. + */ + "compilerMessageReporting": { + /** + * Configures the default routing for messages that don't match an explicit rule in this table. + */ + "default": { + /** + * Specifies whether the message should be written to the the tool's output log. Note that + * the "addToApiReportFile" property may supersede this option. + * + * Possible values: "error", "warning", "none" + * + * Errors cause the build to fail and return a nonzero exit code. Warnings cause a production build fail + * and return a nonzero exit code. For a non-production build (e.g. when "api-extractor run" includes + * the "--local" option), the warning is displayed but the build will not fail. + * + * DEFAULT VALUE: "warning" + */ + "logLevel": "warning", + + /** + * When addToApiReportFile is true: If API Extractor is configured to write an API report file (.api.md), + * then the message will be written inside that file; otherwise, the message is instead logged according to + * the "logLevel" option. + * + * DEFAULT VALUE: false + */ + // "addToApiReportFile": false + }, + + // "TS2551": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + }, + + /** + * Configures handling of messages reported by API Extractor during its analysis. + * + * API Extractor message identifiers start with "ae-". For example: "ae-extra-release-tag" + * + * DEFAULT VALUE: See api-extractor-defaults.json for the complete table of extractorMessageReporting mappings + */ + "extractorMessageReporting": { + "default": { + "logLevel": "warning", + // "addToApiReportFile": false + }, + + // "ae-extra-release-tag": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + }, + + /** + * Configures handling of messages reported by the TSDoc parser when analyzing code comments. + * + * TSDoc message identifiers start with "tsdoc-". For example: "tsdoc-link-tag-unescaped-text" + * + * DEFAULT VALUE: A single "default" entry with logLevel=warning. + */ + "tsdocMessageReporting": { + "default": { + "logLevel": "warning", + // "addToApiReportFile": false + } + + // "tsdoc-link-tag-unescaped-text": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + } + } + +} diff --git a/packages/google-cloud-shell/linkinator.config.json b/packages/google-cloud-shell/linkinator.config.json new file mode 100644 index 00000000000..0947c2e0e5b --- /dev/null +++ b/packages/google-cloud-shell/linkinator.config.json @@ -0,0 +1 @@ +{"recurse":true,"skip":["https://codecov.io/gh/googleapis/","www.googleapis.com","img.shields.io"],"silent":true,"concurrency":10} \ No newline at end of file diff --git a/packages/google-cloud-shell/package.json b/packages/google-cloud-shell/package.json index 3c9a4340132..5d2c0344409 100644 --- a/packages/google-cloud-shell/package.json +++ b/packages/google-cloud-shell/package.json @@ -1,64 +1 @@ -{ - "name": "@google-cloud/cloud-shell,", - "version": "0.1.0", - "description": "cloudshell client for Node.js", - "repository": "googleapis/googleapis/nodejs-cloud-shell", - "license": "Apache-2.0", - "author": "Google LLC", - "main": "build/src/index.js", - "files": [ - "build/src", - "build/protos" - ], - "keywords": [ - "google apis client", - "google api client", - "google apis", - "google api", - "google", - "google cloud platform", - "google cloud", - "cloud", - "google cloudshell", - "cloudshell", - "cloudshell service" - ], - "scripts": { - "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/", - "compile-protos": "compileProtos src", - "docs": "jsdoc -c .jsdoc.js", - "predocs-test": "npm run docs", - "docs-test": "linkinator docs", - "fix": "gts fix", - "lint": "gts check", - "prepare": "npm run compile-protos && npm run compile", - "system-test": "c8 mocha build/system-test", - "test": "c8 mocha build/test" - }, - "dependencies": { - "google-gax": "^2.12.0" - }, - "devDependencies": { - "@types/mocha": "^8.2.2", - "@types/node": "^14.14.44", - "@types/sinon": "^10.0.0", - "c8": "^7.7.2", - "gts": "^3.1.0", - "jsdoc": "^3.6.6", - "jsdoc-fresh": "^1.0.2", - "jsdoc-region-tag": "^1.0.6", - "linkinator": "^2.13.6", - "mocha": "^8.4.0", - "null-loader": "^4.0.1", - "pack-n-play": "^1.0.0-2", - "sinon": "^10.0.0", - "ts-loader": "^9.1.2", - "typescript": "^4.2.4", - "webpack": "^5.36.2", - "webpack-cli": "^4.7.0" - }, - "engines": { - "node": ">=v12.0.0" - } -} +{"name":"@google-cloud/cloud-shell","version":"0.1.0","description":"cloudshell client for Node.js","repository":"googleapis/googleapis/nodejs-cloud-shell","license":"Apache-2.0","author":"Google LLC","main":"build/src/index.js","files":["build/src","build/protos"],"keywords":["google apis client","google api client","google apis","google api","google","google cloud platform","google cloud","cloud","google cloudshell","cloudshell","cloudshell service"],"scripts":{"clean":"gts clean","compile":"tsc -p . && cp -r protos build/","compile-protos":"compileProtos src","docs":"jsdoc -c .jsdoc.js","predocs-test":"npm run docs","docs-test":"linkinator docs","fix":"gts fix","lint":"gts check","prepare":"npm run compile-protos && npm run compile","system-test":"c8 mocha build/system-test","test":"c8 mocha build/test","samples-test":"cd samples/ && npm link ../ && npm test","prelint":"cd samples; npm link ../; npm i"},"dependencies":{"google-gax":"^2.12.0"},"devDependencies":{"@types/mocha":"^8.2.2","@types/node":"^14.14.44","@types/sinon":"^10.0.0","c8":"^7.7.2","gts":"^3.1.0","jsdoc":"^3.6.6","jsdoc-fresh":"^1.0.2","jsdoc-region-tag":"^1.0.6","linkinator":"^2.13.6","mocha":"^8.4.0","null-loader":"^4.0.1","pack-n-play":"^1.0.0-2","sinon":"^10.0.0","ts-loader":"^9.1.2","typescript":"^4.2.4","webpack":"^5.36.2","webpack-cli":"^4.7.0"},"engines":{"node":">=v12.0.0"}} \ No newline at end of file diff --git a/packages/google-cloud-shell/protos/google/cloud/shell/v1/cloudshell.proto b/packages/google-cloud-shell/protos/google/cloud/shell/v1/cloudshell.proto new file mode 100644 index 00000000000..f4b35b171cd --- /dev/null +++ b/packages/google-cloud-shell/protos/google/cloud/shell/v1/cloudshell.proto @@ -0,0 +1,388 @@ +// Copyright 2021 Google LLC +// +// 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. + +syntax = "proto3"; + +package google.cloud.shell.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/shell/v1;shell"; +option java_multiple_files = true; +option java_outer_classname = "CloudShellProto"; +option java_package = "com.google.cloud.shell.v1"; + +// API for interacting with Google Cloud Shell. Each user of Cloud Shell has at +// least one environment, which has the ID "default". Environment consists of a +// Docker image defining what is installed on the environment and a home +// directory containing the user's data that will remain across sessions. +// Clients use this API to start and fetch information about their environment, +// which can then be used to connect to that environment via a separate SSH +// client. +service CloudShellService { + option (google.api.default_host) = "cloudshell.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Gets an environment. Returns NOT_FOUND if the environment does not exist. + rpc GetEnvironment(GetEnvironmentRequest) returns (Environment) { + option (google.api.http) = { + get: "/v1/{name=users/*/environments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Starts an existing environment, allowing clients to connect to it. The + // returned operation will contain an instance of StartEnvironmentMetadata in + // its metadata field. Users can wait for the environment to start by polling + // this operation via GetOperation. Once the environment has finished starting + // and is ready to accept connections, the operation will contain a + // StartEnvironmentResponse in its response field. + rpc StartEnvironment(StartEnvironmentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=users/*/environments/*}:start" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "StartEnvironmentResponse" + metadata_type: "StartEnvironmentMetadata" + }; + } + + // Sends OAuth credentials to a running environment on behalf of a user. When + // this completes, the environment will be authorized to run various Google + // Cloud command line tools without requiring the user to manually + // authenticate. + rpc AuthorizeEnvironment(AuthorizeEnvironmentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=users/*/environments/*}:authorize" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "AuthorizeEnvironmentResponse" + metadata_type: "AuthorizeEnvironmentMetadata" + }; + } + + // Adds a public SSH key to an environment, allowing clients with the + // corresponding private key to connect to that environment via SSH. If a key + // with the same content already exists, this will error with ALREADY_EXISTS. + rpc AddPublicKey(AddPublicKeyRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{environment=users/*/environments/*}:addPublicKey" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "AddPublicKeyResponse" + metadata_type: "AddPublicKeyMetadata" + }; + } + + // Removes a public SSH key from an environment. Clients will no longer be + // able to connect to the environment using the corresponding private key. + // If a key with the same content is not present, this will error with + // NOT_FOUND. + rpc RemovePublicKey(RemovePublicKeyRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{environment=users/*/environments/*}:removePublicKey" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "RemovePublicKeyResponse" + metadata_type: "RemovePublicKeyMetadata" + }; + } +} + +// A Cloud Shell environment, which is defined as the combination of a Docker +// image specifying what is installed on the environment and a home directory +// containing the user's data that will remain across sessions. Each user has +// at least an environment with the ID "default". +message Environment { + option (google.api.resource) = { + type: "cloudshell.googleapis.com/Environment" + pattern: "users/{user}/environments/{environment}" + }; + + // Possible execution states for an environment. + enum State { + // The environment's states is unknown. + STATE_UNSPECIFIED = 0; + + // The environment is not running and can't be connected to. Starting the + // environment will transition it to the PENDING state. + SUSPENDED = 1; + + // The environment is being started but is not yet ready to accept + // connections. + PENDING = 2; + + // The environment is running and ready to accept connections. It will + // automatically transition back to DISABLED after a period of inactivity or + // if another environment is started. + RUNNING = 3; + + // The environment is being deleted and can't be connected to. + DELETING = 4; + } + + // Immutable. Full name of this resource, in the format + // `users/{owner_email}/environments/{environment_id}`. `{owner_email}` is the + // email address of the user to whom this environment belongs, and + // `{environment_id}` is the identifier of this environment. For example, + // `users/someone@example.com/environments/default`. + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The environment's identifier, unique among the user's + // environments. + string id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Immutable. Full path to the Docker image used to run this environment, e.g. + // "gcr.io/dev-con/cloud-devshell:latest". + string docker_image = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Output only. Current execution state of this environment. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Host to which clients can connect to initiate HTTPS or WSS + // connections with the environment. + string web_host = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Username that clients should use when initiating SSH sessions + // with the environment. + string ssh_username = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Host to which clients can connect to initiate SSH sessions + // with the environment. + string ssh_host = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Port to which clients can connect to initiate SSH sessions + // with the environment. + int32 ssh_port = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Public keys associated with the environment. Clients can + // connect to this environment via SSH only if they possess a private key + // corresponding to at least one of these public keys. Keys can be added to or + // removed from the environment using the AddPublicKey and RemovePublicKey + // methods. + repeated string public_keys = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for +// [GetEnvironment][google.cloud.shell.v1.CloudShellService.GetEnvironment]. +message GetEnvironmentRequest { + // Required. Name of the requested resource, for example `users/me/environments/default` + // or `users/someone@example.com/environments/default`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudshell.googleapis.com/Environment" + } + ]; +} + +// Message included in the metadata field of operations returned from +// [CreateEnvironment][google.cloud.shell.v1.CloudShellService.CreateEnvironment]. +message CreateEnvironmentMetadata { + +} + +// Message included in the metadata field of operations returned from +// [DeleteEnvironment][google.cloud.shell.v1.CloudShellService.DeleteEnvironment]. +message DeleteEnvironmentMetadata { + +} + +// Request message for +// [StartEnvironment][google.cloud.shell.v1.CloudShellService.StartEnvironment]. +message StartEnvironmentRequest { + // Name of the resource that should be started, for example + // `users/me/environments/default` or + // `users/someone@example.com/environments/default`. + string name = 1; + + // The initial access token passed to the environment. If this is present and + // valid, the environment will be pre-authenticated with gcloud so that the + // user can run gcloud commands in Cloud Shell without having to log in. This + // code can be updated later by calling AuthorizeEnvironment. + string access_token = 2; + + // Public keys that should be added to the environment before it is started. + repeated string public_keys = 3; +} + +// Request message for +// [AuthorizeEnvironment][google.cloud.shell.v1.CloudShellService.AuthorizeEnvironment]. +message AuthorizeEnvironmentRequest { + // Name of the resource that should receive the credentials, for example + // `users/me/environments/default` or + // `users/someone@example.com/environments/default`. + string name = 1; + + // The OAuth access token that should be sent to the environment. + string access_token = 2; + + // The OAuth ID token that should be sent to the environment. + string id_token = 4; + + // The time when the credentials expire. If not set, defaults to one hour from + // when the server received the request. + google.protobuf.Timestamp expire_time = 3; +} + +// Response message for +// [AuthorizeEnvironment][google.cloud.shell.v1.CloudShellService.AuthorizeEnvironment]. +message AuthorizeEnvironmentResponse { + +} + +// Message included in the metadata field of operations returned from +// [AuthorizeEnvironment][google.cloud.shell.v1.CloudShellService.AuthorizeEnvironment]. +message AuthorizeEnvironmentMetadata { + +} + +// Message included in the metadata field of operations returned from +// [StartEnvironment][google.cloud.shell.v1.CloudShellService.StartEnvironment]. +message StartEnvironmentMetadata { + // Possible states an environment might transition between during startup. + // These states are not normally actionable by clients, but may be used to + // show a progress message to the user. An environment won't necessarily go + // through all of these states when starting. More states are likely to be + // added in the future. + enum State { + // The environment's start state is unknown. + STATE_UNSPECIFIED = 0; + + // The environment is in the process of being started, but no additional + // details are available. + STARTING = 1; + + // Startup is waiting for the user's disk to be unarchived. This can happen + // when the user returns to Cloud Shell after not having used it for a + // while, and suggests that startup will take longer than normal. + UNARCHIVING_DISK = 2; + + // Startup is waiting for compute resources to be assigned to the + // environment. This should normally happen very quickly, but an environment + // might stay in this state for an extended period of time if the system is + // experiencing heavy load. + AWAITING_COMPUTE_RESOURCES = 4; + + // Startup has completed. If the start operation was successful, the user + // should be able to establish an SSH connection to their environment. + // Otherwise, the operation will contain details of the failure. + FINISHED = 3; + } + + // Current state of the environment being started. + State state = 1; +} + +// Message included in the response field of operations returned from +// [StartEnvironment][google.cloud.shell.v1.CloudShellService.StartEnvironment] +// once the operation is complete. +message StartEnvironmentResponse { + // Environment that was started. + Environment environment = 1; +} + +// Request message for +// [AddPublicKey][google.cloud.shell.v1.CloudShellService.AddPublicKey]. +message AddPublicKeyRequest { + // Environment this key should be added to, e.g. + // `users/me/environments/default`. + string environment = 1; + + // Key that should be added to the environment. Supported formats are + // `ssh-dss` (see RFC4253), `ssh-rsa` (see RFC4253), `ecdsa-sha2-nistp256` + // (see RFC5656), `ecdsa-sha2-nistp384` (see RFC5656) and + // `ecdsa-sha2-nistp521` (see RFC5656). It should be structured as + // <format> <content>, where <content> part is encoded with + // Base64. + string key = 2; +} + +// Response message for +// [AddPublicKey][google.cloud.shell.v1.CloudShellService.AddPublicKey]. +message AddPublicKeyResponse { + // Key that was added to the environment. + string key = 1; +} + +// Message included in the metadata field of operations returned from +// [AddPublicKey][google.cloud.shell.v1.CloudShellService.AddPublicKey]. +message AddPublicKeyMetadata { + +} + +// Request message for +// [RemovePublicKey][google.cloud.shell.v1.CloudShellService.RemovePublicKey]. +message RemovePublicKeyRequest { + // Environment this key should be removed from, e.g. + // `users/me/environments/default`. + string environment = 1; + + // Key that should be removed from the environment. + string key = 2; +} + +// Response message for +// [RemovePublicKey][google.cloud.shell.v1.CloudShellService.RemovePublicKey]. +message RemovePublicKeyResponse { + +} + +// Message included in the metadata field of operations returned from +// [RemovePublicKey][google.cloud.shell.v1.CloudShellService.RemovePublicKey]. +message RemovePublicKeyMetadata { + +} + +// Cloud-shell specific information that will be included as details in failure +// responses. +message CloudShellErrorDetails { + // Set of possible errors returned from API calls. + enum CloudShellErrorCode { + // An unknown error occurred. + CLOUD_SHELL_ERROR_CODE_UNSPECIFIED = 0; + + // The image used by the Cloud Shell environment either does not exist or + // the user does not have access to it. + IMAGE_UNAVAILABLE = 1; + + // Cloud Shell has been disabled by an administrator for the user making the + // request. + CLOUD_SHELL_DISABLED = 2; + + // Cloud Shell has been permanently disabled due to a Terms of Service + // violation by the user. + TOS_VIOLATION = 4; + + // The user has exhausted their weekly Cloud Shell quota, and Cloud Shell + // will be disabled until the quota resets. + QUOTA_EXCEEDED = 5; + } + + // Code indicating the specific error the occurred. + CloudShellErrorCode code = 1; +} diff --git a/packages/google-cloud-shell/protos/protos.d.ts b/packages/google-cloud-shell/protos/protos.d.ts new file mode 100644 index 00000000000..7de9f348cbb --- /dev/null +++ b/packages/google-cloud-shell/protos/protos.d.ts @@ -0,0 +1,6983 @@ +// Copyright 2021 Google LLC +// +// 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. + +import * as Long from "long"; +import {protobuf as $protobuf} from "google-gax"; +/** Namespace google. */ +export namespace google { + + /** Namespace cloud. */ + namespace cloud { + + /** Namespace shell. */ + namespace shell { + + /** Namespace v1. */ + namespace v1 { + + /** Represents a CloudShellService */ + class CloudShellService extends $protobuf.rpc.Service { + + /** + * Constructs a new CloudShellService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new CloudShellService service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): CloudShellService; + + /** + * Calls GetEnvironment. + * @param request GetEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Environment + */ + public getEnvironment(request: google.cloud.shell.v1.IGetEnvironmentRequest, callback: google.cloud.shell.v1.CloudShellService.GetEnvironmentCallback): void; + + /** + * Calls GetEnvironment. + * @param request GetEnvironmentRequest message or plain object + * @returns Promise + */ + public getEnvironment(request: google.cloud.shell.v1.IGetEnvironmentRequest): Promise; + + /** + * Calls StartEnvironment. + * @param request StartEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public startEnvironment(request: google.cloud.shell.v1.IStartEnvironmentRequest, callback: google.cloud.shell.v1.CloudShellService.StartEnvironmentCallback): void; + + /** + * Calls StartEnvironment. + * @param request StartEnvironmentRequest message or plain object + * @returns Promise + */ + public startEnvironment(request: google.cloud.shell.v1.IStartEnvironmentRequest): Promise; + + /** + * Calls AuthorizeEnvironment. + * @param request AuthorizeEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public authorizeEnvironment(request: google.cloud.shell.v1.IAuthorizeEnvironmentRequest, callback: google.cloud.shell.v1.CloudShellService.AuthorizeEnvironmentCallback): void; + + /** + * Calls AuthorizeEnvironment. + * @param request AuthorizeEnvironmentRequest message or plain object + * @returns Promise + */ + public authorizeEnvironment(request: google.cloud.shell.v1.IAuthorizeEnvironmentRequest): Promise; + + /** + * Calls AddPublicKey. + * @param request AddPublicKeyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public addPublicKey(request: google.cloud.shell.v1.IAddPublicKeyRequest, callback: google.cloud.shell.v1.CloudShellService.AddPublicKeyCallback): void; + + /** + * Calls AddPublicKey. + * @param request AddPublicKeyRequest message or plain object + * @returns Promise + */ + public addPublicKey(request: google.cloud.shell.v1.IAddPublicKeyRequest): Promise; + + /** + * Calls RemovePublicKey. + * @param request RemovePublicKeyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public removePublicKey(request: google.cloud.shell.v1.IRemovePublicKeyRequest, callback: google.cloud.shell.v1.CloudShellService.RemovePublicKeyCallback): void; + + /** + * Calls RemovePublicKey. + * @param request RemovePublicKeyRequest message or plain object + * @returns Promise + */ + public removePublicKey(request: google.cloud.shell.v1.IRemovePublicKeyRequest): Promise; + } + + namespace CloudShellService { + + /** + * Callback as used by {@link google.cloud.shell.v1.CloudShellService#getEnvironment}. + * @param error Error, if any + * @param [response] Environment + */ + type GetEnvironmentCallback = (error: (Error|null), response?: google.cloud.shell.v1.Environment) => void; + + /** + * Callback as used by {@link google.cloud.shell.v1.CloudShellService#startEnvironment}. + * @param error Error, if any + * @param [response] Operation + */ + type StartEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.shell.v1.CloudShellService#authorizeEnvironment}. + * @param error Error, if any + * @param [response] Operation + */ + type AuthorizeEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.shell.v1.CloudShellService#addPublicKey}. + * @param error Error, if any + * @param [response] Operation + */ + type AddPublicKeyCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.shell.v1.CloudShellService#removePublicKey}. + * @param error Error, if any + * @param [response] Operation + */ + type RemovePublicKeyCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of an Environment. */ + interface IEnvironment { + + /** Environment name */ + name?: (string|null); + + /** Environment id */ + id?: (string|null); + + /** Environment dockerImage */ + dockerImage?: (string|null); + + /** Environment state */ + state?: (google.cloud.shell.v1.Environment.State|keyof typeof google.cloud.shell.v1.Environment.State|null); + + /** Environment webHost */ + webHost?: (string|null); + + /** Environment sshUsername */ + sshUsername?: (string|null); + + /** Environment sshHost */ + sshHost?: (string|null); + + /** Environment sshPort */ + sshPort?: (number|null); + + /** Environment publicKeys */ + publicKeys?: (string[]|null); + } + + /** Represents an Environment. */ + class Environment implements IEnvironment { + + /** + * Constructs a new Environment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.shell.v1.IEnvironment); + + /** Environment name. */ + public name: string; + + /** Environment id. */ + public id: string; + + /** Environment dockerImage. */ + public dockerImage: string; + + /** Environment state. */ + public state: (google.cloud.shell.v1.Environment.State|keyof typeof google.cloud.shell.v1.Environment.State); + + /** Environment webHost. */ + public webHost: string; + + /** Environment sshUsername. */ + public sshUsername: string; + + /** Environment sshHost. */ + public sshHost: string; + + /** Environment sshPort. */ + public sshPort: number; + + /** Environment publicKeys. */ + public publicKeys: string[]; + + /** + * Creates a new Environment instance using the specified properties. + * @param [properties] Properties to set + * @returns Environment instance + */ + public static create(properties?: google.cloud.shell.v1.IEnvironment): google.cloud.shell.v1.Environment; + + /** + * Encodes the specified Environment message. Does not implicitly {@link google.cloud.shell.v1.Environment.verify|verify} messages. + * @param message Environment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.shell.v1.IEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Environment message, length delimited. Does not implicitly {@link google.cloud.shell.v1.Environment.verify|verify} messages. + * @param message Environment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.shell.v1.IEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Environment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Environment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.shell.v1.Environment; + + /** + * Decodes an Environment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Environment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.shell.v1.Environment; + + /** + * Verifies an Environment message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Environment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Environment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.shell.v1.Environment; + + /** + * Creates a plain object from an Environment message. Also converts values to other types if specified. + * @param message Environment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.shell.v1.Environment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Environment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Environment { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + SUSPENDED = 1, + PENDING = 2, + RUNNING = 3, + DELETING = 4 + } + } + + /** Properties of a GetEnvironmentRequest. */ + interface IGetEnvironmentRequest { + + /** GetEnvironmentRequest name */ + name?: (string|null); + } + + /** Represents a GetEnvironmentRequest. */ + class GetEnvironmentRequest implements IGetEnvironmentRequest { + + /** + * Constructs a new GetEnvironmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.shell.v1.IGetEnvironmentRequest); + + /** GetEnvironmentRequest name. */ + public name: string; + + /** + * Creates a new GetEnvironmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetEnvironmentRequest instance + */ + public static create(properties?: google.cloud.shell.v1.IGetEnvironmentRequest): google.cloud.shell.v1.GetEnvironmentRequest; + + /** + * Encodes the specified GetEnvironmentRequest message. Does not implicitly {@link google.cloud.shell.v1.GetEnvironmentRequest.verify|verify} messages. + * @param message GetEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.shell.v1.IGetEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.shell.v1.GetEnvironmentRequest.verify|verify} messages. + * @param message GetEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.shell.v1.IGetEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetEnvironmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.shell.v1.GetEnvironmentRequest; + + /** + * Decodes a GetEnvironmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.shell.v1.GetEnvironmentRequest; + + /** + * Verifies a GetEnvironmentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetEnvironmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.shell.v1.GetEnvironmentRequest; + + /** + * Creates a plain object from a GetEnvironmentRequest message. Also converts values to other types if specified. + * @param message GetEnvironmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.shell.v1.GetEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetEnvironmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateEnvironmentMetadata. */ + interface ICreateEnvironmentMetadata { + } + + /** Represents a CreateEnvironmentMetadata. */ + class CreateEnvironmentMetadata implements ICreateEnvironmentMetadata { + + /** + * Constructs a new CreateEnvironmentMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.shell.v1.ICreateEnvironmentMetadata); + + /** + * Creates a new CreateEnvironmentMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateEnvironmentMetadata instance + */ + public static create(properties?: google.cloud.shell.v1.ICreateEnvironmentMetadata): google.cloud.shell.v1.CreateEnvironmentMetadata; + + /** + * Encodes the specified CreateEnvironmentMetadata message. Does not implicitly {@link google.cloud.shell.v1.CreateEnvironmentMetadata.verify|verify} messages. + * @param message CreateEnvironmentMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.shell.v1.ICreateEnvironmentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateEnvironmentMetadata message, length delimited. Does not implicitly {@link google.cloud.shell.v1.CreateEnvironmentMetadata.verify|verify} messages. + * @param message CreateEnvironmentMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.shell.v1.ICreateEnvironmentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateEnvironmentMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateEnvironmentMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.shell.v1.CreateEnvironmentMetadata; + + /** + * Decodes a CreateEnvironmentMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateEnvironmentMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.shell.v1.CreateEnvironmentMetadata; + + /** + * Verifies a CreateEnvironmentMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateEnvironmentMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateEnvironmentMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.shell.v1.CreateEnvironmentMetadata; + + /** + * Creates a plain object from a CreateEnvironmentMetadata message. Also converts values to other types if specified. + * @param message CreateEnvironmentMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.shell.v1.CreateEnvironmentMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateEnvironmentMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteEnvironmentMetadata. */ + interface IDeleteEnvironmentMetadata { + } + + /** Represents a DeleteEnvironmentMetadata. */ + class DeleteEnvironmentMetadata implements IDeleteEnvironmentMetadata { + + /** + * Constructs a new DeleteEnvironmentMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.shell.v1.IDeleteEnvironmentMetadata); + + /** + * Creates a new DeleteEnvironmentMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteEnvironmentMetadata instance + */ + public static create(properties?: google.cloud.shell.v1.IDeleteEnvironmentMetadata): google.cloud.shell.v1.DeleteEnvironmentMetadata; + + /** + * Encodes the specified DeleteEnvironmentMetadata message. Does not implicitly {@link google.cloud.shell.v1.DeleteEnvironmentMetadata.verify|verify} messages. + * @param message DeleteEnvironmentMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.shell.v1.IDeleteEnvironmentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteEnvironmentMetadata message, length delimited. Does not implicitly {@link google.cloud.shell.v1.DeleteEnvironmentMetadata.verify|verify} messages. + * @param message DeleteEnvironmentMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.shell.v1.IDeleteEnvironmentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteEnvironmentMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteEnvironmentMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.shell.v1.DeleteEnvironmentMetadata; + + /** + * Decodes a DeleteEnvironmentMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteEnvironmentMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.shell.v1.DeleteEnvironmentMetadata; + + /** + * Verifies a DeleteEnvironmentMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteEnvironmentMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteEnvironmentMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.shell.v1.DeleteEnvironmentMetadata; + + /** + * Creates a plain object from a DeleteEnvironmentMetadata message. Also converts values to other types if specified. + * @param message DeleteEnvironmentMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.shell.v1.DeleteEnvironmentMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteEnvironmentMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a StartEnvironmentRequest. */ + interface IStartEnvironmentRequest { + + /** StartEnvironmentRequest name */ + name?: (string|null); + + /** StartEnvironmentRequest accessToken */ + accessToken?: (string|null); + + /** StartEnvironmentRequest publicKeys */ + publicKeys?: (string[]|null); + } + + /** Represents a StartEnvironmentRequest. */ + class StartEnvironmentRequest implements IStartEnvironmentRequest { + + /** + * Constructs a new StartEnvironmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.shell.v1.IStartEnvironmentRequest); + + /** StartEnvironmentRequest name. */ + public name: string; + + /** StartEnvironmentRequest accessToken. */ + public accessToken: string; + + /** StartEnvironmentRequest publicKeys. */ + public publicKeys: string[]; + + /** + * Creates a new StartEnvironmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns StartEnvironmentRequest instance + */ + public static create(properties?: google.cloud.shell.v1.IStartEnvironmentRequest): google.cloud.shell.v1.StartEnvironmentRequest; + + /** + * Encodes the specified StartEnvironmentRequest message. Does not implicitly {@link google.cloud.shell.v1.StartEnvironmentRequest.verify|verify} messages. + * @param message StartEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.shell.v1.IStartEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StartEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.shell.v1.StartEnvironmentRequest.verify|verify} messages. + * @param message StartEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.shell.v1.IStartEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StartEnvironmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StartEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.shell.v1.StartEnvironmentRequest; + + /** + * Decodes a StartEnvironmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StartEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.shell.v1.StartEnvironmentRequest; + + /** + * Verifies a StartEnvironmentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StartEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StartEnvironmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.shell.v1.StartEnvironmentRequest; + + /** + * Creates a plain object from a StartEnvironmentRequest message. Also converts values to other types if specified. + * @param message StartEnvironmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.shell.v1.StartEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StartEnvironmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AuthorizeEnvironmentRequest. */ + interface IAuthorizeEnvironmentRequest { + + /** AuthorizeEnvironmentRequest name */ + name?: (string|null); + + /** AuthorizeEnvironmentRequest accessToken */ + accessToken?: (string|null); + + /** AuthorizeEnvironmentRequest idToken */ + idToken?: (string|null); + + /** AuthorizeEnvironmentRequest expireTime */ + expireTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an AuthorizeEnvironmentRequest. */ + class AuthorizeEnvironmentRequest implements IAuthorizeEnvironmentRequest { + + /** + * Constructs a new AuthorizeEnvironmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.shell.v1.IAuthorizeEnvironmentRequest); + + /** AuthorizeEnvironmentRequest name. */ + public name: string; + + /** AuthorizeEnvironmentRequest accessToken. */ + public accessToken: string; + + /** AuthorizeEnvironmentRequest idToken. */ + public idToken: string; + + /** AuthorizeEnvironmentRequest expireTime. */ + public expireTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new AuthorizeEnvironmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns AuthorizeEnvironmentRequest instance + */ + public static create(properties?: google.cloud.shell.v1.IAuthorizeEnvironmentRequest): google.cloud.shell.v1.AuthorizeEnvironmentRequest; + + /** + * Encodes the specified AuthorizeEnvironmentRequest message. Does not implicitly {@link google.cloud.shell.v1.AuthorizeEnvironmentRequest.verify|verify} messages. + * @param message AuthorizeEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.shell.v1.IAuthorizeEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuthorizeEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.shell.v1.AuthorizeEnvironmentRequest.verify|verify} messages. + * @param message AuthorizeEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.shell.v1.IAuthorizeEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuthorizeEnvironmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuthorizeEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.shell.v1.AuthorizeEnvironmentRequest; + + /** + * Decodes an AuthorizeEnvironmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuthorizeEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.shell.v1.AuthorizeEnvironmentRequest; + + /** + * Verifies an AuthorizeEnvironmentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AuthorizeEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuthorizeEnvironmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.shell.v1.AuthorizeEnvironmentRequest; + + /** + * Creates a plain object from an AuthorizeEnvironmentRequest message. Also converts values to other types if specified. + * @param message AuthorizeEnvironmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.shell.v1.AuthorizeEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuthorizeEnvironmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AuthorizeEnvironmentResponse. */ + interface IAuthorizeEnvironmentResponse { + } + + /** Represents an AuthorizeEnvironmentResponse. */ + class AuthorizeEnvironmentResponse implements IAuthorizeEnvironmentResponse { + + /** + * Constructs a new AuthorizeEnvironmentResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.shell.v1.IAuthorizeEnvironmentResponse); + + /** + * Creates a new AuthorizeEnvironmentResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns AuthorizeEnvironmentResponse instance + */ + public static create(properties?: google.cloud.shell.v1.IAuthorizeEnvironmentResponse): google.cloud.shell.v1.AuthorizeEnvironmentResponse; + + /** + * Encodes the specified AuthorizeEnvironmentResponse message. Does not implicitly {@link google.cloud.shell.v1.AuthorizeEnvironmentResponse.verify|verify} messages. + * @param message AuthorizeEnvironmentResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.shell.v1.IAuthorizeEnvironmentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuthorizeEnvironmentResponse message, length delimited. Does not implicitly {@link google.cloud.shell.v1.AuthorizeEnvironmentResponse.verify|verify} messages. + * @param message AuthorizeEnvironmentResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.shell.v1.IAuthorizeEnvironmentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuthorizeEnvironmentResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuthorizeEnvironmentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.shell.v1.AuthorizeEnvironmentResponse; + + /** + * Decodes an AuthorizeEnvironmentResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuthorizeEnvironmentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.shell.v1.AuthorizeEnvironmentResponse; + + /** + * Verifies an AuthorizeEnvironmentResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AuthorizeEnvironmentResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuthorizeEnvironmentResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.shell.v1.AuthorizeEnvironmentResponse; + + /** + * Creates a plain object from an AuthorizeEnvironmentResponse message. Also converts values to other types if specified. + * @param message AuthorizeEnvironmentResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.shell.v1.AuthorizeEnvironmentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuthorizeEnvironmentResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AuthorizeEnvironmentMetadata. */ + interface IAuthorizeEnvironmentMetadata { + } + + /** Represents an AuthorizeEnvironmentMetadata. */ + class AuthorizeEnvironmentMetadata implements IAuthorizeEnvironmentMetadata { + + /** + * Constructs a new AuthorizeEnvironmentMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.shell.v1.IAuthorizeEnvironmentMetadata); + + /** + * Creates a new AuthorizeEnvironmentMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns AuthorizeEnvironmentMetadata instance + */ + public static create(properties?: google.cloud.shell.v1.IAuthorizeEnvironmentMetadata): google.cloud.shell.v1.AuthorizeEnvironmentMetadata; + + /** + * Encodes the specified AuthorizeEnvironmentMetadata message. Does not implicitly {@link google.cloud.shell.v1.AuthorizeEnvironmentMetadata.verify|verify} messages. + * @param message AuthorizeEnvironmentMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.shell.v1.IAuthorizeEnvironmentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuthorizeEnvironmentMetadata message, length delimited. Does not implicitly {@link google.cloud.shell.v1.AuthorizeEnvironmentMetadata.verify|verify} messages. + * @param message AuthorizeEnvironmentMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.shell.v1.IAuthorizeEnvironmentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuthorizeEnvironmentMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuthorizeEnvironmentMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.shell.v1.AuthorizeEnvironmentMetadata; + + /** + * Decodes an AuthorizeEnvironmentMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuthorizeEnvironmentMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.shell.v1.AuthorizeEnvironmentMetadata; + + /** + * Verifies an AuthorizeEnvironmentMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AuthorizeEnvironmentMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuthorizeEnvironmentMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.shell.v1.AuthorizeEnvironmentMetadata; + + /** + * Creates a plain object from an AuthorizeEnvironmentMetadata message. Also converts values to other types if specified. + * @param message AuthorizeEnvironmentMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.shell.v1.AuthorizeEnvironmentMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuthorizeEnvironmentMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a StartEnvironmentMetadata. */ + interface IStartEnvironmentMetadata { + + /** StartEnvironmentMetadata state */ + state?: (google.cloud.shell.v1.StartEnvironmentMetadata.State|keyof typeof google.cloud.shell.v1.StartEnvironmentMetadata.State|null); + } + + /** Represents a StartEnvironmentMetadata. */ + class StartEnvironmentMetadata implements IStartEnvironmentMetadata { + + /** + * Constructs a new StartEnvironmentMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.shell.v1.IStartEnvironmentMetadata); + + /** StartEnvironmentMetadata state. */ + public state: (google.cloud.shell.v1.StartEnvironmentMetadata.State|keyof typeof google.cloud.shell.v1.StartEnvironmentMetadata.State); + + /** + * Creates a new StartEnvironmentMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns StartEnvironmentMetadata instance + */ + public static create(properties?: google.cloud.shell.v1.IStartEnvironmentMetadata): google.cloud.shell.v1.StartEnvironmentMetadata; + + /** + * Encodes the specified StartEnvironmentMetadata message. Does not implicitly {@link google.cloud.shell.v1.StartEnvironmentMetadata.verify|verify} messages. + * @param message StartEnvironmentMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.shell.v1.IStartEnvironmentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StartEnvironmentMetadata message, length delimited. Does not implicitly {@link google.cloud.shell.v1.StartEnvironmentMetadata.verify|verify} messages. + * @param message StartEnvironmentMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.shell.v1.IStartEnvironmentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StartEnvironmentMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StartEnvironmentMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.shell.v1.StartEnvironmentMetadata; + + /** + * Decodes a StartEnvironmentMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StartEnvironmentMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.shell.v1.StartEnvironmentMetadata; + + /** + * Verifies a StartEnvironmentMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StartEnvironmentMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StartEnvironmentMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.shell.v1.StartEnvironmentMetadata; + + /** + * Creates a plain object from a StartEnvironmentMetadata message. Also converts values to other types if specified. + * @param message StartEnvironmentMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.shell.v1.StartEnvironmentMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StartEnvironmentMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace StartEnvironmentMetadata { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + STARTING = 1, + UNARCHIVING_DISK = 2, + AWAITING_COMPUTE_RESOURCES = 4, + FINISHED = 3 + } + } + + /** Properties of a StartEnvironmentResponse. */ + interface IStartEnvironmentResponse { + + /** StartEnvironmentResponse environment */ + environment?: (google.cloud.shell.v1.IEnvironment|null); + } + + /** Represents a StartEnvironmentResponse. */ + class StartEnvironmentResponse implements IStartEnvironmentResponse { + + /** + * Constructs a new StartEnvironmentResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.shell.v1.IStartEnvironmentResponse); + + /** StartEnvironmentResponse environment. */ + public environment?: (google.cloud.shell.v1.IEnvironment|null); + + /** + * Creates a new StartEnvironmentResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns StartEnvironmentResponse instance + */ + public static create(properties?: google.cloud.shell.v1.IStartEnvironmentResponse): google.cloud.shell.v1.StartEnvironmentResponse; + + /** + * Encodes the specified StartEnvironmentResponse message. Does not implicitly {@link google.cloud.shell.v1.StartEnvironmentResponse.verify|verify} messages. + * @param message StartEnvironmentResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.shell.v1.IStartEnvironmentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StartEnvironmentResponse message, length delimited. Does not implicitly {@link google.cloud.shell.v1.StartEnvironmentResponse.verify|verify} messages. + * @param message StartEnvironmentResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.shell.v1.IStartEnvironmentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StartEnvironmentResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StartEnvironmentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.shell.v1.StartEnvironmentResponse; + + /** + * Decodes a StartEnvironmentResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StartEnvironmentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.shell.v1.StartEnvironmentResponse; + + /** + * Verifies a StartEnvironmentResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StartEnvironmentResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StartEnvironmentResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.shell.v1.StartEnvironmentResponse; + + /** + * Creates a plain object from a StartEnvironmentResponse message. Also converts values to other types if specified. + * @param message StartEnvironmentResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.shell.v1.StartEnvironmentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StartEnvironmentResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AddPublicKeyRequest. */ + interface IAddPublicKeyRequest { + + /** AddPublicKeyRequest environment */ + environment?: (string|null); + + /** AddPublicKeyRequest key */ + key?: (string|null); + } + + /** Represents an AddPublicKeyRequest. */ + class AddPublicKeyRequest implements IAddPublicKeyRequest { + + /** + * Constructs a new AddPublicKeyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.shell.v1.IAddPublicKeyRequest); + + /** AddPublicKeyRequest environment. */ + public environment: string; + + /** AddPublicKeyRequest key. */ + public key: string; + + /** + * Creates a new AddPublicKeyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns AddPublicKeyRequest instance + */ + public static create(properties?: google.cloud.shell.v1.IAddPublicKeyRequest): google.cloud.shell.v1.AddPublicKeyRequest; + + /** + * Encodes the specified AddPublicKeyRequest message. Does not implicitly {@link google.cloud.shell.v1.AddPublicKeyRequest.verify|verify} messages. + * @param message AddPublicKeyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.shell.v1.IAddPublicKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AddPublicKeyRequest message, length delimited. Does not implicitly {@link google.cloud.shell.v1.AddPublicKeyRequest.verify|verify} messages. + * @param message AddPublicKeyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.shell.v1.IAddPublicKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AddPublicKeyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddPublicKeyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.shell.v1.AddPublicKeyRequest; + + /** + * Decodes an AddPublicKeyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddPublicKeyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.shell.v1.AddPublicKeyRequest; + + /** + * Verifies an AddPublicKeyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AddPublicKeyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddPublicKeyRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.shell.v1.AddPublicKeyRequest; + + /** + * Creates a plain object from an AddPublicKeyRequest message. Also converts values to other types if specified. + * @param message AddPublicKeyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.shell.v1.AddPublicKeyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AddPublicKeyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AddPublicKeyResponse. */ + interface IAddPublicKeyResponse { + + /** AddPublicKeyResponse key */ + key?: (string|null); + } + + /** Represents an AddPublicKeyResponse. */ + class AddPublicKeyResponse implements IAddPublicKeyResponse { + + /** + * Constructs a new AddPublicKeyResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.shell.v1.IAddPublicKeyResponse); + + /** AddPublicKeyResponse key. */ + public key: string; + + /** + * Creates a new AddPublicKeyResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns AddPublicKeyResponse instance + */ + public static create(properties?: google.cloud.shell.v1.IAddPublicKeyResponse): google.cloud.shell.v1.AddPublicKeyResponse; + + /** + * Encodes the specified AddPublicKeyResponse message. Does not implicitly {@link google.cloud.shell.v1.AddPublicKeyResponse.verify|verify} messages. + * @param message AddPublicKeyResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.shell.v1.IAddPublicKeyResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AddPublicKeyResponse message, length delimited. Does not implicitly {@link google.cloud.shell.v1.AddPublicKeyResponse.verify|verify} messages. + * @param message AddPublicKeyResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.shell.v1.IAddPublicKeyResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AddPublicKeyResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddPublicKeyResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.shell.v1.AddPublicKeyResponse; + + /** + * Decodes an AddPublicKeyResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddPublicKeyResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.shell.v1.AddPublicKeyResponse; + + /** + * Verifies an AddPublicKeyResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AddPublicKeyResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddPublicKeyResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.shell.v1.AddPublicKeyResponse; + + /** + * Creates a plain object from an AddPublicKeyResponse message. Also converts values to other types if specified. + * @param message AddPublicKeyResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.shell.v1.AddPublicKeyResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AddPublicKeyResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AddPublicKeyMetadata. */ + interface IAddPublicKeyMetadata { + } + + /** Represents an AddPublicKeyMetadata. */ + class AddPublicKeyMetadata implements IAddPublicKeyMetadata { + + /** + * Constructs a new AddPublicKeyMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.shell.v1.IAddPublicKeyMetadata); + + /** + * Creates a new AddPublicKeyMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns AddPublicKeyMetadata instance + */ + public static create(properties?: google.cloud.shell.v1.IAddPublicKeyMetadata): google.cloud.shell.v1.AddPublicKeyMetadata; + + /** + * Encodes the specified AddPublicKeyMetadata message. Does not implicitly {@link google.cloud.shell.v1.AddPublicKeyMetadata.verify|verify} messages. + * @param message AddPublicKeyMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.shell.v1.IAddPublicKeyMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AddPublicKeyMetadata message, length delimited. Does not implicitly {@link google.cloud.shell.v1.AddPublicKeyMetadata.verify|verify} messages. + * @param message AddPublicKeyMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.shell.v1.IAddPublicKeyMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AddPublicKeyMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddPublicKeyMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.shell.v1.AddPublicKeyMetadata; + + /** + * Decodes an AddPublicKeyMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddPublicKeyMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.shell.v1.AddPublicKeyMetadata; + + /** + * Verifies an AddPublicKeyMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AddPublicKeyMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddPublicKeyMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.shell.v1.AddPublicKeyMetadata; + + /** + * Creates a plain object from an AddPublicKeyMetadata message. Also converts values to other types if specified. + * @param message AddPublicKeyMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.shell.v1.AddPublicKeyMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AddPublicKeyMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RemovePublicKeyRequest. */ + interface IRemovePublicKeyRequest { + + /** RemovePublicKeyRequest environment */ + environment?: (string|null); + + /** RemovePublicKeyRequest key */ + key?: (string|null); + } + + /** Represents a RemovePublicKeyRequest. */ + class RemovePublicKeyRequest implements IRemovePublicKeyRequest { + + /** + * Constructs a new RemovePublicKeyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.shell.v1.IRemovePublicKeyRequest); + + /** RemovePublicKeyRequest environment. */ + public environment: string; + + /** RemovePublicKeyRequest key. */ + public key: string; + + /** + * Creates a new RemovePublicKeyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RemovePublicKeyRequest instance + */ + public static create(properties?: google.cloud.shell.v1.IRemovePublicKeyRequest): google.cloud.shell.v1.RemovePublicKeyRequest; + + /** + * Encodes the specified RemovePublicKeyRequest message. Does not implicitly {@link google.cloud.shell.v1.RemovePublicKeyRequest.verify|verify} messages. + * @param message RemovePublicKeyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.shell.v1.IRemovePublicKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RemovePublicKeyRequest message, length delimited. Does not implicitly {@link google.cloud.shell.v1.RemovePublicKeyRequest.verify|verify} messages. + * @param message RemovePublicKeyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.shell.v1.IRemovePublicKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RemovePublicKeyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RemovePublicKeyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.shell.v1.RemovePublicKeyRequest; + + /** + * Decodes a RemovePublicKeyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RemovePublicKeyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.shell.v1.RemovePublicKeyRequest; + + /** + * Verifies a RemovePublicKeyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RemovePublicKeyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RemovePublicKeyRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.shell.v1.RemovePublicKeyRequest; + + /** + * Creates a plain object from a RemovePublicKeyRequest message. Also converts values to other types if specified. + * @param message RemovePublicKeyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.shell.v1.RemovePublicKeyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RemovePublicKeyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RemovePublicKeyResponse. */ + interface IRemovePublicKeyResponse { + } + + /** Represents a RemovePublicKeyResponse. */ + class RemovePublicKeyResponse implements IRemovePublicKeyResponse { + + /** + * Constructs a new RemovePublicKeyResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.shell.v1.IRemovePublicKeyResponse); + + /** + * Creates a new RemovePublicKeyResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RemovePublicKeyResponse instance + */ + public static create(properties?: google.cloud.shell.v1.IRemovePublicKeyResponse): google.cloud.shell.v1.RemovePublicKeyResponse; + + /** + * Encodes the specified RemovePublicKeyResponse message. Does not implicitly {@link google.cloud.shell.v1.RemovePublicKeyResponse.verify|verify} messages. + * @param message RemovePublicKeyResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.shell.v1.IRemovePublicKeyResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RemovePublicKeyResponse message, length delimited. Does not implicitly {@link google.cloud.shell.v1.RemovePublicKeyResponse.verify|verify} messages. + * @param message RemovePublicKeyResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.shell.v1.IRemovePublicKeyResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RemovePublicKeyResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RemovePublicKeyResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.shell.v1.RemovePublicKeyResponse; + + /** + * Decodes a RemovePublicKeyResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RemovePublicKeyResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.shell.v1.RemovePublicKeyResponse; + + /** + * Verifies a RemovePublicKeyResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RemovePublicKeyResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RemovePublicKeyResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.shell.v1.RemovePublicKeyResponse; + + /** + * Creates a plain object from a RemovePublicKeyResponse message. Also converts values to other types if specified. + * @param message RemovePublicKeyResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.shell.v1.RemovePublicKeyResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RemovePublicKeyResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RemovePublicKeyMetadata. */ + interface IRemovePublicKeyMetadata { + } + + /** Represents a RemovePublicKeyMetadata. */ + class RemovePublicKeyMetadata implements IRemovePublicKeyMetadata { + + /** + * Constructs a new RemovePublicKeyMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.shell.v1.IRemovePublicKeyMetadata); + + /** + * Creates a new RemovePublicKeyMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns RemovePublicKeyMetadata instance + */ + public static create(properties?: google.cloud.shell.v1.IRemovePublicKeyMetadata): google.cloud.shell.v1.RemovePublicKeyMetadata; + + /** + * Encodes the specified RemovePublicKeyMetadata message. Does not implicitly {@link google.cloud.shell.v1.RemovePublicKeyMetadata.verify|verify} messages. + * @param message RemovePublicKeyMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.shell.v1.IRemovePublicKeyMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RemovePublicKeyMetadata message, length delimited. Does not implicitly {@link google.cloud.shell.v1.RemovePublicKeyMetadata.verify|verify} messages. + * @param message RemovePublicKeyMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.shell.v1.IRemovePublicKeyMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RemovePublicKeyMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RemovePublicKeyMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.shell.v1.RemovePublicKeyMetadata; + + /** + * Decodes a RemovePublicKeyMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RemovePublicKeyMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.shell.v1.RemovePublicKeyMetadata; + + /** + * Verifies a RemovePublicKeyMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RemovePublicKeyMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RemovePublicKeyMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.shell.v1.RemovePublicKeyMetadata; + + /** + * Creates a plain object from a RemovePublicKeyMetadata message. Also converts values to other types if specified. + * @param message RemovePublicKeyMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.shell.v1.RemovePublicKeyMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RemovePublicKeyMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CloudShellErrorDetails. */ + interface ICloudShellErrorDetails { + + /** CloudShellErrorDetails code */ + code?: (google.cloud.shell.v1.CloudShellErrorDetails.CloudShellErrorCode|keyof typeof google.cloud.shell.v1.CloudShellErrorDetails.CloudShellErrorCode|null); + } + + /** Represents a CloudShellErrorDetails. */ + class CloudShellErrorDetails implements ICloudShellErrorDetails { + + /** + * Constructs a new CloudShellErrorDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.shell.v1.ICloudShellErrorDetails); + + /** CloudShellErrorDetails code. */ + public code: (google.cloud.shell.v1.CloudShellErrorDetails.CloudShellErrorCode|keyof typeof google.cloud.shell.v1.CloudShellErrorDetails.CloudShellErrorCode); + + /** + * Creates a new CloudShellErrorDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudShellErrorDetails instance + */ + public static create(properties?: google.cloud.shell.v1.ICloudShellErrorDetails): google.cloud.shell.v1.CloudShellErrorDetails; + + /** + * Encodes the specified CloudShellErrorDetails message. Does not implicitly {@link google.cloud.shell.v1.CloudShellErrorDetails.verify|verify} messages. + * @param message CloudShellErrorDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.shell.v1.ICloudShellErrorDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudShellErrorDetails message, length delimited. Does not implicitly {@link google.cloud.shell.v1.CloudShellErrorDetails.verify|verify} messages. + * @param message CloudShellErrorDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.shell.v1.ICloudShellErrorDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudShellErrorDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudShellErrorDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.shell.v1.CloudShellErrorDetails; + + /** + * Decodes a CloudShellErrorDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudShellErrorDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.shell.v1.CloudShellErrorDetails; + + /** + * Verifies a CloudShellErrorDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudShellErrorDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudShellErrorDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.shell.v1.CloudShellErrorDetails; + + /** + * Creates a plain object from a CloudShellErrorDetails message. Also converts values to other types if specified. + * @param message CloudShellErrorDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.shell.v1.CloudShellErrorDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudShellErrorDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace CloudShellErrorDetails { + + /** CloudShellErrorCode enum. */ + enum CloudShellErrorCode { + CLOUD_SHELL_ERROR_CODE_UNSPECIFIED = 0, + IMAGE_UNAVAILABLE = 1, + CLOUD_SHELL_DISABLED = 2, + TOS_VIOLATION = 4, + QUOTA_EXCEEDED = 5 + } + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + + /** + * Verifies a Http message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get?: (string|null); + + /** HttpRule put. */ + public put?: (string|null); + + /** HttpRule post. */ + public post?: (string|null); + + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6 + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions phpGenericServices */ + phpGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions phpGenericServices. */ + public phpGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + + /** MethodOptions .google.longrunning.operationInfo */ + ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|string|null); + } + + /** Represents an Any. */ + class Any implements IAny { + + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: (Uint8Array|string); + + /** + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Any message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; + + /** + * Verifies an Any message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Any + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + + /** + * Verifies an Empty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldMask. */ + interface IFieldMask { + + /** FieldMask paths */ + paths?: (string[]|null); + } + + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { + + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); + + /** FieldMask paths. */ + public paths: string[]; + + /** + * Creates a new FieldMask instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldMask instance + */ + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + + /** + * Verifies a FieldMask message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldMask + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldMask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|string|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long|string); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + + /** + * Verifies a Timestamp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace longrunning. */ + namespace longrunning { + + /** Represents an Operations */ + class Operations extends $protobuf.rpc.Service { + + /** + * Constructs a new Operations service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Operations service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Operations; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOperationsResponse + */ + public listOperations(request: google.longrunning.IListOperationsRequest, callback: google.longrunning.Operations.ListOperationsCallback): void; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @returns Promise + */ + public listOperations(request: google.longrunning.IListOperationsRequest): Promise; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public getOperation(request: google.longrunning.IGetOperationRequest, callback: google.longrunning.Operations.GetOperationCallback): void; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @returns Promise + */ + public getOperation(request: google.longrunning.IGetOperationRequest): Promise; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest, callback: google.longrunning.Operations.DeleteOperationCallback): void; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @returns Promise + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest): Promise; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest, callback: google.longrunning.Operations.CancelOperationCallback): void; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @returns Promise + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest): Promise; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest, callback: google.longrunning.Operations.WaitOperationCallback): void; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @returns Promise + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest): Promise; + } + + namespace Operations { + + /** + * Callback as used by {@link google.longrunning.Operations#listOperations}. + * @param error Error, if any + * @param [response] ListOperationsResponse + */ + type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#getOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#deleteOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#cancelOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#waitOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type WaitOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of an Operation. */ + interface IOperation { + + /** Operation name */ + name?: (string|null); + + /** Operation metadata */ + metadata?: (google.protobuf.IAny|null); + + /** Operation done */ + done?: (boolean|null); + + /** Operation error */ + error?: (google.rpc.IStatus|null); + + /** Operation response */ + response?: (google.protobuf.IAny|null); + } + + /** Represents an Operation. */ + class Operation implements IOperation { + + /** + * Constructs a new Operation. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperation); + + /** Operation name. */ + public name: string; + + /** Operation metadata. */ + public metadata?: (google.protobuf.IAny|null); + + /** Operation done. */ + public done: boolean; + + /** Operation error. */ + public error?: (google.rpc.IStatus|null); + + /** Operation response. */ + public response?: (google.protobuf.IAny|null); + + /** Operation result. */ + public result?: ("error"|"response"); + + /** + * Creates a new Operation instance using the specified properties. + * @param [properties] Properties to set + * @returns Operation instance + */ + public static create(properties?: google.longrunning.IOperation): google.longrunning.Operation; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.Operation; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.Operation; + + /** + * Verifies an Operation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Operation + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.Operation; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @param message Operation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.Operation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Operation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetOperationRequest. */ + interface IGetOperationRequest { + + /** GetOperationRequest name */ + name?: (string|null); + } + + /** Represents a GetOperationRequest. */ + class GetOperationRequest implements IGetOperationRequest { + + /** + * Constructs a new GetOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IGetOperationRequest); + + /** GetOperationRequest name. */ + public name: string; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOperationRequest instance + */ + public static create(properties?: google.longrunning.IGetOperationRequest): google.longrunning.GetOperationRequest; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.GetOperationRequest; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.GetOperationRequest; + + /** + * Verifies a GetOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.GetOperationRequest; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @param message GetOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListOperationsRequest. */ + interface IListOperationsRequest { + + /** ListOperationsRequest name */ + name?: (string|null); + + /** ListOperationsRequest filter */ + filter?: (string|null); + + /** ListOperationsRequest pageSize */ + pageSize?: (number|null); + + /** ListOperationsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListOperationsRequest. */ + class ListOperationsRequest implements IListOperationsRequest { + + /** + * Constructs a new ListOperationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsRequest); + + /** ListOperationsRequest name. */ + public name: string; + + /** ListOperationsRequest filter. */ + public filter: string; + + /** ListOperationsRequest pageSize. */ + public pageSize: number; + + /** ListOperationsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsRequest instance + */ + public static create(properties?: google.longrunning.IListOperationsRequest): google.longrunning.ListOperationsRequest; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsRequest; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsRequest; + + /** + * Verifies a ListOperationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsRequest; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @param message ListOperationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListOperationsResponse. */ + interface IListOperationsResponse { + + /** ListOperationsResponse operations */ + operations?: (google.longrunning.IOperation[]|null); + + /** ListOperationsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListOperationsResponse. */ + class ListOperationsResponse implements IListOperationsResponse { + + /** + * Constructs a new ListOperationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsResponse); + + /** ListOperationsResponse operations. */ + public operations: google.longrunning.IOperation[]; + + /** ListOperationsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsResponse instance + */ + public static create(properties?: google.longrunning.IListOperationsResponse): google.longrunning.ListOperationsResponse; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsResponse; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsResponse; + + /** + * Verifies a ListOperationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsResponse; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @param message ListOperationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CancelOperationRequest. */ + interface ICancelOperationRequest { + + /** CancelOperationRequest name */ + name?: (string|null); + } + + /** Represents a CancelOperationRequest. */ + class CancelOperationRequest implements ICancelOperationRequest { + + /** + * Constructs a new CancelOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.ICancelOperationRequest); + + /** CancelOperationRequest name. */ + public name: string; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelOperationRequest instance + */ + public static create(properties?: google.longrunning.ICancelOperationRequest): google.longrunning.CancelOperationRequest; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.CancelOperationRequest; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.CancelOperationRequest; + + /** + * Verifies a CancelOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.CancelOperationRequest; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @param message CancelOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteOperationRequest. */ + interface IDeleteOperationRequest { + + /** DeleteOperationRequest name */ + name?: (string|null); + } + + /** Represents a DeleteOperationRequest. */ + class DeleteOperationRequest implements IDeleteOperationRequest { + + /** + * Constructs a new DeleteOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IDeleteOperationRequest); + + /** DeleteOperationRequest name. */ + public name: string; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteOperationRequest instance + */ + public static create(properties?: google.longrunning.IDeleteOperationRequest): google.longrunning.DeleteOperationRequest; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.DeleteOperationRequest; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.DeleteOperationRequest; + + /** + * Verifies a DeleteOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.DeleteOperationRequest; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @param message DeleteOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.DeleteOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WaitOperationRequest. */ + interface IWaitOperationRequest { + + /** WaitOperationRequest name */ + name?: (string|null); + + /** WaitOperationRequest timeout */ + timeout?: (google.protobuf.IDuration|null); + } + + /** Represents a WaitOperationRequest. */ + class WaitOperationRequest implements IWaitOperationRequest { + + /** + * Constructs a new WaitOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IWaitOperationRequest); + + /** WaitOperationRequest name. */ + public name: string; + + /** WaitOperationRequest timeout. */ + public timeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns WaitOperationRequest instance + */ + public static create(properties?: google.longrunning.IWaitOperationRequest): google.longrunning.WaitOperationRequest; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.WaitOperationRequest; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.WaitOperationRequest; + + /** + * Verifies a WaitOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WaitOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.WaitOperationRequest; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @param message WaitOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.WaitOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WaitOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an OperationInfo. */ + interface IOperationInfo { + + /** OperationInfo responseType */ + responseType?: (string|null); + + /** OperationInfo metadataType */ + metadataType?: (string|null); + } + + /** Represents an OperationInfo. */ + class OperationInfo implements IOperationInfo { + + /** + * Constructs a new OperationInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperationInfo); + + /** OperationInfo responseType. */ + public responseType: string; + + /** OperationInfo metadataType. */ + public metadataType: string; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationInfo instance + */ + public static create(properties?: google.longrunning.IOperationInfo): google.longrunning.OperationInfo; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.OperationInfo; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.OperationInfo; + + /** + * Verifies an OperationInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationInfo + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.OperationInfo; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @param message OperationInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.OperationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace rpc. */ + namespace rpc { + + /** Properties of a Status. */ + interface IStatus { + + /** Status code */ + code?: (number|null); + + /** Status message */ + message?: (string|null); + + /** Status details */ + details?: (google.protobuf.IAny[]|null); + } + + /** Represents a Status. */ + class Status implements IStatus { + + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IStatus); + + /** Status code. */ + public code: number; + + /** Status message. */ + public message: string; + + /** Status details. */ + public details: google.protobuf.IAny[]; + + /** + * Creates a new Status instance using the specified properties. + * @param [properties] Properties to set + * @returns Status instance + */ + public static create(properties?: google.rpc.IStatus): google.rpc.Status; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Status message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; + + /** + * Verifies a Status message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Status + */ + public static fromObject(object: { [k: string]: any }): google.rpc.Status; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @param message Status + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Status to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } +} diff --git a/packages/google-cloud-shell/protos/protos.js b/packages/google-cloud-shell/protos/protos.js new file mode 100644 index 00000000000..c44c0e1d9c8 --- /dev/null +++ b/packages/google-cloud-shell/protos/protos.js @@ -0,0 +1,17386 @@ +// Copyright 2021 Google LLC +// +// 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. + +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("google-gax").protobufMinimal); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots._google_cloud_cloud_shell_protos || ($protobuf.roots._google_cloud_cloud_shell_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.shell = (function() { + + /** + * Namespace shell. + * @memberof google.cloud + * @namespace + */ + var shell = {}; + + shell.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.cloud.shell + * @namespace + */ + var v1 = {}; + + v1.CloudShellService = (function() { + + /** + * Constructs a new CloudShellService service. + * @memberof google.cloud.shell.v1 + * @classdesc Represents a CloudShellService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function CloudShellService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (CloudShellService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = CloudShellService; + + /** + * Creates new CloudShellService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.shell.v1.CloudShellService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {CloudShellService} RPC service. Useful where requests and/or responses are streamed. + */ + CloudShellService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.shell.v1.CloudShellService#getEnvironment}. + * @memberof google.cloud.shell.v1.CloudShellService + * @typedef GetEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.shell.v1.Environment} [response] Environment + */ + + /** + * Calls GetEnvironment. + * @function getEnvironment + * @memberof google.cloud.shell.v1.CloudShellService + * @instance + * @param {google.cloud.shell.v1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object + * @param {google.cloud.shell.v1.CloudShellService.GetEnvironmentCallback} callback Node-style callback called with the error, if any, and Environment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudShellService.prototype.getEnvironment = function getEnvironment(request, callback) { + return this.rpcCall(getEnvironment, $root.google.cloud.shell.v1.GetEnvironmentRequest, $root.google.cloud.shell.v1.Environment, request, callback); + }, "name", { value: "GetEnvironment" }); + + /** + * Calls GetEnvironment. + * @function getEnvironment + * @memberof google.cloud.shell.v1.CloudShellService + * @instance + * @param {google.cloud.shell.v1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.shell.v1.CloudShellService#startEnvironment}. + * @memberof google.cloud.shell.v1.CloudShellService + * @typedef StartEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls StartEnvironment. + * @function startEnvironment + * @memberof google.cloud.shell.v1.CloudShellService + * @instance + * @param {google.cloud.shell.v1.IStartEnvironmentRequest} request StartEnvironmentRequest message or plain object + * @param {google.cloud.shell.v1.CloudShellService.StartEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudShellService.prototype.startEnvironment = function startEnvironment(request, callback) { + return this.rpcCall(startEnvironment, $root.google.cloud.shell.v1.StartEnvironmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "StartEnvironment" }); + + /** + * Calls StartEnvironment. + * @function startEnvironment + * @memberof google.cloud.shell.v1.CloudShellService + * @instance + * @param {google.cloud.shell.v1.IStartEnvironmentRequest} request StartEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.shell.v1.CloudShellService#authorizeEnvironment}. + * @memberof google.cloud.shell.v1.CloudShellService + * @typedef AuthorizeEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls AuthorizeEnvironment. + * @function authorizeEnvironment + * @memberof google.cloud.shell.v1.CloudShellService + * @instance + * @param {google.cloud.shell.v1.IAuthorizeEnvironmentRequest} request AuthorizeEnvironmentRequest message or plain object + * @param {google.cloud.shell.v1.CloudShellService.AuthorizeEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudShellService.prototype.authorizeEnvironment = function authorizeEnvironment(request, callback) { + return this.rpcCall(authorizeEnvironment, $root.google.cloud.shell.v1.AuthorizeEnvironmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "AuthorizeEnvironment" }); + + /** + * Calls AuthorizeEnvironment. + * @function authorizeEnvironment + * @memberof google.cloud.shell.v1.CloudShellService + * @instance + * @param {google.cloud.shell.v1.IAuthorizeEnvironmentRequest} request AuthorizeEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.shell.v1.CloudShellService#addPublicKey}. + * @memberof google.cloud.shell.v1.CloudShellService + * @typedef AddPublicKeyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls AddPublicKey. + * @function addPublicKey + * @memberof google.cloud.shell.v1.CloudShellService + * @instance + * @param {google.cloud.shell.v1.IAddPublicKeyRequest} request AddPublicKeyRequest message or plain object + * @param {google.cloud.shell.v1.CloudShellService.AddPublicKeyCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudShellService.prototype.addPublicKey = function addPublicKey(request, callback) { + return this.rpcCall(addPublicKey, $root.google.cloud.shell.v1.AddPublicKeyRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "AddPublicKey" }); + + /** + * Calls AddPublicKey. + * @function addPublicKey + * @memberof google.cloud.shell.v1.CloudShellService + * @instance + * @param {google.cloud.shell.v1.IAddPublicKeyRequest} request AddPublicKeyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.shell.v1.CloudShellService#removePublicKey}. + * @memberof google.cloud.shell.v1.CloudShellService + * @typedef RemovePublicKeyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls RemovePublicKey. + * @function removePublicKey + * @memberof google.cloud.shell.v1.CloudShellService + * @instance + * @param {google.cloud.shell.v1.IRemovePublicKeyRequest} request RemovePublicKeyRequest message or plain object + * @param {google.cloud.shell.v1.CloudShellService.RemovePublicKeyCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudShellService.prototype.removePublicKey = function removePublicKey(request, callback) { + return this.rpcCall(removePublicKey, $root.google.cloud.shell.v1.RemovePublicKeyRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "RemovePublicKey" }); + + /** + * Calls RemovePublicKey. + * @function removePublicKey + * @memberof google.cloud.shell.v1.CloudShellService + * @instance + * @param {google.cloud.shell.v1.IRemovePublicKeyRequest} request RemovePublicKeyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return CloudShellService; + })(); + + v1.Environment = (function() { + + /** + * Properties of an Environment. + * @memberof google.cloud.shell.v1 + * @interface IEnvironment + * @property {string|null} [name] Environment name + * @property {string|null} [id] Environment id + * @property {string|null} [dockerImage] Environment dockerImage + * @property {google.cloud.shell.v1.Environment.State|null} [state] Environment state + * @property {string|null} [webHost] Environment webHost + * @property {string|null} [sshUsername] Environment sshUsername + * @property {string|null} [sshHost] Environment sshHost + * @property {number|null} [sshPort] Environment sshPort + * @property {Array.|null} [publicKeys] Environment publicKeys + */ + + /** + * Constructs a new Environment. + * @memberof google.cloud.shell.v1 + * @classdesc Represents an Environment. + * @implements IEnvironment + * @constructor + * @param {google.cloud.shell.v1.IEnvironment=} [properties] Properties to set + */ + function Environment(properties) { + this.publicKeys = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Environment name. + * @member {string} name + * @memberof google.cloud.shell.v1.Environment + * @instance + */ + Environment.prototype.name = ""; + + /** + * Environment id. + * @member {string} id + * @memberof google.cloud.shell.v1.Environment + * @instance + */ + Environment.prototype.id = ""; + + /** + * Environment dockerImage. + * @member {string} dockerImage + * @memberof google.cloud.shell.v1.Environment + * @instance + */ + Environment.prototype.dockerImage = ""; + + /** + * Environment state. + * @member {google.cloud.shell.v1.Environment.State} state + * @memberof google.cloud.shell.v1.Environment + * @instance + */ + Environment.prototype.state = 0; + + /** + * Environment webHost. + * @member {string} webHost + * @memberof google.cloud.shell.v1.Environment + * @instance + */ + Environment.prototype.webHost = ""; + + /** + * Environment sshUsername. + * @member {string} sshUsername + * @memberof google.cloud.shell.v1.Environment + * @instance + */ + Environment.prototype.sshUsername = ""; + + /** + * Environment sshHost. + * @member {string} sshHost + * @memberof google.cloud.shell.v1.Environment + * @instance + */ + Environment.prototype.sshHost = ""; + + /** + * Environment sshPort. + * @member {number} sshPort + * @memberof google.cloud.shell.v1.Environment + * @instance + */ + Environment.prototype.sshPort = 0; + + /** + * Environment publicKeys. + * @member {Array.} publicKeys + * @memberof google.cloud.shell.v1.Environment + * @instance + */ + Environment.prototype.publicKeys = $util.emptyArray; + + /** + * Creates a new Environment instance using the specified properties. + * @function create + * @memberof google.cloud.shell.v1.Environment + * @static + * @param {google.cloud.shell.v1.IEnvironment=} [properties] Properties to set + * @returns {google.cloud.shell.v1.Environment} Environment instance + */ + Environment.create = function create(properties) { + return new Environment(properties); + }; + + /** + * Encodes the specified Environment message. Does not implicitly {@link google.cloud.shell.v1.Environment.verify|verify} messages. + * @function encode + * @memberof google.cloud.shell.v1.Environment + * @static + * @param {google.cloud.shell.v1.IEnvironment} message Environment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Environment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); + if (message.dockerImage != null && Object.hasOwnProperty.call(message, "dockerImage")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dockerImage); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + if (message.sshUsername != null && Object.hasOwnProperty.call(message, "sshUsername")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.sshUsername); + if (message.sshHost != null && Object.hasOwnProperty.call(message, "sshHost")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.sshHost); + if (message.sshPort != null && Object.hasOwnProperty.call(message, "sshPort")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.sshPort); + if (message.publicKeys != null && message.publicKeys.length) + for (var i = 0; i < message.publicKeys.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.publicKeys[i]); + if (message.webHost != null && Object.hasOwnProperty.call(message, "webHost")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.webHost); + return writer; + }; + + /** + * Encodes the specified Environment message, length delimited. Does not implicitly {@link google.cloud.shell.v1.Environment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.shell.v1.Environment + * @static + * @param {google.cloud.shell.v1.IEnvironment} message Environment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Environment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Environment message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.shell.v1.Environment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.shell.v1.Environment} Environment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Environment.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.shell.v1.Environment(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.id = reader.string(); + break; + case 3: + message.dockerImage = reader.string(); + break; + case 4: + message.state = reader.int32(); + break; + case 12: + message.webHost = reader.string(); + break; + case 5: + message.sshUsername = reader.string(); + break; + case 6: + message.sshHost = reader.string(); + break; + case 7: + message.sshPort = reader.int32(); + break; + case 8: + if (!(message.publicKeys && message.publicKeys.length)) + message.publicKeys = []; + message.publicKeys.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Environment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.shell.v1.Environment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.shell.v1.Environment} Environment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Environment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Environment message. + * @function verify + * @memberof google.cloud.shell.v1.Environment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Environment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.dockerImage != null && message.hasOwnProperty("dockerImage")) + if (!$util.isString(message.dockerImage)) + return "dockerImage: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.webHost != null && message.hasOwnProperty("webHost")) + if (!$util.isString(message.webHost)) + return "webHost: string expected"; + if (message.sshUsername != null && message.hasOwnProperty("sshUsername")) + if (!$util.isString(message.sshUsername)) + return "sshUsername: string expected"; + if (message.sshHost != null && message.hasOwnProperty("sshHost")) + if (!$util.isString(message.sshHost)) + return "sshHost: string expected"; + if (message.sshPort != null && message.hasOwnProperty("sshPort")) + if (!$util.isInteger(message.sshPort)) + return "sshPort: integer expected"; + if (message.publicKeys != null && message.hasOwnProperty("publicKeys")) { + if (!Array.isArray(message.publicKeys)) + return "publicKeys: array expected"; + for (var i = 0; i < message.publicKeys.length; ++i) + if (!$util.isString(message.publicKeys[i])) + return "publicKeys: string[] expected"; + } + return null; + }; + + /** + * Creates an Environment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.shell.v1.Environment + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.shell.v1.Environment} Environment + */ + Environment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.shell.v1.Environment) + return object; + var message = new $root.google.cloud.shell.v1.Environment(); + if (object.name != null) + message.name = String(object.name); + if (object.id != null) + message.id = String(object.id); + if (object.dockerImage != null) + message.dockerImage = String(object.dockerImage); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "SUSPENDED": + case 1: + message.state = 1; + break; + case "PENDING": + case 2: + message.state = 2; + break; + case "RUNNING": + case 3: + message.state = 3; + break; + case "DELETING": + case 4: + message.state = 4; + break; + } + if (object.webHost != null) + message.webHost = String(object.webHost); + if (object.sshUsername != null) + message.sshUsername = String(object.sshUsername); + if (object.sshHost != null) + message.sshHost = String(object.sshHost); + if (object.sshPort != null) + message.sshPort = object.sshPort | 0; + if (object.publicKeys) { + if (!Array.isArray(object.publicKeys)) + throw TypeError(".google.cloud.shell.v1.Environment.publicKeys: array expected"); + message.publicKeys = []; + for (var i = 0; i < object.publicKeys.length; ++i) + message.publicKeys[i] = String(object.publicKeys[i]); + } + return message; + }; + + /** + * Creates a plain object from an Environment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.shell.v1.Environment + * @static + * @param {google.cloud.shell.v1.Environment} message Environment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Environment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.publicKeys = []; + if (options.defaults) { + object.name = ""; + object.id = ""; + object.dockerImage = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.sshUsername = ""; + object.sshHost = ""; + object.sshPort = 0; + object.webHost = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.dockerImage != null && message.hasOwnProperty("dockerImage")) + object.dockerImage = message.dockerImage; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.shell.v1.Environment.State[message.state] : message.state; + if (message.sshUsername != null && message.hasOwnProperty("sshUsername")) + object.sshUsername = message.sshUsername; + if (message.sshHost != null && message.hasOwnProperty("sshHost")) + object.sshHost = message.sshHost; + if (message.sshPort != null && message.hasOwnProperty("sshPort")) + object.sshPort = message.sshPort; + if (message.publicKeys && message.publicKeys.length) { + object.publicKeys = []; + for (var j = 0; j < message.publicKeys.length; ++j) + object.publicKeys[j] = message.publicKeys[j]; + } + if (message.webHost != null && message.hasOwnProperty("webHost")) + object.webHost = message.webHost; + return object; + }; + + /** + * Converts this Environment to JSON. + * @function toJSON + * @memberof google.cloud.shell.v1.Environment + * @instance + * @returns {Object.} JSON object + */ + Environment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * State enum. + * @name google.cloud.shell.v1.Environment.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} SUSPENDED=1 SUSPENDED value + * @property {number} PENDING=2 PENDING value + * @property {number} RUNNING=3 RUNNING value + * @property {number} DELETING=4 DELETING value + */ + Environment.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SUSPENDED"] = 1; + values[valuesById[2] = "PENDING"] = 2; + values[valuesById[3] = "RUNNING"] = 3; + values[valuesById[4] = "DELETING"] = 4; + return values; + })(); + + return Environment; + })(); + + v1.GetEnvironmentRequest = (function() { + + /** + * Properties of a GetEnvironmentRequest. + * @memberof google.cloud.shell.v1 + * @interface IGetEnvironmentRequest + * @property {string|null} [name] GetEnvironmentRequest name + */ + + /** + * Constructs a new GetEnvironmentRequest. + * @memberof google.cloud.shell.v1 + * @classdesc Represents a GetEnvironmentRequest. + * @implements IGetEnvironmentRequest + * @constructor + * @param {google.cloud.shell.v1.IGetEnvironmentRequest=} [properties] Properties to set + */ + function GetEnvironmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetEnvironmentRequest name. + * @member {string} name + * @memberof google.cloud.shell.v1.GetEnvironmentRequest + * @instance + */ + GetEnvironmentRequest.prototype.name = ""; + + /** + * Creates a new GetEnvironmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.shell.v1.GetEnvironmentRequest + * @static + * @param {google.cloud.shell.v1.IGetEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.shell.v1.GetEnvironmentRequest} GetEnvironmentRequest instance + */ + GetEnvironmentRequest.create = function create(properties) { + return new GetEnvironmentRequest(properties); + }; + + /** + * Encodes the specified GetEnvironmentRequest message. Does not implicitly {@link google.cloud.shell.v1.GetEnvironmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.shell.v1.GetEnvironmentRequest + * @static + * @param {google.cloud.shell.v1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEnvironmentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.shell.v1.GetEnvironmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.shell.v1.GetEnvironmentRequest + * @static + * @param {google.cloud.shell.v1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetEnvironmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.shell.v1.GetEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.shell.v1.GetEnvironmentRequest} GetEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEnvironmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.shell.v1.GetEnvironmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetEnvironmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.shell.v1.GetEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.shell.v1.GetEnvironmentRequest} GetEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetEnvironmentRequest message. + * @function verify + * @memberof google.cloud.shell.v1.GetEnvironmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetEnvironmentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.shell.v1.GetEnvironmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.shell.v1.GetEnvironmentRequest} GetEnvironmentRequest + */ + GetEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.shell.v1.GetEnvironmentRequest) + return object; + var message = new $root.google.cloud.shell.v1.GetEnvironmentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetEnvironmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.shell.v1.GetEnvironmentRequest + * @static + * @param {google.cloud.shell.v1.GetEnvironmentRequest} message GetEnvironmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetEnvironmentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetEnvironmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.shell.v1.GetEnvironmentRequest + * @instance + * @returns {Object.} JSON object + */ + GetEnvironmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetEnvironmentRequest; + })(); + + v1.CreateEnvironmentMetadata = (function() { + + /** + * Properties of a CreateEnvironmentMetadata. + * @memberof google.cloud.shell.v1 + * @interface ICreateEnvironmentMetadata + */ + + /** + * Constructs a new CreateEnvironmentMetadata. + * @memberof google.cloud.shell.v1 + * @classdesc Represents a CreateEnvironmentMetadata. + * @implements ICreateEnvironmentMetadata + * @constructor + * @param {google.cloud.shell.v1.ICreateEnvironmentMetadata=} [properties] Properties to set + */ + function CreateEnvironmentMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new CreateEnvironmentMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.shell.v1.CreateEnvironmentMetadata + * @static + * @param {google.cloud.shell.v1.ICreateEnvironmentMetadata=} [properties] Properties to set + * @returns {google.cloud.shell.v1.CreateEnvironmentMetadata} CreateEnvironmentMetadata instance + */ + CreateEnvironmentMetadata.create = function create(properties) { + return new CreateEnvironmentMetadata(properties); + }; + + /** + * Encodes the specified CreateEnvironmentMetadata message. Does not implicitly {@link google.cloud.shell.v1.CreateEnvironmentMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.shell.v1.CreateEnvironmentMetadata + * @static + * @param {google.cloud.shell.v1.ICreateEnvironmentMetadata} message CreateEnvironmentMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateEnvironmentMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified CreateEnvironmentMetadata message, length delimited. Does not implicitly {@link google.cloud.shell.v1.CreateEnvironmentMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.shell.v1.CreateEnvironmentMetadata + * @static + * @param {google.cloud.shell.v1.ICreateEnvironmentMetadata} message CreateEnvironmentMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateEnvironmentMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateEnvironmentMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.shell.v1.CreateEnvironmentMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.shell.v1.CreateEnvironmentMetadata} CreateEnvironmentMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateEnvironmentMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.shell.v1.CreateEnvironmentMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateEnvironmentMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.shell.v1.CreateEnvironmentMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.shell.v1.CreateEnvironmentMetadata} CreateEnvironmentMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateEnvironmentMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateEnvironmentMetadata message. + * @function verify + * @memberof google.cloud.shell.v1.CreateEnvironmentMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateEnvironmentMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a CreateEnvironmentMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.shell.v1.CreateEnvironmentMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.shell.v1.CreateEnvironmentMetadata} CreateEnvironmentMetadata + */ + CreateEnvironmentMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.shell.v1.CreateEnvironmentMetadata) + return object; + return new $root.google.cloud.shell.v1.CreateEnvironmentMetadata(); + }; + + /** + * Creates a plain object from a CreateEnvironmentMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.shell.v1.CreateEnvironmentMetadata + * @static + * @param {google.cloud.shell.v1.CreateEnvironmentMetadata} message CreateEnvironmentMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateEnvironmentMetadata.toObject = function toObject() { + return {}; + }; + + /** + * Converts this CreateEnvironmentMetadata to JSON. + * @function toJSON + * @memberof google.cloud.shell.v1.CreateEnvironmentMetadata + * @instance + * @returns {Object.} JSON object + */ + CreateEnvironmentMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateEnvironmentMetadata; + })(); + + v1.DeleteEnvironmentMetadata = (function() { + + /** + * Properties of a DeleteEnvironmentMetadata. + * @memberof google.cloud.shell.v1 + * @interface IDeleteEnvironmentMetadata + */ + + /** + * Constructs a new DeleteEnvironmentMetadata. + * @memberof google.cloud.shell.v1 + * @classdesc Represents a DeleteEnvironmentMetadata. + * @implements IDeleteEnvironmentMetadata + * @constructor + * @param {google.cloud.shell.v1.IDeleteEnvironmentMetadata=} [properties] Properties to set + */ + function DeleteEnvironmentMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new DeleteEnvironmentMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.shell.v1.DeleteEnvironmentMetadata + * @static + * @param {google.cloud.shell.v1.IDeleteEnvironmentMetadata=} [properties] Properties to set + * @returns {google.cloud.shell.v1.DeleteEnvironmentMetadata} DeleteEnvironmentMetadata instance + */ + DeleteEnvironmentMetadata.create = function create(properties) { + return new DeleteEnvironmentMetadata(properties); + }; + + /** + * Encodes the specified DeleteEnvironmentMetadata message. Does not implicitly {@link google.cloud.shell.v1.DeleteEnvironmentMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.shell.v1.DeleteEnvironmentMetadata + * @static + * @param {google.cloud.shell.v1.IDeleteEnvironmentMetadata} message DeleteEnvironmentMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteEnvironmentMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified DeleteEnvironmentMetadata message, length delimited. Does not implicitly {@link google.cloud.shell.v1.DeleteEnvironmentMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.shell.v1.DeleteEnvironmentMetadata + * @static + * @param {google.cloud.shell.v1.IDeleteEnvironmentMetadata} message DeleteEnvironmentMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteEnvironmentMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteEnvironmentMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.shell.v1.DeleteEnvironmentMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.shell.v1.DeleteEnvironmentMetadata} DeleteEnvironmentMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteEnvironmentMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.shell.v1.DeleteEnvironmentMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteEnvironmentMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.shell.v1.DeleteEnvironmentMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.shell.v1.DeleteEnvironmentMetadata} DeleteEnvironmentMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteEnvironmentMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteEnvironmentMetadata message. + * @function verify + * @memberof google.cloud.shell.v1.DeleteEnvironmentMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteEnvironmentMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a DeleteEnvironmentMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.shell.v1.DeleteEnvironmentMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.shell.v1.DeleteEnvironmentMetadata} DeleteEnvironmentMetadata + */ + DeleteEnvironmentMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.shell.v1.DeleteEnvironmentMetadata) + return object; + return new $root.google.cloud.shell.v1.DeleteEnvironmentMetadata(); + }; + + /** + * Creates a plain object from a DeleteEnvironmentMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.shell.v1.DeleteEnvironmentMetadata + * @static + * @param {google.cloud.shell.v1.DeleteEnvironmentMetadata} message DeleteEnvironmentMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteEnvironmentMetadata.toObject = function toObject() { + return {}; + }; + + /** + * Converts this DeleteEnvironmentMetadata to JSON. + * @function toJSON + * @memberof google.cloud.shell.v1.DeleteEnvironmentMetadata + * @instance + * @returns {Object.} JSON object + */ + DeleteEnvironmentMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteEnvironmentMetadata; + })(); + + v1.StartEnvironmentRequest = (function() { + + /** + * Properties of a StartEnvironmentRequest. + * @memberof google.cloud.shell.v1 + * @interface IStartEnvironmentRequest + * @property {string|null} [name] StartEnvironmentRequest name + * @property {string|null} [accessToken] StartEnvironmentRequest accessToken + * @property {Array.|null} [publicKeys] StartEnvironmentRequest publicKeys + */ + + /** + * Constructs a new StartEnvironmentRequest. + * @memberof google.cloud.shell.v1 + * @classdesc Represents a StartEnvironmentRequest. + * @implements IStartEnvironmentRequest + * @constructor + * @param {google.cloud.shell.v1.IStartEnvironmentRequest=} [properties] Properties to set + */ + function StartEnvironmentRequest(properties) { + this.publicKeys = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StartEnvironmentRequest name. + * @member {string} name + * @memberof google.cloud.shell.v1.StartEnvironmentRequest + * @instance + */ + StartEnvironmentRequest.prototype.name = ""; + + /** + * StartEnvironmentRequest accessToken. + * @member {string} accessToken + * @memberof google.cloud.shell.v1.StartEnvironmentRequest + * @instance + */ + StartEnvironmentRequest.prototype.accessToken = ""; + + /** + * StartEnvironmentRequest publicKeys. + * @member {Array.} publicKeys + * @memberof google.cloud.shell.v1.StartEnvironmentRequest + * @instance + */ + StartEnvironmentRequest.prototype.publicKeys = $util.emptyArray; + + /** + * Creates a new StartEnvironmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.shell.v1.StartEnvironmentRequest + * @static + * @param {google.cloud.shell.v1.IStartEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.shell.v1.StartEnvironmentRequest} StartEnvironmentRequest instance + */ + StartEnvironmentRequest.create = function create(properties) { + return new StartEnvironmentRequest(properties); + }; + + /** + * Encodes the specified StartEnvironmentRequest message. Does not implicitly {@link google.cloud.shell.v1.StartEnvironmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.shell.v1.StartEnvironmentRequest + * @static + * @param {google.cloud.shell.v1.IStartEnvironmentRequest} message StartEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartEnvironmentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.accessToken != null && Object.hasOwnProperty.call(message, "accessToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.accessToken); + if (message.publicKeys != null && message.publicKeys.length) + for (var i = 0; i < message.publicKeys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.publicKeys[i]); + return writer; + }; + + /** + * Encodes the specified StartEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.shell.v1.StartEnvironmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.shell.v1.StartEnvironmentRequest + * @static + * @param {google.cloud.shell.v1.IStartEnvironmentRequest} message StartEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StartEnvironmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.shell.v1.StartEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.shell.v1.StartEnvironmentRequest} StartEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartEnvironmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.shell.v1.StartEnvironmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.accessToken = reader.string(); + break; + case 3: + if (!(message.publicKeys && message.publicKeys.length)) + message.publicKeys = []; + message.publicKeys.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StartEnvironmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.shell.v1.StartEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.shell.v1.StartEnvironmentRequest} StartEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StartEnvironmentRequest message. + * @function verify + * @memberof google.cloud.shell.v1.StartEnvironmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StartEnvironmentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.accessToken != null && message.hasOwnProperty("accessToken")) + if (!$util.isString(message.accessToken)) + return "accessToken: string expected"; + if (message.publicKeys != null && message.hasOwnProperty("publicKeys")) { + if (!Array.isArray(message.publicKeys)) + return "publicKeys: array expected"; + for (var i = 0; i < message.publicKeys.length; ++i) + if (!$util.isString(message.publicKeys[i])) + return "publicKeys: string[] expected"; + } + return null; + }; + + /** + * Creates a StartEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.shell.v1.StartEnvironmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.shell.v1.StartEnvironmentRequest} StartEnvironmentRequest + */ + StartEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.shell.v1.StartEnvironmentRequest) + return object; + var message = new $root.google.cloud.shell.v1.StartEnvironmentRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.accessToken != null) + message.accessToken = String(object.accessToken); + if (object.publicKeys) { + if (!Array.isArray(object.publicKeys)) + throw TypeError(".google.cloud.shell.v1.StartEnvironmentRequest.publicKeys: array expected"); + message.publicKeys = []; + for (var i = 0; i < object.publicKeys.length; ++i) + message.publicKeys[i] = String(object.publicKeys[i]); + } + return message; + }; + + /** + * Creates a plain object from a StartEnvironmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.shell.v1.StartEnvironmentRequest + * @static + * @param {google.cloud.shell.v1.StartEnvironmentRequest} message StartEnvironmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StartEnvironmentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.publicKeys = []; + if (options.defaults) { + object.name = ""; + object.accessToken = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.accessToken != null && message.hasOwnProperty("accessToken")) + object.accessToken = message.accessToken; + if (message.publicKeys && message.publicKeys.length) { + object.publicKeys = []; + for (var j = 0; j < message.publicKeys.length; ++j) + object.publicKeys[j] = message.publicKeys[j]; + } + return object; + }; + + /** + * Converts this StartEnvironmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.shell.v1.StartEnvironmentRequest + * @instance + * @returns {Object.} JSON object + */ + StartEnvironmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return StartEnvironmentRequest; + })(); + + v1.AuthorizeEnvironmentRequest = (function() { + + /** + * Properties of an AuthorizeEnvironmentRequest. + * @memberof google.cloud.shell.v1 + * @interface IAuthorizeEnvironmentRequest + * @property {string|null} [name] AuthorizeEnvironmentRequest name + * @property {string|null} [accessToken] AuthorizeEnvironmentRequest accessToken + * @property {string|null} [idToken] AuthorizeEnvironmentRequest idToken + * @property {google.protobuf.ITimestamp|null} [expireTime] AuthorizeEnvironmentRequest expireTime + */ + + /** + * Constructs a new AuthorizeEnvironmentRequest. + * @memberof google.cloud.shell.v1 + * @classdesc Represents an AuthorizeEnvironmentRequest. + * @implements IAuthorizeEnvironmentRequest + * @constructor + * @param {google.cloud.shell.v1.IAuthorizeEnvironmentRequest=} [properties] Properties to set + */ + function AuthorizeEnvironmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuthorizeEnvironmentRequest name. + * @member {string} name + * @memberof google.cloud.shell.v1.AuthorizeEnvironmentRequest + * @instance + */ + AuthorizeEnvironmentRequest.prototype.name = ""; + + /** + * AuthorizeEnvironmentRequest accessToken. + * @member {string} accessToken + * @memberof google.cloud.shell.v1.AuthorizeEnvironmentRequest + * @instance + */ + AuthorizeEnvironmentRequest.prototype.accessToken = ""; + + /** + * AuthorizeEnvironmentRequest idToken. + * @member {string} idToken + * @memberof google.cloud.shell.v1.AuthorizeEnvironmentRequest + * @instance + */ + AuthorizeEnvironmentRequest.prototype.idToken = ""; + + /** + * AuthorizeEnvironmentRequest expireTime. + * @member {google.protobuf.ITimestamp|null|undefined} expireTime + * @memberof google.cloud.shell.v1.AuthorizeEnvironmentRequest + * @instance + */ + AuthorizeEnvironmentRequest.prototype.expireTime = null; + + /** + * Creates a new AuthorizeEnvironmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.shell.v1.AuthorizeEnvironmentRequest + * @static + * @param {google.cloud.shell.v1.IAuthorizeEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.shell.v1.AuthorizeEnvironmentRequest} AuthorizeEnvironmentRequest instance + */ + AuthorizeEnvironmentRequest.create = function create(properties) { + return new AuthorizeEnvironmentRequest(properties); + }; + + /** + * Encodes the specified AuthorizeEnvironmentRequest message. Does not implicitly {@link google.cloud.shell.v1.AuthorizeEnvironmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.shell.v1.AuthorizeEnvironmentRequest + * @static + * @param {google.cloud.shell.v1.IAuthorizeEnvironmentRequest} message AuthorizeEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuthorizeEnvironmentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.accessToken != null && Object.hasOwnProperty.call(message, "accessToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.accessToken); + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.idToken != null && Object.hasOwnProperty.call(message, "idToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.idToken); + return writer; + }; + + /** + * Encodes the specified AuthorizeEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.shell.v1.AuthorizeEnvironmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.shell.v1.AuthorizeEnvironmentRequest + * @static + * @param {google.cloud.shell.v1.IAuthorizeEnvironmentRequest} message AuthorizeEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuthorizeEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuthorizeEnvironmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.shell.v1.AuthorizeEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.shell.v1.AuthorizeEnvironmentRequest} AuthorizeEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuthorizeEnvironmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.shell.v1.AuthorizeEnvironmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.accessToken = reader.string(); + break; + case 4: + message.idToken = reader.string(); + break; + case 3: + message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuthorizeEnvironmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.shell.v1.AuthorizeEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.shell.v1.AuthorizeEnvironmentRequest} AuthorizeEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuthorizeEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuthorizeEnvironmentRequest message. + * @function verify + * @memberof google.cloud.shell.v1.AuthorizeEnvironmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuthorizeEnvironmentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.accessToken != null && message.hasOwnProperty("accessToken")) + if (!$util.isString(message.accessToken)) + return "accessToken: string expected"; + if (message.idToken != null && message.hasOwnProperty("idToken")) + if (!$util.isString(message.idToken)) + return "idToken: string expected"; + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.expireTime); + if (error) + return "expireTime." + error; + } + return null; + }; + + /** + * Creates an AuthorizeEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.shell.v1.AuthorizeEnvironmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.shell.v1.AuthorizeEnvironmentRequest} AuthorizeEnvironmentRequest + */ + AuthorizeEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.shell.v1.AuthorizeEnvironmentRequest) + return object; + var message = new $root.google.cloud.shell.v1.AuthorizeEnvironmentRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.accessToken != null) + message.accessToken = String(object.accessToken); + if (object.idToken != null) + message.idToken = String(object.idToken); + if (object.expireTime != null) { + if (typeof object.expireTime !== "object") + throw TypeError(".google.cloud.shell.v1.AuthorizeEnvironmentRequest.expireTime: object expected"); + message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); + } + return message; + }; + + /** + * Creates a plain object from an AuthorizeEnvironmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.shell.v1.AuthorizeEnvironmentRequest + * @static + * @param {google.cloud.shell.v1.AuthorizeEnvironmentRequest} message AuthorizeEnvironmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuthorizeEnvironmentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.accessToken = ""; + object.expireTime = null; + object.idToken = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.accessToken != null && message.hasOwnProperty("accessToken")) + object.accessToken = message.accessToken; + if (message.expireTime != null && message.hasOwnProperty("expireTime")) + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); + if (message.idToken != null && message.hasOwnProperty("idToken")) + object.idToken = message.idToken; + return object; + }; + + /** + * Converts this AuthorizeEnvironmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.shell.v1.AuthorizeEnvironmentRequest + * @instance + * @returns {Object.} JSON object + */ + AuthorizeEnvironmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AuthorizeEnvironmentRequest; + })(); + + v1.AuthorizeEnvironmentResponse = (function() { + + /** + * Properties of an AuthorizeEnvironmentResponse. + * @memberof google.cloud.shell.v1 + * @interface IAuthorizeEnvironmentResponse + */ + + /** + * Constructs a new AuthorizeEnvironmentResponse. + * @memberof google.cloud.shell.v1 + * @classdesc Represents an AuthorizeEnvironmentResponse. + * @implements IAuthorizeEnvironmentResponse + * @constructor + * @param {google.cloud.shell.v1.IAuthorizeEnvironmentResponse=} [properties] Properties to set + */ + function AuthorizeEnvironmentResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new AuthorizeEnvironmentResponse instance using the specified properties. + * @function create + * @memberof google.cloud.shell.v1.AuthorizeEnvironmentResponse + * @static + * @param {google.cloud.shell.v1.IAuthorizeEnvironmentResponse=} [properties] Properties to set + * @returns {google.cloud.shell.v1.AuthorizeEnvironmentResponse} AuthorizeEnvironmentResponse instance + */ + AuthorizeEnvironmentResponse.create = function create(properties) { + return new AuthorizeEnvironmentResponse(properties); + }; + + /** + * Encodes the specified AuthorizeEnvironmentResponse message. Does not implicitly {@link google.cloud.shell.v1.AuthorizeEnvironmentResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.shell.v1.AuthorizeEnvironmentResponse + * @static + * @param {google.cloud.shell.v1.IAuthorizeEnvironmentResponse} message AuthorizeEnvironmentResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuthorizeEnvironmentResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified AuthorizeEnvironmentResponse message, length delimited. Does not implicitly {@link google.cloud.shell.v1.AuthorizeEnvironmentResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.shell.v1.AuthorizeEnvironmentResponse + * @static + * @param {google.cloud.shell.v1.IAuthorizeEnvironmentResponse} message AuthorizeEnvironmentResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuthorizeEnvironmentResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuthorizeEnvironmentResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.shell.v1.AuthorizeEnvironmentResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.shell.v1.AuthorizeEnvironmentResponse} AuthorizeEnvironmentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuthorizeEnvironmentResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.shell.v1.AuthorizeEnvironmentResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuthorizeEnvironmentResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.shell.v1.AuthorizeEnvironmentResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.shell.v1.AuthorizeEnvironmentResponse} AuthorizeEnvironmentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuthorizeEnvironmentResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuthorizeEnvironmentResponse message. + * @function verify + * @memberof google.cloud.shell.v1.AuthorizeEnvironmentResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuthorizeEnvironmentResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an AuthorizeEnvironmentResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.shell.v1.AuthorizeEnvironmentResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.shell.v1.AuthorizeEnvironmentResponse} AuthorizeEnvironmentResponse + */ + AuthorizeEnvironmentResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.shell.v1.AuthorizeEnvironmentResponse) + return object; + return new $root.google.cloud.shell.v1.AuthorizeEnvironmentResponse(); + }; + + /** + * Creates a plain object from an AuthorizeEnvironmentResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.shell.v1.AuthorizeEnvironmentResponse + * @static + * @param {google.cloud.shell.v1.AuthorizeEnvironmentResponse} message AuthorizeEnvironmentResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuthorizeEnvironmentResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this AuthorizeEnvironmentResponse to JSON. + * @function toJSON + * @memberof google.cloud.shell.v1.AuthorizeEnvironmentResponse + * @instance + * @returns {Object.} JSON object + */ + AuthorizeEnvironmentResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AuthorizeEnvironmentResponse; + })(); + + v1.AuthorizeEnvironmentMetadata = (function() { + + /** + * Properties of an AuthorizeEnvironmentMetadata. + * @memberof google.cloud.shell.v1 + * @interface IAuthorizeEnvironmentMetadata + */ + + /** + * Constructs a new AuthorizeEnvironmentMetadata. + * @memberof google.cloud.shell.v1 + * @classdesc Represents an AuthorizeEnvironmentMetadata. + * @implements IAuthorizeEnvironmentMetadata + * @constructor + * @param {google.cloud.shell.v1.IAuthorizeEnvironmentMetadata=} [properties] Properties to set + */ + function AuthorizeEnvironmentMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new AuthorizeEnvironmentMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.shell.v1.AuthorizeEnvironmentMetadata + * @static + * @param {google.cloud.shell.v1.IAuthorizeEnvironmentMetadata=} [properties] Properties to set + * @returns {google.cloud.shell.v1.AuthorizeEnvironmentMetadata} AuthorizeEnvironmentMetadata instance + */ + AuthorizeEnvironmentMetadata.create = function create(properties) { + return new AuthorizeEnvironmentMetadata(properties); + }; + + /** + * Encodes the specified AuthorizeEnvironmentMetadata message. Does not implicitly {@link google.cloud.shell.v1.AuthorizeEnvironmentMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.shell.v1.AuthorizeEnvironmentMetadata + * @static + * @param {google.cloud.shell.v1.IAuthorizeEnvironmentMetadata} message AuthorizeEnvironmentMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuthorizeEnvironmentMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified AuthorizeEnvironmentMetadata message, length delimited. Does not implicitly {@link google.cloud.shell.v1.AuthorizeEnvironmentMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.shell.v1.AuthorizeEnvironmentMetadata + * @static + * @param {google.cloud.shell.v1.IAuthorizeEnvironmentMetadata} message AuthorizeEnvironmentMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuthorizeEnvironmentMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuthorizeEnvironmentMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.shell.v1.AuthorizeEnvironmentMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.shell.v1.AuthorizeEnvironmentMetadata} AuthorizeEnvironmentMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuthorizeEnvironmentMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.shell.v1.AuthorizeEnvironmentMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuthorizeEnvironmentMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.shell.v1.AuthorizeEnvironmentMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.shell.v1.AuthorizeEnvironmentMetadata} AuthorizeEnvironmentMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuthorizeEnvironmentMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuthorizeEnvironmentMetadata message. + * @function verify + * @memberof google.cloud.shell.v1.AuthorizeEnvironmentMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuthorizeEnvironmentMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an AuthorizeEnvironmentMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.shell.v1.AuthorizeEnvironmentMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.shell.v1.AuthorizeEnvironmentMetadata} AuthorizeEnvironmentMetadata + */ + AuthorizeEnvironmentMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.shell.v1.AuthorizeEnvironmentMetadata) + return object; + return new $root.google.cloud.shell.v1.AuthorizeEnvironmentMetadata(); + }; + + /** + * Creates a plain object from an AuthorizeEnvironmentMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.shell.v1.AuthorizeEnvironmentMetadata + * @static + * @param {google.cloud.shell.v1.AuthorizeEnvironmentMetadata} message AuthorizeEnvironmentMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuthorizeEnvironmentMetadata.toObject = function toObject() { + return {}; + }; + + /** + * Converts this AuthorizeEnvironmentMetadata to JSON. + * @function toJSON + * @memberof google.cloud.shell.v1.AuthorizeEnvironmentMetadata + * @instance + * @returns {Object.} JSON object + */ + AuthorizeEnvironmentMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AuthorizeEnvironmentMetadata; + })(); + + v1.StartEnvironmentMetadata = (function() { + + /** + * Properties of a StartEnvironmentMetadata. + * @memberof google.cloud.shell.v1 + * @interface IStartEnvironmentMetadata + * @property {google.cloud.shell.v1.StartEnvironmentMetadata.State|null} [state] StartEnvironmentMetadata state + */ + + /** + * Constructs a new StartEnvironmentMetadata. + * @memberof google.cloud.shell.v1 + * @classdesc Represents a StartEnvironmentMetadata. + * @implements IStartEnvironmentMetadata + * @constructor + * @param {google.cloud.shell.v1.IStartEnvironmentMetadata=} [properties] Properties to set + */ + function StartEnvironmentMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StartEnvironmentMetadata state. + * @member {google.cloud.shell.v1.StartEnvironmentMetadata.State} state + * @memberof google.cloud.shell.v1.StartEnvironmentMetadata + * @instance + */ + StartEnvironmentMetadata.prototype.state = 0; + + /** + * Creates a new StartEnvironmentMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.shell.v1.StartEnvironmentMetadata + * @static + * @param {google.cloud.shell.v1.IStartEnvironmentMetadata=} [properties] Properties to set + * @returns {google.cloud.shell.v1.StartEnvironmentMetadata} StartEnvironmentMetadata instance + */ + StartEnvironmentMetadata.create = function create(properties) { + return new StartEnvironmentMetadata(properties); + }; + + /** + * Encodes the specified StartEnvironmentMetadata message. Does not implicitly {@link google.cloud.shell.v1.StartEnvironmentMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.shell.v1.StartEnvironmentMetadata + * @static + * @param {google.cloud.shell.v1.IStartEnvironmentMetadata} message StartEnvironmentMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartEnvironmentMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + return writer; + }; + + /** + * Encodes the specified StartEnvironmentMetadata message, length delimited. Does not implicitly {@link google.cloud.shell.v1.StartEnvironmentMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.shell.v1.StartEnvironmentMetadata + * @static + * @param {google.cloud.shell.v1.IStartEnvironmentMetadata} message StartEnvironmentMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartEnvironmentMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StartEnvironmentMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.shell.v1.StartEnvironmentMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.shell.v1.StartEnvironmentMetadata} StartEnvironmentMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartEnvironmentMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.shell.v1.StartEnvironmentMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.state = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StartEnvironmentMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.shell.v1.StartEnvironmentMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.shell.v1.StartEnvironmentMetadata} StartEnvironmentMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartEnvironmentMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StartEnvironmentMetadata message. + * @function verify + * @memberof google.cloud.shell.v1.StartEnvironmentMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StartEnvironmentMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 4: + case 3: + break; + } + return null; + }; + + /** + * Creates a StartEnvironmentMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.shell.v1.StartEnvironmentMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.shell.v1.StartEnvironmentMetadata} StartEnvironmentMetadata + */ + StartEnvironmentMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.shell.v1.StartEnvironmentMetadata) + return object; + var message = new $root.google.cloud.shell.v1.StartEnvironmentMetadata(); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "STARTING": + case 1: + message.state = 1; + break; + case "UNARCHIVING_DISK": + case 2: + message.state = 2; + break; + case "AWAITING_COMPUTE_RESOURCES": + case 4: + message.state = 4; + break; + case "FINISHED": + case 3: + message.state = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a StartEnvironmentMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.shell.v1.StartEnvironmentMetadata + * @static + * @param {google.cloud.shell.v1.StartEnvironmentMetadata} message StartEnvironmentMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StartEnvironmentMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.shell.v1.StartEnvironmentMetadata.State[message.state] : message.state; + return object; + }; + + /** + * Converts this StartEnvironmentMetadata to JSON. + * @function toJSON + * @memberof google.cloud.shell.v1.StartEnvironmentMetadata + * @instance + * @returns {Object.} JSON object + */ + StartEnvironmentMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * State enum. + * @name google.cloud.shell.v1.StartEnvironmentMetadata.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} STARTING=1 STARTING value + * @property {number} UNARCHIVING_DISK=2 UNARCHIVING_DISK value + * @property {number} AWAITING_COMPUTE_RESOURCES=4 AWAITING_COMPUTE_RESOURCES value + * @property {number} FINISHED=3 FINISHED value + */ + StartEnvironmentMetadata.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "STARTING"] = 1; + values[valuesById[2] = "UNARCHIVING_DISK"] = 2; + values[valuesById[4] = "AWAITING_COMPUTE_RESOURCES"] = 4; + values[valuesById[3] = "FINISHED"] = 3; + return values; + })(); + + return StartEnvironmentMetadata; + })(); + + v1.StartEnvironmentResponse = (function() { + + /** + * Properties of a StartEnvironmentResponse. + * @memberof google.cloud.shell.v1 + * @interface IStartEnvironmentResponse + * @property {google.cloud.shell.v1.IEnvironment|null} [environment] StartEnvironmentResponse environment + */ + + /** + * Constructs a new StartEnvironmentResponse. + * @memberof google.cloud.shell.v1 + * @classdesc Represents a StartEnvironmentResponse. + * @implements IStartEnvironmentResponse + * @constructor + * @param {google.cloud.shell.v1.IStartEnvironmentResponse=} [properties] Properties to set + */ + function StartEnvironmentResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StartEnvironmentResponse environment. + * @member {google.cloud.shell.v1.IEnvironment|null|undefined} environment + * @memberof google.cloud.shell.v1.StartEnvironmentResponse + * @instance + */ + StartEnvironmentResponse.prototype.environment = null; + + /** + * Creates a new StartEnvironmentResponse instance using the specified properties. + * @function create + * @memberof google.cloud.shell.v1.StartEnvironmentResponse + * @static + * @param {google.cloud.shell.v1.IStartEnvironmentResponse=} [properties] Properties to set + * @returns {google.cloud.shell.v1.StartEnvironmentResponse} StartEnvironmentResponse instance + */ + StartEnvironmentResponse.create = function create(properties) { + return new StartEnvironmentResponse(properties); + }; + + /** + * Encodes the specified StartEnvironmentResponse message. Does not implicitly {@link google.cloud.shell.v1.StartEnvironmentResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.shell.v1.StartEnvironmentResponse + * @static + * @param {google.cloud.shell.v1.IStartEnvironmentResponse} message StartEnvironmentResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartEnvironmentResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + $root.google.cloud.shell.v1.Environment.encode(message.environment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified StartEnvironmentResponse message, length delimited. Does not implicitly {@link google.cloud.shell.v1.StartEnvironmentResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.shell.v1.StartEnvironmentResponse + * @static + * @param {google.cloud.shell.v1.IStartEnvironmentResponse} message StartEnvironmentResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartEnvironmentResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StartEnvironmentResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.shell.v1.StartEnvironmentResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.shell.v1.StartEnvironmentResponse} StartEnvironmentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartEnvironmentResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.shell.v1.StartEnvironmentResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.environment = $root.google.cloud.shell.v1.Environment.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StartEnvironmentResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.shell.v1.StartEnvironmentResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.shell.v1.StartEnvironmentResponse} StartEnvironmentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartEnvironmentResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StartEnvironmentResponse message. + * @function verify + * @memberof google.cloud.shell.v1.StartEnvironmentResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StartEnvironmentResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.environment != null && message.hasOwnProperty("environment")) { + var error = $root.google.cloud.shell.v1.Environment.verify(message.environment); + if (error) + return "environment." + error; + } + return null; + }; + + /** + * Creates a StartEnvironmentResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.shell.v1.StartEnvironmentResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.shell.v1.StartEnvironmentResponse} StartEnvironmentResponse + */ + StartEnvironmentResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.shell.v1.StartEnvironmentResponse) + return object; + var message = new $root.google.cloud.shell.v1.StartEnvironmentResponse(); + if (object.environment != null) { + if (typeof object.environment !== "object") + throw TypeError(".google.cloud.shell.v1.StartEnvironmentResponse.environment: object expected"); + message.environment = $root.google.cloud.shell.v1.Environment.fromObject(object.environment); + } + return message; + }; + + /** + * Creates a plain object from a StartEnvironmentResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.shell.v1.StartEnvironmentResponse + * @static + * @param {google.cloud.shell.v1.StartEnvironmentResponse} message StartEnvironmentResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StartEnvironmentResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.environment = null; + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = $root.google.cloud.shell.v1.Environment.toObject(message.environment, options); + return object; + }; + + /** + * Converts this StartEnvironmentResponse to JSON. + * @function toJSON + * @memberof google.cloud.shell.v1.StartEnvironmentResponse + * @instance + * @returns {Object.} JSON object + */ + StartEnvironmentResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return StartEnvironmentResponse; + })(); + + v1.AddPublicKeyRequest = (function() { + + /** + * Properties of an AddPublicKeyRequest. + * @memberof google.cloud.shell.v1 + * @interface IAddPublicKeyRequest + * @property {string|null} [environment] AddPublicKeyRequest environment + * @property {string|null} [key] AddPublicKeyRequest key + */ + + /** + * Constructs a new AddPublicKeyRequest. + * @memberof google.cloud.shell.v1 + * @classdesc Represents an AddPublicKeyRequest. + * @implements IAddPublicKeyRequest + * @constructor + * @param {google.cloud.shell.v1.IAddPublicKeyRequest=} [properties] Properties to set + */ + function AddPublicKeyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AddPublicKeyRequest environment. + * @member {string} environment + * @memberof google.cloud.shell.v1.AddPublicKeyRequest + * @instance + */ + AddPublicKeyRequest.prototype.environment = ""; + + /** + * AddPublicKeyRequest key. + * @member {string} key + * @memberof google.cloud.shell.v1.AddPublicKeyRequest + * @instance + */ + AddPublicKeyRequest.prototype.key = ""; + + /** + * Creates a new AddPublicKeyRequest instance using the specified properties. + * @function create + * @memberof google.cloud.shell.v1.AddPublicKeyRequest + * @static + * @param {google.cloud.shell.v1.IAddPublicKeyRequest=} [properties] Properties to set + * @returns {google.cloud.shell.v1.AddPublicKeyRequest} AddPublicKeyRequest instance + */ + AddPublicKeyRequest.create = function create(properties) { + return new AddPublicKeyRequest(properties); + }; + + /** + * Encodes the specified AddPublicKeyRequest message. Does not implicitly {@link google.cloud.shell.v1.AddPublicKeyRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.shell.v1.AddPublicKeyRequest + * @static + * @param {google.cloud.shell.v1.IAddPublicKeyRequest} message AddPublicKeyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddPublicKeyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.key); + return writer; + }; + + /** + * Encodes the specified AddPublicKeyRequest message, length delimited. Does not implicitly {@link google.cloud.shell.v1.AddPublicKeyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.shell.v1.AddPublicKeyRequest + * @static + * @param {google.cloud.shell.v1.IAddPublicKeyRequest} message AddPublicKeyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddPublicKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AddPublicKeyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.shell.v1.AddPublicKeyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.shell.v1.AddPublicKeyRequest} AddPublicKeyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddPublicKeyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.shell.v1.AddPublicKeyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.environment = reader.string(); + break; + case 2: + message.key = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AddPublicKeyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.shell.v1.AddPublicKeyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.shell.v1.AddPublicKeyRequest} AddPublicKeyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddPublicKeyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AddPublicKeyRequest message. + * @function verify + * @memberof google.cloud.shell.v1.AddPublicKeyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AddPublicKeyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.environment != null && message.hasOwnProperty("environment")) + if (!$util.isString(message.environment)) + return "environment: string expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + return null; + }; + + /** + * Creates an AddPublicKeyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.shell.v1.AddPublicKeyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.shell.v1.AddPublicKeyRequest} AddPublicKeyRequest + */ + AddPublicKeyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.shell.v1.AddPublicKeyRequest) + return object; + var message = new $root.google.cloud.shell.v1.AddPublicKeyRequest(); + if (object.environment != null) + message.environment = String(object.environment); + if (object.key != null) + message.key = String(object.key); + return message; + }; + + /** + * Creates a plain object from an AddPublicKeyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.shell.v1.AddPublicKeyRequest + * @static + * @param {google.cloud.shell.v1.AddPublicKeyRequest} message AddPublicKeyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AddPublicKeyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.environment = ""; + object.key = ""; + } + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = message.environment; + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + return object; + }; + + /** + * Converts this AddPublicKeyRequest to JSON. + * @function toJSON + * @memberof google.cloud.shell.v1.AddPublicKeyRequest + * @instance + * @returns {Object.} JSON object + */ + AddPublicKeyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AddPublicKeyRequest; + })(); + + v1.AddPublicKeyResponse = (function() { + + /** + * Properties of an AddPublicKeyResponse. + * @memberof google.cloud.shell.v1 + * @interface IAddPublicKeyResponse + * @property {string|null} [key] AddPublicKeyResponse key + */ + + /** + * Constructs a new AddPublicKeyResponse. + * @memberof google.cloud.shell.v1 + * @classdesc Represents an AddPublicKeyResponse. + * @implements IAddPublicKeyResponse + * @constructor + * @param {google.cloud.shell.v1.IAddPublicKeyResponse=} [properties] Properties to set + */ + function AddPublicKeyResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AddPublicKeyResponse key. + * @member {string} key + * @memberof google.cloud.shell.v1.AddPublicKeyResponse + * @instance + */ + AddPublicKeyResponse.prototype.key = ""; + + /** + * Creates a new AddPublicKeyResponse instance using the specified properties. + * @function create + * @memberof google.cloud.shell.v1.AddPublicKeyResponse + * @static + * @param {google.cloud.shell.v1.IAddPublicKeyResponse=} [properties] Properties to set + * @returns {google.cloud.shell.v1.AddPublicKeyResponse} AddPublicKeyResponse instance + */ + AddPublicKeyResponse.create = function create(properties) { + return new AddPublicKeyResponse(properties); + }; + + /** + * Encodes the specified AddPublicKeyResponse message. Does not implicitly {@link google.cloud.shell.v1.AddPublicKeyResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.shell.v1.AddPublicKeyResponse + * @static + * @param {google.cloud.shell.v1.IAddPublicKeyResponse} message AddPublicKeyResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddPublicKeyResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + return writer; + }; + + /** + * Encodes the specified AddPublicKeyResponse message, length delimited. Does not implicitly {@link google.cloud.shell.v1.AddPublicKeyResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.shell.v1.AddPublicKeyResponse + * @static + * @param {google.cloud.shell.v1.IAddPublicKeyResponse} message AddPublicKeyResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddPublicKeyResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AddPublicKeyResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.shell.v1.AddPublicKeyResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.shell.v1.AddPublicKeyResponse} AddPublicKeyResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddPublicKeyResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.shell.v1.AddPublicKeyResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AddPublicKeyResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.shell.v1.AddPublicKeyResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.shell.v1.AddPublicKeyResponse} AddPublicKeyResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddPublicKeyResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AddPublicKeyResponse message. + * @function verify + * @memberof google.cloud.shell.v1.AddPublicKeyResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AddPublicKeyResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + return null; + }; + + /** + * Creates an AddPublicKeyResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.shell.v1.AddPublicKeyResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.shell.v1.AddPublicKeyResponse} AddPublicKeyResponse + */ + AddPublicKeyResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.shell.v1.AddPublicKeyResponse) + return object; + var message = new $root.google.cloud.shell.v1.AddPublicKeyResponse(); + if (object.key != null) + message.key = String(object.key); + return message; + }; + + /** + * Creates a plain object from an AddPublicKeyResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.shell.v1.AddPublicKeyResponse + * @static + * @param {google.cloud.shell.v1.AddPublicKeyResponse} message AddPublicKeyResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AddPublicKeyResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.key = ""; + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + return object; + }; + + /** + * Converts this AddPublicKeyResponse to JSON. + * @function toJSON + * @memberof google.cloud.shell.v1.AddPublicKeyResponse + * @instance + * @returns {Object.} JSON object + */ + AddPublicKeyResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AddPublicKeyResponse; + })(); + + v1.AddPublicKeyMetadata = (function() { + + /** + * Properties of an AddPublicKeyMetadata. + * @memberof google.cloud.shell.v1 + * @interface IAddPublicKeyMetadata + */ + + /** + * Constructs a new AddPublicKeyMetadata. + * @memberof google.cloud.shell.v1 + * @classdesc Represents an AddPublicKeyMetadata. + * @implements IAddPublicKeyMetadata + * @constructor + * @param {google.cloud.shell.v1.IAddPublicKeyMetadata=} [properties] Properties to set + */ + function AddPublicKeyMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new AddPublicKeyMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.shell.v1.AddPublicKeyMetadata + * @static + * @param {google.cloud.shell.v1.IAddPublicKeyMetadata=} [properties] Properties to set + * @returns {google.cloud.shell.v1.AddPublicKeyMetadata} AddPublicKeyMetadata instance + */ + AddPublicKeyMetadata.create = function create(properties) { + return new AddPublicKeyMetadata(properties); + }; + + /** + * Encodes the specified AddPublicKeyMetadata message. Does not implicitly {@link google.cloud.shell.v1.AddPublicKeyMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.shell.v1.AddPublicKeyMetadata + * @static + * @param {google.cloud.shell.v1.IAddPublicKeyMetadata} message AddPublicKeyMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddPublicKeyMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified AddPublicKeyMetadata message, length delimited. Does not implicitly {@link google.cloud.shell.v1.AddPublicKeyMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.shell.v1.AddPublicKeyMetadata + * @static + * @param {google.cloud.shell.v1.IAddPublicKeyMetadata} message AddPublicKeyMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddPublicKeyMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AddPublicKeyMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.shell.v1.AddPublicKeyMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.shell.v1.AddPublicKeyMetadata} AddPublicKeyMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddPublicKeyMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.shell.v1.AddPublicKeyMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AddPublicKeyMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.shell.v1.AddPublicKeyMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.shell.v1.AddPublicKeyMetadata} AddPublicKeyMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddPublicKeyMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AddPublicKeyMetadata message. + * @function verify + * @memberof google.cloud.shell.v1.AddPublicKeyMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AddPublicKeyMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an AddPublicKeyMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.shell.v1.AddPublicKeyMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.shell.v1.AddPublicKeyMetadata} AddPublicKeyMetadata + */ + AddPublicKeyMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.shell.v1.AddPublicKeyMetadata) + return object; + return new $root.google.cloud.shell.v1.AddPublicKeyMetadata(); + }; + + /** + * Creates a plain object from an AddPublicKeyMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.shell.v1.AddPublicKeyMetadata + * @static + * @param {google.cloud.shell.v1.AddPublicKeyMetadata} message AddPublicKeyMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AddPublicKeyMetadata.toObject = function toObject() { + return {}; + }; + + /** + * Converts this AddPublicKeyMetadata to JSON. + * @function toJSON + * @memberof google.cloud.shell.v1.AddPublicKeyMetadata + * @instance + * @returns {Object.} JSON object + */ + AddPublicKeyMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AddPublicKeyMetadata; + })(); + + v1.RemovePublicKeyRequest = (function() { + + /** + * Properties of a RemovePublicKeyRequest. + * @memberof google.cloud.shell.v1 + * @interface IRemovePublicKeyRequest + * @property {string|null} [environment] RemovePublicKeyRequest environment + * @property {string|null} [key] RemovePublicKeyRequest key + */ + + /** + * Constructs a new RemovePublicKeyRequest. + * @memberof google.cloud.shell.v1 + * @classdesc Represents a RemovePublicKeyRequest. + * @implements IRemovePublicKeyRequest + * @constructor + * @param {google.cloud.shell.v1.IRemovePublicKeyRequest=} [properties] Properties to set + */ + function RemovePublicKeyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RemovePublicKeyRequest environment. + * @member {string} environment + * @memberof google.cloud.shell.v1.RemovePublicKeyRequest + * @instance + */ + RemovePublicKeyRequest.prototype.environment = ""; + + /** + * RemovePublicKeyRequest key. + * @member {string} key + * @memberof google.cloud.shell.v1.RemovePublicKeyRequest + * @instance + */ + RemovePublicKeyRequest.prototype.key = ""; + + /** + * Creates a new RemovePublicKeyRequest instance using the specified properties. + * @function create + * @memberof google.cloud.shell.v1.RemovePublicKeyRequest + * @static + * @param {google.cloud.shell.v1.IRemovePublicKeyRequest=} [properties] Properties to set + * @returns {google.cloud.shell.v1.RemovePublicKeyRequest} RemovePublicKeyRequest instance + */ + RemovePublicKeyRequest.create = function create(properties) { + return new RemovePublicKeyRequest(properties); + }; + + /** + * Encodes the specified RemovePublicKeyRequest message. Does not implicitly {@link google.cloud.shell.v1.RemovePublicKeyRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.shell.v1.RemovePublicKeyRequest + * @static + * @param {google.cloud.shell.v1.IRemovePublicKeyRequest} message RemovePublicKeyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemovePublicKeyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.key); + return writer; + }; + + /** + * Encodes the specified RemovePublicKeyRequest message, length delimited. Does not implicitly {@link google.cloud.shell.v1.RemovePublicKeyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.shell.v1.RemovePublicKeyRequest + * @static + * @param {google.cloud.shell.v1.IRemovePublicKeyRequest} message RemovePublicKeyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemovePublicKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RemovePublicKeyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.shell.v1.RemovePublicKeyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.shell.v1.RemovePublicKeyRequest} RemovePublicKeyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemovePublicKeyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.shell.v1.RemovePublicKeyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.environment = reader.string(); + break; + case 2: + message.key = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RemovePublicKeyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.shell.v1.RemovePublicKeyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.shell.v1.RemovePublicKeyRequest} RemovePublicKeyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemovePublicKeyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RemovePublicKeyRequest message. + * @function verify + * @memberof google.cloud.shell.v1.RemovePublicKeyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RemovePublicKeyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.environment != null && message.hasOwnProperty("environment")) + if (!$util.isString(message.environment)) + return "environment: string expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + return null; + }; + + /** + * Creates a RemovePublicKeyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.shell.v1.RemovePublicKeyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.shell.v1.RemovePublicKeyRequest} RemovePublicKeyRequest + */ + RemovePublicKeyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.shell.v1.RemovePublicKeyRequest) + return object; + var message = new $root.google.cloud.shell.v1.RemovePublicKeyRequest(); + if (object.environment != null) + message.environment = String(object.environment); + if (object.key != null) + message.key = String(object.key); + return message; + }; + + /** + * Creates a plain object from a RemovePublicKeyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.shell.v1.RemovePublicKeyRequest + * @static + * @param {google.cloud.shell.v1.RemovePublicKeyRequest} message RemovePublicKeyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RemovePublicKeyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.environment = ""; + object.key = ""; + } + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = message.environment; + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + return object; + }; + + /** + * Converts this RemovePublicKeyRequest to JSON. + * @function toJSON + * @memberof google.cloud.shell.v1.RemovePublicKeyRequest + * @instance + * @returns {Object.} JSON object + */ + RemovePublicKeyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RemovePublicKeyRequest; + })(); + + v1.RemovePublicKeyResponse = (function() { + + /** + * Properties of a RemovePublicKeyResponse. + * @memberof google.cloud.shell.v1 + * @interface IRemovePublicKeyResponse + */ + + /** + * Constructs a new RemovePublicKeyResponse. + * @memberof google.cloud.shell.v1 + * @classdesc Represents a RemovePublicKeyResponse. + * @implements IRemovePublicKeyResponse + * @constructor + * @param {google.cloud.shell.v1.IRemovePublicKeyResponse=} [properties] Properties to set + */ + function RemovePublicKeyResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new RemovePublicKeyResponse instance using the specified properties. + * @function create + * @memberof google.cloud.shell.v1.RemovePublicKeyResponse + * @static + * @param {google.cloud.shell.v1.IRemovePublicKeyResponse=} [properties] Properties to set + * @returns {google.cloud.shell.v1.RemovePublicKeyResponse} RemovePublicKeyResponse instance + */ + RemovePublicKeyResponse.create = function create(properties) { + return new RemovePublicKeyResponse(properties); + }; + + /** + * Encodes the specified RemovePublicKeyResponse message. Does not implicitly {@link google.cloud.shell.v1.RemovePublicKeyResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.shell.v1.RemovePublicKeyResponse + * @static + * @param {google.cloud.shell.v1.IRemovePublicKeyResponse} message RemovePublicKeyResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemovePublicKeyResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified RemovePublicKeyResponse message, length delimited. Does not implicitly {@link google.cloud.shell.v1.RemovePublicKeyResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.shell.v1.RemovePublicKeyResponse + * @static + * @param {google.cloud.shell.v1.IRemovePublicKeyResponse} message RemovePublicKeyResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemovePublicKeyResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RemovePublicKeyResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.shell.v1.RemovePublicKeyResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.shell.v1.RemovePublicKeyResponse} RemovePublicKeyResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemovePublicKeyResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.shell.v1.RemovePublicKeyResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RemovePublicKeyResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.shell.v1.RemovePublicKeyResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.shell.v1.RemovePublicKeyResponse} RemovePublicKeyResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemovePublicKeyResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RemovePublicKeyResponse message. + * @function verify + * @memberof google.cloud.shell.v1.RemovePublicKeyResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RemovePublicKeyResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a RemovePublicKeyResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.shell.v1.RemovePublicKeyResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.shell.v1.RemovePublicKeyResponse} RemovePublicKeyResponse + */ + RemovePublicKeyResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.shell.v1.RemovePublicKeyResponse) + return object; + return new $root.google.cloud.shell.v1.RemovePublicKeyResponse(); + }; + + /** + * Creates a plain object from a RemovePublicKeyResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.shell.v1.RemovePublicKeyResponse + * @static + * @param {google.cloud.shell.v1.RemovePublicKeyResponse} message RemovePublicKeyResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RemovePublicKeyResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this RemovePublicKeyResponse to JSON. + * @function toJSON + * @memberof google.cloud.shell.v1.RemovePublicKeyResponse + * @instance + * @returns {Object.} JSON object + */ + RemovePublicKeyResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RemovePublicKeyResponse; + })(); + + v1.RemovePublicKeyMetadata = (function() { + + /** + * Properties of a RemovePublicKeyMetadata. + * @memberof google.cloud.shell.v1 + * @interface IRemovePublicKeyMetadata + */ + + /** + * Constructs a new RemovePublicKeyMetadata. + * @memberof google.cloud.shell.v1 + * @classdesc Represents a RemovePublicKeyMetadata. + * @implements IRemovePublicKeyMetadata + * @constructor + * @param {google.cloud.shell.v1.IRemovePublicKeyMetadata=} [properties] Properties to set + */ + function RemovePublicKeyMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new RemovePublicKeyMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.shell.v1.RemovePublicKeyMetadata + * @static + * @param {google.cloud.shell.v1.IRemovePublicKeyMetadata=} [properties] Properties to set + * @returns {google.cloud.shell.v1.RemovePublicKeyMetadata} RemovePublicKeyMetadata instance + */ + RemovePublicKeyMetadata.create = function create(properties) { + return new RemovePublicKeyMetadata(properties); + }; + + /** + * Encodes the specified RemovePublicKeyMetadata message. Does not implicitly {@link google.cloud.shell.v1.RemovePublicKeyMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.shell.v1.RemovePublicKeyMetadata + * @static + * @param {google.cloud.shell.v1.IRemovePublicKeyMetadata} message RemovePublicKeyMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemovePublicKeyMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified RemovePublicKeyMetadata message, length delimited. Does not implicitly {@link google.cloud.shell.v1.RemovePublicKeyMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.shell.v1.RemovePublicKeyMetadata + * @static + * @param {google.cloud.shell.v1.IRemovePublicKeyMetadata} message RemovePublicKeyMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemovePublicKeyMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RemovePublicKeyMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.shell.v1.RemovePublicKeyMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.shell.v1.RemovePublicKeyMetadata} RemovePublicKeyMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemovePublicKeyMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.shell.v1.RemovePublicKeyMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RemovePublicKeyMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.shell.v1.RemovePublicKeyMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.shell.v1.RemovePublicKeyMetadata} RemovePublicKeyMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemovePublicKeyMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RemovePublicKeyMetadata message. + * @function verify + * @memberof google.cloud.shell.v1.RemovePublicKeyMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RemovePublicKeyMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a RemovePublicKeyMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.shell.v1.RemovePublicKeyMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.shell.v1.RemovePublicKeyMetadata} RemovePublicKeyMetadata + */ + RemovePublicKeyMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.shell.v1.RemovePublicKeyMetadata) + return object; + return new $root.google.cloud.shell.v1.RemovePublicKeyMetadata(); + }; + + /** + * Creates a plain object from a RemovePublicKeyMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.shell.v1.RemovePublicKeyMetadata + * @static + * @param {google.cloud.shell.v1.RemovePublicKeyMetadata} message RemovePublicKeyMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RemovePublicKeyMetadata.toObject = function toObject() { + return {}; + }; + + /** + * Converts this RemovePublicKeyMetadata to JSON. + * @function toJSON + * @memberof google.cloud.shell.v1.RemovePublicKeyMetadata + * @instance + * @returns {Object.} JSON object + */ + RemovePublicKeyMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RemovePublicKeyMetadata; + })(); + + v1.CloudShellErrorDetails = (function() { + + /** + * Properties of a CloudShellErrorDetails. + * @memberof google.cloud.shell.v1 + * @interface ICloudShellErrorDetails + * @property {google.cloud.shell.v1.CloudShellErrorDetails.CloudShellErrorCode|null} [code] CloudShellErrorDetails code + */ + + /** + * Constructs a new CloudShellErrorDetails. + * @memberof google.cloud.shell.v1 + * @classdesc Represents a CloudShellErrorDetails. + * @implements ICloudShellErrorDetails + * @constructor + * @param {google.cloud.shell.v1.ICloudShellErrorDetails=} [properties] Properties to set + */ + function CloudShellErrorDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudShellErrorDetails code. + * @member {google.cloud.shell.v1.CloudShellErrorDetails.CloudShellErrorCode} code + * @memberof google.cloud.shell.v1.CloudShellErrorDetails + * @instance + */ + CloudShellErrorDetails.prototype.code = 0; + + /** + * Creates a new CloudShellErrorDetails instance using the specified properties. + * @function create + * @memberof google.cloud.shell.v1.CloudShellErrorDetails + * @static + * @param {google.cloud.shell.v1.ICloudShellErrorDetails=} [properties] Properties to set + * @returns {google.cloud.shell.v1.CloudShellErrorDetails} CloudShellErrorDetails instance + */ + CloudShellErrorDetails.create = function create(properties) { + return new CloudShellErrorDetails(properties); + }; + + /** + * Encodes the specified CloudShellErrorDetails message. Does not implicitly {@link google.cloud.shell.v1.CloudShellErrorDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.shell.v1.CloudShellErrorDetails + * @static + * @param {google.cloud.shell.v1.ICloudShellErrorDetails} message CloudShellErrorDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudShellErrorDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); + return writer; + }; + + /** + * Encodes the specified CloudShellErrorDetails message, length delimited. Does not implicitly {@link google.cloud.shell.v1.CloudShellErrorDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.shell.v1.CloudShellErrorDetails + * @static + * @param {google.cloud.shell.v1.ICloudShellErrorDetails} message CloudShellErrorDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudShellErrorDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudShellErrorDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.shell.v1.CloudShellErrorDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.shell.v1.CloudShellErrorDetails} CloudShellErrorDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudShellErrorDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.shell.v1.CloudShellErrorDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.code = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudShellErrorDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.shell.v1.CloudShellErrorDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.shell.v1.CloudShellErrorDetails} CloudShellErrorDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudShellErrorDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudShellErrorDetails message. + * @function verify + * @memberof google.cloud.shell.v1.CloudShellErrorDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudShellErrorDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + switch (message.code) { + default: + return "code: enum value expected"; + case 0: + case 1: + case 2: + case 4: + case 5: + break; + } + return null; + }; + + /** + * Creates a CloudShellErrorDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.shell.v1.CloudShellErrorDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.shell.v1.CloudShellErrorDetails} CloudShellErrorDetails + */ + CloudShellErrorDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.shell.v1.CloudShellErrorDetails) + return object; + var message = new $root.google.cloud.shell.v1.CloudShellErrorDetails(); + switch (object.code) { + case "CLOUD_SHELL_ERROR_CODE_UNSPECIFIED": + case 0: + message.code = 0; + break; + case "IMAGE_UNAVAILABLE": + case 1: + message.code = 1; + break; + case "CLOUD_SHELL_DISABLED": + case 2: + message.code = 2; + break; + case "TOS_VIOLATION": + case 4: + message.code = 4; + break; + case "QUOTA_EXCEEDED": + case 5: + message.code = 5; + break; + } + return message; + }; + + /** + * Creates a plain object from a CloudShellErrorDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.shell.v1.CloudShellErrorDetails + * @static + * @param {google.cloud.shell.v1.CloudShellErrorDetails} message CloudShellErrorDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudShellErrorDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.code = options.enums === String ? "CLOUD_SHELL_ERROR_CODE_UNSPECIFIED" : 0; + if (message.code != null && message.hasOwnProperty("code")) + object.code = options.enums === String ? $root.google.cloud.shell.v1.CloudShellErrorDetails.CloudShellErrorCode[message.code] : message.code; + return object; + }; + + /** + * Converts this CloudShellErrorDetails to JSON. + * @function toJSON + * @memberof google.cloud.shell.v1.CloudShellErrorDetails + * @instance + * @returns {Object.} JSON object + */ + CloudShellErrorDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * CloudShellErrorCode enum. + * @name google.cloud.shell.v1.CloudShellErrorDetails.CloudShellErrorCode + * @enum {number} + * @property {number} CLOUD_SHELL_ERROR_CODE_UNSPECIFIED=0 CLOUD_SHELL_ERROR_CODE_UNSPECIFIED value + * @property {number} IMAGE_UNAVAILABLE=1 IMAGE_UNAVAILABLE value + * @property {number} CLOUD_SHELL_DISABLED=2 CLOUD_SHELL_DISABLED value + * @property {number} TOS_VIOLATION=4 TOS_VIOLATION value + * @property {number} QUOTA_EXCEEDED=5 QUOTA_EXCEEDED value + */ + CloudShellErrorDetails.CloudShellErrorCode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLOUD_SHELL_ERROR_CODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "IMAGE_UNAVAILABLE"] = 1; + values[valuesById[2] = "CLOUD_SHELL_DISABLED"] = 2; + values[valuesById[4] = "TOS_VIOLATION"] = 4; + values[valuesById[5] = "QUOTA_EXCEEDED"] = 5; + return values; + })(); + + return CloudShellErrorDetails; + })(); + + return v1; + })(); + + return shell; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + case 2: + message.fullyDecodeReservedExpansion = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.selector = reader.string(); + break; + case 2: + message.get = reader.string(); + break; + case 3: + message.put = reader.string(); + break; + case 4: + message.post = reader.string(); + break; + case 5: + message["delete"] = reader.string(); + break; + case 6: + message.patch = reader.string(); + break; + case 8: + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + case 7: + message.body = reader.string(); + break; + case 12: + message.responseBody = reader.string(); + break; + case 11: + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.kind = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CustomHttpPattern; + })(); + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + return values; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + case 3: + message.nameField = reader.string(); + break; + case 4: + message.history = reader.int32(); + break; + case 5: + message.plural = reader.string(); + break; + case 6: + message.singular = reader.string(); + break; + case 10: + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + message.childType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResourceReference; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FileDescriptorSet; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message["package"] = reader.string(); + break; + case 3: + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + case 10: + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + case 11: + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + case 4: + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + case 7: + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 8: + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + case 9: + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + case 12: + message.syntax = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + case 8: + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + case 7: + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + case 9: + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + case 10: + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + case 3: + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 3: + message.number = reader.int32(); + break; + case 4: + message.label = reader.int32(); + break; + case 5: + message.type = reader.int32(); + break; + case 6: + message.typeName = reader.string(); + break; + case 2: + message.extendee = reader.string(); + break; + case 7: + message.defaultValue = reader.string(); + break; + case 9: + message.oneofIndex = reader.int32(); + break; + case 10: + message.jsonName = reader.string(); + break; + case 8: + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + case 17: + message.proto3Optional = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + } + switch (object.type) { + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.number = reader.int32(); + break; + case 3: + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.inputType = reader.string(); + break; + case 3: + message.outputType = reader.string(); + break; + case 4: + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + case 5: + message.clientStreaming = reader.bool(); + break; + case 6: + message.serverStreaming = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions phpGenericServices. + * @member {boolean} phpGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices")) + writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.javaPackage = reader.string(); + break; + case 8: + message.javaOuterClassname = reader.string(); + break; + case 10: + message.javaMultipleFiles = reader.bool(); + break; + case 20: + message.javaGenerateEqualsAndHash = reader.bool(); + break; + case 27: + message.javaStringCheckUtf8 = reader.bool(); + break; + case 9: + message.optimizeFor = reader.int32(); + break; + case 11: + message.goPackage = reader.string(); + break; + case 16: + message.ccGenericServices = reader.bool(); + break; + case 17: + message.javaGenericServices = reader.bool(); + break; + case 18: + message.pyGenericServices = reader.bool(); + break; + case 42: + message.phpGenericServices = reader.bool(); + break; + case 23: + message.deprecated = reader.bool(); + break; + case 31: + message.ccEnableArenas = reader.bool(); + break; + case 36: + message.objcClassPrefix = reader.string(); + break; + case 37: + message.csharpNamespace = reader.string(); + break; + case 39: + message.swiftPrefix = reader.string(); + break; + case 40: + message.phpClassPrefix = reader.string(); + break; + case 41: + message.phpNamespace = reader.string(); + break; + case 44: + message.phpMetadataNamespace = reader.string(); + break; + case 45: + message.rubyPackage = reader.string(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1053: + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + if (typeof message.phpGenericServices !== "boolean") + return "phpGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.phpGenericServices != null) + message.phpGenericServices = Boolean(object.phpGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpGenericServices = false; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + object.phpGenericServices = message.phpGenericServices; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.messageSetWireFormat = reader.bool(); + break; + case 2: + message.noStandardDescriptorAccessor = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 7: + message.mapEntry = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1053: + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) { + writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.int32(message[".google.api.fieldBehavior"][i]); + writer.ldelim(); + } + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.ctype = reader.int32(); + break; + case 2: + message.packed = reader.bool(); + break; + case 6: + message.jstype = reader.int32(); + break; + case 5: + message.lazy = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 10: + message.weak = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1052: + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + case 1055: + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object[".google.api.resourceReference"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.allowAlias = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.deprecated = false; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1049: + message[".google.api.defaultHost"] = reader.string(); + break; + case 1050: + message[".google.api.oauthScopes"] = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * MethodOptions .google.longrunning.operationInfo. + * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.longrunning.operationInfo"] = null; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) + $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 34: + message.idempotencyLevel = reader.int32(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 72295728: + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + case 1051: + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + case 1049: + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { + var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); + if (error) + return ".google.longrunning.operationInfo." + error; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + if (object[".google.longrunning.operationInfo"] != null) { + if (typeof object[".google.longrunning.operationInfo"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.longrunning.operationInfo"] = null; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) + object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + case 3: + message.identifierValue = reader.string(); + break; + case 4: + message.positiveIntValue = reader.uint64(); + break; + case 5: + message.negativeIntValue = reader.int64(); + break; + case 6: + message.doubleValue = reader.double(); + break; + case 7: + message.stringValue = reader.bytes(); + break; + case 8: + message.aggregateValue = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.namePart = reader.string(); + break; + case 2: + message.isExtension = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + case 2: + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + case 3: + message.leadingComments = reader.string(); + break; + case 4: + message.trailingComments = reader.string(); + break; + case 6: + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + case 2: + message.sourceFile = reader.string(); + break; + case 3: + message.begin = reader.int32(); + break; + case 4: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Any = (function() { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type_url = reader.string(); + break; + case 2: + message.value = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) + return object; + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Any; + })(); + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Duration; + })(); + + protobuf.Empty = (function() { + + /** + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty + */ + + /** + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set + */ + function Empty(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Empty instance using the specified properties. + * @function create + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + Empty.create = function create(properties) { + return new Empty(properties); + }; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @memberof google.protobuf.Empty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Empty; + })(); + + protobuf.FieldMask = (function() { + + /** + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ + + /** + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask + * @constructor + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + */ + function FieldMask(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @instance + */ + FieldMask.prototype.paths = $util.emptyArray; + + /** + * Creates a new FieldMask instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance + */ + FieldMask.create = function create(properties) { + return new FieldMask(properties); + }; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + return writer; + }; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldMask message. + * @function verify + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldMask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldMask} FieldMask + */ + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) + return object; + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.FieldMask} message FieldMask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; + + /** + * Converts this FieldMask to JSON. + * @function toJSON + * @memberof google.protobuf.FieldMask + * @instance + * @returns {Object.} JSON object + */ + FieldMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FieldMask; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Timestamp; + })(); + + return protobuf; + })(); + + google.longrunning = (function() { + + /** + * Namespace longrunning. + * @memberof google + * @namespace + */ + var longrunning = {}; + + longrunning.Operations = (function() { + + /** + * Constructs a new Operations service. + * @memberof google.longrunning + * @classdesc Represents an Operations + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Operations(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; + + /** + * Creates new Operations service using the specified rpc implementation. + * @function create + * @memberof google.longrunning.Operations + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Operations} RPC service. Useful where requests and/or responses are streamed. + */ + Operations.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.longrunning.Operations#listOperations}. + * @memberof google.longrunning.Operations + * @typedef ListOperationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.ListOperationsResponse} [response] ListOperationsResponse + */ + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @param {google.longrunning.Operations.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) { + return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); + }, "name", { value: "ListOperations" }); + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations#getOperation}. + * @memberof google.longrunning.Operations + * @typedef GetOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { + return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "GetOperation" }); + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations#deleteOperation}. + * @memberof google.longrunning.Operations + * @typedef DeleteOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { + return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteOperation" }); + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations#cancelOperation}. + * @memberof google.longrunning.Operations + * @typedef CancelOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @param {google.longrunning.Operations.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) { + return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelOperation" }); + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations#waitOperation}. + * @memberof google.longrunning.Operations + * @typedef WaitOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @param {google.longrunning.Operations.WaitOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) { + return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "WaitOperation" }); + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Operations; + })(); + + longrunning.Operation = (function() { + + /** + * Properties of an Operation. + * @memberof google.longrunning + * @interface IOperation + * @property {string|null} [name] Operation name + * @property {google.protobuf.IAny|null} [metadata] Operation metadata + * @property {boolean|null} [done] Operation done + * @property {google.rpc.IStatus|null} [error] Operation error + * @property {google.protobuf.IAny|null} [response] Operation response + */ + + /** + * Constructs a new Operation. + * @memberof google.longrunning + * @classdesc Represents an Operation. + * @implements IOperation + * @constructor + * @param {google.longrunning.IOperation=} [properties] Properties to set + */ + function Operation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Operation name. + * @member {string} name + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.name = ""; + + /** + * Operation metadata. + * @member {google.protobuf.IAny|null|undefined} metadata + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.metadata = null; + + /** + * Operation done. + * @member {boolean} done + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.done = false; + + /** + * Operation error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.error = null; + + /** + * Operation response. + * @member {google.protobuf.IAny|null|undefined} response + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.response = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Operation result. + * @member {"error"|"response"|undefined} result + * @memberof google.longrunning.Operation + * @instance + */ + Object.defineProperty(Operation.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["error", "response"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Operation instance using the specified properties. + * @function create + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation=} [properties] Properties to set + * @returns {google.longrunning.Operation} Operation instance + */ + Operation.create = function create(properties) { + return new Operation(properties); + }; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encode + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.done != null && Object.hasOwnProperty.call(message, "done")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.response != null && Object.hasOwnProperty.call(message, "response")) + $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 3: + message.done = reader.bool(); + break; + case 4: + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + case 5: + message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Operation message. + * @function verify + * @memberof google.longrunning.Operation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Operation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.protobuf.Any.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.done != null && message.hasOwnProperty("done")) + if (typeof message.done !== "boolean") + return "done: boolean expected"; + if (message.error != null && message.hasOwnProperty("error")) { + properties.result = 1; + { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + } + if (message.response != null && message.hasOwnProperty("response")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.protobuf.Any.verify(message.response); + if (error) + return "response." + error; + } + } + return null; + }; + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.Operation + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.Operation} Operation + */ + Operation.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.Operation) + return object; + var message = new $root.google.longrunning.Operation(); + if (object.name != null) + message.name = String(object.name); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.longrunning.Operation.metadata: object expected"); + message.metadata = $root.google.protobuf.Any.fromObject(object.metadata); + } + if (object.done != null) + message.done = Boolean(object.done); + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.longrunning.Operation.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + if (object.response != null) { + if (typeof object.response !== "object") + throw TypeError(".google.longrunning.Operation.response: object expected"); + message.response = $root.google.protobuf.Any.fromObject(object.response); + } + return message; + }; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.Operation} message Operation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Operation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.metadata = null; + object.done = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options); + if (message.done != null && message.hasOwnProperty("done")) + object.done = message.done; + if (message.error != null && message.hasOwnProperty("error")) { + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (options.oneofs) + object.result = "error"; + } + if (message.response != null && message.hasOwnProperty("response")) { + object.response = $root.google.protobuf.Any.toObject(message.response, options); + if (options.oneofs) + object.result = "response"; + } + return object; + }; + + /** + * Converts this Operation to JSON. + * @function toJSON + * @memberof google.longrunning.Operation + * @instance + * @returns {Object.} JSON object + */ + Operation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Operation; + })(); + + longrunning.GetOperationRequest = (function() { + + /** + * Properties of a GetOperationRequest. + * @memberof google.longrunning + * @interface IGetOperationRequest + * @property {string|null} [name] GetOperationRequest name + */ + + /** + * Constructs a new GetOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a GetOperationRequest. + * @implements IGetOperationRequest + * @constructor + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + */ + function GetOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetOperationRequest name. + * @member {string} name + * @memberof google.longrunning.GetOperationRequest + * @instance + */ + GetOperationRequest.prototype.name = ""; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance + */ + GetOperationRequest.create = function create(properties) { + return new GetOperationRequest(properties); + }; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOperationRequest message. + * @function verify + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + */ + GetOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.GetOperationRequest) + return object; + var message = new $root.google.longrunning.GetOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.GetOperationRequest} message GetOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.GetOperationRequest + * @instance + * @returns {Object.} JSON object + */ + GetOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetOperationRequest; + })(); + + longrunning.ListOperationsRequest = (function() { + + /** + * Properties of a ListOperationsRequest. + * @memberof google.longrunning + * @interface IListOperationsRequest + * @property {string|null} [name] ListOperationsRequest name + * @property {string|null} [filter] ListOperationsRequest filter + * @property {number|null} [pageSize] ListOperationsRequest pageSize + * @property {string|null} [pageToken] ListOperationsRequest pageToken + */ + + /** + * Constructs a new ListOperationsRequest. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsRequest. + * @implements IListOperationsRequest + * @constructor + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + */ + function ListOperationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsRequest name. + * @member {string} name + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.name = ""; + + /** + * ListOperationsRequest filter. + * @member {string} filter + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.filter = ""; + + /** + * ListOperationsRequest pageSize. + * @member {number} pageSize + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageSize = 0; + + /** + * ListOperationsRequest pageToken. + * @member {string} pageToken + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest instance + */ + ListOperationsRequest.create = function create(properties) { + return new ListOperationsRequest(properties); + }; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + return writer; + }; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: + message.name = reader.string(); + break; + case 1: + message.filter = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsRequest message. + * @function verify + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + */ + ListOperationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsRequest) + return object; + var message = new $root.google.longrunning.ListOperationsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.ListOperationsRequest} message ListOperationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + object.name = ""; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this ListOperationsRequest to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListOperationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListOperationsRequest; + })(); + + longrunning.ListOperationsResponse = (function() { + + /** + * Properties of a ListOperationsResponse. + * @memberof google.longrunning + * @interface IListOperationsResponse + * @property {Array.|null} [operations] ListOperationsResponse operations + * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken + */ + + /** + * Constructs a new ListOperationsResponse. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsResponse. + * @implements IListOperationsResponse + * @constructor + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + */ + function ListOperationsResponse(properties) { + this.operations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsResponse operations. + * @member {Array.} operations + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.operations = $util.emptyArray; + + /** + * ListOperationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance + */ + ListOperationsResponse.create = function create(properties) { + return new ListOperationsResponse(properties); + }; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operations != null && message.operations.length) + for (var i = 0; i < message.operations.length; ++i) + $root.google.longrunning.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsResponse message. + * @function verify + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operations != null && message.hasOwnProperty("operations")) { + if (!Array.isArray(message.operations)) + return "operations: array expected"; + for (var i = 0; i < message.operations.length; ++i) { + var error = $root.google.longrunning.Operation.verify(message.operations[i]); + if (error) + return "operations." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + */ + ListOperationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsResponse) + return object; + var message = new $root.google.longrunning.ListOperationsResponse(); + if (object.operations) { + if (!Array.isArray(object.operations)) + throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected"); + message.operations = []; + for (var i = 0; i < object.operations.length; ++i) { + if (typeof object.operations[i] !== "object") + throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected"); + message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.operations = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.operations && message.operations.length) { + object.operations = []; + for (var j = 0; j < message.operations.length; ++j) + object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListOperationsResponse to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListOperationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListOperationsResponse; + })(); + + longrunning.CancelOperationRequest = (function() { + + /** + * Properties of a CancelOperationRequest. + * @memberof google.longrunning + * @interface ICancelOperationRequest + * @property {string|null} [name] CancelOperationRequest name + */ + + /** + * Constructs a new CancelOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a CancelOperationRequest. + * @implements ICancelOperationRequest + * @constructor + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + */ + function CancelOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelOperationRequest name. + * @member {string} name + * @memberof google.longrunning.CancelOperationRequest + * @instance + */ + CancelOperationRequest.prototype.name = ""; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance + */ + CancelOperationRequest.create = function create(properties) { + return new CancelOperationRequest(properties); + }; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelOperationRequest message. + * @function verify + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + */ + CancelOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.CancelOperationRequest) + return object; + var message = new $root.google.longrunning.CancelOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this CancelOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.CancelOperationRequest + * @instance + * @returns {Object.} JSON object + */ + CancelOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CancelOperationRequest; + })(); + + longrunning.DeleteOperationRequest = (function() { + + /** + * Properties of a DeleteOperationRequest. + * @memberof google.longrunning + * @interface IDeleteOperationRequest + * @property {string|null} [name] DeleteOperationRequest name + */ + + /** + * Constructs a new DeleteOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a DeleteOperationRequest. + * @implements IDeleteOperationRequest + * @constructor + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + */ + function DeleteOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteOperationRequest name. + * @member {string} name + * @memberof google.longrunning.DeleteOperationRequest + * @instance + */ + DeleteOperationRequest.prototype.name = ""; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance + */ + DeleteOperationRequest.create = function create(properties) { + return new DeleteOperationRequest(properties); + }; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteOperationRequest message. + * @function verify + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + */ + DeleteOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.DeleteOperationRequest) + return object; + var message = new $root.google.longrunning.DeleteOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.DeleteOperationRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteOperationRequest; + })(); + + longrunning.WaitOperationRequest = (function() { + + /** + * Properties of a WaitOperationRequest. + * @memberof google.longrunning + * @interface IWaitOperationRequest + * @property {string|null} [name] WaitOperationRequest name + * @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout + */ + + /** + * Constructs a new WaitOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a WaitOperationRequest. + * @implements IWaitOperationRequest + * @constructor + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + */ + function WaitOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WaitOperationRequest name. + * @member {string} name + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.name = ""; + + /** + * WaitOperationRequest timeout. + * @member {google.protobuf.IDuration|null|undefined} timeout + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.timeout = null; + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance + */ + WaitOperationRequest.create = function create(properties) { + return new WaitOperationRequest(properties); + }; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) + $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WaitOperationRequest message. + * @function verify + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WaitOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.timeout != null && message.hasOwnProperty("timeout")) { + var error = $root.google.protobuf.Duration.verify(message.timeout); + if (error) + return "timeout." + error; + } + return null; + }; + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + */ + WaitOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.WaitOperationRequest) + return object; + var message = new $root.google.longrunning.WaitOperationRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.timeout != null) { + if (typeof object.timeout !== "object") + throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected"); + message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); + } + return message; + }; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WaitOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.timeout = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.timeout != null && message.hasOwnProperty("timeout")) + object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); + return object; + }; + + /** + * Converts this WaitOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.WaitOperationRequest + * @instance + * @returns {Object.} JSON object + */ + WaitOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WaitOperationRequest; + })(); + + longrunning.OperationInfo = (function() { + + /** + * Properties of an OperationInfo. + * @memberof google.longrunning + * @interface IOperationInfo + * @property {string|null} [responseType] OperationInfo responseType + * @property {string|null} [metadataType] OperationInfo metadataType + */ + + /** + * Constructs a new OperationInfo. + * @memberof google.longrunning + * @classdesc Represents an OperationInfo. + * @implements IOperationInfo + * @constructor + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + */ + function OperationInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationInfo responseType. + * @member {string} responseType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.responseType = ""; + + /** + * OperationInfo metadataType. + * @member {string} metadataType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.metadataType = ""; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @function create + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + * @returns {google.longrunning.OperationInfo} OperationInfo instance + */ + OperationInfo.create = function create(properties) { + return new OperationInfo(properties); + }; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encode + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType); + if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType); + return writer; + }; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.responseType = reader.string(); + break; + case 2: + message.metadataType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationInfo message. + * @function verify + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.responseType != null && message.hasOwnProperty("responseType")) + if (!$util.isString(message.responseType)) + return "responseType: string expected"; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + if (!$util.isString(message.metadataType)) + return "metadataType: string expected"; + return null; + }; + + /** + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.OperationInfo} OperationInfo + */ + OperationInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.OperationInfo) + return object; + var message = new $root.google.longrunning.OperationInfo(); + if (object.responseType != null) + message.responseType = String(object.responseType); + if (object.metadataType != null) + message.metadataType = String(object.metadataType); + return message; + }; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.OperationInfo} message OperationInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.responseType = ""; + object.metadataType = ""; + } + if (message.responseType != null && message.hasOwnProperty("responseType")) + object.responseType = message.responseType; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + object.metadataType = message.metadataType; + return object; + }; + + /** + * Converts this OperationInfo to JSON. + * @function toJSON + * @memberof google.longrunning.OperationInfo + * @instance + * @returns {Object.} JSON object + */ + OperationInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OperationInfo; + })(); + + return longrunning; + })(); + + google.rpc = (function() { + + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; + + rpc.Status = (function() { + + /** + * Properties of a Status. + * @memberof google.rpc + * @interface IStatus + * @property {number|null} [code] Status code + * @property {string|null} [message] Status message + * @property {Array.|null} [details] Status details + */ + + /** + * Constructs a new Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus + * @constructor + * @param {google.rpc.IStatus=} [properties] Properties to set + */ + function Status(properties) { + this.details = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Status code. + * @member {number} code + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.code = 0; + + /** + * Status message. + * @member {string} message + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.message = ""; + + /** + * Status details. + * @member {Array.} details + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.details = $util.emptyArray; + + /** + * Creates a new Status instance using the specified properties. + * @function create + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus=} [properties] Properties to set + * @returns {google.rpc.Status} Status instance + */ + Status.create = function create(properties) { + return new Status(properties); + }; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encode + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.details != null && message.details.length) + for (var i = 0; i < message.details.length; ++i) + $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Status message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.code = reader.int32(); + break; + case 2: + message.message = reader.string(); + break; + case 3: + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Status message. + * @function verify + * @memberof google.rpc.Status + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Status.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.details != null && message.hasOwnProperty("details")) { + if (!Array.isArray(message.details)) + return "details: array expected"; + for (var i = 0; i < message.details.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.details[i]); + if (error) + return "details." + error; + } + } + return null; + }; + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.Status + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.Status} Status + */ + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) + return object; + var message = new $root.google.rpc.Status(); + if (object.code != null) + message.code = object.code | 0; + if (object.message != null) + message.message = String(object.message); + if (object.details) { + if (!Array.isArray(object.details)) + throw TypeError(".google.rpc.Status.details: array expected"); + message.details = []; + for (var i = 0; i < object.details.length; ++i) { + if (typeof object.details[i] !== "object") + throw TypeError(".google.rpc.Status.details: object expected"); + message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.Status + * @static + * @param {google.rpc.Status} message Status + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Status.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.details = []; + if (options.defaults) { + object.code = 0; + object.message = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.details && message.details.length) { + object.details = []; + for (var j = 0; j < message.details.length; ++j) + object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); + } + return object; + }; + + /** + * Converts this Status to JSON. + * @function toJSON + * @memberof google.rpc.Status + * @instance + * @returns {Object.} JSON object + */ + Status.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Status; + })(); + + return rpc; + })(); + + return google; + })(); + + return $root; +}); diff --git a/packages/google-cloud-shell/protos/protos.json b/packages/google-cloud-shell/protos/protos.json new file mode 100644 index 00000000000..4440fc1cae9 --- /dev/null +++ b/packages/google-cloud-shell/protos/protos.json @@ -0,0 +1,1778 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "shell": { + "nested": { + "v1": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/cloud/shell/v1;shell", + "java_multiple_files": true, + "java_outer_classname": "CloudShellProto", + "java_package": "com.google.cloud.shell.v1" + }, + "nested": { + "CloudShellService": { + "options": { + "(google.api.default_host)": "cloudshell.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "GetEnvironment": { + "requestType": "GetEnvironmentRequest", + "responseType": "Environment", + "options": { + "(google.api.http).get": "/v1/{name=users/*/environments/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=users/*/environments/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "StartEnvironment": { + "requestType": "StartEnvironmentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=users/*/environments/*}:start", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "StartEnvironmentResponse", + "(google.longrunning.operation_info).metadata_type": "StartEnvironmentMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=users/*/environments/*}:start", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "StartEnvironmentResponse", + "metadata_type": "StartEnvironmentMetadata" + } + } + ] + }, + "AuthorizeEnvironment": { + "requestType": "AuthorizeEnvironmentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=users/*/environments/*}:authorize", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "AuthorizeEnvironmentResponse", + "(google.longrunning.operation_info).metadata_type": "AuthorizeEnvironmentMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=users/*/environments/*}:authorize", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "AuthorizeEnvironmentResponse", + "metadata_type": "AuthorizeEnvironmentMetadata" + } + } + ] + }, + "AddPublicKey": { + "requestType": "AddPublicKeyRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{environment=users/*/environments/*}:addPublicKey", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "AddPublicKeyResponse", + "(google.longrunning.operation_info).metadata_type": "AddPublicKeyMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{environment=users/*/environments/*}:addPublicKey", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "AddPublicKeyResponse", + "metadata_type": "AddPublicKeyMetadata" + } + } + ] + }, + "RemovePublicKey": { + "requestType": "RemovePublicKeyRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{environment=users/*/environments/*}:removePublicKey", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "RemovePublicKeyResponse", + "(google.longrunning.operation_info).metadata_type": "RemovePublicKeyMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{environment=users/*/environments/*}:removePublicKey", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "RemovePublicKeyResponse", + "metadata_type": "RemovePublicKeyMetadata" + } + } + ] + } + } + }, + "Environment": { + "options": { + "(google.api.resource).type": "cloudshell.googleapis.com/Environment", + "(google.api.resource).pattern": "users/{user}/environments/{environment}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "id": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dockerImage": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "state": { + "type": "State", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "webHost": { + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "sshUsername": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "sshHost": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "sshPort": { + "type": "int32", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "publicKeys": { + "rule": "repeated", + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "SUSPENDED": 1, + "PENDING": 2, + "RUNNING": 3, + "DELETING": 4 + } + } + } + }, + "GetEnvironmentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudshell.googleapis.com/Environment" + } + } + } + }, + "CreateEnvironmentMetadata": { + "fields": {} + }, + "DeleteEnvironmentMetadata": { + "fields": {} + }, + "StartEnvironmentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "accessToken": { + "type": "string", + "id": 2 + }, + "publicKeys": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "AuthorizeEnvironmentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "accessToken": { + "type": "string", + "id": 2 + }, + "idToken": { + "type": "string", + "id": 4 + }, + "expireTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + } + } + }, + "AuthorizeEnvironmentResponse": { + "fields": {} + }, + "AuthorizeEnvironmentMetadata": { + "fields": {} + }, + "StartEnvironmentMetadata": { + "fields": { + "state": { + "type": "State", + "id": 1 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "STARTING": 1, + "UNARCHIVING_DISK": 2, + "AWAITING_COMPUTE_RESOURCES": 4, + "FINISHED": 3 + } + } + } + }, + "StartEnvironmentResponse": { + "fields": { + "environment": { + "type": "Environment", + "id": 1 + } + } + }, + "AddPublicKeyRequest": { + "fields": { + "environment": { + "type": "string", + "id": 1 + }, + "key": { + "type": "string", + "id": 2 + } + } + }, + "AddPublicKeyResponse": { + "fields": { + "key": { + "type": "string", + "id": 1 + } + } + }, + "AddPublicKeyMetadata": { + "fields": {} + }, + "RemovePublicKeyRequest": { + "fields": { + "environment": { + "type": "string", + "id": 1 + }, + "key": { + "type": "string", + "id": 2 + } + } + }, + "RemovePublicKeyResponse": { + "fields": {} + }, + "RemovePublicKeyMetadata": { + "fields": {} + }, + "CloudShellErrorDetails": { + "fields": { + "code": { + "type": "CloudShellErrorCode", + "id": 1 + } + }, + "nested": { + "CloudShellErrorCode": { + "values": { + "CLOUD_SHELL_ERROR_CODE_UNSPECIFIED": 0, + "IMAGE_UNAVAILABLE": 1, + "CLOUD_SHELL_DISABLED": 2, + "TOS_VIOLATION": 4, + "QUOTA_EXCEEDED": 5 + } + } + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "ResourceProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "FileDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + } + } + }, + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "FieldDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REQUIRED": 2, + "LABEL_REPEATED": 3 + } + } + } + }, + "OneofDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "phpGenericServices": { + "type": "bool", + "id": 42, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + } + } + }, + "OneofOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + } + } + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "longrunning": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.LongRunning", + "go_package": "google.golang.org/genproto/googleapis/longrunning;longrunning", + "java_multiple_files": true, + "java_outer_classname": "OperationsProto", + "java_package": "com.google.longrunning", + "php_namespace": "Google\\LongRunning" + }, + "nested": { + "operationInfo": { + "type": "google.longrunning.OperationInfo", + "id": 1049, + "extend": "google.protobuf.MethodOptions" + }, + "Operations": { + "options": { + "(google.api.default_host)": "longrunning.googleapis.com" + }, + "methods": { + "ListOperations": { + "requestType": "ListOperationsRequest", + "responseType": "ListOperationsResponse", + "options": { + "(google.api.http).get": "/v1/{name=operations}", + "(google.api.method_signature)": "name,filter" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations}" + } + }, + { + "(google.api.method_signature)": "name,filter" + } + ] + }, + "GetOperation": { + "requestType": "GetOperationRequest", + "responseType": "Operation", + "options": { + "(google.api.http).get": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteOperation": { + "requestType": "DeleteOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CancelOperation": { + "requestType": "CancelOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1/{name=operations/**}:cancel", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=operations/**}:cancel", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "WaitOperation": { + "requestType": "WaitOperationRequest", + "responseType": "Operation" + } + } + }, + "Operation": { + "oneofs": { + "result": { + "oneof": [ + "error", + "response" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "metadata": { + "type": "google.protobuf.Any", + "id": 2 + }, + "done": { + "type": "bool", + "id": 3 + }, + "error": { + "type": "google.rpc.Status", + "id": 4 + }, + "response": { + "type": "google.protobuf.Any", + "id": 5 + } + } + }, + "GetOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "ListOperationsRequest": { + "fields": { + "name": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListOperationsResponse": { + "fields": { + "operations": { + "rule": "repeated", + "type": "Operation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CancelOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "DeleteOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "WaitOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "timeout": { + "type": "google.protobuf.Duration", + "id": 2 + } + } + }, + "OperationInfo": { + "fields": { + "responseType": { + "type": "string", + "id": 1 + }, + "metadataType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "rpc": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", + "java_multiple_files": true, + "java_outer_classname": "StatusProto", + "java_package": "com.google.rpc", + "objc_class_prefix": "RPC" + }, + "nested": { + "Status": { + "fields": { + "code": { + "type": "int32", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "details": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/google-cloud-shell/src/v1/cloud_shell_service_client.ts b/packages/google-cloud-shell/src/v1/cloud_shell_service_client.ts new file mode 100644 index 00000000000..c787539084e --- /dev/null +++ b/packages/google-cloud-shell/src/v1/cloud_shell_service_client.ts @@ -0,0 +1,879 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import * as gax from 'google-gax'; +import {Callback, CallOptions, Descriptors, ClientOptions, LROperation} from 'google-gax'; + +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1/cloud_shell_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './cloud_shell_service_client_config.json'; +import { operationsProtos } from 'google-gax'; +const version = require('../../../package.json').version; + +/** + * API for interacting with Google Cloud Shell. Each user of Cloud Shell has at + * least one environment, which has the ID "default". Environment consists of a + * Docker image defining what is installed on the environment and a home + * directory containing the user's data that will remain across sessions. + * Clients use this API to start and fetch information about their environment, + * which can then be used to connect to that environment via a separate SSH + * client. + * @class + * @memberof v1 + */ +export class CloudShellServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + cloudShellServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of CloudShellServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. + * In fallback mode, a special browser-compatible transport implementation is used + * instead of gRPC transport. In browser context (if the `window` object is defined) + * the fallback mode is enabled automatically; set `options.fallback` to `false` + * if you need to override this behavior. + */ + constructor(opts?: ClientOptions) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof CloudShellServiceClient; + const servicePath = opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gax.fallback : gax; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest' ) { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + environmentPathTemplate: new this._gaxModule.PathTemplate( + 'users/{user}/environments/{environment}' + ), + }; + + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); + + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + + this.operationsClient = this._gaxModule.lro({ + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined + }).operationsClient(opts); + const startEnvironmentResponse = protoFilesRoot.lookup( + '.google.cloud.shell.v1.StartEnvironmentResponse') as gax.protobuf.Type; + const startEnvironmentMetadata = protoFilesRoot.lookup( + '.google.cloud.shell.v1.StartEnvironmentMetadata') as gax.protobuf.Type; + const authorizeEnvironmentResponse = protoFilesRoot.lookup( + '.google.cloud.shell.v1.AuthorizeEnvironmentResponse') as gax.protobuf.Type; + const authorizeEnvironmentMetadata = protoFilesRoot.lookup( + '.google.cloud.shell.v1.AuthorizeEnvironmentMetadata') as gax.protobuf.Type; + const addPublicKeyResponse = protoFilesRoot.lookup( + '.google.cloud.shell.v1.AddPublicKeyResponse') as gax.protobuf.Type; + const addPublicKeyMetadata = protoFilesRoot.lookup( + '.google.cloud.shell.v1.AddPublicKeyMetadata') as gax.protobuf.Type; + const removePublicKeyResponse = protoFilesRoot.lookup( + '.google.cloud.shell.v1.RemovePublicKeyResponse') as gax.protobuf.Type; + const removePublicKeyMetadata = protoFilesRoot.lookup( + '.google.cloud.shell.v1.RemovePublicKeyMetadata') as gax.protobuf.Type; + + this.descriptors.longrunning = { + startEnvironment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + startEnvironmentResponse.decode.bind(startEnvironmentResponse), + startEnvironmentMetadata.decode.bind(startEnvironmentMetadata)), + authorizeEnvironment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + authorizeEnvironmentResponse.decode.bind(authorizeEnvironmentResponse), + authorizeEnvironmentMetadata.decode.bind(authorizeEnvironmentMetadata)), + addPublicKey: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + addPublicKeyResponse.decode.bind(addPublicKeyResponse), + addPublicKeyMetadata.decode.bind(addPublicKeyMetadata)), + removePublicKey: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + removePublicKeyResponse.decode.bind(removePublicKeyResponse), + removePublicKeyMetadata.decode.bind(removePublicKeyMetadata)) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.shell.v1.CloudShellService', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.cloudShellServiceStub) { + return this.cloudShellServiceStub; + } + + // Put together the "service stub" for + // google.cloud.shell.v1.CloudShellService. + this.cloudShellServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.shell.v1.CloudShellService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.shell.v1.CloudShellService, + this._opts) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const cloudShellServiceStubMethods = + ['getEnvironment', 'startEnvironment', 'authorizeEnvironment', 'addPublicKey', 'removePublicKey']; + for (const methodName of cloudShellServiceStubMethods) { + const callPromise = this.cloudShellServiceStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.cloudShellServiceStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'cloudshell.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'cloudshell.googleapis.com'; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/cloud-platform' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + getEnvironment( + request: protos.google.cloud.shell.v1.IGetEnvironmentRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.shell.v1.IEnvironment, + protos.google.cloud.shell.v1.IGetEnvironmentRequest|undefined, {}|undefined + ]>; + getEnvironment( + request: protos.google.cloud.shell.v1.IGetEnvironmentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.shell.v1.IEnvironment, + protos.google.cloud.shell.v1.IGetEnvironmentRequest|null|undefined, + {}|null|undefined>): void; + getEnvironment( + request: protos.google.cloud.shell.v1.IGetEnvironmentRequest, + callback: Callback< + protos.google.cloud.shell.v1.IEnvironment, + protos.google.cloud.shell.v1.IGetEnvironmentRequest|null|undefined, + {}|null|undefined>): void; +/** + * Gets an environment. Returns NOT_FOUND if the environment does not exist. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the requested resource, for example `users/me/environments/default` + * or `users/someone@example.com/environments/default`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Environment]{@link google.cloud.shell.v1.Environment}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.getEnvironment(request); + */ + getEnvironment( + request: protos.google.cloud.shell.v1.IGetEnvironmentRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.shell.v1.IEnvironment, + protos.google.cloud.shell.v1.IGetEnvironmentRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.shell.v1.IEnvironment, + protos.google.cloud.shell.v1.IGetEnvironmentRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.shell.v1.IEnvironment, + protos.google.cloud.shell.v1.IGetEnvironmentRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + 'name': request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getEnvironment(request, options, callback); + } + + startEnvironment( + request: protos.google.cloud.shell.v1.IStartEnvironmentRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + startEnvironment( + request: protos.google.cloud.shell.v1.IStartEnvironmentRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + startEnvironment( + request: protos.google.cloud.shell.v1.IStartEnvironmentRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; +/** + * Starts an existing environment, allowing clients to connect to it. The + * returned operation will contain an instance of StartEnvironmentMetadata in + * its metadata field. Users can wait for the environment to start by polling + * this operation via GetOperation. Once the environment has finished starting + * and is ready to accept connections, the operation will contain a + * StartEnvironmentResponse in its response field. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Name of the resource that should be started, for example + * `users/me/environments/default` or + * `users/someone@example.com/environments/default`. + * @param {string} request.accessToken + * The initial access token passed to the environment. If this is present and + * valid, the environment will be pre-authenticated with gcloud so that the + * user can run gcloud commands in Cloud Shell without having to log in. This + * code can be updated later by calling AuthorizeEnvironment. + * @param {string[]} request.publicKeys + * Public keys that should be added to the environment before it is started. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.startEnvironment(request); + * const [response] = await operation.promise(); + */ + startEnvironment( + request: protos.google.cloud.shell.v1.IStartEnvironmentRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + 'name': request.name || '', + }); + this.initialize(); + return this.innerApiCalls.startEnvironment(request, options, callback); + } +/** + * Check the status of the long running operation returned by `startEnvironment()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkStartEnvironmentProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkStartEnvironmentProgress(name: string): Promise>{ + const request = new operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.startEnvironment, gax.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + authorizeEnvironment( + request: protos.google.cloud.shell.v1.IAuthorizeEnvironmentRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + authorizeEnvironment( + request: protos.google.cloud.shell.v1.IAuthorizeEnvironmentRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + authorizeEnvironment( + request: protos.google.cloud.shell.v1.IAuthorizeEnvironmentRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; +/** + * Sends OAuth credentials to a running environment on behalf of a user. When + * this completes, the environment will be authorized to run various Google + * Cloud command line tools without requiring the user to manually + * authenticate. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Name of the resource that should receive the credentials, for example + * `users/me/environments/default` or + * `users/someone@example.com/environments/default`. + * @param {string} request.accessToken + * The OAuth access token that should be sent to the environment. + * @param {string} request.idToken + * The OAuth ID token that should be sent to the environment. + * @param {google.protobuf.Timestamp} request.expireTime + * The time when the credentials expire. If not set, defaults to one hour from + * when the server received the request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.authorizeEnvironment(request); + * const [response] = await operation.promise(); + */ + authorizeEnvironment( + request: protos.google.cloud.shell.v1.IAuthorizeEnvironmentRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + 'name': request.name || '', + }); + this.initialize(); + return this.innerApiCalls.authorizeEnvironment(request, options, callback); + } +/** + * Check the status of the long running operation returned by `authorizeEnvironment()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkAuthorizeEnvironmentProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkAuthorizeEnvironmentProgress(name: string): Promise>{ + const request = new operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.authorizeEnvironment, gax.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + addPublicKey( + request: protos.google.cloud.shell.v1.IAddPublicKeyRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + addPublicKey( + request: protos.google.cloud.shell.v1.IAddPublicKeyRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + addPublicKey( + request: protos.google.cloud.shell.v1.IAddPublicKeyRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; +/** + * Adds a public SSH key to an environment, allowing clients with the + * corresponding private key to connect to that environment via SSH. If a key + * with the same content already exists, this will error with ALREADY_EXISTS. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.environment + * Environment this key should be added to, e.g. + * `users/me/environments/default`. + * @param {string} request.key + * Key that should be added to the environment. Supported formats are + * `ssh-dss` (see RFC4253), `ssh-rsa` (see RFC4253), `ecdsa-sha2-nistp256` + * (see RFC5656), `ecdsa-sha2-nistp384` (see RFC5656) and + * `ecdsa-sha2-nistp521` (see RFC5656). It should be structured as + * <format> <content>, where <content> part is encoded with + * Base64. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.addPublicKey(request); + * const [response] = await operation.promise(); + */ + addPublicKey( + request: protos.google.cloud.shell.v1.IAddPublicKeyRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + 'environment': request.environment || '', + }); + this.initialize(); + return this.innerApiCalls.addPublicKey(request, options, callback); + } +/** + * Check the status of the long running operation returned by `addPublicKey()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkAddPublicKeyProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkAddPublicKeyProgress(name: string): Promise>{ + const request = new operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.addPublicKey, gax.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + removePublicKey( + request: protos.google.cloud.shell.v1.IRemovePublicKeyRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + removePublicKey( + request: protos.google.cloud.shell.v1.IRemovePublicKeyRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + removePublicKey( + request: protos.google.cloud.shell.v1.IRemovePublicKeyRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; +/** + * Removes a public SSH key from an environment. Clients will no longer be + * able to connect to the environment using the corresponding private key. + * If a key with the same content is not present, this will error with + * NOT_FOUND. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.environment + * Environment this key should be removed from, e.g. + * `users/me/environments/default`. + * @param {string} request.key + * Key that should be removed from the environment. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.removePublicKey(request); + * const [response] = await operation.promise(); + */ + removePublicKey( + request: protos.google.cloud.shell.v1.IRemovePublicKeyRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + 'environment': request.environment || '', + }); + this.initialize(); + return this.innerApiCalls.removePublicKey(request, options, callback); + } +/** + * Check the status of the long running operation returned by `removePublicKey()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkRemovePublicKeyProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkRemovePublicKeyProgress(name: string): Promise>{ + const request = new operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.removePublicKey, gax.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified environment resource name string. + * + * @param {string} user + * @param {string} environment + * @returns {string} Resource name string. + */ + environmentPath(user:string,environment:string) { + return this.pathTemplates.environmentPathTemplate.render({ + user: user, + environment: environment, + }); + } + + /** + * Parse the user from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the user. + */ + matchUserFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).user; + } + + /** + * Parse the environment from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + this.initialize(); + if (!this._terminated) { + return this.cloudShellServiceStub!.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-shell/src/v1/cloud_shell_service_client_config.json b/packages/google-cloud-shell/src/v1/cloud_shell_service_client_config.json new file mode 100644 index 00000000000..fe310e2b677 --- /dev/null +++ b/packages/google-cloud-shell/src/v1/cloud_shell_service_client_config.json @@ -0,0 +1,64 @@ +{ + "interfaces": { + "google.cloud.shell.v1.CloudShellService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unknown_unavailable": [ + "UNKNOWN", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + }, + "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetEnvironment": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "StartEnvironment": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "AuthorizeEnvironment": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "AddPublicKey": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RemovePublicKey": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-shell/src/v1/cloud_shell_service_proto_list.json b/packages/google-cloud-shell/src/v1/cloud_shell_service_proto_list.json new file mode 100644 index 00000000000..ef5795fc867 --- /dev/null +++ b/packages/google-cloud-shell/src/v1/cloud_shell_service_proto_list.json @@ -0,0 +1,3 @@ +[ + "../../protos/google/cloud/shell/v1/cloudshell.proto" +] diff --git a/packages/google-cloud-shell/src/v1/gapic_metadata.json b/packages/google-cloud-shell/src/v1/gapic_metadata.json new file mode 100644 index 00000000000..81105cd0529 --- /dev/null +++ b/packages/google-cloud-shell/src/v1/gapic_metadata.json @@ -0,0 +1,73 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.shell.v1", + "libraryPackage": "@google-cloud/shell", + "services": { + "CloudShellService": { + "clients": { + "grpc": { + "libraryClient": "CloudShellServiceClient", + "rpcs": { + "GetEnvironment": { + "methods": [ + "getEnvironment" + ] + }, + "StartEnvironment": { + "methods": [ + "startEnvironment" + ] + }, + "AuthorizeEnvironment": { + "methods": [ + "authorizeEnvironment" + ] + }, + "AddPublicKey": { + "methods": [ + "addPublicKey" + ] + }, + "RemovePublicKey": { + "methods": [ + "removePublicKey" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "CloudShellServiceClient", + "rpcs": { + "GetEnvironment": { + "methods": [ + "getEnvironment" + ] + }, + "StartEnvironment": { + "methods": [ + "startEnvironment" + ] + }, + "AuthorizeEnvironment": { + "methods": [ + "authorizeEnvironment" + ] + }, + "AddPublicKey": { + "methods": [ + "addPublicKey" + ] + }, + "RemovePublicKey": { + "methods": [ + "removePublicKey" + ] + } + } + } + } + } + } +} diff --git a/packages/google-cloud-shell/src/v1/index.ts b/packages/google-cloud-shell/src/v1/index.ts new file mode 100644 index 00000000000..f56f0d6ebd4 --- /dev/null +++ b/packages/google-cloud-shell/src/v1/index.ts @@ -0,0 +1,19 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +export {CloudShellServiceClient} from './cloud_shell_service_client'; diff --git a/packages/google-cloud-shell/system-test/fixtures/sample/src/index.js b/packages/google-cloud-shell/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..f729610cc47 --- /dev/null +++ b/packages/google-cloud-shell/system-test/fixtures/sample/src/index.js @@ -0,0 +1,27 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + +/* eslint-disable node/no-missing-require, no-unused-vars */ +const shell = require('@google-cloud/shell'); + +function main() { + const cloudShellServiceClient = new shell.CloudShellServiceClient(); +} + +main(); diff --git a/packages/google-cloud-shell/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-shell/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..d4d46e08a1d --- /dev/null +++ b/packages/google-cloud-shell/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,32 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {CloudShellServiceClient} from '@google-cloud/shell'; + +// check that the client class type name can be used +function doStuffWithCloudShellServiceClient(client: CloudShellServiceClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const cloudShellServiceClient = new CloudShellServiceClient(); + doStuffWithCloudShellServiceClient(cloudShellServiceClient); +} + +main(); diff --git a/packages/google-cloud-shell/system-test/install.ts b/packages/google-cloud-shell/system-test/install.ts new file mode 100644 index 00000000000..1f850b522f3 --- /dev/null +++ b/packages/google-cloud-shell/system-test/install.ts @@ -0,0 +1,49 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import { packNTest } from 'pack-n-play'; +import { readFileSync } from 'fs'; +import { describe, it } from 'mocha'; + +describe('📦 pack-n-play test', () => { + + it('TypeScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() + } + }; + await packNTest(options); + }); + + it('JavaScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() + } + }; + await packNTest(options); + }); + +}); diff --git a/packages/google-cloud-shell/test/gapic_cloud_shell_service_v1.ts b/packages/google-cloud-shell/test/gapic_cloud_shell_service_v1.ts new file mode 100644 index 00000000000..6056ed59810 --- /dev/null +++ b/packages/google-cloud-shell/test/gapic_cloud_shell_service_v1.ts @@ -0,0 +1,837 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import { describe, it } from 'mocha'; +import * as cloudshellserviceModule from '../src'; + +import {protobuf, LROperation, operationsProtos} from 'google-gax'; + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubLongRunningCall(response?: ResponseType, callError?: Error, lroError?: Error) { + const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError ? sinon.stub().rejects(callError) : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback(response?: ResponseType, callError?: Error, lroError?: Error) { + const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError ? sinon.stub().callsArgWith(2, callError) : sinon.stub().callsArgWith(2, null, mockOperation); +} + +describe('v1.CloudShellServiceClient', () => { + it('has servicePath', () => { + const servicePath = cloudshellserviceModule.v1.CloudShellServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = cloudshellserviceModule.v1.CloudShellServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = cloudshellserviceModule.v1.CloudShellServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + assert.strictEqual(client.cloudShellServiceStub, undefined); + await client.initialize(); + assert(client.cloudShellServiceStub); + }); + + it('has close method', () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error|null, projectId?: string|null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + + describe('getEnvironment', () => { + it('invokes getEnvironment without error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.shell.v1.GetEnvironmentRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.cloud.shell.v1.Environment()); + client.innerApiCalls.getEnvironment = stubSimpleCall(expectedResponse); + const [response] = await client.getEnvironment(request); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.getEnvironment as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes getEnvironment without error using callback', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.shell.v1.GetEnvironmentRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.cloud.shell.v1.Environment()); + client.innerApiCalls.getEnvironment = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getEnvironment( + request, + (err?: Error|null, result?: protos.google.cloud.shell.v1.IEnvironment|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.getEnvironment as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); + + it('invokes getEnvironment with error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.shell.v1.GetEnvironmentRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getEnvironment = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getEnvironment(request), expectedError); + assert((client.innerApiCalls.getEnvironment as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + }); + + describe('startEnvironment', () => { + it('invokes startEnvironment without error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.shell.v1.StartEnvironmentRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.longrunning.Operation()); + client.innerApiCalls.startEnvironment = stubLongRunningCall(expectedResponse); + const [operation] = await client.startEnvironment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.startEnvironment as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes startEnvironment without error using callback', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.shell.v1.StartEnvironmentRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.longrunning.Operation()); + client.innerApiCalls.startEnvironment = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.startEnvironment( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.startEnvironment as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); + + it('invokes startEnvironment with call error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.shell.v1.StartEnvironmentRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.startEnvironment = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.startEnvironment(request), expectedError); + assert((client.innerApiCalls.startEnvironment as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes startEnvironment with LRO error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.shell.v1.StartEnvironmentRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.startEnvironment = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.startEnvironment(request); + await assert.rejects(operation.promise(), expectedError); + assert((client.innerApiCalls.startEnvironment as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes checkStartEnvironmentProgress without error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage(new operationsProtos.google.longrunning.Operation()); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkStartEnvironmentProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkStartEnvironmentProgress with error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkStartEnvironmentProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('authorizeEnvironment', () => { + it('invokes authorizeEnvironment without error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.shell.v1.AuthorizeEnvironmentRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.longrunning.Operation()); + client.innerApiCalls.authorizeEnvironment = stubLongRunningCall(expectedResponse); + const [operation] = await client.authorizeEnvironment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.authorizeEnvironment as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes authorizeEnvironment without error using callback', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.shell.v1.AuthorizeEnvironmentRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.longrunning.Operation()); + client.innerApiCalls.authorizeEnvironment = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.authorizeEnvironment( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.authorizeEnvironment as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); + + it('invokes authorizeEnvironment with call error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.shell.v1.AuthorizeEnvironmentRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.authorizeEnvironment = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.authorizeEnvironment(request), expectedError); + assert((client.innerApiCalls.authorizeEnvironment as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes authorizeEnvironment with LRO error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.shell.v1.AuthorizeEnvironmentRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.authorizeEnvironment = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.authorizeEnvironment(request); + await assert.rejects(operation.promise(), expectedError); + assert((client.innerApiCalls.authorizeEnvironment as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes checkAuthorizeEnvironmentProgress without error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage(new operationsProtos.google.longrunning.Operation()); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkAuthorizeEnvironmentProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkAuthorizeEnvironmentProgress with error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkAuthorizeEnvironmentProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('addPublicKey', () => { + it('invokes addPublicKey without error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.shell.v1.AddPublicKeyRequest()); + request.environment = ''; + const expectedHeaderRequestParams = "environment="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.longrunning.Operation()); + client.innerApiCalls.addPublicKey = stubLongRunningCall(expectedResponse); + const [operation] = await client.addPublicKey(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.addPublicKey as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes addPublicKey without error using callback', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.shell.v1.AddPublicKeyRequest()); + request.environment = ''; + const expectedHeaderRequestParams = "environment="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.longrunning.Operation()); + client.innerApiCalls.addPublicKey = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.addPublicKey( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.addPublicKey as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); + + it('invokes addPublicKey with call error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.shell.v1.AddPublicKeyRequest()); + request.environment = ''; + const expectedHeaderRequestParams = "environment="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.addPublicKey = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.addPublicKey(request), expectedError); + assert((client.innerApiCalls.addPublicKey as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes addPublicKey with LRO error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.shell.v1.AddPublicKeyRequest()); + request.environment = ''; + const expectedHeaderRequestParams = "environment="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.addPublicKey = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.addPublicKey(request); + await assert.rejects(operation.promise(), expectedError); + assert((client.innerApiCalls.addPublicKey as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes checkAddPublicKeyProgress without error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage(new operationsProtos.google.longrunning.Operation()); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkAddPublicKeyProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkAddPublicKeyProgress with error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkAddPublicKeyProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('removePublicKey', () => { + it('invokes removePublicKey without error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.shell.v1.RemovePublicKeyRequest()); + request.environment = ''; + const expectedHeaderRequestParams = "environment="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.longrunning.Operation()); + client.innerApiCalls.removePublicKey = stubLongRunningCall(expectedResponse); + const [operation] = await client.removePublicKey(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.removePublicKey as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes removePublicKey without error using callback', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.shell.v1.RemovePublicKeyRequest()); + request.environment = ''; + const expectedHeaderRequestParams = "environment="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.longrunning.Operation()); + client.innerApiCalls.removePublicKey = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.removePublicKey( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.removePublicKey as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); + + it('invokes removePublicKey with call error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.shell.v1.RemovePublicKeyRequest()); + request.environment = ''; + const expectedHeaderRequestParams = "environment="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.removePublicKey = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.removePublicKey(request), expectedError); + assert((client.innerApiCalls.removePublicKey as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes removePublicKey with LRO error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.shell.v1.RemovePublicKeyRequest()); + request.environment = ''; + const expectedHeaderRequestParams = "environment="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.removePublicKey = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.removePublicKey(request); + await assert.rejects(operation.promise(), expectedError); + assert((client.innerApiCalls.removePublicKey as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes checkRemovePublicKeyProgress without error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage(new operationsProtos.google.longrunning.Operation()); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkRemovePublicKeyProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkRemovePublicKeyProgress with error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkRemovePublicKeyProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('Path templates', () => { + + describe('environment', () => { + const fakePath = "/rendered/path/environment"; + const expectedParameters = { + user: "userValue", + environment: "environmentValue", + }; + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.environmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.environmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('environmentPath', () => { + const result = client.environmentPath("userValue", "environmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.environmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchUserFromEnvironmentName', () => { + const result = client.matchUserFromEnvironmentName(fakePath); + assert.strictEqual(result, "userValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromEnvironmentName', () => { + const result = client.matchEnvironmentFromEnvironmentName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/packages/google-cloud-shell/tsconfig.json b/packages/google-cloud-shell/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/packages/google-cloud-shell/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2018", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts" + ] +} diff --git a/packages/google-cloud-shell/v1/README.md b/packages/google-cloud-shell/v1/README.md new file mode 100644 index 00000000000..f84e2c9f969 --- /dev/null +++ b/packages/google-cloud-shell/v1/README.md @@ -0,0 +1 @@ +Shell: Nodejs Client diff --git a/packages/google-cloud-shell/v1/linkinator.config.json b/packages/google-cloud-shell/v1/linkinator.config.json new file mode 100644 index 00000000000..29a223b6db6 --- /dev/null +++ b/packages/google-cloud-shell/v1/linkinator.config.json @@ -0,0 +1,10 @@ +{ + "recurse": true, + "skip": [ + "https://codecov.io/gh/googleapis/", + "www.googleapis.com", + "img.shields.io" + ], + "silent": true, + "concurrency": 10 +} diff --git a/packages/google-cloud-shell/v1/package.json b/packages/google-cloud-shell/v1/package.json new file mode 100644 index 00000000000..854f47a2ca4 --- /dev/null +++ b/packages/google-cloud-shell/v1/package.json @@ -0,0 +1,64 @@ +{ + "name": "@google-cloud/shell", + "version": "0.1.0", + "description": "Shell client for Node.js", + "repository": "googleapis/nodejs-shell", + "license": "Apache-2.0", + "author": "Google LLC", + "main": "build/src/index.js", + "files": [ + "build/src", + "build/protos" + ], + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google shell", + "shell", + "cloud shell service" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" + }, + "dependencies": { + "google-gax": "^2.14.0" + }, + "devDependencies": { + "@types/mocha": "^8.2.2", + "@types/node": "^14.17.1", + "@types/sinon": "^10.0.0", + "c8": "^7.7.2", + "gts": "^3.1.0", + "jsdoc": "^3.6.7", + "jsdoc-fresh": "^1.0.2", + "jsdoc-region-tag": "^1.0.6", + "linkinator": "^2.13.6", + "mocha": "^8.4.0", + "null-loader": "^4.0.1", + "pack-n-play": "^1.0.0-2", + "sinon": "^10.0.0", + "ts-loader": "^9.2.2", + "typescript": "^4.2.4", + "webpack": "^5.37.1", + "webpack-cli": "^4.7.0" + }, + "engines": { + "node": ">=v10.24.0" + } +} diff --git a/packages/google-cloud-shell/v1/protos/google/cloud/shell/v1/cloudshell.proto b/packages/google-cloud-shell/v1/protos/google/cloud/shell/v1/cloudshell.proto new file mode 100644 index 00000000000..f4b35b171cd --- /dev/null +++ b/packages/google-cloud-shell/v1/protos/google/cloud/shell/v1/cloudshell.proto @@ -0,0 +1,388 @@ +// Copyright 2021 Google LLC +// +// 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. + +syntax = "proto3"; + +package google.cloud.shell.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/shell/v1;shell"; +option java_multiple_files = true; +option java_outer_classname = "CloudShellProto"; +option java_package = "com.google.cloud.shell.v1"; + +// API for interacting with Google Cloud Shell. Each user of Cloud Shell has at +// least one environment, which has the ID "default". Environment consists of a +// Docker image defining what is installed on the environment and a home +// directory containing the user's data that will remain across sessions. +// Clients use this API to start and fetch information about their environment, +// which can then be used to connect to that environment via a separate SSH +// client. +service CloudShellService { + option (google.api.default_host) = "cloudshell.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Gets an environment. Returns NOT_FOUND if the environment does not exist. + rpc GetEnvironment(GetEnvironmentRequest) returns (Environment) { + option (google.api.http) = { + get: "/v1/{name=users/*/environments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Starts an existing environment, allowing clients to connect to it. The + // returned operation will contain an instance of StartEnvironmentMetadata in + // its metadata field. Users can wait for the environment to start by polling + // this operation via GetOperation. Once the environment has finished starting + // and is ready to accept connections, the operation will contain a + // StartEnvironmentResponse in its response field. + rpc StartEnvironment(StartEnvironmentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=users/*/environments/*}:start" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "StartEnvironmentResponse" + metadata_type: "StartEnvironmentMetadata" + }; + } + + // Sends OAuth credentials to a running environment on behalf of a user. When + // this completes, the environment will be authorized to run various Google + // Cloud command line tools without requiring the user to manually + // authenticate. + rpc AuthorizeEnvironment(AuthorizeEnvironmentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=users/*/environments/*}:authorize" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "AuthorizeEnvironmentResponse" + metadata_type: "AuthorizeEnvironmentMetadata" + }; + } + + // Adds a public SSH key to an environment, allowing clients with the + // corresponding private key to connect to that environment via SSH. If a key + // with the same content already exists, this will error with ALREADY_EXISTS. + rpc AddPublicKey(AddPublicKeyRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{environment=users/*/environments/*}:addPublicKey" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "AddPublicKeyResponse" + metadata_type: "AddPublicKeyMetadata" + }; + } + + // Removes a public SSH key from an environment. Clients will no longer be + // able to connect to the environment using the corresponding private key. + // If a key with the same content is not present, this will error with + // NOT_FOUND. + rpc RemovePublicKey(RemovePublicKeyRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{environment=users/*/environments/*}:removePublicKey" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "RemovePublicKeyResponse" + metadata_type: "RemovePublicKeyMetadata" + }; + } +} + +// A Cloud Shell environment, which is defined as the combination of a Docker +// image specifying what is installed on the environment and a home directory +// containing the user's data that will remain across sessions. Each user has +// at least an environment with the ID "default". +message Environment { + option (google.api.resource) = { + type: "cloudshell.googleapis.com/Environment" + pattern: "users/{user}/environments/{environment}" + }; + + // Possible execution states for an environment. + enum State { + // The environment's states is unknown. + STATE_UNSPECIFIED = 0; + + // The environment is not running and can't be connected to. Starting the + // environment will transition it to the PENDING state. + SUSPENDED = 1; + + // The environment is being started but is not yet ready to accept + // connections. + PENDING = 2; + + // The environment is running and ready to accept connections. It will + // automatically transition back to DISABLED after a period of inactivity or + // if another environment is started. + RUNNING = 3; + + // The environment is being deleted and can't be connected to. + DELETING = 4; + } + + // Immutable. Full name of this resource, in the format + // `users/{owner_email}/environments/{environment_id}`. `{owner_email}` is the + // email address of the user to whom this environment belongs, and + // `{environment_id}` is the identifier of this environment. For example, + // `users/someone@example.com/environments/default`. + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The environment's identifier, unique among the user's + // environments. + string id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Immutable. Full path to the Docker image used to run this environment, e.g. + // "gcr.io/dev-con/cloud-devshell:latest". + string docker_image = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Output only. Current execution state of this environment. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Host to which clients can connect to initiate HTTPS or WSS + // connections with the environment. + string web_host = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Username that clients should use when initiating SSH sessions + // with the environment. + string ssh_username = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Host to which clients can connect to initiate SSH sessions + // with the environment. + string ssh_host = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Port to which clients can connect to initiate SSH sessions + // with the environment. + int32 ssh_port = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Public keys associated with the environment. Clients can + // connect to this environment via SSH only if they possess a private key + // corresponding to at least one of these public keys. Keys can be added to or + // removed from the environment using the AddPublicKey and RemovePublicKey + // methods. + repeated string public_keys = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for +// [GetEnvironment][google.cloud.shell.v1.CloudShellService.GetEnvironment]. +message GetEnvironmentRequest { + // Required. Name of the requested resource, for example `users/me/environments/default` + // or `users/someone@example.com/environments/default`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudshell.googleapis.com/Environment" + } + ]; +} + +// Message included in the metadata field of operations returned from +// [CreateEnvironment][google.cloud.shell.v1.CloudShellService.CreateEnvironment]. +message CreateEnvironmentMetadata { + +} + +// Message included in the metadata field of operations returned from +// [DeleteEnvironment][google.cloud.shell.v1.CloudShellService.DeleteEnvironment]. +message DeleteEnvironmentMetadata { + +} + +// Request message for +// [StartEnvironment][google.cloud.shell.v1.CloudShellService.StartEnvironment]. +message StartEnvironmentRequest { + // Name of the resource that should be started, for example + // `users/me/environments/default` or + // `users/someone@example.com/environments/default`. + string name = 1; + + // The initial access token passed to the environment. If this is present and + // valid, the environment will be pre-authenticated with gcloud so that the + // user can run gcloud commands in Cloud Shell without having to log in. This + // code can be updated later by calling AuthorizeEnvironment. + string access_token = 2; + + // Public keys that should be added to the environment before it is started. + repeated string public_keys = 3; +} + +// Request message for +// [AuthorizeEnvironment][google.cloud.shell.v1.CloudShellService.AuthorizeEnvironment]. +message AuthorizeEnvironmentRequest { + // Name of the resource that should receive the credentials, for example + // `users/me/environments/default` or + // `users/someone@example.com/environments/default`. + string name = 1; + + // The OAuth access token that should be sent to the environment. + string access_token = 2; + + // The OAuth ID token that should be sent to the environment. + string id_token = 4; + + // The time when the credentials expire. If not set, defaults to one hour from + // when the server received the request. + google.protobuf.Timestamp expire_time = 3; +} + +// Response message for +// [AuthorizeEnvironment][google.cloud.shell.v1.CloudShellService.AuthorizeEnvironment]. +message AuthorizeEnvironmentResponse { + +} + +// Message included in the metadata field of operations returned from +// [AuthorizeEnvironment][google.cloud.shell.v1.CloudShellService.AuthorizeEnvironment]. +message AuthorizeEnvironmentMetadata { + +} + +// Message included in the metadata field of operations returned from +// [StartEnvironment][google.cloud.shell.v1.CloudShellService.StartEnvironment]. +message StartEnvironmentMetadata { + // Possible states an environment might transition between during startup. + // These states are not normally actionable by clients, but may be used to + // show a progress message to the user. An environment won't necessarily go + // through all of these states when starting. More states are likely to be + // added in the future. + enum State { + // The environment's start state is unknown. + STATE_UNSPECIFIED = 0; + + // The environment is in the process of being started, but no additional + // details are available. + STARTING = 1; + + // Startup is waiting for the user's disk to be unarchived. This can happen + // when the user returns to Cloud Shell after not having used it for a + // while, and suggests that startup will take longer than normal. + UNARCHIVING_DISK = 2; + + // Startup is waiting for compute resources to be assigned to the + // environment. This should normally happen very quickly, but an environment + // might stay in this state for an extended period of time if the system is + // experiencing heavy load. + AWAITING_COMPUTE_RESOURCES = 4; + + // Startup has completed. If the start operation was successful, the user + // should be able to establish an SSH connection to their environment. + // Otherwise, the operation will contain details of the failure. + FINISHED = 3; + } + + // Current state of the environment being started. + State state = 1; +} + +// Message included in the response field of operations returned from +// [StartEnvironment][google.cloud.shell.v1.CloudShellService.StartEnvironment] +// once the operation is complete. +message StartEnvironmentResponse { + // Environment that was started. + Environment environment = 1; +} + +// Request message for +// [AddPublicKey][google.cloud.shell.v1.CloudShellService.AddPublicKey]. +message AddPublicKeyRequest { + // Environment this key should be added to, e.g. + // `users/me/environments/default`. + string environment = 1; + + // Key that should be added to the environment. Supported formats are + // `ssh-dss` (see RFC4253), `ssh-rsa` (see RFC4253), `ecdsa-sha2-nistp256` + // (see RFC5656), `ecdsa-sha2-nistp384` (see RFC5656) and + // `ecdsa-sha2-nistp521` (see RFC5656). It should be structured as + // <format> <content>, where <content> part is encoded with + // Base64. + string key = 2; +} + +// Response message for +// [AddPublicKey][google.cloud.shell.v1.CloudShellService.AddPublicKey]. +message AddPublicKeyResponse { + // Key that was added to the environment. + string key = 1; +} + +// Message included in the metadata field of operations returned from +// [AddPublicKey][google.cloud.shell.v1.CloudShellService.AddPublicKey]. +message AddPublicKeyMetadata { + +} + +// Request message for +// [RemovePublicKey][google.cloud.shell.v1.CloudShellService.RemovePublicKey]. +message RemovePublicKeyRequest { + // Environment this key should be removed from, e.g. + // `users/me/environments/default`. + string environment = 1; + + // Key that should be removed from the environment. + string key = 2; +} + +// Response message for +// [RemovePublicKey][google.cloud.shell.v1.CloudShellService.RemovePublicKey]. +message RemovePublicKeyResponse { + +} + +// Message included in the metadata field of operations returned from +// [RemovePublicKey][google.cloud.shell.v1.CloudShellService.RemovePublicKey]. +message RemovePublicKeyMetadata { + +} + +// Cloud-shell specific information that will be included as details in failure +// responses. +message CloudShellErrorDetails { + // Set of possible errors returned from API calls. + enum CloudShellErrorCode { + // An unknown error occurred. + CLOUD_SHELL_ERROR_CODE_UNSPECIFIED = 0; + + // The image used by the Cloud Shell environment either does not exist or + // the user does not have access to it. + IMAGE_UNAVAILABLE = 1; + + // Cloud Shell has been disabled by an administrator for the user making the + // request. + CLOUD_SHELL_DISABLED = 2; + + // Cloud Shell has been permanently disabled due to a Terms of Service + // violation by the user. + TOS_VIOLATION = 4; + + // The user has exhausted their weekly Cloud Shell quota, and Cloud Shell + // will be disabled until the quota resets. + QUOTA_EXCEEDED = 5; + } + + // Code indicating the specific error the occurred. + CloudShellErrorCode code = 1; +} diff --git a/packages/google-cloud-shell/v1/src/index.ts b/packages/google-cloud-shell/v1/src/index.ts new file mode 100644 index 00000000000..ba7d58afb2e --- /dev/null +++ b/packages/google-cloud-shell/v1/src/index.ts @@ -0,0 +1,25 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as v1 from './v1'; +const CloudShellServiceClient = v1.CloudShellServiceClient; +type CloudShellServiceClient = v1.CloudShellServiceClient; +export {v1, CloudShellServiceClient}; +export default {v1, CloudShellServiceClient}; +import * as protos from '../protos/protos'; +export {protos} diff --git a/packages/google-cloud-shell/v1/src/v1/cloud_shell_service_client.ts b/packages/google-cloud-shell/v1/src/v1/cloud_shell_service_client.ts new file mode 100644 index 00000000000..c787539084e --- /dev/null +++ b/packages/google-cloud-shell/v1/src/v1/cloud_shell_service_client.ts @@ -0,0 +1,879 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import * as gax from 'google-gax'; +import {Callback, CallOptions, Descriptors, ClientOptions, LROperation} from 'google-gax'; + +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1/cloud_shell_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './cloud_shell_service_client_config.json'; +import { operationsProtos } from 'google-gax'; +const version = require('../../../package.json').version; + +/** + * API for interacting with Google Cloud Shell. Each user of Cloud Shell has at + * least one environment, which has the ID "default". Environment consists of a + * Docker image defining what is installed on the environment and a home + * directory containing the user's data that will remain across sessions. + * Clients use this API to start and fetch information about their environment, + * which can then be used to connect to that environment via a separate SSH + * client. + * @class + * @memberof v1 + */ +export class CloudShellServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + cloudShellServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of CloudShellServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. + * In fallback mode, a special browser-compatible transport implementation is used + * instead of gRPC transport. In browser context (if the `window` object is defined) + * the fallback mode is enabled automatically; set `options.fallback` to `false` + * if you need to override this behavior. + */ + constructor(opts?: ClientOptions) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof CloudShellServiceClient; + const servicePath = opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gax.fallback : gax; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest' ) { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + environmentPathTemplate: new this._gaxModule.PathTemplate( + 'users/{user}/environments/{environment}' + ), + }; + + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); + + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + + this.operationsClient = this._gaxModule.lro({ + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined + }).operationsClient(opts); + const startEnvironmentResponse = protoFilesRoot.lookup( + '.google.cloud.shell.v1.StartEnvironmentResponse') as gax.protobuf.Type; + const startEnvironmentMetadata = protoFilesRoot.lookup( + '.google.cloud.shell.v1.StartEnvironmentMetadata') as gax.protobuf.Type; + const authorizeEnvironmentResponse = protoFilesRoot.lookup( + '.google.cloud.shell.v1.AuthorizeEnvironmentResponse') as gax.protobuf.Type; + const authorizeEnvironmentMetadata = protoFilesRoot.lookup( + '.google.cloud.shell.v1.AuthorizeEnvironmentMetadata') as gax.protobuf.Type; + const addPublicKeyResponse = protoFilesRoot.lookup( + '.google.cloud.shell.v1.AddPublicKeyResponse') as gax.protobuf.Type; + const addPublicKeyMetadata = protoFilesRoot.lookup( + '.google.cloud.shell.v1.AddPublicKeyMetadata') as gax.protobuf.Type; + const removePublicKeyResponse = protoFilesRoot.lookup( + '.google.cloud.shell.v1.RemovePublicKeyResponse') as gax.protobuf.Type; + const removePublicKeyMetadata = protoFilesRoot.lookup( + '.google.cloud.shell.v1.RemovePublicKeyMetadata') as gax.protobuf.Type; + + this.descriptors.longrunning = { + startEnvironment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + startEnvironmentResponse.decode.bind(startEnvironmentResponse), + startEnvironmentMetadata.decode.bind(startEnvironmentMetadata)), + authorizeEnvironment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + authorizeEnvironmentResponse.decode.bind(authorizeEnvironmentResponse), + authorizeEnvironmentMetadata.decode.bind(authorizeEnvironmentMetadata)), + addPublicKey: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + addPublicKeyResponse.decode.bind(addPublicKeyResponse), + addPublicKeyMetadata.decode.bind(addPublicKeyMetadata)), + removePublicKey: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + removePublicKeyResponse.decode.bind(removePublicKeyResponse), + removePublicKeyMetadata.decode.bind(removePublicKeyMetadata)) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.shell.v1.CloudShellService', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.cloudShellServiceStub) { + return this.cloudShellServiceStub; + } + + // Put together the "service stub" for + // google.cloud.shell.v1.CloudShellService. + this.cloudShellServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.shell.v1.CloudShellService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.shell.v1.CloudShellService, + this._opts) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const cloudShellServiceStubMethods = + ['getEnvironment', 'startEnvironment', 'authorizeEnvironment', 'addPublicKey', 'removePublicKey']; + for (const methodName of cloudShellServiceStubMethods) { + const callPromise = this.cloudShellServiceStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.cloudShellServiceStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'cloudshell.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'cloudshell.googleapis.com'; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/cloud-platform' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + getEnvironment( + request: protos.google.cloud.shell.v1.IGetEnvironmentRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.shell.v1.IEnvironment, + protos.google.cloud.shell.v1.IGetEnvironmentRequest|undefined, {}|undefined + ]>; + getEnvironment( + request: protos.google.cloud.shell.v1.IGetEnvironmentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.shell.v1.IEnvironment, + protos.google.cloud.shell.v1.IGetEnvironmentRequest|null|undefined, + {}|null|undefined>): void; + getEnvironment( + request: protos.google.cloud.shell.v1.IGetEnvironmentRequest, + callback: Callback< + protos.google.cloud.shell.v1.IEnvironment, + protos.google.cloud.shell.v1.IGetEnvironmentRequest|null|undefined, + {}|null|undefined>): void; +/** + * Gets an environment. Returns NOT_FOUND if the environment does not exist. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the requested resource, for example `users/me/environments/default` + * or `users/someone@example.com/environments/default`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Environment]{@link google.cloud.shell.v1.Environment}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.getEnvironment(request); + */ + getEnvironment( + request: protos.google.cloud.shell.v1.IGetEnvironmentRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.shell.v1.IEnvironment, + protos.google.cloud.shell.v1.IGetEnvironmentRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.shell.v1.IEnvironment, + protos.google.cloud.shell.v1.IGetEnvironmentRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.shell.v1.IEnvironment, + protos.google.cloud.shell.v1.IGetEnvironmentRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + 'name': request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getEnvironment(request, options, callback); + } + + startEnvironment( + request: protos.google.cloud.shell.v1.IStartEnvironmentRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + startEnvironment( + request: protos.google.cloud.shell.v1.IStartEnvironmentRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + startEnvironment( + request: protos.google.cloud.shell.v1.IStartEnvironmentRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; +/** + * Starts an existing environment, allowing clients to connect to it. The + * returned operation will contain an instance of StartEnvironmentMetadata in + * its metadata field. Users can wait for the environment to start by polling + * this operation via GetOperation. Once the environment has finished starting + * and is ready to accept connections, the operation will contain a + * StartEnvironmentResponse in its response field. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Name of the resource that should be started, for example + * `users/me/environments/default` or + * `users/someone@example.com/environments/default`. + * @param {string} request.accessToken + * The initial access token passed to the environment. If this is present and + * valid, the environment will be pre-authenticated with gcloud so that the + * user can run gcloud commands in Cloud Shell without having to log in. This + * code can be updated later by calling AuthorizeEnvironment. + * @param {string[]} request.publicKeys + * Public keys that should be added to the environment before it is started. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.startEnvironment(request); + * const [response] = await operation.promise(); + */ + startEnvironment( + request: protos.google.cloud.shell.v1.IStartEnvironmentRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + 'name': request.name || '', + }); + this.initialize(); + return this.innerApiCalls.startEnvironment(request, options, callback); + } +/** + * Check the status of the long running operation returned by `startEnvironment()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkStartEnvironmentProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkStartEnvironmentProgress(name: string): Promise>{ + const request = new operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.startEnvironment, gax.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + authorizeEnvironment( + request: protos.google.cloud.shell.v1.IAuthorizeEnvironmentRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + authorizeEnvironment( + request: protos.google.cloud.shell.v1.IAuthorizeEnvironmentRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + authorizeEnvironment( + request: protos.google.cloud.shell.v1.IAuthorizeEnvironmentRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; +/** + * Sends OAuth credentials to a running environment on behalf of a user. When + * this completes, the environment will be authorized to run various Google + * Cloud command line tools without requiring the user to manually + * authenticate. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Name of the resource that should receive the credentials, for example + * `users/me/environments/default` or + * `users/someone@example.com/environments/default`. + * @param {string} request.accessToken + * The OAuth access token that should be sent to the environment. + * @param {string} request.idToken + * The OAuth ID token that should be sent to the environment. + * @param {google.protobuf.Timestamp} request.expireTime + * The time when the credentials expire. If not set, defaults to one hour from + * when the server received the request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.authorizeEnvironment(request); + * const [response] = await operation.promise(); + */ + authorizeEnvironment( + request: protos.google.cloud.shell.v1.IAuthorizeEnvironmentRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + 'name': request.name || '', + }); + this.initialize(); + return this.innerApiCalls.authorizeEnvironment(request, options, callback); + } +/** + * Check the status of the long running operation returned by `authorizeEnvironment()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkAuthorizeEnvironmentProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkAuthorizeEnvironmentProgress(name: string): Promise>{ + const request = new operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.authorizeEnvironment, gax.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + addPublicKey( + request: protos.google.cloud.shell.v1.IAddPublicKeyRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + addPublicKey( + request: protos.google.cloud.shell.v1.IAddPublicKeyRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + addPublicKey( + request: protos.google.cloud.shell.v1.IAddPublicKeyRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; +/** + * Adds a public SSH key to an environment, allowing clients with the + * corresponding private key to connect to that environment via SSH. If a key + * with the same content already exists, this will error with ALREADY_EXISTS. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.environment + * Environment this key should be added to, e.g. + * `users/me/environments/default`. + * @param {string} request.key + * Key that should be added to the environment. Supported formats are + * `ssh-dss` (see RFC4253), `ssh-rsa` (see RFC4253), `ecdsa-sha2-nistp256` + * (see RFC5656), `ecdsa-sha2-nistp384` (see RFC5656) and + * `ecdsa-sha2-nistp521` (see RFC5656). It should be structured as + * <format> <content>, where <content> part is encoded with + * Base64. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.addPublicKey(request); + * const [response] = await operation.promise(); + */ + addPublicKey( + request: protos.google.cloud.shell.v1.IAddPublicKeyRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + 'environment': request.environment || '', + }); + this.initialize(); + return this.innerApiCalls.addPublicKey(request, options, callback); + } +/** + * Check the status of the long running operation returned by `addPublicKey()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkAddPublicKeyProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkAddPublicKeyProgress(name: string): Promise>{ + const request = new operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.addPublicKey, gax.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + removePublicKey( + request: protos.google.cloud.shell.v1.IRemovePublicKeyRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + removePublicKey( + request: protos.google.cloud.shell.v1.IRemovePublicKeyRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + removePublicKey( + request: protos.google.cloud.shell.v1.IRemovePublicKeyRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; +/** + * Removes a public SSH key from an environment. Clients will no longer be + * able to connect to the environment using the corresponding private key. + * If a key with the same content is not present, this will error with + * NOT_FOUND. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.environment + * Environment this key should be removed from, e.g. + * `users/me/environments/default`. + * @param {string} request.key + * Key that should be removed from the environment. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.removePublicKey(request); + * const [response] = await operation.promise(); + */ + removePublicKey( + request: protos.google.cloud.shell.v1.IRemovePublicKeyRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + 'environment': request.environment || '', + }); + this.initialize(); + return this.innerApiCalls.removePublicKey(request, options, callback); + } +/** + * Check the status of the long running operation returned by `removePublicKey()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkRemovePublicKeyProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkRemovePublicKeyProgress(name: string): Promise>{ + const request = new operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.removePublicKey, gax.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified environment resource name string. + * + * @param {string} user + * @param {string} environment + * @returns {string} Resource name string. + */ + environmentPath(user:string,environment:string) { + return this.pathTemplates.environmentPathTemplate.render({ + user: user, + environment: environment, + }); + } + + /** + * Parse the user from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the user. + */ + matchUserFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).user; + } + + /** + * Parse the environment from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + this.initialize(); + if (!this._terminated) { + return this.cloudShellServiceStub!.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-shell/v1/src/v1/cloud_shell_service_client_config.json b/packages/google-cloud-shell/v1/src/v1/cloud_shell_service_client_config.json new file mode 100644 index 00000000000..fe310e2b677 --- /dev/null +++ b/packages/google-cloud-shell/v1/src/v1/cloud_shell_service_client_config.json @@ -0,0 +1,64 @@ +{ + "interfaces": { + "google.cloud.shell.v1.CloudShellService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unknown_unavailable": [ + "UNKNOWN", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + }, + "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetEnvironment": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "StartEnvironment": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "AuthorizeEnvironment": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "AddPublicKey": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RemovePublicKey": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-shell/v1/src/v1/cloud_shell_service_proto_list.json b/packages/google-cloud-shell/v1/src/v1/cloud_shell_service_proto_list.json new file mode 100644 index 00000000000..ef5795fc867 --- /dev/null +++ b/packages/google-cloud-shell/v1/src/v1/cloud_shell_service_proto_list.json @@ -0,0 +1,3 @@ +[ + "../../protos/google/cloud/shell/v1/cloudshell.proto" +] diff --git a/packages/google-cloud-shell/v1/src/v1/gapic_metadata.json b/packages/google-cloud-shell/v1/src/v1/gapic_metadata.json new file mode 100644 index 00000000000..81105cd0529 --- /dev/null +++ b/packages/google-cloud-shell/v1/src/v1/gapic_metadata.json @@ -0,0 +1,73 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.shell.v1", + "libraryPackage": "@google-cloud/shell", + "services": { + "CloudShellService": { + "clients": { + "grpc": { + "libraryClient": "CloudShellServiceClient", + "rpcs": { + "GetEnvironment": { + "methods": [ + "getEnvironment" + ] + }, + "StartEnvironment": { + "methods": [ + "startEnvironment" + ] + }, + "AuthorizeEnvironment": { + "methods": [ + "authorizeEnvironment" + ] + }, + "AddPublicKey": { + "methods": [ + "addPublicKey" + ] + }, + "RemovePublicKey": { + "methods": [ + "removePublicKey" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "CloudShellServiceClient", + "rpcs": { + "GetEnvironment": { + "methods": [ + "getEnvironment" + ] + }, + "StartEnvironment": { + "methods": [ + "startEnvironment" + ] + }, + "AuthorizeEnvironment": { + "methods": [ + "authorizeEnvironment" + ] + }, + "AddPublicKey": { + "methods": [ + "addPublicKey" + ] + }, + "RemovePublicKey": { + "methods": [ + "removePublicKey" + ] + } + } + } + } + } + } +} diff --git a/packages/google-cloud-shell/v1/src/v1/index.ts b/packages/google-cloud-shell/v1/src/v1/index.ts new file mode 100644 index 00000000000..f56f0d6ebd4 --- /dev/null +++ b/packages/google-cloud-shell/v1/src/v1/index.ts @@ -0,0 +1,19 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +export {CloudShellServiceClient} from './cloud_shell_service_client'; diff --git a/packages/google-cloud-shell/v1/system-test/fixtures/sample/src/index.js b/packages/google-cloud-shell/v1/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..f729610cc47 --- /dev/null +++ b/packages/google-cloud-shell/v1/system-test/fixtures/sample/src/index.js @@ -0,0 +1,27 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + +/* eslint-disable node/no-missing-require, no-unused-vars */ +const shell = require('@google-cloud/shell'); + +function main() { + const cloudShellServiceClient = new shell.CloudShellServiceClient(); +} + +main(); diff --git a/packages/google-cloud-shell/v1/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-shell/v1/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..d4d46e08a1d --- /dev/null +++ b/packages/google-cloud-shell/v1/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,32 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {CloudShellServiceClient} from '@google-cloud/shell'; + +// check that the client class type name can be used +function doStuffWithCloudShellServiceClient(client: CloudShellServiceClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const cloudShellServiceClient = new CloudShellServiceClient(); + doStuffWithCloudShellServiceClient(cloudShellServiceClient); +} + +main(); diff --git a/packages/google-cloud-shell/v1/system-test/install.ts b/packages/google-cloud-shell/v1/system-test/install.ts new file mode 100644 index 00000000000..1f850b522f3 --- /dev/null +++ b/packages/google-cloud-shell/v1/system-test/install.ts @@ -0,0 +1,49 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import { packNTest } from 'pack-n-play'; +import { readFileSync } from 'fs'; +import { describe, it } from 'mocha'; + +describe('📦 pack-n-play test', () => { + + it('TypeScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() + } + }; + await packNTest(options); + }); + + it('JavaScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() + } + }; + await packNTest(options); + }); + +}); diff --git a/packages/google-cloud-shell/v1/test/gapic_cloud_shell_service_v1.ts b/packages/google-cloud-shell/v1/test/gapic_cloud_shell_service_v1.ts new file mode 100644 index 00000000000..6056ed59810 --- /dev/null +++ b/packages/google-cloud-shell/v1/test/gapic_cloud_shell_service_v1.ts @@ -0,0 +1,837 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import { describe, it } from 'mocha'; +import * as cloudshellserviceModule from '../src'; + +import {protobuf, LROperation, operationsProtos} from 'google-gax'; + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubLongRunningCall(response?: ResponseType, callError?: Error, lroError?: Error) { + const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError ? sinon.stub().rejects(callError) : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback(response?: ResponseType, callError?: Error, lroError?: Error) { + const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError ? sinon.stub().callsArgWith(2, callError) : sinon.stub().callsArgWith(2, null, mockOperation); +} + +describe('v1.CloudShellServiceClient', () => { + it('has servicePath', () => { + const servicePath = cloudshellserviceModule.v1.CloudShellServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = cloudshellserviceModule.v1.CloudShellServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = cloudshellserviceModule.v1.CloudShellServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + assert.strictEqual(client.cloudShellServiceStub, undefined); + await client.initialize(); + assert(client.cloudShellServiceStub); + }); + + it('has close method', () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error|null, projectId?: string|null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + + describe('getEnvironment', () => { + it('invokes getEnvironment without error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.shell.v1.GetEnvironmentRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.cloud.shell.v1.Environment()); + client.innerApiCalls.getEnvironment = stubSimpleCall(expectedResponse); + const [response] = await client.getEnvironment(request); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.getEnvironment as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes getEnvironment without error using callback', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.shell.v1.GetEnvironmentRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.cloud.shell.v1.Environment()); + client.innerApiCalls.getEnvironment = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getEnvironment( + request, + (err?: Error|null, result?: protos.google.cloud.shell.v1.IEnvironment|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.getEnvironment as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); + + it('invokes getEnvironment with error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.shell.v1.GetEnvironmentRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getEnvironment = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getEnvironment(request), expectedError); + assert((client.innerApiCalls.getEnvironment as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + }); + + describe('startEnvironment', () => { + it('invokes startEnvironment without error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.shell.v1.StartEnvironmentRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.longrunning.Operation()); + client.innerApiCalls.startEnvironment = stubLongRunningCall(expectedResponse); + const [operation] = await client.startEnvironment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.startEnvironment as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes startEnvironment without error using callback', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.shell.v1.StartEnvironmentRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.longrunning.Operation()); + client.innerApiCalls.startEnvironment = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.startEnvironment( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.startEnvironment as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); + + it('invokes startEnvironment with call error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.shell.v1.StartEnvironmentRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.startEnvironment = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.startEnvironment(request), expectedError); + assert((client.innerApiCalls.startEnvironment as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes startEnvironment with LRO error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.shell.v1.StartEnvironmentRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.startEnvironment = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.startEnvironment(request); + await assert.rejects(operation.promise(), expectedError); + assert((client.innerApiCalls.startEnvironment as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes checkStartEnvironmentProgress without error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage(new operationsProtos.google.longrunning.Operation()); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkStartEnvironmentProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkStartEnvironmentProgress with error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkStartEnvironmentProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('authorizeEnvironment', () => { + it('invokes authorizeEnvironment without error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.shell.v1.AuthorizeEnvironmentRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.longrunning.Operation()); + client.innerApiCalls.authorizeEnvironment = stubLongRunningCall(expectedResponse); + const [operation] = await client.authorizeEnvironment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.authorizeEnvironment as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes authorizeEnvironment without error using callback', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.shell.v1.AuthorizeEnvironmentRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.longrunning.Operation()); + client.innerApiCalls.authorizeEnvironment = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.authorizeEnvironment( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.authorizeEnvironment as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); + + it('invokes authorizeEnvironment with call error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.shell.v1.AuthorizeEnvironmentRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.authorizeEnvironment = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.authorizeEnvironment(request), expectedError); + assert((client.innerApiCalls.authorizeEnvironment as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes authorizeEnvironment with LRO error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.shell.v1.AuthorizeEnvironmentRequest()); + request.name = ''; + const expectedHeaderRequestParams = "name="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.authorizeEnvironment = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.authorizeEnvironment(request); + await assert.rejects(operation.promise(), expectedError); + assert((client.innerApiCalls.authorizeEnvironment as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes checkAuthorizeEnvironmentProgress without error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage(new operationsProtos.google.longrunning.Operation()); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkAuthorizeEnvironmentProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkAuthorizeEnvironmentProgress with error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkAuthorizeEnvironmentProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('addPublicKey', () => { + it('invokes addPublicKey without error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.shell.v1.AddPublicKeyRequest()); + request.environment = ''; + const expectedHeaderRequestParams = "environment="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.longrunning.Operation()); + client.innerApiCalls.addPublicKey = stubLongRunningCall(expectedResponse); + const [operation] = await client.addPublicKey(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.addPublicKey as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes addPublicKey without error using callback', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.shell.v1.AddPublicKeyRequest()); + request.environment = ''; + const expectedHeaderRequestParams = "environment="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.longrunning.Operation()); + client.innerApiCalls.addPublicKey = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.addPublicKey( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.addPublicKey as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); + + it('invokes addPublicKey with call error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.shell.v1.AddPublicKeyRequest()); + request.environment = ''; + const expectedHeaderRequestParams = "environment="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.addPublicKey = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.addPublicKey(request), expectedError); + assert((client.innerApiCalls.addPublicKey as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes addPublicKey with LRO error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.shell.v1.AddPublicKeyRequest()); + request.environment = ''; + const expectedHeaderRequestParams = "environment="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.addPublicKey = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.addPublicKey(request); + await assert.rejects(operation.promise(), expectedError); + assert((client.innerApiCalls.addPublicKey as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes checkAddPublicKeyProgress without error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage(new operationsProtos.google.longrunning.Operation()); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkAddPublicKeyProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkAddPublicKeyProgress with error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkAddPublicKeyProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('removePublicKey', () => { + it('invokes removePublicKey without error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.shell.v1.RemovePublicKeyRequest()); + request.environment = ''; + const expectedHeaderRequestParams = "environment="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.longrunning.Operation()); + client.innerApiCalls.removePublicKey = stubLongRunningCall(expectedResponse); + const [operation] = await client.removePublicKey(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.removePublicKey as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes removePublicKey without error using callback', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.shell.v1.RemovePublicKeyRequest()); + request.environment = ''; + const expectedHeaderRequestParams = "environment="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage(new protos.google.longrunning.Operation()); + client.innerApiCalls.removePublicKey = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.removePublicKey( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert((client.innerApiCalls.removePublicKey as SinonStub) + .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); + }); + + it('invokes removePublicKey with call error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.shell.v1.RemovePublicKeyRequest()); + request.environment = ''; + const expectedHeaderRequestParams = "environment="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.removePublicKey = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.removePublicKey(request), expectedError); + assert((client.innerApiCalls.removePublicKey as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes removePublicKey with LRO error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.cloud.shell.v1.RemovePublicKeyRequest()); + request.environment = ''; + const expectedHeaderRequestParams = "environment="; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.removePublicKey = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.removePublicKey(request); + await assert.rejects(operation.promise(), expectedError); + assert((client.innerApiCalls.removePublicKey as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + + it('invokes checkRemovePublicKeyProgress without error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage(new operationsProtos.google.longrunning.Operation()); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkRemovePublicKeyProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkRemovePublicKeyProgress with error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkRemovePublicKeyProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('Path templates', () => { + + describe('environment', () => { + const fakePath = "/rendered/path/environment"; + const expectedParameters = { + user: "userValue", + environment: "environmentValue", + }; + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.environmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.environmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('environmentPath', () => { + const result = client.environmentPath("userValue", "environmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.environmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchUserFromEnvironmentName', () => { + const result = client.matchUserFromEnvironmentName(fakePath); + assert.strictEqual(result, "userValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromEnvironmentName', () => { + const result = client.matchEnvironmentFromEnvironmentName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/packages/google-cloud-shell/v1/tsconfig.json b/packages/google-cloud-shell/v1/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/packages/google-cloud-shell/v1/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2018", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts" + ] +} diff --git a/packages/google-cloud-shell/v1/webpack.config.js b/packages/google-cloud-shell/v1/webpack.config.js new file mode 100644 index 00000000000..b7f826274bb --- /dev/null +++ b/packages/google-cloud-shell/v1/webpack.config.js @@ -0,0 +1,64 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// https://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. + +const path = require('path'); + +module.exports = { + entry: './src/index.ts', + output: { + library: 'CloudShellService', + filename: './cloud-shell-service.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/ + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]gtoken/, + use: 'null-loader' + }, + ], + }, + mode: 'production', +}; diff --git a/packages/google-cloud-shell/webpack.config.js b/packages/google-cloud-shell/webpack.config.js new file mode 100644 index 00000000000..b7f826274bb --- /dev/null +++ b/packages/google-cloud-shell/webpack.config.js @@ -0,0 +1,64 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// https://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. + +const path = require('path'); + +module.exports = { + entry: './src/index.ts', + output: { + library: 'CloudShellService', + filename: './cloud-shell-service.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/ + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]gtoken/, + use: 'null-loader' + }, + ], + }, + mode: 'production', +}; From 744be1c590199bdea4edb950b0f30650949ae3bc Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Tue, 1 Jun 2021 23:21:34 +0000 Subject: [PATCH 024/254] fix: add gitignore, and samples --- packages/google-cloud-shell/.gitignore | 2 + .../google-cloud-shell/.repo-metadata.json | 2 +- packages/google-cloud-shell/package-lock.json | 5061 +++++++++++++++++ packages/google-cloud-shell/package.json | 67 +- .../google-cloud-shell/samples/package.json | 23 + .../google-cloud-shell/samples/quickstart.js | 50 + .../samples/test/quickstart.js | 53 + packages/google-cloud-shell/src/index.ts | 27 + .../src/v1/cloud_shell_service_client.ts | 1138 ++-- .../system-test/fixtures/sample/src/index.js | 1 - .../google-cloud-shell/system-test/install.ts | 24 +- .../test/gapic_cloud_shell_service_v1.ts | 1855 +++--- packages/google-cloud-shell/v1/src/index.ts | 2 +- .../v1/src/v1/cloud_shell_service_client.ts | 1138 ++-- .../system-test/fixtures/sample/src/index.js | 1 - .../v1/system-test/install.ts | 24 +- .../v1/test/gapic_cloud_shell_service_v1.ts | 1855 +++--- .../google-cloud-shell/v1/webpack.config.js | 12 +- packages/google-cloud-shell/webpack.config.js | 12 +- 19 files changed, 8808 insertions(+), 2539 deletions(-) create mode 100644 packages/google-cloud-shell/.gitignore create mode 100644 packages/google-cloud-shell/package-lock.json create mode 100644 packages/google-cloud-shell/samples/package.json create mode 100644 packages/google-cloud-shell/samples/quickstart.js create mode 100644 packages/google-cloud-shell/samples/test/quickstart.js create mode 100644 packages/google-cloud-shell/src/index.ts diff --git a/packages/google-cloud-shell/.gitignore b/packages/google-cloud-shell/.gitignore new file mode 100644 index 00000000000..7525967b155 --- /dev/null +++ b/packages/google-cloud-shell/.gitignore @@ -0,0 +1,2 @@ +build/ +node_modules diff --git a/packages/google-cloud-shell/.repo-metadata.json b/packages/google-cloud-shell/.repo-metadata.json index decd26ff8d8..b33d5ca121a 100644 --- a/packages/google-cloud-shell/.repo-metadata.json +++ b/packages/google-cloud-shell/.repo-metadata.json @@ -9,7 +9,7 @@ "repo": "googleapis/nodejs-cloud-shell", "distribution_name": "@google-cloud/cloud-shell", "api_id": "shell.googleapis.com", - "default_version": "", + "default_version": "v1", "requires_billing": true } diff --git a/packages/google-cloud-shell/package-lock.json b/packages/google-cloud-shell/package-lock.json new file mode 100644 index 00000000000..c7a77a74059 --- /dev/null +++ b/packages/google-cloud-shell/package-lock.json @@ -0,0 +1,5061 @@ +{ + "name": "@google-cloud/cloud-shell", + "version": "0.1.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/code-frame": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", + "dev": true, + "requires": { + "@babel/highlight": "^7.10.4" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.0.tgz", + "integrity": "sha512-V3ts7zMSu5lfiwWDVWzRDGIN+lnCEUdaXgtVHJgLb1rGaA6jMrtB9EmE7L18foXJIE8Un/A/h6NJfGQp/e1J4A==", + "dev": true + }, + "@babel/highlight": { + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.0.tgz", + "integrity": "sha512-YSCOwxvTYEIMSGaBQb5kDDsCopDdiUGsqpatp3fOlI4+2HQSkTmEVWnVuySdAC5EWCqSWWTv0ib63RjR7dTBdg==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.14.0", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "@babel/parser": { + "version": "7.14.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.4.tgz", + "integrity": "sha512-ArliyUsWDUqEGfWcmzpGUzNfLxTdTp6WU4IuP6QFSp9gGfWS6boxFCkJSJ/L4+RG8z/FnIU3WxCk6hPL9SSWeA==", + "dev": true + }, + "@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, + "@discoveryjs/json-ext": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.3.tgz", + "integrity": "sha512-Fxt+AfXgjMoin2maPIYzFZnQjAXjAL0PHscM5pRTtatFqB+vZxAM9tLp2Optnuw3QOQC40jTNeGYFOMvyf7v9g==", + "dev": true + }, + "@eslint/eslintrc": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.1.tgz", + "integrity": "sha512-5v7TDE9plVhvxQeWLXDTvFvJBdH6pEsdnl2g/dAptmuFEPedQ4Erq5rsDsX+mvAM610IhNaO2W5V1dOOnDKxkQ==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + }, + "espree": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "dev": true, + "requires": { + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" + } + }, + "globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dev": true, + "requires": { + "type-fest": "^0.8.1" + } + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + } + } + }, + "@grpc/grpc-js": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.3.2.tgz", + "integrity": "sha512-UXepkOKCATJrhHGsxt+CGfpZy9zUn1q9mop5kfcXq1fBkTePxVNPOdnISlCbJFlCtld+pSLGyZCzr9/zVprFKA==", + "requires": { + "@types/node": ">=12.12.47" + }, + "dependencies": { + "@types/node": { + "version": "15.6.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-15.6.1.tgz", + "integrity": "sha512-7EIraBEyRHEe7CH+Fm1XvgqU6uwZN8Q7jppJGcqjROMT29qhAuuOxYB1uEY5UMYQKEmA5D+5tBnhdaPXSsLONA==" + } + } + }, + "@grpc/proto-loader": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.6.2.tgz", + "integrity": "sha512-q2Qle60Ht2OQBCp9S5hv1JbI4uBBq6/mqSevFNK3ZEgRDBCAkWqZPUhD/K9gXOHrHKluliHiVq2L9sw1mVyAIg==", + "requires": { + "@types/long": "^4.0.1", + "lodash.camelcase": "^4.3.0", + "long": "^4.0.0", + "protobufjs": "^6.10.0", + "yargs": "^16.1.1" + } + }, + "@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true + }, + "@nodelib/fs.scandir": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz", + "integrity": "sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.4", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz", + "integrity": "sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q==", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz", + "integrity": "sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.4", + "fastq": "^1.6.0" + } + }, + "@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha1-m4sMxmPWaafY9vXQiToU00jzD78=" + }, + "@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" + }, + "@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" + }, + "@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha1-NVy8mLr61ZePntCV85diHx0Ga3A=" + }, + "@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=", + "requires": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E=" + }, + "@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik=" + }, + "@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha1-bMKyDFya1q0NzP0hynZz2Nf79o0=" + }, + "@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q=" + }, + "@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" + }, + "@sindresorhus/is": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", + "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", + "dev": true + }, + "@sinonjs/commons": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", + "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + }, + "@sinonjs/fake-timers": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-7.1.2.tgz", + "integrity": "sha512-iQADsW4LBMISqZ6Ci1dupJL9pprqwcVFTcOsEmQOEhW+KLCVn/Y4Jrvg2k19fIHCp+iFprriYPTdRcQR8NbUPg==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0" + } + }, + "@sinonjs/samsam": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.3.1.tgz", + "integrity": "sha512-1Hc0b1TtyfBu8ixF/tpfSHTVWKwCBLY4QJbkgnE7HcwyvT2xArDxb4K7dMgqRm3szI+LJbzmW/s4xxEhv6hwDg==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.6.0", + "lodash.get": "^4.4.2", + "type-detect": "^4.0.8" + } + }, + "@sinonjs/text-encoding": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", + "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", + "dev": true + }, + "@szmarczak/http-timer": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", + "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", + "dev": true, + "requires": { + "defer-to-connect": "^1.0.1" + } + }, + "@types/eslint": { + "version": "7.2.13", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.2.13.tgz", + "integrity": "sha512-LKmQCWAlnVHvvXq4oasNUMTJJb2GwSyTY8+1C7OH5ILR8mPLaljv1jxL1bXW3xB3jFbQxTKxJAvI8PyjB09aBg==", + "dev": true, + "requires": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "@types/eslint-scope": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.0.tgz", + "integrity": "sha512-O/ql2+rrCUe2W2rs7wMR+GqPRcgB6UiqN5RhrR5xruFlY7l9YLMn0ZkDzjoHLeiFkR8MCQZVudUuuvQ2BLC9Qw==", + "dev": true, + "requires": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, + "@types/estree": { + "version": "0.0.47", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.47.tgz", + "integrity": "sha512-c5ciR06jK8u9BstrmJyO97m+klJrrhCf9u3rLu3DEAJBirxRqSCvDQoYKmxuYwQI5SZChAWu+tq9oVlGRuzPAg==", + "dev": true + }, + "@types/istanbul-lib-coverage": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz", + "integrity": "sha512-sz7iLqvVUg1gIedBOvlkxPlc8/uVzyS5OwGz1cKjXzkl3FpL3al0crU8YGU1WoHkxn0Wxbw5tyi6hvzJKNzFsw==", + "dev": true + }, + "@types/json-schema": { + "version": "7.0.7", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz", + "integrity": "sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==", + "dev": true + }, + "@types/long": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz", + "integrity": "sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w==" + }, + "@types/minimist": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.1.tgz", + "integrity": "sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg==", + "dev": true + }, + "@types/mocha": { + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.2.tgz", + "integrity": "sha512-Lwh0lzzqT5Pqh6z61P3c3P5nm6fzQK/MMHl9UKeneAeInVflBSz1O2EkX6gM6xfJd7FBXBY5purtLx7fUiZ7Hw==", + "dev": true + }, + "@types/node": { + "version": "14.17.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.17.1.tgz", + "integrity": "sha512-/tpUyFD7meeooTRwl3sYlihx2BrJE7q9XF71EguPFIySj9B7qgnRtHsHTho+0AUm4m1SvWGm6uSncrR94q6Vtw==", + "dev": true + }, + "@types/normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==", + "dev": true + }, + "@types/sinon": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.1.tgz", + "integrity": "sha512-tZulsvuJwif5ddTBtscflI7gJcd+RpENcNZ7QCp0jKEl0bZY3Pu6PbJs4GR3SfQkGgsUa+FrlKsKQ0XyGNvDuA==", + "dev": true, + "requires": { + "@sinonjs/fake-timers": "^7.1.0" + } + }, + "@typescript-eslint/eslint-plugin": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.26.0.tgz", + "integrity": "sha512-yA7IWp+5Qqf+TLbd8b35ySFOFzUfL7i+4If50EqvjT6w35X8Lv0eBHb6rATeWmucks37w+zV+tWnOXI9JlG6Eg==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "4.26.0", + "@typescript-eslint/scope-manager": "4.26.0", + "debug": "^4.3.1", + "functional-red-black-tree": "^1.0.1", + "lodash": "^4.17.21", + "regexpp": "^3.1.0", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "dependencies": { + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, + "@typescript-eslint/experimental-utils": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.26.0.tgz", + "integrity": "sha512-TH2FO2rdDm7AWfAVRB5RSlbUhWxGVuxPNzGT7W65zVfl8H/WeXTk1e69IrcEVsBslrQSTDKQSaJD89hwKrhdkw==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.7", + "@typescript-eslint/scope-manager": "4.26.0", + "@typescript-eslint/types": "4.26.0", + "@typescript-eslint/typescript-estree": "4.26.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + } + }, + "@typescript-eslint/parser": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.26.0.tgz", + "integrity": "sha512-b4jekVJG9FfmjUfmM4VoOItQhPlnt6MPOBUL0AQbiTmm+SSpSdhHYlwayOm4IW9KLI/4/cRKtQCmDl1oE2OlPg==", + "dev": true, + "requires": { + "@typescript-eslint/scope-manager": "4.26.0", + "@typescript-eslint/types": "4.26.0", + "@typescript-eslint/typescript-estree": "4.26.0", + "debug": "^4.3.1" + } + }, + "@typescript-eslint/scope-manager": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.26.0.tgz", + "integrity": "sha512-G6xB6mMo4xVxwMt5lEsNTz3x4qGDt0NSGmTBNBPJxNsrTXJSm21c6raeYroS2OwQsOyIXqKZv266L/Gln1BWqg==", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.26.0", + "@typescript-eslint/visitor-keys": "4.26.0" + } + }, + "@typescript-eslint/types": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.26.0.tgz", + "integrity": "sha512-rADNgXl1kS/EKnDr3G+m7fB9yeJNnR9kF7xMiXL6mSIWpr3Wg5MhxyfEXy/IlYthsqwBqHOr22boFbf/u6O88A==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.26.0.tgz", + "integrity": "sha512-GHUgahPcm9GfBuy3TzdsizCcPjKOAauG9xkz9TR8kOdssz2Iz9jRCSQm6+aVFa23d5NcSpo1GdHGSQKe0tlcbg==", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.26.0", + "@typescript-eslint/visitor-keys": "4.26.0", + "debug": "^4.3.1", + "globby": "^11.0.3", + "is-glob": "^4.0.1", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "dependencies": { + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, + "@typescript-eslint/visitor-keys": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.26.0.tgz", + "integrity": "sha512-cw4j8lH38V1ycGBbF+aFiLUls9Z0Bw8QschP3mkth50BbWzgFS33ISIgBzUMuQ2IdahoEv/rXstr8Zhlz4B1Zg==", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.26.0", + "eslint-visitor-keys": "^2.0.0" + } + }, + "@ungap/promise-all-settled": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", + "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", + "dev": true + }, + "@webassemblyjs/ast": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.0.tgz", + "integrity": "sha512-kX2W49LWsbthrmIRMbQZuQDhGtjyqXfEmmHyEi4XWnSZtPmxY0+3anPIzsnRb45VH/J55zlOfWvZuY47aJZTJg==", + "dev": true, + "requires": { + "@webassemblyjs/helper-numbers": "1.11.0", + "@webassemblyjs/helper-wasm-bytecode": "1.11.0" + } + }, + "@webassemblyjs/floating-point-hex-parser": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.0.tgz", + "integrity": "sha512-Q/aVYs/VnPDVYvsCBL/gSgwmfjeCb4LW8+TMrO3cSzJImgv8lxxEPM2JA5jMrivE7LSz3V+PFqtMbls3m1exDA==", + "dev": true + }, + "@webassemblyjs/helper-api-error": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.0.tgz", + "integrity": "sha512-baT/va95eXiXb2QflSx95QGT5ClzWpGaa8L7JnJbgzoYeaA27FCvuBXU758l+KXWRndEmUXjP0Q5fibhavIn8w==", + "dev": true + }, + "@webassemblyjs/helper-buffer": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.0.tgz", + "integrity": "sha512-u9HPBEl4DS+vA8qLQdEQ6N/eJQ7gT7aNvMIo8AAWvAl/xMrcOSiI2M0MAnMCy3jIFke7bEee/JwdX1nUpCtdyA==", + "dev": true + }, + "@webassemblyjs/helper-numbers": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.0.tgz", + "integrity": "sha512-DhRQKelIj01s5IgdsOJMKLppI+4zpmcMQ3XboFPLwCpSNH6Hqo1ritgHgD0nqHeSYqofA6aBN/NmXuGjM1jEfQ==", + "dev": true, + "requires": { + "@webassemblyjs/floating-point-hex-parser": "1.11.0", + "@webassemblyjs/helper-api-error": "1.11.0", + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/helper-wasm-bytecode": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.0.tgz", + "integrity": "sha512-MbmhvxXExm542tWREgSFnOVo07fDpsBJg3sIl6fSp9xuu75eGz5lz31q7wTLffwL3Za7XNRCMZy210+tnsUSEA==", + "dev": true + }, + "@webassemblyjs/helper-wasm-section": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.0.tgz", + "integrity": "sha512-3Eb88hcbfY/FCukrg6i3EH8H2UsD7x8Vy47iVJrP967A9JGqgBVL9aH71SETPx1JrGsOUVLo0c7vMCN22ytJew==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.11.0", + "@webassemblyjs/helper-buffer": "1.11.0", + "@webassemblyjs/helper-wasm-bytecode": "1.11.0", + "@webassemblyjs/wasm-gen": "1.11.0" + } + }, + "@webassemblyjs/ieee754": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.0.tgz", + "integrity": "sha512-KXzOqpcYQwAfeQ6WbF6HXo+0udBNmw0iXDmEK5sFlmQdmND+tr773Ti8/5T/M6Tl/413ArSJErATd8In3B+WBA==", + "dev": true, + "requires": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "@webassemblyjs/leb128": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.0.tgz", + "integrity": "sha512-aqbsHa1mSQAbeeNcl38un6qVY++hh8OpCOzxhixSYgbRfNWcxJNJQwe2rezK9XEcssJbbWIkblaJRwGMS9zp+g==", + "dev": true, + "requires": { + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/utf8": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.0.tgz", + "integrity": "sha512-A/lclGxH6SpSLSyFowMzO/+aDEPU4hvEiooCMXQPcQFPPJaYcPQNKGOCLUySJsYJ4trbpr+Fs08n4jelkVTGVw==", + "dev": true + }, + "@webassemblyjs/wasm-edit": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.0.tgz", + "integrity": "sha512-JHQ0damXy0G6J9ucyKVXO2j08JVJ2ntkdJlq1UTiUrIgfGMmA7Ik5VdC/L8hBK46kVJgujkBIoMtT8yVr+yVOQ==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.11.0", + "@webassemblyjs/helper-buffer": "1.11.0", + "@webassemblyjs/helper-wasm-bytecode": "1.11.0", + "@webassemblyjs/helper-wasm-section": "1.11.0", + "@webassemblyjs/wasm-gen": "1.11.0", + "@webassemblyjs/wasm-opt": "1.11.0", + "@webassemblyjs/wasm-parser": "1.11.0", + "@webassemblyjs/wast-printer": "1.11.0" + } + }, + "@webassemblyjs/wasm-gen": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.0.tgz", + "integrity": "sha512-BEUv1aj0WptCZ9kIS30th5ILASUnAPEvE3tVMTrItnZRT9tXCLW2LEXT8ezLw59rqPP9klh9LPmpU+WmRQmCPQ==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.11.0", + "@webassemblyjs/helper-wasm-bytecode": "1.11.0", + "@webassemblyjs/ieee754": "1.11.0", + "@webassemblyjs/leb128": "1.11.0", + "@webassemblyjs/utf8": "1.11.0" + } + }, + "@webassemblyjs/wasm-opt": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.0.tgz", + "integrity": "sha512-tHUSP5F4ywyh3hZ0+fDQuWxKx3mJiPeFufg+9gwTpYp324mPCQgnuVKwzLTZVqj0duRDovnPaZqDwoyhIO8kYg==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.11.0", + "@webassemblyjs/helper-buffer": "1.11.0", + "@webassemblyjs/wasm-gen": "1.11.0", + "@webassemblyjs/wasm-parser": "1.11.0" + } + }, + "@webassemblyjs/wasm-parser": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.0.tgz", + "integrity": "sha512-6L285Sgu9gphrcpDXINvm0M9BskznnzJTE7gYkjDbxET28shDqp27wpruyx3C2S/dvEwiigBwLA1cz7lNUi0kw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.11.0", + "@webassemblyjs/helper-api-error": "1.11.0", + "@webassemblyjs/helper-wasm-bytecode": "1.11.0", + "@webassemblyjs/ieee754": "1.11.0", + "@webassemblyjs/leb128": "1.11.0", + "@webassemblyjs/utf8": "1.11.0" + } + }, + "@webassemblyjs/wast-printer": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.0.tgz", + "integrity": "sha512-Fg5OX46pRdTgB7rKIUojkh9vXaVN6sGYCnEiJN1GYkb0RPwShZXp6KTDqmoMdQPKhcroOXh3fEzmkWmCYaKYhQ==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.11.0", + "@xtuc/long": "4.2.2" + } + }, + "@webpack-cli/configtest": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.0.3.tgz", + "integrity": "sha512-WQs0ep98FXX2XBAfQpRbY0Ma6ADw8JR6xoIkaIiJIzClGOMqVRvPCWqndTxf28DgFopWan0EKtHtg/5W1h0Zkw==", + "dev": true + }, + "@webpack-cli/info": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.2.4.tgz", + "integrity": "sha512-ogE2T4+pLhTTPS/8MM3IjHn0IYplKM4HbVNMCWA9N4NrdPzunwenpCsqKEXyejMfRu6K8mhauIPYf8ZxWG5O6g==", + "dev": true, + "requires": { + "envinfo": "^7.7.3" + } + }, + "@webpack-cli/serve": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.4.0.tgz", + "integrity": "sha512-xgT/HqJ+uLWGX+Mzufusl3cgjAcnqYYskaB7o0vRcwOEfuu6hMzSILQpnIzFMGsTaeaX4Nnekl+6fadLbl1/Vg==", + "dev": true + }, + "@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true + }, + "@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true + }, + "abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "requires": { + "event-target-shim": "^5.0.0" + } + }, + "acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true + }, + "acorn-jsx": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", + "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", + "dev": true + }, + "agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "requires": { + "debug": "4" + } + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true + }, + "ansi-align": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.0.tgz", + "integrity": "sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw==", + "dev": true, + "requires": { + "string-width": "^3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true + }, + "ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "requires": { + "type-fest": "^0.21.3" + }, + "dependencies": { + "type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true + } + } + }, + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, + "arrify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", + "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==" + }, + "astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" + }, + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "dev": true + }, + "bignumber.js": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz", + "integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA==" + }, + "binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true + }, + "bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true + }, + "boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", + "dev": true + }, + "boxen": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.0.1.tgz", + "integrity": "sha512-49VBlw+PrWEF51aCmy7QIteYPIFZxSpvqBdP/2itCPPlJ49kj9zg/XPRFrdkne2W+CfwXUls8exMvu1RysZpKA==", + "dev": true, + "requires": { + "ansi-align": "^3.0.0", + "camelcase": "^6.2.0", + "chalk": "^4.1.0", + "cli-boxes": "^2.2.1", + "string-width": "^4.2.0", + "type-fest": "^0.20.2", + "widest-line": "^3.1.0", + "wrap-ansi": "^7.0.0" + }, + "dependencies": { + "camelcase": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", + "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", + "dev": true + }, + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + } + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "browserslist": { + "version": "4.16.6", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.6.tgz", + "integrity": "sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001219", + "colorette": "^1.2.2", + "electron-to-chromium": "^1.3.723", + "escalade": "^3.1.1", + "node-releases": "^1.1.71" + } + }, + "buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "c8": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/c8/-/c8-7.7.2.tgz", + "integrity": "sha512-8AqNnUMxB3hsgYCYso2GJjlwnaNPlrEEbYbCQb7N76V1nrOgCKXiTcE3gXU18rIj0FeduPywROrIBMC7XAKApg==", + "dev": true, + "requires": { + "@bcoe/v8-coverage": "^0.2.3", + "@istanbuljs/schema": "^0.1.2", + "find-up": "^5.0.0", + "foreground-child": "^2.0.0", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-reports": "^3.0.2", + "rimraf": "^3.0.0", + "test-exclude": "^6.0.0", + "v8-to-istanbul": "^7.1.0", + "yargs": "^16.2.0", + "yargs-parser": "^20.2.7" + }, + "dependencies": { + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "requires": { + "p-locate": "^5.0.0" + } + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "requires": { + "p-limit": "^3.0.2" + } + } + } + }, + "cacheable-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", + "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", + "dev": true, + "requires": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^3.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^4.1.0", + "responselike": "^1.0.2" + }, + "dependencies": { + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "dev": true + } + } + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "camelcase-keys": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", + "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", + "dev": true, + "requires": { + "camelcase": "^5.3.1", + "map-obj": "^4.0.0", + "quick-lru": "^4.0.1" + } + }, + "caniuse-lite": { + "version": "1.0.30001232", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001232.tgz", + "integrity": "sha512-e4Gyp7P8vqC2qV2iHA+cJNf/yqUKOShXQOJHQt81OHxlIZl/j/j3soEA0adAQi8CPUQgvOdDENyQ5kd6a6mNSg==", + "dev": true + }, + "catharsis": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.9.0.tgz", + "integrity": "sha512-prMTQVpcns/tzFgFVkVp6ak6RykZyWb3gu8ckUpd6YkTlacOd3DXGJjIpD4Q6zJirizvaiAjSSHlOsA+6sNh2A==", + "dev": true, + "requires": { + "lodash": "^4.17.15" + } + }, + "chalk": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.0.0.tgz", + "integrity": "sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "cheerio": { + "version": "1.0.0-rc.9", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.9.tgz", + "integrity": "sha512-QF6XVdrLONO6DXRF5iaolY+odmhj2CLj+xzNod7INPWMi/x9X4SOylH0S/vaPpX+AUU6t04s34SQNh7DbkuCng==", + "dev": true, + "requires": { + "cheerio-select": "^1.4.0", + "dom-serializer": "^1.3.1", + "domhandler": "^4.2.0", + "htmlparser2": "^6.1.0", + "parse5": "^6.0.1", + "parse5-htmlparser2-tree-adapter": "^6.0.1", + "tslib": "^2.2.0" + }, + "dependencies": { + "tslib": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", + "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==", + "dev": true + } + } + }, + "cheerio-select": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-1.4.0.tgz", + "integrity": "sha512-sobR3Yqz27L553Qa7cK6rtJlMDbiKPdNywtR95Sj/YgfpLfy0u6CGJuaBKe5YE/vTc23SCRKxWSdlon/w6I/Ew==", + "dev": true, + "requires": { + "css-select": "^4.1.2", + "css-what": "^5.0.0", + "domelementtype": "^2.2.0", + "domhandler": "^4.2.0", + "domutils": "^2.6.0" + } + }, + "chokidar": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", + "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", + "dev": true, + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.3.1", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.5.0" + } + }, + "chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true + }, + "chrome-trace-event": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "dev": true + }, + "ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "dev": true + }, + "cli-boxes": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", + "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", + "dev": true + }, + "cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "requires": { + "restore-cursor": "^3.1.0" + } + }, + "cli-width": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", + "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", + "dev": true + }, + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + } + }, + "clone-response": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", + "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "dev": true, + "requires": { + "mimic-response": "^1.0.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "colorette": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz", + "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==", + "dev": true + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "configstore": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", + "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", + "dev": true, + "requires": { + "dot-prop": "^5.2.0", + "graceful-fs": "^4.1.2", + "make-dir": "^3.0.0", + "unique-string": "^2.0.0", + "write-file-atomic": "^3.0.0", + "xdg-basedir": "^4.0.0" + } + }, + "convert-source-map": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + } + } + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "crypto-random-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", + "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", + "dev": true + }, + "css-select": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.1.2.tgz", + "integrity": "sha512-nu5ye2Hg/4ISq4XqdLY2bEatAcLIdt3OYGFc9Tm9n7VSlFBcfRv0gBNksHRgSdUDQGtN3XrZ94ztW+NfzkFSUw==", + "dev": true, + "requires": { + "boolbase": "^1.0.0", + "css-what": "^5.0.0", + "domhandler": "^4.2.0", + "domutils": "^2.6.0", + "nth-check": "^2.0.0" + } + }, + "css-what": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.0.1.tgz", + "integrity": "sha512-FYDTSHb/7KXsWICVsxdmiExPjCfRC4qRFBdVwv7Ax9hMnvMmEjP9RfxTEZ3qPZGmADDn2vAKSo9UcN1jKVYscg==", + "dev": true + }, + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "requires": { + "ms": "2.1.2" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decamelize-keys": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz", + "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=", + "dev": true, + "requires": { + "decamelize": "^1.1.0", + "map-obj": "^1.0.0" + }, + "dependencies": { + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + } + } + }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "dev": true, + "requires": { + "mimic-response": "^1.0.0" + } + }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "defer-to-connect": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", + "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", + "dev": true + }, + "diff": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "dev": true + }, + "dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "requires": { + "path-type": "^4.0.0" + } + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "dom-serializer": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz", + "integrity": "sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==", + "dev": true, + "requires": { + "domelementtype": "^2.0.1", + "domhandler": "^4.2.0", + "entities": "^2.0.0" + } + }, + "domelementtype": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", + "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==", + "dev": true + }, + "domhandler": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.2.0.tgz", + "integrity": "sha512-zk7sgt970kzPks2Bf+dwT/PLzghLnsivb9CcxkvR8Mzr66Olr0Ofd8neSbglHJHaHa2MadfoSdNlKYAaafmWfA==", + "dev": true, + "requires": { + "domelementtype": "^2.2.0" + } + }, + "domutils": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.6.0.tgz", + "integrity": "sha512-y0BezHuy4MDYxh6OvolXYsH+1EMGmFbwv5FKW7ovwMG6zTPWqNPq3WF9ayZssFq+UlKdffGLbOEaghNdaOm1WA==", + "dev": true, + "requires": { + "dom-serializer": "^1.0.1", + "domelementtype": "^2.2.0", + "domhandler": "^4.2.0" + } + }, + "dot-prop": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", + "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", + "dev": true, + "requires": { + "is-obj": "^2.0.0" + } + }, + "duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "dev": true + }, + "duplexify": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.1.tgz", + "integrity": "sha512-DY3xVEmVHTv1wSzKNbwoU6nVjzI369Y6sPoqfYr0/xlx3IdX2n94xIszTcjPO8W8ZIv0Wb0PXNcjuZyT4wiICA==", + "requires": { + "end-of-stream": "^1.4.1", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1", + "stream-shift": "^1.0.0" + } + }, + "ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "electron-to-chromium": { + "version": "1.3.743", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.743.tgz", + "integrity": "sha512-K2wXfo9iZQzNJNx67+Pld0DRF+9bYinj62gXCdgPhcu1vidwVuLPHQPPFnCdO55njWigXXpfBiT90jGUPbw8Zg==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "emojis-list": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", + "dev": true + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "requires": { + "once": "^1.4.0" + } + }, + "enhanced-resolve": { + "version": "5.8.2", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.2.tgz", + "integrity": "sha512-F27oB3WuHDzvR2DOGNTaYy0D5o0cnrv8TeI482VM4kYgQd/FT9lUQwuNsJ0oOHtBUq7eiW5ytqzp7nBFknL+GA==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + } + }, + "enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "requires": { + "ansi-colors": "^4.1.1" + } + }, + "entities": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.3.tgz", + "integrity": "sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==", + "dev": true + }, + "envinfo": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", + "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==", + "dev": true + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es-module-lexer": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.4.1.tgz", + "integrity": "sha512-ooYciCUtfw6/d2w56UVeqHPcoCFAiJdz5XOkYpv/Txl1HMUozpXjz/2RIQgqwKdXNDPSF1W7mJCFse3G+HDyAA==", + "dev": true + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" + }, + "escape-goat": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", + "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", + "dev": true + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", + "dev": true + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, + "eslint": { + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.27.0.tgz", + "integrity": "sha512-JZuR6La2ZF0UD384lcbnd0Cgg6QJjiCwhMD6eU4h/VGPcVGwawNNzKU41tgokGXnfjOOyI6QIffthhJTPzzuRA==", + "dev": true, + "requires": { + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.4.1", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^13.6.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^6.0.9", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "dependencies": { + "eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } + } + }, + "espree": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "dev": true, + "requires": { + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } + } + }, + "optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "requires": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + } + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, + "eslint-config-prettier": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-7.2.0.tgz", + "integrity": "sha512-rV4Qu0C3nfJKPOAhFujFxB7RMP+URFyQqqOZW9DMRD7ZDTFyjaIlETU3xzHELt++4ugC0+Jm084HQYkkJe+Ivg==", + "dev": true + }, + "eslint-plugin-es": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz", + "integrity": "sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==", + "dev": true, + "requires": { + "eslint-utils": "^2.0.0", + "regexpp": "^3.0.0" + }, + "dependencies": { + "eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } + } + }, + "eslint-plugin-node": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz", + "integrity": "sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==", + "dev": true, + "requires": { + "eslint-plugin-es": "^3.0.0", + "eslint-utils": "^2.0.0", + "ignore": "^5.1.1", + "minimatch": "^3.0.4", + "resolve": "^1.10.1", + "semver": "^6.1.0" + }, + "dependencies": { + "eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + }, + "ignore": { + "version": "5.1.8", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", + "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", + "dev": true + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "eslint-plugin-prettier": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.0.tgz", + "integrity": "sha512-UDK6rJT6INSfcOo545jiaOwB701uAIt2/dR7WnFQoGCVl1/EMqdANBmwUaqqQ45aXprsTGzSa39LI1PyuRBxxw==", + "dev": true, + "requires": { + "prettier-linter-helpers": "^1.0.0" + } + }, + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "dependencies": { + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + } + } + }, + "eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^2.0.0" + } + }, + "eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "esquery": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + } + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "requires": { + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } + } + }, + "estraverse": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.1.0.tgz", + "integrity": "sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==" + }, + "events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true + }, + "execa": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.0.0.tgz", + "integrity": "sha512-ov6w/2LCiuyO4RLYGdpFGjkcs0wMTgGE8PrkTHikeUy5iJekXyPIKUjifk5CsE0pt7sMCrMZ3YNqoCj6idQOnQ==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "dependencies": { + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + } + } + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", + "dev": true + }, + "fast-glob": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.5.tgz", + "integrity": "sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.0", + "merge2": "^1.3.0", + "micromatch": "^4.0.2", + "picomatch": "^2.2.1" + } + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "fast-text-encoding": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/fast-text-encoding/-/fast-text-encoding-1.0.3.tgz", + "integrity": "sha512-dtm4QZH9nZtcDt8qJiOH9fcQd1NAgi+K1O2DbE6GG1PPCK/BWfOH3idCTRQ4ImXRUOyopDEgDEnVEE7Y/2Wrig==" + }, + "fastest-levenshtein": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz", + "integrity": "sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow==", + "dev": true + }, + "fastq": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.0.tgz", + "integrity": "sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g==", + "dev": true, + "requires": { + "reusify": "^1.0.4" + } + }, + "figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + }, + "dependencies": { + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + } + } + }, + "file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "requires": { + "flat-cache": "^3.0.4" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true + }, + "flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "requires": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + } + }, + "flatted": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", + "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", + "dev": true + }, + "foreground-child": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", + "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.0", + "signal-exit": "^3.0.2" + } + }, + "fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dev": true, + "requires": { + "minipass": "^3.0.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "gaxios": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-4.3.0.tgz", + "integrity": "sha512-pHplNbslpwCLMyII/lHPWFQbJWOX0B3R1hwBEOvzYi1GmdKZruuEHK4N9V6f7tf1EaPYyF80mui1+344p6SmLg==", + "requires": { + "abort-controller": "^3.0.0", + "extend": "^3.0.2", + "https-proxy-agent": "^5.0.0", + "is-stream": "^2.0.0", + "node-fetch": "^2.3.0" + } + }, + "gcp-metadata": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-4.2.1.tgz", + "integrity": "sha512-tSk+REe5iq/N+K+SK1XjZJUrFPuDqGZVzCy2vocIHIGmPlTGsa8owXMJwGkrXr73NO0AzhPW4MF2DEHz7P2AVw==", + "requires": { + "gaxios": "^4.0.0", + "json-bigint": "^1.0.0" + } + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" + }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true + }, + "global-dirs": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", + "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==", + "dev": true, + "requires": { + "ini": "2.0.0" + } + }, + "globals": { + "version": "13.9.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.9.0.tgz", + "integrity": "sha512-74/FduwI/JaIrr1H8e71UbDE+5x7pIPs1C2rrwC52SszOo043CsWOZEMW7o2Y58xwm9b+0RBKDxY5n2sUpEFxA==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + }, + "globby": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.3.tgz", + "integrity": "sha512-ffdmosjA807y7+lA1NM0jELARVmYul/715xiILEjo3hBLPTcirgQNnXECn5g3mtR8TOLCVbkfua1Hpen25/Xcg==", + "dev": true, + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.1.1", + "ignore": "^5.1.4", + "merge2": "^1.3.0", + "slash": "^3.0.0" + }, + "dependencies": { + "ignore": { + "version": "5.1.8", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", + "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", + "dev": true + } + } + }, + "google-auth-library": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-7.1.0.tgz", + "integrity": "sha512-X+gbkGjnLN3HUZP2W3KBREuA603BXd80ITvL0PeS0QpyDNYz/u0pIZ7aRuGnrSuUc0grk/qxEgtVTFt1ogbP+A==", + "requires": { + "arrify": "^2.0.0", + "base64-js": "^1.3.0", + "ecdsa-sig-formatter": "^1.0.11", + "fast-text-encoding": "^1.0.0", + "gaxios": "^4.0.0", + "gcp-metadata": "^4.2.0", + "gtoken": "^5.0.4", + "jws": "^4.0.0", + "lru-cache": "^6.0.0" + } + }, + "google-gax": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-2.12.0.tgz", + "integrity": "sha512-UDx4ZZx85vXBe6GZ0sdRSzuegLrRQdRjCxlauX+U7i5YwOoSgcSaIM71BhcdHwGPhEkvO/SSHrEfc1wpL/J6JA==", + "requires": { + "@grpc/grpc-js": "~1.3.0", + "@grpc/proto-loader": "^0.6.1", + "@types/long": "^4.0.0", + "abort-controller": "^3.0.0", + "duplexify": "^4.0.0", + "fast-text-encoding": "^1.0.3", + "google-auth-library": "^7.0.2", + "is-stream-ended": "^0.1.4", + "node-fetch": "^2.6.1", + "object-hash": "^2.1.1", + "protobufjs": "^6.10.2", + "retry-request": "^4.0.0" + } + }, + "google-p12-pem": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-3.0.3.tgz", + "integrity": "sha512-wS0ek4ZtFx/ACKYF3JhyGe5kzH7pgiQ7J5otlumqR9psmWMYc+U9cErKlCYVYHoUaidXHdZ2xbo34kB+S+24hA==", + "requires": { + "node-forge": "^0.10.0" + } + }, + "got": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", + "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", + "dev": true, + "requires": { + "@sindresorhus/is": "^0.14.0", + "@szmarczak/http-timer": "^1.1.2", + "cacheable-request": "^6.0.0", + "decompress-response": "^3.3.0", + "duplexer3": "^0.1.4", + "get-stream": "^4.1.0", + "lowercase-keys": "^1.0.1", + "mimic-response": "^1.0.1", + "p-cancelable": "^1.0.0", + "to-readable-stream": "^1.0.0", + "url-parse-lax": "^3.0.0" + }, + "dependencies": { + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + } + } + }, + "graceful-fs": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", + "dev": true + }, + "growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true + }, + "gtoken": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-5.2.1.tgz", + "integrity": "sha512-OY0BfPKe3QnMsY9MzTHTSKn+Vl2l1CcLe6BwDEQj00mbbkl5nyQ/7EUREstg4fQNZ8iYE7br4JJ7TdKeDOPWmw==", + "requires": { + "gaxios": "^4.0.0", + "google-p12-pem": "^3.0.3", + "jws": "^4.0.0" + } + }, + "gts": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/gts/-/gts-3.1.0.tgz", + "integrity": "sha512-Pbj3ob1VR1IRlEVEBNtKoQ1wHOa8cZz62KEojK8Fn/qeS2ClWI4gLNfhek3lD68aZSmUEg8TFb6AHXIwUMgyqQ==", + "dev": true, + "requires": { + "@typescript-eslint/eslint-plugin": "^4.2.0", + "@typescript-eslint/parser": "^4.2.0", + "chalk": "^4.1.0", + "eslint": "^7.10.0", + "eslint-config-prettier": "^7.0.0", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-prettier": "^3.1.4", + "execa": "^5.0.0", + "inquirer": "^7.3.3", + "json5": "^2.1.3", + "meow": "^9.0.0", + "ncp": "^2.0.0", + "prettier": "^2.1.2", + "rimraf": "^3.0.2", + "update-notifier": "^5.0.0", + "write-file-atomic": "^3.0.3" + }, + "dependencies": { + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + } + } + }, + "hard-rejection": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", + "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", + "dev": true + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "has-yarn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", + "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", + "dev": true + }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true + }, + "hosted-git-info": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.0.2.tgz", + "integrity": "sha512-c9OGXbZ3guC/xOlCg1Ci/VgWlwsqDv1yMQL1CWqXDL0hDjXuNcq0zuR4xqPSuasI3kqFDhqSyTjREz5gzq0fXg==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "htmlparser2": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz", + "integrity": "sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==", + "dev": true, + "requires": { + "domelementtype": "^2.0.1", + "domhandler": "^4.0.0", + "domutils": "^2.5.2", + "entities": "^2.0.0" + } + }, + "http-cache-semantics": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", + "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", + "dev": true + }, + "https-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", + "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", + "requires": { + "agent-base": "6", + "debug": "4" + } + }, + "human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "ignore-walk": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.4.tgz", + "integrity": "sha512-PY6Ii8o1jMRA1z4F2hRkH/xN59ox43DavKvD3oDpfurRlOJyAHpifIwpbdv1n4jt4ov0jSpw3kQ4GhJnpBL6WQ==", + "dev": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "import-lazy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", + "dev": true + }, + "import-local": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.2.tgz", + "integrity": "sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA==", + "dev": true, + "requires": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ini": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", + "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", + "dev": true + }, + "inquirer": { + "version": "7.3.3", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.3.tgz", + "integrity": "sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==", + "dev": true, + "requires": { + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.19", + "mute-stream": "0.0.8", + "run-async": "^2.4.0", + "rxjs": "^6.6.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6" + }, + "dependencies": { + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + } + } + }, + "interpret": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", + "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==", + "dev": true + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-ci": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", + "dev": true, + "requires": { + "ci-info": "^2.0.0" + } + }, + "is-core-module": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.4.0.tgz", + "integrity": "sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-installed-globally": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", + "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", + "dev": true, + "requires": { + "global-dirs": "^3.0.0", + "is-path-inside": "^3.0.2" + } + }, + "is-npm": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz", + "integrity": "sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA==", + "dev": true + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "is-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", + "dev": true + }, + "is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==" + }, + "is-stream-ended": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-stream-ended/-/is-stream-ended-0.1.4.tgz", + "integrity": "sha512-xj0XPvmr7bQFTvirqnFr50o0hQIh6ZItDqloxt5aJrR4NQsYeSsyFQERYGCAzfindAcnKjINnwEEgLx4IqVzQw==" + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "is-yarn-global": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", + "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==", + "dev": true + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "istanbul-lib-coverage": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", + "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", + "dev": true + }, + "istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "dev": true, + "requires": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" + } + }, + "istanbul-reports": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", + "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==", + "dev": true, + "requires": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + } + }, + "jest-worker": { + "version": "27.0.2", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.0.2.tgz", + "integrity": "sha512-EoBdilOTTyOgmHXtw/cPc+ZrCA0KJMrkXzkrPGNwLmnvvlN1nj7MPrxpT7m+otSv2e1TLaVffzDnE/LB14zJMg==", + "dev": true, + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "dependencies": { + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "js2xmlparser": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.1.tgz", + "integrity": "sha512-KrPTolcw6RocpYjdC7pL7v62e55q7qOMHvLX1UCLc5AAS8qeJ6nukarEJAF2KL2PZxlbGueEbINqZR2bDe/gUw==", + "dev": true, + "requires": { + "xmlcreate": "^2.0.3" + } + }, + "jsdoc": { + "version": "3.6.7", + "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.6.7.tgz", + "integrity": "sha512-sxKt7h0vzCd+3Y81Ey2qinupL6DpRSZJclS04ugHDNmRUXGzqicMJ6iwayhSA0S0DwwX30c5ozyUthr1QKF6uw==", + "dev": true, + "requires": { + "@babel/parser": "^7.9.4", + "bluebird": "^3.7.2", + "catharsis": "^0.9.0", + "escape-string-regexp": "^2.0.0", + "js2xmlparser": "^4.0.1", + "klaw": "^3.0.0", + "markdown-it": "^10.0.0", + "markdown-it-anchor": "^5.2.7", + "marked": "^2.0.3", + "mkdirp": "^1.0.4", + "requizzle": "^0.2.3", + "strip-json-comments": "^3.1.0", + "taffydb": "2.6.2", + "underscore": "~1.13.1" + }, + "dependencies": { + "escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true + } + } + }, + "jsdoc-fresh": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/jsdoc-fresh/-/jsdoc-fresh-1.0.5.tgz", + "integrity": "sha512-gikURZcof6vHeWJLDjula45EdulOsWYeysXcNlstxeromE/Qr/3YIErT7sluswNIrNzFQY+/czbBMAwQM9CyWQ==", + "dev": true, + "requires": { + "taffydb": "^2.7.3" + }, + "dependencies": { + "taffydb": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.7.3.tgz", + "integrity": "sha1-KtNxaWKUmPylvIQkMJbTzeDsOjQ=", + "dev": true + } + } + }, + "jsdoc-region-tag": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/jsdoc-region-tag/-/jsdoc-region-tag-1.0.6.tgz", + "integrity": "sha512-f6CjJfEsKPOWJuhi3kW7ZNVzOxelEGueoEKIGqxUGD67CSurjPRIKOoRW3et1YzHHQYuD2OQUrPgL/gtp72lIA==", + "dev": true, + "requires": { + "glob": "^7.1.6" + } + }, + "json-bigint": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", + "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", + "requires": { + "bignumber.js": "^9.0.0" + } + }, + "json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", + "dev": true + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "jsonexport": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jsonexport/-/jsonexport-3.2.0.tgz", + "integrity": "sha512-GbO9ugb0YTZatPd/hqCGR0FSwbr82H6OzG04yzdrG7XOe4QZ0jhQ+kOsB29zqkzoYJLmLxbbrFiuwbQu891XnQ==", + "dev": true + }, + "just-extend": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", + "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", + "dev": true + }, + "jwa": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.0.tgz", + "integrity": "sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==", + "requires": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "jws": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.0.tgz", + "integrity": "sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==", + "requires": { + "jwa": "^2.0.0", + "safe-buffer": "^5.0.1" + } + }, + "keyv": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", + "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", + "dev": true, + "requires": { + "json-buffer": "3.0.0" + } + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + }, + "klaw": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz", + "integrity": "sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.9" + } + }, + "latest-version": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", + "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", + "dev": true, + "requires": { + "package-json": "^6.3.0" + } + }, + "levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, + "lines-and-columns": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", + "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", + "dev": true + }, + "linkify-it": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz", + "integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==", + "dev": true, + "requires": { + "uc.micro": "^1.0.1" + } + }, + "linkinator": { + "version": "2.13.6", + "resolved": "https://registry.npmjs.org/linkinator/-/linkinator-2.13.6.tgz", + "integrity": "sha512-kE4hB0+d5ZDYI6NrC10TlXHTU2OXYVoigJRka58qZ9RwGaAVKpdhLWRLv9k94VTPo7rE6LDwWohqmp1IA7sLTg==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "cheerio": "^1.0.0-rc.5", + "escape-html": "^1.0.3", + "gaxios": "^4.0.0", + "glob": "^7.1.6", + "jsonexport": "^3.0.0", + "marked": "^2.0.0", + "meow": "^9.0.0", + "mime": "^2.5.0", + "server-destroy": "^1.0.1", + "update-notifier": "^5.0.0" + } + }, + "loader-runner": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.2.0.tgz", + "integrity": "sha512-92+huvxMvYlMzMt0iIOukcwYBFpkYJdpl2xsZ7LrlayO7E8SOv+JJUEK17B/dJIHAOLMfh2dZZ/Y18WgmGtYNw==", + "dev": true + }, + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=" + }, + "lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", + "dev": true + }, + "lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", + "dev": true + }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", + "dev": true + }, + "log-symbols": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", + "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", + "dev": true, + "requires": { + "chalk": "^4.0.0" + } + }, + "long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "requires": { + "yallist": "^4.0.0" + } + }, + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "requires": { + "semver": "^6.0.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "map-obj": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.2.1.tgz", + "integrity": "sha512-+WA2/1sPmDj1dlvvJmB5G6JKfY9dpn7EVBUL06+y6PoljPkh+6V1QihwxNkbcGxCRjt2b0F9K0taiCuo7MbdFQ==", + "dev": true + }, + "markdown-it": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-10.0.0.tgz", + "integrity": "sha512-YWOP1j7UbDNz+TumYP1kpwnP0aEa711cJjrAQrzd0UXlbJfc5aAq0F/PZHjiioqDC1NKgvIMX+o+9Bk7yuM2dg==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "entities": "~2.0.0", + "linkify-it": "^2.0.0", + "mdurl": "^1.0.1", + "uc.micro": "^1.0.5" + } + }, + "markdown-it-anchor": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-5.3.0.tgz", + "integrity": "sha512-/V1MnLL/rgJ3jkMWo84UR+K+jF1cxNG1a+KwqeXqTIJ+jtA8aWSHuigx8lTzauiIjBDbwF3NcWQMotd0Dm39jA==", + "dev": true + }, + "marked": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/marked/-/marked-2.0.7.tgz", + "integrity": "sha512-BJXxkuIfJchcXOJWTT2DOL+yFWifFv2yGYOUzvXg8Qz610QKw+sHCvTMYwA+qWGhlA2uivBezChZ/pBy1tWdkQ==", + "dev": true + }, + "mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=", + "dev": true + }, + "meow": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-9.0.0.tgz", + "integrity": "sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ==", + "dev": true, + "requires": { + "@types/minimist": "^1.2.0", + "camelcase-keys": "^6.2.2", + "decamelize": "^1.2.0", + "decamelize-keys": "^1.1.0", + "hard-rejection": "^2.1.0", + "minimist-options": "4.1.0", + "normalize-package-data": "^3.0.0", + "read-pkg-up": "^7.0.1", + "redent": "^3.0.0", + "trim-newlines": "^3.0.0", + "type-fest": "^0.18.0", + "yargs-parser": "^20.2.3" + }, + "dependencies": { + "type-fest": { + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", + "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", + "dev": true + } + } + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true + }, + "micromatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.2.3" + } + }, + "mime": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.5.2.tgz", + "integrity": "sha512-tqkh47FzKeCPD2PUiPB6pkbMzsCasjxAfC62/Wap5qrUWcb+sFasXUC5I3gYM5iBM8v/Qpn4UK0x+j0iHyFPDg==", + "dev": true + }, + "mime-db": { + "version": "1.48.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.48.0.tgz", + "integrity": "sha512-FM3QwxV+TnZYQ2aRqhlKBMHxk10lTbMt3bBkMAp54ddrNeVSfcQYOOKuGuy3Ddrm38I04If834fOUSq1yzslJQ==", + "dev": true + }, + "mime-types": { + "version": "2.1.31", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.31.tgz", + "integrity": "sha512-XGZnNzm3QvgKxa8dpzyhFTHmpP3l5YNusmne07VUOXxou9CqUqYa/HBy124RqtVh/O2pECas/MOcsDgpilPOPg==", + "dev": true, + "requires": { + "mime-db": "1.48.0" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "dev": true + }, + "min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "minimist-options": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", + "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", + "dev": true, + "requires": { + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0", + "kind-of": "^6.0.3" + }, + "dependencies": { + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + } + } + }, + "minipass": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.3.tgz", + "integrity": "sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "dev": true, + "requires": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + } + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true + }, + "mocha": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.4.0.tgz", + "integrity": "sha512-hJaO0mwDXmZS4ghXsvPVriOhsxQ7ofcpQdm8dE+jISUOKopitvnXFQmpRR7jd2K6VBG6E26gU3IAbXXGIbu4sQ==", + "dev": true, + "requires": { + "@ungap/promise-all-settled": "1.1.2", + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.1", + "debug": "4.3.1", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.1.6", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "4.0.0", + "log-symbols": "4.0.0", + "minimatch": "3.0.4", + "ms": "2.1.3", + "nanoid": "3.1.20", + "serialize-javascript": "5.0.1", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "which": "2.0.2", + "wide-align": "1.1.3", + "workerpool": "6.1.0", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "dependencies": { + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "js-yaml": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz", + "integrity": "sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } + }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "requires": { + "p-locate": "^5.0.0" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "requires": { + "p-limit": "^3.0.2" + } + }, + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "dev": true + } + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true + }, + "nanoid": { + "version": "3.1.20", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.20.tgz", + "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==", + "dev": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "ncp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", + "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=", + "dev": true + }, + "neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, + "nise": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/nise/-/nise-4.1.0.tgz", + "integrity": "sha512-eQMEmGN/8arp0xsvGoQ+B1qvSkR73B1nWSCh7nOt5neMCtwcQVYQGdzQMhcNscktTsWB54xnlSQFzOAPJD8nXA==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0", + "@sinonjs/fake-timers": "^6.0.0", + "@sinonjs/text-encoding": "^0.7.1", + "just-extend": "^4.0.2", + "path-to-regexp": "^1.7.0" + }, + "dependencies": { + "@sinonjs/fake-timers": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-6.0.1.tgz", + "integrity": "sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0" + } + } + } + }, + "node-fetch": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", + "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" + }, + "node-forge": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", + "integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==" + }, + "node-releases": { + "version": "1.1.72", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.72.tgz", + "integrity": "sha512-LLUo+PpH3dU6XizX3iVoubUNheF/owjXCZZ5yACDxNnPtgFuludV1ZL3ayK1kVep42Rmm0+R9/Y60NQbZ2bifw==", + "dev": true + }, + "normalize-package-data": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.2.tgz", + "integrity": "sha512-6CdZocmfGaKnIHPVFhJJZ3GuR8SsLKvDANFp47Jmy51aKIr8akjAWTSxtpI+MBgBFdSMRyo4hMpDlT6dTffgZg==", + "dev": true, + "requires": { + "hosted-git-info": "^4.0.1", + "resolve": "^1.20.0", + "semver": "^7.3.4", + "validate-npm-package-license": "^3.0.1" + }, + "dependencies": { + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "normalize-url": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", + "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==", + "dev": true + }, + "npm-bundled": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.2.tgz", + "integrity": "sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ==", + "dev": true, + "requires": { + "npm-normalize-package-bin": "^1.0.1" + } + }, + "npm-normalize-package-bin": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", + "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==", + "dev": true + }, + "npm-packlist": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-2.2.2.tgz", + "integrity": "sha512-Jt01acDvJRhJGthnUJVF/w6gumWOZxO7IkpY/lsX9//zqQgnF7OJaxgQXcerd4uQOLu7W5bkb4mChL9mdfm+Zg==", + "dev": true, + "requires": { + "glob": "^7.1.6", + "ignore-walk": "^3.0.3", + "npm-bundled": "^1.1.1", + "npm-normalize-package-bin": "^1.0.1" + } + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } + }, + "nth-check": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.0.tgz", + "integrity": "sha512-i4sc/Kj8htBrAiH1viZ0TgU8Y5XqCaV/FziYK6TBczxmeKm3AEFWqqF3195yKudrarqy7Zu80Ra5dobFjn9X/Q==", + "dev": true, + "requires": { + "boolbase": "^1.0.0" + } + }, + "null-loader": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/null-loader/-/null-loader-4.0.1.tgz", + "integrity": "sha512-pxqVbi4U6N26lq+LmgIbB5XATP0VdZKOG25DhHi8btMmJJefGArFyDg1yc4U3hWCJbMqSrw0qyrz1UQX+qYXqg==", + "dev": true, + "requires": { + "loader-utils": "^2.0.0", + "schema-utils": "^3.0.0" + } + }, + "object-hash": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-2.2.0.tgz", + "integrity": "sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw==" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "p-cancelable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", + "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", + "dev": true + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "pack-n-play": { + "version": "1.0.0-2", + "resolved": "https://registry.npmjs.org/pack-n-play/-/pack-n-play-1.0.0-2.tgz", + "integrity": "sha512-AUCSyqk/UAD79KPSK678HrVyRGqYZrSeqpjXCwLujR11cW0R3mlc3uHrYrrMniTbfGPzkDXbW8HZj6lZm0KD5w==", + "dev": true, + "requires": { + "glob": "^7.1.2", + "npm-packlist": "^2.0.0", + "once": "^1.4.0", + "rimraf": "^3.0.0", + "tar": "^5.0.0", + "tmp": "0.1.0" + }, + "dependencies": { + "tmp": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.1.0.tgz", + "integrity": "sha512-J7Z2K08jbGcdA1kkQpJSqLF6T0tdQqpR2pnSUXsIchbPdTI9v3e85cLW0d6WDhwuAleOV71j2xWs8qMPfK7nKw==", + "dev": true, + "requires": { + "rimraf": "^2.6.3" + }, + "dependencies": { + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } + } + } + } + }, + "package-json": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", + "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", + "dev": true, + "requires": { + "got": "^9.6.0", + "registry-auth-token": "^4.0.0", + "registry-url": "^5.0.0", + "semver": "^6.2.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + } + }, + "parse5": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", + "dev": true + }, + "parse5-htmlparser2-tree-adapter": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz", + "integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==", + "dev": true, + "requires": { + "parse5": "^6.0.1" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "path-to-regexp": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "dev": true, + "requires": { + "isarray": "0.0.1" + } + }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true + }, + "picomatch": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "dev": true + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + }, + "dependencies": { + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + } + } + }, + "prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true + }, + "prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "dev": true + }, + "prettier": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.3.0.tgz", + "integrity": "sha512-kXtO4s0Lz/DW/IJ9QdWhAf7/NmPWQXkFr/r/WkR3vyI+0v8amTDxiaQSLzs8NBlytfLWX/7uQUMIW677yLKl4w==", + "dev": true + }, + "prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "requires": { + "fast-diff": "^1.1.2" + } + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, + "protobufjs": { + "version": "6.11.2", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.2.tgz", + "integrity": "sha512-4BQJoPooKJl2G9j3XftkIXjoC9C0Av2NOrWmbLWT1vH32GcSUHjM0Arra6UfTsVyfMAuFzaLucXn1sadxJydAw==", + "requires": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^4.0.1", + "@types/node": ">=13.7.0", + "long": "^4.0.0" + }, + "dependencies": { + "@types/node": { + "version": "15.6.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-15.6.1.tgz", + "integrity": "sha512-7EIraBEyRHEe7CH+Fm1XvgqU6uwZN8Q7jppJGcqjROMT29qhAuuOxYB1uEY5UMYQKEmA5D+5tBnhdaPXSsLONA==" + } + } + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "pupa": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", + "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", + "dev": true, + "requires": { + "escape-goat": "^2.0.0" + } + }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true + }, + "quick-lru": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", + "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", + "dev": true + }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dev": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + } + } + }, + "read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "requires": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "dependencies": { + "hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true + } + } + }, + "read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "requires": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "dependencies": { + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + } + } + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "readdirp": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", + "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", + "dev": true, + "requires": { + "picomatch": "^2.2.1" + } + }, + "rechoir": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.0.tgz", + "integrity": "sha512-ADsDEH2bvbjltXEP+hTIAmeFekTFK0V2BTxMkok6qILyAJEXV0AFfoWcAq4yfll5VdIMd/RVXq0lR+wQi5ZU3Q==", + "dev": true, + "requires": { + "resolve": "^1.9.0" + } + }, + "redent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", + "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", + "dev": true, + "requires": { + "indent-string": "^4.0.0", + "strip-indent": "^3.0.0" + } + }, + "regexpp": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", + "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", + "dev": true + }, + "registry-auth-token": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz", + "integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==", + "dev": true, + "requires": { + "rc": "^1.2.8" + } + }, + "registry-url": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", + "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", + "dev": true, + "requires": { + "rc": "^1.2.8" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" + }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true + }, + "requizzle": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.3.tgz", + "integrity": "sha512-YanoyJjykPxGHii0fZP0uUPEXpvqfBDxWV7s6GKAiiOsiqhX6vHNyW3Qzdmqp/iq/ExbhaGbVrjB4ruEVSM4GQ==", + "dev": true, + "requires": { + "lodash": "^4.17.14" + } + }, + "resolve": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "dev": true, + "requires": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + } + }, + "resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "requires": { + "resolve-from": "^5.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + } + } + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "responselike": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "dev": true, + "requires": { + "lowercase-keys": "^1.0.0" + } + }, + "restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "requires": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, + "retry-request": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-4.1.3.tgz", + "integrity": "sha512-QnRZUpuPNgX0+D1xVxul6DbJ9slvo4Rm6iV/dn63e048MvGbUZiKySVt6Tenp04JqmchxjiLltGerOJys7kJYQ==", + "requires": { + "debug": "^4.1.1" + } + }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true + }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "requires": { + "queue-microtask": "^1.2.2" + } + }, + "rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "schema-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz", + "integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.6", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + } + }, + "semver-diff": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", + "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", + "dev": true, + "requires": { + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "serialize-javascript": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", + "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + }, + "server-destroy": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/server-destroy/-/server-destroy-1.0.1.tgz", + "integrity": "sha1-8Tv5KOQrnD55OD5hzDmYtdFObN0=", + "dev": true + }, + "shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dev": true, + "requires": { + "kind-of": "^6.0.2" + } + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", + "dev": true + }, + "sinon": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-10.0.0.tgz", + "integrity": "sha512-XAn5DxtGVJBlBWYrcYKEhWCz7FLwZGdyvANRyK06419hyEpdT0dMc5A8Vcxg5SCGHc40CsqoKsc1bt1CbJPfNw==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.8.1", + "@sinonjs/fake-timers": "^6.0.1", + "@sinonjs/samsam": "^5.3.1", + "diff": "^4.0.2", + "nise": "^4.1.0", + "supports-color": "^7.1.0" + }, + "dependencies": { + "@sinonjs/fake-timers": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-6.0.1.tgz", + "integrity": "sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0" + } + }, + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + } + } + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true + }, + "slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + } + }, + "source-list-map": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", + "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==", + "dev": true + }, + "source-map-support": { + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "spdx-correct": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.9.tgz", + "integrity": "sha512-Ki212dKK4ogX+xDo4CtOZBVIwhsKBEfsEEcwmJfLQzirgc2jIWdzg40Unxz/HzEUqM1WFzVlQSMF9kZZ2HboLQ==", + "dev": true + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "stream-shift": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", + "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==" + }, + "string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "requires": { + "safe-buffer": "~5.2.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true + }, + "strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "dev": true, + "requires": { + "min-indent": "^1.0.0" + } + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "table": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/table/-/table-6.7.1.tgz", + "integrity": "sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg==", + "dev": true, + "requires": { + "ajv": "^8.0.1", + "lodash.clonedeep": "^4.5.0", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ajv": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.5.0.tgz", + "integrity": "sha512-Y2l399Tt1AguU3BPRP9Fn4eN+Or+StUGWCUpbnFyXSo8NZ9S4uj+AG2pjs5apK+ZMOwYOz1+a+VKvKH7CudXgQ==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + } + } + }, + "taffydb": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.6.2.tgz", + "integrity": "sha1-fLy2S1oUG2ou/CxdLGe04VCyomg=", + "dev": true + }, + "tapable": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.0.tgz", + "integrity": "sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw==", + "dev": true + }, + "tar": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/tar/-/tar-5.0.5.tgz", + "integrity": "sha512-MNIgJddrV2TkuwChwcSNds/5E9VijOiw7kAc1y5hTNJoLDSuIyid2QtLYiCYNnICebpuvjhPQZsXwUL0O3l7OQ==", + "dev": true, + "requires": { + "chownr": "^1.1.3", + "fs-minipass": "^2.0.0", + "minipass": "^3.0.0", + "minizlib": "^2.1.0", + "mkdirp": "^0.5.0", + "yallist": "^4.0.0" + }, + "dependencies": { + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + } + } + }, + "terser": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.7.0.tgz", + "integrity": "sha512-HP5/9hp2UaZt5fYkuhNBR8YyRcT8juw8+uFbAme53iN9hblvKnLUTKkmwJG6ocWpIKf8UK4DoeWG4ty0J6S6/g==", + "dev": true, + "requires": { + "commander": "^2.20.0", + "source-map": "~0.7.2", + "source-map-support": "~0.5.19" + }, + "dependencies": { + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true + } + } + }, + "terser-webpack-plugin": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.1.3.tgz", + "integrity": "sha512-cxGbMqr6+A2hrIB5ehFIF+F/iST5ZOxvOmy9zih9ySbP1C2oEWQSOUS+2SNBTjzx5xLKO4xnod9eywdfq1Nb9A==", + "dev": true, + "requires": { + "jest-worker": "^27.0.2", + "p-limit": "^3.1.0", + "schema-utils": "^3.0.0", + "serialize-javascript": "^5.0.1", + "source-map": "^0.6.1", + "terser": "^5.7.0" + }, + "dependencies": { + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "requires": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "to-readable-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", + "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", + "dev": true + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "trim-newlines": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", + "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==", + "dev": true + }, + "ts-loader": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.2.2.tgz", + "integrity": "sha512-hNIhGTQHtNKjOzR2ZtQ2OSVbXPykOae+zostf1IlHCf61Mt41GMJurKNqrYUbzHgpmj6UWRu8eBfb7q0XliV0g==", + "dev": true, + "requires": { + "chalk": "^4.1.0", + "enhanced-resolve": "^5.0.0", + "micromatch": "^4.0.0", + "semver": "^7.3.4" + }, + "dependencies": { + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + }, + "type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1" + } + }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + }, + "typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dev": true, + "requires": { + "is-typedarray": "^1.0.0" + } + }, + "typescript": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.2.tgz", + "integrity": "sha512-zZ4hShnmnoVnAHpVHWpTcxdv7dWP60S2FsydQLV8V5PbS3FifjWFFRiHSWpDJahly88PRyV5teTSLoq4eG7mKw==", + "dev": true + }, + "uc.micro": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", + "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", + "dev": true + }, + "underscore": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.1.tgz", + "integrity": "sha512-hzSoAVtJF+3ZtiFX0VgfFPHEDRm7Y/QPjGyNo4TVdnDTdft3tr8hEkD25a1jC+TjTuE7tkHGKkhwCgs9dgBB2g==", + "dev": true + }, + "unique-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", + "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", + "dev": true, + "requires": { + "crypto-random-string": "^2.0.0" + } + }, + "update-notifier": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz", + "integrity": "sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==", + "dev": true, + "requires": { + "boxen": "^5.0.0", + "chalk": "^4.1.0", + "configstore": "^5.0.1", + "has-yarn": "^2.1.0", + "import-lazy": "^2.1.0", + "is-ci": "^2.0.0", + "is-installed-globally": "^0.4.0", + "is-npm": "^5.0.0", + "is-yarn-global": "^0.3.0", + "latest-version": "^5.1.0", + "pupa": "^2.1.1", + "semver": "^7.3.4", + "semver-diff": "^3.1.1", + "xdg-basedir": "^4.0.0" + }, + "dependencies": { + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "url-parse-lax": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "dev": true, + "requires": { + "prepend-http": "^2.0.0" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "dev": true + }, + "v8-to-istanbul": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-7.1.2.tgz", + "integrity": "sha512-TxNb7YEUwkLXCQYeudi6lgQ/SZrzNO4kMdlqVxaZPUIUjCv6iSSypUQX70kNBSERpQ8fk48+d61FXk+tgqcWow==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0", + "source-map": "^0.7.3" + }, + "dependencies": { + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true + } + } + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "watchpack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.2.0.tgz", + "integrity": "sha512-up4YAn/XHgZHIxFBVCdlMiWDj6WaLKpwVeGQk2I5thdYxF/KmF0aaz6TfJZ/hfl1h/XlcDr7k1KH7ThDagpFaA==", + "dev": true, + "requires": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + } + }, + "webpack": { + "version": "5.38.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.38.1.tgz", + "integrity": "sha512-OqRmYD1OJbHZph6RUMD93GcCZy4Z4wC0ele4FXyYF0J6AxO1vOSuIlU1hkS/lDlR9CDYBz64MZRmdbdnFFoT2g==", + "dev": true, + "requires": { + "@types/eslint-scope": "^3.7.0", + "@types/estree": "^0.0.47", + "@webassemblyjs/ast": "1.11.0", + "@webassemblyjs/wasm-edit": "1.11.0", + "@webassemblyjs/wasm-parser": "1.11.0", + "acorn": "^8.2.1", + "browserslist": "^4.14.5", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.8.0", + "es-module-lexer": "^0.4.0", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.4", + "json-parse-better-errors": "^1.0.2", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.0.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.1.1", + "watchpack": "^2.2.0", + "webpack-sources": "^2.3.0" + }, + "dependencies": { + "acorn": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.3.0.tgz", + "integrity": "sha512-tqPKHZ5CaBJw0Xmy0ZZvLs1qTV+BNFSyvn77ASXkpBNfIRk8ev26fKrD9iLGwGA9zedPao52GSHzq8lyZG0NUw==", + "dev": true + } + } + }, + "webpack-cli": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.7.0.tgz", + "integrity": "sha512-7bKr9182/sGfjFm+xdZSwgQuFjgEcy0iCTIBxRUeteJ2Kr8/Wz0qNJX+jw60LU36jApt4nmMkep6+W5AKhok6g==", + "dev": true, + "requires": { + "@discoveryjs/json-ext": "^0.5.0", + "@webpack-cli/configtest": "^1.0.3", + "@webpack-cli/info": "^1.2.4", + "@webpack-cli/serve": "^1.4.0", + "colorette": "^1.2.1", + "commander": "^7.0.0", + "execa": "^5.0.0", + "fastest-levenshtein": "^1.0.12", + "import-local": "^3.0.2", + "interpret": "^2.2.0", + "rechoir": "^0.7.0", + "v8-compile-cache": "^2.2.0", + "webpack-merge": "^5.7.3" + }, + "dependencies": { + "commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "dev": true + } + } + }, + "webpack-merge": { + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.7.3.tgz", + "integrity": "sha512-6/JUQv0ELQ1igjGDzHkXbVDRxkfA57Zw7PfiupdLFJYrgFqY5ZP8xxbpp2lU3EPwYx89ht5Z/aDkD40hFCm5AA==", + "dev": true, + "requires": { + "clone-deep": "^4.0.1", + "wildcard": "^2.0.0" + } + }, + "webpack-sources": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-2.3.0.tgz", + "integrity": "sha512-WyOdtwSvOML1kbgtXbTDnEW0jkJ7hZr/bDByIwszhWd/4XX1A3XMkrbFMsuH4+/MfLlZCUzlAdg4r7jaGKEIgQ==", + "dev": true, + "requires": { + "source-list-map": "^2.0.1", + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dev": true, + "requires": { + "string-width": "^1.0.2 || 2" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "widest-line": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", + "dev": true, + "requires": { + "string-width": "^4.0.0" + } + }, + "wildcard": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", + "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==", + "dev": true + }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true + }, + "workerpool": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.0.tgz", + "integrity": "sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg==", + "dev": true + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "write-file-atomic": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + }, + "xdg-basedir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", + "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", + "dev": true + }, + "xmlcreate": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.3.tgz", + "integrity": "sha512-HgS+X6zAztGa9zIK3Y3LXuJes33Lz9x+YyTxgrkIdabu2vqcGOWwdfCpf1hWLRrd553wd4QCDf6BBO6FfdsRiQ==", + "dev": true + }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==" + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + } + }, + "yargs-parser": { + "version": "20.2.7", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.7.tgz", + "integrity": "sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw==" + }, + "yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "dev": true, + "requires": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "dependencies": { + "camelcase": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", + "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", + "dev": true + }, + "decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true + }, + "is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true + } + } + }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true + } + } +} diff --git a/packages/google-cloud-shell/package.json b/packages/google-cloud-shell/package.json index 5d2c0344409..52131094fa0 100644 --- a/packages/google-cloud-shell/package.json +++ b/packages/google-cloud-shell/package.json @@ -1 +1,66 @@ -{"name":"@google-cloud/cloud-shell","version":"0.1.0","description":"cloudshell client for Node.js","repository":"googleapis/googleapis/nodejs-cloud-shell","license":"Apache-2.0","author":"Google LLC","main":"build/src/index.js","files":["build/src","build/protos"],"keywords":["google apis client","google api client","google apis","google api","google","google cloud platform","google cloud","cloud","google cloudshell","cloudshell","cloudshell service"],"scripts":{"clean":"gts clean","compile":"tsc -p . && cp -r protos build/","compile-protos":"compileProtos src","docs":"jsdoc -c .jsdoc.js","predocs-test":"npm run docs","docs-test":"linkinator docs","fix":"gts fix","lint":"gts check","prepare":"npm run compile-protos && npm run compile","system-test":"c8 mocha build/system-test","test":"c8 mocha build/test","samples-test":"cd samples/ && npm link ../ && npm test","prelint":"cd samples; npm link ../; npm i"},"dependencies":{"google-gax":"^2.12.0"},"devDependencies":{"@types/mocha":"^8.2.2","@types/node":"^14.14.44","@types/sinon":"^10.0.0","c8":"^7.7.2","gts":"^3.1.0","jsdoc":"^3.6.6","jsdoc-fresh":"^1.0.2","jsdoc-region-tag":"^1.0.6","linkinator":"^2.13.6","mocha":"^8.4.0","null-loader":"^4.0.1","pack-n-play":"^1.0.0-2","sinon":"^10.0.0","ts-loader":"^9.1.2","typescript":"^4.2.4","webpack":"^5.36.2","webpack-cli":"^4.7.0"},"engines":{"node":">=v12.0.0"}} \ No newline at end of file +{ + "name": "@google-cloud/cloud-shell", + "version": "0.1.0", + "description": "cloudshell client for Node.js", + "repository": "googleapis/googleapis/nodejs-cloud-shell", + "license": "Apache-2.0", + "author": "Google LLC", + "main": "build/src/index.js", + "files": [ + "build/src", + "build/protos" + ], + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google cloudshell", + "cloudshell", + "cloudshell service" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test", + "samples-test": "cd samples/ && npm link ../ && npm test", + "prelint": "cd samples; npm link ../; npm i" + }, + "dependencies": { + "google-gax": "^2.12.0" + }, + "devDependencies": { + "@types/mocha": "^8.2.2", + "@types/node": "^14.14.44", + "@types/sinon": "^10.0.0", + "c8": "^7.7.2", + "gts": "^3.1.0", + "jsdoc": "^3.6.6", + "jsdoc-fresh": "^1.0.2", + "jsdoc-region-tag": "^1.0.6", + "linkinator": "^2.13.6", + "mocha": "^8.4.0", + "null-loader": "^4.0.1", + "pack-n-play": "^1.0.0-2", + "sinon": "^10.0.0", + "ts-loader": "^9.1.2", + "typescript": "^4.2.4", + "webpack": "^5.36.2", + "webpack-cli": "^4.7.0" + }, + "engines": { + "node": ">=v12.0.0" + } +} diff --git a/packages/google-cloud-shell/samples/package.json b/packages/google-cloud-shell/samples/package.json new file mode 100644 index 00000000000..426caae7b96 --- /dev/null +++ b/packages/google-cloud-shell/samples/package.json @@ -0,0 +1,23 @@ +{ + "name": "nodejs-cloud-shell", + "private": true, + "license": "Apache-2.0", + "author": "Google LLC", + "engines": { + "node": ">=10" + }, + "files": [ + "*.js" + ], + "scripts": { + "test": "c8 mocha --timeout 600000 test/*.js" + }, + "dependencies": { + "@google-cloud/cloud-shell": "^0.1.0" + }, + "devDependencies": { + "c8": "^7.1.0", + "chai": "^4.2.0", + "mocha": "^8.0.0" + } +} diff --git a/packages/google-cloud-shell/samples/quickstart.js b/packages/google-cloud-shell/samples/quickstart.js new file mode 100644 index 00000000000..67378b9bdbc --- /dev/null +++ b/packages/google-cloud-shell/samples/quickstart.js @@ -0,0 +1,50 @@ +// 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 +// +// https://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. +// + +'use strict'; + +async function main() { + + // [START nodejs_cloud_shell_quickstart] + // Imports the Google Cloud client library + + // remove this line after package is released + // eslint-disable-next-line node/no-missing-require + const {CloudShellServiceClient} = require('@google-cloud/cloud-shell'); + + // TODO(developer): replace with your prefered project ID. + // const projectId = 'my-project' + + // Creates a client + // eslint-disable-next-line no-unused-vars + const client = new {CloudShellServiceClient}(); + + //TODO(library generator): write the actual function you will be testing + async function doSomething() { + console.log('DPE! Change this code so that it shows how to use the library! See comments below on structure.') + // const [thing] = await client.methodName({ + // }); + // console.info(thing); + } + doSomething(); + // [END nodejs_cloud_shell_quickstart] +} + +main(...process.argv.slice(2)).catch(err => { + console.error(err.message); + process.exitCode = 1; +}); +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); diff --git a/packages/google-cloud-shell/samples/test/quickstart.js b/packages/google-cloud-shell/samples/test/quickstart.js new file mode 100644 index 00000000000..6c2d1209adb --- /dev/null +++ b/packages/google-cloud-shell/samples/test/quickstart.js @@ -0,0 +1,53 @@ +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +const path = require('path'); +const cp = require('child_process'); +const {before, describe, it} = require('mocha'); +// eslint-disable-next-line node/no-missing-require +const {CloudShellServiceClient} = require('@google-cloud/cloud-shell'); +// eslint-disable-next-line no-unused-vars, node/no-missing-require +const {assert} = require('chai'); + +const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); + +const cwd = path.join(__dirname, '..'); + +const client = new {CloudShellServiceClient}(); + +describe('Quickstart', () => { + //TODO: remove this if not using the projectId + // eslint-disable-next-line no-unused-vars + let projectId; + + before(async () => { + // eslint-disable-next-line no-unused-vars + projectId = await client.getProjectId(); + }); + + it('should run quickstart', async () => { + //TODO: remove this line + // eslint-disable-next-line no-unused-vars + const stdout = execSync( + `node ./quickstart.js`, + {cwd} + ); + //assert(stdout, stdout !== null); + }); +}); diff --git a/packages/google-cloud-shell/src/index.ts b/packages/google-cloud-shell/src/index.ts new file mode 100644 index 00000000000..505ffea9d7a --- /dev/null +++ b/packages/google-cloud-shell/src/index.ts @@ -0,0 +1,27 @@ +// Copyright 2020 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by synthtool. ** +// ** https://github.com/googleapis/synthtool ** +// ** All changes to this file may be overwritten. ** + +import * as v1 from './v1'; + +const CloudShellServiceClient = v1.CloudShellServiceClient; +type CloudShellServiceClient = v1.CloudShellServiceClient; + +export {v1, CloudShellServiceClient}; +export default {v1, CloudShellServiceClient}; +import * as protos from '../protos/protos'; +export {protos}; diff --git a/packages/google-cloud-shell/src/v1/cloud_shell_service_client.ts b/packages/google-cloud-shell/src/v1/cloud_shell_service_client.ts index c787539084e..74d4a4b80ab 100644 --- a/packages/google-cloud-shell/src/v1/cloud_shell_service_client.ts +++ b/packages/google-cloud-shell/src/v1/cloud_shell_service_client.ts @@ -18,7 +18,13 @@ /* global window */ import * as gax from 'google-gax'; -import {Callback, CallOptions, Descriptors, ClientOptions, LROperation} from 'google-gax'; +import { + Callback, + CallOptions, + Descriptors, + ClientOptions, + LROperation, +} from 'google-gax'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); @@ -28,7 +34,7 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './cloud_shell_service_client_config.json'; -import { operationsProtos } from 'google-gax'; +import {operationsProtos} from 'google-gax'; const version = require('../../../package.json').version; /** @@ -98,10 +104,13 @@ export class CloudShellServiceClient { constructor(opts?: ClientOptions) { // Ensure that options include all the required fields. const staticMembers = this.constructor as typeof CloudShellServiceClient; - const servicePath = opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. @@ -119,7 +128,7 @@ export class CloudShellServiceClient { this._opts = opts; // Save the auth object to the client, for use by other methods. - this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; // Set the default scopes in auth client if needed. if (servicePath === staticMembers.servicePath) { @@ -127,10 +136,7 @@ export class CloudShellServiceClient { } // Determine the client header string. - const clientHeader = [ - `gax/${this._gaxModule.version}`, - `gapic/${version}`, - ]; + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; if (typeof process !== 'undefined' && 'versions' in process) { clientHeader.push(`gl-node/${process.versions.node}`); } else { @@ -138,7 +144,7 @@ export class CloudShellServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest' ) { + } else if (opts.fallback === 'rest') { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -162,50 +168,67 @@ export class CloudShellServiceClient { // an Operation object that allows for tracking of the operation, // rather than holding a request open. - this.operationsClient = this._gaxModule.lro({ - auth: this.auth, - grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined - }).operationsClient(opts); + this.operationsClient = this._gaxModule + .lro({ + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }) + .operationsClient(opts); const startEnvironmentResponse = protoFilesRoot.lookup( - '.google.cloud.shell.v1.StartEnvironmentResponse') as gax.protobuf.Type; + '.google.cloud.shell.v1.StartEnvironmentResponse' + ) as gax.protobuf.Type; const startEnvironmentMetadata = protoFilesRoot.lookup( - '.google.cloud.shell.v1.StartEnvironmentMetadata') as gax.protobuf.Type; + '.google.cloud.shell.v1.StartEnvironmentMetadata' + ) as gax.protobuf.Type; const authorizeEnvironmentResponse = protoFilesRoot.lookup( - '.google.cloud.shell.v1.AuthorizeEnvironmentResponse') as gax.protobuf.Type; + '.google.cloud.shell.v1.AuthorizeEnvironmentResponse' + ) as gax.protobuf.Type; const authorizeEnvironmentMetadata = protoFilesRoot.lookup( - '.google.cloud.shell.v1.AuthorizeEnvironmentMetadata') as gax.protobuf.Type; + '.google.cloud.shell.v1.AuthorizeEnvironmentMetadata' + ) as gax.protobuf.Type; const addPublicKeyResponse = protoFilesRoot.lookup( - '.google.cloud.shell.v1.AddPublicKeyResponse') as gax.protobuf.Type; + '.google.cloud.shell.v1.AddPublicKeyResponse' + ) as gax.protobuf.Type; const addPublicKeyMetadata = protoFilesRoot.lookup( - '.google.cloud.shell.v1.AddPublicKeyMetadata') as gax.protobuf.Type; + '.google.cloud.shell.v1.AddPublicKeyMetadata' + ) as gax.protobuf.Type; const removePublicKeyResponse = protoFilesRoot.lookup( - '.google.cloud.shell.v1.RemovePublicKeyResponse') as gax.protobuf.Type; + '.google.cloud.shell.v1.RemovePublicKeyResponse' + ) as gax.protobuf.Type; const removePublicKeyMetadata = protoFilesRoot.lookup( - '.google.cloud.shell.v1.RemovePublicKeyMetadata') as gax.protobuf.Type; + '.google.cloud.shell.v1.RemovePublicKeyMetadata' + ) as gax.protobuf.Type; this.descriptors.longrunning = { startEnvironment: new this._gaxModule.LongrunningDescriptor( this.operationsClient, startEnvironmentResponse.decode.bind(startEnvironmentResponse), - startEnvironmentMetadata.decode.bind(startEnvironmentMetadata)), + startEnvironmentMetadata.decode.bind(startEnvironmentMetadata) + ), authorizeEnvironment: new this._gaxModule.LongrunningDescriptor( this.operationsClient, authorizeEnvironmentResponse.decode.bind(authorizeEnvironmentResponse), - authorizeEnvironmentMetadata.decode.bind(authorizeEnvironmentMetadata)), + authorizeEnvironmentMetadata.decode.bind(authorizeEnvironmentMetadata) + ), addPublicKey: new this._gaxModule.LongrunningDescriptor( this.operationsClient, addPublicKeyResponse.decode.bind(addPublicKeyResponse), - addPublicKeyMetadata.decode.bind(addPublicKeyMetadata)), + addPublicKeyMetadata.decode.bind(addPublicKeyMetadata) + ), removePublicKey: new this._gaxModule.LongrunningDescriptor( this.operationsClient, removePublicKeyResponse.decode.bind(removePublicKeyResponse), - removePublicKeyMetadata.decode.bind(removePublicKeyMetadata)) + removePublicKeyMetadata.decode.bind(removePublicKeyMetadata) + ), }; // Put together the default options sent with requests. this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.shell.v1.CloudShellService', gapicConfig as gax.ClientConfig, - opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + 'google.cloud.shell.v1.CloudShellService', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); // Set up a dictionary of "inner API calls"; the core implementation // of calling the API is handled in `google-gax`, with this code @@ -233,32 +256,40 @@ export class CloudShellServiceClient { // Put together the "service stub" for // google.cloud.shell.v1.CloudShellService. this.cloudShellServiceStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.cloud.shell.v1.CloudShellService') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.shell.v1.CloudShellService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.cloud.shell.v1.CloudShellService, - this._opts) as Promise<{[method: string]: Function}>; + this._opts + ) as Promise<{[method: string]: Function}>; // Iterate over each of the methods that the service provides // and create an API call method for each. - const cloudShellServiceStubMethods = - ['getEnvironment', 'startEnvironment', 'authorizeEnvironment', 'addPublicKey', 'removePublicKey']; + const cloudShellServiceStubMethods = [ + 'getEnvironment', + 'startEnvironment', + 'authorizeEnvironment', + 'addPublicKey', + 'removePublicKey', + ]; for (const methodName of cloudShellServiceStubMethods) { const callPromise = this.cloudShellServiceStub.then( - stub => (...args: Array<{}>) => { - if (this._terminated) { - return Promise.reject('The client has already been closed.'); - } - const func = stub[methodName]; - return func.apply(stub, args); - }, - (err: Error|null|undefined) => () => { + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { throw err; - }); + } + ); - const descriptor = - this.descriptors.longrunning[methodName] || - undefined; + const descriptor = this.descriptors.longrunning[methodName] || undefined; const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], @@ -302,9 +333,7 @@ export class CloudShellServiceClient { * @returns {string[]} List of default scopes. */ static get scopes() { - return [ - 'https://www.googleapis.com/auth/cloud-platform' - ]; + return ['https://www.googleapis.com/auth/cloud-platform']; } getProjectId(): Promise; @@ -313,8 +342,9 @@ export class CloudShellServiceClient { * Return the project ID used by this class. * @returns {Promise} A promise that resolves to string containing the project ID. */ - getProjectId(callback?: Callback): - Promise|void { + getProjectId( + callback?: Callback + ): Promise | void { if (callback) { this.auth.getProjectId(callback); return; @@ -326,499 +356,697 @@ export class CloudShellServiceClient { // -- Service calls -- // ------------------- getEnvironment( - request: protos.google.cloud.shell.v1.IGetEnvironmentRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.shell.v1.IEnvironment, - protos.google.cloud.shell.v1.IGetEnvironmentRequest|undefined, {}|undefined - ]>; + request: protos.google.cloud.shell.v1.IGetEnvironmentRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.shell.v1.IEnvironment, + protos.google.cloud.shell.v1.IGetEnvironmentRequest | undefined, + {} | undefined + ] + >; getEnvironment( - request: protos.google.cloud.shell.v1.IGetEnvironmentRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.shell.v1.IEnvironment, - protos.google.cloud.shell.v1.IGetEnvironmentRequest|null|undefined, - {}|null|undefined>): void; + request: protos.google.cloud.shell.v1.IGetEnvironmentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.shell.v1.IEnvironment, + protos.google.cloud.shell.v1.IGetEnvironmentRequest | null | undefined, + {} | null | undefined + > + ): void; getEnvironment( - request: protos.google.cloud.shell.v1.IGetEnvironmentRequest, - callback: Callback< - protos.google.cloud.shell.v1.IEnvironment, - protos.google.cloud.shell.v1.IGetEnvironmentRequest|null|undefined, - {}|null|undefined>): void; -/** - * Gets an environment. Returns NOT_FOUND if the environment does not exist. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the requested resource, for example `users/me/environments/default` - * or `users/someone@example.com/environments/default`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Environment]{@link google.cloud.shell.v1.Environment}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getEnvironment(request); - */ + request: protos.google.cloud.shell.v1.IGetEnvironmentRequest, + callback: Callback< + protos.google.cloud.shell.v1.IEnvironment, + protos.google.cloud.shell.v1.IGetEnvironmentRequest | null | undefined, + {} | null | undefined + > + ): void; + /** + * Gets an environment. Returns NOT_FOUND if the environment does not exist. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the requested resource, for example `users/me/environments/default` + * or `users/someone@example.com/environments/default`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Environment]{@link google.cloud.shell.v1.Environment}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.getEnvironment(request); + */ getEnvironment( - request: protos.google.cloud.shell.v1.IGetEnvironmentRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.shell.v1.IEnvironment, - protos.google.cloud.shell.v1.IGetEnvironmentRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< + request: protos.google.cloud.shell.v1.IGetEnvironmentRequest, + optionsOrCallback?: + | CallOptions + | Callback< protos.google.cloud.shell.v1.IEnvironment, - protos.google.cloud.shell.v1.IGetEnvironmentRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.shell.v1.IEnvironment, - protos.google.cloud.shell.v1.IGetEnvironmentRequest|undefined, {}|undefined - ]>|void { + | protos.google.cloud.shell.v1.IGetEnvironmentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.shell.v1.IEnvironment, + protos.google.cloud.shell.v1.IGetEnvironmentRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.shell.v1.IEnvironment, + protos.google.cloud.shell.v1.IGetEnvironmentRequest | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - 'name': request.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); this.initialize(); return this.innerApiCalls.getEnvironment(request, options, callback); } startEnvironment( - request: protos.google.cloud.shell.v1.IStartEnvironmentRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; + request: protos.google.cloud.shell.v1.IStartEnvironmentRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.shell.v1.IStartEnvironmentResponse, + protos.google.cloud.shell.v1.IStartEnvironmentMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; startEnvironment( - request: protos.google.cloud.shell.v1.IStartEnvironmentRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; + request: protos.google.cloud.shell.v1.IStartEnvironmentRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.shell.v1.IStartEnvironmentResponse, + protos.google.cloud.shell.v1.IStartEnvironmentMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; startEnvironment( - request: protos.google.cloud.shell.v1.IStartEnvironmentRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; -/** - * Starts an existing environment, allowing clients to connect to it. The - * returned operation will contain an instance of StartEnvironmentMetadata in - * its metadata field. Users can wait for the environment to start by polling - * this operation via GetOperation. Once the environment has finished starting - * and is ready to accept connections, the operation will contain a - * StartEnvironmentResponse in its response field. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Name of the resource that should be started, for example - * `users/me/environments/default` or - * `users/someone@example.com/environments/default`. - * @param {string} request.accessToken - * The initial access token passed to the environment. If this is present and - * valid, the environment will be pre-authenticated with gcloud so that the - * user can run gcloud commands in Cloud Shell without having to log in. This - * code can be updated later by calling AuthorizeEnvironment. - * @param {string[]} request.publicKeys - * Public keys that should be added to the environment before it is started. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.startEnvironment(request); - * const [response] = await operation.promise(); - */ + request: protos.google.cloud.shell.v1.IStartEnvironmentRequest, + callback: Callback< + LROperation< + protos.google.cloud.shell.v1.IStartEnvironmentResponse, + protos.google.cloud.shell.v1.IStartEnvironmentMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Starts an existing environment, allowing clients to connect to it. The + * returned operation will contain an instance of StartEnvironmentMetadata in + * its metadata field. Users can wait for the environment to start by polling + * this operation via GetOperation. Once the environment has finished starting + * and is ready to accept connections, the operation will contain a + * StartEnvironmentResponse in its response field. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Name of the resource that should be started, for example + * `users/me/environments/default` or + * `users/someone@example.com/environments/default`. + * @param {string} request.accessToken + * The initial access token passed to the environment. If this is present and + * valid, the environment will be pre-authenticated with gcloud so that the + * user can run gcloud commands in Cloud Shell without having to log in. This + * code can be updated later by calling AuthorizeEnvironment. + * @param {string[]} request.publicKeys + * Public keys that should be added to the environment before it is started. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.startEnvironment(request); + * const [response] = await operation.promise(); + */ startEnvironment( - request: protos.google.cloud.shell.v1.IStartEnvironmentRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { + request: protos.google.cloud.shell.v1.IStartEnvironmentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.shell.v1.IStartEnvironmentResponse, + protos.google.cloud.shell.v1.IStartEnvironmentMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.shell.v1.IStartEnvironmentResponse, + protos.google.cloud.shell.v1.IStartEnvironmentMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.shell.v1.IStartEnvironmentResponse, + protos.google.cloud.shell.v1.IStartEnvironmentMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - 'name': request.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); this.initialize(); return this.innerApiCalls.startEnvironment(request, options, callback); } -/** - * Check the status of the long running operation returned by `startEnvironment()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const decodedOperation = await checkStartEnvironmentProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); - */ - async checkStartEnvironmentProgress(name: string): Promise>{ - const request = new operationsProtos.google.longrunning.GetOperationRequest({name}); + /** + * Check the status of the long running operation returned by `startEnvironment()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkStartEnvironmentProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkStartEnvironmentProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.shell.v1.StartEnvironmentResponse, + protos.google.cloud.shell.v1.StartEnvironmentMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.startEnvironment, gax.createDefaultBackoffSettings()); - return decodeOperation as LROperation; + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.startEnvironment, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.shell.v1.StartEnvironmentResponse, + protos.google.cloud.shell.v1.StartEnvironmentMetadata + >; } authorizeEnvironment( - request: protos.google.cloud.shell.v1.IAuthorizeEnvironmentRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; + request: protos.google.cloud.shell.v1.IAuthorizeEnvironmentRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.shell.v1.IAuthorizeEnvironmentResponse, + protos.google.cloud.shell.v1.IAuthorizeEnvironmentMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; authorizeEnvironment( - request: protos.google.cloud.shell.v1.IAuthorizeEnvironmentRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; + request: protos.google.cloud.shell.v1.IAuthorizeEnvironmentRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.shell.v1.IAuthorizeEnvironmentResponse, + protos.google.cloud.shell.v1.IAuthorizeEnvironmentMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; authorizeEnvironment( - request: protos.google.cloud.shell.v1.IAuthorizeEnvironmentRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; -/** - * Sends OAuth credentials to a running environment on behalf of a user. When - * this completes, the environment will be authorized to run various Google - * Cloud command line tools without requiring the user to manually - * authenticate. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Name of the resource that should receive the credentials, for example - * `users/me/environments/default` or - * `users/someone@example.com/environments/default`. - * @param {string} request.accessToken - * The OAuth access token that should be sent to the environment. - * @param {string} request.idToken - * The OAuth ID token that should be sent to the environment. - * @param {google.protobuf.Timestamp} request.expireTime - * The time when the credentials expire. If not set, defaults to one hour from - * when the server received the request. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.authorizeEnvironment(request); - * const [response] = await operation.promise(); - */ + request: protos.google.cloud.shell.v1.IAuthorizeEnvironmentRequest, + callback: Callback< + LROperation< + protos.google.cloud.shell.v1.IAuthorizeEnvironmentResponse, + protos.google.cloud.shell.v1.IAuthorizeEnvironmentMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Sends OAuth credentials to a running environment on behalf of a user. When + * this completes, the environment will be authorized to run various Google + * Cloud command line tools without requiring the user to manually + * authenticate. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Name of the resource that should receive the credentials, for example + * `users/me/environments/default` or + * `users/someone@example.com/environments/default`. + * @param {string} request.accessToken + * The OAuth access token that should be sent to the environment. + * @param {string} request.idToken + * The OAuth ID token that should be sent to the environment. + * @param {google.protobuf.Timestamp} request.expireTime + * The time when the credentials expire. If not set, defaults to one hour from + * when the server received the request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.authorizeEnvironment(request); + * const [response] = await operation.promise(); + */ authorizeEnvironment( - request: protos.google.cloud.shell.v1.IAuthorizeEnvironmentRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { + request: protos.google.cloud.shell.v1.IAuthorizeEnvironmentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.shell.v1.IAuthorizeEnvironmentResponse, + protos.google.cloud.shell.v1.IAuthorizeEnvironmentMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.shell.v1.IAuthorizeEnvironmentResponse, + protos.google.cloud.shell.v1.IAuthorizeEnvironmentMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.shell.v1.IAuthorizeEnvironmentResponse, + protos.google.cloud.shell.v1.IAuthorizeEnvironmentMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - 'name': request.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); this.initialize(); return this.innerApiCalls.authorizeEnvironment(request, options, callback); } -/** - * Check the status of the long running operation returned by `authorizeEnvironment()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const decodedOperation = await checkAuthorizeEnvironmentProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); - */ - async checkAuthorizeEnvironmentProgress(name: string): Promise>{ - const request = new operationsProtos.google.longrunning.GetOperationRequest({name}); + /** + * Check the status of the long running operation returned by `authorizeEnvironment()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkAuthorizeEnvironmentProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkAuthorizeEnvironmentProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.shell.v1.AuthorizeEnvironmentResponse, + protos.google.cloud.shell.v1.AuthorizeEnvironmentMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.authorizeEnvironment, gax.createDefaultBackoffSettings()); - return decodeOperation as LROperation; + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.authorizeEnvironment, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.shell.v1.AuthorizeEnvironmentResponse, + protos.google.cloud.shell.v1.AuthorizeEnvironmentMetadata + >; } addPublicKey( - request: protos.google.cloud.shell.v1.IAddPublicKeyRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; + request: protos.google.cloud.shell.v1.IAddPublicKeyRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.shell.v1.IAddPublicKeyResponse, + protos.google.cloud.shell.v1.IAddPublicKeyMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; addPublicKey( - request: protos.google.cloud.shell.v1.IAddPublicKeyRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; + request: protos.google.cloud.shell.v1.IAddPublicKeyRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.shell.v1.IAddPublicKeyResponse, + protos.google.cloud.shell.v1.IAddPublicKeyMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; addPublicKey( - request: protos.google.cloud.shell.v1.IAddPublicKeyRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; -/** - * Adds a public SSH key to an environment, allowing clients with the - * corresponding private key to connect to that environment via SSH. If a key - * with the same content already exists, this will error with ALREADY_EXISTS. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.environment - * Environment this key should be added to, e.g. - * `users/me/environments/default`. - * @param {string} request.key - * Key that should be added to the environment. Supported formats are - * `ssh-dss` (see RFC4253), `ssh-rsa` (see RFC4253), `ecdsa-sha2-nistp256` - * (see RFC5656), `ecdsa-sha2-nistp384` (see RFC5656) and - * `ecdsa-sha2-nistp521` (see RFC5656). It should be structured as - * <format> <content>, where <content> part is encoded with - * Base64. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.addPublicKey(request); - * const [response] = await operation.promise(); - */ + request: protos.google.cloud.shell.v1.IAddPublicKeyRequest, + callback: Callback< + LROperation< + protos.google.cloud.shell.v1.IAddPublicKeyResponse, + protos.google.cloud.shell.v1.IAddPublicKeyMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Adds a public SSH key to an environment, allowing clients with the + * corresponding private key to connect to that environment via SSH. If a key + * with the same content already exists, this will error with ALREADY_EXISTS. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.environment + * Environment this key should be added to, e.g. + * `users/me/environments/default`. + * @param {string} request.key + * Key that should be added to the environment. Supported formats are + * `ssh-dss` (see RFC4253), `ssh-rsa` (see RFC4253), `ecdsa-sha2-nistp256` + * (see RFC5656), `ecdsa-sha2-nistp384` (see RFC5656) and + * `ecdsa-sha2-nistp521` (see RFC5656). It should be structured as + * <format> <content>, where <content> part is encoded with + * Base64. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.addPublicKey(request); + * const [response] = await operation.promise(); + */ addPublicKey( - request: protos.google.cloud.shell.v1.IAddPublicKeyRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { + request: protos.google.cloud.shell.v1.IAddPublicKeyRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.shell.v1.IAddPublicKeyResponse, + protos.google.cloud.shell.v1.IAddPublicKeyMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.shell.v1.IAddPublicKeyResponse, + protos.google.cloud.shell.v1.IAddPublicKeyMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.shell.v1.IAddPublicKeyResponse, + protos.google.cloud.shell.v1.IAddPublicKeyMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - 'environment': request.environment || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + environment: request.environment || '', + }); this.initialize(); return this.innerApiCalls.addPublicKey(request, options, callback); } -/** - * Check the status of the long running operation returned by `addPublicKey()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const decodedOperation = await checkAddPublicKeyProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); - */ - async checkAddPublicKeyProgress(name: string): Promise>{ - const request = new operationsProtos.google.longrunning.GetOperationRequest({name}); + /** + * Check the status of the long running operation returned by `addPublicKey()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkAddPublicKeyProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkAddPublicKeyProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.shell.v1.AddPublicKeyResponse, + protos.google.cloud.shell.v1.AddPublicKeyMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.addPublicKey, gax.createDefaultBackoffSettings()); - return decodeOperation as LROperation; + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.addPublicKey, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.shell.v1.AddPublicKeyResponse, + protos.google.cloud.shell.v1.AddPublicKeyMetadata + >; } removePublicKey( - request: protos.google.cloud.shell.v1.IRemovePublicKeyRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; + request: protos.google.cloud.shell.v1.IRemovePublicKeyRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.shell.v1.IRemovePublicKeyResponse, + protos.google.cloud.shell.v1.IRemovePublicKeyMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; removePublicKey( - request: protos.google.cloud.shell.v1.IRemovePublicKeyRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; + request: protos.google.cloud.shell.v1.IRemovePublicKeyRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.shell.v1.IRemovePublicKeyResponse, + protos.google.cloud.shell.v1.IRemovePublicKeyMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; removePublicKey( - request: protos.google.cloud.shell.v1.IRemovePublicKeyRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; -/** - * Removes a public SSH key from an environment. Clients will no longer be - * able to connect to the environment using the corresponding private key. - * If a key with the same content is not present, this will error with - * NOT_FOUND. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.environment - * Environment this key should be removed from, e.g. - * `users/me/environments/default`. - * @param {string} request.key - * Key that should be removed from the environment. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.removePublicKey(request); - * const [response] = await operation.promise(); - */ + request: protos.google.cloud.shell.v1.IRemovePublicKeyRequest, + callback: Callback< + LROperation< + protos.google.cloud.shell.v1.IRemovePublicKeyResponse, + protos.google.cloud.shell.v1.IRemovePublicKeyMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Removes a public SSH key from an environment. Clients will no longer be + * able to connect to the environment using the corresponding private key. + * If a key with the same content is not present, this will error with + * NOT_FOUND. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.environment + * Environment this key should be removed from, e.g. + * `users/me/environments/default`. + * @param {string} request.key + * Key that should be removed from the environment. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.removePublicKey(request); + * const [response] = await operation.promise(); + */ removePublicKey( - request: protos.google.cloud.shell.v1.IRemovePublicKeyRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { + request: protos.google.cloud.shell.v1.IRemovePublicKeyRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.shell.v1.IRemovePublicKeyResponse, + protos.google.cloud.shell.v1.IRemovePublicKeyMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.shell.v1.IRemovePublicKeyResponse, + protos.google.cloud.shell.v1.IRemovePublicKeyMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.shell.v1.IRemovePublicKeyResponse, + protos.google.cloud.shell.v1.IRemovePublicKeyMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - 'environment': request.environment || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + environment: request.environment || '', + }); this.initialize(); return this.innerApiCalls.removePublicKey(request, options, callback); } -/** - * Check the status of the long running operation returned by `removePublicKey()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const decodedOperation = await checkRemovePublicKeyProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); - */ - async checkRemovePublicKeyProgress(name: string): Promise>{ - const request = new operationsProtos.google.longrunning.GetOperationRequest({name}); + /** + * Check the status of the long running operation returned by `removePublicKey()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkRemovePublicKeyProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkRemovePublicKeyProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.shell.v1.RemovePublicKeyResponse, + protos.google.cloud.shell.v1.RemovePublicKeyMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.removePublicKey, gax.createDefaultBackoffSettings()); - return decodeOperation as LROperation; + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.removePublicKey, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.shell.v1.RemovePublicKeyResponse, + protos.google.cloud.shell.v1.RemovePublicKeyMetadata + >; } // -------------------- // -- Path templates -- @@ -831,7 +1059,7 @@ export class CloudShellServiceClient { * @param {string} environment * @returns {string} Resource name string. */ - environmentPath(user:string,environment:string) { + environmentPath(user: string, environment: string) { return this.pathTemplates.environmentPathTemplate.render({ user: user, environment: environment, @@ -846,7 +1074,8 @@ export class CloudShellServiceClient { * @returns {string} A string representing the user. */ matchUserFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).user; + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .user; } /** @@ -857,7 +1086,8 @@ export class CloudShellServiceClient { * @returns {string} A string representing the environment. */ matchEnvironmentFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .environment; } /** diff --git a/packages/google-cloud-shell/system-test/fixtures/sample/src/index.js b/packages/google-cloud-shell/system-test/fixtures/sample/src/index.js index f729610cc47..6656dcae689 100644 --- a/packages/google-cloud-shell/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-shell/system-test/fixtures/sample/src/index.js @@ -16,7 +16,6 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** - /* eslint-disable node/no-missing-require, no-unused-vars */ const shell = require('@google-cloud/shell'); diff --git a/packages/google-cloud-shell/system-test/install.ts b/packages/google-cloud-shell/system-test/install.ts index 1f850b522f3..d2d61c0396f 100644 --- a/packages/google-cloud-shell/system-test/install.ts +++ b/packages/google-cloud-shell/system-test/install.ts @@ -16,34 +16,36 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** -import { packNTest } from 'pack-n-play'; -import { readFileSync } from 'fs'; -import { describe, it } from 'mocha'; +import {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; describe('📦 pack-n-play test', () => { - - it('TypeScript code', async function() { + it('TypeScript code', async function () { this.timeout(300000); const options = { packageDir: process.cwd(), sample: { description: 'TypeScript user can use the type definitions', - ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() - } + ts: readFileSync( + './system-test/fixtures/sample/src/index.ts' + ).toString(), + }, }; await packNTest(options); }); - it('JavaScript code', async function() { + it('JavaScript code', async function () { this.timeout(300000); const options = { packageDir: process.cwd(), sample: { description: 'JavaScript user can use the library', - ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() - } + ts: readFileSync( + './system-test/fixtures/sample/src/index.js' + ).toString(), + }, }; await packNTest(options); }); - }); diff --git a/packages/google-cloud-shell/test/gapic_cloud_shell_service_v1.ts b/packages/google-cloud-shell/test/gapic_cloud_shell_service_v1.ts index 6056ed59810..6920622e1dc 100644 --- a/packages/google-cloud-shell/test/gapic_cloud_shell_service_v1.ts +++ b/packages/google-cloud-shell/test/gapic_cloud_shell_service_v1.ts @@ -20,818 +20,1081 @@ import * as protos from '../protos/protos'; import * as assert from 'assert'; import * as sinon from 'sinon'; import {SinonStub} from 'sinon'; -import { describe, it } from 'mocha'; +import {describe, it} from 'mocha'; import * as cloudshellserviceModule from '../src'; import {protobuf, LROperation, operationsProtos} from 'google-gax'; function generateSampleMessage(instance: T) { - const filledObject = (instance.constructor as typeof protobuf.Message) - .toObject(instance as protobuf.Message, {defaults: true}); - return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; } function stubSimpleCall(response?: ResponseType, error?: Error) { - return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); } -function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { - return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); } -function stubLongRunningCall(response?: ResponseType, callError?: Error, lroError?: Error) { - const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); - const mockOperation = { - promise: innerStub, - }; - return callError ? sinon.stub().rejects(callError) : sinon.stub().resolves([mockOperation]); +function stubLongRunningCall( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().rejects(callError) + : sinon.stub().resolves([mockOperation]); } -function stubLongRunningCallWithCallback(response?: ResponseType, callError?: Error, lroError?: Error) { - const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); - const mockOperation = { - promise: innerStub, - }; - return callError ? sinon.stub().callsArgWith(2, callError) : sinon.stub().callsArgWith(2, null, mockOperation); +function stubLongRunningCallWithCallback( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().callsArgWith(2, callError) + : sinon.stub().callsArgWith(2, null, mockOperation); } describe('v1.CloudShellServiceClient', () => { - it('has servicePath', () => { - const servicePath = cloudshellserviceModule.v1.CloudShellServiceClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = cloudshellserviceModule.v1.CloudShellServiceClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = cloudshellserviceModule.v1.CloudShellServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - assert.strictEqual(client.cloudShellServiceStub, undefined); - await client.initialize(); - assert(client.cloudShellServiceStub); - }); - - it('has close method', () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - client.close(); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error|null, projectId?: string|null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } - }); - }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); - }); - - describe('getEnvironment', () => { - it('invokes getEnvironment without error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.shell.v1.GetEnvironmentRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.cloud.shell.v1.Environment()); - client.innerApiCalls.getEnvironment = stubSimpleCall(expectedResponse); - const [response] = await client.getEnvironment(request); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.getEnvironment as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes getEnvironment without error using callback', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.shell.v1.GetEnvironmentRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.cloud.shell.v1.Environment()); - client.innerApiCalls.getEnvironment = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getEnvironment( - request, - (err?: Error|null, result?: protos.google.cloud.shell.v1.IEnvironment|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.getEnvironment as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); - - it('invokes getEnvironment with error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.shell.v1.GetEnvironmentRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.getEnvironment = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getEnvironment(request), expectedError); - assert((client.innerApiCalls.getEnvironment as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - }); - - describe('startEnvironment', () => { - it('invokes startEnvironment without error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.shell.v1.StartEnvironmentRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.longrunning.Operation()); - client.innerApiCalls.startEnvironment = stubLongRunningCall(expectedResponse); - const [operation] = await client.startEnvironment(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.startEnvironment as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes startEnvironment without error using callback', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.shell.v1.StartEnvironmentRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.longrunning.Operation()); - client.innerApiCalls.startEnvironment = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.startEnvironment( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.startEnvironment as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); - - it('invokes startEnvironment with call error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.shell.v1.StartEnvironmentRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.startEnvironment = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.startEnvironment(request), expectedError); - assert((client.innerApiCalls.startEnvironment as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes startEnvironment with LRO error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.shell.v1.StartEnvironmentRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.startEnvironment = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.startEnvironment(request); - await assert.rejects(operation.promise(), expectedError); - assert((client.innerApiCalls.startEnvironment as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes checkStartEnvironmentProgress without error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage(new operationsProtos.google.longrunning.Operation()); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkStartEnvironmentProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkStartEnvironmentProgress with error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkStartEnvironmentProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('authorizeEnvironment', () => { - it('invokes authorizeEnvironment without error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.shell.v1.AuthorizeEnvironmentRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.longrunning.Operation()); - client.innerApiCalls.authorizeEnvironment = stubLongRunningCall(expectedResponse); - const [operation] = await client.authorizeEnvironment(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.authorizeEnvironment as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes authorizeEnvironment without error using callback', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.shell.v1.AuthorizeEnvironmentRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.longrunning.Operation()); - client.innerApiCalls.authorizeEnvironment = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.authorizeEnvironment( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.authorizeEnvironment as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); - - it('invokes authorizeEnvironment with call error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.shell.v1.AuthorizeEnvironmentRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.authorizeEnvironment = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.authorizeEnvironment(request), expectedError); - assert((client.innerApiCalls.authorizeEnvironment as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes authorizeEnvironment with LRO error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.shell.v1.AuthorizeEnvironmentRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.authorizeEnvironment = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.authorizeEnvironment(request); - await assert.rejects(operation.promise(), expectedError); - assert((client.innerApiCalls.authorizeEnvironment as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes checkAuthorizeEnvironmentProgress without error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage(new operationsProtos.google.longrunning.Operation()); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkAuthorizeEnvironmentProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkAuthorizeEnvironmentProgress with error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkAuthorizeEnvironmentProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('addPublicKey', () => { - it('invokes addPublicKey without error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.shell.v1.AddPublicKeyRequest()); - request.environment = ''; - const expectedHeaderRequestParams = "environment="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.longrunning.Operation()); - client.innerApiCalls.addPublicKey = stubLongRunningCall(expectedResponse); - const [operation] = await client.addPublicKey(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.addPublicKey as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes addPublicKey without error using callback', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.shell.v1.AddPublicKeyRequest()); - request.environment = ''; - const expectedHeaderRequestParams = "environment="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.longrunning.Operation()); - client.innerApiCalls.addPublicKey = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.addPublicKey( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.addPublicKey as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); - - it('invokes addPublicKey with call error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.shell.v1.AddPublicKeyRequest()); - request.environment = ''; - const expectedHeaderRequestParams = "environment="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.addPublicKey = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.addPublicKey(request), expectedError); - assert((client.innerApiCalls.addPublicKey as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes addPublicKey with LRO error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.shell.v1.AddPublicKeyRequest()); - request.environment = ''; - const expectedHeaderRequestParams = "environment="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.addPublicKey = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.addPublicKey(request); - await assert.rejects(operation.promise(), expectedError); - assert((client.innerApiCalls.addPublicKey as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes checkAddPublicKeyProgress without error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage(new operationsProtos.google.longrunning.Operation()); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkAddPublicKeyProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkAddPublicKeyProgress with error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkAddPublicKeyProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('removePublicKey', () => { - it('invokes removePublicKey without error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.shell.v1.RemovePublicKeyRequest()); - request.environment = ''; - const expectedHeaderRequestParams = "environment="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.longrunning.Operation()); - client.innerApiCalls.removePublicKey = stubLongRunningCall(expectedResponse); - const [operation] = await client.removePublicKey(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.removePublicKey as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes removePublicKey without error using callback', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.shell.v1.RemovePublicKeyRequest()); - request.environment = ''; - const expectedHeaderRequestParams = "environment="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.longrunning.Operation()); - client.innerApiCalls.removePublicKey = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.removePublicKey( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.removePublicKey as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); - - it('invokes removePublicKey with call error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.shell.v1.RemovePublicKeyRequest()); - request.environment = ''; - const expectedHeaderRequestParams = "environment="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.removePublicKey = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.removePublicKey(request), expectedError); - assert((client.innerApiCalls.removePublicKey as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes removePublicKey with LRO error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.shell.v1.RemovePublicKeyRequest()); - request.environment = ''; - const expectedHeaderRequestParams = "environment="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.removePublicKey = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.removePublicKey(request); - await assert.rejects(operation.promise(), expectedError); - assert((client.innerApiCalls.removePublicKey as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes checkRemovePublicKeyProgress without error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage(new operationsProtos.google.longrunning.Operation()); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkRemovePublicKeyProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkRemovePublicKeyProgress with error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkRemovePublicKeyProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('Path templates', () => { - - describe('environment', () => { - const fakePath = "/rendered/path/environment"; - const expectedParameters = { - user: "userValue", - environment: "environmentValue", - }; - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.environmentPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.environmentPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('environmentPath', () => { - const result = client.environmentPath("userValue", "environmentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.environmentPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchUserFromEnvironmentName', () => { - const result = client.matchUserFromEnvironmentName(fakePath); - assert.strictEqual(result, "userValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEnvironmentFromEnvironmentName', () => { - const result = client.matchEnvironmentFromEnvironmentName(fakePath); - assert.strictEqual(result, "environmentValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); + it('has servicePath', () => { + const servicePath = + cloudshellserviceModule.v1.CloudShellServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + cloudshellserviceModule.v1.CloudShellServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = cloudshellserviceModule.v1.CloudShellServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.cloudShellServiceStub, undefined); + await client.initialize(); + assert(client.cloudShellServiceStub); + }); + + it('has close method', () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + + describe('getEnvironment', () => { + it('invokes getEnvironment without error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.shell.v1.GetEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.shell.v1.Environment() + ); + client.innerApiCalls.getEnvironment = stubSimpleCall(expectedResponse); + const [response] = await client.getEnvironment(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getEnvironment without error using callback', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.shell.v1.GetEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.shell.v1.Environment() + ); + client.innerApiCalls.getEnvironment = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getEnvironment( + request, + ( + err?: Error | null, + result?: protos.google.cloud.shell.v1.IEnvironment | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getEnvironment with error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.shell.v1.GetEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getEnvironment = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getEnvironment(request), expectedError); + assert( + (client.innerApiCalls.getEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('startEnvironment', () => { + it('invokes startEnvironment without error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.shell.v1.StartEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.startEnvironment = + stubLongRunningCall(expectedResponse); + const [operation] = await client.startEnvironment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.startEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes startEnvironment without error using callback', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.shell.v1.StartEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.startEnvironment = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.startEnvironment( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.shell.v1.IStartEnvironmentResponse, + protos.google.cloud.shell.v1.IStartEnvironmentMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.shell.v1.IStartEnvironmentResponse, + protos.google.cloud.shell.v1.IStartEnvironmentMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.startEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes startEnvironment with call error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.shell.v1.StartEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.startEnvironment = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.startEnvironment(request), expectedError); + assert( + (client.innerApiCalls.startEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes startEnvironment with LRO error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.shell.v1.StartEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.startEnvironment = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.startEnvironment(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.startEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkStartEnvironmentProgress without error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkStartEnvironmentProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkStartEnvironmentProgress with error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkStartEnvironmentProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('authorizeEnvironment', () => { + it('invokes authorizeEnvironment without error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.shell.v1.AuthorizeEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.authorizeEnvironment = + stubLongRunningCall(expectedResponse); + const [operation] = await client.authorizeEnvironment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.authorizeEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes authorizeEnvironment without error using callback', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.shell.v1.AuthorizeEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.authorizeEnvironment = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.authorizeEnvironment( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.shell.v1.IAuthorizeEnvironmentResponse, + protos.google.cloud.shell.v1.IAuthorizeEnvironmentMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.shell.v1.IAuthorizeEnvironmentResponse, + protos.google.cloud.shell.v1.IAuthorizeEnvironmentMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.authorizeEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes authorizeEnvironment with call error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.shell.v1.AuthorizeEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.authorizeEnvironment = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.authorizeEnvironment(request), expectedError); + assert( + (client.innerApiCalls.authorizeEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes authorizeEnvironment with LRO error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.shell.v1.AuthorizeEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.authorizeEnvironment = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.authorizeEnvironment(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.authorizeEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkAuthorizeEnvironmentProgress without error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkAuthorizeEnvironmentProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkAuthorizeEnvironmentProgress with error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkAuthorizeEnvironmentProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('addPublicKey', () => { + it('invokes addPublicKey without error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.shell.v1.AddPublicKeyRequest() + ); + request.environment = ''; + const expectedHeaderRequestParams = 'environment='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.addPublicKey = stubLongRunningCall(expectedResponse); + const [operation] = await client.addPublicKey(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.addPublicKey as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes addPublicKey without error using callback', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.shell.v1.AddPublicKeyRequest() + ); + request.environment = ''; + const expectedHeaderRequestParams = 'environment='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.addPublicKey = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.addPublicKey( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.shell.v1.IAddPublicKeyResponse, + protos.google.cloud.shell.v1.IAddPublicKeyMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.shell.v1.IAddPublicKeyResponse, + protos.google.cloud.shell.v1.IAddPublicKeyMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.addPublicKey as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes addPublicKey with call error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.shell.v1.AddPublicKeyRequest() + ); + request.environment = ''; + const expectedHeaderRequestParams = 'environment='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.addPublicKey = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.addPublicKey(request), expectedError); + assert( + (client.innerApiCalls.addPublicKey as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes addPublicKey with LRO error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.shell.v1.AddPublicKeyRequest() + ); + request.environment = ''; + const expectedHeaderRequestParams = 'environment='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.addPublicKey = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.addPublicKey(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.addPublicKey as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkAddPublicKeyProgress without error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkAddPublicKeyProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkAddPublicKeyProgress with error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.checkAddPublicKeyProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('removePublicKey', () => { + it('invokes removePublicKey without error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.shell.v1.RemovePublicKeyRequest() + ); + request.environment = ''; + const expectedHeaderRequestParams = 'environment='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.removePublicKey = + stubLongRunningCall(expectedResponse); + const [operation] = await client.removePublicKey(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.removePublicKey as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes removePublicKey without error using callback', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.shell.v1.RemovePublicKeyRequest() + ); + request.environment = ''; + const expectedHeaderRequestParams = 'environment='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.removePublicKey = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.removePublicKey( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.shell.v1.IRemovePublicKeyResponse, + protos.google.cloud.shell.v1.IRemovePublicKeyMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.shell.v1.IRemovePublicKeyResponse, + protos.google.cloud.shell.v1.IRemovePublicKeyMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.removePublicKey as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes removePublicKey with call error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.shell.v1.RemovePublicKeyRequest() + ); + request.environment = ''; + const expectedHeaderRequestParams = 'environment='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.removePublicKey = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.removePublicKey(request), expectedError); + assert( + (client.innerApiCalls.removePublicKey as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes removePublicKey with LRO error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.shell.v1.RemovePublicKeyRequest() + ); + request.environment = ''; + const expectedHeaderRequestParams = 'environment='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.removePublicKey = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.removePublicKey(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.removePublicKey as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkRemovePublicKeyProgress without error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkRemovePublicKeyProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkRemovePublicKeyProgress with error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkRemovePublicKeyProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('Path templates', () => { + describe('environment', () => { + const fakePath = '/rendered/path/environment'; + const expectedParameters = { + user: 'userValue', + environment: 'environmentValue', + }; + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.environmentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.environmentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('environmentPath', () => { + const result = client.environmentPath('userValue', 'environmentValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.environmentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchUserFromEnvironmentName', () => { + const result = client.matchUserFromEnvironmentName(fakePath); + assert.strictEqual(result, 'userValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromEnvironmentName', () => { + const result = client.matchEnvironmentFromEnvironmentName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); }); + }); }); diff --git a/packages/google-cloud-shell/v1/src/index.ts b/packages/google-cloud-shell/v1/src/index.ts index ba7d58afb2e..222633d3f25 100644 --- a/packages/google-cloud-shell/v1/src/index.ts +++ b/packages/google-cloud-shell/v1/src/index.ts @@ -22,4 +22,4 @@ type CloudShellServiceClient = v1.CloudShellServiceClient; export {v1, CloudShellServiceClient}; export default {v1, CloudShellServiceClient}; import * as protos from '../protos/protos'; -export {protos} +export {protos}; diff --git a/packages/google-cloud-shell/v1/src/v1/cloud_shell_service_client.ts b/packages/google-cloud-shell/v1/src/v1/cloud_shell_service_client.ts index c787539084e..74d4a4b80ab 100644 --- a/packages/google-cloud-shell/v1/src/v1/cloud_shell_service_client.ts +++ b/packages/google-cloud-shell/v1/src/v1/cloud_shell_service_client.ts @@ -18,7 +18,13 @@ /* global window */ import * as gax from 'google-gax'; -import {Callback, CallOptions, Descriptors, ClientOptions, LROperation} from 'google-gax'; +import { + Callback, + CallOptions, + Descriptors, + ClientOptions, + LROperation, +} from 'google-gax'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); @@ -28,7 +34,7 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './cloud_shell_service_client_config.json'; -import { operationsProtos } from 'google-gax'; +import {operationsProtos} from 'google-gax'; const version = require('../../../package.json').version; /** @@ -98,10 +104,13 @@ export class CloudShellServiceClient { constructor(opts?: ClientOptions) { // Ensure that options include all the required fields. const staticMembers = this.constructor as typeof CloudShellServiceClient; - const servicePath = opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. @@ -119,7 +128,7 @@ export class CloudShellServiceClient { this._opts = opts; // Save the auth object to the client, for use by other methods. - this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; // Set the default scopes in auth client if needed. if (servicePath === staticMembers.servicePath) { @@ -127,10 +136,7 @@ export class CloudShellServiceClient { } // Determine the client header string. - const clientHeader = [ - `gax/${this._gaxModule.version}`, - `gapic/${version}`, - ]; + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; if (typeof process !== 'undefined' && 'versions' in process) { clientHeader.push(`gl-node/${process.versions.node}`); } else { @@ -138,7 +144,7 @@ export class CloudShellServiceClient { } if (!opts.fallback) { clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest' ) { + } else if (opts.fallback === 'rest') { clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { @@ -162,50 +168,67 @@ export class CloudShellServiceClient { // an Operation object that allows for tracking of the operation, // rather than holding a request open. - this.operationsClient = this._gaxModule.lro({ - auth: this.auth, - grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined - }).operationsClient(opts); + this.operationsClient = this._gaxModule + .lro({ + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }) + .operationsClient(opts); const startEnvironmentResponse = protoFilesRoot.lookup( - '.google.cloud.shell.v1.StartEnvironmentResponse') as gax.protobuf.Type; + '.google.cloud.shell.v1.StartEnvironmentResponse' + ) as gax.protobuf.Type; const startEnvironmentMetadata = protoFilesRoot.lookup( - '.google.cloud.shell.v1.StartEnvironmentMetadata') as gax.protobuf.Type; + '.google.cloud.shell.v1.StartEnvironmentMetadata' + ) as gax.protobuf.Type; const authorizeEnvironmentResponse = protoFilesRoot.lookup( - '.google.cloud.shell.v1.AuthorizeEnvironmentResponse') as gax.protobuf.Type; + '.google.cloud.shell.v1.AuthorizeEnvironmentResponse' + ) as gax.protobuf.Type; const authorizeEnvironmentMetadata = protoFilesRoot.lookup( - '.google.cloud.shell.v1.AuthorizeEnvironmentMetadata') as gax.protobuf.Type; + '.google.cloud.shell.v1.AuthorizeEnvironmentMetadata' + ) as gax.protobuf.Type; const addPublicKeyResponse = protoFilesRoot.lookup( - '.google.cloud.shell.v1.AddPublicKeyResponse') as gax.protobuf.Type; + '.google.cloud.shell.v1.AddPublicKeyResponse' + ) as gax.protobuf.Type; const addPublicKeyMetadata = protoFilesRoot.lookup( - '.google.cloud.shell.v1.AddPublicKeyMetadata') as gax.protobuf.Type; + '.google.cloud.shell.v1.AddPublicKeyMetadata' + ) as gax.protobuf.Type; const removePublicKeyResponse = protoFilesRoot.lookup( - '.google.cloud.shell.v1.RemovePublicKeyResponse') as gax.protobuf.Type; + '.google.cloud.shell.v1.RemovePublicKeyResponse' + ) as gax.protobuf.Type; const removePublicKeyMetadata = protoFilesRoot.lookup( - '.google.cloud.shell.v1.RemovePublicKeyMetadata') as gax.protobuf.Type; + '.google.cloud.shell.v1.RemovePublicKeyMetadata' + ) as gax.protobuf.Type; this.descriptors.longrunning = { startEnvironment: new this._gaxModule.LongrunningDescriptor( this.operationsClient, startEnvironmentResponse.decode.bind(startEnvironmentResponse), - startEnvironmentMetadata.decode.bind(startEnvironmentMetadata)), + startEnvironmentMetadata.decode.bind(startEnvironmentMetadata) + ), authorizeEnvironment: new this._gaxModule.LongrunningDescriptor( this.operationsClient, authorizeEnvironmentResponse.decode.bind(authorizeEnvironmentResponse), - authorizeEnvironmentMetadata.decode.bind(authorizeEnvironmentMetadata)), + authorizeEnvironmentMetadata.decode.bind(authorizeEnvironmentMetadata) + ), addPublicKey: new this._gaxModule.LongrunningDescriptor( this.operationsClient, addPublicKeyResponse.decode.bind(addPublicKeyResponse), - addPublicKeyMetadata.decode.bind(addPublicKeyMetadata)), + addPublicKeyMetadata.decode.bind(addPublicKeyMetadata) + ), removePublicKey: new this._gaxModule.LongrunningDescriptor( this.operationsClient, removePublicKeyResponse.decode.bind(removePublicKeyResponse), - removePublicKeyMetadata.decode.bind(removePublicKeyMetadata)) + removePublicKeyMetadata.decode.bind(removePublicKeyMetadata) + ), }; // Put together the default options sent with requests. this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.shell.v1.CloudShellService', gapicConfig as gax.ClientConfig, - opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + 'google.cloud.shell.v1.CloudShellService', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); // Set up a dictionary of "inner API calls"; the core implementation // of calling the API is handled in `google-gax`, with this code @@ -233,32 +256,40 @@ export class CloudShellServiceClient { // Put together the "service stub" for // google.cloud.shell.v1.CloudShellService. this.cloudShellServiceStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.cloud.shell.v1.CloudShellService') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.shell.v1.CloudShellService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.cloud.shell.v1.CloudShellService, - this._opts) as Promise<{[method: string]: Function}>; + this._opts + ) as Promise<{[method: string]: Function}>; // Iterate over each of the methods that the service provides // and create an API call method for each. - const cloudShellServiceStubMethods = - ['getEnvironment', 'startEnvironment', 'authorizeEnvironment', 'addPublicKey', 'removePublicKey']; + const cloudShellServiceStubMethods = [ + 'getEnvironment', + 'startEnvironment', + 'authorizeEnvironment', + 'addPublicKey', + 'removePublicKey', + ]; for (const methodName of cloudShellServiceStubMethods) { const callPromise = this.cloudShellServiceStub.then( - stub => (...args: Array<{}>) => { - if (this._terminated) { - return Promise.reject('The client has already been closed.'); - } - const func = stub[methodName]; - return func.apply(stub, args); - }, - (err: Error|null|undefined) => () => { + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { throw err; - }); + } + ); - const descriptor = - this.descriptors.longrunning[methodName] || - undefined; + const descriptor = this.descriptors.longrunning[methodName] || undefined; const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], @@ -302,9 +333,7 @@ export class CloudShellServiceClient { * @returns {string[]} List of default scopes. */ static get scopes() { - return [ - 'https://www.googleapis.com/auth/cloud-platform' - ]; + return ['https://www.googleapis.com/auth/cloud-platform']; } getProjectId(): Promise; @@ -313,8 +342,9 @@ export class CloudShellServiceClient { * Return the project ID used by this class. * @returns {Promise} A promise that resolves to string containing the project ID. */ - getProjectId(callback?: Callback): - Promise|void { + getProjectId( + callback?: Callback + ): Promise | void { if (callback) { this.auth.getProjectId(callback); return; @@ -326,499 +356,697 @@ export class CloudShellServiceClient { // -- Service calls -- // ------------------- getEnvironment( - request: protos.google.cloud.shell.v1.IGetEnvironmentRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.shell.v1.IEnvironment, - protos.google.cloud.shell.v1.IGetEnvironmentRequest|undefined, {}|undefined - ]>; + request: protos.google.cloud.shell.v1.IGetEnvironmentRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.shell.v1.IEnvironment, + protos.google.cloud.shell.v1.IGetEnvironmentRequest | undefined, + {} | undefined + ] + >; getEnvironment( - request: protos.google.cloud.shell.v1.IGetEnvironmentRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.shell.v1.IEnvironment, - protos.google.cloud.shell.v1.IGetEnvironmentRequest|null|undefined, - {}|null|undefined>): void; + request: protos.google.cloud.shell.v1.IGetEnvironmentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.shell.v1.IEnvironment, + protos.google.cloud.shell.v1.IGetEnvironmentRequest | null | undefined, + {} | null | undefined + > + ): void; getEnvironment( - request: protos.google.cloud.shell.v1.IGetEnvironmentRequest, - callback: Callback< - protos.google.cloud.shell.v1.IEnvironment, - protos.google.cloud.shell.v1.IGetEnvironmentRequest|null|undefined, - {}|null|undefined>): void; -/** - * Gets an environment. Returns NOT_FOUND if the environment does not exist. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the requested resource, for example `users/me/environments/default` - * or `users/someone@example.com/environments/default`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Environment]{@link google.cloud.shell.v1.Environment}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getEnvironment(request); - */ + request: protos.google.cloud.shell.v1.IGetEnvironmentRequest, + callback: Callback< + protos.google.cloud.shell.v1.IEnvironment, + protos.google.cloud.shell.v1.IGetEnvironmentRequest | null | undefined, + {} | null | undefined + > + ): void; + /** + * Gets an environment. Returns NOT_FOUND if the environment does not exist. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the requested resource, for example `users/me/environments/default` + * or `users/someone@example.com/environments/default`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Environment]{@link google.cloud.shell.v1.Environment}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.getEnvironment(request); + */ getEnvironment( - request: protos.google.cloud.shell.v1.IGetEnvironmentRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.shell.v1.IEnvironment, - protos.google.cloud.shell.v1.IGetEnvironmentRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< + request: protos.google.cloud.shell.v1.IGetEnvironmentRequest, + optionsOrCallback?: + | CallOptions + | Callback< protos.google.cloud.shell.v1.IEnvironment, - protos.google.cloud.shell.v1.IGetEnvironmentRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.shell.v1.IEnvironment, - protos.google.cloud.shell.v1.IGetEnvironmentRequest|undefined, {}|undefined - ]>|void { + | protos.google.cloud.shell.v1.IGetEnvironmentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.shell.v1.IEnvironment, + protos.google.cloud.shell.v1.IGetEnvironmentRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.shell.v1.IEnvironment, + protos.google.cloud.shell.v1.IGetEnvironmentRequest | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - 'name': request.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); this.initialize(); return this.innerApiCalls.getEnvironment(request, options, callback); } startEnvironment( - request: protos.google.cloud.shell.v1.IStartEnvironmentRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; + request: protos.google.cloud.shell.v1.IStartEnvironmentRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.shell.v1.IStartEnvironmentResponse, + protos.google.cloud.shell.v1.IStartEnvironmentMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; startEnvironment( - request: protos.google.cloud.shell.v1.IStartEnvironmentRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; + request: protos.google.cloud.shell.v1.IStartEnvironmentRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.shell.v1.IStartEnvironmentResponse, + protos.google.cloud.shell.v1.IStartEnvironmentMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; startEnvironment( - request: protos.google.cloud.shell.v1.IStartEnvironmentRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; -/** - * Starts an existing environment, allowing clients to connect to it. The - * returned operation will contain an instance of StartEnvironmentMetadata in - * its metadata field. Users can wait for the environment to start by polling - * this operation via GetOperation. Once the environment has finished starting - * and is ready to accept connections, the operation will contain a - * StartEnvironmentResponse in its response field. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Name of the resource that should be started, for example - * `users/me/environments/default` or - * `users/someone@example.com/environments/default`. - * @param {string} request.accessToken - * The initial access token passed to the environment. If this is present and - * valid, the environment will be pre-authenticated with gcloud so that the - * user can run gcloud commands in Cloud Shell without having to log in. This - * code can be updated later by calling AuthorizeEnvironment. - * @param {string[]} request.publicKeys - * Public keys that should be added to the environment before it is started. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.startEnvironment(request); - * const [response] = await operation.promise(); - */ + request: protos.google.cloud.shell.v1.IStartEnvironmentRequest, + callback: Callback< + LROperation< + protos.google.cloud.shell.v1.IStartEnvironmentResponse, + protos.google.cloud.shell.v1.IStartEnvironmentMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Starts an existing environment, allowing clients to connect to it. The + * returned operation will contain an instance of StartEnvironmentMetadata in + * its metadata field. Users can wait for the environment to start by polling + * this operation via GetOperation. Once the environment has finished starting + * and is ready to accept connections, the operation will contain a + * StartEnvironmentResponse in its response field. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Name of the resource that should be started, for example + * `users/me/environments/default` or + * `users/someone@example.com/environments/default`. + * @param {string} request.accessToken + * The initial access token passed to the environment. If this is present and + * valid, the environment will be pre-authenticated with gcloud so that the + * user can run gcloud commands in Cloud Shell without having to log in. This + * code can be updated later by calling AuthorizeEnvironment. + * @param {string[]} request.publicKeys + * Public keys that should be added to the environment before it is started. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.startEnvironment(request); + * const [response] = await operation.promise(); + */ startEnvironment( - request: protos.google.cloud.shell.v1.IStartEnvironmentRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { + request: protos.google.cloud.shell.v1.IStartEnvironmentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.shell.v1.IStartEnvironmentResponse, + protos.google.cloud.shell.v1.IStartEnvironmentMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.shell.v1.IStartEnvironmentResponse, + protos.google.cloud.shell.v1.IStartEnvironmentMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.shell.v1.IStartEnvironmentResponse, + protos.google.cloud.shell.v1.IStartEnvironmentMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - 'name': request.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); this.initialize(); return this.innerApiCalls.startEnvironment(request, options, callback); } -/** - * Check the status of the long running operation returned by `startEnvironment()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const decodedOperation = await checkStartEnvironmentProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); - */ - async checkStartEnvironmentProgress(name: string): Promise>{ - const request = new operationsProtos.google.longrunning.GetOperationRequest({name}); + /** + * Check the status of the long running operation returned by `startEnvironment()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkStartEnvironmentProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkStartEnvironmentProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.shell.v1.StartEnvironmentResponse, + protos.google.cloud.shell.v1.StartEnvironmentMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.startEnvironment, gax.createDefaultBackoffSettings()); - return decodeOperation as LROperation; + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.startEnvironment, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.shell.v1.StartEnvironmentResponse, + protos.google.cloud.shell.v1.StartEnvironmentMetadata + >; } authorizeEnvironment( - request: protos.google.cloud.shell.v1.IAuthorizeEnvironmentRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; + request: protos.google.cloud.shell.v1.IAuthorizeEnvironmentRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.shell.v1.IAuthorizeEnvironmentResponse, + protos.google.cloud.shell.v1.IAuthorizeEnvironmentMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; authorizeEnvironment( - request: protos.google.cloud.shell.v1.IAuthorizeEnvironmentRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; + request: protos.google.cloud.shell.v1.IAuthorizeEnvironmentRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.shell.v1.IAuthorizeEnvironmentResponse, + protos.google.cloud.shell.v1.IAuthorizeEnvironmentMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; authorizeEnvironment( - request: protos.google.cloud.shell.v1.IAuthorizeEnvironmentRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; -/** - * Sends OAuth credentials to a running environment on behalf of a user. When - * this completes, the environment will be authorized to run various Google - * Cloud command line tools without requiring the user to manually - * authenticate. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Name of the resource that should receive the credentials, for example - * `users/me/environments/default` or - * `users/someone@example.com/environments/default`. - * @param {string} request.accessToken - * The OAuth access token that should be sent to the environment. - * @param {string} request.idToken - * The OAuth ID token that should be sent to the environment. - * @param {google.protobuf.Timestamp} request.expireTime - * The time when the credentials expire. If not set, defaults to one hour from - * when the server received the request. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.authorizeEnvironment(request); - * const [response] = await operation.promise(); - */ + request: protos.google.cloud.shell.v1.IAuthorizeEnvironmentRequest, + callback: Callback< + LROperation< + protos.google.cloud.shell.v1.IAuthorizeEnvironmentResponse, + protos.google.cloud.shell.v1.IAuthorizeEnvironmentMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Sends OAuth credentials to a running environment on behalf of a user. When + * this completes, the environment will be authorized to run various Google + * Cloud command line tools without requiring the user to manually + * authenticate. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Name of the resource that should receive the credentials, for example + * `users/me/environments/default` or + * `users/someone@example.com/environments/default`. + * @param {string} request.accessToken + * The OAuth access token that should be sent to the environment. + * @param {string} request.idToken + * The OAuth ID token that should be sent to the environment. + * @param {google.protobuf.Timestamp} request.expireTime + * The time when the credentials expire. If not set, defaults to one hour from + * when the server received the request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.authorizeEnvironment(request); + * const [response] = await operation.promise(); + */ authorizeEnvironment( - request: protos.google.cloud.shell.v1.IAuthorizeEnvironmentRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { + request: protos.google.cloud.shell.v1.IAuthorizeEnvironmentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.shell.v1.IAuthorizeEnvironmentResponse, + protos.google.cloud.shell.v1.IAuthorizeEnvironmentMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.shell.v1.IAuthorizeEnvironmentResponse, + protos.google.cloud.shell.v1.IAuthorizeEnvironmentMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.shell.v1.IAuthorizeEnvironmentResponse, + protos.google.cloud.shell.v1.IAuthorizeEnvironmentMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - 'name': request.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); this.initialize(); return this.innerApiCalls.authorizeEnvironment(request, options, callback); } -/** - * Check the status of the long running operation returned by `authorizeEnvironment()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const decodedOperation = await checkAuthorizeEnvironmentProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); - */ - async checkAuthorizeEnvironmentProgress(name: string): Promise>{ - const request = new operationsProtos.google.longrunning.GetOperationRequest({name}); + /** + * Check the status of the long running operation returned by `authorizeEnvironment()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkAuthorizeEnvironmentProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkAuthorizeEnvironmentProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.shell.v1.AuthorizeEnvironmentResponse, + protos.google.cloud.shell.v1.AuthorizeEnvironmentMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.authorizeEnvironment, gax.createDefaultBackoffSettings()); - return decodeOperation as LROperation; + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.authorizeEnvironment, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.shell.v1.AuthorizeEnvironmentResponse, + protos.google.cloud.shell.v1.AuthorizeEnvironmentMetadata + >; } addPublicKey( - request: protos.google.cloud.shell.v1.IAddPublicKeyRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; + request: protos.google.cloud.shell.v1.IAddPublicKeyRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.shell.v1.IAddPublicKeyResponse, + protos.google.cloud.shell.v1.IAddPublicKeyMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; addPublicKey( - request: protos.google.cloud.shell.v1.IAddPublicKeyRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; + request: protos.google.cloud.shell.v1.IAddPublicKeyRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.shell.v1.IAddPublicKeyResponse, + protos.google.cloud.shell.v1.IAddPublicKeyMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; addPublicKey( - request: protos.google.cloud.shell.v1.IAddPublicKeyRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; -/** - * Adds a public SSH key to an environment, allowing clients with the - * corresponding private key to connect to that environment via SSH. If a key - * with the same content already exists, this will error with ALREADY_EXISTS. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.environment - * Environment this key should be added to, e.g. - * `users/me/environments/default`. - * @param {string} request.key - * Key that should be added to the environment. Supported formats are - * `ssh-dss` (see RFC4253), `ssh-rsa` (see RFC4253), `ecdsa-sha2-nistp256` - * (see RFC5656), `ecdsa-sha2-nistp384` (see RFC5656) and - * `ecdsa-sha2-nistp521` (see RFC5656). It should be structured as - * <format> <content>, where <content> part is encoded with - * Base64. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.addPublicKey(request); - * const [response] = await operation.promise(); - */ + request: protos.google.cloud.shell.v1.IAddPublicKeyRequest, + callback: Callback< + LROperation< + protos.google.cloud.shell.v1.IAddPublicKeyResponse, + protos.google.cloud.shell.v1.IAddPublicKeyMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Adds a public SSH key to an environment, allowing clients with the + * corresponding private key to connect to that environment via SSH. If a key + * with the same content already exists, this will error with ALREADY_EXISTS. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.environment + * Environment this key should be added to, e.g. + * `users/me/environments/default`. + * @param {string} request.key + * Key that should be added to the environment. Supported formats are + * `ssh-dss` (see RFC4253), `ssh-rsa` (see RFC4253), `ecdsa-sha2-nistp256` + * (see RFC5656), `ecdsa-sha2-nistp384` (see RFC5656) and + * `ecdsa-sha2-nistp521` (see RFC5656). It should be structured as + * <format> <content>, where <content> part is encoded with + * Base64. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.addPublicKey(request); + * const [response] = await operation.promise(); + */ addPublicKey( - request: protos.google.cloud.shell.v1.IAddPublicKeyRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { + request: protos.google.cloud.shell.v1.IAddPublicKeyRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.shell.v1.IAddPublicKeyResponse, + protos.google.cloud.shell.v1.IAddPublicKeyMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.shell.v1.IAddPublicKeyResponse, + protos.google.cloud.shell.v1.IAddPublicKeyMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.shell.v1.IAddPublicKeyResponse, + protos.google.cloud.shell.v1.IAddPublicKeyMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - 'environment': request.environment || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + environment: request.environment || '', + }); this.initialize(); return this.innerApiCalls.addPublicKey(request, options, callback); } -/** - * Check the status of the long running operation returned by `addPublicKey()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const decodedOperation = await checkAddPublicKeyProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); - */ - async checkAddPublicKeyProgress(name: string): Promise>{ - const request = new operationsProtos.google.longrunning.GetOperationRequest({name}); + /** + * Check the status of the long running operation returned by `addPublicKey()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkAddPublicKeyProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkAddPublicKeyProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.shell.v1.AddPublicKeyResponse, + protos.google.cloud.shell.v1.AddPublicKeyMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.addPublicKey, gax.createDefaultBackoffSettings()); - return decodeOperation as LROperation; + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.addPublicKey, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.shell.v1.AddPublicKeyResponse, + protos.google.cloud.shell.v1.AddPublicKeyMetadata + >; } removePublicKey( - request: protos.google.cloud.shell.v1.IRemovePublicKeyRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; + request: protos.google.cloud.shell.v1.IRemovePublicKeyRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.shell.v1.IRemovePublicKeyResponse, + protos.google.cloud.shell.v1.IRemovePublicKeyMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; removePublicKey( - request: protos.google.cloud.shell.v1.IRemovePublicKeyRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; + request: protos.google.cloud.shell.v1.IRemovePublicKeyRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.shell.v1.IRemovePublicKeyResponse, + protos.google.cloud.shell.v1.IRemovePublicKeyMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; removePublicKey( - request: protos.google.cloud.shell.v1.IRemovePublicKeyRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; -/** - * Removes a public SSH key from an environment. Clients will no longer be - * able to connect to the environment using the corresponding private key. - * If a key with the same content is not present, this will error with - * NOT_FOUND. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.environment - * Environment this key should be removed from, e.g. - * `users/me/environments/default`. - * @param {string} request.key - * Key that should be removed from the environment. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.removePublicKey(request); - * const [response] = await operation.promise(); - */ + request: protos.google.cloud.shell.v1.IRemovePublicKeyRequest, + callback: Callback< + LROperation< + protos.google.cloud.shell.v1.IRemovePublicKeyResponse, + protos.google.cloud.shell.v1.IRemovePublicKeyMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Removes a public SSH key from an environment. Clients will no longer be + * able to connect to the environment using the corresponding private key. + * If a key with the same content is not present, this will error with + * NOT_FOUND. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.environment + * Environment this key should be removed from, e.g. + * `users/me/environments/default`. + * @param {string} request.key + * Key that should be removed from the environment. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.removePublicKey(request); + * const [response] = await operation.promise(); + */ removePublicKey( - request: protos.google.cloud.shell.v1.IRemovePublicKeyRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { + request: protos.google.cloud.shell.v1.IRemovePublicKeyRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.shell.v1.IRemovePublicKeyResponse, + protos.google.cloud.shell.v1.IRemovePublicKeyMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.shell.v1.IRemovePublicKeyResponse, + protos.google.cloud.shell.v1.IRemovePublicKeyMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.shell.v1.IRemovePublicKeyResponse, + protos.google.cloud.shell.v1.IRemovePublicKeyMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } - else { + } else { options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - 'environment': request.environment || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + environment: request.environment || '', + }); this.initialize(); return this.innerApiCalls.removePublicKey(request, options, callback); } -/** - * Check the status of the long running operation returned by `removePublicKey()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const decodedOperation = await checkRemovePublicKeyProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); - */ - async checkRemovePublicKeyProgress(name: string): Promise>{ - const request = new operationsProtos.google.longrunning.GetOperationRequest({name}); + /** + * Check the status of the long running operation returned by `removePublicKey()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkRemovePublicKeyProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkRemovePublicKeyProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.shell.v1.RemovePublicKeyResponse, + protos.google.cloud.shell.v1.RemovePublicKeyMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.removePublicKey, gax.createDefaultBackoffSettings()); - return decodeOperation as LROperation; + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.removePublicKey, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.shell.v1.RemovePublicKeyResponse, + protos.google.cloud.shell.v1.RemovePublicKeyMetadata + >; } // -------------------- // -- Path templates -- @@ -831,7 +1059,7 @@ export class CloudShellServiceClient { * @param {string} environment * @returns {string} Resource name string. */ - environmentPath(user:string,environment:string) { + environmentPath(user: string, environment: string) { return this.pathTemplates.environmentPathTemplate.render({ user: user, environment: environment, @@ -846,7 +1074,8 @@ export class CloudShellServiceClient { * @returns {string} A string representing the user. */ matchUserFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).user; + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .user; } /** @@ -857,7 +1086,8 @@ export class CloudShellServiceClient { * @returns {string} A string representing the environment. */ matchEnvironmentFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .environment; } /** diff --git a/packages/google-cloud-shell/v1/system-test/fixtures/sample/src/index.js b/packages/google-cloud-shell/v1/system-test/fixtures/sample/src/index.js index f729610cc47..6656dcae689 100644 --- a/packages/google-cloud-shell/v1/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-shell/v1/system-test/fixtures/sample/src/index.js @@ -16,7 +16,6 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** - /* eslint-disable node/no-missing-require, no-unused-vars */ const shell = require('@google-cloud/shell'); diff --git a/packages/google-cloud-shell/v1/system-test/install.ts b/packages/google-cloud-shell/v1/system-test/install.ts index 1f850b522f3..d2d61c0396f 100644 --- a/packages/google-cloud-shell/v1/system-test/install.ts +++ b/packages/google-cloud-shell/v1/system-test/install.ts @@ -16,34 +16,36 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** -import { packNTest } from 'pack-n-play'; -import { readFileSync } from 'fs'; -import { describe, it } from 'mocha'; +import {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; describe('📦 pack-n-play test', () => { - - it('TypeScript code', async function() { + it('TypeScript code', async function () { this.timeout(300000); const options = { packageDir: process.cwd(), sample: { description: 'TypeScript user can use the type definitions', - ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() - } + ts: readFileSync( + './system-test/fixtures/sample/src/index.ts' + ).toString(), + }, }; await packNTest(options); }); - it('JavaScript code', async function() { + it('JavaScript code', async function () { this.timeout(300000); const options = { packageDir: process.cwd(), sample: { description: 'JavaScript user can use the library', - ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() - } + ts: readFileSync( + './system-test/fixtures/sample/src/index.js' + ).toString(), + }, }; await packNTest(options); }); - }); diff --git a/packages/google-cloud-shell/v1/test/gapic_cloud_shell_service_v1.ts b/packages/google-cloud-shell/v1/test/gapic_cloud_shell_service_v1.ts index 6056ed59810..6920622e1dc 100644 --- a/packages/google-cloud-shell/v1/test/gapic_cloud_shell_service_v1.ts +++ b/packages/google-cloud-shell/v1/test/gapic_cloud_shell_service_v1.ts @@ -20,818 +20,1081 @@ import * as protos from '../protos/protos'; import * as assert from 'assert'; import * as sinon from 'sinon'; import {SinonStub} from 'sinon'; -import { describe, it } from 'mocha'; +import {describe, it} from 'mocha'; import * as cloudshellserviceModule from '../src'; import {protobuf, LROperation, operationsProtos} from 'google-gax'; function generateSampleMessage(instance: T) { - const filledObject = (instance.constructor as typeof protobuf.Message) - .toObject(instance as protobuf.Message, {defaults: true}); - return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; } function stubSimpleCall(response?: ResponseType, error?: Error) { - return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); } -function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { - return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); } -function stubLongRunningCall(response?: ResponseType, callError?: Error, lroError?: Error) { - const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); - const mockOperation = { - promise: innerStub, - }; - return callError ? sinon.stub().rejects(callError) : sinon.stub().resolves([mockOperation]); +function stubLongRunningCall( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().rejects(callError) + : sinon.stub().resolves([mockOperation]); } -function stubLongRunningCallWithCallback(response?: ResponseType, callError?: Error, lroError?: Error) { - const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); - const mockOperation = { - promise: innerStub, - }; - return callError ? sinon.stub().callsArgWith(2, callError) : sinon.stub().callsArgWith(2, null, mockOperation); +function stubLongRunningCallWithCallback( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().callsArgWith(2, callError) + : sinon.stub().callsArgWith(2, null, mockOperation); } describe('v1.CloudShellServiceClient', () => { - it('has servicePath', () => { - const servicePath = cloudshellserviceModule.v1.CloudShellServiceClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = cloudshellserviceModule.v1.CloudShellServiceClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = cloudshellserviceModule.v1.CloudShellServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - assert.strictEqual(client.cloudShellServiceStub, undefined); - await client.initialize(); - assert(client.cloudShellServiceStub); - }); - - it('has close method', () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - client.close(); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error|null, projectId?: string|null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } - }); - }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); - }); - - describe('getEnvironment', () => { - it('invokes getEnvironment without error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.shell.v1.GetEnvironmentRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.cloud.shell.v1.Environment()); - client.innerApiCalls.getEnvironment = stubSimpleCall(expectedResponse); - const [response] = await client.getEnvironment(request); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.getEnvironment as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes getEnvironment without error using callback', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.shell.v1.GetEnvironmentRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.cloud.shell.v1.Environment()); - client.innerApiCalls.getEnvironment = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getEnvironment( - request, - (err?: Error|null, result?: protos.google.cloud.shell.v1.IEnvironment|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.getEnvironment as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); - - it('invokes getEnvironment with error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.shell.v1.GetEnvironmentRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.getEnvironment = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getEnvironment(request), expectedError); - assert((client.innerApiCalls.getEnvironment as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - }); - - describe('startEnvironment', () => { - it('invokes startEnvironment without error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.shell.v1.StartEnvironmentRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.longrunning.Operation()); - client.innerApiCalls.startEnvironment = stubLongRunningCall(expectedResponse); - const [operation] = await client.startEnvironment(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.startEnvironment as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes startEnvironment without error using callback', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.shell.v1.StartEnvironmentRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.longrunning.Operation()); - client.innerApiCalls.startEnvironment = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.startEnvironment( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.startEnvironment as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); - - it('invokes startEnvironment with call error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.shell.v1.StartEnvironmentRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.startEnvironment = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.startEnvironment(request), expectedError); - assert((client.innerApiCalls.startEnvironment as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes startEnvironment with LRO error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.shell.v1.StartEnvironmentRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.startEnvironment = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.startEnvironment(request); - await assert.rejects(operation.promise(), expectedError); - assert((client.innerApiCalls.startEnvironment as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes checkStartEnvironmentProgress without error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage(new operationsProtos.google.longrunning.Operation()); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkStartEnvironmentProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkStartEnvironmentProgress with error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkStartEnvironmentProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('authorizeEnvironment', () => { - it('invokes authorizeEnvironment without error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.shell.v1.AuthorizeEnvironmentRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.longrunning.Operation()); - client.innerApiCalls.authorizeEnvironment = stubLongRunningCall(expectedResponse); - const [operation] = await client.authorizeEnvironment(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.authorizeEnvironment as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes authorizeEnvironment without error using callback', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.shell.v1.AuthorizeEnvironmentRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.longrunning.Operation()); - client.innerApiCalls.authorizeEnvironment = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.authorizeEnvironment( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.authorizeEnvironment as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); - - it('invokes authorizeEnvironment with call error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.shell.v1.AuthorizeEnvironmentRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.authorizeEnvironment = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.authorizeEnvironment(request), expectedError); - assert((client.innerApiCalls.authorizeEnvironment as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes authorizeEnvironment with LRO error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.shell.v1.AuthorizeEnvironmentRequest()); - request.name = ''; - const expectedHeaderRequestParams = "name="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.authorizeEnvironment = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.authorizeEnvironment(request); - await assert.rejects(operation.promise(), expectedError); - assert((client.innerApiCalls.authorizeEnvironment as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes checkAuthorizeEnvironmentProgress without error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage(new operationsProtos.google.longrunning.Operation()); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkAuthorizeEnvironmentProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkAuthorizeEnvironmentProgress with error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkAuthorizeEnvironmentProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('addPublicKey', () => { - it('invokes addPublicKey without error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.shell.v1.AddPublicKeyRequest()); - request.environment = ''; - const expectedHeaderRequestParams = "environment="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.longrunning.Operation()); - client.innerApiCalls.addPublicKey = stubLongRunningCall(expectedResponse); - const [operation] = await client.addPublicKey(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.addPublicKey as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes addPublicKey without error using callback', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.shell.v1.AddPublicKeyRequest()); - request.environment = ''; - const expectedHeaderRequestParams = "environment="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.longrunning.Operation()); - client.innerApiCalls.addPublicKey = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.addPublicKey( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.addPublicKey as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); - - it('invokes addPublicKey with call error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.shell.v1.AddPublicKeyRequest()); - request.environment = ''; - const expectedHeaderRequestParams = "environment="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.addPublicKey = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.addPublicKey(request), expectedError); - assert((client.innerApiCalls.addPublicKey as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes addPublicKey with LRO error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.shell.v1.AddPublicKeyRequest()); - request.environment = ''; - const expectedHeaderRequestParams = "environment="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.addPublicKey = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.addPublicKey(request); - await assert.rejects(operation.promise(), expectedError); - assert((client.innerApiCalls.addPublicKey as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes checkAddPublicKeyProgress without error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage(new operationsProtos.google.longrunning.Operation()); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkAddPublicKeyProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkAddPublicKeyProgress with error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkAddPublicKeyProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('removePublicKey', () => { - it('invokes removePublicKey without error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.shell.v1.RemovePublicKeyRequest()); - request.environment = ''; - const expectedHeaderRequestParams = "environment="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.longrunning.Operation()); - client.innerApiCalls.removePublicKey = stubLongRunningCall(expectedResponse); - const [operation] = await client.removePublicKey(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.removePublicKey as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes removePublicKey without error using callback', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.shell.v1.RemovePublicKeyRequest()); - request.environment = ''; - const expectedHeaderRequestParams = "environment="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage(new protos.google.longrunning.Operation()); - client.innerApiCalls.removePublicKey = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.removePublicKey( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - assert((client.innerApiCalls.removePublicKey as SinonStub) - .getCall(0).calledWith(request, expectedOptions /*, callback defined above */)); - }); - - it('invokes removePublicKey with call error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.shell.v1.RemovePublicKeyRequest()); - request.environment = ''; - const expectedHeaderRequestParams = "environment="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.removePublicKey = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.removePublicKey(request), expectedError); - assert((client.innerApiCalls.removePublicKey as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes removePublicKey with LRO error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage(new protos.google.cloud.shell.v1.RemovePublicKeyRequest()); - request.environment = ''; - const expectedHeaderRequestParams = "environment="; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.removePublicKey = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.removePublicKey(request); - await assert.rejects(operation.promise(), expectedError); - assert((client.innerApiCalls.removePublicKey as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - - it('invokes checkRemovePublicKeyProgress without error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage(new operationsProtos.google.longrunning.Operation()); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkRemovePublicKeyProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkRemovePublicKeyProgress with error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkRemovePublicKeyProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('Path templates', () => { - - describe('environment', () => { - const fakePath = "/rendered/path/environment"; - const expectedParameters = { - user: "userValue", - environment: "environmentValue", - }; - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.environmentPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.environmentPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('environmentPath', () => { - const result = client.environmentPath("userValue", "environmentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.environmentPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchUserFromEnvironmentName', () => { - const result = client.matchUserFromEnvironmentName(fakePath); - assert.strictEqual(result, "userValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEnvironmentFromEnvironmentName', () => { - const result = client.matchEnvironmentFromEnvironmentName(fakePath); - assert.strictEqual(result, "environmentValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); + it('has servicePath', () => { + const servicePath = + cloudshellserviceModule.v1.CloudShellServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + cloudshellserviceModule.v1.CloudShellServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = cloudshellserviceModule.v1.CloudShellServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.cloudShellServiceStub, undefined); + await client.initialize(); + assert(client.cloudShellServiceStub); + }); + + it('has close method', () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + + describe('getEnvironment', () => { + it('invokes getEnvironment without error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.shell.v1.GetEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.shell.v1.Environment() + ); + client.innerApiCalls.getEnvironment = stubSimpleCall(expectedResponse); + const [response] = await client.getEnvironment(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getEnvironment without error using callback', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.shell.v1.GetEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.shell.v1.Environment() + ); + client.innerApiCalls.getEnvironment = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getEnvironment( + request, + ( + err?: Error | null, + result?: protos.google.cloud.shell.v1.IEnvironment | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getEnvironment with error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.shell.v1.GetEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getEnvironment = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getEnvironment(request), expectedError); + assert( + (client.innerApiCalls.getEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('startEnvironment', () => { + it('invokes startEnvironment without error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.shell.v1.StartEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.startEnvironment = + stubLongRunningCall(expectedResponse); + const [operation] = await client.startEnvironment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.startEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes startEnvironment without error using callback', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.shell.v1.StartEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.startEnvironment = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.startEnvironment( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.shell.v1.IStartEnvironmentResponse, + protos.google.cloud.shell.v1.IStartEnvironmentMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.shell.v1.IStartEnvironmentResponse, + protos.google.cloud.shell.v1.IStartEnvironmentMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.startEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes startEnvironment with call error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.shell.v1.StartEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.startEnvironment = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.startEnvironment(request), expectedError); + assert( + (client.innerApiCalls.startEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes startEnvironment with LRO error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.shell.v1.StartEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.startEnvironment = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.startEnvironment(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.startEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkStartEnvironmentProgress without error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkStartEnvironmentProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkStartEnvironmentProgress with error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkStartEnvironmentProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('authorizeEnvironment', () => { + it('invokes authorizeEnvironment without error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.shell.v1.AuthorizeEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.authorizeEnvironment = + stubLongRunningCall(expectedResponse); + const [operation] = await client.authorizeEnvironment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.authorizeEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes authorizeEnvironment without error using callback', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.shell.v1.AuthorizeEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.authorizeEnvironment = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.authorizeEnvironment( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.shell.v1.IAuthorizeEnvironmentResponse, + protos.google.cloud.shell.v1.IAuthorizeEnvironmentMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.shell.v1.IAuthorizeEnvironmentResponse, + protos.google.cloud.shell.v1.IAuthorizeEnvironmentMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.authorizeEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes authorizeEnvironment with call error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.shell.v1.AuthorizeEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.authorizeEnvironment = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.authorizeEnvironment(request), expectedError); + assert( + (client.innerApiCalls.authorizeEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes authorizeEnvironment with LRO error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.shell.v1.AuthorizeEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.authorizeEnvironment = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.authorizeEnvironment(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.authorizeEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkAuthorizeEnvironmentProgress without error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkAuthorizeEnvironmentProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkAuthorizeEnvironmentProgress with error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkAuthorizeEnvironmentProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('addPublicKey', () => { + it('invokes addPublicKey without error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.shell.v1.AddPublicKeyRequest() + ); + request.environment = ''; + const expectedHeaderRequestParams = 'environment='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.addPublicKey = stubLongRunningCall(expectedResponse); + const [operation] = await client.addPublicKey(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.addPublicKey as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes addPublicKey without error using callback', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.shell.v1.AddPublicKeyRequest() + ); + request.environment = ''; + const expectedHeaderRequestParams = 'environment='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.addPublicKey = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.addPublicKey( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.shell.v1.IAddPublicKeyResponse, + protos.google.cloud.shell.v1.IAddPublicKeyMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.shell.v1.IAddPublicKeyResponse, + protos.google.cloud.shell.v1.IAddPublicKeyMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.addPublicKey as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes addPublicKey with call error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.shell.v1.AddPublicKeyRequest() + ); + request.environment = ''; + const expectedHeaderRequestParams = 'environment='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.addPublicKey = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.addPublicKey(request), expectedError); + assert( + (client.innerApiCalls.addPublicKey as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes addPublicKey with LRO error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.shell.v1.AddPublicKeyRequest() + ); + request.environment = ''; + const expectedHeaderRequestParams = 'environment='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.addPublicKey = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.addPublicKey(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.addPublicKey as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkAddPublicKeyProgress without error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkAddPublicKeyProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkAddPublicKeyProgress with error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.checkAddPublicKeyProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('removePublicKey', () => { + it('invokes removePublicKey without error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.shell.v1.RemovePublicKeyRequest() + ); + request.environment = ''; + const expectedHeaderRequestParams = 'environment='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.removePublicKey = + stubLongRunningCall(expectedResponse); + const [operation] = await client.removePublicKey(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.removePublicKey as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes removePublicKey without error using callback', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.shell.v1.RemovePublicKeyRequest() + ); + request.environment = ''; + const expectedHeaderRequestParams = 'environment='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.removePublicKey = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.removePublicKey( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.shell.v1.IRemovePublicKeyResponse, + protos.google.cloud.shell.v1.IRemovePublicKeyMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.shell.v1.IRemovePublicKeyResponse, + protos.google.cloud.shell.v1.IRemovePublicKeyMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.removePublicKey as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes removePublicKey with call error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.shell.v1.RemovePublicKeyRequest() + ); + request.environment = ''; + const expectedHeaderRequestParams = 'environment='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.removePublicKey = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.removePublicKey(request), expectedError); + assert( + (client.innerApiCalls.removePublicKey as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes removePublicKey with LRO error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.shell.v1.RemovePublicKeyRequest() + ); + request.environment = ''; + const expectedHeaderRequestParams = 'environment='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.removePublicKey = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.removePublicKey(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.removePublicKey as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkRemovePublicKeyProgress without error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkRemovePublicKeyProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkRemovePublicKeyProgress with error', async () => { + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkRemovePublicKeyProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('Path templates', () => { + describe('environment', () => { + const fakePath = '/rendered/path/environment'; + const expectedParameters = { + user: 'userValue', + environment: 'environmentValue', + }; + const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.environmentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.environmentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('environmentPath', () => { + const result = client.environmentPath('userValue', 'environmentValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.environmentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchUserFromEnvironmentName', () => { + const result = client.matchUserFromEnvironmentName(fakePath); + assert.strictEqual(result, 'userValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromEnvironmentName', () => { + const result = client.matchEnvironmentFromEnvironmentName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); }); + }); }); diff --git a/packages/google-cloud-shell/v1/webpack.config.js b/packages/google-cloud-shell/v1/webpack.config.js index b7f826274bb..5d621ccf0aa 100644 --- a/packages/google-cloud-shell/v1/webpack.config.js +++ b/packages/google-cloud-shell/v1/webpack.config.js @@ -36,27 +36,27 @@ module.exports = { { test: /\.tsx?$/, use: 'ts-loader', - exclude: /node_modules/ + exclude: /node_modules/, }, { test: /node_modules[\\/]@grpc[\\/]grpc-js/, - use: 'null-loader' + use: 'null-loader', }, { test: /node_modules[\\/]grpc/, - use: 'null-loader' + use: 'null-loader', }, { test: /node_modules[\\/]retry-request/, - use: 'null-loader' + use: 'null-loader', }, { test: /node_modules[\\/]https?-proxy-agent/, - use: 'null-loader' + use: 'null-loader', }, { test: /node_modules[\\/]gtoken/, - use: 'null-loader' + use: 'null-loader', }, ], }, diff --git a/packages/google-cloud-shell/webpack.config.js b/packages/google-cloud-shell/webpack.config.js index b7f826274bb..5d621ccf0aa 100644 --- a/packages/google-cloud-shell/webpack.config.js +++ b/packages/google-cloud-shell/webpack.config.js @@ -36,27 +36,27 @@ module.exports = { { test: /\.tsx?$/, use: 'ts-loader', - exclude: /node_modules/ + exclude: /node_modules/, }, { test: /node_modules[\\/]@grpc[\\/]grpc-js/, - use: 'null-loader' + use: 'null-loader', }, { test: /node_modules[\\/]grpc/, - use: 'null-loader' + use: 'null-loader', }, { test: /node_modules[\\/]retry-request/, - use: 'null-loader' + use: 'null-loader', }, { test: /node_modules[\\/]https?-proxy-agent/, - use: 'null-loader' + use: 'null-loader', }, { test: /node_modules[\\/]gtoken/, - use: 'null-loader' + use: 'null-loader', }, ], }, From 58c5edcdf267f95402f5fea743b38ae4fa09f8cd Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Tue, 1 Jun 2021 23:23:30 +0000 Subject: [PATCH 025/254] fix: remove additional v1 folder --- packages/google-cloud-shell/v1/README.md | 1 - .../v1/linkinator.config.json | 10 - packages/google-cloud-shell/v1/package.json | 64 - .../google/cloud/shell/v1/cloudshell.proto | 388 ------ packages/google-cloud-shell/v1/src/index.ts | 25 - .../v1/src/v1/cloud_shell_service_client.ts | 1109 ----------------- .../v1/cloud_shell_service_client_config.json | 64 - .../v1/cloud_shell_service_proto_list.json | 3 - .../v1/src/v1/gapic_metadata.json | 73 -- .../google-cloud-shell/v1/src/v1/index.ts | 19 - .../system-test/fixtures/sample/src/index.js | 26 - .../system-test/fixtures/sample/src/index.ts | 32 - .../v1/system-test/install.ts | 51 - .../v1/test/gapic_cloud_shell_service_v1.ts | 1100 ---------------- packages/google-cloud-shell/v1/tsconfig.json | 19 - .../google-cloud-shell/v1/webpack.config.js | 64 - 16 files changed, 3048 deletions(-) delete mode 100644 packages/google-cloud-shell/v1/README.md delete mode 100644 packages/google-cloud-shell/v1/linkinator.config.json delete mode 100644 packages/google-cloud-shell/v1/package.json delete mode 100644 packages/google-cloud-shell/v1/protos/google/cloud/shell/v1/cloudshell.proto delete mode 100644 packages/google-cloud-shell/v1/src/index.ts delete mode 100644 packages/google-cloud-shell/v1/src/v1/cloud_shell_service_client.ts delete mode 100644 packages/google-cloud-shell/v1/src/v1/cloud_shell_service_client_config.json delete mode 100644 packages/google-cloud-shell/v1/src/v1/cloud_shell_service_proto_list.json delete mode 100644 packages/google-cloud-shell/v1/src/v1/gapic_metadata.json delete mode 100644 packages/google-cloud-shell/v1/src/v1/index.ts delete mode 100644 packages/google-cloud-shell/v1/system-test/fixtures/sample/src/index.js delete mode 100644 packages/google-cloud-shell/v1/system-test/fixtures/sample/src/index.ts delete mode 100644 packages/google-cloud-shell/v1/system-test/install.ts delete mode 100644 packages/google-cloud-shell/v1/test/gapic_cloud_shell_service_v1.ts delete mode 100644 packages/google-cloud-shell/v1/tsconfig.json delete mode 100644 packages/google-cloud-shell/v1/webpack.config.js diff --git a/packages/google-cloud-shell/v1/README.md b/packages/google-cloud-shell/v1/README.md deleted file mode 100644 index f84e2c9f969..00000000000 --- a/packages/google-cloud-shell/v1/README.md +++ /dev/null @@ -1 +0,0 @@ -Shell: Nodejs Client diff --git a/packages/google-cloud-shell/v1/linkinator.config.json b/packages/google-cloud-shell/v1/linkinator.config.json deleted file mode 100644 index 29a223b6db6..00000000000 --- a/packages/google-cloud-shell/v1/linkinator.config.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "recurse": true, - "skip": [ - "https://codecov.io/gh/googleapis/", - "www.googleapis.com", - "img.shields.io" - ], - "silent": true, - "concurrency": 10 -} diff --git a/packages/google-cloud-shell/v1/package.json b/packages/google-cloud-shell/v1/package.json deleted file mode 100644 index 854f47a2ca4..00000000000 --- a/packages/google-cloud-shell/v1/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "@google-cloud/shell", - "version": "0.1.0", - "description": "Shell client for Node.js", - "repository": "googleapis/nodejs-shell", - "license": "Apache-2.0", - "author": "Google LLC", - "main": "build/src/index.js", - "files": [ - "build/src", - "build/protos" - ], - "keywords": [ - "google apis client", - "google api client", - "google apis", - "google api", - "google", - "google cloud platform", - "google cloud", - "cloud", - "google shell", - "shell", - "cloud shell service" - ], - "scripts": { - "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/", - "compile-protos": "compileProtos src", - "docs": "jsdoc -c .jsdoc.js", - "predocs-test": "npm run docs", - "docs-test": "linkinator docs", - "fix": "gts fix", - "lint": "gts check", - "prepare": "npm run compile-protos && npm run compile", - "system-test": "c8 mocha build/system-test", - "test": "c8 mocha build/test" - }, - "dependencies": { - "google-gax": "^2.14.0" - }, - "devDependencies": { - "@types/mocha": "^8.2.2", - "@types/node": "^14.17.1", - "@types/sinon": "^10.0.0", - "c8": "^7.7.2", - "gts": "^3.1.0", - "jsdoc": "^3.6.7", - "jsdoc-fresh": "^1.0.2", - "jsdoc-region-tag": "^1.0.6", - "linkinator": "^2.13.6", - "mocha": "^8.4.0", - "null-loader": "^4.0.1", - "pack-n-play": "^1.0.0-2", - "sinon": "^10.0.0", - "ts-loader": "^9.2.2", - "typescript": "^4.2.4", - "webpack": "^5.37.1", - "webpack-cli": "^4.7.0" - }, - "engines": { - "node": ">=v10.24.0" - } -} diff --git a/packages/google-cloud-shell/v1/protos/google/cloud/shell/v1/cloudshell.proto b/packages/google-cloud-shell/v1/protos/google/cloud/shell/v1/cloudshell.proto deleted file mode 100644 index f4b35b171cd..00000000000 --- a/packages/google-cloud-shell/v1/protos/google/cloud/shell/v1/cloudshell.proto +++ /dev/null @@ -1,388 +0,0 @@ -// Copyright 2021 Google LLC -// -// 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. - -syntax = "proto3"; - -package google.cloud.shell.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/shell/v1;shell"; -option java_multiple_files = true; -option java_outer_classname = "CloudShellProto"; -option java_package = "com.google.cloud.shell.v1"; - -// API for interacting with Google Cloud Shell. Each user of Cloud Shell has at -// least one environment, which has the ID "default". Environment consists of a -// Docker image defining what is installed on the environment and a home -// directory containing the user's data that will remain across sessions. -// Clients use this API to start and fetch information about their environment, -// which can then be used to connect to that environment via a separate SSH -// client. -service CloudShellService { - option (google.api.default_host) = "cloudshell.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // Gets an environment. Returns NOT_FOUND if the environment does not exist. - rpc GetEnvironment(GetEnvironmentRequest) returns (Environment) { - option (google.api.http) = { - get: "/v1/{name=users/*/environments/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Starts an existing environment, allowing clients to connect to it. The - // returned operation will contain an instance of StartEnvironmentMetadata in - // its metadata field. Users can wait for the environment to start by polling - // this operation via GetOperation. Once the environment has finished starting - // and is ready to accept connections, the operation will contain a - // StartEnvironmentResponse in its response field. - rpc StartEnvironment(StartEnvironmentRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{name=users/*/environments/*}:start" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "StartEnvironmentResponse" - metadata_type: "StartEnvironmentMetadata" - }; - } - - // Sends OAuth credentials to a running environment on behalf of a user. When - // this completes, the environment will be authorized to run various Google - // Cloud command line tools without requiring the user to manually - // authenticate. - rpc AuthorizeEnvironment(AuthorizeEnvironmentRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{name=users/*/environments/*}:authorize" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "AuthorizeEnvironmentResponse" - metadata_type: "AuthorizeEnvironmentMetadata" - }; - } - - // Adds a public SSH key to an environment, allowing clients with the - // corresponding private key to connect to that environment via SSH. If a key - // with the same content already exists, this will error with ALREADY_EXISTS. - rpc AddPublicKey(AddPublicKeyRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{environment=users/*/environments/*}:addPublicKey" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "AddPublicKeyResponse" - metadata_type: "AddPublicKeyMetadata" - }; - } - - // Removes a public SSH key from an environment. Clients will no longer be - // able to connect to the environment using the corresponding private key. - // If a key with the same content is not present, this will error with - // NOT_FOUND. - rpc RemovePublicKey(RemovePublicKeyRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{environment=users/*/environments/*}:removePublicKey" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "RemovePublicKeyResponse" - metadata_type: "RemovePublicKeyMetadata" - }; - } -} - -// A Cloud Shell environment, which is defined as the combination of a Docker -// image specifying what is installed on the environment and a home directory -// containing the user's data that will remain across sessions. Each user has -// at least an environment with the ID "default". -message Environment { - option (google.api.resource) = { - type: "cloudshell.googleapis.com/Environment" - pattern: "users/{user}/environments/{environment}" - }; - - // Possible execution states for an environment. - enum State { - // The environment's states is unknown. - STATE_UNSPECIFIED = 0; - - // The environment is not running and can't be connected to. Starting the - // environment will transition it to the PENDING state. - SUSPENDED = 1; - - // The environment is being started but is not yet ready to accept - // connections. - PENDING = 2; - - // The environment is running and ready to accept connections. It will - // automatically transition back to DISABLED after a period of inactivity or - // if another environment is started. - RUNNING = 3; - - // The environment is being deleted and can't be connected to. - DELETING = 4; - } - - // Immutable. Full name of this resource, in the format - // `users/{owner_email}/environments/{environment_id}`. `{owner_email}` is the - // email address of the user to whom this environment belongs, and - // `{environment_id}` is the identifier of this environment. For example, - // `users/someone@example.com/environments/default`. - string name = 1 [(google.api.field_behavior) = IMMUTABLE]; - - // Output only. The environment's identifier, unique among the user's - // environments. - string id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. Immutable. Full path to the Docker image used to run this environment, e.g. - // "gcr.io/dev-con/cloud-devshell:latest". - string docker_image = 3 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = IMMUTABLE - ]; - - // Output only. Current execution state of this environment. - State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Host to which clients can connect to initiate HTTPS or WSS - // connections with the environment. - string web_host = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Username that clients should use when initiating SSH sessions - // with the environment. - string ssh_username = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Host to which clients can connect to initiate SSH sessions - // with the environment. - string ssh_host = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Port to which clients can connect to initiate SSH sessions - // with the environment. - int32 ssh_port = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Public keys associated with the environment. Clients can - // connect to this environment via SSH only if they possess a private key - // corresponding to at least one of these public keys. Keys can be added to or - // removed from the environment using the AddPublicKey and RemovePublicKey - // methods. - repeated string public_keys = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Request message for -// [GetEnvironment][google.cloud.shell.v1.CloudShellService.GetEnvironment]. -message GetEnvironmentRequest { - // Required. Name of the requested resource, for example `users/me/environments/default` - // or `users/someone@example.com/environments/default`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudshell.googleapis.com/Environment" - } - ]; -} - -// Message included in the metadata field of operations returned from -// [CreateEnvironment][google.cloud.shell.v1.CloudShellService.CreateEnvironment]. -message CreateEnvironmentMetadata { - -} - -// Message included in the metadata field of operations returned from -// [DeleteEnvironment][google.cloud.shell.v1.CloudShellService.DeleteEnvironment]. -message DeleteEnvironmentMetadata { - -} - -// Request message for -// [StartEnvironment][google.cloud.shell.v1.CloudShellService.StartEnvironment]. -message StartEnvironmentRequest { - // Name of the resource that should be started, for example - // `users/me/environments/default` or - // `users/someone@example.com/environments/default`. - string name = 1; - - // The initial access token passed to the environment. If this is present and - // valid, the environment will be pre-authenticated with gcloud so that the - // user can run gcloud commands in Cloud Shell without having to log in. This - // code can be updated later by calling AuthorizeEnvironment. - string access_token = 2; - - // Public keys that should be added to the environment before it is started. - repeated string public_keys = 3; -} - -// Request message for -// [AuthorizeEnvironment][google.cloud.shell.v1.CloudShellService.AuthorizeEnvironment]. -message AuthorizeEnvironmentRequest { - // Name of the resource that should receive the credentials, for example - // `users/me/environments/default` or - // `users/someone@example.com/environments/default`. - string name = 1; - - // The OAuth access token that should be sent to the environment. - string access_token = 2; - - // The OAuth ID token that should be sent to the environment. - string id_token = 4; - - // The time when the credentials expire. If not set, defaults to one hour from - // when the server received the request. - google.protobuf.Timestamp expire_time = 3; -} - -// Response message for -// [AuthorizeEnvironment][google.cloud.shell.v1.CloudShellService.AuthorizeEnvironment]. -message AuthorizeEnvironmentResponse { - -} - -// Message included in the metadata field of operations returned from -// [AuthorizeEnvironment][google.cloud.shell.v1.CloudShellService.AuthorizeEnvironment]. -message AuthorizeEnvironmentMetadata { - -} - -// Message included in the metadata field of operations returned from -// [StartEnvironment][google.cloud.shell.v1.CloudShellService.StartEnvironment]. -message StartEnvironmentMetadata { - // Possible states an environment might transition between during startup. - // These states are not normally actionable by clients, but may be used to - // show a progress message to the user. An environment won't necessarily go - // through all of these states when starting. More states are likely to be - // added in the future. - enum State { - // The environment's start state is unknown. - STATE_UNSPECIFIED = 0; - - // The environment is in the process of being started, but no additional - // details are available. - STARTING = 1; - - // Startup is waiting for the user's disk to be unarchived. This can happen - // when the user returns to Cloud Shell after not having used it for a - // while, and suggests that startup will take longer than normal. - UNARCHIVING_DISK = 2; - - // Startup is waiting for compute resources to be assigned to the - // environment. This should normally happen very quickly, but an environment - // might stay in this state for an extended period of time if the system is - // experiencing heavy load. - AWAITING_COMPUTE_RESOURCES = 4; - - // Startup has completed. If the start operation was successful, the user - // should be able to establish an SSH connection to their environment. - // Otherwise, the operation will contain details of the failure. - FINISHED = 3; - } - - // Current state of the environment being started. - State state = 1; -} - -// Message included in the response field of operations returned from -// [StartEnvironment][google.cloud.shell.v1.CloudShellService.StartEnvironment] -// once the operation is complete. -message StartEnvironmentResponse { - // Environment that was started. - Environment environment = 1; -} - -// Request message for -// [AddPublicKey][google.cloud.shell.v1.CloudShellService.AddPublicKey]. -message AddPublicKeyRequest { - // Environment this key should be added to, e.g. - // `users/me/environments/default`. - string environment = 1; - - // Key that should be added to the environment. Supported formats are - // `ssh-dss` (see RFC4253), `ssh-rsa` (see RFC4253), `ecdsa-sha2-nistp256` - // (see RFC5656), `ecdsa-sha2-nistp384` (see RFC5656) and - // `ecdsa-sha2-nistp521` (see RFC5656). It should be structured as - // <format> <content>, where <content> part is encoded with - // Base64. - string key = 2; -} - -// Response message for -// [AddPublicKey][google.cloud.shell.v1.CloudShellService.AddPublicKey]. -message AddPublicKeyResponse { - // Key that was added to the environment. - string key = 1; -} - -// Message included in the metadata field of operations returned from -// [AddPublicKey][google.cloud.shell.v1.CloudShellService.AddPublicKey]. -message AddPublicKeyMetadata { - -} - -// Request message for -// [RemovePublicKey][google.cloud.shell.v1.CloudShellService.RemovePublicKey]. -message RemovePublicKeyRequest { - // Environment this key should be removed from, e.g. - // `users/me/environments/default`. - string environment = 1; - - // Key that should be removed from the environment. - string key = 2; -} - -// Response message for -// [RemovePublicKey][google.cloud.shell.v1.CloudShellService.RemovePublicKey]. -message RemovePublicKeyResponse { - -} - -// Message included in the metadata field of operations returned from -// [RemovePublicKey][google.cloud.shell.v1.CloudShellService.RemovePublicKey]. -message RemovePublicKeyMetadata { - -} - -// Cloud-shell specific information that will be included as details in failure -// responses. -message CloudShellErrorDetails { - // Set of possible errors returned from API calls. - enum CloudShellErrorCode { - // An unknown error occurred. - CLOUD_SHELL_ERROR_CODE_UNSPECIFIED = 0; - - // The image used by the Cloud Shell environment either does not exist or - // the user does not have access to it. - IMAGE_UNAVAILABLE = 1; - - // Cloud Shell has been disabled by an administrator for the user making the - // request. - CLOUD_SHELL_DISABLED = 2; - - // Cloud Shell has been permanently disabled due to a Terms of Service - // violation by the user. - TOS_VIOLATION = 4; - - // The user has exhausted their weekly Cloud Shell quota, and Cloud Shell - // will be disabled until the quota resets. - QUOTA_EXCEEDED = 5; - } - - // Code indicating the specific error the occurred. - CloudShellErrorCode code = 1; -} diff --git a/packages/google-cloud-shell/v1/src/index.ts b/packages/google-cloud-shell/v1/src/index.ts deleted file mode 100644 index 222633d3f25..00000000000 --- a/packages/google-cloud-shell/v1/src/index.ts +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2021 Google LLC -// -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import * as v1 from './v1'; -const CloudShellServiceClient = v1.CloudShellServiceClient; -type CloudShellServiceClient = v1.CloudShellServiceClient; -export {v1, CloudShellServiceClient}; -export default {v1, CloudShellServiceClient}; -import * as protos from '../protos/protos'; -export {protos}; diff --git a/packages/google-cloud-shell/v1/src/v1/cloud_shell_service_client.ts b/packages/google-cloud-shell/v1/src/v1/cloud_shell_service_client.ts deleted file mode 100644 index 74d4a4b80ab..00000000000 --- a/packages/google-cloud-shell/v1/src/v1/cloud_shell_service_client.ts +++ /dev/null @@ -1,1109 +0,0 @@ -// Copyright 2021 Google LLC -// -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -/* global window */ -import * as gax from 'google-gax'; -import { - Callback, - CallOptions, - Descriptors, - ClientOptions, - LROperation, -} from 'google-gax'; - -import * as protos from '../../protos/protos'; -import jsonProtos = require('../../protos/protos.json'); -/** - * Client JSON configuration object, loaded from - * `src/v1/cloud_shell_service_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './cloud_shell_service_client_config.json'; -import {operationsProtos} from 'google-gax'; -const version = require('../../../package.json').version; - -/** - * API for interacting with Google Cloud Shell. Each user of Cloud Shell has at - * least one environment, which has the ID "default". Environment consists of a - * Docker image defining what is installed on the environment and a home - * directory containing the user's data that will remain across sessions. - * Clients use this API to start and fetch information about their environment, - * which can then be used to connect to that environment via a separate SSH - * client. - * @class - * @memberof v1 - */ -export class CloudShellServiceClient { - private _terminated = false; - private _opts: ClientOptions; - private _gaxModule: typeof gax | typeof gax.fallback; - private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; - private _protos: {}; - private _defaults: {[method: string]: gax.CallSettings}; - auth: gax.GoogleAuth; - descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - innerApiCalls: {[name: string]: Function}; - pathTemplates: {[name: string]: gax.PathTemplate}; - operationsClient: gax.OperationsClient; - cloudShellServiceStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of CloudShellServiceClient. - * - * @param {object} [options] - The configuration object. - * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). - * The common options are: - * @param {object} [options.credentials] - Credentials object. - * @param {string} [options.credentials.client_email] - * @param {string} [options.credentials.private_key] - * @param {string} [options.email] - Account email address. Required when - * using a .pem or .p12 keyFilename. - * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or - * .p12 key downloaded from the Google Developers Console. If you provide - * a path to a JSON file, the projectId option below is not necessary. - * NOTE: .pem and .p12 require you to specify options.email as well. - * @param {number} [options.port] - The port on which to connect to - * the remote host. - * @param {string} [options.projectId] - The project ID from the Google - * Developer's Console, e.g. 'grape-spaceship-123'. We will also check - * the environment variable GCLOUD_PROJECT for your project ID. If your - * app is running in an environment which supports - * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, - * your project ID will be detected automatically. - * @param {string} [options.apiEndpoint] - The domain name of the - * API remote host. - * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. - * Follows the structure of {@link gapicConfig}. - * @param {boolean} [options.fallback] - Use HTTP fallback mode. - * In fallback mode, a special browser-compatible transport implementation is used - * instead of gRPC transport. In browser context (if the `window` object is defined) - * the fallback mode is enabled automatically; set `options.fallback` to `false` - * if you need to override this behavior. - */ - constructor(opts?: ClientOptions) { - // Ensure that options include all the required fields. - const staticMembers = this.constructor as typeof CloudShellServiceClient; - const servicePath = - opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; - const port = opts?.port || staticMembers.port; - const clientConfig = opts?.clientConfig ?? {}; - const fallback = - opts?.fallback ?? - (typeof window !== 'undefined' && typeof window?.fetch === 'function'); - opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { - opts['scopes'] = staticMembers.scopes; - } - - // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gax.fallback : gax; - - // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. - this._gaxGrpc = new this._gaxModule.GrpcClient(opts); - - // Save options to use in initialize() method. - this._opts = opts; - - // Save the auth object to the client, for use by other methods. - this.auth = this._gaxGrpc.auth as gax.GoogleAuth; - - // Set the default scopes in auth client if needed. - if (servicePath === staticMembers.servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - - // Determine the client header string. - const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; - if (typeof process !== 'undefined' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } else { - clientHeader.push(`gl-web/${this._gaxModule.version}`); - } - if (!opts.fallback) { - clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest') { - clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); - } - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - // Load the applicable protos. - this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); - - // This API contains "path templates"; forward-slash-separated - // identifiers to uniquely identify resources within the API. - // Create useful helper objects for these. - this.pathTemplates = { - environmentPathTemplate: new this._gaxModule.PathTemplate( - 'users/{user}/environments/{environment}' - ), - }; - - const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); - - // This API contains "long-running operations", which return a - // an Operation object that allows for tracking of the operation, - // rather than holding a request open. - - this.operationsClient = this._gaxModule - .lro({ - auth: this.auth, - grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, - }) - .operationsClient(opts); - const startEnvironmentResponse = protoFilesRoot.lookup( - '.google.cloud.shell.v1.StartEnvironmentResponse' - ) as gax.protobuf.Type; - const startEnvironmentMetadata = protoFilesRoot.lookup( - '.google.cloud.shell.v1.StartEnvironmentMetadata' - ) as gax.protobuf.Type; - const authorizeEnvironmentResponse = protoFilesRoot.lookup( - '.google.cloud.shell.v1.AuthorizeEnvironmentResponse' - ) as gax.protobuf.Type; - const authorizeEnvironmentMetadata = protoFilesRoot.lookup( - '.google.cloud.shell.v1.AuthorizeEnvironmentMetadata' - ) as gax.protobuf.Type; - const addPublicKeyResponse = protoFilesRoot.lookup( - '.google.cloud.shell.v1.AddPublicKeyResponse' - ) as gax.protobuf.Type; - const addPublicKeyMetadata = protoFilesRoot.lookup( - '.google.cloud.shell.v1.AddPublicKeyMetadata' - ) as gax.protobuf.Type; - const removePublicKeyResponse = protoFilesRoot.lookup( - '.google.cloud.shell.v1.RemovePublicKeyResponse' - ) as gax.protobuf.Type; - const removePublicKeyMetadata = protoFilesRoot.lookup( - '.google.cloud.shell.v1.RemovePublicKeyMetadata' - ) as gax.protobuf.Type; - - this.descriptors.longrunning = { - startEnvironment: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - startEnvironmentResponse.decode.bind(startEnvironmentResponse), - startEnvironmentMetadata.decode.bind(startEnvironmentMetadata) - ), - authorizeEnvironment: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - authorizeEnvironmentResponse.decode.bind(authorizeEnvironmentResponse), - authorizeEnvironmentMetadata.decode.bind(authorizeEnvironmentMetadata) - ), - addPublicKey: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - addPublicKeyResponse.decode.bind(addPublicKeyResponse), - addPublicKeyMetadata.decode.bind(addPublicKeyMetadata) - ), - removePublicKey: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - removePublicKeyResponse.decode.bind(removePublicKeyResponse), - removePublicKeyMetadata.decode.bind(removePublicKeyMetadata) - ), - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.shell.v1.CloudShellService', - gapicConfig as gax.ClientConfig, - opts.clientConfig || {}, - {'x-goog-api-client': clientHeader.join(' ')} - ); - - // Set up a dictionary of "inner API calls"; the core implementation - // of calling the API is handled in `google-gax`, with this code - // merely providing the destination and request information. - this.innerApiCalls = {}; - } - - /** - * Initialize the client. - * Performs asynchronous operations (such as authentication) and prepares the client. - * This function will be called automatically when any class method is called for the - * first time, but if you need to initialize it before calling an actual method, - * feel free to call initialize() directly. - * - * You can await on this method if you want to make sure the client is initialized. - * - * @returns {Promise} A promise that resolves to an authenticated service stub. - */ - initialize() { - // If the client stub promise is already initialized, return immediately. - if (this.cloudShellServiceStub) { - return this.cloudShellServiceStub; - } - - // Put together the "service stub" for - // google.cloud.shell.v1.CloudShellService. - this.cloudShellServiceStub = this._gaxGrpc.createStub( - this._opts.fallback - ? (this._protos as protobuf.Root).lookupService( - 'google.cloud.shell.v1.CloudShellService' - ) - : // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.shell.v1.CloudShellService, - this._opts - ) as Promise<{[method: string]: Function}>; - - // Iterate over each of the methods that the service provides - // and create an API call method for each. - const cloudShellServiceStubMethods = [ - 'getEnvironment', - 'startEnvironment', - 'authorizeEnvironment', - 'addPublicKey', - 'removePublicKey', - ]; - for (const methodName of cloudShellServiceStubMethods) { - const callPromise = this.cloudShellServiceStub.then( - stub => - (...args: Array<{}>) => { - if (this._terminated) { - return Promise.reject('The client has already been closed.'); - } - const func = stub[methodName]; - return func.apply(stub, args); - }, - (err: Error | null | undefined) => () => { - throw err; - } - ); - - const descriptor = this.descriptors.longrunning[methodName] || undefined; - const apiCall = this._gaxModule.createApiCall( - callPromise, - this._defaults[methodName], - descriptor - ); - - this.innerApiCalls[methodName] = apiCall; - } - - return this.cloudShellServiceStub; - } - - /** - * The DNS address for this API service. - * @returns {string} The DNS address for this service. - */ - static get servicePath() { - return 'cloudshell.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath(), - * exists for compatibility reasons. - * @returns {string} The DNS address for this service. - */ - static get apiEndpoint() { - return 'cloudshell.googleapis.com'; - } - - /** - * The port for this API service. - * @returns {number} The default port for this service. - */ - static get port() { - return 443; - } - - /** - * The scopes needed to make gRPC calls for every method defined - * in this service. - * @returns {string[]} List of default scopes. - */ - static get scopes() { - return ['https://www.googleapis.com/auth/cloud-platform']; - } - - getProjectId(): Promise; - getProjectId(callback: Callback): void; - /** - * Return the project ID used by this class. - * @returns {Promise} A promise that resolves to string containing the project ID. - */ - getProjectId( - callback?: Callback - ): Promise | void { - if (callback) { - this.auth.getProjectId(callback); - return; - } - return this.auth.getProjectId(); - } - - // ------------------- - // -- Service calls -- - // ------------------- - getEnvironment( - request: protos.google.cloud.shell.v1.IGetEnvironmentRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.shell.v1.IEnvironment, - protos.google.cloud.shell.v1.IGetEnvironmentRequest | undefined, - {} | undefined - ] - >; - getEnvironment( - request: protos.google.cloud.shell.v1.IGetEnvironmentRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.shell.v1.IEnvironment, - protos.google.cloud.shell.v1.IGetEnvironmentRequest | null | undefined, - {} | null | undefined - > - ): void; - getEnvironment( - request: protos.google.cloud.shell.v1.IGetEnvironmentRequest, - callback: Callback< - protos.google.cloud.shell.v1.IEnvironment, - protos.google.cloud.shell.v1.IGetEnvironmentRequest | null | undefined, - {} | null | undefined - > - ): void; - /** - * Gets an environment. Returns NOT_FOUND if the environment does not exist. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the requested resource, for example `users/me/environments/default` - * or `users/someone@example.com/environments/default`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Environment]{@link google.cloud.shell.v1.Environment}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getEnvironment(request); - */ - getEnvironment( - request: protos.google.cloud.shell.v1.IGetEnvironmentRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.shell.v1.IEnvironment, - | protos.google.cloud.shell.v1.IGetEnvironmentRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.shell.v1.IEnvironment, - protos.google.cloud.shell.v1.IGetEnvironmentRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.shell.v1.IEnvironment, - protos.google.cloud.shell.v1.IGetEnvironmentRequest | undefined, - {} | undefined - ] - > | void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - name: request.name || '', - }); - this.initialize(); - return this.innerApiCalls.getEnvironment(request, options, callback); - } - - startEnvironment( - request: protos.google.cloud.shell.v1.IStartEnvironmentRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.cloud.shell.v1.IStartEnvironmentResponse, - protos.google.cloud.shell.v1.IStartEnvironmentMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - startEnvironment( - request: protos.google.cloud.shell.v1.IStartEnvironmentRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.cloud.shell.v1.IStartEnvironmentResponse, - protos.google.cloud.shell.v1.IStartEnvironmentMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - startEnvironment( - request: protos.google.cloud.shell.v1.IStartEnvironmentRequest, - callback: Callback< - LROperation< - protos.google.cloud.shell.v1.IStartEnvironmentResponse, - protos.google.cloud.shell.v1.IStartEnvironmentMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - /** - * Starts an existing environment, allowing clients to connect to it. The - * returned operation will contain an instance of StartEnvironmentMetadata in - * its metadata field. Users can wait for the environment to start by polling - * this operation via GetOperation. Once the environment has finished starting - * and is ready to accept connections, the operation will contain a - * StartEnvironmentResponse in its response field. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Name of the resource that should be started, for example - * `users/me/environments/default` or - * `users/someone@example.com/environments/default`. - * @param {string} request.accessToken - * The initial access token passed to the environment. If this is present and - * valid, the environment will be pre-authenticated with gcloud so that the - * user can run gcloud commands in Cloud Shell without having to log in. This - * code can be updated later by calling AuthorizeEnvironment. - * @param {string[]} request.publicKeys - * Public keys that should be added to the environment before it is started. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.startEnvironment(request); - * const [response] = await operation.promise(); - */ - startEnvironment( - request: protos.google.cloud.shell.v1.IStartEnvironmentRequest, - optionsOrCallback?: - | CallOptions - | Callback< - LROperation< - protos.google.cloud.shell.v1.IStartEnvironmentResponse, - protos.google.cloud.shell.v1.IStartEnvironmentMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - >, - callback?: Callback< - LROperation< - protos.google.cloud.shell.v1.IStartEnvironmentResponse, - protos.google.cloud.shell.v1.IStartEnvironmentMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): Promise< - [ - LROperation< - protos.google.cloud.shell.v1.IStartEnvironmentResponse, - protos.google.cloud.shell.v1.IStartEnvironmentMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - > | void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - name: request.name || '', - }); - this.initialize(); - return this.innerApiCalls.startEnvironment(request, options, callback); - } - /** - * Check the status of the long running operation returned by `startEnvironment()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const decodedOperation = await checkStartEnvironmentProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); - */ - async checkStartEnvironmentProgress( - name: string - ): Promise< - LROperation< - protos.google.cloud.shell.v1.StartEnvironmentResponse, - protos.google.cloud.shell.v1.StartEnvironmentMetadata - > - > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( - operation, - this.descriptors.longrunning.startEnvironment, - gax.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.cloud.shell.v1.StartEnvironmentResponse, - protos.google.cloud.shell.v1.StartEnvironmentMetadata - >; - } - authorizeEnvironment( - request: protos.google.cloud.shell.v1.IAuthorizeEnvironmentRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.cloud.shell.v1.IAuthorizeEnvironmentResponse, - protos.google.cloud.shell.v1.IAuthorizeEnvironmentMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - authorizeEnvironment( - request: protos.google.cloud.shell.v1.IAuthorizeEnvironmentRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.cloud.shell.v1.IAuthorizeEnvironmentResponse, - protos.google.cloud.shell.v1.IAuthorizeEnvironmentMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - authorizeEnvironment( - request: protos.google.cloud.shell.v1.IAuthorizeEnvironmentRequest, - callback: Callback< - LROperation< - protos.google.cloud.shell.v1.IAuthorizeEnvironmentResponse, - protos.google.cloud.shell.v1.IAuthorizeEnvironmentMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - /** - * Sends OAuth credentials to a running environment on behalf of a user. When - * this completes, the environment will be authorized to run various Google - * Cloud command line tools without requiring the user to manually - * authenticate. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Name of the resource that should receive the credentials, for example - * `users/me/environments/default` or - * `users/someone@example.com/environments/default`. - * @param {string} request.accessToken - * The OAuth access token that should be sent to the environment. - * @param {string} request.idToken - * The OAuth ID token that should be sent to the environment. - * @param {google.protobuf.Timestamp} request.expireTime - * The time when the credentials expire. If not set, defaults to one hour from - * when the server received the request. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.authorizeEnvironment(request); - * const [response] = await operation.promise(); - */ - authorizeEnvironment( - request: protos.google.cloud.shell.v1.IAuthorizeEnvironmentRequest, - optionsOrCallback?: - | CallOptions - | Callback< - LROperation< - protos.google.cloud.shell.v1.IAuthorizeEnvironmentResponse, - protos.google.cloud.shell.v1.IAuthorizeEnvironmentMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - >, - callback?: Callback< - LROperation< - protos.google.cloud.shell.v1.IAuthorizeEnvironmentResponse, - protos.google.cloud.shell.v1.IAuthorizeEnvironmentMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): Promise< - [ - LROperation< - protos.google.cloud.shell.v1.IAuthorizeEnvironmentResponse, - protos.google.cloud.shell.v1.IAuthorizeEnvironmentMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - > | void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - name: request.name || '', - }); - this.initialize(); - return this.innerApiCalls.authorizeEnvironment(request, options, callback); - } - /** - * Check the status of the long running operation returned by `authorizeEnvironment()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const decodedOperation = await checkAuthorizeEnvironmentProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); - */ - async checkAuthorizeEnvironmentProgress( - name: string - ): Promise< - LROperation< - protos.google.cloud.shell.v1.AuthorizeEnvironmentResponse, - protos.google.cloud.shell.v1.AuthorizeEnvironmentMetadata - > - > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( - operation, - this.descriptors.longrunning.authorizeEnvironment, - gax.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.cloud.shell.v1.AuthorizeEnvironmentResponse, - protos.google.cloud.shell.v1.AuthorizeEnvironmentMetadata - >; - } - addPublicKey( - request: protos.google.cloud.shell.v1.IAddPublicKeyRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.cloud.shell.v1.IAddPublicKeyResponse, - protos.google.cloud.shell.v1.IAddPublicKeyMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - addPublicKey( - request: protos.google.cloud.shell.v1.IAddPublicKeyRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.cloud.shell.v1.IAddPublicKeyResponse, - protos.google.cloud.shell.v1.IAddPublicKeyMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - addPublicKey( - request: protos.google.cloud.shell.v1.IAddPublicKeyRequest, - callback: Callback< - LROperation< - protos.google.cloud.shell.v1.IAddPublicKeyResponse, - protos.google.cloud.shell.v1.IAddPublicKeyMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - /** - * Adds a public SSH key to an environment, allowing clients with the - * corresponding private key to connect to that environment via SSH. If a key - * with the same content already exists, this will error with ALREADY_EXISTS. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.environment - * Environment this key should be added to, e.g. - * `users/me/environments/default`. - * @param {string} request.key - * Key that should be added to the environment. Supported formats are - * `ssh-dss` (see RFC4253), `ssh-rsa` (see RFC4253), `ecdsa-sha2-nistp256` - * (see RFC5656), `ecdsa-sha2-nistp384` (see RFC5656) and - * `ecdsa-sha2-nistp521` (see RFC5656). It should be structured as - * <format> <content>, where <content> part is encoded with - * Base64. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.addPublicKey(request); - * const [response] = await operation.promise(); - */ - addPublicKey( - request: protos.google.cloud.shell.v1.IAddPublicKeyRequest, - optionsOrCallback?: - | CallOptions - | Callback< - LROperation< - protos.google.cloud.shell.v1.IAddPublicKeyResponse, - protos.google.cloud.shell.v1.IAddPublicKeyMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - >, - callback?: Callback< - LROperation< - protos.google.cloud.shell.v1.IAddPublicKeyResponse, - protos.google.cloud.shell.v1.IAddPublicKeyMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): Promise< - [ - LROperation< - protos.google.cloud.shell.v1.IAddPublicKeyResponse, - protos.google.cloud.shell.v1.IAddPublicKeyMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - > | void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - environment: request.environment || '', - }); - this.initialize(); - return this.innerApiCalls.addPublicKey(request, options, callback); - } - /** - * Check the status of the long running operation returned by `addPublicKey()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const decodedOperation = await checkAddPublicKeyProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); - */ - async checkAddPublicKeyProgress( - name: string - ): Promise< - LROperation< - protos.google.cloud.shell.v1.AddPublicKeyResponse, - protos.google.cloud.shell.v1.AddPublicKeyMetadata - > - > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( - operation, - this.descriptors.longrunning.addPublicKey, - gax.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.cloud.shell.v1.AddPublicKeyResponse, - protos.google.cloud.shell.v1.AddPublicKeyMetadata - >; - } - removePublicKey( - request: protos.google.cloud.shell.v1.IRemovePublicKeyRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.cloud.shell.v1.IRemovePublicKeyResponse, - protos.google.cloud.shell.v1.IRemovePublicKeyMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - removePublicKey( - request: protos.google.cloud.shell.v1.IRemovePublicKeyRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.cloud.shell.v1.IRemovePublicKeyResponse, - protos.google.cloud.shell.v1.IRemovePublicKeyMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - removePublicKey( - request: protos.google.cloud.shell.v1.IRemovePublicKeyRequest, - callback: Callback< - LROperation< - protos.google.cloud.shell.v1.IRemovePublicKeyResponse, - protos.google.cloud.shell.v1.IRemovePublicKeyMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - /** - * Removes a public SSH key from an environment. Clients will no longer be - * able to connect to the environment using the corresponding private key. - * If a key with the same content is not present, this will error with - * NOT_FOUND. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.environment - * Environment this key should be removed from, e.g. - * `users/me/environments/default`. - * @param {string} request.key - * Key that should be removed from the environment. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.removePublicKey(request); - * const [response] = await operation.promise(); - */ - removePublicKey( - request: protos.google.cloud.shell.v1.IRemovePublicKeyRequest, - optionsOrCallback?: - | CallOptions - | Callback< - LROperation< - protos.google.cloud.shell.v1.IRemovePublicKeyResponse, - protos.google.cloud.shell.v1.IRemovePublicKeyMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - >, - callback?: Callback< - LROperation< - protos.google.cloud.shell.v1.IRemovePublicKeyResponse, - protos.google.cloud.shell.v1.IRemovePublicKeyMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): Promise< - [ - LROperation< - protos.google.cloud.shell.v1.IRemovePublicKeyResponse, - protos.google.cloud.shell.v1.IRemovePublicKeyMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - > | void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - environment: request.environment || '', - }); - this.initialize(); - return this.innerApiCalls.removePublicKey(request, options, callback); - } - /** - * Check the status of the long running operation returned by `removePublicKey()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const decodedOperation = await checkRemovePublicKeyProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); - */ - async checkRemovePublicKeyProgress( - name: string - ): Promise< - LROperation< - protos.google.cloud.shell.v1.RemovePublicKeyResponse, - protos.google.cloud.shell.v1.RemovePublicKeyMetadata - > - > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( - operation, - this.descriptors.longrunning.removePublicKey, - gax.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.cloud.shell.v1.RemovePublicKeyResponse, - protos.google.cloud.shell.v1.RemovePublicKeyMetadata - >; - } - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified environment resource name string. - * - * @param {string} user - * @param {string} environment - * @returns {string} Resource name string. - */ - environmentPath(user: string, environment: string) { - return this.pathTemplates.environmentPathTemplate.render({ - user: user, - environment: environment, - }); - } - - /** - * Parse the user from Environment resource. - * - * @param {string} environmentName - * A fully-qualified path representing Environment resource. - * @returns {string} A string representing the user. - */ - matchUserFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName) - .user; - } - - /** - * Parse the environment from Environment resource. - * - * @param {string} environmentName - * A fully-qualified path representing Environment resource. - * @returns {string} A string representing the environment. - */ - matchEnvironmentFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName) - .environment; - } - - /** - * Terminate the gRPC channel and close the client. - * - * The client will no longer be usable and all future behavior is undefined. - * @returns {Promise} A promise that resolves when the client is closed. - */ - close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.cloudShellServiceStub!.then(stub => { - this._terminated = true; - stub.close(); - }); - } - return Promise.resolve(); - } -} diff --git a/packages/google-cloud-shell/v1/src/v1/cloud_shell_service_client_config.json b/packages/google-cloud-shell/v1/src/v1/cloud_shell_service_client_config.json deleted file mode 100644 index fe310e2b677..00000000000 --- a/packages/google-cloud-shell/v1/src/v1/cloud_shell_service_client_config.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "interfaces": { - "google.cloud.shell.v1.CloudShellService": { - "retry_codes": { - "non_idempotent": [], - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "unknown_unavailable": [ - "UNKNOWN", - "UNAVAILABLE" - ] - }, - "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - }, - "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "GetEnvironment": { - "timeout_millis": 60000, - "retry_codes_name": "unknown_unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" - }, - "StartEnvironment": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "AuthorizeEnvironment": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "AddPublicKey": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "RemovePublicKey": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/packages/google-cloud-shell/v1/src/v1/cloud_shell_service_proto_list.json b/packages/google-cloud-shell/v1/src/v1/cloud_shell_service_proto_list.json deleted file mode 100644 index ef5795fc867..00000000000 --- a/packages/google-cloud-shell/v1/src/v1/cloud_shell_service_proto_list.json +++ /dev/null @@ -1,3 +0,0 @@ -[ - "../../protos/google/cloud/shell/v1/cloudshell.proto" -] diff --git a/packages/google-cloud-shell/v1/src/v1/gapic_metadata.json b/packages/google-cloud-shell/v1/src/v1/gapic_metadata.json deleted file mode 100644 index 81105cd0529..00000000000 --- a/packages/google-cloud-shell/v1/src/v1/gapic_metadata.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "typescript", - "protoPackage": "google.cloud.shell.v1", - "libraryPackage": "@google-cloud/shell", - "services": { - "CloudShellService": { - "clients": { - "grpc": { - "libraryClient": "CloudShellServiceClient", - "rpcs": { - "GetEnvironment": { - "methods": [ - "getEnvironment" - ] - }, - "StartEnvironment": { - "methods": [ - "startEnvironment" - ] - }, - "AuthorizeEnvironment": { - "methods": [ - "authorizeEnvironment" - ] - }, - "AddPublicKey": { - "methods": [ - "addPublicKey" - ] - }, - "RemovePublicKey": { - "methods": [ - "removePublicKey" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "CloudShellServiceClient", - "rpcs": { - "GetEnvironment": { - "methods": [ - "getEnvironment" - ] - }, - "StartEnvironment": { - "methods": [ - "startEnvironment" - ] - }, - "AuthorizeEnvironment": { - "methods": [ - "authorizeEnvironment" - ] - }, - "AddPublicKey": { - "methods": [ - "addPublicKey" - ] - }, - "RemovePublicKey": { - "methods": [ - "removePublicKey" - ] - } - } - } - } - } - } -} diff --git a/packages/google-cloud-shell/v1/src/v1/index.ts b/packages/google-cloud-shell/v1/src/v1/index.ts deleted file mode 100644 index f56f0d6ebd4..00000000000 --- a/packages/google-cloud-shell/v1/src/v1/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2021 Google LLC -// -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -export {CloudShellServiceClient} from './cloud_shell_service_client'; diff --git a/packages/google-cloud-shell/v1/system-test/fixtures/sample/src/index.js b/packages/google-cloud-shell/v1/system-test/fixtures/sample/src/index.js deleted file mode 100644 index 6656dcae689..00000000000 --- a/packages/google-cloud-shell/v1/system-test/fixtures/sample/src/index.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2021 Google LLC -// -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -/* eslint-disable node/no-missing-require, no-unused-vars */ -const shell = require('@google-cloud/shell'); - -function main() { - const cloudShellServiceClient = new shell.CloudShellServiceClient(); -} - -main(); diff --git a/packages/google-cloud-shell/v1/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-shell/v1/system-test/fixtures/sample/src/index.ts deleted file mode 100644 index d4d46e08a1d..00000000000 --- a/packages/google-cloud-shell/v1/system-test/fixtures/sample/src/index.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2021 Google LLC -// -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import {CloudShellServiceClient} from '@google-cloud/shell'; - -// check that the client class type name can be used -function doStuffWithCloudShellServiceClient(client: CloudShellServiceClient) { - client.close(); -} - -function main() { - // check that the client instance can be created - const cloudShellServiceClient = new CloudShellServiceClient(); - doStuffWithCloudShellServiceClient(cloudShellServiceClient); -} - -main(); diff --git a/packages/google-cloud-shell/v1/system-test/install.ts b/packages/google-cloud-shell/v1/system-test/install.ts deleted file mode 100644 index d2d61c0396f..00000000000 --- a/packages/google-cloud-shell/v1/system-test/install.ts +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2021 Google LLC -// -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import {packNTest} from 'pack-n-play'; -import {readFileSync} from 'fs'; -import {describe, it} from 'mocha'; - -describe('📦 pack-n-play test', () => { - it('TypeScript code', async function () { - this.timeout(300000); - const options = { - packageDir: process.cwd(), - sample: { - description: 'TypeScript user can use the type definitions', - ts: readFileSync( - './system-test/fixtures/sample/src/index.ts' - ).toString(), - }, - }; - await packNTest(options); - }); - - it('JavaScript code', async function () { - this.timeout(300000); - const options = { - packageDir: process.cwd(), - sample: { - description: 'JavaScript user can use the library', - ts: readFileSync( - './system-test/fixtures/sample/src/index.js' - ).toString(), - }, - }; - await packNTest(options); - }); -}); diff --git a/packages/google-cloud-shell/v1/test/gapic_cloud_shell_service_v1.ts b/packages/google-cloud-shell/v1/test/gapic_cloud_shell_service_v1.ts deleted file mode 100644 index 6920622e1dc..00000000000 --- a/packages/google-cloud-shell/v1/test/gapic_cloud_shell_service_v1.ts +++ /dev/null @@ -1,1100 +0,0 @@ -// Copyright 2021 Google LLC -// -// 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 -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import * as protos from '../protos/protos'; -import * as assert from 'assert'; -import * as sinon from 'sinon'; -import {SinonStub} from 'sinon'; -import {describe, it} from 'mocha'; -import * as cloudshellserviceModule from '../src'; - -import {protobuf, LROperation, operationsProtos} from 'google-gax'; - -function generateSampleMessage(instance: T) { - const filledObject = ( - instance.constructor as typeof protobuf.Message - ).toObject(instance as protobuf.Message, {defaults: true}); - return (instance.constructor as typeof protobuf.Message).fromObject( - filledObject - ) as T; -} - -function stubSimpleCall(response?: ResponseType, error?: Error) { - return error - ? sinon.stub().rejects(error) - : sinon.stub().resolves([response]); -} - -function stubSimpleCallWithCallback( - response?: ResponseType, - error?: Error -) { - return error - ? sinon.stub().callsArgWith(2, error) - : sinon.stub().callsArgWith(2, null, response); -} - -function stubLongRunningCall( - response?: ResponseType, - callError?: Error, - lroError?: Error -) { - const innerStub = lroError - ? sinon.stub().rejects(lroError) - : sinon.stub().resolves([response]); - const mockOperation = { - promise: innerStub, - }; - return callError - ? sinon.stub().rejects(callError) - : sinon.stub().resolves([mockOperation]); -} - -function stubLongRunningCallWithCallback( - response?: ResponseType, - callError?: Error, - lroError?: Error -) { - const innerStub = lroError - ? sinon.stub().rejects(lroError) - : sinon.stub().resolves([response]); - const mockOperation = { - promise: innerStub, - }; - return callError - ? sinon.stub().callsArgWith(2, callError) - : sinon.stub().callsArgWith(2, null, mockOperation); -} - -describe('v1.CloudShellServiceClient', () => { - it('has servicePath', () => { - const servicePath = - cloudshellserviceModule.v1.CloudShellServiceClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - cloudshellserviceModule.v1.CloudShellServiceClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = cloudshellserviceModule.v1.CloudShellServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.cloudShellServiceStub, undefined); - await client.initialize(); - assert(client.cloudShellServiceStub); - }); - - it('has close method', () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.close(); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } - }); - }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); - }); - - describe('getEnvironment', () => { - it('invokes getEnvironment without error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.shell.v1.GetEnvironmentRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.shell.v1.Environment() - ); - client.innerApiCalls.getEnvironment = stubSimpleCall(expectedResponse); - const [response] = await client.getEnvironment(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes getEnvironment without error using callback', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.shell.v1.GetEnvironmentRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.shell.v1.Environment() - ); - client.innerApiCalls.getEnvironment = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getEnvironment( - request, - ( - err?: Error | null, - result?: protos.google.cloud.shell.v1.IEnvironment | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); - }); - - it('invokes getEnvironment with error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.shell.v1.GetEnvironmentRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.getEnvironment = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.getEnvironment(request), expectedError); - assert( - (client.innerApiCalls.getEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - }); - - describe('startEnvironment', () => { - it('invokes startEnvironment without error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.shell.v1.StartEnvironmentRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.startEnvironment = - stubLongRunningCall(expectedResponse); - const [operation] = await client.startEnvironment(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.startEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes startEnvironment without error using callback', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.shell.v1.StartEnvironmentRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.startEnvironment = - stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.startEnvironment( - request, - ( - err?: Error | null, - result?: LROperation< - protos.google.cloud.shell.v1.IStartEnvironmentResponse, - protos.google.cloud.shell.v1.IStartEnvironmentMetadata - > | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const operation = (await promise) as LROperation< - protos.google.cloud.shell.v1.IStartEnvironmentResponse, - protos.google.cloud.shell.v1.IStartEnvironmentMetadata - >; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.startEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); - }); - - it('invokes startEnvironment with call error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.shell.v1.StartEnvironmentRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.startEnvironment = stubLongRunningCall( - undefined, - expectedError - ); - await assert.rejects(client.startEnvironment(request), expectedError); - assert( - (client.innerApiCalls.startEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes startEnvironment with LRO error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.shell.v1.StartEnvironmentRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.startEnvironment = stubLongRunningCall( - undefined, - undefined, - expectedError - ); - const [operation] = await client.startEnvironment(request); - await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.startEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes checkStartEnvironmentProgress without error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkStartEnvironmentProgress( - expectedResponse.name - ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkStartEnvironmentProgress with error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects( - client.checkStartEnvironmentProgress(''), - expectedError - ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - }); - - describe('authorizeEnvironment', () => { - it('invokes authorizeEnvironment without error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.shell.v1.AuthorizeEnvironmentRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.authorizeEnvironment = - stubLongRunningCall(expectedResponse); - const [operation] = await client.authorizeEnvironment(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.authorizeEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes authorizeEnvironment without error using callback', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.shell.v1.AuthorizeEnvironmentRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.authorizeEnvironment = - stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.authorizeEnvironment( - request, - ( - err?: Error | null, - result?: LROperation< - protos.google.cloud.shell.v1.IAuthorizeEnvironmentResponse, - protos.google.cloud.shell.v1.IAuthorizeEnvironmentMetadata - > | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const operation = (await promise) as LROperation< - protos.google.cloud.shell.v1.IAuthorizeEnvironmentResponse, - protos.google.cloud.shell.v1.IAuthorizeEnvironmentMetadata - >; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.authorizeEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); - }); - - it('invokes authorizeEnvironment with call error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.shell.v1.AuthorizeEnvironmentRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.authorizeEnvironment = stubLongRunningCall( - undefined, - expectedError - ); - await assert.rejects(client.authorizeEnvironment(request), expectedError); - assert( - (client.innerApiCalls.authorizeEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes authorizeEnvironment with LRO error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.shell.v1.AuthorizeEnvironmentRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.authorizeEnvironment = stubLongRunningCall( - undefined, - undefined, - expectedError - ); - const [operation] = await client.authorizeEnvironment(request); - await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.authorizeEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes checkAuthorizeEnvironmentProgress without error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkAuthorizeEnvironmentProgress( - expectedResponse.name - ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkAuthorizeEnvironmentProgress with error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects( - client.checkAuthorizeEnvironmentProgress(''), - expectedError - ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - }); - - describe('addPublicKey', () => { - it('invokes addPublicKey without error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.shell.v1.AddPublicKeyRequest() - ); - request.environment = ''; - const expectedHeaderRequestParams = 'environment='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.addPublicKey = stubLongRunningCall(expectedResponse); - const [operation] = await client.addPublicKey(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.addPublicKey as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes addPublicKey without error using callback', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.shell.v1.AddPublicKeyRequest() - ); - request.environment = ''; - const expectedHeaderRequestParams = 'environment='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.addPublicKey = - stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.addPublicKey( - request, - ( - err?: Error | null, - result?: LROperation< - protos.google.cloud.shell.v1.IAddPublicKeyResponse, - protos.google.cloud.shell.v1.IAddPublicKeyMetadata - > | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const operation = (await promise) as LROperation< - protos.google.cloud.shell.v1.IAddPublicKeyResponse, - protos.google.cloud.shell.v1.IAddPublicKeyMetadata - >; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.addPublicKey as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); - }); - - it('invokes addPublicKey with call error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.shell.v1.AddPublicKeyRequest() - ); - request.environment = ''; - const expectedHeaderRequestParams = 'environment='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.addPublicKey = stubLongRunningCall( - undefined, - expectedError - ); - await assert.rejects(client.addPublicKey(request), expectedError); - assert( - (client.innerApiCalls.addPublicKey as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes addPublicKey with LRO error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.shell.v1.AddPublicKeyRequest() - ); - request.environment = ''; - const expectedHeaderRequestParams = 'environment='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.addPublicKey = stubLongRunningCall( - undefined, - undefined, - expectedError - ); - const [operation] = await client.addPublicKey(request); - await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.addPublicKey as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes checkAddPublicKeyProgress without error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkAddPublicKeyProgress( - expectedResponse.name - ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkAddPublicKeyProgress with error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.checkAddPublicKeyProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - }); - - describe('removePublicKey', () => { - it('invokes removePublicKey without error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.shell.v1.RemovePublicKeyRequest() - ); - request.environment = ''; - const expectedHeaderRequestParams = 'environment='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.removePublicKey = - stubLongRunningCall(expectedResponse); - const [operation] = await client.removePublicKey(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.removePublicKey as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes removePublicKey without error using callback', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.shell.v1.RemovePublicKeyRequest() - ); - request.environment = ''; - const expectedHeaderRequestParams = 'environment='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.removePublicKey = - stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.removePublicKey( - request, - ( - err?: Error | null, - result?: LROperation< - protos.google.cloud.shell.v1.IRemovePublicKeyResponse, - protos.google.cloud.shell.v1.IRemovePublicKeyMetadata - > | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const operation = (await promise) as LROperation< - protos.google.cloud.shell.v1.IRemovePublicKeyResponse, - protos.google.cloud.shell.v1.IRemovePublicKeyMetadata - >; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.removePublicKey as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); - }); - - it('invokes removePublicKey with call error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.shell.v1.RemovePublicKeyRequest() - ); - request.environment = ''; - const expectedHeaderRequestParams = 'environment='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.removePublicKey = stubLongRunningCall( - undefined, - expectedError - ); - await assert.rejects(client.removePublicKey(request), expectedError); - assert( - (client.innerApiCalls.removePublicKey as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes removePublicKey with LRO error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.shell.v1.RemovePublicKeyRequest() - ); - request.environment = ''; - const expectedHeaderRequestParams = 'environment='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.removePublicKey = stubLongRunningCall( - undefined, - undefined, - expectedError - ); - const [operation] = await client.removePublicKey(request); - await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.removePublicKey as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes checkRemovePublicKeyProgress without error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkRemovePublicKeyProgress( - expectedResponse.name - ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkRemovePublicKeyProgress with error', async () => { - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects( - client.checkRemovePublicKeyProgress(''), - expectedError - ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - }); - - describe('Path templates', () => { - describe('environment', () => { - const fakePath = '/rendered/path/environment'; - const expectedParameters = { - user: 'userValue', - environment: 'environmentValue', - }; - const client = new cloudshellserviceModule.v1.CloudShellServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.environmentPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.environmentPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('environmentPath', () => { - const result = client.environmentPath('userValue', 'environmentValue'); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.environmentPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchUserFromEnvironmentName', () => { - const result = client.matchUserFromEnvironmentName(fakePath); - assert.strictEqual(result, 'userValue'); - assert( - (client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEnvironmentFromEnvironmentName', () => { - const result = client.matchEnvironmentFromEnvironmentName(fakePath); - assert.strictEqual(result, 'environmentValue'); - assert( - (client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - }); -}); diff --git a/packages/google-cloud-shell/v1/tsconfig.json b/packages/google-cloud-shell/v1/tsconfig.json deleted file mode 100644 index c78f1c884ef..00000000000 --- a/packages/google-cloud-shell/v1/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "./node_modules/gts/tsconfig-google.json", - "compilerOptions": { - "rootDir": ".", - "outDir": "build", - "resolveJsonModule": true, - "lib": [ - "es2018", - "dom" - ] - }, - "include": [ - "src/*.ts", - "src/**/*.ts", - "test/*.ts", - "test/**/*.ts", - "system-test/*.ts" - ] -} diff --git a/packages/google-cloud-shell/v1/webpack.config.js b/packages/google-cloud-shell/v1/webpack.config.js deleted file mode 100644 index 5d621ccf0aa..00000000000 --- a/packages/google-cloud-shell/v1/webpack.config.js +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2021 Google LLC -// -// 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 -// -// https://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. - -const path = require('path'); - -module.exports = { - entry: './src/index.ts', - output: { - library: 'CloudShellService', - filename: './cloud-shell-service.js', - }, - node: { - child_process: 'empty', - fs: 'empty', - crypto: 'empty', - }, - resolve: { - alias: { - '../../../package.json': path.resolve(__dirname, 'package.json'), - }, - extensions: ['.js', '.json', '.ts'], - }, - module: { - rules: [ - { - test: /\.tsx?$/, - use: 'ts-loader', - exclude: /node_modules/, - }, - { - test: /node_modules[\\/]@grpc[\\/]grpc-js/, - use: 'null-loader', - }, - { - test: /node_modules[\\/]grpc/, - use: 'null-loader', - }, - { - test: /node_modules[\\/]retry-request/, - use: 'null-loader', - }, - { - test: /node_modules[\\/]https?-proxy-agent/, - use: 'null-loader', - }, - { - test: /node_modules[\\/]gtoken/, - use: 'null-loader', - }, - ], - }, - mode: 'production', -}; From c5d6b2e68c869ed98b9de96b1946914ba6ad3d6b Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Wed, 2 Jun 2021 16:44:07 -0500 Subject: [PATCH 026/254] feat: add initial samples and tests (#4) --- packages/google-cloud-shell/.gitignore | 15 ++++- packages/google-cloud-shell/.jsdoc.js | 55 +++++++++++++++++++ packages/google-cloud-shell/README.md | 38 ++++++++++++- .../google-cloud-shell/linkinator.config.json | 12 +++- packages/google-cloud-shell/package.json | 2 +- packages/google-cloud-shell/samples/README.md | 50 +++++++++++++++++ .../google-cloud-shell/samples/quickstart.js | 13 ++--- .../samples/test/quickstart.js | 25 +-------- 8 files changed, 175 insertions(+), 35 deletions(-) create mode 100644 packages/google-cloud-shell/.jsdoc.js create mode 100644 packages/google-cloud-shell/samples/README.md diff --git a/packages/google-cloud-shell/.gitignore b/packages/google-cloud-shell/.gitignore index 7525967b155..f73bce1a797 100644 --- a/packages/google-cloud-shell/.gitignore +++ b/packages/google-cloud-shell/.gitignore @@ -1,2 +1,15 @@ +**/*.log +**/node_modules +.coverage +coverage +.nyc_output +docs/ +out/ build/ -node_modules +system-test/secrets.js +system-test/*key.json +*.lock +.DS_Store +package-lock.json +__pycache__ +owl-bot-staging \ No newline at end of file diff --git a/packages/google-cloud-shell/.jsdoc.js b/packages/google-cloud-shell/.jsdoc.js new file mode 100644 index 00000000000..f5fcaab3107 --- /dev/null +++ b/packages/google-cloud-shell/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +module.exports = { + opts: { + readme: './README.md', + package: './package.json', + template: './node_modules/jsdoc-fresh', + recurse: true, + verbose: true, + destination: './docs/' + }, + plugins: [ + 'plugins/markdown', + 'jsdoc-region-tag' + ], + source: { + excludePattern: '(^|\\/|\\\\)[._]', + include: [ + 'build/src', + 'protos' + ], + includePattern: '\\.js$' + }, + templates: { + copyright: 'Copyright 2021 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/cloud-shell', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; \ No newline at end of file diff --git a/packages/google-cloud-shell/README.md b/packages/google-cloud-shell/README.md index d0624d1c1fd..efee2b20d9a 100644 --- a/packages/google-cloud-shell/README.md +++ b/packages/google-cloud-shell/README.md @@ -32,8 +32,8 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. * [Quickstart](#quickstart) * [Before you begin](#before-you-begin) * [Installing the client library](#installing-the-client-library) - - + * [Using the client library](#using-the-client-library) +* [Samples](#samples) * [Versioning](#versioning) * [Contributing](#contributing) * [License](#license) @@ -55,6 +55,40 @@ npm install @google-cloud/cloud-shell ``` +### Using the client library + +```javascript +// Imports the Google Cloud client library + +// remove this line after package is released +// eslint-disable-next-line node/no-missing-require +const {CloudShellServiceClient} = require('@google-cloud/cloud-shell'); + +// TODO(developer): replace with your prefered project ID. +// const projectId = 'my-project' + +// Creates a client +// eslint-disable-next-line no-unused-vars +const client = new CloudShellServiceClient(); + +//TODO(library generator): write the actual function you will be testing +async function initializeClient() { + const operation = await client.initialize(); + console.info(operation); +} +initializeClient(); + +``` + + + +## Samples + +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-cloud-shell/tree/master/samples) directory. Each sample's `README.md` has instructions for running its sample. + +| Sample | Source Code | Try it | +| --------------------------- | --------------------------------- | ------ | +| Quickstart | [source code](https://github.com/googleapis/nodejs-cloud-shell/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-cloud-shell&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | diff --git a/packages/google-cloud-shell/linkinator.config.json b/packages/google-cloud-shell/linkinator.config.json index 0947c2e0e5b..4e8e9438f7a 100644 --- a/packages/google-cloud-shell/linkinator.config.json +++ b/packages/google-cloud-shell/linkinator.config.json @@ -1 +1,11 @@ -{"recurse":true,"skip":["https://codecov.io/gh/googleapis/","www.googleapis.com","img.shields.io"],"silent":true,"concurrency":10} \ No newline at end of file +{ + "recurse": true, + "skip": [ + "https://github.com/googleapis/nodejs-cloud-shell/blob/master/CHANGELOG.md", + "https://codecov.io/gh/googleapis/", + "www.googleapis.com", + "img.shields.io" + ], + "silent": true, + "concurrency": 10 +} diff --git a/packages/google-cloud-shell/package.json b/packages/google-cloud-shell/package.json index 52131094fa0..5a39c2c921c 100644 --- a/packages/google-cloud-shell/package.json +++ b/packages/google-cloud-shell/package.json @@ -61,6 +61,6 @@ "webpack-cli": "^4.7.0" }, "engines": { - "node": ">=v12.0.0" + "node": ">=v10.0.0" } } diff --git a/packages/google-cloud-shell/samples/README.md b/packages/google-cloud-shell/samples/README.md new file mode 100644 index 00000000000..9ef84fa02f0 --- /dev/null +++ b/packages/google-cloud-shell/samples/README.md @@ -0,0 +1,50 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [Cloud Shell: Node.js Samples](https://github.com/googleapis/nodejs-cloud-shell) + +[![Open in Cloud Shell][shell_img]][shell_link] + + + +## Table of Contents + +* [Before you begin](#before-you-begin) +* [Samples](#samples) + * [Quickstart](#quickstart) + +## Before you begin + +Before running the samples, make sure you've followed the steps outlined in +[Using the client library](https://github.com/googleapis/nodejs-cloud-shell#using-the-client-library). + +`cd samples` + +`npm install` + +`cd ..` + +## Samples + + + +### Quickstart + +View the [source code](https://github.com/googleapis/nodejs-cloud-shell/blob/master/samples/quickstart.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-cloud-shell&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node samples/quickstart.js` + + + + + + +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-cloud-shell&page=editor&open_in_editor=samples/README.md +[product-docs]: https://cloud.google.com/shell/ diff --git a/packages/google-cloud-shell/samples/quickstart.js b/packages/google-cloud-shell/samples/quickstart.js index 67378b9bdbc..70d4528d668 100644 --- a/packages/google-cloud-shell/samples/quickstart.js +++ b/packages/google-cloud-shell/samples/quickstart.js @@ -14,7 +14,6 @@ 'use strict'; async function main() { - // [START nodejs_cloud_shell_quickstart] // Imports the Google Cloud client library @@ -27,16 +26,14 @@ async function main() { // Creates a client // eslint-disable-next-line no-unused-vars - const client = new {CloudShellServiceClient}(); + const client = new CloudShellServiceClient(); //TODO(library generator): write the actual function you will be testing - async function doSomething() { - console.log('DPE! Change this code so that it shows how to use the library! See comments below on structure.') - // const [thing] = await client.methodName({ - // }); - // console.info(thing); + async function initializeClient() { + const operation = await client.initialize(); + console.info(operation); } - doSomething(); + initializeClient(); // [END nodejs_cloud_shell_quickstart] } diff --git a/packages/google-cloud-shell/samples/test/quickstart.js b/packages/google-cloud-shell/samples/test/quickstart.js index 6c2d1209adb..86410163dba 100644 --- a/packages/google-cloud-shell/samples/test/quickstart.js +++ b/packages/google-cloud-shell/samples/test/quickstart.js @@ -19,35 +19,16 @@ const path = require('path'); const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -// eslint-disable-next-line node/no-missing-require -const {CloudShellServiceClient} = require('@google-cloud/cloud-shell'); -// eslint-disable-next-line no-unused-vars, node/no-missing-require +const {describe, it} = require('mocha'); const {assert} = require('chai'); const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); const cwd = path.join(__dirname, '..'); -const client = new {CloudShellServiceClient}(); - describe('Quickstart', () => { - //TODO: remove this if not using the projectId - // eslint-disable-next-line no-unused-vars - let projectId; - - before(async () => { - // eslint-disable-next-line no-unused-vars - projectId = await client.getProjectId(); - }); - it('should run quickstart', async () => { - //TODO: remove this line - // eslint-disable-next-line no-unused-vars - const stdout = execSync( - `node ./quickstart.js`, - {cwd} - ); - //assert(stdout, stdout !== null); + const stdout = execSync('node ./quickstart.js', {cwd}); + assert.match(stdout, /ServiceClientImpl/); }); }); From b1ebd7626a652c5af6062b7b5948d273d466b82b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 3 Jun 2021 03:05:25 +0200 Subject: [PATCH 027/254] chore(deps): update dependency sinon to v11 (#3) --- packages/google-cloud-shell/package-lock.json | 60 +++++-------------- packages/google-cloud-shell/package.json | 2 +- 2 files changed, 17 insertions(+), 45 deletions(-) diff --git a/packages/google-cloud-shell/package-lock.json b/packages/google-cloud-shell/package-lock.json index c7a77a74059..3ec058760e2 100644 --- a/packages/google-cloud-shell/package-lock.json +++ b/packages/google-cloud-shell/package-lock.json @@ -295,9 +295,9 @@ } }, "@sinonjs/samsam": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.3.1.tgz", - "integrity": "sha512-1Hc0b1TtyfBu8ixF/tpfSHTVWKwCBLY4QJbkgnE7HcwyvT2xArDxb4K7dMgqRm3szI+LJbzmW/s4xxEhv6hwDg==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-6.0.2.tgz", + "integrity": "sha512-jxPRPp9n93ci7b8hMfJOFDPRLFYadN6FSpeROFTR4UNF4i5b+EK6m4QXPO46BDhFgRy1JuS87zAnFOzCUwMJcQ==", "dev": true, "requires": { "@sinonjs/commons": "^1.6.0", @@ -3393,27 +3393,16 @@ "dev": true }, "nise": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/nise/-/nise-4.1.0.tgz", - "integrity": "sha512-eQMEmGN/8arp0xsvGoQ+B1qvSkR73B1nWSCh7nOt5neMCtwcQVYQGdzQMhcNscktTsWB54xnlSQFzOAPJD8nXA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.0.tgz", + "integrity": "sha512-W5WlHu+wvo3PaKLsJJkgPup2LrsXCcm7AWwyNZkUnn5rwPkuPBi3Iwk5SQtN0mv+K65k7nKKjwNQ30wg3wLAQQ==", "dev": true, "requires": { "@sinonjs/commons": "^1.7.0", - "@sinonjs/fake-timers": "^6.0.0", + "@sinonjs/fake-timers": "^7.0.4", "@sinonjs/text-encoding": "^0.7.1", "just-extend": "^4.0.2", "path-to-regexp": "^1.7.0" - }, - "dependencies": { - "@sinonjs/fake-timers": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-6.0.1.tgz", - "integrity": "sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.7.0" - } - } } }, "node-fetch": { @@ -4226,34 +4215,17 @@ "dev": true }, "sinon": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-10.0.0.tgz", - "integrity": "sha512-XAn5DxtGVJBlBWYrcYKEhWCz7FLwZGdyvANRyK06419hyEpdT0dMc5A8Vcxg5SCGHc40CsqoKsc1bt1CbJPfNw==", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-11.1.1.tgz", + "integrity": "sha512-ZSSmlkSyhUWbkF01Z9tEbxZLF/5tRC9eojCdFh33gtQaP7ITQVaMWQHGuFM7Cuf/KEfihuh1tTl3/ABju3AQMg==", "dev": true, "requires": { - "@sinonjs/commons": "^1.8.1", - "@sinonjs/fake-timers": "^6.0.1", - "@sinonjs/samsam": "^5.3.1", - "diff": "^4.0.2", - "nise": "^4.1.0", - "supports-color": "^7.1.0" - }, - "dependencies": { - "@sinonjs/fake-timers": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-6.0.1.tgz", - "integrity": "sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.7.0" - } - }, - "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true - } + "@sinonjs/commons": "^1.8.3", + "@sinonjs/fake-timers": "^7.1.0", + "@sinonjs/samsam": "^6.0.2", + "diff": "^5.0.0", + "nise": "^5.1.0", + "supports-color": "^7.2.0" } }, "slash": { diff --git a/packages/google-cloud-shell/package.json b/packages/google-cloud-shell/package.json index 5a39c2c921c..dfc3e136c88 100644 --- a/packages/google-cloud-shell/package.json +++ b/packages/google-cloud-shell/package.json @@ -54,7 +54,7 @@ "mocha": "^8.4.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", - "sinon": "^10.0.0", + "sinon": "^11.0.0", "ts-loader": "^9.1.2", "typescript": "^4.2.4", "webpack": "^5.36.2", From 2fb161dcb570510c0f773cfe2a77341762a64f03 Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Tue, 8 Jun 2021 13:38:44 -0500 Subject: [PATCH 028/254] chore: fix package.json repo name (#9) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: fix package.json repo name * 🦉 Updates from OwlBot * fix: update package name so it does not sound so redundant" * 🦉 Updates from OwlBot Co-authored-by: Owl Bot --- packages/google-cloud-shell/.jsdoc.js | 2 +- packages/google-cloud-shell/.repo-metadata.json | 2 +- packages/google-cloud-shell/README.md | 6 +++--- packages/google-cloud-shell/package.json | 4 ++-- packages/google-cloud-shell/protos/protos.js | 2 +- packages/google-cloud-shell/samples/package.json | 2 +- packages/google-cloud-shell/samples/quickstart.js | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/google-cloud-shell/.jsdoc.js b/packages/google-cloud-shell/.jsdoc.js index f5fcaab3107..4db91f5d595 100644 --- a/packages/google-cloud-shell/.jsdoc.js +++ b/packages/google-cloud-shell/.jsdoc.js @@ -43,7 +43,7 @@ module.exports = { copyright: 'Copyright 2021 Google LLC', includeDate: false, sourceFiles: false, - systemName: '@google-cloud/cloud-shell', + systemName: '@google-cloud/shell', theme: 'lumen', default: { outputSourceFiles: false diff --git a/packages/google-cloud-shell/.repo-metadata.json b/packages/google-cloud-shell/.repo-metadata.json index b33d5ca121a..11061040dec 100644 --- a/packages/google-cloud-shell/.repo-metadata.json +++ b/packages/google-cloud-shell/.repo-metadata.json @@ -7,7 +7,7 @@ "release_level": "BETA", "language": "nodejs", "repo": "googleapis/nodejs-cloud-shell", - "distribution_name": "@google-cloud/cloud-shell", + "distribution_name": "@google-cloud/shell", "api_id": "shell.googleapis.com", "default_version": "v1", "requires_billing": true diff --git a/packages/google-cloud-shell/README.md b/packages/google-cloud-shell/README.md index efee2b20d9a..4c80d8ed6aa 100644 --- a/packages/google-cloud-shell/README.md +++ b/packages/google-cloud-shell/README.md @@ -5,7 +5,7 @@ # [Cloud Shell: Node.js Client](https://github.com/googleapis/nodejs-cloud-shell) [![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) -[![npm version](https://img.shields.io/npm/v/@google-cloud/cloud-shell.svg)](https://www.npmjs.org/package/@google-cloud/cloud-shell) +[![npm version](https://img.shields.io/npm/v/@google-cloud/shell.svg)](https://www.npmjs.org/package/@google-cloud/shell) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-cloud-shell/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-cloud-shell) @@ -51,7 +51,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. ### Installing the client library ```bash -npm install @google-cloud/cloud-shell +npm install @google-cloud/shell ``` @@ -62,7 +62,7 @@ npm install @google-cloud/cloud-shell // remove this line after package is released // eslint-disable-next-line node/no-missing-require -const {CloudShellServiceClient} = require('@google-cloud/cloud-shell'); +const {CloudShellServiceClient} = require('@google-cloud/shell'); // TODO(developer): replace with your prefered project ID. // const projectId = 'my-project' diff --git a/packages/google-cloud-shell/package.json b/packages/google-cloud-shell/package.json index dfc3e136c88..2d5687ea269 100644 --- a/packages/google-cloud-shell/package.json +++ b/packages/google-cloud-shell/package.json @@ -1,8 +1,8 @@ { - "name": "@google-cloud/cloud-shell", + "name": "@google-cloud/shell", "version": "0.1.0", "description": "cloudshell client for Node.js", - "repository": "googleapis/googleapis/nodejs-cloud-shell", + "repository": "googleapis/nodejs-cloud-shell", "license": "Apache-2.0", "author": "Google LLC", "main": "build/src/index.js", diff --git a/packages/google-cloud-shell/protos/protos.js b/packages/google-cloud-shell/protos/protos.js index c44c0e1d9c8..9a14505b3ce 100644 --- a/packages/google-cloud-shell/protos/protos.js +++ b/packages/google-cloud-shell/protos/protos.js @@ -28,7 +28,7 @@ var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; // Exported root namespace - var $root = $protobuf.roots._google_cloud_cloud_shell_protos || ($protobuf.roots._google_cloud_cloud_shell_protos = {}); + var $root = $protobuf.roots._google_cloud_shell_protos || ($protobuf.roots._google_cloud_shell_protos = {}); $root.google = (function() { diff --git a/packages/google-cloud-shell/samples/package.json b/packages/google-cloud-shell/samples/package.json index 426caae7b96..6471c2b6537 100644 --- a/packages/google-cloud-shell/samples/package.json +++ b/packages/google-cloud-shell/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/cloud-shell": "^0.1.0" + "@google-cloud/shell": "^0.1.0" }, "devDependencies": { "c8": "^7.1.0", diff --git a/packages/google-cloud-shell/samples/quickstart.js b/packages/google-cloud-shell/samples/quickstart.js index 70d4528d668..ce52d0685bd 100644 --- a/packages/google-cloud-shell/samples/quickstart.js +++ b/packages/google-cloud-shell/samples/quickstart.js @@ -19,7 +19,7 @@ async function main() { // remove this line after package is released // eslint-disable-next-line node/no-missing-require - const {CloudShellServiceClient} = require('@google-cloud/cloud-shell'); + const {CloudShellServiceClient} = require('@google-cloud/shell'); // TODO(developer): replace with your prefered project ID. // const projectId = 'my-project' From e60a119124c3a63ded59e29fc261230e624aa6e4 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 8 Jun 2021 19:12:04 +0000 Subject: [PATCH 029/254] chore: release 1.0.0 (#5) :robot: I have created a release \*beep\* \*boop\* --- ## 1.0.0 (2021-06-08) ### Features * add initial samples and tests ([#4](https://www.github.com/googleapis/nodejs-cloud-shell/issues/4)) ([3900384](https://www.github.com/googleapis/nodejs-cloud-shell/commit/3900384736a8e66e5b00c8ca298d3d4fb9a1b4b3)) * add initial template samples ([226fea0](https://www.github.com/googleapis/nodejs-cloud-shell/commit/226fea0042f75dcff523d47477583b9180fa7b46)) * initial lib generation ([d309d59](https://www.github.com/googleapis/nodejs-cloud-shell/commit/d309d59eed1de379b13c328a82d86c88f7aa453c)) ### Bug Fixes * add gitignore, and samples ([4951579](https://www.github.com/googleapis/nodejs-cloud-shell/commit/4951579c22c3a230621898ec6f581faa0a5df28b)) * remove additional v1 folder ([7c5353c](https://www.github.com/googleapis/nodejs-cloud-shell/commit/7c5353c89630fb61ec3f264196766ecf51669e0e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-shell/CHANGELOG.md | 16 ++++++++++++++++ packages/google-cloud-shell/package-lock.json | 2 +- packages/google-cloud-shell/package.json | 2 +- packages/google-cloud-shell/samples/package.json | 2 +- 4 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 packages/google-cloud-shell/CHANGELOG.md diff --git a/packages/google-cloud-shell/CHANGELOG.md b/packages/google-cloud-shell/CHANGELOG.md new file mode 100644 index 00000000000..db559d4486e --- /dev/null +++ b/packages/google-cloud-shell/CHANGELOG.md @@ -0,0 +1,16 @@ +# Changelog + +## 1.0.0 (2021-06-08) + + +### Features + +* add initial samples and tests ([#4](https://www.github.com/googleapis/nodejs-cloud-shell/issues/4)) ([3900384](https://www.github.com/googleapis/nodejs-cloud-shell/commit/3900384736a8e66e5b00c8ca298d3d4fb9a1b4b3)) +* add initial template samples ([226fea0](https://www.github.com/googleapis/nodejs-cloud-shell/commit/226fea0042f75dcff523d47477583b9180fa7b46)) +* initial lib generation ([d309d59](https://www.github.com/googleapis/nodejs-cloud-shell/commit/d309d59eed1de379b13c328a82d86c88f7aa453c)) + + +### Bug Fixes + +* add gitignore, and samples ([4951579](https://www.github.com/googleapis/nodejs-cloud-shell/commit/4951579c22c3a230621898ec6f581faa0a5df28b)) +* remove additional v1 folder ([7c5353c](https://www.github.com/googleapis/nodejs-cloud-shell/commit/7c5353c89630fb61ec3f264196766ecf51669e0e)) diff --git a/packages/google-cloud-shell/package-lock.json b/packages/google-cloud-shell/package-lock.json index 3ec058760e2..5bd56ae691f 100644 --- a/packages/google-cloud-shell/package-lock.json +++ b/packages/google-cloud-shell/package-lock.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/cloud-shell", - "version": "0.1.0", + "version": "1.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/google-cloud-shell/package.json b/packages/google-cloud-shell/package.json index 2d5687ea269..740a9d4c45f 100644 --- a/packages/google-cloud-shell/package.json +++ b/packages/google-cloud-shell/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/shell", - "version": "0.1.0", + "version": "1.0.0", "description": "cloudshell client for Node.js", "repository": "googleapis/nodejs-cloud-shell", "license": "Apache-2.0", diff --git a/packages/google-cloud-shell/samples/package.json b/packages/google-cloud-shell/samples/package.json index 6471c2b6537..8d7635606fe 100644 --- a/packages/google-cloud-shell/samples/package.json +++ b/packages/google-cloud-shell/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/shell": "^0.1.0" + "@google-cloud/shell": "^1.0.0" }, "devDependencies": { "c8": "^7.1.0", From 89dc482ed0c7ebfc3ab98255732cf2a3deb1e7bf Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Thu, 17 Jun 2021 04:40:51 +0000 Subject: [PATCH 030/254] feat: initial stub of library --- .../CODE_OF_CONDUCT.md | 94 ++++++++ .../CONTRIBUTING.md | 76 +++++++ .../google-cloud-gkeconnect-gateway/LICENSE | 202 ++++++++++++++++++ .../google-cloud-gkeconnect-gateway/README.md | 120 +++++++++++ .../package.json | 64 ++++++ 5 files changed, 556 insertions(+) create mode 100644 packages/google-cloud-gkeconnect-gateway/CODE_OF_CONDUCT.md create mode 100644 packages/google-cloud-gkeconnect-gateway/CONTRIBUTING.md create mode 100644 packages/google-cloud-gkeconnect-gateway/LICENSE create mode 100644 packages/google-cloud-gkeconnect-gateway/README.md create mode 100644 packages/google-cloud-gkeconnect-gateway/package.json diff --git a/packages/google-cloud-gkeconnect-gateway/CODE_OF_CONDUCT.md b/packages/google-cloud-gkeconnect-gateway/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..2add2547a81 --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/CODE_OF_CONDUCT.md @@ -0,0 +1,94 @@ + +# Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +This Code of Conduct also applies outside the project spaces when the Project +Steward has a reasonable belief that an individual's behavior may have a +negative impact on the project or its community. + +## Conflict Resolution + +We do not believe that all conflict is bad; healthy debate and disagreement +often yield positive results. However, it is never okay to be disrespectful or +to engage in behavior that violates the project’s code of conduct. + +If you see someone violating the code of conduct, you are encouraged to address +the behavior directly with those involved. Many issues can be resolved quickly +and easily, and this gives people more control over the outcome of their +dispute. If you are unable to resolve the matter for any reason, or if the +behavior is threatening or harassing, report it. We are dedicated to providing +an environment where participants feel welcome and safe. + +Reports should be directed to *googleapis-stewards@google.com*, the +Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to +receive and address reported violations of the code of conduct. They will then +work with a committee consisting of representatives from the Open Source +Programs Office and the Google Open Source Strategy team. If for any reason you +are uncomfortable reaching out to the Project Steward, please email +opensource@google.com. + +We will investigate every complaint, but you may not receive a direct response. +We will use our discretion in determining when and how to follow up on reported +incidents, which may range from not taking action to permanent expulsion from +the project and project-sponsored spaces. We will notify the accused of the +report and provide them an opportunity to discuss it before any action is taken. +The identity of the reporter will be omitted from the details of the report +supplied to the accused. In potentially harmful situations, such as ongoing +harassment or threats to anyone's safety, we may take action without notice. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/packages/google-cloud-gkeconnect-gateway/CONTRIBUTING.md b/packages/google-cloud-gkeconnect-gateway/CONTRIBUTING.md new file mode 100644 index 00000000000..9f4a30623c3 --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# How to become a contributor and submit your own code + +**Table of contents** + +* [Contributor License Agreements](#contributor-license-agreements) +* [Contributing a patch](#contributing-a-patch) +* [Running the tests](#running-the-tests) +* [Releasing the library](#releasing-the-library) + +## Contributor License Agreements + +We'd love to accept your sample apps and patches! Before we can take them, we +have to jump a couple of legal hurdles. + +Please fill out either the individual or corporate Contributor License Agreement +(CLA). + + * If you are an individual writing original source code and you're sure you + own the intellectual property, then you'll need to sign an [individual CLA](https://developers.google.com/open-source/cla/individual). + * If you work for a company that wants to allow you to contribute your work, + then you'll need to sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate). + +Follow either of the two links above to access the appropriate CLA and +instructions for how to sign and return it. Once we receive it, we'll be able to +accept your pull requests. + +## Contributing A Patch + +1. Submit an issue describing your proposed change to the repo in question. +1. The repo owner will respond to your issue promptly. +1. If your proposed change is accepted, and you haven't already done so, sign a + Contributor License Agreement (see details above). +1. Fork the desired repo, develop and test your code changes. +1. Ensure that your code adheres to the existing style in the code to which + you are contributing. +1. Ensure that your code has an appropriate set of tests which all pass. +1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. +1. Submit a pull request. + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the API Gateway API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + + +## Running the tests + +1. [Prepare your environment for Node.js setup][setup]. + +1. Install dependencies: + + npm install + +1. Run the tests: + + # Run unit tests. + npm test + + # Run sample integration tests. + npm run samples-test + + # Run all system tests. + npm run system-test + +1. Lint (and maybe fix) any changes: + + npm run fix + +[setup]: https://cloud.google.com/nodejs/docs/setup +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=gateway.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-cloud-gkeconnect-gateway/LICENSE b/packages/google-cloud-gkeconnect-gateway/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/LICENSE @@ -0,0 +1,202 @@ + + 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/packages/google-cloud-gkeconnect-gateway/README.md b/packages/google-cloud-gkeconnect-gateway/README.md new file mode 100644 index 00000000000..5a8dffd3e9c --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/README.md @@ -0,0 +1,120 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [API Gateway: Node.js Client](https://github.com/googleapis/nodejs-connect-gateway) + +[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![npm version](https://img.shields.io/npm/v/@google-cloud/connect-gateway.svg)](https://www.npmjs.org/package/@google-cloud/connect-gateway) +[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-connect-gateway/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-connect-gateway) + + + + +apigateway client for Node.js + + +A comprehensive list of changes in each version may be found in +[the CHANGELOG](https://github.com/googleapis/nodejs-connect-gateway/blob/master/CHANGELOG.md). + +* [API Gateway Node.js Client API Reference][client-docs] +* [API Gateway Documentation][product-docs] +* [github.com/googleapis/nodejs-connect-gateway](https://github.com/googleapis/nodejs-connect-gateway) + +Read more about the client libraries for Cloud APIs, including the older +Google APIs Client Libraries, in [Client Libraries Explained][explained]. + +[explained]: https://cloud.google.com/apis/docs/client-libraries-explained + +**Table of contents:** + + +* [Quickstart](#quickstart) + * [Before you begin](#before-you-begin) + * [Installing the client library](#installing-the-client-library) + + +* [Versioning](#versioning) +* [Contributing](#contributing) +* [License](#license) + +## Quickstart + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the API Gateway API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + +### Installing the client library + +```bash +npm install @google-cloud/connect-gateway +``` + + + + + +The [API Gateway Node.js Client API Reference][client-docs] documentation +also contains samples. + +## Supported Node.js Versions + +Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). +Libraries are compatible with all current _active_ and _maintenance_ versions of +Node.js. + +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. + +_Legacy Node.js versions are supported as a best effort:_ + +* Legacy versions will not be tested in continuous integration. +* Some security patches may not be able to be backported. +* Dependencies will not be kept up-to-date, and features will not be backported. + +#### Legacy tags available + +* `legacy-8`: install client libraries from this dist-tag for versions + compatible with Node.js 8. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + + + + + + +More Information: [Google Cloud Platform Launch Stages][launch_stages] + +[launch_stages]: https://cloud.google.com/terms/launch-stages + +## Contributing + +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-connect-gateway/blob/master/CONTRIBUTING.md). + +Please note that this `README.md`, the `samples/README.md`, +and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) +are generated from a central template. To edit one of these files, make an edit +to its template in this +[directory](https://github.com/googleapis/synthtool/tree/master/synthtool/gcp/templates/node_library). + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com/googleapis/nodejs-connect-gateway/blob/master/LICENSE) + +[client-docs]: https://cloud.google.com/anthos/multicluster-management/gateway/using +[product-docs]: https://cloud.google.com/api-gateway/ +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=gateway.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started diff --git a/packages/google-cloud-gkeconnect-gateway/package.json b/packages/google-cloud-gkeconnect-gateway/package.json new file mode 100644 index 00000000000..6df4fb74166 --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/package.json @@ -0,0 +1,64 @@ +{ + "name": "@google-cloud/connect-gateway", + "version": "0.1.0", + "description": "apigateway client for Node.js", + "repository": "googleapis/googleapis/nodejs-connect-gateway", + "license": "Apache-2.0", + "author": "Google LLC", + "main": "build/src/index.js", + "files": [ + "build/src", + "build/protos" + ], + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google apigateway", + "apigateway", + "apigateway service" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" + }, + "dependencies": { + "google-gax": "^2.12.0" + }, + "devDependencies": { + "@types/mocha": "^8.2.2", + "@types/node": "^14.14.44", + "@types/sinon": "^10.0.0", + "c8": "^7.7.2", + "gts": "^3.1.0", + "jsdoc": "^3.6.6", + "jsdoc-fresh": "^1.0.2", + "jsdoc-region-tag": "^1.0.6", + "linkinator": "^2.13.6", + "mocha": "^8.4.0", + "null-loader": "^4.0.1", + "pack-n-play": "^1.0.0-2", + "sinon": "^10.0.0", + "ts-loader": "^9.1.2", + "typescript": "^4.2.4", + "webpack": "^5.36.2", + "webpack-cli": "^4.7.0" + }, + "engines": { + "node": ">=v10.0.0" + } +} From 06c0d21f6da82373ea2869f9719e5502ffab60f6 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 22 Jun 2021 08:58:19 -0700 Subject: [PATCH 031/254] chore: remove all monolith Bazel deps chore: release gapic-generator-csharp v1.3.7 chore: release gapic-generator-go 0.20.5 chore: release gapic-generator-java 1.0.14 chore: release gapic-generator-php 1.0.1 chore: release gapic-generator-python 0.50.0... (#53) chore: remove all monolith Bazel deps chore: release gapic-generator-csharp v1.3.7 chore: release gapic-generator-go 0.20.5 chore: release gapic-generator-java 1.0.14 chore: release gapic-generator-php 1.0.1 chore: release gapic-generator-python 0.50.0 chore: update gapic-generator-ruby to the latest commit chore: release gapic-generator-typescript 1.5.0 Committer: @miraleung PiperOrigin-RevId: 380641501 --- .../src/v1/iam_checker_client.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts b/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts index 6f67df81d95..1065b45fbfb 100644 --- a/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts +++ b/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts @@ -269,7 +269,7 @@ export class IamCheckerClient { // -- Service calls -- // ------------------- troubleshootIamPolicy( - request: protos.google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyRequest, + request?: protos.google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyRequest, options?: CallOptions ): Promise< [ @@ -322,7 +322,7 @@ export class IamCheckerClient { * const [response] = await client.troubleshootIamPolicy(request); */ troubleshootIamPolicy( - request: protos.google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyRequest, + request?: protos.google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyRequest, optionsOrCallback?: | CallOptions | Callback< From e4501eb8dd74cc97ea26a56274db1fd8e47da3c8 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Tue, 22 Jun 2021 14:21:43 -0400 Subject: [PATCH 032/254] docs(release-level): release level ga should be indicated (#54) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(release-level): release level ga should be indicated * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/master/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../google-cloud-policytroubleshooter/.repo-metadata.json | 2 +- packages/google-cloud-policytroubleshooter/README.md | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-policytroubleshooter/.repo-metadata.json b/packages/google-cloud-policytroubleshooter/.repo-metadata.json index 836d9d71bf2..fd50a079f35 100644 --- a/packages/google-cloud-policytroubleshooter/.repo-metadata.json +++ b/packages/google-cloud-policytroubleshooter/.repo-metadata.json @@ -2,7 +2,7 @@ "client_documentation": "https://googleapis.dev/nodejs/policytroubleshooter/latest/", "api_id": "policytroubleshooter.googleapis.com", "distribution_name": "@google-cloud/policy-troubleshooter", - "release_level": "GA", + "release_level": "ga", "default_version": "v1", "language": "nodejs", "name_pretty": "IAM Policy Troubleshooter API", diff --git a/packages/google-cloud-policytroubleshooter/README.md b/packages/google-cloud-policytroubleshooter/README.md index 27e56355df0..d87b5617070 100644 --- a/packages/google-cloud-policytroubleshooter/README.md +++ b/packages/google-cloud-policytroubleshooter/README.md @@ -124,6 +124,12 @@ _Legacy Node.js versions are supported as a best effort:_ This library follows [Semantic Versioning](http://semver.org/). +This library is considered to be **General Availability (GA)**. This means it +is stable; the code surface will not change in backwards-incompatible ways +unless absolutely necessary (e.g. because of critical security issues) or with +an extensive deprecation period. Issues and requests against **GA** libraries +are addressed with the highest priority. + From 19b5ba73b31a6b167e75eaf0f347781d62757f72 Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Sat, 26 Jun 2021 05:21:15 +0000 Subject: [PATCH 033/254] feat: add generated files --- .../.eslintignore | 6 + .../.eslintrc.json | 3 + .../.gitattributes | 4 + .../.github/.OwlBot.yaml | 22 + .../.gitignore | 14 + .../google-cloud-gkeconnect-gateway/.jsdoc.js | 55 + .../.mocharc.js | 29 + .../google-cloud-gkeconnect-gateway/.nycrc | 24 + .../.prettierignore | 6 + .../.prettierrc.js | 17 + .../.repo-metadata.json | 15 + .../linkinator.config.json | 1 + .../package.json | 4 +- .../gkeconnect/gateway/v1beta1/gateway.proto | 75 + .../protos/protos.d.ts | 3823 ++++++ .../protos/protos.js | 10199 ++++++++++++++++ .../protos/protos.json | 1152 ++ .../samples/package.json | 23 + .../samples/quickstart.js | 50 + .../samples/test/quickstart.js | 53 + .../src/index.ts | 27 + .../src/v1beta1/gapic_metadata.json | 73 + .../src/v1beta1/gateway_service_client.ts | 707 ++ .../gateway_service_client_config.json | 46 + .../v1beta1/gateway_service_proto_list.json | 3 + .../src/v1beta1/index.ts | 19 + .../system-test/fixtures/sample/src/index.js | 26 + .../system-test/fixtures/sample/src/index.ts | 32 + .../system-test/install.ts | 51 + .../test/gapic_gateway_service_v1beta1.ts | 524 + .../tsconfig.json | 19 + .../webpack.config.js | 64 + 32 files changed, 17165 insertions(+), 1 deletion(-) create mode 100644 packages/google-cloud-gkeconnect-gateway/.eslintignore create mode 100644 packages/google-cloud-gkeconnect-gateway/.eslintrc.json create mode 100644 packages/google-cloud-gkeconnect-gateway/.gitattributes create mode 100644 packages/google-cloud-gkeconnect-gateway/.github/.OwlBot.yaml create mode 100644 packages/google-cloud-gkeconnect-gateway/.gitignore create mode 100644 packages/google-cloud-gkeconnect-gateway/.jsdoc.js create mode 100644 packages/google-cloud-gkeconnect-gateway/.mocharc.js create mode 100644 packages/google-cloud-gkeconnect-gateway/.nycrc create mode 100644 packages/google-cloud-gkeconnect-gateway/.prettierignore create mode 100644 packages/google-cloud-gkeconnect-gateway/.prettierrc.js create mode 100644 packages/google-cloud-gkeconnect-gateway/.repo-metadata.json create mode 100644 packages/google-cloud-gkeconnect-gateway/linkinator.config.json create mode 100644 packages/google-cloud-gkeconnect-gateway/protos/google/cloud/gkeconnect/gateway/v1beta1/gateway.proto create mode 100644 packages/google-cloud-gkeconnect-gateway/protos/protos.d.ts create mode 100644 packages/google-cloud-gkeconnect-gateway/protos/protos.js create mode 100644 packages/google-cloud-gkeconnect-gateway/protos/protos.json create mode 100644 packages/google-cloud-gkeconnect-gateway/samples/package.json create mode 100644 packages/google-cloud-gkeconnect-gateway/samples/quickstart.js create mode 100644 packages/google-cloud-gkeconnect-gateway/samples/test/quickstart.js create mode 100644 packages/google-cloud-gkeconnect-gateway/src/index.ts create mode 100644 packages/google-cloud-gkeconnect-gateway/src/v1beta1/gapic_metadata.json create mode 100644 packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts create mode 100644 packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client_config.json create mode 100644 packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_proto_list.json create mode 100644 packages/google-cloud-gkeconnect-gateway/src/v1beta1/index.ts create mode 100644 packages/google-cloud-gkeconnect-gateway/system-test/fixtures/sample/src/index.js create mode 100644 packages/google-cloud-gkeconnect-gateway/system-test/fixtures/sample/src/index.ts create mode 100644 packages/google-cloud-gkeconnect-gateway/system-test/install.ts create mode 100644 packages/google-cloud-gkeconnect-gateway/test/gapic_gateway_service_v1beta1.ts create mode 100644 packages/google-cloud-gkeconnect-gateway/tsconfig.json create mode 100644 packages/google-cloud-gkeconnect-gateway/webpack.config.js diff --git a/packages/google-cloud-gkeconnect-gateway/.eslintignore b/packages/google-cloud-gkeconnect-gateway/.eslintignore new file mode 100644 index 00000000000..9340ad9b86d --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/.eslintignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-cloud-gkeconnect-gateway/.eslintrc.json b/packages/google-cloud-gkeconnect-gateway/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/packages/google-cloud-gkeconnect-gateway/.gitattributes b/packages/google-cloud-gkeconnect-gateway/.gitattributes new file mode 100644 index 00000000000..33739cb74e4 --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/.gitattributes @@ -0,0 +1,4 @@ +*.ts text eol=lf +*.js text eol=lf +protos/* linguist-generated +**/api-extractor.json linguist-language=JSON-with-Comments diff --git a/packages/google-cloud-gkeconnect-gateway/.github/.OwlBot.yaml b/packages/google-cloud-gkeconnect-gateway/.github/.OwlBot.yaml new file mode 100644 index 00000000000..2a1fed1c72a --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/.github/.OwlBot.yaml @@ -0,0 +1,22 @@ +# Copyright 2021 Google LLC +# +# 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. +docker: + image: gcr.io/repo-automation-bots/owlbot-nodejs:latest + +deep-remove-regex: + - /owl-bot-staging + +deep-copy-regex: + - source: /google/cloud/gkeconnect/gateway/(.*)/.*-nodejs/(.*) + dest: /owl-bot-staging/$1/$2 diff --git a/packages/google-cloud-gkeconnect-gateway/.gitignore b/packages/google-cloud-gkeconnect-gateway/.gitignore new file mode 100644 index 00000000000..5d32b23782f --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/.gitignore @@ -0,0 +1,14 @@ +**/*.log +**/node_modules +.coverage +coverage +.nyc_output +docs/ +out/ +build/ +system-test/secrets.js +system-test/*key.json +*.lock +.DS_Store +package-lock.json +__pycache__ diff --git a/packages/google-cloud-gkeconnect-gateway/.jsdoc.js b/packages/google-cloud-gkeconnect-gateway/.jsdoc.js new file mode 100644 index 00000000000..c290f1d0aa3 --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +module.exports = { + opts: { + readme: './README.md', + package: './package.json', + template: './node_modules/jsdoc-fresh', + recurse: true, + verbose: true, + destination: './docs/' + }, + plugins: [ + 'plugins/markdown', + 'jsdoc-region-tag' + ], + source: { + excludePattern: '(^|\\/|\\\\)[._]', + include: [ + 'build/src', + 'protos' + ], + includePattern: '\\.js$' + }, + templates: { + copyright: 'Copyright 2021 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/gateway', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/packages/google-cloud-gkeconnect-gateway/.mocharc.js b/packages/google-cloud-gkeconnect-gateway/.mocharc.js new file mode 100644 index 00000000000..0b600509bed --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/.mocharc.js @@ -0,0 +1,29 @@ +// Copyright 2020 Google LLC +// +// 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. +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000, + "recursive": true +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} +module.exports = config diff --git a/packages/google-cloud-gkeconnect-gateway/.nycrc b/packages/google-cloud-gkeconnect-gateway/.nycrc new file mode 100644 index 00000000000..b18d5472b62 --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/.nycrc @@ -0,0 +1,24 @@ +{ + "report-dir": "./.coverage", + "reporter": ["text", "lcov"], + "exclude": [ + "**/*-test", + "**/.coverage", + "**/apis", + "**/benchmark", + "**/conformance", + "**/docs", + "**/samples", + "**/scripts", + "**/protos", + "**/test", + "**/*.d.ts", + ".jsdoc.js", + "**/.jsdoc.js", + "karma.conf.js", + "webpack-tests.config.js", + "webpack.config.js" + ], + "exclude-after-remap": false, + "all": true +} diff --git a/packages/google-cloud-gkeconnect-gateway/.prettierignore b/packages/google-cloud-gkeconnect-gateway/.prettierignore new file mode 100644 index 00000000000..9340ad9b86d --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-cloud-gkeconnect-gateway/.prettierrc.js b/packages/google-cloud-gkeconnect-gateway/.prettierrc.js new file mode 100644 index 00000000000..d1b95106f4c --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/.prettierrc.js @@ -0,0 +1,17 @@ +// Copyright 2020 Google LLC +// +// 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 +// +// https://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. + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/packages/google-cloud-gkeconnect-gateway/.repo-metadata.json b/packages/google-cloud-gkeconnect-gateway/.repo-metadata.json new file mode 100644 index 00000000000..443b8a775f6 --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/.repo-metadata.json @@ -0,0 +1,15 @@ +{ + "name": "apigateway", + "name_pretty": "API Gateway", + "product_documentation": "https://cloud.google.com/api-gateway/", + "client_documentation": "https://cloud.google.com/anthos/multicluster-management/gateway/using", + "issue_tracker": "https://github.com/googleapis/nodejs-connect-gateway/issues", + "release_level": "BETA", + "language": "nodejs", + "repo": "googleapis/nodejs-connect-gateway", + "distribution_name": "@google-cloud/connect-gateway", + "api_id": "gateway.googleapis.com", + "default_version": "v1beta1", + "requires_billing": true +} + diff --git a/packages/google-cloud-gkeconnect-gateway/linkinator.config.json b/packages/google-cloud-gkeconnect-gateway/linkinator.config.json new file mode 100644 index 00000000000..0947c2e0e5b --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/linkinator.config.json @@ -0,0 +1 @@ +{"recurse":true,"skip":["https://codecov.io/gh/googleapis/","www.googleapis.com","img.shields.io"],"silent":true,"concurrency":10} \ No newline at end of file diff --git a/packages/google-cloud-gkeconnect-gateway/package.json b/packages/google-cloud-gkeconnect-gateway/package.json index 6df4fb74166..5949f27387c 100644 --- a/packages/google-cloud-gkeconnect-gateway/package.json +++ b/packages/google-cloud-gkeconnect-gateway/package.json @@ -34,7 +34,9 @@ "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", "system-test": "c8 mocha build/system-test", - "test": "c8 mocha build/test" + "test": "c8 mocha build/test", + "samples-test": "cd samples/ && npm link ../ && npm test", + "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { "google-gax": "^2.12.0" diff --git a/packages/google-cloud-gkeconnect-gateway/protos/google/cloud/gkeconnect/gateway/v1beta1/gateway.proto b/packages/google-cloud-gkeconnect-gateway/protos/google/cloud/gkeconnect/gateway/v1beta1/gateway.proto new file mode 100644 index 00000000000..6e13893ca7a --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/protos/google/cloud/gkeconnect/gateway/v1beta1/gateway.proto @@ -0,0 +1,75 @@ +// Copyright 2021 Google LLC +// +// 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. + +syntax = "proto3"; + +package google.cloud.gkeconnect.gateway.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/httpbody.proto"; + +option csharp_namespace = "Google.Cloud.GkeConnect.Gateway.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/gkeconnect/gateway/v1beta1;gateway"; +option java_multiple_files = true; +option java_outer_classname = "GatewayProto"; +option java_package = "com.google.cloud.gkeconnect.gateway.v1beta1"; +option php_namespace = "Google\\Cloud\\GkeConnect\\Gateway\\V1beta1"; +option ruby_package = "Google::Cloud::GkeConnect::Gateway::V1beta1"; + +// Gateway service is a public API which works as a Kubernetes resource model +// proxy between end users and registered Kubernetes clusters. Each RPC in this +// service matches with an HTTP verb. End user will initiate kubectl commands +// against the Gateway service, and Gateway service will forward user requests +// to clusters. +service GatewayService { + option (google.api.default_host) = "connectgateway.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // GetResource performs an HTTP GET request on the Kubernetes API Server. + rpc GetResource(google.api.HttpBody) returns (google.api.HttpBody) { + option (google.api.http) = { + get: "/v1beta1/**" + }; + } + + // PostResource performs an HTTP POST on the Kubernetes API Server. + rpc PostResource(google.api.HttpBody) returns (google.api.HttpBody) { + option (google.api.http) = { + post: "/v1beta1/**" + }; + } + + // DeleteResource performs an HTTP DELETE on the Kubernetes API Server. + rpc DeleteResource(google.api.HttpBody) returns (google.api.HttpBody) { + option (google.api.http) = { + delete: "/v1beta1/**" + }; + } + + // PutResource performs an HTTP PUT on the Kubernetes API Server. + rpc PutResource(google.api.HttpBody) returns (google.api.HttpBody) { + option (google.api.http) = { + put: "/v1beta1/**" + }; + } + + // PatchResource performs an HTTP PATCH on the Kubernetes API Server. + rpc PatchResource(google.api.HttpBody) returns (google.api.HttpBody) { + option (google.api.http) = { + patch: "/v1beta1/**" + }; + } +} diff --git a/packages/google-cloud-gkeconnect-gateway/protos/protos.d.ts b/packages/google-cloud-gkeconnect-gateway/protos/protos.d.ts new file mode 100644 index 00000000000..22dfff7d57f --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/protos/protos.d.ts @@ -0,0 +1,3823 @@ +// Copyright 2021 Google LLC +// +// 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. + +import * as Long from "long"; +import {protobuf as $protobuf} from "google-gax"; +/** Namespace google. */ +export namespace google { + + /** Namespace cloud. */ + namespace cloud { + + /** Namespace gkeconnect. */ + namespace gkeconnect { + + /** Namespace gateway. */ + namespace gateway { + + /** Namespace v1beta1. */ + namespace v1beta1 { + + /** Represents a GatewayService */ + class GatewayService extends $protobuf.rpc.Service { + + /** + * Constructs a new GatewayService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new GatewayService service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): GatewayService; + + /** + * Calls GetResource. + * @param request HttpBody message or plain object + * @param callback Node-style callback called with the error, if any, and HttpBody + */ + public getResource(request: google.api.IHttpBody, callback: google.cloud.gkeconnect.gateway.v1beta1.GatewayService.GetResourceCallback): void; + + /** + * Calls GetResource. + * @param request HttpBody message or plain object + * @returns Promise + */ + public getResource(request: google.api.IHttpBody): Promise; + + /** + * Calls PostResource. + * @param request HttpBody message or plain object + * @param callback Node-style callback called with the error, if any, and HttpBody + */ + public postResource(request: google.api.IHttpBody, callback: google.cloud.gkeconnect.gateway.v1beta1.GatewayService.PostResourceCallback): void; + + /** + * Calls PostResource. + * @param request HttpBody message or plain object + * @returns Promise + */ + public postResource(request: google.api.IHttpBody): Promise; + + /** + * Calls DeleteResource. + * @param request HttpBody message or plain object + * @param callback Node-style callback called with the error, if any, and HttpBody + */ + public deleteResource(request: google.api.IHttpBody, callback: google.cloud.gkeconnect.gateway.v1beta1.GatewayService.DeleteResourceCallback): void; + + /** + * Calls DeleteResource. + * @param request HttpBody message or plain object + * @returns Promise + */ + public deleteResource(request: google.api.IHttpBody): Promise; + + /** + * Calls PutResource. + * @param request HttpBody message or plain object + * @param callback Node-style callback called with the error, if any, and HttpBody + */ + public putResource(request: google.api.IHttpBody, callback: google.cloud.gkeconnect.gateway.v1beta1.GatewayService.PutResourceCallback): void; + + /** + * Calls PutResource. + * @param request HttpBody message or plain object + * @returns Promise + */ + public putResource(request: google.api.IHttpBody): Promise; + + /** + * Calls PatchResource. + * @param request HttpBody message or plain object + * @param callback Node-style callback called with the error, if any, and HttpBody + */ + public patchResource(request: google.api.IHttpBody, callback: google.cloud.gkeconnect.gateway.v1beta1.GatewayService.PatchResourceCallback): void; + + /** + * Calls PatchResource. + * @param request HttpBody message or plain object + * @returns Promise + */ + public patchResource(request: google.api.IHttpBody): Promise; + } + + namespace GatewayService { + + /** + * Callback as used by {@link google.cloud.gkeconnect.gateway.v1beta1.GatewayService#getResource}. + * @param error Error, if any + * @param [response] HttpBody + */ + type GetResourceCallback = (error: (Error|null), response?: google.api.HttpBody) => void; + + /** + * Callback as used by {@link google.cloud.gkeconnect.gateway.v1beta1.GatewayService#postResource}. + * @param error Error, if any + * @param [response] HttpBody + */ + type PostResourceCallback = (error: (Error|null), response?: google.api.HttpBody) => void; + + /** + * Callback as used by {@link google.cloud.gkeconnect.gateway.v1beta1.GatewayService#deleteResource}. + * @param error Error, if any + * @param [response] HttpBody + */ + type DeleteResourceCallback = (error: (Error|null), response?: google.api.HttpBody) => void; + + /** + * Callback as used by {@link google.cloud.gkeconnect.gateway.v1beta1.GatewayService#putResource}. + * @param error Error, if any + * @param [response] HttpBody + */ + type PutResourceCallback = (error: (Error|null), response?: google.api.HttpBody) => void; + + /** + * Callback as used by {@link google.cloud.gkeconnect.gateway.v1beta1.GatewayService#patchResource}. + * @param error Error, if any + * @param [response] HttpBody + */ + type PatchResourceCallback = (error: (Error|null), response?: google.api.HttpBody) => void; + } + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + + /** + * Verifies a Http message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get?: (string|null); + + /** HttpRule put. */ + public put?: (string|null); + + /** HttpRule post. */ + public post?: (string|null); + + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HttpBody. */ + interface IHttpBody { + + /** HttpBody contentType */ + contentType?: (string|null); + + /** HttpBody data */ + data?: (Uint8Array|string|null); + + /** HttpBody extensions */ + extensions?: (google.protobuf.IAny[]|null); + } + + /** Represents a HttpBody. */ + class HttpBody implements IHttpBody { + + /** + * Constructs a new HttpBody. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpBody); + + /** HttpBody contentType. */ + public contentType: string; + + /** HttpBody data. */ + public data: (Uint8Array|string); + + /** HttpBody extensions. */ + public extensions: google.protobuf.IAny[]; + + /** + * Creates a new HttpBody instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpBody instance + */ + public static create(properties?: google.api.IHttpBody): google.api.HttpBody; + + /** + * Encodes the specified HttpBody message. Does not implicitly {@link google.api.HttpBody.verify|verify} messages. + * @param message HttpBody message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpBody, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpBody message, length delimited. Does not implicitly {@link google.api.HttpBody.verify|verify} messages. + * @param message HttpBody message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpBody, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpBody message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpBody + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpBody; + + /** + * Decodes a HttpBody message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpBody + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpBody; + + /** + * Verifies a HttpBody message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpBody message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpBody + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpBody; + + /** + * Creates a plain object from a HttpBody message. Also converts values to other types if specified. + * @param message HttpBody + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpBody, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpBody to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions phpGenericServices */ + phpGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions phpGenericServices. */ + public phpGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|string|null); + } + + /** Represents an Any. */ + class Any implements IAny { + + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: (Uint8Array|string); + + /** + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Any message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; + + /** + * Verifies an Any message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Any + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } +} diff --git a/packages/google-cloud-gkeconnect-gateway/protos/protos.js b/packages/google-cloud-gkeconnect-gateway/protos/protos.js new file mode 100644 index 00000000000..259d52d5d99 --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/protos/protos.js @@ -0,0 +1,10199 @@ +// Copyright 2021 Google LLC +// +// 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. + +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("google-gax").protobufMinimal); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots._google_cloud_connect_gateway_protos || ($protobuf.roots._google_cloud_connect_gateway_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.gkeconnect = (function() { + + /** + * Namespace gkeconnect. + * @memberof google.cloud + * @namespace + */ + var gkeconnect = {}; + + gkeconnect.gateway = (function() { + + /** + * Namespace gateway. + * @memberof google.cloud.gkeconnect + * @namespace + */ + var gateway = {}; + + gateway.v1beta1 = (function() { + + /** + * Namespace v1beta1. + * @memberof google.cloud.gkeconnect.gateway + * @namespace + */ + var v1beta1 = {}; + + v1beta1.GatewayService = (function() { + + /** + * Constructs a new GatewayService service. + * @memberof google.cloud.gkeconnect.gateway.v1beta1 + * @classdesc Represents a GatewayService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function GatewayService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (GatewayService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = GatewayService; + + /** + * Creates new GatewayService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.gkeconnect.gateway.v1beta1.GatewayService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {GatewayService} RPC service. Useful where requests and/or responses are streamed. + */ + GatewayService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.gkeconnect.gateway.v1beta1.GatewayService#getResource}. + * @memberof google.cloud.gkeconnect.gateway.v1beta1.GatewayService + * @typedef GetResourceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.api.HttpBody} [response] HttpBody + */ + + /** + * Calls GetResource. + * @function getResource + * @memberof google.cloud.gkeconnect.gateway.v1beta1.GatewayService + * @instance + * @param {google.api.IHttpBody} request HttpBody message or plain object + * @param {google.cloud.gkeconnect.gateway.v1beta1.GatewayService.GetResourceCallback} callback Node-style callback called with the error, if any, and HttpBody + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GatewayService.prototype.getResource = function getResource(request, callback) { + return this.rpcCall(getResource, $root.google.api.HttpBody, $root.google.api.HttpBody, request, callback); + }, "name", { value: "GetResource" }); + + /** + * Calls GetResource. + * @function getResource + * @memberof google.cloud.gkeconnect.gateway.v1beta1.GatewayService + * @instance + * @param {google.api.IHttpBody} request HttpBody message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkeconnect.gateway.v1beta1.GatewayService#postResource}. + * @memberof google.cloud.gkeconnect.gateway.v1beta1.GatewayService + * @typedef PostResourceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.api.HttpBody} [response] HttpBody + */ + + /** + * Calls PostResource. + * @function postResource + * @memberof google.cloud.gkeconnect.gateway.v1beta1.GatewayService + * @instance + * @param {google.api.IHttpBody} request HttpBody message or plain object + * @param {google.cloud.gkeconnect.gateway.v1beta1.GatewayService.PostResourceCallback} callback Node-style callback called with the error, if any, and HttpBody + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GatewayService.prototype.postResource = function postResource(request, callback) { + return this.rpcCall(postResource, $root.google.api.HttpBody, $root.google.api.HttpBody, request, callback); + }, "name", { value: "PostResource" }); + + /** + * Calls PostResource. + * @function postResource + * @memberof google.cloud.gkeconnect.gateway.v1beta1.GatewayService + * @instance + * @param {google.api.IHttpBody} request HttpBody message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkeconnect.gateway.v1beta1.GatewayService#deleteResource}. + * @memberof google.cloud.gkeconnect.gateway.v1beta1.GatewayService + * @typedef DeleteResourceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.api.HttpBody} [response] HttpBody + */ + + /** + * Calls DeleteResource. + * @function deleteResource + * @memberof google.cloud.gkeconnect.gateway.v1beta1.GatewayService + * @instance + * @param {google.api.IHttpBody} request HttpBody message or plain object + * @param {google.cloud.gkeconnect.gateway.v1beta1.GatewayService.DeleteResourceCallback} callback Node-style callback called with the error, if any, and HttpBody + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GatewayService.prototype.deleteResource = function deleteResource(request, callback) { + return this.rpcCall(deleteResource, $root.google.api.HttpBody, $root.google.api.HttpBody, request, callback); + }, "name", { value: "DeleteResource" }); + + /** + * Calls DeleteResource. + * @function deleteResource + * @memberof google.cloud.gkeconnect.gateway.v1beta1.GatewayService + * @instance + * @param {google.api.IHttpBody} request HttpBody message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkeconnect.gateway.v1beta1.GatewayService#putResource}. + * @memberof google.cloud.gkeconnect.gateway.v1beta1.GatewayService + * @typedef PutResourceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.api.HttpBody} [response] HttpBody + */ + + /** + * Calls PutResource. + * @function putResource + * @memberof google.cloud.gkeconnect.gateway.v1beta1.GatewayService + * @instance + * @param {google.api.IHttpBody} request HttpBody message or plain object + * @param {google.cloud.gkeconnect.gateway.v1beta1.GatewayService.PutResourceCallback} callback Node-style callback called with the error, if any, and HttpBody + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GatewayService.prototype.putResource = function putResource(request, callback) { + return this.rpcCall(putResource, $root.google.api.HttpBody, $root.google.api.HttpBody, request, callback); + }, "name", { value: "PutResource" }); + + /** + * Calls PutResource. + * @function putResource + * @memberof google.cloud.gkeconnect.gateway.v1beta1.GatewayService + * @instance + * @param {google.api.IHttpBody} request HttpBody message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkeconnect.gateway.v1beta1.GatewayService#patchResource}. + * @memberof google.cloud.gkeconnect.gateway.v1beta1.GatewayService + * @typedef PatchResourceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.api.HttpBody} [response] HttpBody + */ + + /** + * Calls PatchResource. + * @function patchResource + * @memberof google.cloud.gkeconnect.gateway.v1beta1.GatewayService + * @instance + * @param {google.api.IHttpBody} request HttpBody message or plain object + * @param {google.cloud.gkeconnect.gateway.v1beta1.GatewayService.PatchResourceCallback} callback Node-style callback called with the error, if any, and HttpBody + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GatewayService.prototype.patchResource = function patchResource(request, callback) { + return this.rpcCall(patchResource, $root.google.api.HttpBody, $root.google.api.HttpBody, request, callback); + }, "name", { value: "PatchResource" }); + + /** + * Calls PatchResource. + * @function patchResource + * @memberof google.cloud.gkeconnect.gateway.v1beta1.GatewayService + * @instance + * @param {google.api.IHttpBody} request HttpBody message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return GatewayService; + })(); + + return v1beta1; + })(); + + return gateway; + })(); + + return gkeconnect; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + case 2: + message.fullyDecodeReservedExpansion = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.selector = reader.string(); + break; + case 2: + message.get = reader.string(); + break; + case 3: + message.put = reader.string(); + break; + case 4: + message.post = reader.string(); + break; + case 5: + message["delete"] = reader.string(); + break; + case 6: + message.patch = reader.string(); + break; + case 8: + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + case 7: + message.body = reader.string(); + break; + case 12: + message.responseBody = reader.string(); + break; + case 11: + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.kind = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CustomHttpPattern; + })(); + + api.HttpBody = (function() { + + /** + * Properties of a HttpBody. + * @memberof google.api + * @interface IHttpBody + * @property {string|null} [contentType] HttpBody contentType + * @property {Uint8Array|null} [data] HttpBody data + * @property {Array.|null} [extensions] HttpBody extensions + */ + + /** + * Constructs a new HttpBody. + * @memberof google.api + * @classdesc Represents a HttpBody. + * @implements IHttpBody + * @constructor + * @param {google.api.IHttpBody=} [properties] Properties to set + */ + function HttpBody(properties) { + this.extensions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpBody contentType. + * @member {string} contentType + * @memberof google.api.HttpBody + * @instance + */ + HttpBody.prototype.contentType = ""; + + /** + * HttpBody data. + * @member {Uint8Array} data + * @memberof google.api.HttpBody + * @instance + */ + HttpBody.prototype.data = $util.newBuffer([]); + + /** + * HttpBody extensions. + * @member {Array.} extensions + * @memberof google.api.HttpBody + * @instance + */ + HttpBody.prototype.extensions = $util.emptyArray; + + /** + * Creates a new HttpBody instance using the specified properties. + * @function create + * @memberof google.api.HttpBody + * @static + * @param {google.api.IHttpBody=} [properties] Properties to set + * @returns {google.api.HttpBody} HttpBody instance + */ + HttpBody.create = function create(properties) { + return new HttpBody(properties); + }; + + /** + * Encodes the specified HttpBody message. Does not implicitly {@link google.api.HttpBody.verify|verify} messages. + * @function encode + * @memberof google.api.HttpBody + * @static + * @param {google.api.IHttpBody} message HttpBody message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpBody.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.contentType != null && Object.hasOwnProperty.call(message, "contentType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.contentType); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); + if (message.extensions != null && message.extensions.length) + for (var i = 0; i < message.extensions.length; ++i) + $root.google.protobuf.Any.encode(message.extensions[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified HttpBody message, length delimited. Does not implicitly {@link google.api.HttpBody.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpBody + * @static + * @param {google.api.IHttpBody} message HttpBody message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpBody.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpBody message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpBody + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpBody} HttpBody + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpBody.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpBody(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.contentType = reader.string(); + break; + case 2: + message.data = reader.bytes(); + break; + case 3: + if (!(message.extensions && message.extensions.length)) + message.extensions = []; + message.extensions.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpBody message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpBody + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpBody} HttpBody + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpBody.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpBody message. + * @function verify + * @memberof google.api.HttpBody + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpBody.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.contentType != null && message.hasOwnProperty("contentType")) + if (!$util.isString(message.contentType)) + return "contentType: string expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + if (message.extensions != null && message.hasOwnProperty("extensions")) { + if (!Array.isArray(message.extensions)) + return "extensions: array expected"; + for (var i = 0; i < message.extensions.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.extensions[i]); + if (error) + return "extensions." + error; + } + } + return null; + }; + + /** + * Creates a HttpBody message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpBody + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpBody} HttpBody + */ + HttpBody.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpBody) + return object; + var message = new $root.google.api.HttpBody(); + if (object.contentType != null) + message.contentType = String(object.contentType); + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length) + message.data = object.data; + if (object.extensions) { + if (!Array.isArray(object.extensions)) + throw TypeError(".google.api.HttpBody.extensions: array expected"); + message.extensions = []; + for (var i = 0; i < object.extensions.length; ++i) { + if (typeof object.extensions[i] !== "object") + throw TypeError(".google.api.HttpBody.extensions: object expected"); + message.extensions[i] = $root.google.protobuf.Any.fromObject(object.extensions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpBody message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpBody + * @static + * @param {google.api.HttpBody} message HttpBody + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpBody.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.extensions = []; + if (options.defaults) { + object.contentType = ""; + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + } + if (message.contentType != null && message.hasOwnProperty("contentType")) + object.contentType = message.contentType; + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + if (message.extensions && message.extensions.length) { + object.extensions = []; + for (var j = 0; j < message.extensions.length; ++j) + object.extensions[j] = $root.google.protobuf.Any.toObject(message.extensions[j], options); + } + return object; + }; + + /** + * Converts this HttpBody to JSON. + * @function toJSON + * @memberof google.api.HttpBody + * @instance + * @returns {Object.} JSON object + */ + HttpBody.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HttpBody; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FileDescriptorSet; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message["package"] = reader.string(); + break; + case 3: + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + case 10: + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + case 11: + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + case 4: + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + case 7: + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 8: + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + case 9: + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + case 12: + message.syntax = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + case 8: + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + case 7: + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + case 9: + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + case 10: + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + case 3: + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 3: + message.number = reader.int32(); + break; + case 4: + message.label = reader.int32(); + break; + case 5: + message.type = reader.int32(); + break; + case 6: + message.typeName = reader.string(); + break; + case 2: + message.extendee = reader.string(); + break; + case 7: + message.defaultValue = reader.string(); + break; + case 9: + message.oneofIndex = reader.int32(); + break; + case 10: + message.jsonName = reader.string(); + break; + case 8: + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + case 17: + message.proto3Optional = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + } + switch (object.type) { + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.number = reader.int32(); + break; + case 3: + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.inputType = reader.string(); + break; + case 3: + message.outputType = reader.string(); + break; + case 4: + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + case 5: + message.clientStreaming = reader.bool(); + break; + case 6: + message.serverStreaming = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions phpGenericServices. + * @member {boolean} phpGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices")) + writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.javaPackage = reader.string(); + break; + case 8: + message.javaOuterClassname = reader.string(); + break; + case 10: + message.javaMultipleFiles = reader.bool(); + break; + case 20: + message.javaGenerateEqualsAndHash = reader.bool(); + break; + case 27: + message.javaStringCheckUtf8 = reader.bool(); + break; + case 9: + message.optimizeFor = reader.int32(); + break; + case 11: + message.goPackage = reader.string(); + break; + case 16: + message.ccGenericServices = reader.bool(); + break; + case 17: + message.javaGenericServices = reader.bool(); + break; + case 18: + message.pyGenericServices = reader.bool(); + break; + case 42: + message.phpGenericServices = reader.bool(); + break; + case 23: + message.deprecated = reader.bool(); + break; + case 31: + message.ccEnableArenas = reader.bool(); + break; + case 36: + message.objcClassPrefix = reader.string(); + break; + case 37: + message.csharpNamespace = reader.string(); + break; + case 39: + message.swiftPrefix = reader.string(); + break; + case 40: + message.phpClassPrefix = reader.string(); + break; + case 41: + message.phpNamespace = reader.string(); + break; + case 44: + message.phpMetadataNamespace = reader.string(); + break; + case 45: + message.rubyPackage = reader.string(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + if (typeof message.phpGenericServices !== "boolean") + return "phpGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.phpGenericServices != null) + message.phpGenericServices = Boolean(object.phpGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpGenericServices = false; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + object.phpGenericServices = message.phpGenericServices; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.messageSetWireFormat = reader.bool(); + break; + case 2: + message.noStandardDescriptorAccessor = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 7: + message.mapEntry = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.ctype = reader.int32(); + break; + case 2: + message.packed = reader.bool(); + break; + case 6: + message.jstype = reader.int32(); + break; + case 5: + message.lazy = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 10: + message.weak = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.allowAlias = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.deprecated = false; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1049: + message[".google.api.defaultHost"] = reader.string(); + break; + case 1050: + message[".google.api.oauthScopes"] = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 34: + message.idempotencyLevel = reader.int32(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 72295728: + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + case 1051: + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + case 3: + message.identifierValue = reader.string(); + break; + case 4: + message.positiveIntValue = reader.uint64(); + break; + case 5: + message.negativeIntValue = reader.int64(); + break; + case 6: + message.doubleValue = reader.double(); + break; + case 7: + message.stringValue = reader.bytes(); + break; + case 8: + message.aggregateValue = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.namePart = reader.string(); + break; + case 2: + message.isExtension = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + case 2: + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + case 3: + message.leadingComments = reader.string(); + break; + case 4: + message.trailingComments = reader.string(); + break; + case 6: + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + case 2: + message.sourceFile = reader.string(); + break; + case 3: + message.begin = reader.int32(); + break; + case 4: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Any = (function() { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type_url = reader.string(); + break; + case 2: + message.value = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) + return object; + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Any; + })(); + + return protobuf; + })(); + + return google; + })(); + + return $root; +}); diff --git a/packages/google-cloud-gkeconnect-gateway/protos/protos.json b/packages/google-cloud-gkeconnect-gateway/protos/protos.json new file mode 100644 index 00000000000..34b005d1551 --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/protos/protos.json @@ -0,0 +1,1152 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "gkeconnect": { + "nested": { + "gateway": { + "nested": { + "v1beta1": { + "options": { + "csharp_namespace": "Google.Cloud.GkeConnect.Gateway.V1Beta1", + "go_package": "google.golang.org/genproto/googleapis/cloud/gkeconnect/gateway/v1beta1;gateway", + "java_multiple_files": true, + "java_outer_classname": "GatewayProto", + "java_package": "com.google.cloud.gkeconnect.gateway.v1beta1", + "php_namespace": "Google\\Cloud\\GkeConnect\\Gateway\\V1beta1", + "ruby_package": "Google::Cloud::GkeConnect::Gateway::V1beta1" + }, + "nested": { + "GatewayService": { + "options": { + "(google.api.default_host)": "connectgateway.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "GetResource": { + "requestType": "google.api.HttpBody", + "responseType": "google.api.HttpBody", + "options": { + "(google.api.http).get": "/v1beta1/**" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/**" + } + } + ] + }, + "PostResource": { + "requestType": "google.api.HttpBody", + "responseType": "google.api.HttpBody", + "options": { + "(google.api.http).post": "/v1beta1/**" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/**" + } + } + ] + }, + "DeleteResource": { + "requestType": "google.api.HttpBody", + "responseType": "google.api.HttpBody", + "options": { + "(google.api.http).delete": "/v1beta1/**" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta1/**" + } + } + ] + }, + "PutResource": { + "requestType": "google.api.HttpBody", + "responseType": "google.api.HttpBody", + "options": { + "(google.api.http).put": "/v1beta1/**" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "put": "/v1beta1/**" + } + } + ] + }, + "PatchResource": { + "requestType": "google.api.HttpBody", + "responseType": "google.api.HttpBody", + "options": { + "(google.api.http).patch": "/v1beta1/**" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta1/**" + } + } + ] + } + } + } + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/httpbody;httpbody", + "java_multiple_files": true, + "java_outer_classname": "HttpBodyProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "HttpBody": { + "fields": { + "contentType": { + "type": "string", + "id": 1 + }, + "data": { + "type": "bytes", + "id": 2 + }, + "extensions": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 + } + } + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "FileDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + } + } + }, + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "FieldDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REQUIRED": 2, + "LABEL_REPEATED": 3 + } + } + } + }, + "OneofDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "phpGenericServices": { + "type": "bool", + "id": 42, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + } + } + }, + "OneofOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + } + } + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/google-cloud-gkeconnect-gateway/samples/package.json b/packages/google-cloud-gkeconnect-gateway/samples/package.json new file mode 100644 index 00000000000..d66461a889f --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/samples/package.json @@ -0,0 +1,23 @@ +{ + "name": "nodejs-connect-gateway", + "private": true, + "license": "Apache-2.0", + "author": "Google LLC", + "engines": { + "node": ">=10" + }, + "files": [ + "*.js" + ], + "scripts": { + "test": "c8 mocha --timeout 600000 test/*.js" + }, + "dependencies": { + "@google-cloud/connect-gateway": "^0.1.0" + }, + "devDependencies": { + "c8": "^7.1.0", + "chai": "^4.2.0", + "mocha": "^8.0.0" + } +} diff --git a/packages/google-cloud-gkeconnect-gateway/samples/quickstart.js b/packages/google-cloud-gkeconnect-gateway/samples/quickstart.js new file mode 100644 index 00000000000..c23a67f2b58 --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/samples/quickstart.js @@ -0,0 +1,50 @@ +// 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 +// +// https://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. +// + +'use strict'; + +async function main() { + + // [START nodejs_connect_gateway_quickstart] + // Imports the Google Cloud client library + + // remove this line after package is released + // eslint-disable-next-line node/no-missing-require + const {GatewayServiceClient} = require('@google-cloud/connect-gateway'); + + // TODO(developer): replace with your prefered project ID. + // const projectId = 'my-project' + + // Creates a client + // eslint-disable-next-line no-unused-vars + const client = new {GatewayServiceClient}(); + + //TODO(library generator): write the actual function you will be testing + async function doSomething() { + console.log('DPE! Change this code so that it shows how to use the library! See comments below on structure.') + // const [thing] = await client.methodName({ + // }); + // console.info(thing); + } + doSomething(); + // [END nodejs_connect_gateway_quickstart] +} + +main(...process.argv.slice(2)).catch(err => { + console.error(err.message); + process.exitCode = 1; +}); +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); diff --git a/packages/google-cloud-gkeconnect-gateway/samples/test/quickstart.js b/packages/google-cloud-gkeconnect-gateway/samples/test/quickstart.js new file mode 100644 index 00000000000..2622e798b38 --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/samples/test/quickstart.js @@ -0,0 +1,53 @@ +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +const path = require('path'); +const cp = require('child_process'); +const {before, describe, it} = require('mocha'); +// eslint-disable-next-line node/no-missing-require +const {GatewayServiceClient} = require('@google-cloud/connect-gateway'); +// eslint-disable-next-line no-unused-vars, node/no-missing-require +const {assert} = require('chai'); + +const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); + +const cwd = path.join(__dirname, '..'); + +const client = new {GatewayServiceClient}(); + +describe('Quickstart', () => { + //TODO: remove this if not using the projectId + // eslint-disable-next-line no-unused-vars + let projectId; + + before(async () => { + // eslint-disable-next-line no-unused-vars + projectId = await client.getProjectId(); + }); + + it('should run quickstart', async () => { + //TODO: remove this line + // eslint-disable-next-line no-unused-vars + const stdout = execSync( + `node ./quickstart.js`, + {cwd} + ); + //assert(stdout, stdout !== null); + }); +}); diff --git a/packages/google-cloud-gkeconnect-gateway/src/index.ts b/packages/google-cloud-gkeconnect-gateway/src/index.ts new file mode 100644 index 00000000000..71ea0d415d6 --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/src/index.ts @@ -0,0 +1,27 @@ +// Copyright 2020 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by synthtool. ** +// ** https://github.com/googleapis/synthtool ** +// ** All changes to this file may be overwritten. ** + +import * as v1beta1 from './v1beta1'; + +const GatewayServiceClient = v1beta1.GatewayServiceClient; +type GatewayServiceClient = v1beta1.GatewayServiceClient; + +export {v1beta1, GatewayServiceClient}; +export default {v1beta1, GatewayServiceClient}; +import * as protos from '../protos/protos'; +export {protos}; diff --git a/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gapic_metadata.json b/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gapic_metadata.json new file mode 100644 index 00000000000..47d0a762ed0 --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gapic_metadata.json @@ -0,0 +1,73 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.gkeconnect.gateway.v1beta1", + "libraryPackage": "@google-cloud/gateway", + "services": { + "GatewayService": { + "clients": { + "grpc": { + "libraryClient": "GatewayServiceClient", + "rpcs": { + "GetResource": { + "methods": [ + "getResource" + ] + }, + "PostResource": { + "methods": [ + "postResource" + ] + }, + "DeleteResource": { + "methods": [ + "deleteResource" + ] + }, + "PutResource": { + "methods": [ + "putResource" + ] + }, + "PatchResource": { + "methods": [ + "patchResource" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "GatewayServiceClient", + "rpcs": { + "GetResource": { + "methods": [ + "getResource" + ] + }, + "PostResource": { + "methods": [ + "postResource" + ] + }, + "DeleteResource": { + "methods": [ + "deleteResource" + ] + }, + "PutResource": { + "methods": [ + "putResource" + ] + }, + "PatchResource": { + "methods": [ + "patchResource" + ] + } + } + } + } + } + } +} diff --git a/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts b/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts new file mode 100644 index 00000000000..5f2e22baca6 --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts @@ -0,0 +1,707 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import * as gax from 'google-gax'; +import {Callback, CallOptions, Descriptors, ClientOptions} from 'google-gax'; + +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1beta1/gateway_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './gateway_service_client_config.json'; + +const version = require('../../../package.json').version; + +/** + * Gateway service is a public API which works as a Kubernetes resource model + * proxy between end users and registered Kubernetes clusters. Each RPC in this + * service matches with an HTTP verb. End user will initiate kubectl commands + * against the Gateway service, and Gateway service will forward user requests + * to clusters. + * @class + * @memberof v1beta1 + */ +export class GatewayServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + innerApiCalls: {[name: string]: Function}; + gatewayServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of GatewayServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. + * In fallback mode, a special browser-compatible transport implementation is used + * instead of gRPC transport. In browser context (if the `window` object is defined) + * the fallback mode is enabled automatically; set `options.fallback` to `false` + * if you need to override this behavior. + */ + constructor(opts?: ClientOptions) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof GatewayServiceClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gax.fallback : gax; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.gkeconnect.gateway.v1beta1.GatewayService', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.gatewayServiceStub) { + return this.gatewayServiceStub; + } + + // Put together the "service stub" for + // google.cloud.gkeconnect.gateway.v1beta1.GatewayService. + this.gatewayServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.gkeconnect.gateway.v1beta1.GatewayService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.gkeconnect.gateway.v1beta1 + .GatewayService, + this._opts + ) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const gatewayServiceStubMethods = [ + 'getResource', + 'postResource', + 'deleteResource', + 'putResource', + 'patchResource', + ]; + for (const methodName of gatewayServiceStubMethods) { + const callPromise = this.gatewayServiceStub.then( + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const descriptor = undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.gatewayServiceStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'connectgateway.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'connectgateway.googleapis.com'; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return ['https://www.googleapis.com/auth/cloud-platform']; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + getResource( + request: protos.google.api.IHttpBody, + options?: CallOptions + ): Promise< + [ + protos.google.api.IHttpBody, + protos.google.api.IHttpBody | undefined, + {} | undefined + ] + >; + getResource( + request: protos.google.api.IHttpBody, + options: CallOptions, + callback: Callback< + protos.google.api.IHttpBody, + protos.google.api.IHttpBody | null | undefined, + {} | null | undefined + > + ): void; + getResource( + request: protos.google.api.IHttpBody, + callback: Callback< + protos.google.api.IHttpBody, + protos.google.api.IHttpBody | null | undefined, + {} | null | undefined + > + ): void; + /** + * GetResource performs an HTTP GET request on the Kubernetes API Server. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.contentType + * The HTTP Content-Type header value specifying the content type of the body. + * @param {Buffer} request.data + * The HTTP request/response body as raw binary. + * @param {number[]} request.extensions + * Application specific response metadata. Must be set in the first response + * for streaming APIs. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [HttpBody]{@link google.api.HttpBody}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.getResource(request); + */ + getResource( + request: protos.google.api.IHttpBody, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.api.IHttpBody, + protos.google.api.IHttpBody | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.api.IHttpBody, + protos.google.api.IHttpBody | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.api.IHttpBody, + protos.google.api.IHttpBody | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + this.initialize(); + return this.innerApiCalls.getResource(request, options, callback); + } + postResource( + request: protos.google.api.IHttpBody, + options?: CallOptions + ): Promise< + [ + protos.google.api.IHttpBody, + protos.google.api.IHttpBody | undefined, + {} | undefined + ] + >; + postResource( + request: protos.google.api.IHttpBody, + options: CallOptions, + callback: Callback< + protos.google.api.IHttpBody, + protos.google.api.IHttpBody | null | undefined, + {} | null | undefined + > + ): void; + postResource( + request: protos.google.api.IHttpBody, + callback: Callback< + protos.google.api.IHttpBody, + protos.google.api.IHttpBody | null | undefined, + {} | null | undefined + > + ): void; + /** + * PostResource performs an HTTP POST on the Kubernetes API Server. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.contentType + * The HTTP Content-Type header value specifying the content type of the body. + * @param {Buffer} request.data + * The HTTP request/response body as raw binary. + * @param {number[]} request.extensions + * Application specific response metadata. Must be set in the first response + * for streaming APIs. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [HttpBody]{@link google.api.HttpBody}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.postResource(request); + */ + postResource( + request: protos.google.api.IHttpBody, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.api.IHttpBody, + protos.google.api.IHttpBody | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.api.IHttpBody, + protos.google.api.IHttpBody | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.api.IHttpBody, + protos.google.api.IHttpBody | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + this.initialize(); + return this.innerApiCalls.postResource(request, options, callback); + } + deleteResource( + request: protos.google.api.IHttpBody, + options?: CallOptions + ): Promise< + [ + protos.google.api.IHttpBody, + protos.google.api.IHttpBody | undefined, + {} | undefined + ] + >; + deleteResource( + request: protos.google.api.IHttpBody, + options: CallOptions, + callback: Callback< + protos.google.api.IHttpBody, + protos.google.api.IHttpBody | null | undefined, + {} | null | undefined + > + ): void; + deleteResource( + request: protos.google.api.IHttpBody, + callback: Callback< + protos.google.api.IHttpBody, + protos.google.api.IHttpBody | null | undefined, + {} | null | undefined + > + ): void; + /** + * DeleteResource performs an HTTP DELETE on the Kubernetes API Server. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.contentType + * The HTTP Content-Type header value specifying the content type of the body. + * @param {Buffer} request.data + * The HTTP request/response body as raw binary. + * @param {number[]} request.extensions + * Application specific response metadata. Must be set in the first response + * for streaming APIs. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [HttpBody]{@link google.api.HttpBody}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.deleteResource(request); + */ + deleteResource( + request: protos.google.api.IHttpBody, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.api.IHttpBody, + protos.google.api.IHttpBody | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.api.IHttpBody, + protos.google.api.IHttpBody | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.api.IHttpBody, + protos.google.api.IHttpBody | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + this.initialize(); + return this.innerApiCalls.deleteResource(request, options, callback); + } + putResource( + request: protos.google.api.IHttpBody, + options?: CallOptions + ): Promise< + [ + protos.google.api.IHttpBody, + protos.google.api.IHttpBody | undefined, + {} | undefined + ] + >; + putResource( + request: protos.google.api.IHttpBody, + options: CallOptions, + callback: Callback< + protos.google.api.IHttpBody, + protos.google.api.IHttpBody | null | undefined, + {} | null | undefined + > + ): void; + putResource( + request: protos.google.api.IHttpBody, + callback: Callback< + protos.google.api.IHttpBody, + protos.google.api.IHttpBody | null | undefined, + {} | null | undefined + > + ): void; + /** + * PutResource performs an HTTP PUT on the Kubernetes API Server. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.contentType + * The HTTP Content-Type header value specifying the content type of the body. + * @param {Buffer} request.data + * The HTTP request/response body as raw binary. + * @param {number[]} request.extensions + * Application specific response metadata. Must be set in the first response + * for streaming APIs. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [HttpBody]{@link google.api.HttpBody}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.putResource(request); + */ + putResource( + request: protos.google.api.IHttpBody, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.api.IHttpBody, + protos.google.api.IHttpBody | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.api.IHttpBody, + protos.google.api.IHttpBody | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.api.IHttpBody, + protos.google.api.IHttpBody | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + this.initialize(); + return this.innerApiCalls.putResource(request, options, callback); + } + patchResource( + request: protos.google.api.IHttpBody, + options?: CallOptions + ): Promise< + [ + protos.google.api.IHttpBody, + protos.google.api.IHttpBody | undefined, + {} | undefined + ] + >; + patchResource( + request: protos.google.api.IHttpBody, + options: CallOptions, + callback: Callback< + protos.google.api.IHttpBody, + protos.google.api.IHttpBody | null | undefined, + {} | null | undefined + > + ): void; + patchResource( + request: protos.google.api.IHttpBody, + callback: Callback< + protos.google.api.IHttpBody, + protos.google.api.IHttpBody | null | undefined, + {} | null | undefined + > + ): void; + /** + * PatchResource performs an HTTP PATCH on the Kubernetes API Server. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.contentType + * The HTTP Content-Type header value specifying the content type of the body. + * @param {Buffer} request.data + * The HTTP request/response body as raw binary. + * @param {number[]} request.extensions + * Application specific response metadata. Must be set in the first response + * for streaming APIs. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [HttpBody]{@link google.api.HttpBody}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.patchResource(request); + */ + patchResource( + request: protos.google.api.IHttpBody, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.api.IHttpBody, + protos.google.api.IHttpBody | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.api.IHttpBody, + protos.google.api.IHttpBody | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.api.IHttpBody, + protos.google.api.IHttpBody | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + this.initialize(); + return this.innerApiCalls.patchResource(request, options, callback); + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + this.initialize(); + if (!this._terminated) { + return this.gatewayServiceStub!.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client_config.json b/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client_config.json new file mode 100644 index 00000000000..d733656e755 --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client_config.json @@ -0,0 +1,46 @@ +{ + "interfaces": { + "google.cloud.gkeconnect.gateway.v1beta1.GatewayService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetResource": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "PostResource": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteResource": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "PutResource": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "PatchResource": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_proto_list.json b/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_proto_list.json new file mode 100644 index 00000000000..634a5e135a8 --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_proto_list.json @@ -0,0 +1,3 @@ +[ + "../../protos/google/cloud/gkeconnect/gateway/v1beta1/gateway.proto" +] diff --git a/packages/google-cloud-gkeconnect-gateway/src/v1beta1/index.ts b/packages/google-cloud-gkeconnect-gateway/src/v1beta1/index.ts new file mode 100644 index 00000000000..62d52d4ade6 --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/src/v1beta1/index.ts @@ -0,0 +1,19 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +export {GatewayServiceClient} from './gateway_service_client'; diff --git a/packages/google-cloud-gkeconnect-gateway/system-test/fixtures/sample/src/index.js b/packages/google-cloud-gkeconnect-gateway/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..765cb92b68f --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/system-test/fixtures/sample/src/index.js @@ -0,0 +1,26 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* eslint-disable node/no-missing-require, no-unused-vars */ +const gateway = require('@google-cloud/gateway'); + +function main() { + const gatewayServiceClient = new gateway.GatewayServiceClient(); +} + +main(); diff --git a/packages/google-cloud-gkeconnect-gateway/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-gkeconnect-gateway/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..8edccd04737 --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,32 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {GatewayServiceClient} from '@google-cloud/gateway'; + +// check that the client class type name can be used +function doStuffWithGatewayServiceClient(client: GatewayServiceClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const gatewayServiceClient = new GatewayServiceClient(); + doStuffWithGatewayServiceClient(gatewayServiceClient); +} + +main(); diff --git a/packages/google-cloud-gkeconnect-gateway/system-test/install.ts b/packages/google-cloud-gkeconnect-gateway/system-test/install.ts new file mode 100644 index 00000000000..d2d61c0396f --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/system-test/install.ts @@ -0,0 +1,51 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; + +describe('📦 pack-n-play test', () => { + it('TypeScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync( + './system-test/fixtures/sample/src/index.ts' + ).toString(), + }, + }; + await packNTest(options); + }); + + it('JavaScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + ts: readFileSync( + './system-test/fixtures/sample/src/index.js' + ).toString(), + }, + }; + await packNTest(options); + }); +}); diff --git a/packages/google-cloud-gkeconnect-gateway/test/gapic_gateway_service_v1beta1.ts b/packages/google-cloud-gkeconnect-gateway/test/gapic_gateway_service_v1beta1.ts new file mode 100644 index 00000000000..9bff4c07bfc --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/test/gapic_gateway_service_v1beta1.ts @@ -0,0 +1,524 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as gatewayserviceModule from '../src'; + +import {protobuf} from 'google-gax'; + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +describe('v1beta1.GatewayServiceClient', () => { + it('has servicePath', () => { + const servicePath = + gatewayserviceModule.v1beta1.GatewayServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + gatewayserviceModule.v1beta1.GatewayServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = gatewayserviceModule.v1beta1.GatewayServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new gatewayserviceModule.v1beta1.GatewayServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new gatewayserviceModule.v1beta1.GatewayServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new gatewayserviceModule.v1beta1.GatewayServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.gatewayServiceStub, undefined); + await client.initialize(); + assert(client.gatewayServiceStub); + }); + + it('has close method', () => { + const client = new gatewayserviceModule.v1beta1.GatewayServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new gatewayserviceModule.v1beta1.GatewayServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new gatewayserviceModule.v1beta1.GatewayServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + + describe('getResource', () => { + it('invokes getResource without error', async () => { + const client = new gatewayserviceModule.v1beta1.GatewayServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.api.HttpBody()); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.api.HttpBody() + ); + client.innerApiCalls.getResource = stubSimpleCall(expectedResponse); + const [response] = await client.getResource(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getResource as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getResource without error using callback', async () => { + const client = new gatewayserviceModule.v1beta1.GatewayServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.api.HttpBody()); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.api.HttpBody() + ); + client.innerApiCalls.getResource = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getResource( + request, + (err?: Error | null, result?: protos.google.api.IHttpBody | null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getResource as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getResource with error', async () => { + const client = new gatewayserviceModule.v1beta1.GatewayServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.api.HttpBody()); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.getResource = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getResource(request), expectedError); + assert( + (client.innerApiCalls.getResource as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('postResource', () => { + it('invokes postResource without error', async () => { + const client = new gatewayserviceModule.v1beta1.GatewayServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.api.HttpBody()); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.api.HttpBody() + ); + client.innerApiCalls.postResource = stubSimpleCall(expectedResponse); + const [response] = await client.postResource(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.postResource as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes postResource without error using callback', async () => { + const client = new gatewayserviceModule.v1beta1.GatewayServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.api.HttpBody()); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.api.HttpBody() + ); + client.innerApiCalls.postResource = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.postResource( + request, + (err?: Error | null, result?: protos.google.api.IHttpBody | null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.postResource as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes postResource with error', async () => { + const client = new gatewayserviceModule.v1beta1.GatewayServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.api.HttpBody()); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.postResource = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.postResource(request), expectedError); + assert( + (client.innerApiCalls.postResource as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('deleteResource', () => { + it('invokes deleteResource without error', async () => { + const client = new gatewayserviceModule.v1beta1.GatewayServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.api.HttpBody()); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.api.HttpBody() + ); + client.innerApiCalls.deleteResource = stubSimpleCall(expectedResponse); + const [response] = await client.deleteResource(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteResource as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteResource without error using callback', async () => { + const client = new gatewayserviceModule.v1beta1.GatewayServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.api.HttpBody()); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.api.HttpBody() + ); + client.innerApiCalls.deleteResource = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteResource( + request, + (err?: Error | null, result?: protos.google.api.IHttpBody | null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteResource as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteResource with error', async () => { + const client = new gatewayserviceModule.v1beta1.GatewayServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.api.HttpBody()); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteResource = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteResource(request), expectedError); + assert( + (client.innerApiCalls.deleteResource as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('putResource', () => { + it('invokes putResource without error', async () => { + const client = new gatewayserviceModule.v1beta1.GatewayServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.api.HttpBody()); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.api.HttpBody() + ); + client.innerApiCalls.putResource = stubSimpleCall(expectedResponse); + const [response] = await client.putResource(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.putResource as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes putResource without error using callback', async () => { + const client = new gatewayserviceModule.v1beta1.GatewayServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.api.HttpBody()); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.api.HttpBody() + ); + client.innerApiCalls.putResource = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.putResource( + request, + (err?: Error | null, result?: protos.google.api.IHttpBody | null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.putResource as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes putResource with error', async () => { + const client = new gatewayserviceModule.v1beta1.GatewayServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.api.HttpBody()); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.putResource = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.putResource(request), expectedError); + assert( + (client.innerApiCalls.putResource as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('patchResource', () => { + it('invokes patchResource without error', async () => { + const client = new gatewayserviceModule.v1beta1.GatewayServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.api.HttpBody()); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.api.HttpBody() + ); + client.innerApiCalls.patchResource = stubSimpleCall(expectedResponse); + const [response] = await client.patchResource(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.patchResource as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes patchResource without error using callback', async () => { + const client = new gatewayserviceModule.v1beta1.GatewayServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.api.HttpBody()); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.api.HttpBody() + ); + client.innerApiCalls.patchResource = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.patchResource( + request, + (err?: Error | null, result?: protos.google.api.IHttpBody | null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.patchResource as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes patchResource with error', async () => { + const client = new gatewayserviceModule.v1beta1.GatewayServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.api.HttpBody()); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.patchResource = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.patchResource(request), expectedError); + assert( + (client.innerApiCalls.patchResource as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); +}); diff --git a/packages/google-cloud-gkeconnect-gateway/tsconfig.json b/packages/google-cloud-gkeconnect-gateway/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2018", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts" + ] +} diff --git a/packages/google-cloud-gkeconnect-gateway/webpack.config.js b/packages/google-cloud-gkeconnect-gateway/webpack.config.js new file mode 100644 index 00000000000..fdb6f321889 --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/webpack.config.js @@ -0,0 +1,64 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// https://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. + +const path = require('path'); + +module.exports = { + entry: './src/index.ts', + output: { + library: 'GatewayService', + filename: './gateway-service.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/, + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]gtoken/, + use: 'null-loader', + }, + ], + }, + mode: 'production', +}; From 143205de6a68d513ab582a9b7dd67895a6b77742 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Tue, 29 Jun 2021 11:26:51 -0400 Subject: [PATCH 034/254] fix(deps): google-gax v2.17.0 with mTLS (#57) --- packages/google-cloud-policytroubleshooter/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-policytroubleshooter/package.json b/packages/google-cloud-policytroubleshooter/package.json index a6f2a24819a..8ae8cb04610 100644 --- a/packages/google-cloud-policytroubleshooter/package.json +++ b/packages/google-cloud-policytroubleshooter/package.json @@ -39,7 +39,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^2.12.0" + "google-gax": "^2.17.0" }, "devDependencies": { "@types/mocha": "^8.0.4", From f70e7db593f36b9ea447a38843254d6a2aa8870d Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Tue, 29 Jun 2021 11:27:11 -0400 Subject: [PATCH 035/254] fix(deps): google-gax v2.17.0 with mTLS (#16) --- packages/google-cloud-shell/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-shell/package.json b/packages/google-cloud-shell/package.json index 740a9d4c45f..2a2eafd4d38 100644 --- a/packages/google-cloud-shell/package.json +++ b/packages/google-cloud-shell/package.json @@ -39,7 +39,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^2.12.0" + "google-gax": "^2.17.0" }, "devDependencies": { "@types/mocha": "^8.2.2", From fdd52ab11c765ba813eb87c60a1b2ddb045a1c0a Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 29 Jun 2021 15:50:57 +0000 Subject: [PATCH 036/254] chore: release 1.0.3 (#58) :robot: I have created a release \*beep\* \*boop\* --- ### [1.0.3](https://www.github.com/googleapis/nodejs-policy-troubleshooter/compare/v1.0.2...v1.0.3) (2021-06-29) ### Bug Fixes * **deps:** google-gax v2.17.0 with mTLS ([#57](https://www.github.com/googleapis/nodejs-policy-troubleshooter/issues/57)) ([59bbea3](https://www.github.com/googleapis/nodejs-policy-troubleshooter/commit/59bbea300af0b1e36236cef7da3120507e9f321c)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-policytroubleshooter/CHANGELOG.md | 7 +++++++ packages/google-cloud-policytroubleshooter/package.json | 2 +- .../google-cloud-policytroubleshooter/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-policytroubleshooter/CHANGELOG.md b/packages/google-cloud-policytroubleshooter/CHANGELOG.md index 643f0f86d9f..081c6ee184c 100644 --- a/packages/google-cloud-policytroubleshooter/CHANGELOG.md +++ b/packages/google-cloud-policytroubleshooter/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.0.3](https://www.github.com/googleapis/nodejs-policy-troubleshooter/compare/v1.0.2...v1.0.3) (2021-06-29) + + +### Bug Fixes + +* **deps:** google-gax v2.17.0 with mTLS ([#57](https://www.github.com/googleapis/nodejs-policy-troubleshooter/issues/57)) ([59bbea3](https://www.github.com/googleapis/nodejs-policy-troubleshooter/commit/59bbea300af0b1e36236cef7da3120507e9f321c)) + ### [1.0.2](https://www.github.com/googleapis/nodejs-policy-troubleshooter/compare/v1.0.1...v1.0.2) (2021-05-25) diff --git a/packages/google-cloud-policytroubleshooter/package.json b/packages/google-cloud-policytroubleshooter/package.json index 8ae8cb04610..66442baee5e 100644 --- a/packages/google-cloud-policytroubleshooter/package.json +++ b/packages/google-cloud-policytroubleshooter/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/policy-troubleshooter", - "version": "1.0.2", + "version": "1.0.3", "description": "Policytroubleshooter client for Node.js", "repository": "googleapis/nodejs-policy-troubleshooter", "license": "Apache-2.0", diff --git a/packages/google-cloud-policytroubleshooter/samples/package.json b/packages/google-cloud-policytroubleshooter/samples/package.json index 27f4524b5df..725bacf007b 100644 --- a/packages/google-cloud-policytroubleshooter/samples/package.json +++ b/packages/google-cloud-policytroubleshooter/samples/package.json @@ -14,7 +14,7 @@ }, "dependencies": { "@google-cloud/local-auth": "^1.0.0", - "@google-cloud/policy-troubleshooter": "^1.0.2" + "@google-cloud/policy-troubleshooter": "^1.0.3" }, "devDependencies": { "c8": "^7.1.0", From 094b52a24ecd260168f58911fc7ad9b769f3c8b6 Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Wed, 30 Jun 2021 15:18:38 -0400 Subject: [PATCH 037/254] feat: initial samples and tests (#6) * feat: initial samples and tests See https://github.com/googleapis/repo-automation-bots/blob/master/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../.repo-metadata.json | 6 +-- .../google-cloud-gkeconnect-gateway/README.md | 41 +++++++++++---- .../linkinator.config.json | 12 ++++- .../package.json | 4 +- .../protos/protos.js | 2 +- .../samples/README.md | 50 +++++++++++++++++++ .../samples/package.json | 2 +- .../samples/quickstart.js | 20 +------- .../samples/test/quickstart.js | 24 ++------- .../src/v1beta1/gateway_service_client.ts | 20 ++++---- .../system-test/fixtures/sample/src/index.js | 2 +- .../system-test/fixtures/sample/src/index.ts | 2 +- 12 files changed, 116 insertions(+), 69 deletions(-) create mode 100644 packages/google-cloud-gkeconnect-gateway/samples/README.md diff --git a/packages/google-cloud-gkeconnect-gateway/.repo-metadata.json b/packages/google-cloud-gkeconnect-gateway/.repo-metadata.json index 443b8a775f6..f958af829b8 100644 --- a/packages/google-cloud-gkeconnect-gateway/.repo-metadata.json +++ b/packages/google-cloud-gkeconnect-gateway/.repo-metadata.json @@ -3,11 +3,11 @@ "name_pretty": "API Gateway", "product_documentation": "https://cloud.google.com/api-gateway/", "client_documentation": "https://cloud.google.com/anthos/multicluster-management/gateway/using", - "issue_tracker": "https://github.com/googleapis/nodejs-connect-gateway/issues", + "issue_tracker": "https://github.com/googleapis/nodejs-gke-connect-gateway/issues", "release_level": "BETA", "language": "nodejs", - "repo": "googleapis/nodejs-connect-gateway", - "distribution_name": "@google-cloud/connect-gateway", + "repo": "googleapis/nodejs-gke-connect-gateway", + "distribution_name": "@google-cloud/gke-connect-gateway", "api_id": "gateway.googleapis.com", "default_version": "v1beta1", "requires_billing": true diff --git a/packages/google-cloud-gkeconnect-gateway/README.md b/packages/google-cloud-gkeconnect-gateway/README.md index 5a8dffd3e9c..424b43dd63c 100644 --- a/packages/google-cloud-gkeconnect-gateway/README.md +++ b/packages/google-cloud-gkeconnect-gateway/README.md @@ -2,11 +2,11 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [API Gateway: Node.js Client](https://github.com/googleapis/nodejs-connect-gateway) +# [API Gateway: Node.js Client](https://github.com/googleapis/nodejs-gke-connect-gateway) [![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) -[![npm version](https://img.shields.io/npm/v/@google-cloud/connect-gateway.svg)](https://www.npmjs.org/package/@google-cloud/connect-gateway) -[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-connect-gateway/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-connect-gateway) +[![npm version](https://img.shields.io/npm/v/@google-cloud/gke-connect-gateway.svg)](https://www.npmjs.org/package/@google-cloud/gke-connect-gateway) +[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-gke-connect-gateway/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-gke-connect-gateway) @@ -15,11 +15,11 @@ apigateway client for Node.js A comprehensive list of changes in each version may be found in -[the CHANGELOG](https://github.com/googleapis/nodejs-connect-gateway/blob/master/CHANGELOG.md). +[the CHANGELOG](https://github.com/googleapis/nodejs-gke-connect-gateway/blob/master/CHANGELOG.md). * [API Gateway Node.js Client API Reference][client-docs] * [API Gateway Documentation][product-docs] -* [github.com/googleapis/nodejs-connect-gateway](https://github.com/googleapis/nodejs-connect-gateway) +* [github.com/googleapis/nodejs-gke-connect-gateway](https://github.com/googleapis/nodejs-gke-connect-gateway) Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in [Client Libraries Explained][explained]. @@ -32,8 +32,8 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. * [Quickstart](#quickstart) * [Before you begin](#before-you-begin) * [Installing the client library](#installing-the-client-library) - - + * [Using the client library](#using-the-client-library) +* [Samples](#samples) * [Versioning](#versioning) * [Contributing](#contributing) * [License](#license) @@ -51,11 +51,32 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. ### Installing the client library ```bash -npm install @google-cloud/connect-gateway +npm install @google-cloud/gke-connect-gateway +``` + + +### Using the client library + +```javascript +// Imports the Google Cloud client library + +const {GatewayServiceClient} = require('@google-cloud/gke-connect-gateway'); + +// Creates a client +new GatewayServiceClient(); + ``` +## Samples + +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-gke-connect-gateway/tree/master/samples) directory. Each sample's `README.md` has instructions for running its sample. + +| Sample | Source Code | Try it | +| --------------------------- | --------------------------------- | ------ | +| Quickstart | [source code](https://github.com/googleapis/nodejs-gke-connect-gateway/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-gke-connect-gateway&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | + The [API Gateway Node.js Client API Reference][client-docs] documentation @@ -97,7 +118,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-connect-gateway/blob/master/CONTRIBUTING.md). +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-gke-connect-gateway/blob/master/CONTRIBUTING.md). Please note that this `README.md`, the `samples/README.md`, and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) @@ -109,7 +130,7 @@ to its template in this Apache Version 2.0 -See [LICENSE](https://github.com/googleapis/nodejs-connect-gateway/blob/master/LICENSE) +See [LICENSE](https://github.com/googleapis/nodejs-gke-connect-gateway/blob/master/LICENSE) [client-docs]: https://cloud.google.com/anthos/multicluster-management/gateway/using [product-docs]: https://cloud.google.com/api-gateway/ diff --git a/packages/google-cloud-gkeconnect-gateway/linkinator.config.json b/packages/google-cloud-gkeconnect-gateway/linkinator.config.json index 0947c2e0e5b..d2805b1c1df 100644 --- a/packages/google-cloud-gkeconnect-gateway/linkinator.config.json +++ b/packages/google-cloud-gkeconnect-gateway/linkinator.config.json @@ -1 +1,11 @@ -{"recurse":true,"skip":["https://codecov.io/gh/googleapis/","www.googleapis.com","img.shields.io"],"silent":true,"concurrency":10} \ No newline at end of file +{ + "recurse": true, + "skip": [ + "https://github.com/googleapis/nodejs-gke-connect-gateway/blob/master/CHANGELOG.md", + "https://codecov.io/gh/googleapis/", + "www.googleapis.com", + "img.shields.io" + ], + "silent": true, + "concurrency": 10 +} diff --git a/packages/google-cloud-gkeconnect-gateway/package.json b/packages/google-cloud-gkeconnect-gateway/package.json index 5949f27387c..cbf598553cd 100644 --- a/packages/google-cloud-gkeconnect-gateway/package.json +++ b/packages/google-cloud-gkeconnect-gateway/package.json @@ -1,8 +1,8 @@ { - "name": "@google-cloud/connect-gateway", + "name": "@google-cloud/gke-connect-gateway", "version": "0.1.0", "description": "apigateway client for Node.js", - "repository": "googleapis/googleapis/nodejs-connect-gateway", + "repository": "googleapis/nodejs-gke-connect-gateway", "license": "Apache-2.0", "author": "Google LLC", "main": "build/src/index.js", diff --git a/packages/google-cloud-gkeconnect-gateway/protos/protos.js b/packages/google-cloud-gkeconnect-gateway/protos/protos.js index 259d52d5d99..6a999ec0f21 100644 --- a/packages/google-cloud-gkeconnect-gateway/protos/protos.js +++ b/packages/google-cloud-gkeconnect-gateway/protos/protos.js @@ -28,7 +28,7 @@ var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; // Exported root namespace - var $root = $protobuf.roots._google_cloud_connect_gateway_protos || ($protobuf.roots._google_cloud_connect_gateway_protos = {}); + var $root = $protobuf.roots._google_cloud_gke_connect_gateway_protos || ($protobuf.roots._google_cloud_gke_connect_gateway_protos = {}); $root.google = (function() { diff --git a/packages/google-cloud-gkeconnect-gateway/samples/README.md b/packages/google-cloud-gkeconnect-gateway/samples/README.md new file mode 100644 index 00000000000..201efa1dcff --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/samples/README.md @@ -0,0 +1,50 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [API Gateway: Node.js Samples](https://github.com/googleapis/nodejs-gke-connect-gateway) + +[![Open in Cloud Shell][shell_img]][shell_link] + + + +## Table of Contents + +* [Before you begin](#before-you-begin) +* [Samples](#samples) + * [Quickstart](#quickstart) + +## Before you begin + +Before running the samples, make sure you've followed the steps outlined in +[Using the client library](https://github.com/googleapis/nodejs-gke-connect-gateway#using-the-client-library). + +`cd samples` + +`npm install` + +`cd ..` + +## Samples + + + +### Quickstart + +View the [source code](https://github.com/googleapis/nodejs-gke-connect-gateway/blob/master/samples/quickstart.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-gke-connect-gateway&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node samples/quickstart.js` + + + + + + +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-gke-connect-gateway&page=editor&open_in_editor=samples/README.md +[product-docs]: https://cloud.google.com/api-gateway/ diff --git a/packages/google-cloud-gkeconnect-gateway/samples/package.json b/packages/google-cloud-gkeconnect-gateway/samples/package.json index d66461a889f..b0522ba6c78 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/package.json +++ b/packages/google-cloud-gkeconnect-gateway/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/connect-gateway": "^0.1.0" + "@google-cloud/gke-connect-gateway": "^0.1.0" }, "devDependencies": { "c8": "^7.1.0", diff --git a/packages/google-cloud-gkeconnect-gateway/samples/quickstart.js b/packages/google-cloud-gkeconnect-gateway/samples/quickstart.js index c23a67f2b58..aa414d03f2d 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/quickstart.js +++ b/packages/google-cloud-gkeconnect-gateway/samples/quickstart.js @@ -14,29 +14,13 @@ 'use strict'; async function main() { - // [START nodejs_connect_gateway_quickstart] // Imports the Google Cloud client library - // remove this line after package is released - // eslint-disable-next-line node/no-missing-require - const {GatewayServiceClient} = require('@google-cloud/connect-gateway'); - - // TODO(developer): replace with your prefered project ID. - // const projectId = 'my-project' + const {GatewayServiceClient} = require('@google-cloud/gke-connect-gateway'); // Creates a client - // eslint-disable-next-line no-unused-vars - const client = new {GatewayServiceClient}(); - - //TODO(library generator): write the actual function you will be testing - async function doSomething() { - console.log('DPE! Change this code so that it shows how to use the library! See comments below on structure.') - // const [thing] = await client.methodName({ - // }); - // console.info(thing); - } - doSomething(); + new GatewayServiceClient(); // [END nodejs_connect_gateway_quickstart] } diff --git a/packages/google-cloud-gkeconnect-gateway/samples/test/quickstart.js b/packages/google-cloud-gkeconnect-gateway/samples/test/quickstart.js index 2622e798b38..77215edc24e 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/test/quickstart.js +++ b/packages/google-cloud-gkeconnect-gateway/samples/test/quickstart.js @@ -19,9 +19,7 @@ const path = require('path'); const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -// eslint-disable-next-line node/no-missing-require -const {GatewayServiceClient} = require('@google-cloud/connect-gateway'); +const {describe, it} = require('mocha'); // eslint-disable-next-line no-unused-vars, node/no-missing-require const {assert} = require('chai'); @@ -29,25 +27,9 @@ const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); const cwd = path.join(__dirname, '..'); -const client = new {GatewayServiceClient}(); - describe('Quickstart', () => { - //TODO: remove this if not using the projectId - // eslint-disable-next-line no-unused-vars - let projectId; - - before(async () => { - // eslint-disable-next-line no-unused-vars - projectId = await client.getProjectId(); - }); - it('should run quickstart', async () => { - //TODO: remove this line - // eslint-disable-next-line no-unused-vars - const stdout = execSync( - `node ./quickstart.js`, - {cwd} - ); - //assert(stdout, stdout !== null); + const stdout = execSync('node ./quickstart.js', {cwd}); + assert.equal(stdout, false); }); }); diff --git a/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts b/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts index 5f2e22baca6..372343fa528 100644 --- a/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts +++ b/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts @@ -278,7 +278,7 @@ export class GatewayServiceClient { // -- Service calls -- // ------------------- getResource( - request: protos.google.api.IHttpBody, + request?: protos.google.api.IHttpBody, options?: CallOptions ): Promise< [ @@ -327,7 +327,7 @@ export class GatewayServiceClient { * const [response] = await client.getResource(request); */ getResource( - request: protos.google.api.IHttpBody, + request?: protos.google.api.IHttpBody, optionsOrCallback?: | CallOptions | Callback< @@ -360,7 +360,7 @@ export class GatewayServiceClient { return this.innerApiCalls.getResource(request, options, callback); } postResource( - request: protos.google.api.IHttpBody, + request?: protos.google.api.IHttpBody, options?: CallOptions ): Promise< [ @@ -409,7 +409,7 @@ export class GatewayServiceClient { * const [response] = await client.postResource(request); */ postResource( - request: protos.google.api.IHttpBody, + request?: protos.google.api.IHttpBody, optionsOrCallback?: | CallOptions | Callback< @@ -442,7 +442,7 @@ export class GatewayServiceClient { return this.innerApiCalls.postResource(request, options, callback); } deleteResource( - request: protos.google.api.IHttpBody, + request?: protos.google.api.IHttpBody, options?: CallOptions ): Promise< [ @@ -491,7 +491,7 @@ export class GatewayServiceClient { * const [response] = await client.deleteResource(request); */ deleteResource( - request: protos.google.api.IHttpBody, + request?: protos.google.api.IHttpBody, optionsOrCallback?: | CallOptions | Callback< @@ -524,7 +524,7 @@ export class GatewayServiceClient { return this.innerApiCalls.deleteResource(request, options, callback); } putResource( - request: protos.google.api.IHttpBody, + request?: protos.google.api.IHttpBody, options?: CallOptions ): Promise< [ @@ -573,7 +573,7 @@ export class GatewayServiceClient { * const [response] = await client.putResource(request); */ putResource( - request: protos.google.api.IHttpBody, + request?: protos.google.api.IHttpBody, optionsOrCallback?: | CallOptions | Callback< @@ -606,7 +606,7 @@ export class GatewayServiceClient { return this.innerApiCalls.putResource(request, options, callback); } patchResource( - request: protos.google.api.IHttpBody, + request?: protos.google.api.IHttpBody, options?: CallOptions ): Promise< [ @@ -655,7 +655,7 @@ export class GatewayServiceClient { * const [response] = await client.patchResource(request); */ patchResource( - request: protos.google.api.IHttpBody, + request?: protos.google.api.IHttpBody, optionsOrCallback?: | CallOptions | Callback< diff --git a/packages/google-cloud-gkeconnect-gateway/system-test/fixtures/sample/src/index.js b/packages/google-cloud-gkeconnect-gateway/system-test/fixtures/sample/src/index.js index 765cb92b68f..e32669bfbf3 100644 --- a/packages/google-cloud-gkeconnect-gateway/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-gkeconnect-gateway/system-test/fixtures/sample/src/index.js @@ -17,7 +17,7 @@ // ** All changes to this file may be overwritten. ** /* eslint-disable node/no-missing-require, no-unused-vars */ -const gateway = require('@google-cloud/gateway'); +const gateway = require('@google-cloud/gke-connect-gateway'); function main() { const gatewayServiceClient = new gateway.GatewayServiceClient(); diff --git a/packages/google-cloud-gkeconnect-gateway/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-gkeconnect-gateway/system-test/fixtures/sample/src/index.ts index 8edccd04737..817c03b2a56 100644 --- a/packages/google-cloud-gkeconnect-gateway/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-gkeconnect-gateway/system-test/fixtures/sample/src/index.ts @@ -16,7 +16,7 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** -import {GatewayServiceClient} from '@google-cloud/gateway'; +import {GatewayServiceClient} from '@google-cloud/gke-connect-gateway'; // check that the client class type name can be used function doStuffWithGatewayServiceClient(client: GatewayServiceClient) { From e76604e333864d96e984d154499c6c7fdd49615f Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Wed, 30 Jun 2021 15:24:30 -0400 Subject: [PATCH 038/254] fix(deps): google-gax v2.17.0 with mTLS (#5) --- packages/google-cloud-gkeconnect-gateway/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-gkeconnect-gateway/package.json b/packages/google-cloud-gkeconnect-gateway/package.json index cbf598553cd..3ef446bd72a 100644 --- a/packages/google-cloud-gkeconnect-gateway/package.json +++ b/packages/google-cloud-gkeconnect-gateway/package.json @@ -39,7 +39,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^2.12.0" + "google-gax": "^2.17.0" }, "devDependencies": { "@types/mocha": "^8.2.2", From f347ca772d314949b26e9665a8e276c2c2765cd7 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 30 Jun 2021 12:36:08 -0700 Subject: [PATCH 039/254] chore: release 1.0.1 (#17) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-shell/CHANGELOG.md | 7 +++++++ packages/google-cloud-shell/package-lock.json | 2 +- packages/google-cloud-shell/package.json | 2 +- packages/google-cloud-shell/samples/package.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-shell/CHANGELOG.md b/packages/google-cloud-shell/CHANGELOG.md index db559d4486e..23c8dc54a92 100644 --- a/packages/google-cloud-shell/CHANGELOG.md +++ b/packages/google-cloud-shell/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.0.1](https://www.github.com/googleapis/nodejs-cloud-shell/compare/v1.0.0...v1.0.1) (2021-06-30) + + +### Bug Fixes + +* **deps:** google-gax v2.17.0 with mTLS ([#16](https://www.github.com/googleapis/nodejs-cloud-shell/issues/16)) ([8a0d38d](https://www.github.com/googleapis/nodejs-cloud-shell/commit/8a0d38df49000efdaa011f82cdc0f26af9c0468d)) + ## 1.0.0 (2021-06-08) diff --git a/packages/google-cloud-shell/package-lock.json b/packages/google-cloud-shell/package-lock.json index 5bd56ae691f..ca10e0fec29 100644 --- a/packages/google-cloud-shell/package-lock.json +++ b/packages/google-cloud-shell/package-lock.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/cloud-shell", - "version": "1.0.0", + "version": "1.0.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/google-cloud-shell/package.json b/packages/google-cloud-shell/package.json index 2a2eafd4d38..94a9b79bfa2 100644 --- a/packages/google-cloud-shell/package.json +++ b/packages/google-cloud-shell/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/shell", - "version": "1.0.0", + "version": "1.0.1", "description": "cloudshell client for Node.js", "repository": "googleapis/nodejs-cloud-shell", "license": "Apache-2.0", diff --git a/packages/google-cloud-shell/samples/package.json b/packages/google-cloud-shell/samples/package.json index 8d7635606fe..c34e6b13087 100644 --- a/packages/google-cloud-shell/samples/package.json +++ b/packages/google-cloud-shell/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/shell": "^1.0.0" + "@google-cloud/shell": "^1.0.1" }, "devDependencies": { "c8": "^7.1.0", From dafcb158c49ec9d9df74bac88855c378ac65a53e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 30 Jun 2021 21:45:26 +0200 Subject: [PATCH 040/254] chore(deps): update dependency mocha to v9 (#2) --- packages/google-cloud-gkeconnect-gateway/package.json | 2 +- packages/google-cloud-gkeconnect-gateway/samples/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-gkeconnect-gateway/package.json b/packages/google-cloud-gkeconnect-gateway/package.json index 3ef446bd72a..289de62883d 100644 --- a/packages/google-cloud-gkeconnect-gateway/package.json +++ b/packages/google-cloud-gkeconnect-gateway/package.json @@ -51,7 +51,7 @@ "jsdoc-fresh": "^1.0.2", "jsdoc-region-tag": "^1.0.6", "linkinator": "^2.13.6", - "mocha": "^8.4.0", + "mocha": "^9.0.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", "sinon": "^10.0.0", diff --git a/packages/google-cloud-gkeconnect-gateway/samples/package.json b/packages/google-cloud-gkeconnect-gateway/samples/package.json index b0522ba6c78..c8c361c17c1 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/package.json +++ b/packages/google-cloud-gkeconnect-gateway/samples/package.json @@ -18,6 +18,6 @@ "devDependencies": { "c8": "^7.1.0", "chai": "^4.2.0", - "mocha": "^8.0.0" + "mocha": "^9.0.0" } } From f882aff5fd9c4ca1aa5e72cf7c5662c123d7305c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 30 Jun 2021 21:57:47 +0200 Subject: [PATCH 041/254] chore(deps): update dependency sinon to v11 (#3) --- packages/google-cloud-gkeconnect-gateway/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-gkeconnect-gateway/package.json b/packages/google-cloud-gkeconnect-gateway/package.json index 289de62883d..b34154847e6 100644 --- a/packages/google-cloud-gkeconnect-gateway/package.json +++ b/packages/google-cloud-gkeconnect-gateway/package.json @@ -54,7 +54,7 @@ "mocha": "^9.0.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", - "sinon": "^10.0.0", + "sinon": "^11.0.0", "ts-loader": "^9.1.2", "typescript": "^4.2.4", "webpack": "^5.36.2", From b838105b3a78e34cc0f5a7c2bb41ead50165f1c2 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 30 Jun 2021 22:24:12 +0000 Subject: [PATCH 042/254] chore: release 1.0.0 (#1) :robot: I have created a release \*beep\* \*boop\* --- ## 1.0.0 (2021-06-30) ### Features * add generated files ([172b8b6](https://www.github.com/googleapis/nodejs-gke-connect-gateway/commit/172b8b6717fdc76f2d92c21ba9d12417795d03f3)) * initial samples and tests ([#6](https://www.github.com/googleapis/nodejs-gke-connect-gateway/issues/6)) ([ada7497](https://www.github.com/googleapis/nodejs-gke-connect-gateway/commit/ada7497a6a5881c2a5b686e16f3a744d5f34a969)) * initial stub of library ([82755d9](https://www.github.com/googleapis/nodejs-gke-connect-gateway/commit/82755d93262e35bed9aae0693efcc47df4b3b5dc)) ### Bug Fixes * **deps:** google-gax v2.17.0 with mTLS ([#5](https://www.github.com/googleapis/nodejs-gke-connect-gateway/issues/5)) ([d1257a8](https://www.github.com/googleapis/nodejs-gke-connect-gateway/commit/d1257a83a04171b6ec0e8fe1196cb3fb160b9161)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- .../google-cloud-gkeconnect-gateway/CHANGELOG.md | 15 +++++++++++++++ .../google-cloud-gkeconnect-gateway/package.json | 2 +- .../samples/package.json | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 packages/google-cloud-gkeconnect-gateway/CHANGELOG.md diff --git a/packages/google-cloud-gkeconnect-gateway/CHANGELOG.md b/packages/google-cloud-gkeconnect-gateway/CHANGELOG.md new file mode 100644 index 00000000000..cfd3244816f --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/CHANGELOG.md @@ -0,0 +1,15 @@ +# Changelog + +## 1.0.0 (2021-06-30) + + +### Features + +* add generated files ([172b8b6](https://www.github.com/googleapis/nodejs-gke-connect-gateway/commit/172b8b6717fdc76f2d92c21ba9d12417795d03f3)) +* initial samples and tests ([#6](https://www.github.com/googleapis/nodejs-gke-connect-gateway/issues/6)) ([ada7497](https://www.github.com/googleapis/nodejs-gke-connect-gateway/commit/ada7497a6a5881c2a5b686e16f3a744d5f34a969)) +* initial stub of library ([82755d9](https://www.github.com/googleapis/nodejs-gke-connect-gateway/commit/82755d93262e35bed9aae0693efcc47df4b3b5dc)) + + +### Bug Fixes + +* **deps:** google-gax v2.17.0 with mTLS ([#5](https://www.github.com/googleapis/nodejs-gke-connect-gateway/issues/5)) ([d1257a8](https://www.github.com/googleapis/nodejs-gke-connect-gateway/commit/d1257a83a04171b6ec0e8fe1196cb3fb160b9161)) diff --git a/packages/google-cloud-gkeconnect-gateway/package.json b/packages/google-cloud-gkeconnect-gateway/package.json index b34154847e6..809da103a3f 100644 --- a/packages/google-cloud-gkeconnect-gateway/package.json +++ b/packages/google-cloud-gkeconnect-gateway/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/gke-connect-gateway", - "version": "0.1.0", + "version": "1.0.0", "description": "apigateway client for Node.js", "repository": "googleapis/nodejs-gke-connect-gateway", "license": "Apache-2.0", diff --git a/packages/google-cloud-gkeconnect-gateway/samples/package.json b/packages/google-cloud-gkeconnect-gateway/samples/package.json index c8c361c17c1..be6909912f5 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/package.json +++ b/packages/google-cloud-gkeconnect-gateway/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/gke-connect-gateway": "^0.1.0" + "@google-cloud/gke-connect-gateway": "^1.0.0" }, "devDependencies": { "c8": "^7.1.0", From 1f5d0f36b7181d18c98ed92c234458c35c27bb73 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 12 Jul 2021 17:48:26 -0400 Subject: [PATCH 043/254] fix(deps): google-gax v2.17.1 (#8) --- packages/google-cloud-gkeconnect-gateway/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-gkeconnect-gateway/package.json b/packages/google-cloud-gkeconnect-gateway/package.json index 809da103a3f..3e21074e34e 100644 --- a/packages/google-cloud-gkeconnect-gateway/package.json +++ b/packages/google-cloud-gkeconnect-gateway/package.json @@ -39,7 +39,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^2.17.0" + "google-gax": "^2.17.1" }, "devDependencies": { "@types/mocha": "^8.2.2", From 11cfdce9d559a69d89954293309a4e24dd598134 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 12 Jul 2021 17:48:33 -0400 Subject: [PATCH 044/254] fix(deps): google-gax v2.17.1 (#19) --- packages/google-cloud-shell/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-shell/package.json b/packages/google-cloud-shell/package.json index 94a9b79bfa2..a17ad1a10e8 100644 --- a/packages/google-cloud-shell/package.json +++ b/packages/google-cloud-shell/package.json @@ -39,7 +39,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^2.17.0" + "google-gax": "^2.17.1" }, "devDependencies": { "@types/mocha": "^8.2.2", From 85d5db4a1a58297a1ad96df81ac9716c938fcc55 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 12 Jul 2021 18:34:29 -0400 Subject: [PATCH 045/254] fix(deps): google-gax v2.17.1 (#60) --- packages/google-cloud-policytroubleshooter/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-policytroubleshooter/package.json b/packages/google-cloud-policytroubleshooter/package.json index 66442baee5e..66f5d6cbfbd 100644 --- a/packages/google-cloud-policytroubleshooter/package.json +++ b/packages/google-cloud-policytroubleshooter/package.json @@ -39,7 +39,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^2.17.0" + "google-gax": "^2.17.1" }, "devDependencies": { "@types/mocha": "^8.0.4", From 7deed074f9986249d12805d8ee259875da937db9 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 12 Jul 2021 23:00:57 +0000 Subject: [PATCH 046/254] chore: release 1.0.4 (#61) :robot: I have created a release \*beep\* \*boop\* --- ### [1.0.4](https://www.github.com/googleapis/nodejs-policy-troubleshooter/compare/v1.0.3...v1.0.4) (2021-07-12) ### Bug Fixes * **deps:** google-gax v2.17.1 ([#60](https://www.github.com/googleapis/nodejs-policy-troubleshooter/issues/60)) ([de32784](https://www.github.com/googleapis/nodejs-policy-troubleshooter/commit/de32784b45be401f2fec066e2778f7334f89201b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-policytroubleshooter/CHANGELOG.md | 7 +++++++ packages/google-cloud-policytroubleshooter/package.json | 2 +- .../google-cloud-policytroubleshooter/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-policytroubleshooter/CHANGELOG.md b/packages/google-cloud-policytroubleshooter/CHANGELOG.md index 081c6ee184c..cd21a982bbc 100644 --- a/packages/google-cloud-policytroubleshooter/CHANGELOG.md +++ b/packages/google-cloud-policytroubleshooter/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.0.4](https://www.github.com/googleapis/nodejs-policy-troubleshooter/compare/v1.0.3...v1.0.4) (2021-07-12) + + +### Bug Fixes + +* **deps:** google-gax v2.17.1 ([#60](https://www.github.com/googleapis/nodejs-policy-troubleshooter/issues/60)) ([de32784](https://www.github.com/googleapis/nodejs-policy-troubleshooter/commit/de32784b45be401f2fec066e2778f7334f89201b)) + ### [1.0.3](https://www.github.com/googleapis/nodejs-policy-troubleshooter/compare/v1.0.2...v1.0.3) (2021-06-29) diff --git a/packages/google-cloud-policytroubleshooter/package.json b/packages/google-cloud-policytroubleshooter/package.json index 66f5d6cbfbd..ea59a6e7f09 100644 --- a/packages/google-cloud-policytroubleshooter/package.json +++ b/packages/google-cloud-policytroubleshooter/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/policy-troubleshooter", - "version": "1.0.3", + "version": "1.0.4", "description": "Policytroubleshooter client for Node.js", "repository": "googleapis/nodejs-policy-troubleshooter", "license": "Apache-2.0", diff --git a/packages/google-cloud-policytroubleshooter/samples/package.json b/packages/google-cloud-policytroubleshooter/samples/package.json index 725bacf007b..8d1d2adeb9d 100644 --- a/packages/google-cloud-policytroubleshooter/samples/package.json +++ b/packages/google-cloud-policytroubleshooter/samples/package.json @@ -14,7 +14,7 @@ }, "dependencies": { "@google-cloud/local-auth": "^1.0.0", - "@google-cloud/policy-troubleshooter": "^1.0.3" + "@google-cloud/policy-troubleshooter": "^1.0.4" }, "devDependencies": { "c8": "^7.1.0", From 1045238d553f86a7903b5626dafbb617b454cdd8 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 13 Jul 2021 15:41:03 -0700 Subject: [PATCH 047/254] chore: release 1.0.2 (#20) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-shell/CHANGELOG.md | 7 +++++++ packages/google-cloud-shell/package-lock.json | 2 +- packages/google-cloud-shell/package.json | 2 +- packages/google-cloud-shell/samples/package.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-shell/CHANGELOG.md b/packages/google-cloud-shell/CHANGELOG.md index 23c8dc54a92..b7bbdbde323 100644 --- a/packages/google-cloud-shell/CHANGELOG.md +++ b/packages/google-cloud-shell/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.0.2](https://www.github.com/googleapis/nodejs-cloud-shell/compare/v1.0.1...v1.0.2) (2021-07-12) + + +### Bug Fixes + +* **deps:** google-gax v2.17.1 ([#19](https://www.github.com/googleapis/nodejs-cloud-shell/issues/19)) ([f241f55](https://www.github.com/googleapis/nodejs-cloud-shell/commit/f241f55a0bd87224b297a7724c3db38593a3f94b)) + ### [1.0.1](https://www.github.com/googleapis/nodejs-cloud-shell/compare/v1.0.0...v1.0.1) (2021-06-30) diff --git a/packages/google-cloud-shell/package-lock.json b/packages/google-cloud-shell/package-lock.json index ca10e0fec29..6e8a5116854 100644 --- a/packages/google-cloud-shell/package-lock.json +++ b/packages/google-cloud-shell/package-lock.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/cloud-shell", - "version": "1.0.1", + "version": "1.0.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/google-cloud-shell/package.json b/packages/google-cloud-shell/package.json index a17ad1a10e8..b4d9c389db7 100644 --- a/packages/google-cloud-shell/package.json +++ b/packages/google-cloud-shell/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/shell", - "version": "1.0.1", + "version": "1.0.2", "description": "cloudshell client for Node.js", "repository": "googleapis/nodejs-cloud-shell", "license": "Apache-2.0", diff --git a/packages/google-cloud-shell/samples/package.json b/packages/google-cloud-shell/samples/package.json index c34e6b13087..60f2a9acaac 100644 --- a/packages/google-cloud-shell/samples/package.json +++ b/packages/google-cloud-shell/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/shell": "^1.0.1" + "@google-cloud/shell": "^1.0.2" }, "devDependencies": { "c8": "^7.1.0", From c89e3f4e193461bfd29489626b45ea281c402747 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 13 Jul 2021 15:43:03 -0700 Subject: [PATCH 048/254] chore: release 1.0.1 (#9) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-gkeconnect-gateway/CHANGELOG.md | 7 +++++++ packages/google-cloud-gkeconnect-gateway/package.json | 2 +- .../google-cloud-gkeconnect-gateway/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-gkeconnect-gateway/CHANGELOG.md b/packages/google-cloud-gkeconnect-gateway/CHANGELOG.md index cfd3244816f..ac0147cf3f2 100644 --- a/packages/google-cloud-gkeconnect-gateway/CHANGELOG.md +++ b/packages/google-cloud-gkeconnect-gateway/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.0.1](https://www.github.com/googleapis/nodejs-gke-connect-gateway/compare/v1.0.0...v1.0.1) (2021-07-12) + + +### Bug Fixes + +* **deps:** google-gax v2.17.1 ([#8](https://www.github.com/googleapis/nodejs-gke-connect-gateway/issues/8)) ([eeedac9](https://www.github.com/googleapis/nodejs-gke-connect-gateway/commit/eeedac9d30407e6fccee6e149246c63dfb9d4b3e)) + ## 1.0.0 (2021-06-30) diff --git a/packages/google-cloud-gkeconnect-gateway/package.json b/packages/google-cloud-gkeconnect-gateway/package.json index 3e21074e34e..f5449b76ffa 100644 --- a/packages/google-cloud-gkeconnect-gateway/package.json +++ b/packages/google-cloud-gkeconnect-gateway/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/gke-connect-gateway", - "version": "1.0.0", + "version": "1.0.1", "description": "apigateway client for Node.js", "repository": "googleapis/nodejs-gke-connect-gateway", "license": "Apache-2.0", diff --git a/packages/google-cloud-gkeconnect-gateway/samples/package.json b/packages/google-cloud-gkeconnect-gateway/samples/package.json index be6909912f5..7528f72931d 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/package.json +++ b/packages/google-cloud-gkeconnect-gateway/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/gke-connect-gateway": "^1.0.0" + "@google-cloud/gke-connect-gateway": "^1.0.1" }, "devDependencies": { "c8": "^7.1.0", From 08c637bcb3b05bbfd3bd670a936a4c2b478e0054 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 16 Jul 2021 19:10:43 +0000 Subject: [PATCH 049/254] fix: Updating WORKSPACE files to use the newest version of the Typescript generator. (#62) Also removing the explicit generator tag for the IAMPolicy mixin for the kms and pubsub APIS as the generator will now read it from the .yaml file. PiperOrigin-RevId: 385101839 Source-Link: https://github.com/googleapis/googleapis/commit/80f404215a9346259db760d80d0671f28c433453 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d3509d2520fb8db862129633f1cf8406d17454e1 --- .../src/v1/iam_checker_client.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts b/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts index 1065b45fbfb..8454e1e2512 100644 --- a/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts +++ b/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts @@ -41,6 +41,7 @@ const version = require('../../../package.json').version; export class IamCheckerClient { private _terminated = false; private _opts: ClientOptions; + private _providedCustomServicePath: boolean; private _gaxModule: typeof gax | typeof gax.fallback; private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; private _protos: {}; @@ -52,6 +53,7 @@ export class IamCheckerClient { longrunning: {}, batching: {}, }; + warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; iamCheckerStub?: Promise<{[name: string]: Function}>; @@ -94,6 +96,9 @@ export class IamCheckerClient { const staticMembers = this.constructor as typeof IamCheckerClient; const servicePath = opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; const fallback = @@ -153,6 +158,9 @@ export class IamCheckerClient { // of calling the API is handled in `google-gax`, with this code // merely providing the destination and request information. this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = gax.warn; } /** @@ -181,7 +189,8 @@ export class IamCheckerClient { ) : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.cloud.policytroubleshooter.v1.IamChecker, - this._opts + this._opts, + this._providedCustomServicePath ) as Promise<{[method: string]: Function}>; // Iterate over each of the methods that the service provides From 68ce693e0f1f3473b6d9b022a1f0307528fbcccf Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 16 Jul 2021 12:59:48 -0700 Subject: [PATCH 050/254] chore: release 1.0.5 (#63) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-policytroubleshooter/CHANGELOG.md | 7 +++++++ packages/google-cloud-policytroubleshooter/package.json | 2 +- .../google-cloud-policytroubleshooter/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-policytroubleshooter/CHANGELOG.md b/packages/google-cloud-policytroubleshooter/CHANGELOG.md index cd21a982bbc..8e178c34202 100644 --- a/packages/google-cloud-policytroubleshooter/CHANGELOG.md +++ b/packages/google-cloud-policytroubleshooter/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.0.5](https://www.github.com/googleapis/nodejs-policy-troubleshooter/compare/v1.0.4...v1.0.5) (2021-07-16) + + +### Bug Fixes + +* Updating WORKSPACE files to use the newest version of the Typescript generator. ([#62](https://www.github.com/googleapis/nodejs-policy-troubleshooter/issues/62)) ([6ec256b](https://www.github.com/googleapis/nodejs-policy-troubleshooter/commit/6ec256b64e1b95b369fc6a7dc22a1f0c37df1202)) + ### [1.0.4](https://www.github.com/googleapis/nodejs-policy-troubleshooter/compare/v1.0.3...v1.0.4) (2021-07-12) diff --git a/packages/google-cloud-policytroubleshooter/package.json b/packages/google-cloud-policytroubleshooter/package.json index ea59a6e7f09..fcd85f278c2 100644 --- a/packages/google-cloud-policytroubleshooter/package.json +++ b/packages/google-cloud-policytroubleshooter/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/policy-troubleshooter", - "version": "1.0.4", + "version": "1.0.5", "description": "Policytroubleshooter client for Node.js", "repository": "googleapis/nodejs-policy-troubleshooter", "license": "Apache-2.0", diff --git a/packages/google-cloud-policytroubleshooter/samples/package.json b/packages/google-cloud-policytroubleshooter/samples/package.json index 8d1d2adeb9d..29c56e48d45 100644 --- a/packages/google-cloud-policytroubleshooter/samples/package.json +++ b/packages/google-cloud-policytroubleshooter/samples/package.json @@ -14,7 +14,7 @@ }, "dependencies": { "@google-cloud/local-auth": "^1.0.0", - "@google-cloud/policy-troubleshooter": "^1.0.4" + "@google-cloud/policy-troubleshooter": "^1.0.5" }, "devDependencies": { "c8": "^7.1.0", From 13c814d8945750ecdd81db9a3ef3df59b12c758f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 22 Jul 2021 20:56:24 +0000 Subject: [PATCH 051/254] build(nodejs): correct package name for npm (#12) PiperOrigin-RevId: 385822138 Source-Link: https://github.com/googleapis/googleapis/commit/efecdbf96311bb705d619459280ffc651b10844a Source-Link: https://github.com/googleapis/googleapis-gen/commit/373d95c5ef68c8de0bb856aa24f8cad62649c597 fix: Updating WORKSPACE files to use the newest version of the Typescript generator PiperOrigin-RevId: 385101839 Source-Link: https://github.com/googleapis/googleapis/commit/80f404215a9346259db760d80d0671f28c433453 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d3509d2520fb8db862129633f1cf8406d17454e1 chore: use gapic-generator-typescript v2.1.0 Committer: @alexander-fenster PiperOrigin-RevId: 385246182 Source-Link: https://github.com/googleapis/googleapis/commit/d767d0ab9ebaab70d68e0ba343e5ae48b556a22b Source-Link: https://github.com/googleapis/googleapis-gen/commit/e44f0547f58120f27aae42bf01d36ecf9e0a286f --- packages/google-cloud-gkeconnect-gateway/.jsdoc.js | 2 +- .../linkinator.config.json | 1 - .../src/v1beta1/gapic_metadata.json | 2 +- .../src/v1beta1/gateway_service_client.ts | 11 ++++++++++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-gkeconnect-gateway/.jsdoc.js b/packages/google-cloud-gkeconnect-gateway/.jsdoc.js index c290f1d0aa3..0e7e239f75a 100644 --- a/packages/google-cloud-gkeconnect-gateway/.jsdoc.js +++ b/packages/google-cloud-gkeconnect-gateway/.jsdoc.js @@ -43,7 +43,7 @@ module.exports = { copyright: 'Copyright 2021 Google LLC', includeDate: false, sourceFiles: false, - systemName: '@google-cloud/gateway', + systemName: '@google-cloud/gke-connect-gateway', theme: 'lumen', default: { outputSourceFiles: false diff --git a/packages/google-cloud-gkeconnect-gateway/linkinator.config.json b/packages/google-cloud-gkeconnect-gateway/linkinator.config.json index d2805b1c1df..29a223b6db6 100644 --- a/packages/google-cloud-gkeconnect-gateway/linkinator.config.json +++ b/packages/google-cloud-gkeconnect-gateway/linkinator.config.json @@ -1,7 +1,6 @@ { "recurse": true, "skip": [ - "https://github.com/googleapis/nodejs-gke-connect-gateway/blob/master/CHANGELOG.md", "https://codecov.io/gh/googleapis/", "www.googleapis.com", "img.shields.io" diff --git a/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gapic_metadata.json b/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gapic_metadata.json index 47d0a762ed0..5c3d96707e3 100644 --- a/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gapic_metadata.json +++ b/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gapic_metadata.json @@ -3,7 +3,7 @@ "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", "language": "typescript", "protoPackage": "google.cloud.gkeconnect.gateway.v1beta1", - "libraryPackage": "@google-cloud/gateway", + "libraryPackage": "@google-cloud/gke-connect-gateway", "services": { "GatewayService": { "clients": { diff --git a/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts b/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts index 372343fa528..c39cc16ce86 100644 --- a/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts +++ b/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts @@ -43,6 +43,7 @@ const version = require('../../../package.json').version; export class GatewayServiceClient { private _terminated = false; private _opts: ClientOptions; + private _providedCustomServicePath: boolean; private _gaxModule: typeof gax | typeof gax.fallback; private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; private _protos: {}; @@ -54,6 +55,7 @@ export class GatewayServiceClient { longrunning: {}, batching: {}, }; + warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; gatewayServiceStub?: Promise<{[name: string]: Function}>; @@ -96,6 +98,9 @@ export class GatewayServiceClient { const staticMembers = this.constructor as typeof GatewayServiceClient; const servicePath = opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; const fallback = @@ -155,6 +160,9 @@ export class GatewayServiceClient { // of calling the API is handled in `google-gax`, with this code // merely providing the destination and request information. this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = gax.warn; } /** @@ -184,7 +192,8 @@ export class GatewayServiceClient { : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.cloud.gkeconnect.gateway.v1beta1 .GatewayService, - this._opts + this._opts, + this._providedCustomServicePath ) as Promise<{[method: string]: Function}>; // Iterate over each of the methods that the service provides From 867dffb358f4a876ff3b5cc3a0db6c838e9d71ef Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 22 Jul 2021 21:00:40 +0000 Subject: [PATCH 052/254] chore: release 1.0.2 (#15) :robot: I have created a release \*beep\* \*boop\* --- ### [1.0.2](https://www.github.com/googleapis/nodejs-gke-connect-gateway/compare/v1.0.1...v1.0.2) (2021-07-22) ### Bug Fixes * Updating WORKSPACE files to use the newest version of the Typescript generator ([0592deb](https://www.github.com/googleapis/nodejs-gke-connect-gateway/commit/0592deb506d1ec6493c25c110b1ba45d20f188b5)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-gkeconnect-gateway/CHANGELOG.md | 7 +++++++ packages/google-cloud-gkeconnect-gateway/package.json | 2 +- .../google-cloud-gkeconnect-gateway/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-gkeconnect-gateway/CHANGELOG.md b/packages/google-cloud-gkeconnect-gateway/CHANGELOG.md index ac0147cf3f2..dd548c72092 100644 --- a/packages/google-cloud-gkeconnect-gateway/CHANGELOG.md +++ b/packages/google-cloud-gkeconnect-gateway/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.0.2](https://www.github.com/googleapis/nodejs-gke-connect-gateway/compare/v1.0.1...v1.0.2) (2021-07-22) + + +### Bug Fixes + +* Updating WORKSPACE files to use the newest version of the Typescript generator ([0592deb](https://www.github.com/googleapis/nodejs-gke-connect-gateway/commit/0592deb506d1ec6493c25c110b1ba45d20f188b5)) + ### [1.0.1](https://www.github.com/googleapis/nodejs-gke-connect-gateway/compare/v1.0.0...v1.0.1) (2021-07-12) diff --git a/packages/google-cloud-gkeconnect-gateway/package.json b/packages/google-cloud-gkeconnect-gateway/package.json index f5449b76ffa..fa64eae234e 100644 --- a/packages/google-cloud-gkeconnect-gateway/package.json +++ b/packages/google-cloud-gkeconnect-gateway/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/gke-connect-gateway", - "version": "1.0.1", + "version": "1.0.2", "description": "apigateway client for Node.js", "repository": "googleapis/nodejs-gke-connect-gateway", "license": "Apache-2.0", diff --git a/packages/google-cloud-gkeconnect-gateway/samples/package.json b/packages/google-cloud-gkeconnect-gateway/samples/package.json index 7528f72931d..656b777fb85 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/package.json +++ b/packages/google-cloud-gkeconnect-gateway/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/gke-connect-gateway": "^1.0.1" + "@google-cloud/gke-connect-gateway": "^1.0.2" }, "devDependencies": { "c8": "^7.1.0", From 0a81fa907e15069ad5fffebcf4ec36af4dc87d1c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 23 Jul 2021 00:48:31 +0200 Subject: [PATCH 053/254] chore(deps): update dependency @types/mocha to v9 (#14) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@types/mocha](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | [`^8.2.2` -> `^9.0.0`](https://renovatebot.com/diffs/npm/@types%2fmocha/8.2.3/9.0.0) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.0.0/compatibility-slim/8.2.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.0.0/confidence-slim/8.2.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-gke-connect-gateway). --- packages/google-cloud-gkeconnect-gateway/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-gkeconnect-gateway/package.json b/packages/google-cloud-gkeconnect-gateway/package.json index fa64eae234e..60f7d79005d 100644 --- a/packages/google-cloud-gkeconnect-gateway/package.json +++ b/packages/google-cloud-gkeconnect-gateway/package.json @@ -42,7 +42,7 @@ "google-gax": "^2.17.1" }, "devDependencies": { - "@types/mocha": "^8.2.2", + "@types/mocha": "^9.0.0", "@types/node": "^14.14.44", "@types/sinon": "^10.0.0", "c8": "^7.7.2", From 3ee667868ac4e54e3fef80333dd032c0cbe37480 Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Wed, 4 Aug 2021 16:02:35 -0400 Subject: [PATCH 054/254] chore(nodejs): update client ref docs link in metadata (#68) --- packages/google-cloud-policytroubleshooter/.repo-metadata.json | 2 +- packages/google-cloud-policytroubleshooter/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-policytroubleshooter/.repo-metadata.json b/packages/google-cloud-policytroubleshooter/.repo-metadata.json index fd50a079f35..a9e3158ebb1 100644 --- a/packages/google-cloud-policytroubleshooter/.repo-metadata.json +++ b/packages/google-cloud-policytroubleshooter/.repo-metadata.json @@ -1,5 +1,5 @@ { - "client_documentation": "https://googleapis.dev/nodejs/policytroubleshooter/latest/", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/policy-troubleshooter/latest", "api_id": "policytroubleshooter.googleapis.com", "distribution_name": "@google-cloud/policy-troubleshooter", "release_level": "ga", diff --git a/packages/google-cloud-policytroubleshooter/README.md b/packages/google-cloud-policytroubleshooter/README.md index d87b5617070..16570fcbcc0 100644 --- a/packages/google-cloud-policytroubleshooter/README.md +++ b/packages/google-cloud-policytroubleshooter/README.md @@ -154,7 +154,7 @@ Apache Version 2.0 See [LICENSE](https://github.com/googleapis/nodejs-policy-troubleshooter/blob/master/LICENSE) -[client-docs]: https://googleapis.dev/nodejs/policytroubleshooter/latest/ +[client-docs]: https://cloud.google.com/nodejs/docs/reference/policy-troubleshooter/latest [product-docs]: https://cloud.google.com/iam/docs/troubleshooting-access#rest-api/ [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png [projects]: https://console.cloud.google.com/project From 3f3704a22175cf3295f9b518c606331fd24217e4 Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Wed, 4 Aug 2021 16:06:49 -0400 Subject: [PATCH 055/254] chore(nodejs): update client ref docs link in metadata (#18) --- packages/google-cloud-gkeconnect-gateway/.repo-metadata.json | 3 +-- packages/google-cloud-gkeconnect-gateway/README.md | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-gkeconnect-gateway/.repo-metadata.json b/packages/google-cloud-gkeconnect-gateway/.repo-metadata.json index f958af829b8..189ace012ac 100644 --- a/packages/google-cloud-gkeconnect-gateway/.repo-metadata.json +++ b/packages/google-cloud-gkeconnect-gateway/.repo-metadata.json @@ -2,7 +2,7 @@ "name": "apigateway", "name_pretty": "API Gateway", "product_documentation": "https://cloud.google.com/api-gateway/", - "client_documentation": "https://cloud.google.com/anthos/multicluster-management/gateway/using", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/gke-connect-gateway/latest", "issue_tracker": "https://github.com/googleapis/nodejs-gke-connect-gateway/issues", "release_level": "BETA", "language": "nodejs", @@ -12,4 +12,3 @@ "default_version": "v1beta1", "requires_billing": true } - diff --git a/packages/google-cloud-gkeconnect-gateway/README.md b/packages/google-cloud-gkeconnect-gateway/README.md index 424b43dd63c..49a642ffdf0 100644 --- a/packages/google-cloud-gkeconnect-gateway/README.md +++ b/packages/google-cloud-gkeconnect-gateway/README.md @@ -132,7 +132,7 @@ Apache Version 2.0 See [LICENSE](https://github.com/googleapis/nodejs-gke-connect-gateway/blob/master/LICENSE) -[client-docs]: https://cloud.google.com/anthos/multicluster-management/gateway/using +[client-docs]: https://cloud.google.com/nodejs/docs/reference/gke-connect-gateway/latest [product-docs]: https://cloud.google.com/api-gateway/ [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png [projects]: https://console.cloud.google.com/project From 5d26fa21d0e105edf367f9a8d150478545e36e9d Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Wed, 4 Aug 2021 16:07:07 -0400 Subject: [PATCH 056/254] chore(nodejs): update client ref docs link in metadata (#26) --- packages/google-cloud-shell/.repo-metadata.json | 3 +-- packages/google-cloud-shell/README.md | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-shell/.repo-metadata.json b/packages/google-cloud-shell/.repo-metadata.json index 11061040dec..5c161c73fc8 100644 --- a/packages/google-cloud-shell/.repo-metadata.json +++ b/packages/google-cloud-shell/.repo-metadata.json @@ -2,7 +2,7 @@ "name": "cloudshell", "name_pretty": "Cloud Shell", "product_documentation": "https://cloud.google.com/shell/", - "client_documentation": "https://cloud.google.com/shell/docs/reference/rest", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/shell/latest", "issue_tracker": "https://github.com/googleapis/nodejs-cloud-shell/issues", "release_level": "BETA", "language": "nodejs", @@ -12,4 +12,3 @@ "default_version": "v1", "requires_billing": true } - diff --git a/packages/google-cloud-shell/README.md b/packages/google-cloud-shell/README.md index 4c80d8ed6aa..1014971b7bc 100644 --- a/packages/google-cloud-shell/README.md +++ b/packages/google-cloud-shell/README.md @@ -145,7 +145,7 @@ Apache Version 2.0 See [LICENSE](https://github.com/googleapis/nodejs-cloud-shell/blob/master/LICENSE) -[client-docs]: https://cloud.google.com/shell/docs/reference/rest +[client-docs]: https://cloud.google.com/nodejs/docs/reference/shell/latest [product-docs]: https://cloud.google.com/shell/ [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png [projects]: https://console.cloud.google.com/project From 4a4c726f91cfa022709ff09218807788e6eeeeac Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Tue, 10 Aug 2021 19:07:46 -0700 Subject: [PATCH 057/254] fix(build): migrate to using main branch (#28) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(build): migrate to using main branch * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- packages/google-cloud-shell/README.md | 16 ++++++++-------- packages/google-cloud-shell/samples/README.md | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/google-cloud-shell/README.md b/packages/google-cloud-shell/README.md index 1014971b7bc..6fab0894e8e 100644 --- a/packages/google-cloud-shell/README.md +++ b/packages/google-cloud-shell/README.md @@ -6,7 +6,7 @@ [![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/shell.svg)](https://www.npmjs.org/package/@google-cloud/shell) -[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-cloud-shell/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-cloud-shell) +[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-cloud-shell/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-cloud-shell) @@ -15,7 +15,7 @@ cloudshell client for Node.js A comprehensive list of changes in each version may be found in -[the CHANGELOG](https://github.com/googleapis/nodejs-cloud-shell/blob/master/CHANGELOG.md). +[the CHANGELOG](https://github.com/googleapis/nodejs-cloud-shell/blob/main/CHANGELOG.md). * [Cloud Shell Node.js Client API Reference][client-docs] * [Cloud Shell Documentation][product-docs] @@ -84,11 +84,11 @@ initializeClient(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-cloud-shell/tree/master/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-cloud-shell/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Quickstart | [source code](https://github.com/googleapis/nodejs-cloud-shell/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-cloud-shell&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/nodejs-cloud-shell/blob/main/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-cloud-shell&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | @@ -131,19 +131,19 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-cloud-shell/blob/master/CONTRIBUTING.md). +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-cloud-shell/blob/main/CONTRIBUTING.md). Please note that this `README.md`, the `samples/README.md`, and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) are generated from a central template. To edit one of these files, make an edit -to its template in this -[directory](https://github.com/googleapis/synthtool/tree/master/synthtool/gcp/templates/node_library). +to its templates in +[directory](https://github.com/googleapis/synthtool). ## License Apache Version 2.0 -See [LICENSE](https://github.com/googleapis/nodejs-cloud-shell/blob/master/LICENSE) +See [LICENSE](https://github.com/googleapis/nodejs-cloud-shell/blob/main/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/shell/latest [product-docs]: https://cloud.google.com/shell/ diff --git a/packages/google-cloud-shell/samples/README.md b/packages/google-cloud-shell/samples/README.md index 9ef84fa02f0..ab33be31c80 100644 --- a/packages/google-cloud-shell/samples/README.md +++ b/packages/google-cloud-shell/samples/README.md @@ -31,7 +31,7 @@ Before running the samples, make sure you've followed the steps outlined in ### Quickstart -View the [source code](https://github.com/googleapis/nodejs-cloud-shell/blob/master/samples/quickstart.js). +View the [source code](https://github.com/googleapis/nodejs-cloud-shell/blob/main/samples/quickstart.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-cloud-shell&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) From b592f0f35d812b444a872d8838805b9438f8e4dd Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 11 Aug 2021 14:32:09 -0700 Subject: [PATCH 058/254] chore: release 1.0.3 (#29) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-shell/CHANGELOG.md | 7 +++++++ packages/google-cloud-shell/package-lock.json | 2 +- packages/google-cloud-shell/package.json | 2 +- packages/google-cloud-shell/samples/package.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-shell/CHANGELOG.md b/packages/google-cloud-shell/CHANGELOG.md index b7bbdbde323..ced8a59dfb2 100644 --- a/packages/google-cloud-shell/CHANGELOG.md +++ b/packages/google-cloud-shell/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.0.3](https://www.github.com/googleapis/nodejs-cloud-shell/compare/v1.0.2...v1.0.3) (2021-08-11) + + +### Bug Fixes + +* **build:** migrate to using main branch ([#28](https://www.github.com/googleapis/nodejs-cloud-shell/issues/28)) ([89f824d](https://www.github.com/googleapis/nodejs-cloud-shell/commit/89f824d75bd1190568c8e28ccef8ee896b86ecdc)) + ### [1.0.2](https://www.github.com/googleapis/nodejs-cloud-shell/compare/v1.0.1...v1.0.2) (2021-07-12) diff --git a/packages/google-cloud-shell/package-lock.json b/packages/google-cloud-shell/package-lock.json index 6e8a5116854..4c43397771f 100644 --- a/packages/google-cloud-shell/package-lock.json +++ b/packages/google-cloud-shell/package-lock.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/cloud-shell", - "version": "1.0.2", + "version": "1.0.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/google-cloud-shell/package.json b/packages/google-cloud-shell/package.json index b4d9c389db7..829f39a73b2 100644 --- a/packages/google-cloud-shell/package.json +++ b/packages/google-cloud-shell/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/shell", - "version": "1.0.2", + "version": "1.0.3", "description": "cloudshell client for Node.js", "repository": "googleapis/nodejs-cloud-shell", "license": "Apache-2.0", diff --git a/packages/google-cloud-shell/samples/package.json b/packages/google-cloud-shell/samples/package.json index 60f2a9acaac..a6e5fcbfe41 100644 --- a/packages/google-cloud-shell/samples/package.json +++ b/packages/google-cloud-shell/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/shell": "^1.0.2" + "@google-cloud/shell": "^1.0.3" }, "devDependencies": { "c8": "^7.1.0", From 4b53749e6b939a27f57b94f0604489e7b2487a18 Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Sat, 14 Aug 2021 00:34:28 -0700 Subject: [PATCH 059/254] fix(build): migrate to using main branch (#20) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(build): migrate to using main branch * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../google-cloud-gkeconnect-gateway/README.md | 16 ++++++++-------- .../samples/README.md | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/google-cloud-gkeconnect-gateway/README.md b/packages/google-cloud-gkeconnect-gateway/README.md index 49a642ffdf0..6b63535263e 100644 --- a/packages/google-cloud-gkeconnect-gateway/README.md +++ b/packages/google-cloud-gkeconnect-gateway/README.md @@ -6,7 +6,7 @@ [![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/gke-connect-gateway.svg)](https://www.npmjs.org/package/@google-cloud/gke-connect-gateway) -[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-gke-connect-gateway/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-gke-connect-gateway) +[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-gke-connect-gateway/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-gke-connect-gateway) @@ -15,7 +15,7 @@ apigateway client for Node.js A comprehensive list of changes in each version may be found in -[the CHANGELOG](https://github.com/googleapis/nodejs-gke-connect-gateway/blob/master/CHANGELOG.md). +[the CHANGELOG](https://github.com/googleapis/nodejs-gke-connect-gateway/blob/main/CHANGELOG.md). * [API Gateway Node.js Client API Reference][client-docs] * [API Gateway Documentation][product-docs] @@ -71,11 +71,11 @@ new GatewayServiceClient(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-gke-connect-gateway/tree/master/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-gke-connect-gateway/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Quickstart | [source code](https://github.com/googleapis/nodejs-gke-connect-gateway/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-gke-connect-gateway&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/nodejs-gke-connect-gateway/blob/main/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-gke-connect-gateway&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | @@ -118,19 +118,19 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-gke-connect-gateway/blob/master/CONTRIBUTING.md). +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-gke-connect-gateway/blob/main/CONTRIBUTING.md). Please note that this `README.md`, the `samples/README.md`, and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) are generated from a central template. To edit one of these files, make an edit -to its template in this -[directory](https://github.com/googleapis/synthtool/tree/master/synthtool/gcp/templates/node_library). +to its templates in +[directory](https://github.com/googleapis/synthtool). ## License Apache Version 2.0 -See [LICENSE](https://github.com/googleapis/nodejs-gke-connect-gateway/blob/master/LICENSE) +See [LICENSE](https://github.com/googleapis/nodejs-gke-connect-gateway/blob/main/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/gke-connect-gateway/latest [product-docs]: https://cloud.google.com/api-gateway/ diff --git a/packages/google-cloud-gkeconnect-gateway/samples/README.md b/packages/google-cloud-gkeconnect-gateway/samples/README.md index 201efa1dcff..eebf0b0cf6b 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/README.md +++ b/packages/google-cloud-gkeconnect-gateway/samples/README.md @@ -31,7 +31,7 @@ Before running the samples, make sure you've followed the steps outlined in ### Quickstart -View the [source code](https://github.com/googleapis/nodejs-gke-connect-gateway/blob/master/samples/quickstart.js). +View the [source code](https://github.com/googleapis/nodejs-gke-connect-gateway/blob/main/samples/quickstart.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-gke-connect-gateway&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) From 7ea5c66d7b98d0a019bfc1257520554dfebc16d4 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 16 Aug 2021 22:44:15 -0400 Subject: [PATCH 060/254] fix(deps): google-gax v2.24.1 (#22) --- packages/google-cloud-gkeconnect-gateway/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-gkeconnect-gateway/package.json b/packages/google-cloud-gkeconnect-gateway/package.json index 60f7d79005d..025da678ade 100644 --- a/packages/google-cloud-gkeconnect-gateway/package.json +++ b/packages/google-cloud-gkeconnect-gateway/package.json @@ -39,7 +39,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^2.17.1" + "google-gax": "^2.24.1" }, "devDependencies": { "@types/mocha": "^9.0.0", From cc5ae164abd04ed6476e0a1f8d0cc1ec58c3c887 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 16 Aug 2021 22:44:19 -0400 Subject: [PATCH 061/254] fix(deps): google-gax v2.24.1 (#70) --- packages/google-cloud-policytroubleshooter/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-policytroubleshooter/package.json b/packages/google-cloud-policytroubleshooter/package.json index fcd85f278c2..f98b5d8a667 100644 --- a/packages/google-cloud-policytroubleshooter/package.json +++ b/packages/google-cloud-policytroubleshooter/package.json @@ -39,7 +39,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^2.17.1" + "google-gax": "^2.24.1" }, "devDependencies": { "@types/mocha": "^8.0.4", From 970a3426a84593896fa4cefcd8e419a80d7bbc29 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 16 Aug 2021 22:44:38 -0400 Subject: [PATCH 062/254] fix(deps): google-gax v2.24.1 (#30) --- packages/google-cloud-shell/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-shell/package.json b/packages/google-cloud-shell/package.json index 829f39a73b2..76a4ebd2ab7 100644 --- a/packages/google-cloud-shell/package.json +++ b/packages/google-cloud-shell/package.json @@ -39,7 +39,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^2.17.1" + "google-gax": "^2.24.1" }, "devDependencies": { "@types/mocha": "^8.2.2", From 858c8087e23347ef32de1588cb0d23cb2936a9db Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 17 Aug 2021 03:12:37 +0000 Subject: [PATCH 063/254] chore: release 1.0.3 (#21) :robot: I have created a release \*beep\* \*boop\* --- ### [1.0.3](https://www.github.com/googleapis/nodejs-gke-connect-gateway/compare/v1.0.2...v1.0.3) (2021-08-17) ### Bug Fixes * **build:** migrate to using main branch ([#20](https://www.github.com/googleapis/nodejs-gke-connect-gateway/issues/20)) ([f8731f3](https://www.github.com/googleapis/nodejs-gke-connect-gateway/commit/f8731f3b957562977f70e7de6b6737ffbffa81d1)) * **deps:** google-gax v2.24.1 ([#22](https://www.github.com/googleapis/nodejs-gke-connect-gateway/issues/22)) ([2613add](https://www.github.com/googleapis/nodejs-gke-connect-gateway/commit/2613add6ed97059ef8e76e333c885d69afa4365c)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-gkeconnect-gateway/CHANGELOG.md | 8 ++++++++ packages/google-cloud-gkeconnect-gateway/package.json | 2 +- .../google-cloud-gkeconnect-gateway/samples/package.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-gkeconnect-gateway/CHANGELOG.md b/packages/google-cloud-gkeconnect-gateway/CHANGELOG.md index dd548c72092..ddd442f77e5 100644 --- a/packages/google-cloud-gkeconnect-gateway/CHANGELOG.md +++ b/packages/google-cloud-gkeconnect-gateway/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +### [1.0.3](https://www.github.com/googleapis/nodejs-gke-connect-gateway/compare/v1.0.2...v1.0.3) (2021-08-17) + + +### Bug Fixes + +* **build:** migrate to using main branch ([#20](https://www.github.com/googleapis/nodejs-gke-connect-gateway/issues/20)) ([f8731f3](https://www.github.com/googleapis/nodejs-gke-connect-gateway/commit/f8731f3b957562977f70e7de6b6737ffbffa81d1)) +* **deps:** google-gax v2.24.1 ([#22](https://www.github.com/googleapis/nodejs-gke-connect-gateway/issues/22)) ([2613add](https://www.github.com/googleapis/nodejs-gke-connect-gateway/commit/2613add6ed97059ef8e76e333c885d69afa4365c)) + ### [1.0.2](https://www.github.com/googleapis/nodejs-gke-connect-gateway/compare/v1.0.1...v1.0.2) (2021-07-22) diff --git a/packages/google-cloud-gkeconnect-gateway/package.json b/packages/google-cloud-gkeconnect-gateway/package.json index 025da678ade..bfc091e296d 100644 --- a/packages/google-cloud-gkeconnect-gateway/package.json +++ b/packages/google-cloud-gkeconnect-gateway/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/gke-connect-gateway", - "version": "1.0.2", + "version": "1.0.3", "description": "apigateway client for Node.js", "repository": "googleapis/nodejs-gke-connect-gateway", "license": "Apache-2.0", diff --git a/packages/google-cloud-gkeconnect-gateway/samples/package.json b/packages/google-cloud-gkeconnect-gateway/samples/package.json index 656b777fb85..596f62b4982 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/package.json +++ b/packages/google-cloud-gkeconnect-gateway/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/gke-connect-gateway": "^1.0.2" + "@google-cloud/gke-connect-gateway": "^1.0.3" }, "devDependencies": { "c8": "^7.1.0", From ea5cff3b276cb11821536a5fc64a2f7cb179de71 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 17 Aug 2021 17:14:44 +0000 Subject: [PATCH 064/254] chore: release 1.0.6 (#71) :robot: I have created a release \*beep\* \*boop\* --- ### [1.0.6](https://www.github.com/googleapis/nodejs-policy-troubleshooter/compare/v1.0.5...v1.0.6) (2021-08-17) ### Bug Fixes * **deps:** google-gax v2.24.1 ([#70](https://www.github.com/googleapis/nodejs-policy-troubleshooter/issues/70)) ([59d1051](https://www.github.com/googleapis/nodejs-policy-troubleshooter/commit/59d10517aaa5964d319cae1bfbad2da7b652e3a4)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-policytroubleshooter/CHANGELOG.md | 7 +++++++ packages/google-cloud-policytroubleshooter/package.json | 2 +- .../google-cloud-policytroubleshooter/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-policytroubleshooter/CHANGELOG.md b/packages/google-cloud-policytroubleshooter/CHANGELOG.md index 8e178c34202..3e9231550aa 100644 --- a/packages/google-cloud-policytroubleshooter/CHANGELOG.md +++ b/packages/google-cloud-policytroubleshooter/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.0.6](https://www.github.com/googleapis/nodejs-policy-troubleshooter/compare/v1.0.5...v1.0.6) (2021-08-17) + + +### Bug Fixes + +* **deps:** google-gax v2.24.1 ([#70](https://www.github.com/googleapis/nodejs-policy-troubleshooter/issues/70)) ([59d1051](https://www.github.com/googleapis/nodejs-policy-troubleshooter/commit/59d10517aaa5964d319cae1bfbad2da7b652e3a4)) + ### [1.0.5](https://www.github.com/googleapis/nodejs-policy-troubleshooter/compare/v1.0.4...v1.0.5) (2021-07-16) diff --git a/packages/google-cloud-policytroubleshooter/package.json b/packages/google-cloud-policytroubleshooter/package.json index f98b5d8a667..a815f17993e 100644 --- a/packages/google-cloud-policytroubleshooter/package.json +++ b/packages/google-cloud-policytroubleshooter/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/policy-troubleshooter", - "version": "1.0.5", + "version": "1.0.6", "description": "Policytroubleshooter client for Node.js", "repository": "googleapis/nodejs-policy-troubleshooter", "license": "Apache-2.0", diff --git a/packages/google-cloud-policytroubleshooter/samples/package.json b/packages/google-cloud-policytroubleshooter/samples/package.json index 29c56e48d45..6cca9a7be47 100644 --- a/packages/google-cloud-policytroubleshooter/samples/package.json +++ b/packages/google-cloud-policytroubleshooter/samples/package.json @@ -14,7 +14,7 @@ }, "dependencies": { "@google-cloud/local-auth": "^1.0.0", - "@google-cloud/policy-troubleshooter": "^1.0.5" + "@google-cloud/policy-troubleshooter": "^1.0.6" }, "devDependencies": { "c8": "^7.1.0", From fd3f0b6e6db95ff506a58c04e4dc020028d82dc6 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 17 Aug 2021 11:45:15 -0700 Subject: [PATCH 065/254] chore: release 1.0.4 (#31) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-shell/CHANGELOG.md | 7 +++++++ packages/google-cloud-shell/package-lock.json | 2 +- packages/google-cloud-shell/package.json | 2 +- packages/google-cloud-shell/samples/package.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-shell/CHANGELOG.md b/packages/google-cloud-shell/CHANGELOG.md index ced8a59dfb2..55390944034 100644 --- a/packages/google-cloud-shell/CHANGELOG.md +++ b/packages/google-cloud-shell/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.0.4](https://www.github.com/googleapis/nodejs-cloud-shell/compare/v1.0.3...v1.0.4) (2021-08-17) + + +### Bug Fixes + +* **deps:** google-gax v2.24.1 ([#30](https://www.github.com/googleapis/nodejs-cloud-shell/issues/30)) ([2b47854](https://www.github.com/googleapis/nodejs-cloud-shell/commit/2b4785463941a7260631280b38175196f220e2ae)) + ### [1.0.3](https://www.github.com/googleapis/nodejs-cloud-shell/compare/v1.0.2...v1.0.3) (2021-08-11) diff --git a/packages/google-cloud-shell/package-lock.json b/packages/google-cloud-shell/package-lock.json index 4c43397771f..928dc8463c3 100644 --- a/packages/google-cloud-shell/package-lock.json +++ b/packages/google-cloud-shell/package-lock.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/cloud-shell", - "version": "1.0.3", + "version": "1.0.4", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/google-cloud-shell/package.json b/packages/google-cloud-shell/package.json index 76a4ebd2ab7..befd05df30c 100644 --- a/packages/google-cloud-shell/package.json +++ b/packages/google-cloud-shell/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/shell", - "version": "1.0.3", + "version": "1.0.4", "description": "cloudshell client for Node.js", "repository": "googleapis/nodejs-cloud-shell", "license": "Apache-2.0", diff --git a/packages/google-cloud-shell/samples/package.json b/packages/google-cloud-shell/samples/package.json index a6e5fcbfe41..fece6117236 100644 --- a/packages/google-cloud-shell/samples/package.json +++ b/packages/google-cloud-shell/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/shell": "^1.0.3" + "@google-cloud/shell": "^1.0.4" }, "devDependencies": { "c8": "^7.1.0", From 392b8aa6d465812fbc509adf8a86b381bd25c9f0 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 23 Aug 2021 18:20:28 +0000 Subject: [PATCH 066/254] feat: turns on self-signed JWT feature flag (#72) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 392067151 Source-Link: https://github.com/googleapis/googleapis/commit/06345f7b95c4b4a3ffe4303f1f2984ccc304b2e0 Source-Link: https://github.com/googleapis/googleapis-gen/commit/95882b37970e41e4cd51b22fa507cfd46dc7c4b6 --- .../src/v1/iam_checker_client.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts b/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts index 8454e1e2512..a0ef44b8bcc 100644 --- a/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts +++ b/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts @@ -123,6 +123,12 @@ export class IamCheckerClient { // Save the auth object to the client, for use by other methods. this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + // Set the default scopes in auth client if needed. if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; From eb70a17bda7a054a085a36476d70c7246bbcec0a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 23 Aug 2021 18:26:09 +0000 Subject: [PATCH 067/254] feat: turns on self-signed JWT feature flag (#23) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 392067151 Source-Link: https://github.com/googleapis/googleapis/commit/06345f7b95c4b4a3ffe4303f1f2984ccc304b2e0 Source-Link: https://github.com/googleapis/googleapis-gen/commit/95882b37970e41e4cd51b22fa507cfd46dc7c4b6 --- .../src/v1beta1/gateway_service_client.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts b/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts index c39cc16ce86..e51f7ac5274 100644 --- a/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts +++ b/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts @@ -125,6 +125,12 @@ export class GatewayServiceClient { // Save the auth object to the client, for use by other methods. this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + // Set the default scopes in auth client if needed. if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; From 0ab906b6138fab3fb6c70991a9ac727dbed82ee4 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 23 Aug 2021 18:26:17 +0000 Subject: [PATCH 068/254] chore: release 1.1.0 (#73) :robot: I have created a release \*beep\* \*boop\* --- ## [1.1.0](https://www.github.com/googleapis/nodejs-policy-troubleshooter/compare/v1.0.6...v1.1.0) (2021-08-23) ### Features * turns on self-signed JWT feature flag ([#72](https://www.github.com/googleapis/nodejs-policy-troubleshooter/issues/72)) ([cb9e610](https://www.github.com/googleapis/nodejs-policy-troubleshooter/commit/cb9e61019ea6ec71201b30de68c84b1e93b1045e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-policytroubleshooter/CHANGELOG.md | 7 +++++++ packages/google-cloud-policytroubleshooter/package.json | 2 +- .../google-cloud-policytroubleshooter/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-policytroubleshooter/CHANGELOG.md b/packages/google-cloud-policytroubleshooter/CHANGELOG.md index 3e9231550aa..8770ddf12a8 100644 --- a/packages/google-cloud-policytroubleshooter/CHANGELOG.md +++ b/packages/google-cloud-policytroubleshooter/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.1.0](https://www.github.com/googleapis/nodejs-policy-troubleshooter/compare/v1.0.6...v1.1.0) (2021-08-23) + + +### Features + +* turns on self-signed JWT feature flag ([#72](https://www.github.com/googleapis/nodejs-policy-troubleshooter/issues/72)) ([cb9e610](https://www.github.com/googleapis/nodejs-policy-troubleshooter/commit/cb9e61019ea6ec71201b30de68c84b1e93b1045e)) + ### [1.0.6](https://www.github.com/googleapis/nodejs-policy-troubleshooter/compare/v1.0.5...v1.0.6) (2021-08-17) diff --git a/packages/google-cloud-policytroubleshooter/package.json b/packages/google-cloud-policytroubleshooter/package.json index a815f17993e..7cbcf67d806 100644 --- a/packages/google-cloud-policytroubleshooter/package.json +++ b/packages/google-cloud-policytroubleshooter/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/policy-troubleshooter", - "version": "1.0.6", + "version": "1.1.0", "description": "Policytroubleshooter client for Node.js", "repository": "googleapis/nodejs-policy-troubleshooter", "license": "Apache-2.0", diff --git a/packages/google-cloud-policytroubleshooter/samples/package.json b/packages/google-cloud-policytroubleshooter/samples/package.json index 6cca9a7be47..af10af95e64 100644 --- a/packages/google-cloud-policytroubleshooter/samples/package.json +++ b/packages/google-cloud-policytroubleshooter/samples/package.json @@ -14,7 +14,7 @@ }, "dependencies": { "@google-cloud/local-auth": "^1.0.0", - "@google-cloud/policy-troubleshooter": "^1.0.6" + "@google-cloud/policy-troubleshooter": "^1.1.0" }, "devDependencies": { "c8": "^7.1.0", From 661c846a909ef54212c26768ac00007f11ae0fbe Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 23 Aug 2021 18:32:31 +0000 Subject: [PATCH 069/254] chore: release 1.1.0 (#24) :robot: I have created a release \*beep\* \*boop\* --- ## [1.1.0](https://www.github.com/googleapis/nodejs-gke-connect-gateway/compare/v1.0.3...v1.1.0) (2021-08-23) ### Features * turns on self-signed JWT feature flag ([#23](https://www.github.com/googleapis/nodejs-gke-connect-gateway/issues/23)) ([4041bbd](https://www.github.com/googleapis/nodejs-gke-connect-gateway/commit/4041bbd7361a8aecfb86a886d0c7661db52c2e31)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-gkeconnect-gateway/CHANGELOG.md | 7 +++++++ packages/google-cloud-gkeconnect-gateway/package.json | 2 +- .../google-cloud-gkeconnect-gateway/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-gkeconnect-gateway/CHANGELOG.md b/packages/google-cloud-gkeconnect-gateway/CHANGELOG.md index ddd442f77e5..7dee47ba604 100644 --- a/packages/google-cloud-gkeconnect-gateway/CHANGELOG.md +++ b/packages/google-cloud-gkeconnect-gateway/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.1.0](https://www.github.com/googleapis/nodejs-gke-connect-gateway/compare/v1.0.3...v1.1.0) (2021-08-23) + + +### Features + +* turns on self-signed JWT feature flag ([#23](https://www.github.com/googleapis/nodejs-gke-connect-gateway/issues/23)) ([4041bbd](https://www.github.com/googleapis/nodejs-gke-connect-gateway/commit/4041bbd7361a8aecfb86a886d0c7661db52c2e31)) + ### [1.0.3](https://www.github.com/googleapis/nodejs-gke-connect-gateway/compare/v1.0.2...v1.0.3) (2021-08-17) diff --git a/packages/google-cloud-gkeconnect-gateway/package.json b/packages/google-cloud-gkeconnect-gateway/package.json index bfc091e296d..9948a2b8482 100644 --- a/packages/google-cloud-gkeconnect-gateway/package.json +++ b/packages/google-cloud-gkeconnect-gateway/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/gke-connect-gateway", - "version": "1.0.3", + "version": "1.1.0", "description": "apigateway client for Node.js", "repository": "googleapis/nodejs-gke-connect-gateway", "license": "Apache-2.0", diff --git a/packages/google-cloud-gkeconnect-gateway/samples/package.json b/packages/google-cloud-gkeconnect-gateway/samples/package.json index 596f62b4982..abfe0a82c20 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/package.json +++ b/packages/google-cloud-gkeconnect-gateway/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/gke-connect-gateway": "^1.0.3" + "@google-cloud/gke-connect-gateway": "^1.1.0" }, "devDependencies": { "c8": "^7.1.0", From bb9e330022790e5bf0e296f74915d1d86e99f7c5 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 25 Aug 2021 11:13:38 -0700 Subject: [PATCH 070/254] fix: flag module as GA (#33) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: flag module as GA * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Update .repo-metadata.json * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- packages/google-cloud-shell/.repo-metadata.json | 2 +- packages/google-cloud-shell/README.md | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-shell/.repo-metadata.json b/packages/google-cloud-shell/.repo-metadata.json index 5c161c73fc8..e18da0656c6 100644 --- a/packages/google-cloud-shell/.repo-metadata.json +++ b/packages/google-cloud-shell/.repo-metadata.json @@ -4,7 +4,7 @@ "product_documentation": "https://cloud.google.com/shell/", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/shell/latest", "issue_tracker": "https://github.com/googleapis/nodejs-cloud-shell/issues", - "release_level": "BETA", + "release_level": "ga", "language": "nodejs", "repo": "googleapis/nodejs-cloud-shell", "distribution_name": "@google-cloud/shell", diff --git a/packages/google-cloud-shell/README.md b/packages/google-cloud-shell/README.md index 6fab0894e8e..a3885d83a7b 100644 --- a/packages/google-cloud-shell/README.md +++ b/packages/google-cloud-shell/README.md @@ -4,7 +4,7 @@ # [Cloud Shell: Node.js Client](https://github.com/googleapis/nodejs-cloud-shell) -[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/shell.svg)](https://www.npmjs.org/package/@google-cloud/shell) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-cloud-shell/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-cloud-shell) @@ -121,6 +121,12 @@ _Legacy Node.js versions are supported as a best effort:_ This library follows [Semantic Versioning](http://semver.org/). +This library is considered to be **General Availability (GA)**. This means it +is stable; the code surface will not change in backwards-incompatible ways +unless absolutely necessary (e.g. because of critical security issues) or with +an extensive deprecation period. Issues and requests against **GA** libraries +are addressed with the highest priority. + From f53c87eb050355df39a944004913ac4c7a051093 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 25 Aug 2021 23:40:17 +0000 Subject: [PATCH 071/254] chore: disable renovate dependency dashboard (#1194) (#75) --- packages/google-cloud-policytroubleshooter/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-policytroubleshooter/README.md b/packages/google-cloud-policytroubleshooter/README.md index 16570fcbcc0..2ae0eea3653 100644 --- a/packages/google-cloud-policytroubleshooter/README.md +++ b/packages/google-cloud-policytroubleshooter/README.md @@ -145,8 +145,8 @@ Contributions welcome! See the [Contributing Guide](https://github.com/googleapi Please note that this `README.md`, the `samples/README.md`, and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) are generated from a central template. To edit one of these files, make an edit -to its template in this -[directory](https://github.com/googleapis/synthtool/tree/master/synthtool/gcp/templates/node_library). +to its templates in +[directory](https://github.com/googleapis/synthtool). ## License From 344e52974c29cef948e7d44bd97b55a8815f4033 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 30 Aug 2021 17:51:34 +0200 Subject: [PATCH 072/254] chore(deps): update dependency mocha to v9 (#36) --- packages/google-cloud-shell/package-lock.json | 192 ++++++++++-------- packages/google-cloud-shell/package.json | 4 +- .../google-cloud-shell/samples/package.json | 2 +- 3 files changed, 109 insertions(+), 89 deletions(-) diff --git a/packages/google-cloud-shell/package-lock.json b/packages/google-cloud-shell/package-lock.json index 928dc8463c3..620d2762597 100644 --- a/packages/google-cloud-shell/package-lock.json +++ b/packages/google-cloud-shell/package-lock.json @@ -1,5 +1,5 @@ { - "name": "@google-cloud/cloud-shell", + "name": "@google-cloud/shell", "version": "1.0.4", "lockfileVersion": 1, "requires": true, @@ -158,24 +158,17 @@ } }, "@grpc/grpc-js": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.3.2.tgz", - "integrity": "sha512-UXepkOKCATJrhHGsxt+CGfpZy9zUn1q9mop5kfcXq1fBkTePxVNPOdnISlCbJFlCtld+pSLGyZCzr9/zVprFKA==", + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.3.7.tgz", + "integrity": "sha512-CKQVuwuSPh40tgOkR7c0ZisxYRiN05PcKPW72mQL5y++qd7CwBRoaJZvU5xfXnCJDFBmS3qZGQ71Frx6Ofo2XA==", "requires": { "@types/node": ">=12.12.47" - }, - "dependencies": { - "@types/node": { - "version": "15.6.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-15.6.1.tgz", - "integrity": "sha512-7EIraBEyRHEe7CH+Fm1XvgqU6uwZN8Q7jppJGcqjROMT29qhAuuOxYB1uEY5UMYQKEmA5D+5tBnhdaPXSsLONA==" - } } }, "@grpc/proto-loader": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.6.2.tgz", - "integrity": "sha512-q2Qle60Ht2OQBCp9S5hv1JbI4uBBq6/mqSevFNK3ZEgRDBCAkWqZPUhD/K9gXOHrHKluliHiVq2L9sw1mVyAIg==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.6.4.tgz", + "integrity": "sha512-7xvDvW/vJEcmLUltCUGOgWRPM8Oofv0eCFSVMuKqaqWJaXSzmB+m9hiyqe34QofAl4WAzIKUZZlinIF9FOHyTQ==", "requires": { "@types/long": "^4.0.1", "lodash.camelcase": "^4.3.0", @@ -370,16 +363,15 @@ "dev": true }, "@types/mocha": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.2.tgz", - "integrity": "sha512-Lwh0lzzqT5Pqh6z61P3c3P5nm6fzQK/MMHl9UKeneAeInVflBSz1O2EkX6gM6xfJd7FBXBY5purtLx7fUiZ7Hw==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.0.0.tgz", + "integrity": "sha512-scN0hAWyLVAvLR9AyW7HoFF5sJZglyBsbPuHO4fv7JRvfmPBMfp1ozWqOf/e4wwPNxezBZXRfWzMb6iFLgEVRA==", "dev": true }, "@types/node": { "version": "14.17.1", "resolved": "https://registry.npmjs.org/@types/node/-/node-14.17.1.tgz", - "integrity": "sha512-/tpUyFD7meeooTRwl3sYlihx2BrJE7q9XF71EguPFIySj9B7qgnRtHsHTho+0AUm4m1SvWGm6uSncrR94q6Vtw==", - "dev": true + "integrity": "sha512-/tpUyFD7meeooTRwl3sYlihx2BrJE7q9XF71EguPFIySj9B7qgnRtHsHTho+0AUm4m1SvWGm6uSncrR94q6Vtw==" }, "@types/normalize-package-data": { "version": "2.4.0", @@ -1158,19 +1150,19 @@ } }, "chokidar": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", - "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", + "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", "dev": true, "requires": { - "anymatch": "~3.1.1", + "anymatch": "~3.1.2", "braces": "~3.0.2", - "fsevents": "~2.3.1", - "glob-parent": "~5.1.0", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", - "readdirp": "~3.5.0" + "readdirp": "~3.6.0" } }, "chownr": { @@ -1476,9 +1468,9 @@ "dev": true }, "duplexify": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.1.tgz", - "integrity": "sha512-DY3xVEmVHTv1wSzKNbwoU6nVjzI369Y6sPoqfYr0/xlx3IdX2n94xIszTcjPO8W8ZIv0Wb0PXNcjuZyT4wiICA==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.2.tgz", + "integrity": "sha512-fz3OjcNCHmRP12MJoZMPglx8m4rrFP8rovnk4vT8Fs+aonZoCwGg10dSsQsfP/E62eZcPTMSMP6686fu9Qlqtw==", "requires": { "end-of-stream": "^1.4.1", "inherits": "^2.0.3", @@ -2095,9 +2087,9 @@ } }, "gcp-metadata": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-4.2.1.tgz", - "integrity": "sha512-tSk+REe5iq/N+K+SK1XjZJUrFPuDqGZVzCy2vocIHIGmPlTGsa8owXMJwGkrXr73NO0AzhPW4MF2DEHz7P2AVw==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-4.3.0.tgz", + "integrity": "sha512-L9XQUpvKJCM76YRSmcxrR4mFPzPGsgZUH+GgHMxAET8qc6+BhRJq63RLhWakgEO2KKVgeSDVfyiNjkGSADwNTA==", "requires": { "gaxios": "^4.0.0", "json-bigint": "^1.0.0" @@ -2184,9 +2176,9 @@ } }, "google-auth-library": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-7.1.0.tgz", - "integrity": "sha512-X+gbkGjnLN3HUZP2W3KBREuA603BXd80ITvL0PeS0QpyDNYz/u0pIZ7aRuGnrSuUc0grk/qxEgtVTFt1ogbP+A==", + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-7.6.2.tgz", + "integrity": "sha512-yvEnwVsvgH8RXTtpf6e84e7dqIdUEKJhmQvTJwzYP+RDdHjLrDp9sk2u2ZNDJPLKZ7DJicx/+AStcQspJiq+Qw==", "requires": { "arrify": "^2.0.0", "base64-js": "^1.3.0", @@ -2200,9 +2192,9 @@ } }, "google-gax": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-2.12.0.tgz", - "integrity": "sha512-UDx4ZZx85vXBe6GZ0sdRSzuegLrRQdRjCxlauX+U7i5YwOoSgcSaIM71BhcdHwGPhEkvO/SSHrEfc1wpL/J6JA==", + "version": "2.24.2", + "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-2.24.2.tgz", + "integrity": "sha512-4OtyEIt/KAXRX5o2W/6DGf8MnMs1lMXwcGoPHR4PwXfTUVKjK7ywRe2/yRIMkYEDzAwu/kppPgfpX+kCG2rWfw==", "requires": { "@grpc/grpc-js": "~1.3.0", "@grpc/proto-loader": "^0.6.1", @@ -2210,18 +2202,19 @@ "abort-controller": "^3.0.0", "duplexify": "^4.0.0", "fast-text-encoding": "^1.0.3", - "google-auth-library": "^7.0.2", + "google-auth-library": "^7.6.1", "is-stream-ended": "^0.1.4", "node-fetch": "^2.6.1", "object-hash": "^2.1.1", - "protobufjs": "^6.10.2", + "proto3-json-serializer": "^0.1.1", + "protobufjs": "6.11.2", "retry-request": "^4.0.0" } }, "google-p12-pem": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-3.0.3.tgz", - "integrity": "sha512-wS0ek4ZtFx/ACKYF3JhyGe5kzH7pgiQ7J5otlumqR9psmWMYc+U9cErKlCYVYHoUaidXHdZ2xbo34kB+S+24hA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-3.1.2.tgz", + "integrity": "sha512-tjf3IQIt7tWCDsa0ofDQ1qqSCNzahXDxdAGJDbruWqu3eCg5CKLYKN+hi0s6lfvzYZ1GDVr+oDF9OOWlDSdf0A==", "requires": { "node-forge": "^0.10.0" } @@ -2269,9 +2262,9 @@ "dev": true }, "gtoken": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-5.2.1.tgz", - "integrity": "sha512-OY0BfPKe3QnMsY9MzTHTSKn+Vl2l1CcLe6BwDEQj00mbbkl5nyQ/7EUREstg4fQNZ8iYE7br4JJ7TdKeDOPWmw==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-5.3.1.tgz", + "integrity": "sha512-yqOREjzLHcbzz1UrQoxhBtpk8KjrVhuqPE7od1K2uhyxG2BHjKZetlbLw/SPZak/QqTIQW+addS+EcjqQsZbwQ==", "requires": { "gaxios": "^4.0.0", "google-p12-pem": "^3.0.3", @@ -2635,6 +2628,12 @@ "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", "dev": true }, + "is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true + }, "is-yarn-global": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", @@ -3006,12 +3005,25 @@ "dev": true }, "log-symbols": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", - "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, "requires": { - "chalk": "^4.0.0" + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "dependencies": { + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + } } }, "long": { @@ -3236,33 +3248,33 @@ "dev": true }, "mocha": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.4.0.tgz", - "integrity": "sha512-hJaO0mwDXmZS4ghXsvPVriOhsxQ7ofcpQdm8dE+jISUOKopitvnXFQmpRR7jd2K6VBG6E26gU3IAbXXGIbu4sQ==", + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.1.1.tgz", + "integrity": "sha512-0wE74YMgOkCgBUj8VyIDwmLUjTsS13WV1Pg7l0SHea2qzZzlq7MDnfbPsHKcELBRk3+izEVkRofjmClpycudCA==", "dev": true, "requires": { "@ungap/promise-all-settled": "1.1.2", "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", - "chokidar": "3.5.1", + "chokidar": "3.5.2", "debug": "4.3.1", "diff": "5.0.0", "escape-string-regexp": "4.0.0", "find-up": "5.0.0", - "glob": "7.1.6", + "glob": "7.1.7", "growl": "1.10.5", "he": "1.2.0", - "js-yaml": "4.0.0", - "log-symbols": "4.0.0", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", "minimatch": "3.0.4", "ms": "2.1.3", - "nanoid": "3.1.20", - "serialize-javascript": "5.0.1", + "nanoid": "3.1.23", + "serialize-javascript": "6.0.0", "strip-json-comments": "3.1.1", "supports-color": "8.1.1", "which": "2.0.2", "wide-align": "1.1.3", - "workerpool": "6.1.0", + "workerpool": "6.1.5", "yargs": "16.2.0", "yargs-parser": "20.2.4", "yargs-unparser": "2.0.0" @@ -3285,9 +3297,9 @@ } }, "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -3299,9 +3311,9 @@ } }, "js-yaml": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz", - "integrity": "sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "requires": { "argparse": "^2.0.1" @@ -3340,6 +3352,15 @@ "p-limit": "^3.0.2" } }, + "serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + }, "supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -3369,9 +3390,9 @@ "dev": true }, "nanoid": { - "version": "3.1.20", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.20.tgz", - "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==", + "version": "3.1.23", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.23.tgz", + "integrity": "sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw==", "dev": true }, "natural-compare": { @@ -3787,6 +3808,11 @@ "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true }, + "proto3-json-serializer": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/proto3-json-serializer/-/proto3-json-serializer-0.1.3.tgz", + "integrity": "sha512-X0DAtxCBsy1NDn84huVFGOFgBslT2gBmM+85nY6/5SOAaCon1jzVNdvi74foIyFvs5CjtSbQsepsM5TsyNhqQw==" + }, "protobufjs": { "version": "6.11.2", "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.2.tgz", @@ -3805,13 +3831,6 @@ "@types/long": "^4.0.1", "@types/node": ">=13.7.0", "long": "^4.0.0" - }, - "dependencies": { - "@types/node": { - "version": "15.6.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-15.6.1.tgz", - "integrity": "sha512-7EIraBEyRHEe7CH+Fm1XvgqU6uwZN8Q7jppJGcqjROMT29qhAuuOxYB1uEY5UMYQKEmA5D+5tBnhdaPXSsLONA==" - } } }, "pump": { @@ -3960,9 +3979,9 @@ } }, "readdirp": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", - "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, "requires": { "picomatch": "^2.2.1" @@ -4084,11 +4103,12 @@ } }, "retry-request": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-4.1.3.tgz", - "integrity": "sha512-QnRZUpuPNgX0+D1xVxul6DbJ9slvo4Rm6iV/dn63e048MvGbUZiKySVt6Tenp04JqmchxjiLltGerOJys7kJYQ==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-4.2.2.tgz", + "integrity": "sha512-xA93uxUD/rogV7BV59agW/JHPGXeREMWiZc9jhcwY4YdZ7QOtC7qbomYg0n4wyk2lJhggjvKvhNX8wln/Aldhg==", "requires": { - "debug": "^4.1.1" + "debug": "^4.1.1", + "extend": "^3.0.2" } }, "reusify": { @@ -4918,9 +4938,9 @@ "dev": true }, "workerpool": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.0.tgz", - "integrity": "sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg==", + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.5.tgz", + "integrity": "sha512-XdKkCK0Zqc6w3iTxLckiuJ81tiD/o5rBE/m+nXpRCB+/Sq4DqkfXZ/x0jW02DG1tGsfUGXbTJyZDP+eu67haSw==", "dev": true }, "wrap-ansi": { diff --git a/packages/google-cloud-shell/package.json b/packages/google-cloud-shell/package.json index befd05df30c..89c0b656128 100644 --- a/packages/google-cloud-shell/package.json +++ b/packages/google-cloud-shell/package.json @@ -42,7 +42,7 @@ "google-gax": "^2.24.1" }, "devDependencies": { - "@types/mocha": "^8.2.2", + "@types/mocha": "^9.0.0", "@types/node": "^14.14.44", "@types/sinon": "^10.0.0", "c8": "^7.7.2", @@ -51,7 +51,7 @@ "jsdoc-fresh": "^1.0.2", "jsdoc-region-tag": "^1.0.6", "linkinator": "^2.13.6", - "mocha": "^8.4.0", + "mocha": "^9.0.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", "sinon": "^11.0.0", diff --git a/packages/google-cloud-shell/samples/package.json b/packages/google-cloud-shell/samples/package.json index fece6117236..b203025214e 100644 --- a/packages/google-cloud-shell/samples/package.json +++ b/packages/google-cloud-shell/samples/package.json @@ -18,6 +18,6 @@ "devDependencies": { "c8": "^7.1.0", "chai": "^4.2.0", - "mocha": "^8.0.0" + "mocha": "^9.0.0" } } From 3c348023d3a750e4c4b4521af6ae3bc3e695dab3 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 30 Aug 2021 17:24:19 +0000 Subject: [PATCH 073/254] chore: release 1.0.5 (#34) :robot: I have created a release \*beep\* \*boop\* --- ### [1.0.5](https://www.github.com/googleapis/nodejs-cloud-shell/compare/v1.0.4...v1.0.5) (2021-08-30) ### Bug Fixes * flag module as GA ([#33](https://www.github.com/googleapis/nodejs-cloud-shell/issues/33)) ([cf357c8](https://www.github.com/googleapis/nodejs-cloud-shell/commit/cf357c81140d75b3c7106dc747bac328da247363)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-shell/CHANGELOG.md | 7 +++++++ packages/google-cloud-shell/package-lock.json | 2 +- packages/google-cloud-shell/package.json | 2 +- packages/google-cloud-shell/samples/package.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-shell/CHANGELOG.md b/packages/google-cloud-shell/CHANGELOG.md index 55390944034..972bfd0e20b 100644 --- a/packages/google-cloud-shell/CHANGELOG.md +++ b/packages/google-cloud-shell/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.0.5](https://www.github.com/googleapis/nodejs-cloud-shell/compare/v1.0.4...v1.0.5) (2021-08-30) + + +### Bug Fixes + +* flag module as GA ([#33](https://www.github.com/googleapis/nodejs-cloud-shell/issues/33)) ([cf357c8](https://www.github.com/googleapis/nodejs-cloud-shell/commit/cf357c81140d75b3c7106dc747bac328da247363)) + ### [1.0.4](https://www.github.com/googleapis/nodejs-cloud-shell/compare/v1.0.3...v1.0.4) (2021-08-17) diff --git a/packages/google-cloud-shell/package-lock.json b/packages/google-cloud-shell/package-lock.json index 620d2762597..c85647d246b 100644 --- a/packages/google-cloud-shell/package-lock.json +++ b/packages/google-cloud-shell/package-lock.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/shell", - "version": "1.0.4", + "version": "1.0.5", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/google-cloud-shell/package.json b/packages/google-cloud-shell/package.json index 89c0b656128..001c51e019e 100644 --- a/packages/google-cloud-shell/package.json +++ b/packages/google-cloud-shell/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/shell", - "version": "1.0.4", + "version": "1.0.5", "description": "cloudshell client for Node.js", "repository": "googleapis/nodejs-cloud-shell", "license": "Apache-2.0", diff --git a/packages/google-cloud-shell/samples/package.json b/packages/google-cloud-shell/samples/package.json index b203025214e..eb97e78421f 100644 --- a/packages/google-cloud-shell/samples/package.json +++ b/packages/google-cloud-shell/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/shell": "^1.0.4" + "@google-cloud/shell": "^1.0.5" }, "devDependencies": { "c8": "^7.1.0", From bf898b2d0e3add354af9cab01e3a641ccaff2d59 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Wed, 8 Sep 2021 20:39:53 -0400 Subject: [PATCH 074/254] fix(build): switch primary branch to main (#76) --- packages/google-cloud-policytroubleshooter/README.md | 12 ++++++------ .../samples/README.md | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/google-cloud-policytroubleshooter/README.md b/packages/google-cloud-policytroubleshooter/README.md index 2ae0eea3653..591e1ae6b4a 100644 --- a/packages/google-cloud-policytroubleshooter/README.md +++ b/packages/google-cloud-policytroubleshooter/README.md @@ -6,7 +6,7 @@ [![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/policy-troubleshooter.svg)](https://www.npmjs.org/package/@google-cloud/policy-troubleshooter) -[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-policy-troubleshooter/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-policy-troubleshooter) +[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-policy-troubleshooter/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-policy-troubleshooter) @@ -15,7 +15,7 @@ Policytroubleshooter client for Node.js A comprehensive list of changes in each version may be found in -[the CHANGELOG](https://github.com/googleapis/nodejs-policy-troubleshooter/blob/master/CHANGELOG.md). +[the CHANGELOG](https://github.com/googleapis/nodejs-policy-troubleshooter/blob/main/CHANGELOG.md). * [IAM Policy Troubleshooter API Node.js Client API Reference][client-docs] * [IAM Policy Troubleshooter API Documentation][product-docs] @@ -87,11 +87,11 @@ troubelshootPolicy(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-policy-troubleshooter/tree/master/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-policy-troubleshooter/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Quickstart | [source code](https://github.com/googleapis/nodejs-policy-troubleshooter/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-policy-troubleshooter&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/nodejs-policy-troubleshooter/blob/main/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-policy-troubleshooter&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | @@ -140,7 +140,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-policy-troubleshooter/blob/master/CONTRIBUTING.md). +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-policy-troubleshooter/blob/main/CONTRIBUTING.md). Please note that this `README.md`, the `samples/README.md`, and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) @@ -152,7 +152,7 @@ to its templates in Apache Version 2.0 -See [LICENSE](https://github.com/googleapis/nodejs-policy-troubleshooter/blob/master/LICENSE) +See [LICENSE](https://github.com/googleapis/nodejs-policy-troubleshooter/blob/main/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/policy-troubleshooter/latest [product-docs]: https://cloud.google.com/iam/docs/troubleshooting-access#rest-api/ diff --git a/packages/google-cloud-policytroubleshooter/samples/README.md b/packages/google-cloud-policytroubleshooter/samples/README.md index 2e1b0adef34..39d1ad9856f 100644 --- a/packages/google-cloud-policytroubleshooter/samples/README.md +++ b/packages/google-cloud-policytroubleshooter/samples/README.md @@ -31,7 +31,7 @@ Before running the samples, make sure you've followed the steps outlined in ### Quickstart -View the [source code](https://github.com/googleapis/nodejs-policy-troubleshooter/blob/master/samples/quickstart.js). +View the [source code](https://github.com/googleapis/nodejs-policy-troubleshooter/blob/main/samples/quickstart.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-policy-troubleshooter&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) From e68cb8041bd9a940e63089bb381425c4ded26ae1 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 8 Sep 2021 19:05:03 -0700 Subject: [PATCH 075/254] chore: release 1.1.1 (#77) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-policytroubleshooter/CHANGELOG.md | 7 +++++++ packages/google-cloud-policytroubleshooter/package.json | 2 +- .../google-cloud-policytroubleshooter/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-policytroubleshooter/CHANGELOG.md b/packages/google-cloud-policytroubleshooter/CHANGELOG.md index 8770ddf12a8..1fe31971f3f 100644 --- a/packages/google-cloud-policytroubleshooter/CHANGELOG.md +++ b/packages/google-cloud-policytroubleshooter/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.1.1](https://www.github.com/googleapis/nodejs-policy-troubleshooter/compare/v1.1.0...v1.1.1) (2021-09-09) + + +### Bug Fixes + +* **build:** switch primary branch to main ([#76](https://www.github.com/googleapis/nodejs-policy-troubleshooter/issues/76)) ([dd536c5](https://www.github.com/googleapis/nodejs-policy-troubleshooter/commit/dd536c5796007a1c5c42c30bbd672b40b7bc5e60)) + ## [1.1.0](https://www.github.com/googleapis/nodejs-policy-troubleshooter/compare/v1.0.6...v1.1.0) (2021-08-23) diff --git a/packages/google-cloud-policytroubleshooter/package.json b/packages/google-cloud-policytroubleshooter/package.json index 7cbcf67d806..669d6c7bd25 100644 --- a/packages/google-cloud-policytroubleshooter/package.json +++ b/packages/google-cloud-policytroubleshooter/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/policy-troubleshooter", - "version": "1.1.0", + "version": "1.1.1", "description": "Policytroubleshooter client for Node.js", "repository": "googleapis/nodejs-policy-troubleshooter", "license": "Apache-2.0", diff --git a/packages/google-cloud-policytroubleshooter/samples/package.json b/packages/google-cloud-policytroubleshooter/samples/package.json index af10af95e64..adccda2547c 100644 --- a/packages/google-cloud-policytroubleshooter/samples/package.json +++ b/packages/google-cloud-policytroubleshooter/samples/package.json @@ -14,7 +14,7 @@ }, "dependencies": { "@google-cloud/local-auth": "^1.0.0", - "@google-cloud/policy-troubleshooter": "^1.1.0" + "@google-cloud/policy-troubleshooter": "^1.1.1" }, "devDependencies": { "c8": "^7.1.0", From 68d52f70670a27268cef60bdc6230aea82d6b4d4 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 28 Sep 2021 16:56:03 -0700 Subject: [PATCH 076/254] docs(samples): add auto-generated samples for Node with api short name in region tag (#30) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs(samples): add auto-generated samples for Node with api short name in region tag PiperOrigin-RevId: 399287285 Source-Link: https://github.com/googleapis/googleapis/commit/15759865d1c54e3d46429010f7e472fe6c3d3715 Source-Link: https://github.com/googleapis/googleapis-gen/commit/b27fff623a5d8d586b703b5e4919856abe7c2eb3 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjI3ZmZmNjIzYTVkOGQ1ODZiNzAzYjVlNDkxOTg1NmFiZTdjMmViMyJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../gateway_service.delete_resource.js | 60 +++++++++++++++++++ .../v1beta1/gateway_service.get_resource.js | 60 +++++++++++++++++++ .../v1beta1/gateway_service.patch_resource.js | 60 +++++++++++++++++++ .../v1beta1/gateway_service.post_resource.js | 60 +++++++++++++++++++ .../v1beta1/gateway_service.put_resource.js | 60 +++++++++++++++++++ 5 files changed, 300 insertions(+) create mode 100644 packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.delete_resource.js create mode 100644 packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.get_resource.js create mode 100644 packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.patch_resource.js create mode 100644 packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.post_resource.js create mode 100644 packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.put_resource.js diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.delete_resource.js b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.delete_resource.js new file mode 100644 index 00000000000..ec54ce42e11 --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.delete_resource.js @@ -0,0 +1,60 @@ +// Copyright 2021 Google LLC +// +// 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. + +'use strict'; + +function main() { + // [START connectgateway_v1beta1_generated_GatewayService_DeleteResource_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The HTTP Content-Type header value specifying the content type of the body. + */ + // const contentType = 'abc123' + /** + * The HTTP request/response body as raw binary. + */ + // const data = 'Buffer.from('string')' + /** + * Application specific response metadata. Must be set in the first response + * for streaming APIs. + */ + // const extensions = 1234 + + // Imports the Gateway library + const {GatewayServiceClient} = + require('@google-cloud/gke-connect-gateway').v1beta1; + + // Instantiates a client + const gatewayClient = new GatewayServiceClient(); + + async function deleteResource() { + // Construct request + const request = {}; + + // Run request + const response = await gatewayClient.deleteResource(request); + console.log(response); + } + + deleteResource(); + // [END connectgateway_v1beta1_generated_GatewayService_DeleteResource_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.get_resource.js b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.get_resource.js new file mode 100644 index 00000000000..19115308d05 --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.get_resource.js @@ -0,0 +1,60 @@ +// Copyright 2021 Google LLC +// +// 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. + +'use strict'; + +function main() { + // [START connectgateway_v1beta1_generated_GatewayService_GetResource_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The HTTP Content-Type header value specifying the content type of the body. + */ + // const contentType = 'abc123' + /** + * The HTTP request/response body as raw binary. + */ + // const data = 'Buffer.from('string')' + /** + * Application specific response metadata. Must be set in the first response + * for streaming APIs. + */ + // const extensions = 1234 + + // Imports the Gateway library + const {GatewayServiceClient} = + require('@google-cloud/gke-connect-gateway').v1beta1; + + // Instantiates a client + const gatewayClient = new GatewayServiceClient(); + + async function getResource() { + // Construct request + const request = {}; + + // Run request + const response = await gatewayClient.getResource(request); + console.log(response); + } + + getResource(); + // [END connectgateway_v1beta1_generated_GatewayService_GetResource_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.patch_resource.js b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.patch_resource.js new file mode 100644 index 00000000000..98fd0db958c --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.patch_resource.js @@ -0,0 +1,60 @@ +// Copyright 2021 Google LLC +// +// 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. + +'use strict'; + +function main() { + // [START connectgateway_v1beta1_generated_GatewayService_PatchResource_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The HTTP Content-Type header value specifying the content type of the body. + */ + // const contentType = 'abc123' + /** + * The HTTP request/response body as raw binary. + */ + // const data = 'Buffer.from('string')' + /** + * Application specific response metadata. Must be set in the first response + * for streaming APIs. + */ + // const extensions = 1234 + + // Imports the Gateway library + const {GatewayServiceClient} = + require('@google-cloud/gke-connect-gateway').v1beta1; + + // Instantiates a client + const gatewayClient = new GatewayServiceClient(); + + async function patchResource() { + // Construct request + const request = {}; + + // Run request + const response = await gatewayClient.patchResource(request); + console.log(response); + } + + patchResource(); + // [END connectgateway_v1beta1_generated_GatewayService_PatchResource_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.post_resource.js b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.post_resource.js new file mode 100644 index 00000000000..ad581725015 --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.post_resource.js @@ -0,0 +1,60 @@ +// Copyright 2021 Google LLC +// +// 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. + +'use strict'; + +function main() { + // [START connectgateway_v1beta1_generated_GatewayService_PostResource_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The HTTP Content-Type header value specifying the content type of the body. + */ + // const contentType = 'abc123' + /** + * The HTTP request/response body as raw binary. + */ + // const data = 'Buffer.from('string')' + /** + * Application specific response metadata. Must be set in the first response + * for streaming APIs. + */ + // const extensions = 1234 + + // Imports the Gateway library + const {GatewayServiceClient} = + require('@google-cloud/gke-connect-gateway').v1beta1; + + // Instantiates a client + const gatewayClient = new GatewayServiceClient(); + + async function postResource() { + // Construct request + const request = {}; + + // Run request + const response = await gatewayClient.postResource(request); + console.log(response); + } + + postResource(); + // [END connectgateway_v1beta1_generated_GatewayService_PostResource_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.put_resource.js b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.put_resource.js new file mode 100644 index 00000000000..5e367a75c16 --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.put_resource.js @@ -0,0 +1,60 @@ +// Copyright 2021 Google LLC +// +// 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. + +'use strict'; + +function main() { + // [START connectgateway_v1beta1_generated_GatewayService_PutResource_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The HTTP Content-Type header value specifying the content type of the body. + */ + // const contentType = 'abc123' + /** + * The HTTP request/response body as raw binary. + */ + // const data = 'Buffer.from('string')' + /** + * Application specific response metadata. Must be set in the first response + * for streaming APIs. + */ + // const extensions = 1234 + + // Imports the Gateway library + const {GatewayServiceClient} = + require('@google-cloud/gke-connect-gateway').v1beta1; + + // Instantiates a client + const gatewayClient = new GatewayServiceClient(); + + async function putResource() { + // Construct request + const request = {}; + + // Run request + const response = await gatewayClient.putResource(request); + console.log(response); + } + + putResource(); + // [END connectgateway_v1beta1_generated_GatewayService_PutResource_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); From 3fa1f405f4c01e92cd3816d21eea815e2cd989f7 Mon Sep 17 00:00:00 2001 From: Benjamin Coe Date: Wed, 6 Oct 2021 12:23:23 -0700 Subject: [PATCH 077/254] feat: initial stub of library --- .../google-cloud-deploy/CODE_OF_CONDUCT.md | 94 ++++++++ packages/google-cloud-deploy/CONTRIBUTING.md | 76 +++++++ packages/google-cloud-deploy/LICENSE | 202 ++++++++++++++++++ packages/google-cloud-deploy/README.md | 161 ++++++++++++++ 4 files changed, 533 insertions(+) create mode 100644 packages/google-cloud-deploy/CODE_OF_CONDUCT.md create mode 100644 packages/google-cloud-deploy/CONTRIBUTING.md create mode 100644 packages/google-cloud-deploy/LICENSE create mode 100644 packages/google-cloud-deploy/README.md diff --git a/packages/google-cloud-deploy/CODE_OF_CONDUCT.md b/packages/google-cloud-deploy/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..2add2547a81 --- /dev/null +++ b/packages/google-cloud-deploy/CODE_OF_CONDUCT.md @@ -0,0 +1,94 @@ + +# Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +This Code of Conduct also applies outside the project spaces when the Project +Steward has a reasonable belief that an individual's behavior may have a +negative impact on the project or its community. + +## Conflict Resolution + +We do not believe that all conflict is bad; healthy debate and disagreement +often yield positive results. However, it is never okay to be disrespectful or +to engage in behavior that violates the project’s code of conduct. + +If you see someone violating the code of conduct, you are encouraged to address +the behavior directly with those involved. Many issues can be resolved quickly +and easily, and this gives people more control over the outcome of their +dispute. If you are unable to resolve the matter for any reason, or if the +behavior is threatening or harassing, report it. We are dedicated to providing +an environment where participants feel welcome and safe. + +Reports should be directed to *googleapis-stewards@google.com*, the +Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to +receive and address reported violations of the code of conduct. They will then +work with a committee consisting of representatives from the Open Source +Programs Office and the Google Open Source Strategy team. If for any reason you +are uncomfortable reaching out to the Project Steward, please email +opensource@google.com. + +We will investigate every complaint, but you may not receive a direct response. +We will use our discretion in determining when and how to follow up on reported +incidents, which may range from not taking action to permanent expulsion from +the project and project-sponsored spaces. We will notify the accused of the +report and provide them an opportunity to discuss it before any action is taken. +The identity of the reporter will be omitted from the details of the report +supplied to the accused. In potentially harmful situations, such as ongoing +harassment or threats to anyone's safety, we may take action without notice. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/packages/google-cloud-deploy/CONTRIBUTING.md b/packages/google-cloud-deploy/CONTRIBUTING.md new file mode 100644 index 00000000000..94de8fe2a32 --- /dev/null +++ b/packages/google-cloud-deploy/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# How to become a contributor and submit your own code + +**Table of contents** + +* [Contributor License Agreements](#contributor-license-agreements) +* [Contributing a patch](#contributing-a-patch) +* [Running the tests](#running-the-tests) +* [Releasing the library](#releasing-the-library) + +## Contributor License Agreements + +We'd love to accept your sample apps and patches! Before we can take them, we +have to jump a couple of legal hurdles. + +Please fill out either the individual or corporate Contributor License Agreement +(CLA). + + * If you are an individual writing original source code and you're sure you + own the intellectual property, then you'll need to sign an [individual CLA](https://developers.google.com/open-source/cla/individual). + * If you work for a company that wants to allow you to contribute your work, + then you'll need to sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate). + +Follow either of the two links above to access the appropriate CLA and +instructions for how to sign and return it. Once we receive it, we'll be able to +accept your pull requests. + +## Contributing A Patch + +1. Submit an issue describing your proposed change to the repo in question. +1. The repo owner will respond to your issue promptly. +1. If your proposed change is accepted, and you haven't already done so, sign a + Contributor License Agreement (see details above). +1. Fork the desired repo, develop and test your code changes. +1. Ensure that your code adheres to the existing style in the code to which + you are contributing. +1. Ensure that your code has an appropriate set of tests which all pass. +1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. +1. Submit a pull request. + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Google Cloud Deploy API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + + +## Running the tests + +1. [Prepare your environment for Node.js setup][setup]. + +1. Install dependencies: + + npm install + +1. Run the tests: + + # Run unit tests. + npm test + + # Run sample integration tests. + npm run samples-test + + # Run all system tests. + npm run system-test + +1. Lint (and maybe fix) any changes: + + npm run fix + +[setup]: https://cloud.google.com/nodejs/docs/setup +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=clouddeploy.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-cloud-deploy/LICENSE b/packages/google-cloud-deploy/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/packages/google-cloud-deploy/LICENSE @@ -0,0 +1,202 @@ + + 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/packages/google-cloud-deploy/README.md b/packages/google-cloud-deploy/README.md new file mode 100644 index 00000000000..1e68aa788a9 --- /dev/null +++ b/packages/google-cloud-deploy/README.md @@ -0,0 +1,161 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [Google Cloud Deploy: Node.js Client](https://github.com/googleapis/nodejs-deploy) + +[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![npm version](https://img.shields.io/npm/v/@google-cloud/deploy.svg)](https://www.npmjs.org/package/@google-cloud/deploy) +[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-deploy/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-deploy) + + + + +clouddeploy client for Node.js + + +A comprehensive list of changes in each version may be found in +[the CHANGELOG](https://github.com/googleapis/nodejs-deploy/blob/master/CHANGELOG.md). + +* [Google Cloud Deploy Node.js Client API Reference][client-docs] +* [Google Cloud Deploy Documentation][product-docs] +* [github.com/googleapis/nodejs-deploy](https://github.com/googleapis/nodejs-deploy) + +Read more about the client libraries for Cloud APIs, including the older +Google APIs Client Libraries, in [Client Libraries Explained][explained]. + +[explained]: https://cloud.google.com/apis/docs/client-libraries-explained + +**Table of contents:** + + +* [Quickstart](#quickstart) + * [Before you begin](#before-you-begin) + * [Installing the client library](#installing-the-client-library) + * [Using the client library](#using-the-client-library) +* [Samples](#samples) +* [Versioning](#versioning) +* [Contributing](#contributing) +* [License](#license) + +## Quickstart + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Google Cloud Deploy API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + +### Installing the client library + +```bash +npm install @google-cloud/deploy +``` + + +### Using the client library + +```javascript +// Imports the Google Cloud client library + +// remove this line after package is released +// eslint-disable-next-line node/no-missing-require +const {CloudDeployClient} = require('@google-cloud/deploy'); + +// TODO(developer): replace with your prefered project ID. +// const projectId = 'my-project' + +// Creates a client +// eslint-disable-next-line no-unused-vars +const client = new {CloudDeployClient}(); + +//TODO(library generator): write the actual function you will be testing +async function doSomething() { + console.log('DPE! Change this code so that it shows how to use the library! See comments below on structure.') + // const [thing] = await client.methodName({ + // }); + // console.info(thing); +} +doSomething(); + +``` + + + +## Samples + +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-deploy/tree/master/samples) directory. Each sample's `README.md` has instructions for running its sample. + +| Sample | Source Code | Try it | +| --------------------------- | --------------------------------- | ------ | +| Quickstart | [source code](https://github.com/googleapis/nodejs-deploy/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-deploy&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | + + + +The [Google Cloud Deploy Node.js Client API Reference][client-docs] documentation +also contains samples. + +## Supported Node.js Versions + +Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). +Libraries are compatible with all current _active_ and _maintenance_ versions of +Node.js. + +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. + +_Legacy Node.js versions are supported as a best effort:_ + +* Legacy versions will not be tested in continuous integration. +* Some security patches may not be able to be backported. +* Dependencies will not be kept up-to-date, and features will not be backported. + +#### Legacy tags available + +* `legacy-8`: install client libraries from this dist-tag for versions + compatible with Node.js 8. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + + + +This library is considered to be in **beta**. This means it is expected to be +mostly stable while we work toward a general availability release; however, +complete stability is not guaranteed. We will address issues and requests +against beta libraries with a high priority. + + + + +More Information: [Google Cloud Platform Launch Stages][launch_stages] + +[launch_stages]: https://cloud.google.com/terms/launch-stages + +## Contributing + +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-deploy/blob/master/CONTRIBUTING.md). + +Please note that this `README.md`, the `samples/README.md`, +and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) +are generated from a central template. To edit one of these files, make an edit +to its templates in +[directory](https://github.com/googleapis/synthtool). + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com/googleapis/nodejs-deploy/blob/master/LICENSE) + +[client-docs]: https://cloud.google.com/nodejs/docs/reference/clouddeploy/latest +[product-docs]: https://cloud.google.com/deploy/ +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=clouddeploy.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started From ff4ab629dfd12691066187967c37005830ed8a04 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Thu, 7 Oct 2021 19:25:46 -0400 Subject: [PATCH 078/254] feat: initial generation of library (#1) --- packages/google-cloud-deploy/.eslintignore | 6 + packages/google-cloud-deploy/.eslintrc.json | 3 + packages/google-cloud-deploy/.gitattributes | 4 + .../google-cloud-deploy/.github/.OwlBot.yaml | 22 + packages/google-cloud-deploy/.gitignore | 14 + packages/google-cloud-deploy/.jsdoc.js | 55 + packages/google-cloud-deploy/.mocharc.js | 29 + packages/google-cloud-deploy/.nycrc | 24 + packages/google-cloud-deploy/.prettierignore | 6 + packages/google-cloud-deploy/.prettierrc.js | 17 + .../google-cloud-deploy/.repo-metadata.json | 15 + packages/google-cloud-deploy/README.md | 83 +- .../linkinator.config.json | 10 + packages/google-cloud-deploy/package.json | 66 + .../google/cloud/deploy/v1/cloud_deploy.proto | 1390 + .../google-cloud-deploy/protos/protos.d.ts | 10388 ++++++ packages/google-cloud-deploy/protos/protos.js | 26502 ++++++++++++++++ .../google-cloud-deploy/protos/protos.json | 3249 ++ .../google-cloud-deploy/samples/README.md | 50 + .../v1/cloud_deploy.approve_rollout.js | 59 + .../cloud_deploy.create_delivery_pipeline.js | 83 + .../v1/cloud_deploy.create_release.js | 84 + .../v1/cloud_deploy.create_rollout.js | 84 + .../v1/cloud_deploy.create_target.js | 84 + .../cloud_deploy.delete_delivery_pipeline.js | 90 + .../v1/cloud_deploy.delete_target.js | 84 + .../generated/v1/cloud_deploy.get_config.js | 52 + .../v1/cloud_deploy.get_delivery_pipeline.js | 53 + .../generated/v1/cloud_deploy.get_release.js | 53 + .../generated/v1/cloud_deploy.get_rollout.js | 53 + .../generated/v1/cloud_deploy.get_target.js | 53 + .../cloud_deploy.list_delivery_pipelines.js | 78 + .../v1/cloud_deploy.list_releases.js | 76 + .../v1/cloud_deploy.list_rollouts.js | 76 + .../generated/v1/cloud_deploy.list_targets.js | 77 + .../cloud_deploy.update_delivery_pipeline.js | 86 + .../v1/cloud_deploy.update_target.js | 86 + .../google-cloud-deploy/samples/package.json | 23 + .../google-cloud-deploy/samples/quickstart.js | 78 + .../samples/test/quickstart.js | 48 + packages/google-cloud-deploy/src/index.ts | 27 + .../src/v1/cloud_deploy_client.ts | 3768 +++ .../src/v1/cloud_deploy_client_config.json | 128 + .../src/v1/cloud_deploy_proto_list.json | 3 + .../src/v1/gapic_metadata.json | 219 + packages/google-cloud-deploy/src/v1/index.ts | 19 + .../system-test/fixtures/sample/src/index.js | 26 + .../system-test/fixtures/sample/src/index.ts | 32 + .../system-test/install.ts | 51 + .../test/gapic_cloud_deploy_v1.ts | 4225 +++ packages/google-cloud-deploy/tsconfig.json | 19 + .../google-cloud-deploy/webpack.config.js | 64 + 52 files changed, 51948 insertions(+), 26 deletions(-) create mode 100644 packages/google-cloud-deploy/.eslintignore create mode 100644 packages/google-cloud-deploy/.eslintrc.json create mode 100644 packages/google-cloud-deploy/.gitattributes create mode 100644 packages/google-cloud-deploy/.github/.OwlBot.yaml create mode 100644 packages/google-cloud-deploy/.gitignore create mode 100644 packages/google-cloud-deploy/.jsdoc.js create mode 100644 packages/google-cloud-deploy/.mocharc.js create mode 100644 packages/google-cloud-deploy/.nycrc create mode 100644 packages/google-cloud-deploy/.prettierignore create mode 100644 packages/google-cloud-deploy/.prettierrc.js create mode 100644 packages/google-cloud-deploy/.repo-metadata.json create mode 100644 packages/google-cloud-deploy/linkinator.config.json create mode 100644 packages/google-cloud-deploy/package.json create mode 100644 packages/google-cloud-deploy/protos/google/cloud/deploy/v1/cloud_deploy.proto create mode 100644 packages/google-cloud-deploy/protos/protos.d.ts create mode 100644 packages/google-cloud-deploy/protos/protos.js create mode 100644 packages/google-cloud-deploy/protos/protos.json create mode 100644 packages/google-cloud-deploy/samples/README.md create mode 100644 packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.approve_rollout.js create mode 100644 packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js create mode 100644 packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_release.js create mode 100644 packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_rollout.js create mode 100644 packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_target.js create mode 100644 packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js create mode 100644 packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_target.js create mode 100644 packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_config.js create mode 100644 packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_delivery_pipeline.js create mode 100644 packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_release.js create mode 100644 packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_rollout.js create mode 100644 packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_target.js create mode 100644 packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js create mode 100644 packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_releases.js create mode 100644 packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_rollouts.js create mode 100644 packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_targets.js create mode 100644 packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js create mode 100644 packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_target.js create mode 100644 packages/google-cloud-deploy/samples/package.json create mode 100644 packages/google-cloud-deploy/samples/quickstart.js create mode 100644 packages/google-cloud-deploy/samples/test/quickstart.js create mode 100644 packages/google-cloud-deploy/src/index.ts create mode 100644 packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts create mode 100644 packages/google-cloud-deploy/src/v1/cloud_deploy_client_config.json create mode 100644 packages/google-cloud-deploy/src/v1/cloud_deploy_proto_list.json create mode 100644 packages/google-cloud-deploy/src/v1/gapic_metadata.json create mode 100644 packages/google-cloud-deploy/src/v1/index.ts create mode 100644 packages/google-cloud-deploy/system-test/fixtures/sample/src/index.js create mode 100644 packages/google-cloud-deploy/system-test/fixtures/sample/src/index.ts create mode 100644 packages/google-cloud-deploy/system-test/install.ts create mode 100644 packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts create mode 100644 packages/google-cloud-deploy/tsconfig.json create mode 100644 packages/google-cloud-deploy/webpack.config.js diff --git a/packages/google-cloud-deploy/.eslintignore b/packages/google-cloud-deploy/.eslintignore new file mode 100644 index 00000000000..9340ad9b86d --- /dev/null +++ b/packages/google-cloud-deploy/.eslintignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-cloud-deploy/.eslintrc.json b/packages/google-cloud-deploy/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/packages/google-cloud-deploy/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/packages/google-cloud-deploy/.gitattributes b/packages/google-cloud-deploy/.gitattributes new file mode 100644 index 00000000000..33739cb74e4 --- /dev/null +++ b/packages/google-cloud-deploy/.gitattributes @@ -0,0 +1,4 @@ +*.ts text eol=lf +*.js text eol=lf +protos/* linguist-generated +**/api-extractor.json linguist-language=JSON-with-Comments diff --git a/packages/google-cloud-deploy/.github/.OwlBot.yaml b/packages/google-cloud-deploy/.github/.OwlBot.yaml new file mode 100644 index 00000000000..5640bfb8925 --- /dev/null +++ b/packages/google-cloud-deploy/.github/.OwlBot.yaml @@ -0,0 +1,22 @@ +# Copyright 2021 Google LLC +# +# 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. +docker: + image: gcr.io/repo-automation-bots/owlbot-nodejs:latest + +deep-remove-regex: + - /owl-bot-staging + +deep-copy-regex: + - source: /google/cloud/deploy/(.*)/.*-nodejs/(.*) + dest: /owl-bot-staging/$1/$2 diff --git a/packages/google-cloud-deploy/.gitignore b/packages/google-cloud-deploy/.gitignore new file mode 100644 index 00000000000..5d32b23782f --- /dev/null +++ b/packages/google-cloud-deploy/.gitignore @@ -0,0 +1,14 @@ +**/*.log +**/node_modules +.coverage +coverage +.nyc_output +docs/ +out/ +build/ +system-test/secrets.js +system-test/*key.json +*.lock +.DS_Store +package-lock.json +__pycache__ diff --git a/packages/google-cloud-deploy/.jsdoc.js b/packages/google-cloud-deploy/.jsdoc.js new file mode 100644 index 00000000000..c88d0999044 --- /dev/null +++ b/packages/google-cloud-deploy/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +module.exports = { + opts: { + readme: './README.md', + package: './package.json', + template: './node_modules/jsdoc-fresh', + recurse: true, + verbose: true, + destination: './docs/' + }, + plugins: [ + 'plugins/markdown', + 'jsdoc-region-tag' + ], + source: { + excludePattern: '(^|\\/|\\\\)[._]', + include: [ + 'build/src', + 'protos' + ], + includePattern: '\\.js$' + }, + templates: { + copyright: 'Copyright 2021 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/deploy', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/packages/google-cloud-deploy/.mocharc.js b/packages/google-cloud-deploy/.mocharc.js new file mode 100644 index 00000000000..0b600509bed --- /dev/null +++ b/packages/google-cloud-deploy/.mocharc.js @@ -0,0 +1,29 @@ +// Copyright 2020 Google LLC +// +// 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. +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000, + "recursive": true +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} +module.exports = config diff --git a/packages/google-cloud-deploy/.nycrc b/packages/google-cloud-deploy/.nycrc new file mode 100644 index 00000000000..b18d5472b62 --- /dev/null +++ b/packages/google-cloud-deploy/.nycrc @@ -0,0 +1,24 @@ +{ + "report-dir": "./.coverage", + "reporter": ["text", "lcov"], + "exclude": [ + "**/*-test", + "**/.coverage", + "**/apis", + "**/benchmark", + "**/conformance", + "**/docs", + "**/samples", + "**/scripts", + "**/protos", + "**/test", + "**/*.d.ts", + ".jsdoc.js", + "**/.jsdoc.js", + "karma.conf.js", + "webpack-tests.config.js", + "webpack.config.js" + ], + "exclude-after-remap": false, + "all": true +} diff --git a/packages/google-cloud-deploy/.prettierignore b/packages/google-cloud-deploy/.prettierignore new file mode 100644 index 00000000000..9340ad9b86d --- /dev/null +++ b/packages/google-cloud-deploy/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-cloud-deploy/.prettierrc.js b/packages/google-cloud-deploy/.prettierrc.js new file mode 100644 index 00000000000..d1b95106f4c --- /dev/null +++ b/packages/google-cloud-deploy/.prettierrc.js @@ -0,0 +1,17 @@ +// Copyright 2020 Google LLC +// +// 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 +// +// https://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. + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/packages/google-cloud-deploy/.repo-metadata.json b/packages/google-cloud-deploy/.repo-metadata.json new file mode 100644 index 00000000000..5dc0ec58a32 --- /dev/null +++ b/packages/google-cloud-deploy/.repo-metadata.json @@ -0,0 +1,15 @@ +{ + "name": "clouddeploy", + "name_pretty": "Google Cloud Deploy", + "product_documentation": "https://cloud.google.com/deploy/", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/clouddeploy/latest", + "issue_tracker": "https://github.com/googleapis/nodejs-deploy/issues", + "release_level": "beta", + "language": "nodejs", + "repo": "googleapis/nodejs-deploy", + "distribution_name": "@google-cloud/deploy", + "api_id": "clouddeploy.googleapis.com", + "default_version": "v1", + "requires_billing": true +} + diff --git a/packages/google-cloud-deploy/README.md b/packages/google-cloud-deploy/README.md index 1e68aa788a9..c0de367de0e 100644 --- a/packages/google-cloud-deploy/README.md +++ b/packages/google-cloud-deploy/README.md @@ -6,7 +6,7 @@ [![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/deploy.svg)](https://www.npmjs.org/package/@google-cloud/deploy) -[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-deploy/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-deploy) +[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-deploy/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-deploy) @@ -15,7 +15,7 @@ clouddeploy client for Node.js A comprehensive list of changes in each version may be found in -[the CHANGELOG](https://github.com/googleapis/nodejs-deploy/blob/master/CHANGELOG.md). +[the CHANGELOG](https://github.com/googleapis/nodejs-deploy/blob/main/CHANGELOG.md). * [Google Cloud Deploy Node.js Client API Reference][client-docs] * [Google Cloud Deploy Documentation][product-docs] @@ -58,27 +58,58 @@ npm install @google-cloud/deploy ### Using the client library ```javascript -// Imports the Google Cloud client library - -// remove this line after package is released -// eslint-disable-next-line node/no-missing-require -const {CloudDeployClient} = require('@google-cloud/deploy'); - -// TODO(developer): replace with your prefered project ID. -// const projectId = 'my-project' - -// Creates a client -// eslint-disable-next-line no-unused-vars -const client = new {CloudDeployClient}(); - -//TODO(library generator): write the actual function you will be testing -async function doSomething() { - console.log('DPE! Change this code so that it shows how to use the library! See comments below on structure.') - // const [thing] = await client.methodName({ - // }); - // console.info(thing); +/** + * TODO(developer): Uncomment these variables before running the sample. + */ +/** + * Required. The parent, which owns this collection of pipelines. Format must be + * projects/{project_id}/locations/{location_name}. + */ +// const parent = 'abc123' +/** + * The maximum number of pipelines to return. The service may return + * fewer than this value. If unspecified, at most 50 pipelines will + * be returned. The maximum value is 1000; values above 1000 will be set + * to 1000. + */ +// const pageSize = 1234 +/** + * A page token, received from a previous `ListDeliveryPipelines` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other provided parameters match + * the call that provided the page token. + */ +// const pageToken = 'abc123' +/** + * Filter builds to be returned. See https://google.aip.dev/160 for more + * details. + */ +// const filter = 'abc123' +/** + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + */ +// const orderBy = 'abc123' + +// Imports the Deploy library +const {CloudDeployClient} = require('@google-cloud/deploy').v1; + +// Instantiates a client +const deployClient = new CloudDeployClient(); + +async function listDeliveryPipelines() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await deployClient.listDeliveryPipelinesAsync(request); + for await (const response of iterable) { + console.log(response); + } } -doSomething(); + +listDeliveryPipelines(); ``` @@ -86,11 +117,11 @@ doSomething(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-deploy/tree/master/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-deploy/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Quickstart | [source code](https://github.com/googleapis/nodejs-deploy/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-deploy&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/nodejs-deploy/blob/main/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-deploy&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | @@ -138,7 +169,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-deploy/blob/master/CONTRIBUTING.md). +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-deploy/blob/main/CONTRIBUTING.md). Please note that this `README.md`, the `samples/README.md`, and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) @@ -150,7 +181,7 @@ to its templates in Apache Version 2.0 -See [LICENSE](https://github.com/googleapis/nodejs-deploy/blob/master/LICENSE) +See [LICENSE](https://github.com/googleapis/nodejs-deploy/blob/main/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/clouddeploy/latest [product-docs]: https://cloud.google.com/deploy/ diff --git a/packages/google-cloud-deploy/linkinator.config.json b/packages/google-cloud-deploy/linkinator.config.json new file mode 100644 index 00000000000..29a223b6db6 --- /dev/null +++ b/packages/google-cloud-deploy/linkinator.config.json @@ -0,0 +1,10 @@ +{ + "recurse": true, + "skip": [ + "https://codecov.io/gh/googleapis/", + "www.googleapis.com", + "img.shields.io" + ], + "silent": true, + "concurrency": 10 +} diff --git a/packages/google-cloud-deploy/package.json b/packages/google-cloud-deploy/package.json new file mode 100644 index 00000000000..59199627079 --- /dev/null +++ b/packages/google-cloud-deploy/package.json @@ -0,0 +1,66 @@ +{ + "name": "@google-cloud/deploy", + "version": "0.1.0", + "description": "clouddeploy client for Node.js", + "repository": "googleapis/nodejs-deploy", + "license": "Apache-2.0", + "author": "Google LLC", + "main": "build/src/index.js", + "files": [ + "build/src", + "build/protos" + ], + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google clouddeploy", + "clouddeploy", + "clouddeploy service" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test", + "samples-test": "cd samples/ && npm link ../ && npm test", + "prelint": "cd samples; npm link ../; npm i" + }, + "dependencies": { + "google-gax": "^2.12.0" + }, + "devDependencies": { + "@types/mocha": "^8.2.2", + "@types/node": "^14.14.44", + "@types/sinon": "^10.0.0", + "c8": "^7.7.2", + "gts": "^3.1.0", + "jsdoc": "^3.6.6", + "jsdoc-fresh": "^1.0.2", + "jsdoc-region-tag": "^1.0.6", + "linkinator": "^2.13.6", + "mocha": "^8.4.0", + "null-loader": "^4.0.1", + "pack-n-play": "^1.0.0-2", + "sinon": "^10.0.0", + "ts-loader": "^9.1.2", + "typescript": "^4.2.4", + "webpack": "^5.36.2", + "webpack-cli": "^4.7.0" + }, + "engines": { + "node": ">=v10.0.0" + } +} diff --git a/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/cloud_deploy.proto b/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/cloud_deploy.proto new file mode 100644 index 00000000000..54071e0945f --- /dev/null +++ b/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/cloud_deploy.proto @@ -0,0 +1,1390 @@ +// Copyright 2021 Google LLC +// +// 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. + +syntax = "proto3"; + +package google.cloud.deploy.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/type/date.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/deploy/v1;deploy"; +option java_multiple_files = true; +option java_outer_classname = "CloudDeployProto"; +option java_package = "com.google.cloud.deploy.v1"; +option (google.api.resource_definition) = { + type: "cloudbuild.googleapis.com/Build" + pattern: "projects/{project}/locations/{location}/builds/{build}" +}; +option (google.api.resource_definition) = { + type: "container.googleapis.com/Cluster" + pattern: "projects/{project}/locations/{location}/clusters/{cluster}" +}; +option (google.api.resource_definition) = { + type: "clouddeploy.googleapis.com/Operation" + pattern: "projects/{project}/locations/{location}/operations/{operation}" +}; +option (google.api.resource_definition) = { + type: "cloudbuild.googleapis.com/WorkerPool" + pattern: "projects/{project}/locations/{location}/workerPools/{worker_pool}" +}; + +// CloudDeploy service creates and manages Continuous Delivery operations +// on Google Cloud Platform via Skaffold (https://skaffold.dev). +service CloudDeploy { + option (google.api.default_host) = "clouddeploy.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Lists DeliveryPipelines in a given project and location. + rpc ListDeliveryPipelines(ListDeliveryPipelinesRequest) returns (ListDeliveryPipelinesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/deliveryPipelines" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single DeliveryPipeline. + rpc GetDeliveryPipeline(GetDeliveryPipelineRequest) returns (DeliveryPipeline) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new DeliveryPipeline in a given project and location. + rpc CreateDeliveryPipeline(CreateDeliveryPipelineRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/deliveryPipelines" + body: "delivery_pipeline" + }; + option (google.api.method_signature) = "parent,delivery_pipeline,delivery_pipeline_id"; + option (google.longrunning.operation_info) = { + response_type: "DeliveryPipeline" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a single DeliveryPipeline. + rpc UpdateDeliveryPipeline(UpdateDeliveryPipelineRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{delivery_pipeline.name=projects/*/locations/*/deliveryPipelines/*}" + body: "delivery_pipeline" + }; + option (google.api.method_signature) = "delivery_pipeline,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "DeliveryPipeline" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single DeliveryPipeline. + rpc DeleteDeliveryPipeline(DeleteDeliveryPipelineRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/deliveryPipelines/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists Targets in a given project and location. + rpc ListTargets(ListTargetsRequest) returns (ListTargetsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/targets" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single Target. + rpc GetTarget(GetTargetRequest) returns (Target) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/targets/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Target in a given project and location. + rpc CreateTarget(CreateTargetRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/targets" + body: "target" + }; + option (google.api.method_signature) = "parent,target,target_id"; + option (google.longrunning.operation_info) = { + response_type: "Target" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a single Target. + rpc UpdateTarget(UpdateTargetRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{target.name=projects/*/locations/*/targets/*}" + body: "target" + }; + option (google.api.method_signature) = "target,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Target" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single Target. + rpc DeleteTarget(DeleteTargetRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/targets/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists Releases in a given project and location. + rpc ListReleases(ListReleasesRequest) returns (ListReleasesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/releases" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single Release. + rpc GetRelease(GetReleaseRequest) returns (Release) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Release in a given project and location. + rpc CreateRelease(CreateReleaseRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/releases" + body: "release" + }; + option (google.api.method_signature) = "parent,release,release_id"; + option (google.longrunning.operation_info) = { + response_type: "Release" + metadata_type: "OperationMetadata" + }; + } + + // Approves a Rollout. + rpc ApproveRollout(ApproveRolloutRequest) returns (ApproveRolloutResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}:approve" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Lists Rollouts in a given project and location. + rpc ListRollouts(ListRolloutsRequest) returns (ListRolloutsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*/releases/*}/rollouts" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single Rollout. + rpc GetRollout(GetRolloutRequest) returns (Rollout) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Rollout in a given project and location. + rpc CreateRollout(CreateRolloutRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*/releases/*}/rollouts" + body: "rollout" + }; + option (google.api.method_signature) = "parent,rollout,rollout_id"; + option (google.longrunning.operation_info) = { + response_type: "Rollout" + metadata_type: "OperationMetadata" + }; + } + + // Gets the configuration for a location. + rpc GetConfig(GetConfigRequest) returns (Config) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/config}" + }; + option (google.api.method_signature) = "name"; + } +} + +// A `DeliveryPipeline` resource in the Google Cloud Deploy API. +// +// A `DeliveryPipeline` defines a pipeline through which a Skaffold +// configuration can progress. +message DeliveryPipeline { + option (google.api.resource) = { + type: "clouddeploy.googleapis.com/DeliveryPipeline" + pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}" + }; + + // Optional. Name of the `DeliveryPipeline`. Format is projects/{project}/ + // locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}. + string name = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Unique identifier of the `DeliveryPipeline`. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Description of the `DeliveryPipeline`. Max length is 255 characters. + string description = 3; + + // User annotations. These attributes can only be set and used by the + // user, and not by Google Cloud Deploy. See + // https://google.aip.dev/128#annotations for more details such as format and + // size limitations. + map annotations = 4; + + // Labels are attributes that can be set and used by both the + // user and by Google Cloud Deploy. Labels must meet the following + // constraints: Each resource is limited to 64 labels. Keys must conform to + // the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp: + // [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be + // <= 128 bytes in size. + map labels = 5; + + // Output only. Time at which the pipeline was created. + google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Most recent time at which the pipeline was updated. + google.protobuf.Timestamp update_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The ordering configuration of the `DeliveryPipeline`. + oneof pipeline { + // SerialPipeline defines a sequential set of stages for a + // `DeliveryPipeline`. + SerialPipeline serial_pipeline = 8; + } + + // Output only. Information around the state of the Delivery Pipeline. + PipelineCondition condition = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // This checksum is computed by the server based on the value of other + // fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 10; +} + +// SerialPipeline defines a sequential set of stages for a `DeliveryPipeline`. +message SerialPipeline { + // Each stage specifies configuration for a `Target`. The ordering + // of this list defines the promotion flow. + repeated Stage stages = 1; +} + +// Stage specifies a location to which to deploy. +message Stage { + // The target_id to which this stage points. This field refers exclusively to + // the last segment of a target name. For example, this field would just be + // `my-target` (rather than + // `projects/project/deliveryPipelines/pipeline/targets/my-target`). The + // parent `DeliveryPipeline` of the `Target` is inferred to be the parent + // `DeliveryPipeline` of the `Release` in which this `Stage` lives. + string target_id = 1; + + // Skaffold profiles to use when rendering the manifest for this stage's + // `Target`. + repeated string profiles = 2; +} + +// PipelineReadyCondition contains information around the status of the +// Pipeline. +message PipelineReadyCondition { + // True if the Pipeline is in a valid state. Otherwise at least one condition + // in `PipelineCondition` is in an invalid state. Iterate over those + // conditions and see which condition(s) has status = false to find out what + // is wrong with the Pipeline. + bool status = 3; + + // Last time the condition was updated. + google.protobuf.Timestamp update_time = 4; +} + +// TargetsPresentCondition contains information on any Targets defined in +// the Delivery Pipeline that do not actually exist. +message TargetsPresentCondition { + // True if there aren't any missing Targets. + bool status = 1; + + // The list of Target names that are missing. For example, + // projects/{project_id}/locations/{location_name}/targets/{target_name}. + repeated string missing_targets = 2 [(google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Target" + }]; + + // Last time the condition was updated. + google.protobuf.Timestamp update_time = 4; +} + +// PipelineCondition contains all conditions relevant to a Delivery Pipeline. +message PipelineCondition { + // Details around the Pipeline's overall status. + PipelineReadyCondition pipeline_ready_condition = 1; + + // Detalis around targets enumerated in the pipeline. + TargetsPresentCondition targets_present_condition = 3; +} + +// The request object for `ListDeliveryPipelines`. +message ListDeliveryPipelinesRequest { + // Required. The parent, which owns this collection of pipelines. Format must be + // projects/{project_id}/locations/{location_name}. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "clouddeploy.googleapis.com/DeliveryPipeline" + } + ]; + + // The maximum number of pipelines to return. The service may return + // fewer than this value. If unspecified, at most 50 pipelines will + // be returned. The maximum value is 1000; values above 1000 will be set + // to 1000. + int32 page_size = 2; + + // A page token, received from a previous `ListDeliveryPipelines` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other provided parameters match + // the call that provided the page token. + string page_token = 3; + + // Filter builds to be returned. See https://google.aip.dev/160 for more + // details. + string filter = 4; + + // Field to sort by. See https://google.aip.dev/132#ordering for more details. + string order_by = 5; +} + +// The response object from `ListDeliveryPipelines`. +message ListDeliveryPipelinesResponse { + // The `DeliveryPipeline` objects. + repeated DeliveryPipeline delivery_pipelines = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// The request object for `GetDeliveryPipeline` +message GetDeliveryPipelineRequest { + // Required. Name of the `DeliveryPipeline`. Format must be + // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/DeliveryPipeline" + } + ]; +} + +// The request object for `CreateDeliveryPipeline`. +message CreateDeliveryPipelineRequest { + // Required. The parent collection in which the `DeliveryPipeline` should be created. + // Format should be projects/{project_id}/locations/{location_name}. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "clouddeploy.googleapis.com/DeliveryPipeline" + } + ]; + + // Required. ID of the `DeliveryPipeline`. + string delivery_pipeline_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The `DeliveryPipeline` to create. + DeliveryPipeline delivery_pipeline = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, the request is validated and the user is provided with + // an expected result, but no actual change is made. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request object for `UpdateDeliveryPipeline`. +message UpdateDeliveryPipelineRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // `DeliveryPipeline` resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The `DeliveryPipeline` to update. + DeliveryPipeline delivery_pipeline = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, updating a `DeliveryPipeline` that does not exist will + // result in the creation of a new `DeliveryPipeline`. + bool allow_missing = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, the request is validated and the user is provided with + // an expected result, but no actual change is made. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request object for `DeleteDeliveryPipeline`. +message DeleteDeliveryPipelineRequest { + // Required. The name of the `DeliveryPipeline` to delete. Format should be + // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/DeliveryPipeline" + } + ]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, then deleting an already deleted or non-existing + // `DeliveryPipeline` will succeed. + bool allow_missing = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, validate the request and preview the review, but do not actually + // post it. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, all child resources under this pipeline will also be + // deleted. Otherwise, the request will only work if the pipeline has + // no child resources. + bool force = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This checksum is computed by the server based on the value of other + // fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// A `Target` resource in the Google Cloud Deploy API. +// +// A `Target` defines a location to which a Skaffold configuration +// can be deployed. +message Target { + option (google.api.resource) = { + type: "clouddeploy.googleapis.com/Target" + pattern: "projects/{project}/locations/{location}/targets/{target}" + }; + + // Optional. Name of the `Target`. Format is projects/{project}/locations/{location}/ + // deliveryPipelines/{deliveryPipeline}/targets/[a-z][a-z0-9\-]{0,62}. + string name = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Resource id of the `Target`. + string target_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Unique identifier of the `Target`. + string uid = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Description of the `Target`. Max length is 255 characters. + string description = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User annotations. These attributes can only be set and used by the + // user, and not by Google Cloud Deploy. See + // https://google.aip.dev/128#annotations for more details such as format and + // size limitations. + map annotations = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Labels are attributes that can be set and used by both the + // user and by Google Cloud Deploy. Labels must meet the following + // constraints: Each resource is limited to 64 labels. Keys must conform to + // the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp: + // [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be + // <= 128 bytes in size. + map labels = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether or not the `Target` requires approval. + bool require_approval = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Time at which the `Target` was created. + google.protobuf.Timestamp create_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Most recent time at which the `Target` was updated. + google.protobuf.Timestamp update_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Destination to which the Skaffold configuration is applied during a + // rollout. + oneof deployment_target { + // Information specifying a GKE Cluster. + GkeCluster gke = 15; + } + + // Optional. This checksum is computed by the server based on the value of other + // fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Configurations for all execution that relates to this `Target`. + // Each `ExecutionEnvironmentUsage` value may only be used in a single + // configuration; using the same value multiple times is an error. + // When one or more configurations are specified, they must include the + // `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values. + // When no configurations are specified, execution will use the default + // specified in `DefaultPool`. + repeated ExecutionConfig execution_configs = 16; +} + +// Configuration of the environment to use when calling Skaffold. +message ExecutionConfig { + // Possible usages of this configuration. + enum ExecutionEnvironmentUsage { + // Default value. This value is unused. + EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED = 0; + + // Use for rendering. + RENDER = 1; + + // Use for deploying and deployment hooks. + DEPLOY = 2; + } + + // Required. Usages when this configuration should be applied. + repeated ExecutionEnvironmentUsage usages = 1 [(google.api.field_behavior) = REQUIRED]; + + // Details of the environment. + oneof execution_environment { + // Optional. Use default Cloud Build pool. + DefaultPool default_pool = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Use private Cloud Build pool. + PrivatePool private_pool = 3 [(google.api.field_behavior) = OPTIONAL]; + } +} + +// Execution using the default Cloud Build pool. +message DefaultPool { + // Optional. Google service account to use for execution. If unspecified, + // the project execution service account + // (-compute@developer.gserviceaccount.com) will be used. + string service_account = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Cloud Storage location where execution outputs should be stored. This can + // either be a bucket ("gs://my-bucket") or a path within a bucket + // ("gs://my-bucket/my-dir"). + // If unspecified, a default bucket located in the same region will be used. + string artifact_storage = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Execution using a private Cloud Build pool. +message PrivatePool { + // Required. Resource name of the Cloud Build worker pool to use. The format is + // `projects/{project}/locations/{location}/workerPools/{pool}`. + string worker_pool = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/WorkerPool" + } + ]; + + // Optional. Google service account to use for execution. If unspecified, + // the project execution service account + // (-compute@developer.gserviceaccount.com) will be used. + string service_account = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Cloud Storage location where execution outputs should be stored. This can + // either be a bucket ("gs://my-bucket") or a path within a bucket + // ("gs://my-bucket/my-dir"). + // If unspecified, a default bucket located in the same region will be used. + string artifact_storage = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Information specifying a GKE Cluster. +message GkeCluster { + // Information specifying a GKE Cluster. Format is + // `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}. + string cluster = 1 [(google.api.resource_reference) = { + type: "container.googleapis.com/Cluster" + }]; +} + +// The request object for `ListTargets`. +message ListTargetsRequest { + // Required. The parent, which owns this collection of targets. Format must be + // projects/{project_id}/locations/{location_name}. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "clouddeploy.googleapis.com/Target" + } + ]; + + // Optional. The maximum number of `Target` objects to return. The service may return + // fewer than this value. If unspecified, at most 50 `Target` objects will be + // returned. The maximum value is 1000; values above 1000 will be set to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListTargets` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other provided parameters match + // the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter builds to be returned. See https://google.aip.dev/160 for more + // details. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response object from `ListTargets`. +message ListTargetsResponse { + // The `Target` objects. + repeated Target targets = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// The request object for `GetTarget`. +message GetTargetRequest { + // Required. Name of the `Target`. Format must be + // projects/{project_id}/locations/{location_name}/targets/{target_name}. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Target" + } + ]; +} + +// The request object for `CreateTarget`. +message CreateTargetRequest { + // Required. The parent collection in which the `Target` should be created. + // Format should be + // projects/{project_id}/locations/{location_name}. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "clouddeploy.googleapis.com/Target" + } + ]; + + // Required. ID of the `Target`. + string target_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The `Target` to create. + Target target = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, the request is validated and the user is provided with + // an expected result, but no actual change is made. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request object for `UpdateTarget`. +message UpdateTargetRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // Target resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The `Target` to update. + Target target = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, updating a `Target` that does not exist will + // result in the creation of a new `Target`. + bool allow_missing = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, the request is validated and the user is provided with + // an expected result, but no actual change is made. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request object for `DeleteTarget`. +message DeleteTargetRequest { + // Required. The name of the `Target` to delete. Format should be + // projects/{project_id}/locations/{location_name}/targets/{target_name}. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Target" + } + ]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, then deleting an already deleted or non-existing + // DeliveryPipeline will succeed. + bool allow_missing = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, validate the request and preview the review, but do not actually + // post it. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This checksum is computed by the server based on the value of other + // fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// A `Release` resource in the Google Cloud Deploy API. +// +// A `Release` defines a specific Skaffold configuration instance +// that can be deployed. +message Release { + option (google.api.resource) = { + type: "clouddeploy.googleapis.com/Release" + pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}" + }; + + // Details of rendering for a single target. + message TargetRender { + // Valid states of the render operation. + enum TargetRenderState { + // The render operation state is unspecified. + TARGET_RENDER_STATE_UNSPECIFIED = 0; + + // The render operation has completed successfully. + SUCCEEDED = 1; + + // The render operation has failed. + FAILED = 2; + + // The render operation is in progress. + IN_PROGRESS = 3; + } + + // Output only. The resource name of the Cloud Build `Build` object that is used to + // render the manifest for this target. Format is + // `projects/{project}/locations/{location}/builds/{build}`. + string rendering_build = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/Build" + } + ]; + + // Output only. Current state of the render operation for this Target. + TargetRenderState rendering_state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Valid states of the render operation. + enum RenderState { + // The render state is unspecified. + RENDER_STATE_UNSPECIFIED = 0; + + // All rendering operations have completed successfully. + SUCCEEDED = 1; + + // All rendering operations have completed, and one or more have failed. + FAILED = 2; + + // Rendering has started and is not complete. + IN_PROGRESS = 3; + } + + // Optional. Name of the `Release`. Format is projects/{project}/ + // locations/{location}/deliveryPipelines/{deliveryPipeline}/ + // releases/[a-z][a-z0-9\-]{0,62}. + string name = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Unique identifier of the `Release`. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Description of the `Release`. Max length is 255 characters. + string description = 3; + + // User annotations. These attributes can only be set and used by the + // user, and not by Google Cloud Deploy. See + // https://google.aip.dev/128#annotations for more details such as format and + // size limitations. + map annotations = 4; + + // Labels are attributes that can be set and used by both the + // user and by Google Cloud Deploy. Labels must meet the following + // constraints: Each resource is limited to 64 labels. Keys must conform to + // the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp: + // [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be + // <= 128 bytes in size. + map labels = 5; + + // Output only. Time at which the `Release` was created. + google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the render began. + google.protobuf.Timestamp render_start_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the render completed. + google.protobuf.Timestamp render_end_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Cloud Storage URI of tar.gz archive containing Skaffold configuration. + string skaffold_config_uri = 17; + + // Filepath of the Skaffold config inside of the config URI. + string skaffold_config_path = 9; + + // List of artifacts to pass through to Skaffold command. + repeated BuildArtifact build_artifacts = 10; + + // Output only. Snapshot of the parent pipeline taken at release creation time. + DeliveryPipeline delivery_pipeline_snapshot = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Snapshot of the parent pipeline's targets taken at release creation time. + repeated Target target_snapshots = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Current state of the render operation. + RenderState render_state = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // This checksum is computed by the server based on the value of other + // fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 16; + + // The Skaffold version to use when operating on this release, such as + // "1.20.0". Not all versions are valid; Google Cloud Deploy supports a + // specific set of versions. + // + // If unset, the most recent supported Skaffold version will be used. + string skaffold_version = 19; + + // Output only. Map from target ID to the target artifacts created + // during the render operation. + map target_artifacts = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Map from target ID to details of the render operation for that target. + map target_renders = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Description of an a image to use during Skaffold rendering. +message BuildArtifact { + // Image name in Skaffold configuration. + string image = 3; + + // Image tag to use. This will generally be the full path to an image, such + // as "gcr.io/my-project/busybox:1.2.3" or + // "gcr.io/my-project/busybox@sha256:abc123". + string tag = 2; +} + +// The artifacts produced by a target render operation. +message TargetArtifact { + oneof uri { + // Output only. URI of a directory containing the artifacts. This contains + // deployment configuration used by Skaffold during a rollout, and all + // paths are relative to this location. + string artifact_uri = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. File path of the resolved Skaffold configuration relative to the URI. + string skaffold_config_path = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. File path of the rendered manifest relative to the URI. + string manifest_path = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request object for `ListReleases`. +message ListReleasesRequest { + // Required. The `DeliveryPipeline` which owns this collection of `Release` objects. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/DeliveryPipeline" + } + ]; + + // Optional. The maximum number of `Release` objects to return. The service may return + // fewer than this value. If unspecified, at most 50 `Release` objects will be + // returned. The maximum value is 1000; values above 1000 will be set to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListReleases` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other provided parameters match + // the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter builds to be returned. See https://google.aip.dev/160 for more + // details. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response object from `ListReleases`. +message ListReleasesResponse { + // The `Release` objects. + repeated Release releases = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// The request object for `GetRelease`. +message GetReleaseRequest { + // Required. Name of the `Release`. Format must be + // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Release" + } + ]; +} + +// The request object for `CreateRelease`, +message CreateReleaseRequest { + // Required. The parent collection in which the `Release` should be created. + // Format should be + // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/DeliveryPipeline" + } + ]; + + // Required. ID of the `Release`. + string release_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The `Release` to create. + Release release = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, the request is validated and the user is provided with + // an expected result, but no actual change is made. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// A `Rollout` resource in the Google Cloud Deploy API. +// +// A `Rollout` contains information around a specific deployment to a `Target`. +message Rollout { + option (google.api.resource) = { + type: "clouddeploy.googleapis.com/Rollout" + pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}/rollouts/{rollout}" + }; + + // Valid approval states of a `Rollout`. + enum ApprovalState { + // The `Rollout` has an unspecified approval state. + APPROVAL_STATE_UNSPECIFIED = 0; + + // The `Rollout` requires approval. + NEEDS_APPROVAL = 1; + + // The `Rollout` does not require approval. + DOES_NOT_NEED_APPROVAL = 2; + + // The `Rollout` has been approved. + APPROVED = 3; + + // The `Rollout` has been rejected. + REJECTED = 4; + } + + // Valid states of a `Rollout`. + enum State { + // The `Rollout` has an unspecified state. + STATE_UNSPECIFIED = 0; + + // The `Rollout` has completed successfully. + SUCCEEDED = 1; + + // The `Rollout` has failed. + FAILED = 2; + + // The `Rollout` is being deployed. + IN_PROGRESS = 3; + + // The `Rollout` needs approval. + PENDING_APPROVAL = 4; + + // An approver rejected the `Rollout`. + APPROVAL_REJECTED = 5; + + // The `Rollout` is waiting for an earlier Rollout(s) to complete on this + // `Target`. + PENDING = 6; + + // The `Rollout` is waiting for the `Release` to be fully rendered. + PENDING_RELEASE = 7; + } + + // Optional. Name of the `Rollout`. Format is projects/{project}/ + // locations/{location}/deliveryPipelines/{deliveryPipeline}/ + // releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}. + string name = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Unique identifier of the `Rollout`. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Description of the `Rollout` for user purposes. Max length is 255 + // characters. + string description = 3; + + // User annotations. These attributes can only be set and used by the + // user, and not by Google Cloud Deploy. See + // https://google.aip.dev/128#annotations for more details such as format and + // size limitations. + map annotations = 4; + + // Labels are attributes that can be set and used by both the + // user and by Google Cloud Deploy. Labels must meet the following + // constraints: Each resource is limited to 64 labels. Keys must conform to + // the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp: + // [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be + // <= 128 bytes in size. + map labels = 5; + + // Output only. Time at which the `Rollout` was created. + google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the `Rollout` was approved. + google.protobuf.Timestamp approve_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the `Rollout` was enqueued. + google.protobuf.Timestamp enqueue_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the `Rollout` started deploying. + google.protobuf.Timestamp deploy_start_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the `Rollout` finished deploying. + google.protobuf.Timestamp deploy_end_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The ID of Target to which this `Rollout` is deploying. + string target_id = 18 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Approval state of the `Rollout`. + ApprovalState approval_state = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Current state of the `Rollout`. + State state = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Reason the build failed. Empty if the build succeeded. + string failure_reason = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The resource name of the Cloud Build `Build` object that is used to deploy + // the Rollout. Format is + // `projects/{project}/locations/{location}/builds/{build}`. + string deploying_build = 17 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/Build" + } + ]; + + // This checksum is computed by the server based on the value of other + // fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 16; +} + +// ListRolloutsRequest is the request object used by `ListRollouts`. +message ListRolloutsRequest { + // Required. The `Release` which owns this collection of `Rollout` objects. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Release" + } + ]; + + // Optional. The maximum number of `Rollout` objects to return. The service may return + // fewer than this value. If unspecified, at most 50 `Rollout` objects will be + // returned. The maximum value is 1000; values above 1000 will be set to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListRollouts` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other provided parameters match + // the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter builds to be returned. See https://google.aip.dev/160 for more + // details. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// ListRolloutsResponse is the response object reutrned by `ListRollouts`. +message ListRolloutsResponse { + // The `Rollout` objects. + repeated Rollout rollouts = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// GetRolloutRequest is the request object used by `GetRollout`. +message GetRolloutRequest { + // Required. Name of the `Rollout`. Format must be + // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Rollout" + } + ]; +} + +// CreateRolloutRequest is the request object used by `CreateRollout`. +message CreateRolloutRequest { + // Required. The parent collection in which the `Rollout` should be created. + // Format should be + // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Release" + } + ]; + + // Required. ID of the `Rollout`. + string rollout_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The `Rollout` to create. + Rollout rollout = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, the request is validated and the user is provided with + // an expected result, but no actual change is made. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Represents the metadata of the long-running operation. +message OperationMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the user has requested cancellation + // of the operation. Operations that have successfully been cancelled + // have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + // corresponding to `Code.CANCELLED`. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request object used by `ApproveRollout`. +message ApproveRolloutRequest { + // Required. Name of the Rollout. Format is + // projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ + // releases/{release}/rollouts/{rollout}. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Rollout" + } + ]; + + // Required. True = approve; false = reject + bool approved = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The response object from `ApproveRollout`. +message ApproveRolloutResponse { + +} + +// Service-wide configuration. +message Config { + option (google.api.resource) = { + type: "clouddeploy.googleapis.com/Config" + pattern: "projects/{project}/locations/{location}/config" + }; + + // Name of the configuration. + string name = 1; + + // Output only. All supported versions of Skaffold. + repeated SkaffoldVersion supported_versions = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Default Skaffold version that is assigned when a Release is created without + // specifying a Skaffold version. + string default_skaffold_version = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Details of a supported Skaffold version. +message SkaffoldVersion { + // Release version number. For example, "1.20.3". + string version = 1; + + // Date when this version is expected to no longer be supported. + google.type.Date support_end_date = 2; +} + +// Request to get a configuration. +message GetConfigRequest { + // Required. Name of requested configuration. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Config" + } + ]; +} diff --git a/packages/google-cloud-deploy/protos/protos.d.ts b/packages/google-cloud-deploy/protos/protos.d.ts new file mode 100644 index 00000000000..fef7eef3c44 --- /dev/null +++ b/packages/google-cloud-deploy/protos/protos.d.ts @@ -0,0 +1,10388 @@ +// Copyright 2021 Google LLC +// +// 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. + +import * as Long from "long"; +import {protobuf as $protobuf} from "google-gax"; +/** Namespace google. */ +export namespace google { + + /** Namespace cloud. */ + namespace cloud { + + /** Namespace deploy. */ + namespace deploy { + + /** Namespace v1. */ + namespace v1 { + + /** Represents a CloudDeploy */ + class CloudDeploy extends $protobuf.rpc.Service { + + /** + * Constructs a new CloudDeploy service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new CloudDeploy service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): CloudDeploy; + + /** + * Calls ListDeliveryPipelines. + * @param request ListDeliveryPipelinesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDeliveryPipelinesResponse + */ + public listDeliveryPipelines(request: google.cloud.deploy.v1.IListDeliveryPipelinesRequest, callback: google.cloud.deploy.v1.CloudDeploy.ListDeliveryPipelinesCallback): void; + + /** + * Calls ListDeliveryPipelines. + * @param request ListDeliveryPipelinesRequest message or plain object + * @returns Promise + */ + public listDeliveryPipelines(request: google.cloud.deploy.v1.IListDeliveryPipelinesRequest): Promise; + + /** + * Calls GetDeliveryPipeline. + * @param request GetDeliveryPipelineRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DeliveryPipeline + */ + public getDeliveryPipeline(request: google.cloud.deploy.v1.IGetDeliveryPipelineRequest, callback: google.cloud.deploy.v1.CloudDeploy.GetDeliveryPipelineCallback): void; + + /** + * Calls GetDeliveryPipeline. + * @param request GetDeliveryPipelineRequest message or plain object + * @returns Promise + */ + public getDeliveryPipeline(request: google.cloud.deploy.v1.IGetDeliveryPipelineRequest): Promise; + + /** + * Calls CreateDeliveryPipeline. + * @param request CreateDeliveryPipelineRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createDeliveryPipeline(request: google.cloud.deploy.v1.ICreateDeliveryPipelineRequest, callback: google.cloud.deploy.v1.CloudDeploy.CreateDeliveryPipelineCallback): void; + + /** + * Calls CreateDeliveryPipeline. + * @param request CreateDeliveryPipelineRequest message or plain object + * @returns Promise + */ + public createDeliveryPipeline(request: google.cloud.deploy.v1.ICreateDeliveryPipelineRequest): Promise; + + /** + * Calls UpdateDeliveryPipeline. + * @param request UpdateDeliveryPipelineRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateDeliveryPipeline(request: google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest, callback: google.cloud.deploy.v1.CloudDeploy.UpdateDeliveryPipelineCallback): void; + + /** + * Calls UpdateDeliveryPipeline. + * @param request UpdateDeliveryPipelineRequest message or plain object + * @returns Promise + */ + public updateDeliveryPipeline(request: google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest): Promise; + + /** + * Calls DeleteDeliveryPipeline. + * @param request DeleteDeliveryPipelineRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteDeliveryPipeline(request: google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest, callback: google.cloud.deploy.v1.CloudDeploy.DeleteDeliveryPipelineCallback): void; + + /** + * Calls DeleteDeliveryPipeline. + * @param request DeleteDeliveryPipelineRequest message or plain object + * @returns Promise + */ + public deleteDeliveryPipeline(request: google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest): Promise; + + /** + * Calls ListTargets. + * @param request ListTargetsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListTargetsResponse + */ + public listTargets(request: google.cloud.deploy.v1.IListTargetsRequest, callback: google.cloud.deploy.v1.CloudDeploy.ListTargetsCallback): void; + + /** + * Calls ListTargets. + * @param request ListTargetsRequest message or plain object + * @returns Promise + */ + public listTargets(request: google.cloud.deploy.v1.IListTargetsRequest): Promise; + + /** + * Calls GetTarget. + * @param request GetTargetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Target + */ + public getTarget(request: google.cloud.deploy.v1.IGetTargetRequest, callback: google.cloud.deploy.v1.CloudDeploy.GetTargetCallback): void; + + /** + * Calls GetTarget. + * @param request GetTargetRequest message or plain object + * @returns Promise + */ + public getTarget(request: google.cloud.deploy.v1.IGetTargetRequest): Promise; + + /** + * Calls CreateTarget. + * @param request CreateTargetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createTarget(request: google.cloud.deploy.v1.ICreateTargetRequest, callback: google.cloud.deploy.v1.CloudDeploy.CreateTargetCallback): void; + + /** + * Calls CreateTarget. + * @param request CreateTargetRequest message or plain object + * @returns Promise + */ + public createTarget(request: google.cloud.deploy.v1.ICreateTargetRequest): Promise; + + /** + * Calls UpdateTarget. + * @param request UpdateTargetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateTarget(request: google.cloud.deploy.v1.IUpdateTargetRequest, callback: google.cloud.deploy.v1.CloudDeploy.UpdateTargetCallback): void; + + /** + * Calls UpdateTarget. + * @param request UpdateTargetRequest message or plain object + * @returns Promise + */ + public updateTarget(request: google.cloud.deploy.v1.IUpdateTargetRequest): Promise; + + /** + * Calls DeleteTarget. + * @param request DeleteTargetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteTarget(request: google.cloud.deploy.v1.IDeleteTargetRequest, callback: google.cloud.deploy.v1.CloudDeploy.DeleteTargetCallback): void; + + /** + * Calls DeleteTarget. + * @param request DeleteTargetRequest message or plain object + * @returns Promise + */ + public deleteTarget(request: google.cloud.deploy.v1.IDeleteTargetRequest): Promise; + + /** + * Calls ListReleases. + * @param request ListReleasesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListReleasesResponse + */ + public listReleases(request: google.cloud.deploy.v1.IListReleasesRequest, callback: google.cloud.deploy.v1.CloudDeploy.ListReleasesCallback): void; + + /** + * Calls ListReleases. + * @param request ListReleasesRequest message or plain object + * @returns Promise + */ + public listReleases(request: google.cloud.deploy.v1.IListReleasesRequest): Promise; + + /** + * Calls GetRelease. + * @param request GetReleaseRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Release + */ + public getRelease(request: google.cloud.deploy.v1.IGetReleaseRequest, callback: google.cloud.deploy.v1.CloudDeploy.GetReleaseCallback): void; + + /** + * Calls GetRelease. + * @param request GetReleaseRequest message or plain object + * @returns Promise + */ + public getRelease(request: google.cloud.deploy.v1.IGetReleaseRequest): Promise; + + /** + * Calls CreateRelease. + * @param request CreateReleaseRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createRelease(request: google.cloud.deploy.v1.ICreateReleaseRequest, callback: google.cloud.deploy.v1.CloudDeploy.CreateReleaseCallback): void; + + /** + * Calls CreateRelease. + * @param request CreateReleaseRequest message or plain object + * @returns Promise + */ + public createRelease(request: google.cloud.deploy.v1.ICreateReleaseRequest): Promise; + + /** + * Calls ApproveRollout. + * @param request ApproveRolloutRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ApproveRolloutResponse + */ + public approveRollout(request: google.cloud.deploy.v1.IApproveRolloutRequest, callback: google.cloud.deploy.v1.CloudDeploy.ApproveRolloutCallback): void; + + /** + * Calls ApproveRollout. + * @param request ApproveRolloutRequest message or plain object + * @returns Promise + */ + public approveRollout(request: google.cloud.deploy.v1.IApproveRolloutRequest): Promise; + + /** + * Calls ListRollouts. + * @param request ListRolloutsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListRolloutsResponse + */ + public listRollouts(request: google.cloud.deploy.v1.IListRolloutsRequest, callback: google.cloud.deploy.v1.CloudDeploy.ListRolloutsCallback): void; + + /** + * Calls ListRollouts. + * @param request ListRolloutsRequest message or plain object + * @returns Promise + */ + public listRollouts(request: google.cloud.deploy.v1.IListRolloutsRequest): Promise; + + /** + * Calls GetRollout. + * @param request GetRolloutRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Rollout + */ + public getRollout(request: google.cloud.deploy.v1.IGetRolloutRequest, callback: google.cloud.deploy.v1.CloudDeploy.GetRolloutCallback): void; + + /** + * Calls GetRollout. + * @param request GetRolloutRequest message or plain object + * @returns Promise + */ + public getRollout(request: google.cloud.deploy.v1.IGetRolloutRequest): Promise; + + /** + * Calls CreateRollout. + * @param request CreateRolloutRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createRollout(request: google.cloud.deploy.v1.ICreateRolloutRequest, callback: google.cloud.deploy.v1.CloudDeploy.CreateRolloutCallback): void; + + /** + * Calls CreateRollout. + * @param request CreateRolloutRequest message or plain object + * @returns Promise + */ + public createRollout(request: google.cloud.deploy.v1.ICreateRolloutRequest): Promise; + + /** + * Calls GetConfig. + * @param request GetConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Config + */ + public getConfig(request: google.cloud.deploy.v1.IGetConfigRequest, callback: google.cloud.deploy.v1.CloudDeploy.GetConfigCallback): void; + + /** + * Calls GetConfig. + * @param request GetConfigRequest message or plain object + * @returns Promise + */ + public getConfig(request: google.cloud.deploy.v1.IGetConfigRequest): Promise; + } + + namespace CloudDeploy { + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#listDeliveryPipelines}. + * @param error Error, if any + * @param [response] ListDeliveryPipelinesResponse + */ + type ListDeliveryPipelinesCallback = (error: (Error|null), response?: google.cloud.deploy.v1.ListDeliveryPipelinesResponse) => void; + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#getDeliveryPipeline}. + * @param error Error, if any + * @param [response] DeliveryPipeline + */ + type GetDeliveryPipelineCallback = (error: (Error|null), response?: google.cloud.deploy.v1.DeliveryPipeline) => void; + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#createDeliveryPipeline}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateDeliveryPipelineCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#updateDeliveryPipeline}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateDeliveryPipelineCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#deleteDeliveryPipeline}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteDeliveryPipelineCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#listTargets}. + * @param error Error, if any + * @param [response] ListTargetsResponse + */ + type ListTargetsCallback = (error: (Error|null), response?: google.cloud.deploy.v1.ListTargetsResponse) => void; + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#getTarget}. + * @param error Error, if any + * @param [response] Target + */ + type GetTargetCallback = (error: (Error|null), response?: google.cloud.deploy.v1.Target) => void; + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#createTarget}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateTargetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#updateTarget}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateTargetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#deleteTarget}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteTargetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#listReleases}. + * @param error Error, if any + * @param [response] ListReleasesResponse + */ + type ListReleasesCallback = (error: (Error|null), response?: google.cloud.deploy.v1.ListReleasesResponse) => void; + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#getRelease}. + * @param error Error, if any + * @param [response] Release + */ + type GetReleaseCallback = (error: (Error|null), response?: google.cloud.deploy.v1.Release) => void; + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#createRelease}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateReleaseCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#approveRollout}. + * @param error Error, if any + * @param [response] ApproveRolloutResponse + */ + type ApproveRolloutCallback = (error: (Error|null), response?: google.cloud.deploy.v1.ApproveRolloutResponse) => void; + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#listRollouts}. + * @param error Error, if any + * @param [response] ListRolloutsResponse + */ + type ListRolloutsCallback = (error: (Error|null), response?: google.cloud.deploy.v1.ListRolloutsResponse) => void; + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#getRollout}. + * @param error Error, if any + * @param [response] Rollout + */ + type GetRolloutCallback = (error: (Error|null), response?: google.cloud.deploy.v1.Rollout) => void; + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#createRollout}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateRolloutCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#getConfig}. + * @param error Error, if any + * @param [response] Config + */ + type GetConfigCallback = (error: (Error|null), response?: google.cloud.deploy.v1.Config) => void; + } + + /** Properties of a DeliveryPipeline. */ + interface IDeliveryPipeline { + + /** DeliveryPipeline name */ + name?: (string|null); + + /** DeliveryPipeline uid */ + uid?: (string|null); + + /** DeliveryPipeline description */ + description?: (string|null); + + /** DeliveryPipeline annotations */ + annotations?: ({ [k: string]: string }|null); + + /** DeliveryPipeline labels */ + labels?: ({ [k: string]: string }|null); + + /** DeliveryPipeline createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** DeliveryPipeline updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** DeliveryPipeline serialPipeline */ + serialPipeline?: (google.cloud.deploy.v1.ISerialPipeline|null); + + /** DeliveryPipeline condition */ + condition?: (google.cloud.deploy.v1.IPipelineCondition|null); + + /** DeliveryPipeline etag */ + etag?: (string|null); + } + + /** Represents a DeliveryPipeline. */ + class DeliveryPipeline implements IDeliveryPipeline { + + /** + * Constructs a new DeliveryPipeline. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IDeliveryPipeline); + + /** DeliveryPipeline name. */ + public name: string; + + /** DeliveryPipeline uid. */ + public uid: string; + + /** DeliveryPipeline description. */ + public description: string; + + /** DeliveryPipeline annotations. */ + public annotations: { [k: string]: string }; + + /** DeliveryPipeline labels. */ + public labels: { [k: string]: string }; + + /** DeliveryPipeline createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** DeliveryPipeline updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** DeliveryPipeline serialPipeline. */ + public serialPipeline?: (google.cloud.deploy.v1.ISerialPipeline|null); + + /** DeliveryPipeline condition. */ + public condition?: (google.cloud.deploy.v1.IPipelineCondition|null); + + /** DeliveryPipeline etag. */ + public etag: string; + + /** DeliveryPipeline pipeline. */ + public pipeline?: "serialPipeline"; + + /** + * Creates a new DeliveryPipeline instance using the specified properties. + * @param [properties] Properties to set + * @returns DeliveryPipeline instance + */ + public static create(properties?: google.cloud.deploy.v1.IDeliveryPipeline): google.cloud.deploy.v1.DeliveryPipeline; + + /** + * Encodes the specified DeliveryPipeline message. Does not implicitly {@link google.cloud.deploy.v1.DeliveryPipeline.verify|verify} messages. + * @param message DeliveryPipeline message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IDeliveryPipeline, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeliveryPipeline message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeliveryPipeline.verify|verify} messages. + * @param message DeliveryPipeline message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IDeliveryPipeline, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeliveryPipeline message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeliveryPipeline + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.DeliveryPipeline; + + /** + * Decodes a DeliveryPipeline message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeliveryPipeline + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.DeliveryPipeline; + + /** + * Verifies a DeliveryPipeline message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeliveryPipeline message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeliveryPipeline + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.DeliveryPipeline; + + /** + * Creates a plain object from a DeliveryPipeline message. Also converts values to other types if specified. + * @param message DeliveryPipeline + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.DeliveryPipeline, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeliveryPipeline to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SerialPipeline. */ + interface ISerialPipeline { + + /** SerialPipeline stages */ + stages?: (google.cloud.deploy.v1.IStage[]|null); + } + + /** Represents a SerialPipeline. */ + class SerialPipeline implements ISerialPipeline { + + /** + * Constructs a new SerialPipeline. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.ISerialPipeline); + + /** SerialPipeline stages. */ + public stages: google.cloud.deploy.v1.IStage[]; + + /** + * Creates a new SerialPipeline instance using the specified properties. + * @param [properties] Properties to set + * @returns SerialPipeline instance + */ + public static create(properties?: google.cloud.deploy.v1.ISerialPipeline): google.cloud.deploy.v1.SerialPipeline; + + /** + * Encodes the specified SerialPipeline message. Does not implicitly {@link google.cloud.deploy.v1.SerialPipeline.verify|verify} messages. + * @param message SerialPipeline message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.ISerialPipeline, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SerialPipeline message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.SerialPipeline.verify|verify} messages. + * @param message SerialPipeline message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.ISerialPipeline, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SerialPipeline message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SerialPipeline + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.SerialPipeline; + + /** + * Decodes a SerialPipeline message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SerialPipeline + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.SerialPipeline; + + /** + * Verifies a SerialPipeline message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SerialPipeline message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SerialPipeline + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.SerialPipeline; + + /** + * Creates a plain object from a SerialPipeline message. Also converts values to other types if specified. + * @param message SerialPipeline + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.SerialPipeline, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SerialPipeline to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Stage. */ + interface IStage { + + /** Stage targetId */ + targetId?: (string|null); + + /** Stage profiles */ + profiles?: (string[]|null); + } + + /** Represents a Stage. */ + class Stage implements IStage { + + /** + * Constructs a new Stage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IStage); + + /** Stage targetId. */ + public targetId: string; + + /** Stage profiles. */ + public profiles: string[]; + + /** + * Creates a new Stage instance using the specified properties. + * @param [properties] Properties to set + * @returns Stage instance + */ + public static create(properties?: google.cloud.deploy.v1.IStage): google.cloud.deploy.v1.Stage; + + /** + * Encodes the specified Stage message. Does not implicitly {@link google.cloud.deploy.v1.Stage.verify|verify} messages. + * @param message Stage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IStage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Stage message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Stage.verify|verify} messages. + * @param message Stage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IStage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Stage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Stage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.Stage; + + /** + * Decodes a Stage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Stage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.Stage; + + /** + * Verifies a Stage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Stage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Stage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.Stage; + + /** + * Creates a plain object from a Stage message. Also converts values to other types if specified. + * @param message Stage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.Stage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Stage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PipelineReadyCondition. */ + interface IPipelineReadyCondition { + + /** PipelineReadyCondition status */ + status?: (boolean|null); + + /** PipelineReadyCondition updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a PipelineReadyCondition. */ + class PipelineReadyCondition implements IPipelineReadyCondition { + + /** + * Constructs a new PipelineReadyCondition. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IPipelineReadyCondition); + + /** PipelineReadyCondition status. */ + public status: boolean; + + /** PipelineReadyCondition updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new PipelineReadyCondition instance using the specified properties. + * @param [properties] Properties to set + * @returns PipelineReadyCondition instance + */ + public static create(properties?: google.cloud.deploy.v1.IPipelineReadyCondition): google.cloud.deploy.v1.PipelineReadyCondition; + + /** + * Encodes the specified PipelineReadyCondition message. Does not implicitly {@link google.cloud.deploy.v1.PipelineReadyCondition.verify|verify} messages. + * @param message PipelineReadyCondition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IPipelineReadyCondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PipelineReadyCondition message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.PipelineReadyCondition.verify|verify} messages. + * @param message PipelineReadyCondition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IPipelineReadyCondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PipelineReadyCondition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PipelineReadyCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.PipelineReadyCondition; + + /** + * Decodes a PipelineReadyCondition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PipelineReadyCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.PipelineReadyCondition; + + /** + * Verifies a PipelineReadyCondition message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PipelineReadyCondition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PipelineReadyCondition + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.PipelineReadyCondition; + + /** + * Creates a plain object from a PipelineReadyCondition message. Also converts values to other types if specified. + * @param message PipelineReadyCondition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.PipelineReadyCondition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PipelineReadyCondition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a TargetsPresentCondition. */ + interface ITargetsPresentCondition { + + /** TargetsPresentCondition status */ + status?: (boolean|null); + + /** TargetsPresentCondition missingTargets */ + missingTargets?: (string[]|null); + + /** TargetsPresentCondition updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a TargetsPresentCondition. */ + class TargetsPresentCondition implements ITargetsPresentCondition { + + /** + * Constructs a new TargetsPresentCondition. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.ITargetsPresentCondition); + + /** TargetsPresentCondition status. */ + public status: boolean; + + /** TargetsPresentCondition missingTargets. */ + public missingTargets: string[]; + + /** TargetsPresentCondition updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new TargetsPresentCondition instance using the specified properties. + * @param [properties] Properties to set + * @returns TargetsPresentCondition instance + */ + public static create(properties?: google.cloud.deploy.v1.ITargetsPresentCondition): google.cloud.deploy.v1.TargetsPresentCondition; + + /** + * Encodes the specified TargetsPresentCondition message. Does not implicitly {@link google.cloud.deploy.v1.TargetsPresentCondition.verify|verify} messages. + * @param message TargetsPresentCondition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.ITargetsPresentCondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TargetsPresentCondition message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.TargetsPresentCondition.verify|verify} messages. + * @param message TargetsPresentCondition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.ITargetsPresentCondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TargetsPresentCondition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TargetsPresentCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.TargetsPresentCondition; + + /** + * Decodes a TargetsPresentCondition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TargetsPresentCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.TargetsPresentCondition; + + /** + * Verifies a TargetsPresentCondition message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TargetsPresentCondition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TargetsPresentCondition + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.TargetsPresentCondition; + + /** + * Creates a plain object from a TargetsPresentCondition message. Also converts values to other types if specified. + * @param message TargetsPresentCondition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.TargetsPresentCondition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TargetsPresentCondition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PipelineCondition. */ + interface IPipelineCondition { + + /** PipelineCondition pipelineReadyCondition */ + pipelineReadyCondition?: (google.cloud.deploy.v1.IPipelineReadyCondition|null); + + /** PipelineCondition targetsPresentCondition */ + targetsPresentCondition?: (google.cloud.deploy.v1.ITargetsPresentCondition|null); + } + + /** Represents a PipelineCondition. */ + class PipelineCondition implements IPipelineCondition { + + /** + * Constructs a new PipelineCondition. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IPipelineCondition); + + /** PipelineCondition pipelineReadyCondition. */ + public pipelineReadyCondition?: (google.cloud.deploy.v1.IPipelineReadyCondition|null); + + /** PipelineCondition targetsPresentCondition. */ + public targetsPresentCondition?: (google.cloud.deploy.v1.ITargetsPresentCondition|null); + + /** + * Creates a new PipelineCondition instance using the specified properties. + * @param [properties] Properties to set + * @returns PipelineCondition instance + */ + public static create(properties?: google.cloud.deploy.v1.IPipelineCondition): google.cloud.deploy.v1.PipelineCondition; + + /** + * Encodes the specified PipelineCondition message. Does not implicitly {@link google.cloud.deploy.v1.PipelineCondition.verify|verify} messages. + * @param message PipelineCondition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IPipelineCondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PipelineCondition message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.PipelineCondition.verify|verify} messages. + * @param message PipelineCondition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IPipelineCondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PipelineCondition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PipelineCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.PipelineCondition; + + /** + * Decodes a PipelineCondition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PipelineCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.PipelineCondition; + + /** + * Verifies a PipelineCondition message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PipelineCondition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PipelineCondition + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.PipelineCondition; + + /** + * Creates a plain object from a PipelineCondition message. Also converts values to other types if specified. + * @param message PipelineCondition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.PipelineCondition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PipelineCondition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListDeliveryPipelinesRequest. */ + interface IListDeliveryPipelinesRequest { + + /** ListDeliveryPipelinesRequest parent */ + parent?: (string|null); + + /** ListDeliveryPipelinesRequest pageSize */ + pageSize?: (number|null); + + /** ListDeliveryPipelinesRequest pageToken */ + pageToken?: (string|null); + + /** ListDeliveryPipelinesRequest filter */ + filter?: (string|null); + + /** ListDeliveryPipelinesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListDeliveryPipelinesRequest. */ + class ListDeliveryPipelinesRequest implements IListDeliveryPipelinesRequest { + + /** + * Constructs a new ListDeliveryPipelinesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IListDeliveryPipelinesRequest); + + /** ListDeliveryPipelinesRequest parent. */ + public parent: string; + + /** ListDeliveryPipelinesRequest pageSize. */ + public pageSize: number; + + /** ListDeliveryPipelinesRequest pageToken. */ + public pageToken: string; + + /** ListDeliveryPipelinesRequest filter. */ + public filter: string; + + /** ListDeliveryPipelinesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListDeliveryPipelinesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDeliveryPipelinesRequest instance + */ + public static create(properties?: google.cloud.deploy.v1.IListDeliveryPipelinesRequest): google.cloud.deploy.v1.ListDeliveryPipelinesRequest; + + /** + * Encodes the specified ListDeliveryPipelinesRequest message. Does not implicitly {@link google.cloud.deploy.v1.ListDeliveryPipelinesRequest.verify|verify} messages. + * @param message ListDeliveryPipelinesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IListDeliveryPipelinesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDeliveryPipelinesRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListDeliveryPipelinesRequest.verify|verify} messages. + * @param message ListDeliveryPipelinesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IListDeliveryPipelinesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDeliveryPipelinesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDeliveryPipelinesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.ListDeliveryPipelinesRequest; + + /** + * Decodes a ListDeliveryPipelinesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDeliveryPipelinesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.ListDeliveryPipelinesRequest; + + /** + * Verifies a ListDeliveryPipelinesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDeliveryPipelinesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDeliveryPipelinesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.ListDeliveryPipelinesRequest; + + /** + * Creates a plain object from a ListDeliveryPipelinesRequest message. Also converts values to other types if specified. + * @param message ListDeliveryPipelinesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.ListDeliveryPipelinesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDeliveryPipelinesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListDeliveryPipelinesResponse. */ + interface IListDeliveryPipelinesResponse { + + /** ListDeliveryPipelinesResponse deliveryPipelines */ + deliveryPipelines?: (google.cloud.deploy.v1.IDeliveryPipeline[]|null); + + /** ListDeliveryPipelinesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListDeliveryPipelinesResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListDeliveryPipelinesResponse. */ + class ListDeliveryPipelinesResponse implements IListDeliveryPipelinesResponse { + + /** + * Constructs a new ListDeliveryPipelinesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IListDeliveryPipelinesResponse); + + /** ListDeliveryPipelinesResponse deliveryPipelines. */ + public deliveryPipelines: google.cloud.deploy.v1.IDeliveryPipeline[]; + + /** ListDeliveryPipelinesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListDeliveryPipelinesResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListDeliveryPipelinesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDeliveryPipelinesResponse instance + */ + public static create(properties?: google.cloud.deploy.v1.IListDeliveryPipelinesResponse): google.cloud.deploy.v1.ListDeliveryPipelinesResponse; + + /** + * Encodes the specified ListDeliveryPipelinesResponse message. Does not implicitly {@link google.cloud.deploy.v1.ListDeliveryPipelinesResponse.verify|verify} messages. + * @param message ListDeliveryPipelinesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IListDeliveryPipelinesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDeliveryPipelinesResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListDeliveryPipelinesResponse.verify|verify} messages. + * @param message ListDeliveryPipelinesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IListDeliveryPipelinesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDeliveryPipelinesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDeliveryPipelinesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.ListDeliveryPipelinesResponse; + + /** + * Decodes a ListDeliveryPipelinesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDeliveryPipelinesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.ListDeliveryPipelinesResponse; + + /** + * Verifies a ListDeliveryPipelinesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDeliveryPipelinesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDeliveryPipelinesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.ListDeliveryPipelinesResponse; + + /** + * Creates a plain object from a ListDeliveryPipelinesResponse message. Also converts values to other types if specified. + * @param message ListDeliveryPipelinesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.ListDeliveryPipelinesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDeliveryPipelinesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetDeliveryPipelineRequest. */ + interface IGetDeliveryPipelineRequest { + + /** GetDeliveryPipelineRequest name */ + name?: (string|null); + } + + /** Represents a GetDeliveryPipelineRequest. */ + class GetDeliveryPipelineRequest implements IGetDeliveryPipelineRequest { + + /** + * Constructs a new GetDeliveryPipelineRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IGetDeliveryPipelineRequest); + + /** GetDeliveryPipelineRequest name. */ + public name: string; + + /** + * Creates a new GetDeliveryPipelineRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDeliveryPipelineRequest instance + */ + public static create(properties?: google.cloud.deploy.v1.IGetDeliveryPipelineRequest): google.cloud.deploy.v1.GetDeliveryPipelineRequest; + + /** + * Encodes the specified GetDeliveryPipelineRequest message. Does not implicitly {@link google.cloud.deploy.v1.GetDeliveryPipelineRequest.verify|verify} messages. + * @param message GetDeliveryPipelineRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IGetDeliveryPipelineRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetDeliveryPipelineRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GetDeliveryPipelineRequest.verify|verify} messages. + * @param message GetDeliveryPipelineRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IGetDeliveryPipelineRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDeliveryPipelineRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDeliveryPipelineRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.GetDeliveryPipelineRequest; + + /** + * Decodes a GetDeliveryPipelineRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDeliveryPipelineRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.GetDeliveryPipelineRequest; + + /** + * Verifies a GetDeliveryPipelineRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetDeliveryPipelineRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDeliveryPipelineRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.GetDeliveryPipelineRequest; + + /** + * Creates a plain object from a GetDeliveryPipelineRequest message. Also converts values to other types if specified. + * @param message GetDeliveryPipelineRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.GetDeliveryPipelineRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetDeliveryPipelineRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateDeliveryPipelineRequest. */ + interface ICreateDeliveryPipelineRequest { + + /** CreateDeliveryPipelineRequest parent */ + parent?: (string|null); + + /** CreateDeliveryPipelineRequest deliveryPipelineId */ + deliveryPipelineId?: (string|null); + + /** CreateDeliveryPipelineRequest deliveryPipeline */ + deliveryPipeline?: (google.cloud.deploy.v1.IDeliveryPipeline|null); + + /** CreateDeliveryPipelineRequest requestId */ + requestId?: (string|null); + + /** CreateDeliveryPipelineRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateDeliveryPipelineRequest. */ + class CreateDeliveryPipelineRequest implements ICreateDeliveryPipelineRequest { + + /** + * Constructs a new CreateDeliveryPipelineRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.ICreateDeliveryPipelineRequest); + + /** CreateDeliveryPipelineRequest parent. */ + public parent: string; + + /** CreateDeliveryPipelineRequest deliveryPipelineId. */ + public deliveryPipelineId: string; + + /** CreateDeliveryPipelineRequest deliveryPipeline. */ + public deliveryPipeline?: (google.cloud.deploy.v1.IDeliveryPipeline|null); + + /** CreateDeliveryPipelineRequest requestId. */ + public requestId: string; + + /** CreateDeliveryPipelineRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateDeliveryPipelineRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateDeliveryPipelineRequest instance + */ + public static create(properties?: google.cloud.deploy.v1.ICreateDeliveryPipelineRequest): google.cloud.deploy.v1.CreateDeliveryPipelineRequest; + + /** + * Encodes the specified CreateDeliveryPipelineRequest message. Does not implicitly {@link google.cloud.deploy.v1.CreateDeliveryPipelineRequest.verify|verify} messages. + * @param message CreateDeliveryPipelineRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.ICreateDeliveryPipelineRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateDeliveryPipelineRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CreateDeliveryPipelineRequest.verify|verify} messages. + * @param message CreateDeliveryPipelineRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.ICreateDeliveryPipelineRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateDeliveryPipelineRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateDeliveryPipelineRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.CreateDeliveryPipelineRequest; + + /** + * Decodes a CreateDeliveryPipelineRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateDeliveryPipelineRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.CreateDeliveryPipelineRequest; + + /** + * Verifies a CreateDeliveryPipelineRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateDeliveryPipelineRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateDeliveryPipelineRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.CreateDeliveryPipelineRequest; + + /** + * Creates a plain object from a CreateDeliveryPipelineRequest message. Also converts values to other types if specified. + * @param message CreateDeliveryPipelineRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.CreateDeliveryPipelineRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateDeliveryPipelineRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateDeliveryPipelineRequest. */ + interface IUpdateDeliveryPipelineRequest { + + /** UpdateDeliveryPipelineRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateDeliveryPipelineRequest deliveryPipeline */ + deliveryPipeline?: (google.cloud.deploy.v1.IDeliveryPipeline|null); + + /** UpdateDeliveryPipelineRequest requestId */ + requestId?: (string|null); + + /** UpdateDeliveryPipelineRequest allowMissing */ + allowMissing?: (boolean|null); + + /** UpdateDeliveryPipelineRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents an UpdateDeliveryPipelineRequest. */ + class UpdateDeliveryPipelineRequest implements IUpdateDeliveryPipelineRequest { + + /** + * Constructs a new UpdateDeliveryPipelineRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest); + + /** UpdateDeliveryPipelineRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateDeliveryPipelineRequest deliveryPipeline. */ + public deliveryPipeline?: (google.cloud.deploy.v1.IDeliveryPipeline|null); + + /** UpdateDeliveryPipelineRequest requestId. */ + public requestId: string; + + /** UpdateDeliveryPipelineRequest allowMissing. */ + public allowMissing: boolean; + + /** UpdateDeliveryPipelineRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new UpdateDeliveryPipelineRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateDeliveryPipelineRequest instance + */ + public static create(properties?: google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest): google.cloud.deploy.v1.UpdateDeliveryPipelineRequest; + + /** + * Encodes the specified UpdateDeliveryPipelineRequest message. Does not implicitly {@link google.cloud.deploy.v1.UpdateDeliveryPipelineRequest.verify|verify} messages. + * @param message UpdateDeliveryPipelineRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateDeliveryPipelineRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.UpdateDeliveryPipelineRequest.verify|verify} messages. + * @param message UpdateDeliveryPipelineRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateDeliveryPipelineRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateDeliveryPipelineRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.UpdateDeliveryPipelineRequest; + + /** + * Decodes an UpdateDeliveryPipelineRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateDeliveryPipelineRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.UpdateDeliveryPipelineRequest; + + /** + * Verifies an UpdateDeliveryPipelineRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateDeliveryPipelineRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateDeliveryPipelineRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.UpdateDeliveryPipelineRequest; + + /** + * Creates a plain object from an UpdateDeliveryPipelineRequest message. Also converts values to other types if specified. + * @param message UpdateDeliveryPipelineRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.UpdateDeliveryPipelineRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateDeliveryPipelineRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteDeliveryPipelineRequest. */ + interface IDeleteDeliveryPipelineRequest { + + /** DeleteDeliveryPipelineRequest name */ + name?: (string|null); + + /** DeleteDeliveryPipelineRequest requestId */ + requestId?: (string|null); + + /** DeleteDeliveryPipelineRequest allowMissing */ + allowMissing?: (boolean|null); + + /** DeleteDeliveryPipelineRequest validateOnly */ + validateOnly?: (boolean|null); + + /** DeleteDeliveryPipelineRequest force */ + force?: (boolean|null); + + /** DeleteDeliveryPipelineRequest etag */ + etag?: (string|null); + } + + /** Represents a DeleteDeliveryPipelineRequest. */ + class DeleteDeliveryPipelineRequest implements IDeleteDeliveryPipelineRequest { + + /** + * Constructs a new DeleteDeliveryPipelineRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest); + + /** DeleteDeliveryPipelineRequest name. */ + public name: string; + + /** DeleteDeliveryPipelineRequest requestId. */ + public requestId: string; + + /** DeleteDeliveryPipelineRequest allowMissing. */ + public allowMissing: boolean; + + /** DeleteDeliveryPipelineRequest validateOnly. */ + public validateOnly: boolean; + + /** DeleteDeliveryPipelineRequest force. */ + public force: boolean; + + /** DeleteDeliveryPipelineRequest etag. */ + public etag: string; + + /** + * Creates a new DeleteDeliveryPipelineRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteDeliveryPipelineRequest instance + */ + public static create(properties?: google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest): google.cloud.deploy.v1.DeleteDeliveryPipelineRequest; + + /** + * Encodes the specified DeleteDeliveryPipelineRequest message. Does not implicitly {@link google.cloud.deploy.v1.DeleteDeliveryPipelineRequest.verify|verify} messages. + * @param message DeleteDeliveryPipelineRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteDeliveryPipelineRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeleteDeliveryPipelineRequest.verify|verify} messages. + * @param message DeleteDeliveryPipelineRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteDeliveryPipelineRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteDeliveryPipelineRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.DeleteDeliveryPipelineRequest; + + /** + * Decodes a DeleteDeliveryPipelineRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteDeliveryPipelineRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.DeleteDeliveryPipelineRequest; + + /** + * Verifies a DeleteDeliveryPipelineRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteDeliveryPipelineRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteDeliveryPipelineRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.DeleteDeliveryPipelineRequest; + + /** + * Creates a plain object from a DeleteDeliveryPipelineRequest message. Also converts values to other types if specified. + * @param message DeleteDeliveryPipelineRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.DeleteDeliveryPipelineRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteDeliveryPipelineRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Target. */ + interface ITarget { + + /** Target name */ + name?: (string|null); + + /** Target targetId */ + targetId?: (string|null); + + /** Target uid */ + uid?: (string|null); + + /** Target description */ + description?: (string|null); + + /** Target annotations */ + annotations?: ({ [k: string]: string }|null); + + /** Target labels */ + labels?: ({ [k: string]: string }|null); + + /** Target requireApproval */ + requireApproval?: (boolean|null); + + /** Target createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Target updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Target gke */ + gke?: (google.cloud.deploy.v1.IGkeCluster|null); + + /** Target etag */ + etag?: (string|null); + + /** Target executionConfigs */ + executionConfigs?: (google.cloud.deploy.v1.IExecutionConfig[]|null); + } + + /** Represents a Target. */ + class Target implements ITarget { + + /** + * Constructs a new Target. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.ITarget); + + /** Target name. */ + public name: string; + + /** Target targetId. */ + public targetId: string; + + /** Target uid. */ + public uid: string; + + /** Target description. */ + public description: string; + + /** Target annotations. */ + public annotations: { [k: string]: string }; + + /** Target labels. */ + public labels: { [k: string]: string }; + + /** Target requireApproval. */ + public requireApproval: boolean; + + /** Target createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Target updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Target gke. */ + public gke?: (google.cloud.deploy.v1.IGkeCluster|null); + + /** Target etag. */ + public etag: string; + + /** Target executionConfigs. */ + public executionConfigs: google.cloud.deploy.v1.IExecutionConfig[]; + + /** Target deploymentTarget. */ + public deploymentTarget?: "gke"; + + /** + * Creates a new Target instance using the specified properties. + * @param [properties] Properties to set + * @returns Target instance + */ + public static create(properties?: google.cloud.deploy.v1.ITarget): google.cloud.deploy.v1.Target; + + /** + * Encodes the specified Target message. Does not implicitly {@link google.cloud.deploy.v1.Target.verify|verify} messages. + * @param message Target message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.ITarget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Target message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Target.verify|verify} messages. + * @param message Target message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.ITarget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Target message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Target + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.Target; + + /** + * Decodes a Target message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Target + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.Target; + + /** + * Verifies a Target message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Target message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Target + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.Target; + + /** + * Creates a plain object from a Target message. Also converts values to other types if specified. + * @param message Target + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.Target, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Target to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an ExecutionConfig. */ + interface IExecutionConfig { + + /** ExecutionConfig usages */ + usages?: (google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage[]|null); + + /** ExecutionConfig defaultPool */ + defaultPool?: (google.cloud.deploy.v1.IDefaultPool|null); + + /** ExecutionConfig privatePool */ + privatePool?: (google.cloud.deploy.v1.IPrivatePool|null); + } + + /** Represents an ExecutionConfig. */ + class ExecutionConfig implements IExecutionConfig { + + /** + * Constructs a new ExecutionConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IExecutionConfig); + + /** ExecutionConfig usages. */ + public usages: google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage[]; + + /** ExecutionConfig defaultPool. */ + public defaultPool?: (google.cloud.deploy.v1.IDefaultPool|null); + + /** ExecutionConfig privatePool. */ + public privatePool?: (google.cloud.deploy.v1.IPrivatePool|null); + + /** ExecutionConfig executionEnvironment. */ + public executionEnvironment?: ("defaultPool"|"privatePool"); + + /** + * Creates a new ExecutionConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecutionConfig instance + */ + public static create(properties?: google.cloud.deploy.v1.IExecutionConfig): google.cloud.deploy.v1.ExecutionConfig; + + /** + * Encodes the specified ExecutionConfig message. Does not implicitly {@link google.cloud.deploy.v1.ExecutionConfig.verify|verify} messages. + * @param message ExecutionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IExecutionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecutionConfig message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ExecutionConfig.verify|verify} messages. + * @param message ExecutionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IExecutionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecutionConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecutionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.ExecutionConfig; + + /** + * Decodes an ExecutionConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecutionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.ExecutionConfig; + + /** + * Verifies an ExecutionConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExecutionConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecutionConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.ExecutionConfig; + + /** + * Creates a plain object from an ExecutionConfig message. Also converts values to other types if specified. + * @param message ExecutionConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.ExecutionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecutionConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ExecutionConfig { + + /** ExecutionEnvironmentUsage enum. */ + enum ExecutionEnvironmentUsage { + EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED = 0, + RENDER = 1, + DEPLOY = 2 + } + } + + /** Properties of a DefaultPool. */ + interface IDefaultPool { + + /** DefaultPool serviceAccount */ + serviceAccount?: (string|null); + + /** DefaultPool artifactStorage */ + artifactStorage?: (string|null); + } + + /** Represents a DefaultPool. */ + class DefaultPool implements IDefaultPool { + + /** + * Constructs a new DefaultPool. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IDefaultPool); + + /** DefaultPool serviceAccount. */ + public serviceAccount: string; + + /** DefaultPool artifactStorage. */ + public artifactStorage: string; + + /** + * Creates a new DefaultPool instance using the specified properties. + * @param [properties] Properties to set + * @returns DefaultPool instance + */ + public static create(properties?: google.cloud.deploy.v1.IDefaultPool): google.cloud.deploy.v1.DefaultPool; + + /** + * Encodes the specified DefaultPool message. Does not implicitly {@link google.cloud.deploy.v1.DefaultPool.verify|verify} messages. + * @param message DefaultPool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IDefaultPool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DefaultPool message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DefaultPool.verify|verify} messages. + * @param message DefaultPool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IDefaultPool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DefaultPool message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DefaultPool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.DefaultPool; + + /** + * Decodes a DefaultPool message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DefaultPool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.DefaultPool; + + /** + * Verifies a DefaultPool message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DefaultPool message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DefaultPool + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.DefaultPool; + + /** + * Creates a plain object from a DefaultPool message. Also converts values to other types if specified. + * @param message DefaultPool + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.DefaultPool, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DefaultPool to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PrivatePool. */ + interface IPrivatePool { + + /** PrivatePool workerPool */ + workerPool?: (string|null); + + /** PrivatePool serviceAccount */ + serviceAccount?: (string|null); + + /** PrivatePool artifactStorage */ + artifactStorage?: (string|null); + } + + /** Represents a PrivatePool. */ + class PrivatePool implements IPrivatePool { + + /** + * Constructs a new PrivatePool. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IPrivatePool); + + /** PrivatePool workerPool. */ + public workerPool: string; + + /** PrivatePool serviceAccount. */ + public serviceAccount: string; + + /** PrivatePool artifactStorage. */ + public artifactStorage: string; + + /** + * Creates a new PrivatePool instance using the specified properties. + * @param [properties] Properties to set + * @returns PrivatePool instance + */ + public static create(properties?: google.cloud.deploy.v1.IPrivatePool): google.cloud.deploy.v1.PrivatePool; + + /** + * Encodes the specified PrivatePool message. Does not implicitly {@link google.cloud.deploy.v1.PrivatePool.verify|verify} messages. + * @param message PrivatePool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IPrivatePool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PrivatePool message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.PrivatePool.verify|verify} messages. + * @param message PrivatePool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IPrivatePool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PrivatePool message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PrivatePool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.PrivatePool; + + /** + * Decodes a PrivatePool message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PrivatePool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.PrivatePool; + + /** + * Verifies a PrivatePool message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PrivatePool message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PrivatePool + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.PrivatePool; + + /** + * Creates a plain object from a PrivatePool message. Also converts values to other types if specified. + * @param message PrivatePool + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.PrivatePool, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PrivatePool to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GkeCluster. */ + interface IGkeCluster { + + /** GkeCluster cluster */ + cluster?: (string|null); + } + + /** Represents a GkeCluster. */ + class GkeCluster implements IGkeCluster { + + /** + * Constructs a new GkeCluster. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IGkeCluster); + + /** GkeCluster cluster. */ + public cluster: string; + + /** + * Creates a new GkeCluster instance using the specified properties. + * @param [properties] Properties to set + * @returns GkeCluster instance + */ + public static create(properties?: google.cloud.deploy.v1.IGkeCluster): google.cloud.deploy.v1.GkeCluster; + + /** + * Encodes the specified GkeCluster message. Does not implicitly {@link google.cloud.deploy.v1.GkeCluster.verify|verify} messages. + * @param message GkeCluster message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IGkeCluster, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GkeCluster message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GkeCluster.verify|verify} messages. + * @param message GkeCluster message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IGkeCluster, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GkeCluster message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GkeCluster + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.GkeCluster; + + /** + * Decodes a GkeCluster message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GkeCluster + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.GkeCluster; + + /** + * Verifies a GkeCluster message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GkeCluster message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GkeCluster + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.GkeCluster; + + /** + * Creates a plain object from a GkeCluster message. Also converts values to other types if specified. + * @param message GkeCluster + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.GkeCluster, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GkeCluster to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListTargetsRequest. */ + interface IListTargetsRequest { + + /** ListTargetsRequest parent */ + parent?: (string|null); + + /** ListTargetsRequest pageSize */ + pageSize?: (number|null); + + /** ListTargetsRequest pageToken */ + pageToken?: (string|null); + + /** ListTargetsRequest filter */ + filter?: (string|null); + + /** ListTargetsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListTargetsRequest. */ + class ListTargetsRequest implements IListTargetsRequest { + + /** + * Constructs a new ListTargetsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IListTargetsRequest); + + /** ListTargetsRequest parent. */ + public parent: string; + + /** ListTargetsRequest pageSize. */ + public pageSize: number; + + /** ListTargetsRequest pageToken. */ + public pageToken: string; + + /** ListTargetsRequest filter. */ + public filter: string; + + /** ListTargetsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListTargetsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTargetsRequest instance + */ + public static create(properties?: google.cloud.deploy.v1.IListTargetsRequest): google.cloud.deploy.v1.ListTargetsRequest; + + /** + * Encodes the specified ListTargetsRequest message. Does not implicitly {@link google.cloud.deploy.v1.ListTargetsRequest.verify|verify} messages. + * @param message ListTargetsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IListTargetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListTargetsRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListTargetsRequest.verify|verify} messages. + * @param message ListTargetsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IListTargetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListTargetsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTargetsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.ListTargetsRequest; + + /** + * Decodes a ListTargetsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTargetsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.ListTargetsRequest; + + /** + * Verifies a ListTargetsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListTargetsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTargetsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.ListTargetsRequest; + + /** + * Creates a plain object from a ListTargetsRequest message. Also converts values to other types if specified. + * @param message ListTargetsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.ListTargetsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTargetsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListTargetsResponse. */ + interface IListTargetsResponse { + + /** ListTargetsResponse targets */ + targets?: (google.cloud.deploy.v1.ITarget[]|null); + + /** ListTargetsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListTargetsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListTargetsResponse. */ + class ListTargetsResponse implements IListTargetsResponse { + + /** + * Constructs a new ListTargetsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IListTargetsResponse); + + /** ListTargetsResponse targets. */ + public targets: google.cloud.deploy.v1.ITarget[]; + + /** ListTargetsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListTargetsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListTargetsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTargetsResponse instance + */ + public static create(properties?: google.cloud.deploy.v1.IListTargetsResponse): google.cloud.deploy.v1.ListTargetsResponse; + + /** + * Encodes the specified ListTargetsResponse message. Does not implicitly {@link google.cloud.deploy.v1.ListTargetsResponse.verify|verify} messages. + * @param message ListTargetsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IListTargetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListTargetsResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListTargetsResponse.verify|verify} messages. + * @param message ListTargetsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IListTargetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListTargetsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTargetsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.ListTargetsResponse; + + /** + * Decodes a ListTargetsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTargetsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.ListTargetsResponse; + + /** + * Verifies a ListTargetsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListTargetsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTargetsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.ListTargetsResponse; + + /** + * Creates a plain object from a ListTargetsResponse message. Also converts values to other types if specified. + * @param message ListTargetsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.ListTargetsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTargetsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetTargetRequest. */ + interface IGetTargetRequest { + + /** GetTargetRequest name */ + name?: (string|null); + } + + /** Represents a GetTargetRequest. */ + class GetTargetRequest implements IGetTargetRequest { + + /** + * Constructs a new GetTargetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IGetTargetRequest); + + /** GetTargetRequest name. */ + public name: string; + + /** + * Creates a new GetTargetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetTargetRequest instance + */ + public static create(properties?: google.cloud.deploy.v1.IGetTargetRequest): google.cloud.deploy.v1.GetTargetRequest; + + /** + * Encodes the specified GetTargetRequest message. Does not implicitly {@link google.cloud.deploy.v1.GetTargetRequest.verify|verify} messages. + * @param message GetTargetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IGetTargetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetTargetRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GetTargetRequest.verify|verify} messages. + * @param message GetTargetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IGetTargetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetTargetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.GetTargetRequest; + + /** + * Decodes a GetTargetRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.GetTargetRequest; + + /** + * Verifies a GetTargetRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetTargetRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetTargetRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.GetTargetRequest; + + /** + * Creates a plain object from a GetTargetRequest message. Also converts values to other types if specified. + * @param message GetTargetRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.GetTargetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetTargetRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateTargetRequest. */ + interface ICreateTargetRequest { + + /** CreateTargetRequest parent */ + parent?: (string|null); + + /** CreateTargetRequest targetId */ + targetId?: (string|null); + + /** CreateTargetRequest target */ + target?: (google.cloud.deploy.v1.ITarget|null); + + /** CreateTargetRequest requestId */ + requestId?: (string|null); + + /** CreateTargetRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateTargetRequest. */ + class CreateTargetRequest implements ICreateTargetRequest { + + /** + * Constructs a new CreateTargetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.ICreateTargetRequest); + + /** CreateTargetRequest parent. */ + public parent: string; + + /** CreateTargetRequest targetId. */ + public targetId: string; + + /** CreateTargetRequest target. */ + public target?: (google.cloud.deploy.v1.ITarget|null); + + /** CreateTargetRequest requestId. */ + public requestId: string; + + /** CreateTargetRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateTargetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateTargetRequest instance + */ + public static create(properties?: google.cloud.deploy.v1.ICreateTargetRequest): google.cloud.deploy.v1.CreateTargetRequest; + + /** + * Encodes the specified CreateTargetRequest message. Does not implicitly {@link google.cloud.deploy.v1.CreateTargetRequest.verify|verify} messages. + * @param message CreateTargetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.ICreateTargetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateTargetRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CreateTargetRequest.verify|verify} messages. + * @param message CreateTargetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.ICreateTargetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateTargetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.CreateTargetRequest; + + /** + * Decodes a CreateTargetRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.CreateTargetRequest; + + /** + * Verifies a CreateTargetRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateTargetRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateTargetRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.CreateTargetRequest; + + /** + * Creates a plain object from a CreateTargetRequest message. Also converts values to other types if specified. + * @param message CreateTargetRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.CreateTargetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateTargetRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateTargetRequest. */ + interface IUpdateTargetRequest { + + /** UpdateTargetRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateTargetRequest target */ + target?: (google.cloud.deploy.v1.ITarget|null); + + /** UpdateTargetRequest requestId */ + requestId?: (string|null); + + /** UpdateTargetRequest allowMissing */ + allowMissing?: (boolean|null); + + /** UpdateTargetRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents an UpdateTargetRequest. */ + class UpdateTargetRequest implements IUpdateTargetRequest { + + /** + * Constructs a new UpdateTargetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IUpdateTargetRequest); + + /** UpdateTargetRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateTargetRequest target. */ + public target?: (google.cloud.deploy.v1.ITarget|null); + + /** UpdateTargetRequest requestId. */ + public requestId: string; + + /** UpdateTargetRequest allowMissing. */ + public allowMissing: boolean; + + /** UpdateTargetRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new UpdateTargetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateTargetRequest instance + */ + public static create(properties?: google.cloud.deploy.v1.IUpdateTargetRequest): google.cloud.deploy.v1.UpdateTargetRequest; + + /** + * Encodes the specified UpdateTargetRequest message. Does not implicitly {@link google.cloud.deploy.v1.UpdateTargetRequest.verify|verify} messages. + * @param message UpdateTargetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IUpdateTargetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateTargetRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.UpdateTargetRequest.verify|verify} messages. + * @param message UpdateTargetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IUpdateTargetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateTargetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.UpdateTargetRequest; + + /** + * Decodes an UpdateTargetRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.UpdateTargetRequest; + + /** + * Verifies an UpdateTargetRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateTargetRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateTargetRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.UpdateTargetRequest; + + /** + * Creates a plain object from an UpdateTargetRequest message. Also converts values to other types if specified. + * @param message UpdateTargetRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.UpdateTargetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateTargetRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteTargetRequest. */ + interface IDeleteTargetRequest { + + /** DeleteTargetRequest name */ + name?: (string|null); + + /** DeleteTargetRequest requestId */ + requestId?: (string|null); + + /** DeleteTargetRequest allowMissing */ + allowMissing?: (boolean|null); + + /** DeleteTargetRequest validateOnly */ + validateOnly?: (boolean|null); + + /** DeleteTargetRequest etag */ + etag?: (string|null); + } + + /** Represents a DeleteTargetRequest. */ + class DeleteTargetRequest implements IDeleteTargetRequest { + + /** + * Constructs a new DeleteTargetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IDeleteTargetRequest); + + /** DeleteTargetRequest name. */ + public name: string; + + /** DeleteTargetRequest requestId. */ + public requestId: string; + + /** DeleteTargetRequest allowMissing. */ + public allowMissing: boolean; + + /** DeleteTargetRequest validateOnly. */ + public validateOnly: boolean; + + /** DeleteTargetRequest etag. */ + public etag: string; + + /** + * Creates a new DeleteTargetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteTargetRequest instance + */ + public static create(properties?: google.cloud.deploy.v1.IDeleteTargetRequest): google.cloud.deploy.v1.DeleteTargetRequest; + + /** + * Encodes the specified DeleteTargetRequest message. Does not implicitly {@link google.cloud.deploy.v1.DeleteTargetRequest.verify|verify} messages. + * @param message DeleteTargetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IDeleteTargetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteTargetRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeleteTargetRequest.verify|verify} messages. + * @param message DeleteTargetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IDeleteTargetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteTargetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.DeleteTargetRequest; + + /** + * Decodes a DeleteTargetRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.DeleteTargetRequest; + + /** + * Verifies a DeleteTargetRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteTargetRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteTargetRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.DeleteTargetRequest; + + /** + * Creates a plain object from a DeleteTargetRequest message. Also converts values to other types if specified. + * @param message DeleteTargetRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.DeleteTargetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteTargetRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Release. */ + interface IRelease { + + /** Release name */ + name?: (string|null); + + /** Release uid */ + uid?: (string|null); + + /** Release description */ + description?: (string|null); + + /** Release annotations */ + annotations?: ({ [k: string]: string }|null); + + /** Release labels */ + labels?: ({ [k: string]: string }|null); + + /** Release createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Release renderStartTime */ + renderStartTime?: (google.protobuf.ITimestamp|null); + + /** Release renderEndTime */ + renderEndTime?: (google.protobuf.ITimestamp|null); + + /** Release skaffoldConfigUri */ + skaffoldConfigUri?: (string|null); + + /** Release skaffoldConfigPath */ + skaffoldConfigPath?: (string|null); + + /** Release buildArtifacts */ + buildArtifacts?: (google.cloud.deploy.v1.IBuildArtifact[]|null); + + /** Release deliveryPipelineSnapshot */ + deliveryPipelineSnapshot?: (google.cloud.deploy.v1.IDeliveryPipeline|null); + + /** Release targetSnapshots */ + targetSnapshots?: (google.cloud.deploy.v1.ITarget[]|null); + + /** Release renderState */ + renderState?: (google.cloud.deploy.v1.Release.RenderState|keyof typeof google.cloud.deploy.v1.Release.RenderState|null); + + /** Release etag */ + etag?: (string|null); + + /** Release skaffoldVersion */ + skaffoldVersion?: (string|null); + + /** Release targetArtifacts */ + targetArtifacts?: ({ [k: string]: google.cloud.deploy.v1.ITargetArtifact }|null); + + /** Release targetRenders */ + targetRenders?: ({ [k: string]: google.cloud.deploy.v1.Release.ITargetRender }|null); + } + + /** Represents a Release. */ + class Release implements IRelease { + + /** + * Constructs a new Release. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IRelease); + + /** Release name. */ + public name: string; + + /** Release uid. */ + public uid: string; + + /** Release description. */ + public description: string; + + /** Release annotations. */ + public annotations: { [k: string]: string }; + + /** Release labels. */ + public labels: { [k: string]: string }; + + /** Release createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Release renderStartTime. */ + public renderStartTime?: (google.protobuf.ITimestamp|null); + + /** Release renderEndTime. */ + public renderEndTime?: (google.protobuf.ITimestamp|null); + + /** Release skaffoldConfigUri. */ + public skaffoldConfigUri: string; + + /** Release skaffoldConfigPath. */ + public skaffoldConfigPath: string; + + /** Release buildArtifacts. */ + public buildArtifacts: google.cloud.deploy.v1.IBuildArtifact[]; + + /** Release deliveryPipelineSnapshot. */ + public deliveryPipelineSnapshot?: (google.cloud.deploy.v1.IDeliveryPipeline|null); + + /** Release targetSnapshots. */ + public targetSnapshots: google.cloud.deploy.v1.ITarget[]; + + /** Release renderState. */ + public renderState: (google.cloud.deploy.v1.Release.RenderState|keyof typeof google.cloud.deploy.v1.Release.RenderState); + + /** Release etag. */ + public etag: string; + + /** Release skaffoldVersion. */ + public skaffoldVersion: string; + + /** Release targetArtifacts. */ + public targetArtifacts: { [k: string]: google.cloud.deploy.v1.ITargetArtifact }; + + /** Release targetRenders. */ + public targetRenders: { [k: string]: google.cloud.deploy.v1.Release.ITargetRender }; + + /** + * Creates a new Release instance using the specified properties. + * @param [properties] Properties to set + * @returns Release instance + */ + public static create(properties?: google.cloud.deploy.v1.IRelease): google.cloud.deploy.v1.Release; + + /** + * Encodes the specified Release message. Does not implicitly {@link google.cloud.deploy.v1.Release.verify|verify} messages. + * @param message Release message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IRelease, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Release message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Release.verify|verify} messages. + * @param message Release message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IRelease, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Release message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Release + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.Release; + + /** + * Decodes a Release message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Release + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.Release; + + /** + * Verifies a Release message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Release message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Release + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.Release; + + /** + * Creates a plain object from a Release message. Also converts values to other types if specified. + * @param message Release + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.Release, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Release to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Release { + + /** Properties of a TargetRender. */ + interface ITargetRender { + + /** TargetRender renderingBuild */ + renderingBuild?: (string|null); + + /** TargetRender renderingState */ + renderingState?: (google.cloud.deploy.v1.Release.TargetRender.TargetRenderState|keyof typeof google.cloud.deploy.v1.Release.TargetRender.TargetRenderState|null); + } + + /** Represents a TargetRender. */ + class TargetRender implements ITargetRender { + + /** + * Constructs a new TargetRender. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.Release.ITargetRender); + + /** TargetRender renderingBuild. */ + public renderingBuild: string; + + /** TargetRender renderingState. */ + public renderingState: (google.cloud.deploy.v1.Release.TargetRender.TargetRenderState|keyof typeof google.cloud.deploy.v1.Release.TargetRender.TargetRenderState); + + /** + * Creates a new TargetRender instance using the specified properties. + * @param [properties] Properties to set + * @returns TargetRender instance + */ + public static create(properties?: google.cloud.deploy.v1.Release.ITargetRender): google.cloud.deploy.v1.Release.TargetRender; + + /** + * Encodes the specified TargetRender message. Does not implicitly {@link google.cloud.deploy.v1.Release.TargetRender.verify|verify} messages. + * @param message TargetRender message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.Release.ITargetRender, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TargetRender message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Release.TargetRender.verify|verify} messages. + * @param message TargetRender message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.Release.ITargetRender, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TargetRender message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TargetRender + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.Release.TargetRender; + + /** + * Decodes a TargetRender message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TargetRender + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.Release.TargetRender; + + /** + * Verifies a TargetRender message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TargetRender message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TargetRender + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.Release.TargetRender; + + /** + * Creates a plain object from a TargetRender message. Also converts values to other types if specified. + * @param message TargetRender + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.Release.TargetRender, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TargetRender to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace TargetRender { + + /** TargetRenderState enum. */ + enum TargetRenderState { + TARGET_RENDER_STATE_UNSPECIFIED = 0, + SUCCEEDED = 1, + FAILED = 2, + IN_PROGRESS = 3 + } + } + + /** RenderState enum. */ + enum RenderState { + RENDER_STATE_UNSPECIFIED = 0, + SUCCEEDED = 1, + FAILED = 2, + IN_PROGRESS = 3 + } + } + + /** Properties of a BuildArtifact. */ + interface IBuildArtifact { + + /** BuildArtifact image */ + image?: (string|null); + + /** BuildArtifact tag */ + tag?: (string|null); + } + + /** Represents a BuildArtifact. */ + class BuildArtifact implements IBuildArtifact { + + /** + * Constructs a new BuildArtifact. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IBuildArtifact); + + /** BuildArtifact image. */ + public image: string; + + /** BuildArtifact tag. */ + public tag: string; + + /** + * Creates a new BuildArtifact instance using the specified properties. + * @param [properties] Properties to set + * @returns BuildArtifact instance + */ + public static create(properties?: google.cloud.deploy.v1.IBuildArtifact): google.cloud.deploy.v1.BuildArtifact; + + /** + * Encodes the specified BuildArtifact message. Does not implicitly {@link google.cloud.deploy.v1.BuildArtifact.verify|verify} messages. + * @param message BuildArtifact message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IBuildArtifact, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BuildArtifact message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.BuildArtifact.verify|verify} messages. + * @param message BuildArtifact message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IBuildArtifact, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BuildArtifact message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BuildArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.BuildArtifact; + + /** + * Decodes a BuildArtifact message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BuildArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.BuildArtifact; + + /** + * Verifies a BuildArtifact message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BuildArtifact message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BuildArtifact + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.BuildArtifact; + + /** + * Creates a plain object from a BuildArtifact message. Also converts values to other types if specified. + * @param message BuildArtifact + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.BuildArtifact, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BuildArtifact to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a TargetArtifact. */ + interface ITargetArtifact { + + /** TargetArtifact artifactUri */ + artifactUri?: (string|null); + + /** TargetArtifact skaffoldConfigPath */ + skaffoldConfigPath?: (string|null); + + /** TargetArtifact manifestPath */ + manifestPath?: (string|null); + } + + /** Represents a TargetArtifact. */ + class TargetArtifact implements ITargetArtifact { + + /** + * Constructs a new TargetArtifact. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.ITargetArtifact); + + /** TargetArtifact artifactUri. */ + public artifactUri?: (string|null); + + /** TargetArtifact skaffoldConfigPath. */ + public skaffoldConfigPath: string; + + /** TargetArtifact manifestPath. */ + public manifestPath: string; + + /** TargetArtifact uri. */ + public uri?: "artifactUri"; + + /** + * Creates a new TargetArtifact instance using the specified properties. + * @param [properties] Properties to set + * @returns TargetArtifact instance + */ + public static create(properties?: google.cloud.deploy.v1.ITargetArtifact): google.cloud.deploy.v1.TargetArtifact; + + /** + * Encodes the specified TargetArtifact message. Does not implicitly {@link google.cloud.deploy.v1.TargetArtifact.verify|verify} messages. + * @param message TargetArtifact message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.ITargetArtifact, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TargetArtifact message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.TargetArtifact.verify|verify} messages. + * @param message TargetArtifact message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.ITargetArtifact, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TargetArtifact message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TargetArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.TargetArtifact; + + /** + * Decodes a TargetArtifact message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TargetArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.TargetArtifact; + + /** + * Verifies a TargetArtifact message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TargetArtifact message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TargetArtifact + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.TargetArtifact; + + /** + * Creates a plain object from a TargetArtifact message. Also converts values to other types if specified. + * @param message TargetArtifact + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.TargetArtifact, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TargetArtifact to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListReleasesRequest. */ + interface IListReleasesRequest { + + /** ListReleasesRequest parent */ + parent?: (string|null); + + /** ListReleasesRequest pageSize */ + pageSize?: (number|null); + + /** ListReleasesRequest pageToken */ + pageToken?: (string|null); + + /** ListReleasesRequest filter */ + filter?: (string|null); + + /** ListReleasesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListReleasesRequest. */ + class ListReleasesRequest implements IListReleasesRequest { + + /** + * Constructs a new ListReleasesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IListReleasesRequest); + + /** ListReleasesRequest parent. */ + public parent: string; + + /** ListReleasesRequest pageSize. */ + public pageSize: number; + + /** ListReleasesRequest pageToken. */ + public pageToken: string; + + /** ListReleasesRequest filter. */ + public filter: string; + + /** ListReleasesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListReleasesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListReleasesRequest instance + */ + public static create(properties?: google.cloud.deploy.v1.IListReleasesRequest): google.cloud.deploy.v1.ListReleasesRequest; + + /** + * Encodes the specified ListReleasesRequest message. Does not implicitly {@link google.cloud.deploy.v1.ListReleasesRequest.verify|verify} messages. + * @param message ListReleasesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IListReleasesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListReleasesRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListReleasesRequest.verify|verify} messages. + * @param message ListReleasesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IListReleasesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListReleasesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListReleasesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.ListReleasesRequest; + + /** + * Decodes a ListReleasesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListReleasesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.ListReleasesRequest; + + /** + * Verifies a ListReleasesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListReleasesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListReleasesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.ListReleasesRequest; + + /** + * Creates a plain object from a ListReleasesRequest message. Also converts values to other types if specified. + * @param message ListReleasesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.ListReleasesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListReleasesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListReleasesResponse. */ + interface IListReleasesResponse { + + /** ListReleasesResponse releases */ + releases?: (google.cloud.deploy.v1.IRelease[]|null); + + /** ListReleasesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListReleasesResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListReleasesResponse. */ + class ListReleasesResponse implements IListReleasesResponse { + + /** + * Constructs a new ListReleasesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IListReleasesResponse); + + /** ListReleasesResponse releases. */ + public releases: google.cloud.deploy.v1.IRelease[]; + + /** ListReleasesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListReleasesResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListReleasesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListReleasesResponse instance + */ + public static create(properties?: google.cloud.deploy.v1.IListReleasesResponse): google.cloud.deploy.v1.ListReleasesResponse; + + /** + * Encodes the specified ListReleasesResponse message. Does not implicitly {@link google.cloud.deploy.v1.ListReleasesResponse.verify|verify} messages. + * @param message ListReleasesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IListReleasesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListReleasesResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListReleasesResponse.verify|verify} messages. + * @param message ListReleasesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IListReleasesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListReleasesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListReleasesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.ListReleasesResponse; + + /** + * Decodes a ListReleasesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListReleasesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.ListReleasesResponse; + + /** + * Verifies a ListReleasesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListReleasesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListReleasesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.ListReleasesResponse; + + /** + * Creates a plain object from a ListReleasesResponse message. Also converts values to other types if specified. + * @param message ListReleasesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.ListReleasesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListReleasesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetReleaseRequest. */ + interface IGetReleaseRequest { + + /** GetReleaseRequest name */ + name?: (string|null); + } + + /** Represents a GetReleaseRequest. */ + class GetReleaseRequest implements IGetReleaseRequest { + + /** + * Constructs a new GetReleaseRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IGetReleaseRequest); + + /** GetReleaseRequest name. */ + public name: string; + + /** + * Creates a new GetReleaseRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetReleaseRequest instance + */ + public static create(properties?: google.cloud.deploy.v1.IGetReleaseRequest): google.cloud.deploy.v1.GetReleaseRequest; + + /** + * Encodes the specified GetReleaseRequest message. Does not implicitly {@link google.cloud.deploy.v1.GetReleaseRequest.verify|verify} messages. + * @param message GetReleaseRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IGetReleaseRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetReleaseRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GetReleaseRequest.verify|verify} messages. + * @param message GetReleaseRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IGetReleaseRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetReleaseRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetReleaseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.GetReleaseRequest; + + /** + * Decodes a GetReleaseRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetReleaseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.GetReleaseRequest; + + /** + * Verifies a GetReleaseRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetReleaseRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetReleaseRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.GetReleaseRequest; + + /** + * Creates a plain object from a GetReleaseRequest message. Also converts values to other types if specified. + * @param message GetReleaseRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.GetReleaseRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetReleaseRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateReleaseRequest. */ + interface ICreateReleaseRequest { + + /** CreateReleaseRequest parent */ + parent?: (string|null); + + /** CreateReleaseRequest releaseId */ + releaseId?: (string|null); + + /** CreateReleaseRequest release */ + release?: (google.cloud.deploy.v1.IRelease|null); + + /** CreateReleaseRequest requestId */ + requestId?: (string|null); + + /** CreateReleaseRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateReleaseRequest. */ + class CreateReleaseRequest implements ICreateReleaseRequest { + + /** + * Constructs a new CreateReleaseRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.ICreateReleaseRequest); + + /** CreateReleaseRequest parent. */ + public parent: string; + + /** CreateReleaseRequest releaseId. */ + public releaseId: string; + + /** CreateReleaseRequest release. */ + public release?: (google.cloud.deploy.v1.IRelease|null); + + /** CreateReleaseRequest requestId. */ + public requestId: string; + + /** CreateReleaseRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateReleaseRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateReleaseRequest instance + */ + public static create(properties?: google.cloud.deploy.v1.ICreateReleaseRequest): google.cloud.deploy.v1.CreateReleaseRequest; + + /** + * Encodes the specified CreateReleaseRequest message. Does not implicitly {@link google.cloud.deploy.v1.CreateReleaseRequest.verify|verify} messages. + * @param message CreateReleaseRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.ICreateReleaseRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateReleaseRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CreateReleaseRequest.verify|verify} messages. + * @param message CreateReleaseRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.ICreateReleaseRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateReleaseRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateReleaseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.CreateReleaseRequest; + + /** + * Decodes a CreateReleaseRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateReleaseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.CreateReleaseRequest; + + /** + * Verifies a CreateReleaseRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateReleaseRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateReleaseRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.CreateReleaseRequest; + + /** + * Creates a plain object from a CreateReleaseRequest message. Also converts values to other types if specified. + * @param message CreateReleaseRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.CreateReleaseRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateReleaseRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Rollout. */ + interface IRollout { + + /** Rollout name */ + name?: (string|null); + + /** Rollout uid */ + uid?: (string|null); + + /** Rollout description */ + description?: (string|null); + + /** Rollout annotations */ + annotations?: ({ [k: string]: string }|null); + + /** Rollout labels */ + labels?: ({ [k: string]: string }|null); + + /** Rollout createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Rollout approveTime */ + approveTime?: (google.protobuf.ITimestamp|null); + + /** Rollout enqueueTime */ + enqueueTime?: (google.protobuf.ITimestamp|null); + + /** Rollout deployStartTime */ + deployStartTime?: (google.protobuf.ITimestamp|null); + + /** Rollout deployEndTime */ + deployEndTime?: (google.protobuf.ITimestamp|null); + + /** Rollout targetId */ + targetId?: (string|null); + + /** Rollout approvalState */ + approvalState?: (google.cloud.deploy.v1.Rollout.ApprovalState|keyof typeof google.cloud.deploy.v1.Rollout.ApprovalState|null); + + /** Rollout state */ + state?: (google.cloud.deploy.v1.Rollout.State|keyof typeof google.cloud.deploy.v1.Rollout.State|null); + + /** Rollout failureReason */ + failureReason?: (string|null); + + /** Rollout deployingBuild */ + deployingBuild?: (string|null); + + /** Rollout etag */ + etag?: (string|null); + } + + /** Represents a Rollout. */ + class Rollout implements IRollout { + + /** + * Constructs a new Rollout. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IRollout); + + /** Rollout name. */ + public name: string; + + /** Rollout uid. */ + public uid: string; + + /** Rollout description. */ + public description: string; + + /** Rollout annotations. */ + public annotations: { [k: string]: string }; + + /** Rollout labels. */ + public labels: { [k: string]: string }; + + /** Rollout createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Rollout approveTime. */ + public approveTime?: (google.protobuf.ITimestamp|null); + + /** Rollout enqueueTime. */ + public enqueueTime?: (google.protobuf.ITimestamp|null); + + /** Rollout deployStartTime. */ + public deployStartTime?: (google.protobuf.ITimestamp|null); + + /** Rollout deployEndTime. */ + public deployEndTime?: (google.protobuf.ITimestamp|null); + + /** Rollout targetId. */ + public targetId: string; + + /** Rollout approvalState. */ + public approvalState: (google.cloud.deploy.v1.Rollout.ApprovalState|keyof typeof google.cloud.deploy.v1.Rollout.ApprovalState); + + /** Rollout state. */ + public state: (google.cloud.deploy.v1.Rollout.State|keyof typeof google.cloud.deploy.v1.Rollout.State); + + /** Rollout failureReason. */ + public failureReason: string; + + /** Rollout deployingBuild. */ + public deployingBuild: string; + + /** Rollout etag. */ + public etag: string; + + /** + * Creates a new Rollout instance using the specified properties. + * @param [properties] Properties to set + * @returns Rollout instance + */ + public static create(properties?: google.cloud.deploy.v1.IRollout): google.cloud.deploy.v1.Rollout; + + /** + * Encodes the specified Rollout message. Does not implicitly {@link google.cloud.deploy.v1.Rollout.verify|verify} messages. + * @param message Rollout message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IRollout, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Rollout message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Rollout.verify|verify} messages. + * @param message Rollout message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IRollout, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Rollout message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Rollout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.Rollout; + + /** + * Decodes a Rollout message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Rollout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.Rollout; + + /** + * Verifies a Rollout message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Rollout message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Rollout + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.Rollout; + + /** + * Creates a plain object from a Rollout message. Also converts values to other types if specified. + * @param message Rollout + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.Rollout, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Rollout to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Rollout { + + /** ApprovalState enum. */ + enum ApprovalState { + APPROVAL_STATE_UNSPECIFIED = 0, + NEEDS_APPROVAL = 1, + DOES_NOT_NEED_APPROVAL = 2, + APPROVED = 3, + REJECTED = 4 + } + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + SUCCEEDED = 1, + FAILED = 2, + IN_PROGRESS = 3, + PENDING_APPROVAL = 4, + APPROVAL_REJECTED = 5, + PENDING = 6, + PENDING_RELEASE = 7 + } + } + + /** Properties of a ListRolloutsRequest. */ + interface IListRolloutsRequest { + + /** ListRolloutsRequest parent */ + parent?: (string|null); + + /** ListRolloutsRequest pageSize */ + pageSize?: (number|null); + + /** ListRolloutsRequest pageToken */ + pageToken?: (string|null); + + /** ListRolloutsRequest filter */ + filter?: (string|null); + + /** ListRolloutsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListRolloutsRequest. */ + class ListRolloutsRequest implements IListRolloutsRequest { + + /** + * Constructs a new ListRolloutsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IListRolloutsRequest); + + /** ListRolloutsRequest parent. */ + public parent: string; + + /** ListRolloutsRequest pageSize. */ + public pageSize: number; + + /** ListRolloutsRequest pageToken. */ + public pageToken: string; + + /** ListRolloutsRequest filter. */ + public filter: string; + + /** ListRolloutsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListRolloutsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListRolloutsRequest instance + */ + public static create(properties?: google.cloud.deploy.v1.IListRolloutsRequest): google.cloud.deploy.v1.ListRolloutsRequest; + + /** + * Encodes the specified ListRolloutsRequest message. Does not implicitly {@link google.cloud.deploy.v1.ListRolloutsRequest.verify|verify} messages. + * @param message ListRolloutsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IListRolloutsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListRolloutsRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListRolloutsRequest.verify|verify} messages. + * @param message ListRolloutsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IListRolloutsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListRolloutsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListRolloutsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.ListRolloutsRequest; + + /** + * Decodes a ListRolloutsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListRolloutsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.ListRolloutsRequest; + + /** + * Verifies a ListRolloutsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListRolloutsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListRolloutsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.ListRolloutsRequest; + + /** + * Creates a plain object from a ListRolloutsRequest message. Also converts values to other types if specified. + * @param message ListRolloutsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.ListRolloutsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListRolloutsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListRolloutsResponse. */ + interface IListRolloutsResponse { + + /** ListRolloutsResponse rollouts */ + rollouts?: (google.cloud.deploy.v1.IRollout[]|null); + + /** ListRolloutsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListRolloutsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListRolloutsResponse. */ + class ListRolloutsResponse implements IListRolloutsResponse { + + /** + * Constructs a new ListRolloutsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IListRolloutsResponse); + + /** ListRolloutsResponse rollouts. */ + public rollouts: google.cloud.deploy.v1.IRollout[]; + + /** ListRolloutsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListRolloutsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListRolloutsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListRolloutsResponse instance + */ + public static create(properties?: google.cloud.deploy.v1.IListRolloutsResponse): google.cloud.deploy.v1.ListRolloutsResponse; + + /** + * Encodes the specified ListRolloutsResponse message. Does not implicitly {@link google.cloud.deploy.v1.ListRolloutsResponse.verify|verify} messages. + * @param message ListRolloutsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IListRolloutsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListRolloutsResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListRolloutsResponse.verify|verify} messages. + * @param message ListRolloutsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IListRolloutsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListRolloutsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListRolloutsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.ListRolloutsResponse; + + /** + * Decodes a ListRolloutsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListRolloutsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.ListRolloutsResponse; + + /** + * Verifies a ListRolloutsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListRolloutsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListRolloutsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.ListRolloutsResponse; + + /** + * Creates a plain object from a ListRolloutsResponse message. Also converts values to other types if specified. + * @param message ListRolloutsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.ListRolloutsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListRolloutsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetRolloutRequest. */ + interface IGetRolloutRequest { + + /** GetRolloutRequest name */ + name?: (string|null); + } + + /** Represents a GetRolloutRequest. */ + class GetRolloutRequest implements IGetRolloutRequest { + + /** + * Constructs a new GetRolloutRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IGetRolloutRequest); + + /** GetRolloutRequest name. */ + public name: string; + + /** + * Creates a new GetRolloutRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetRolloutRequest instance + */ + public static create(properties?: google.cloud.deploy.v1.IGetRolloutRequest): google.cloud.deploy.v1.GetRolloutRequest; + + /** + * Encodes the specified GetRolloutRequest message. Does not implicitly {@link google.cloud.deploy.v1.GetRolloutRequest.verify|verify} messages. + * @param message GetRolloutRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IGetRolloutRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetRolloutRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GetRolloutRequest.verify|verify} messages. + * @param message GetRolloutRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IGetRolloutRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetRolloutRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetRolloutRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.GetRolloutRequest; + + /** + * Decodes a GetRolloutRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetRolloutRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.GetRolloutRequest; + + /** + * Verifies a GetRolloutRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetRolloutRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetRolloutRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.GetRolloutRequest; + + /** + * Creates a plain object from a GetRolloutRequest message. Also converts values to other types if specified. + * @param message GetRolloutRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.GetRolloutRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetRolloutRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateRolloutRequest. */ + interface ICreateRolloutRequest { + + /** CreateRolloutRequest parent */ + parent?: (string|null); + + /** CreateRolloutRequest rolloutId */ + rolloutId?: (string|null); + + /** CreateRolloutRequest rollout */ + rollout?: (google.cloud.deploy.v1.IRollout|null); + + /** CreateRolloutRequest requestId */ + requestId?: (string|null); + + /** CreateRolloutRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateRolloutRequest. */ + class CreateRolloutRequest implements ICreateRolloutRequest { + + /** + * Constructs a new CreateRolloutRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.ICreateRolloutRequest); + + /** CreateRolloutRequest parent. */ + public parent: string; + + /** CreateRolloutRequest rolloutId. */ + public rolloutId: string; + + /** CreateRolloutRequest rollout. */ + public rollout?: (google.cloud.deploy.v1.IRollout|null); + + /** CreateRolloutRequest requestId. */ + public requestId: string; + + /** CreateRolloutRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateRolloutRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateRolloutRequest instance + */ + public static create(properties?: google.cloud.deploy.v1.ICreateRolloutRequest): google.cloud.deploy.v1.CreateRolloutRequest; + + /** + * Encodes the specified CreateRolloutRequest message. Does not implicitly {@link google.cloud.deploy.v1.CreateRolloutRequest.verify|verify} messages. + * @param message CreateRolloutRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.ICreateRolloutRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateRolloutRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CreateRolloutRequest.verify|verify} messages. + * @param message CreateRolloutRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.ICreateRolloutRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateRolloutRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateRolloutRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.CreateRolloutRequest; + + /** + * Decodes a CreateRolloutRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateRolloutRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.CreateRolloutRequest; + + /** + * Verifies a CreateRolloutRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateRolloutRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateRolloutRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.CreateRolloutRequest; + + /** + * Creates a plain object from a CreateRolloutRequest message. Also converts values to other types if specified. + * @param message CreateRolloutRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.CreateRolloutRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateRolloutRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an OperationMetadata. */ + interface IOperationMetadata { + + /** OperationMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata target */ + target?: (string|null); + + /** OperationMetadata verb */ + verb?: (string|null); + + /** OperationMetadata statusMessage */ + statusMessage?: (string|null); + + /** OperationMetadata requestedCancellation */ + requestedCancellation?: (boolean|null); + + /** OperationMetadata apiVersion */ + apiVersion?: (string|null); + } + + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { + + /** + * Constructs a new OperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IOperationMetadata); + + /** OperationMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata target. */ + public target: string; + + /** OperationMetadata verb. */ + public verb: string; + + /** OperationMetadata statusMessage. */ + public statusMessage: string; + + /** OperationMetadata requestedCancellation. */ + public requestedCancellation: boolean; + + /** OperationMetadata apiVersion. */ + public apiVersion: string; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationMetadata instance + */ + public static create(properties?: google.cloud.deploy.v1.IOperationMetadata): google.cloud.deploy.v1.OperationMetadata; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.deploy.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.OperationMetadata; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.OperationMetadata; + + /** + * Verifies an OperationMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.OperationMetadata; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @param message OperationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an ApproveRolloutRequest. */ + interface IApproveRolloutRequest { + + /** ApproveRolloutRequest name */ + name?: (string|null); + + /** ApproveRolloutRequest approved */ + approved?: (boolean|null); + } + + /** Represents an ApproveRolloutRequest. */ + class ApproveRolloutRequest implements IApproveRolloutRequest { + + /** + * Constructs a new ApproveRolloutRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IApproveRolloutRequest); + + /** ApproveRolloutRequest name. */ + public name: string; + + /** ApproveRolloutRequest approved. */ + public approved: boolean; + + /** + * Creates a new ApproveRolloutRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ApproveRolloutRequest instance + */ + public static create(properties?: google.cloud.deploy.v1.IApproveRolloutRequest): google.cloud.deploy.v1.ApproveRolloutRequest; + + /** + * Encodes the specified ApproveRolloutRequest message. Does not implicitly {@link google.cloud.deploy.v1.ApproveRolloutRequest.verify|verify} messages. + * @param message ApproveRolloutRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IApproveRolloutRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ApproveRolloutRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ApproveRolloutRequest.verify|verify} messages. + * @param message ApproveRolloutRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IApproveRolloutRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ApproveRolloutRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ApproveRolloutRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.ApproveRolloutRequest; + + /** + * Decodes an ApproveRolloutRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ApproveRolloutRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.ApproveRolloutRequest; + + /** + * Verifies an ApproveRolloutRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ApproveRolloutRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ApproveRolloutRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.ApproveRolloutRequest; + + /** + * Creates a plain object from an ApproveRolloutRequest message. Also converts values to other types if specified. + * @param message ApproveRolloutRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.ApproveRolloutRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ApproveRolloutRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an ApproveRolloutResponse. */ + interface IApproveRolloutResponse { + } + + /** Represents an ApproveRolloutResponse. */ + class ApproveRolloutResponse implements IApproveRolloutResponse { + + /** + * Constructs a new ApproveRolloutResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IApproveRolloutResponse); + + /** + * Creates a new ApproveRolloutResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ApproveRolloutResponse instance + */ + public static create(properties?: google.cloud.deploy.v1.IApproveRolloutResponse): google.cloud.deploy.v1.ApproveRolloutResponse; + + /** + * Encodes the specified ApproveRolloutResponse message. Does not implicitly {@link google.cloud.deploy.v1.ApproveRolloutResponse.verify|verify} messages. + * @param message ApproveRolloutResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IApproveRolloutResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ApproveRolloutResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ApproveRolloutResponse.verify|verify} messages. + * @param message ApproveRolloutResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IApproveRolloutResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ApproveRolloutResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ApproveRolloutResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.ApproveRolloutResponse; + + /** + * Decodes an ApproveRolloutResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ApproveRolloutResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.ApproveRolloutResponse; + + /** + * Verifies an ApproveRolloutResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ApproveRolloutResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ApproveRolloutResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.ApproveRolloutResponse; + + /** + * Creates a plain object from an ApproveRolloutResponse message. Also converts values to other types if specified. + * @param message ApproveRolloutResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.ApproveRolloutResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ApproveRolloutResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Config. */ + interface IConfig { + + /** Config name */ + name?: (string|null); + + /** Config supportedVersions */ + supportedVersions?: (google.cloud.deploy.v1.ISkaffoldVersion[]|null); + + /** Config defaultSkaffoldVersion */ + defaultSkaffoldVersion?: (string|null); + } + + /** Represents a Config. */ + class Config implements IConfig { + + /** + * Constructs a new Config. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IConfig); + + /** Config name. */ + public name: string; + + /** Config supportedVersions. */ + public supportedVersions: google.cloud.deploy.v1.ISkaffoldVersion[]; + + /** Config defaultSkaffoldVersion. */ + public defaultSkaffoldVersion: string; + + /** + * Creates a new Config instance using the specified properties. + * @param [properties] Properties to set + * @returns Config instance + */ + public static create(properties?: google.cloud.deploy.v1.IConfig): google.cloud.deploy.v1.Config; + + /** + * Encodes the specified Config message. Does not implicitly {@link google.cloud.deploy.v1.Config.verify|verify} messages. + * @param message Config message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Config message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Config.verify|verify} messages. + * @param message Config message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Config message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Config + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.Config; + + /** + * Decodes a Config message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Config + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.Config; + + /** + * Verifies a Config message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Config message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Config + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.Config; + + /** + * Creates a plain object from a Config message. Also converts values to other types if specified. + * @param message Config + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.Config, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Config to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SkaffoldVersion. */ + interface ISkaffoldVersion { + + /** SkaffoldVersion version */ + version?: (string|null); + + /** SkaffoldVersion supportEndDate */ + supportEndDate?: (google.type.IDate|null); + } + + /** Represents a SkaffoldVersion. */ + class SkaffoldVersion implements ISkaffoldVersion { + + /** + * Constructs a new SkaffoldVersion. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.ISkaffoldVersion); + + /** SkaffoldVersion version. */ + public version: string; + + /** SkaffoldVersion supportEndDate. */ + public supportEndDate?: (google.type.IDate|null); + + /** + * Creates a new SkaffoldVersion instance using the specified properties. + * @param [properties] Properties to set + * @returns SkaffoldVersion instance + */ + public static create(properties?: google.cloud.deploy.v1.ISkaffoldVersion): google.cloud.deploy.v1.SkaffoldVersion; + + /** + * Encodes the specified SkaffoldVersion message. Does not implicitly {@link google.cloud.deploy.v1.SkaffoldVersion.verify|verify} messages. + * @param message SkaffoldVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.ISkaffoldVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SkaffoldVersion message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.SkaffoldVersion.verify|verify} messages. + * @param message SkaffoldVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.ISkaffoldVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SkaffoldVersion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SkaffoldVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.SkaffoldVersion; + + /** + * Decodes a SkaffoldVersion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SkaffoldVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.SkaffoldVersion; + + /** + * Verifies a SkaffoldVersion message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SkaffoldVersion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SkaffoldVersion + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.SkaffoldVersion; + + /** + * Creates a plain object from a SkaffoldVersion message. Also converts values to other types if specified. + * @param message SkaffoldVersion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.SkaffoldVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SkaffoldVersion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetConfigRequest. */ + interface IGetConfigRequest { + + /** GetConfigRequest name */ + name?: (string|null); + } + + /** Represents a GetConfigRequest. */ + class GetConfigRequest implements IGetConfigRequest { + + /** + * Constructs a new GetConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IGetConfigRequest); + + /** GetConfigRequest name. */ + public name: string; + + /** + * Creates a new GetConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetConfigRequest instance + */ + public static create(properties?: google.cloud.deploy.v1.IGetConfigRequest): google.cloud.deploy.v1.GetConfigRequest; + + /** + * Encodes the specified GetConfigRequest message. Does not implicitly {@link google.cloud.deploy.v1.GetConfigRequest.verify|verify} messages. + * @param message GetConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IGetConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetConfigRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GetConfigRequest.verify|verify} messages. + * @param message GetConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IGetConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.GetConfigRequest; + + /** + * Decodes a GetConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.GetConfigRequest; + + /** + * Verifies a GetConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.GetConfigRequest; + + /** + * Creates a plain object from a GetConfigRequest message. Also converts values to other types if specified. + * @param message GetConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.GetConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + + /** + * Verifies a Http message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get?: (string|null); + + /** HttpRule put. */ + public put?: (string|null); + + /** HttpRule post. */ + public post?: (string|null); + + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6 + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions phpGenericServices */ + phpGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions phpGenericServices. */ + public phpGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + + /** MethodOptions .google.longrunning.operationInfo */ + ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|string|null); + } + + /** Represents an Any. */ + class Any implements IAny { + + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: (Uint8Array|string); + + /** + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Any message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; + + /** + * Verifies an Any message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Any + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + + /** + * Verifies an Empty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldMask. */ + interface IFieldMask { + + /** FieldMask paths */ + paths?: (string[]|null); + } + + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { + + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); + + /** FieldMask paths. */ + public paths: string[]; + + /** + * Creates a new FieldMask instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldMask instance + */ + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + + /** + * Verifies a FieldMask message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldMask + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldMask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|string|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long|string); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + + /** + * Verifies a Timestamp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace longrunning. */ + namespace longrunning { + + /** Represents an Operations */ + class Operations extends $protobuf.rpc.Service { + + /** + * Constructs a new Operations service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Operations service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Operations; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOperationsResponse + */ + public listOperations(request: google.longrunning.IListOperationsRequest, callback: google.longrunning.Operations.ListOperationsCallback): void; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @returns Promise + */ + public listOperations(request: google.longrunning.IListOperationsRequest): Promise; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public getOperation(request: google.longrunning.IGetOperationRequest, callback: google.longrunning.Operations.GetOperationCallback): void; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @returns Promise + */ + public getOperation(request: google.longrunning.IGetOperationRequest): Promise; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest, callback: google.longrunning.Operations.DeleteOperationCallback): void; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @returns Promise + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest): Promise; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest, callback: google.longrunning.Operations.CancelOperationCallback): void; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @returns Promise + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest): Promise; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest, callback: google.longrunning.Operations.WaitOperationCallback): void; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @returns Promise + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest): Promise; + } + + namespace Operations { + + /** + * Callback as used by {@link google.longrunning.Operations#listOperations}. + * @param error Error, if any + * @param [response] ListOperationsResponse + */ + type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#getOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#deleteOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#cancelOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#waitOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type WaitOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of an Operation. */ + interface IOperation { + + /** Operation name */ + name?: (string|null); + + /** Operation metadata */ + metadata?: (google.protobuf.IAny|null); + + /** Operation done */ + done?: (boolean|null); + + /** Operation error */ + error?: (google.rpc.IStatus|null); + + /** Operation response */ + response?: (google.protobuf.IAny|null); + } + + /** Represents an Operation. */ + class Operation implements IOperation { + + /** + * Constructs a new Operation. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperation); + + /** Operation name. */ + public name: string; + + /** Operation metadata. */ + public metadata?: (google.protobuf.IAny|null); + + /** Operation done. */ + public done: boolean; + + /** Operation error. */ + public error?: (google.rpc.IStatus|null); + + /** Operation response. */ + public response?: (google.protobuf.IAny|null); + + /** Operation result. */ + public result?: ("error"|"response"); + + /** + * Creates a new Operation instance using the specified properties. + * @param [properties] Properties to set + * @returns Operation instance + */ + public static create(properties?: google.longrunning.IOperation): google.longrunning.Operation; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.Operation; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.Operation; + + /** + * Verifies an Operation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Operation + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.Operation; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @param message Operation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.Operation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Operation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetOperationRequest. */ + interface IGetOperationRequest { + + /** GetOperationRequest name */ + name?: (string|null); + } + + /** Represents a GetOperationRequest. */ + class GetOperationRequest implements IGetOperationRequest { + + /** + * Constructs a new GetOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IGetOperationRequest); + + /** GetOperationRequest name. */ + public name: string; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOperationRequest instance + */ + public static create(properties?: google.longrunning.IGetOperationRequest): google.longrunning.GetOperationRequest; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.GetOperationRequest; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.GetOperationRequest; + + /** + * Verifies a GetOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.GetOperationRequest; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @param message GetOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListOperationsRequest. */ + interface IListOperationsRequest { + + /** ListOperationsRequest name */ + name?: (string|null); + + /** ListOperationsRequest filter */ + filter?: (string|null); + + /** ListOperationsRequest pageSize */ + pageSize?: (number|null); + + /** ListOperationsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListOperationsRequest. */ + class ListOperationsRequest implements IListOperationsRequest { + + /** + * Constructs a new ListOperationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsRequest); + + /** ListOperationsRequest name. */ + public name: string; + + /** ListOperationsRequest filter. */ + public filter: string; + + /** ListOperationsRequest pageSize. */ + public pageSize: number; + + /** ListOperationsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsRequest instance + */ + public static create(properties?: google.longrunning.IListOperationsRequest): google.longrunning.ListOperationsRequest; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsRequest; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsRequest; + + /** + * Verifies a ListOperationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsRequest; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @param message ListOperationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListOperationsResponse. */ + interface IListOperationsResponse { + + /** ListOperationsResponse operations */ + operations?: (google.longrunning.IOperation[]|null); + + /** ListOperationsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListOperationsResponse. */ + class ListOperationsResponse implements IListOperationsResponse { + + /** + * Constructs a new ListOperationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsResponse); + + /** ListOperationsResponse operations. */ + public operations: google.longrunning.IOperation[]; + + /** ListOperationsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsResponse instance + */ + public static create(properties?: google.longrunning.IListOperationsResponse): google.longrunning.ListOperationsResponse; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsResponse; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsResponse; + + /** + * Verifies a ListOperationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsResponse; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @param message ListOperationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CancelOperationRequest. */ + interface ICancelOperationRequest { + + /** CancelOperationRequest name */ + name?: (string|null); + } + + /** Represents a CancelOperationRequest. */ + class CancelOperationRequest implements ICancelOperationRequest { + + /** + * Constructs a new CancelOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.ICancelOperationRequest); + + /** CancelOperationRequest name. */ + public name: string; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelOperationRequest instance + */ + public static create(properties?: google.longrunning.ICancelOperationRequest): google.longrunning.CancelOperationRequest; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.CancelOperationRequest; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.CancelOperationRequest; + + /** + * Verifies a CancelOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.CancelOperationRequest; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @param message CancelOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteOperationRequest. */ + interface IDeleteOperationRequest { + + /** DeleteOperationRequest name */ + name?: (string|null); + } + + /** Represents a DeleteOperationRequest. */ + class DeleteOperationRequest implements IDeleteOperationRequest { + + /** + * Constructs a new DeleteOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IDeleteOperationRequest); + + /** DeleteOperationRequest name. */ + public name: string; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteOperationRequest instance + */ + public static create(properties?: google.longrunning.IDeleteOperationRequest): google.longrunning.DeleteOperationRequest; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.DeleteOperationRequest; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.DeleteOperationRequest; + + /** + * Verifies a DeleteOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.DeleteOperationRequest; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @param message DeleteOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.DeleteOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WaitOperationRequest. */ + interface IWaitOperationRequest { + + /** WaitOperationRequest name */ + name?: (string|null); + + /** WaitOperationRequest timeout */ + timeout?: (google.protobuf.IDuration|null); + } + + /** Represents a WaitOperationRequest. */ + class WaitOperationRequest implements IWaitOperationRequest { + + /** + * Constructs a new WaitOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IWaitOperationRequest); + + /** WaitOperationRequest name. */ + public name: string; + + /** WaitOperationRequest timeout. */ + public timeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns WaitOperationRequest instance + */ + public static create(properties?: google.longrunning.IWaitOperationRequest): google.longrunning.WaitOperationRequest; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.WaitOperationRequest; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.WaitOperationRequest; + + /** + * Verifies a WaitOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WaitOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.WaitOperationRequest; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @param message WaitOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.WaitOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WaitOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an OperationInfo. */ + interface IOperationInfo { + + /** OperationInfo responseType */ + responseType?: (string|null); + + /** OperationInfo metadataType */ + metadataType?: (string|null); + } + + /** Represents an OperationInfo. */ + class OperationInfo implements IOperationInfo { + + /** + * Constructs a new OperationInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperationInfo); + + /** OperationInfo responseType. */ + public responseType: string; + + /** OperationInfo metadataType. */ + public metadataType: string; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationInfo instance + */ + public static create(properties?: google.longrunning.IOperationInfo): google.longrunning.OperationInfo; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.OperationInfo; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.OperationInfo; + + /** + * Verifies an OperationInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationInfo + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.OperationInfo; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @param message OperationInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.OperationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace rpc. */ + namespace rpc { + + /** Properties of a Status. */ + interface IStatus { + + /** Status code */ + code?: (number|null); + + /** Status message */ + message?: (string|null); + + /** Status details */ + details?: (google.protobuf.IAny[]|null); + } + + /** Represents a Status. */ + class Status implements IStatus { + + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IStatus); + + /** Status code. */ + public code: number; + + /** Status message. */ + public message: string; + + /** Status details. */ + public details: google.protobuf.IAny[]; + + /** + * Creates a new Status instance using the specified properties. + * @param [properties] Properties to set + * @returns Status instance + */ + public static create(properties?: google.rpc.IStatus): google.rpc.Status; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Status message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; + + /** + * Verifies a Status message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Status + */ + public static fromObject(object: { [k: string]: any }): google.rpc.Status; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @param message Status + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Status to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace type. */ + namespace type { + + /** Properties of a Date. */ + interface IDate { + + /** Date year */ + year?: (number|null); + + /** Date month */ + month?: (number|null); + + /** Date day */ + day?: (number|null); + } + + /** Represents a Date. */ + class Date implements IDate { + + /** + * Constructs a new Date. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.IDate); + + /** Date year. */ + public year: number; + + /** Date month. */ + public month: number; + + /** Date day. */ + public day: number; + + /** + * Creates a new Date instance using the specified properties. + * @param [properties] Properties to set + * @returns Date instance + */ + public static create(properties?: google.type.IDate): google.type.Date; + + /** + * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @param message Date message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @param message Date message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Date message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Date; + + /** + * Decodes a Date message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Date; + + /** + * Verifies a Date message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Date message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Date + */ + public static fromObject(object: { [k: string]: any }): google.type.Date; + + /** + * Creates a plain object from a Date message. Also converts values to other types if specified. + * @param message Date + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.Date, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Date to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } +} diff --git a/packages/google-cloud-deploy/protos/protos.js b/packages/google-cloud-deploy/protos/protos.js new file mode 100644 index 00000000000..c07b7460e95 --- /dev/null +++ b/packages/google-cloud-deploy/protos/protos.js @@ -0,0 +1,26502 @@ +// Copyright 2021 Google LLC +// +// 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. + +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("google-gax").protobufMinimal); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots._google_cloud_deploy_protos || ($protobuf.roots._google_cloud_deploy_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.deploy = (function() { + + /** + * Namespace deploy. + * @memberof google.cloud + * @namespace + */ + var deploy = {}; + + deploy.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.cloud.deploy + * @namespace + */ + var v1 = {}; + + v1.CloudDeploy = (function() { + + /** + * Constructs a new CloudDeploy service. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a CloudDeploy + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function CloudDeploy(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (CloudDeploy.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = CloudDeploy; + + /** + * Creates new CloudDeploy service using the specified rpc implementation. + * @function create + * @memberof google.cloud.deploy.v1.CloudDeploy + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {CloudDeploy} RPC service. Useful where requests and/or responses are streamed. + */ + CloudDeploy.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#listDeliveryPipelines}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef ListDeliveryPipelinesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.deploy.v1.ListDeliveryPipelinesResponse} [response] ListDeliveryPipelinesResponse + */ + + /** + * Calls ListDeliveryPipelines. + * @function listDeliveryPipelines + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IListDeliveryPipelinesRequest} request ListDeliveryPipelinesRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.ListDeliveryPipelinesCallback} callback Node-style callback called with the error, if any, and ListDeliveryPipelinesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudDeploy.prototype.listDeliveryPipelines = function listDeliveryPipelines(request, callback) { + return this.rpcCall(listDeliveryPipelines, $root.google.cloud.deploy.v1.ListDeliveryPipelinesRequest, $root.google.cloud.deploy.v1.ListDeliveryPipelinesResponse, request, callback); + }, "name", { value: "ListDeliveryPipelines" }); + + /** + * Calls ListDeliveryPipelines. + * @function listDeliveryPipelines + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IListDeliveryPipelinesRequest} request ListDeliveryPipelinesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#getDeliveryPipeline}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef GetDeliveryPipelineCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.deploy.v1.DeliveryPipeline} [response] DeliveryPipeline + */ + + /** + * Calls GetDeliveryPipeline. + * @function getDeliveryPipeline + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IGetDeliveryPipelineRequest} request GetDeliveryPipelineRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.GetDeliveryPipelineCallback} callback Node-style callback called with the error, if any, and DeliveryPipeline + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudDeploy.prototype.getDeliveryPipeline = function getDeliveryPipeline(request, callback) { + return this.rpcCall(getDeliveryPipeline, $root.google.cloud.deploy.v1.GetDeliveryPipelineRequest, $root.google.cloud.deploy.v1.DeliveryPipeline, request, callback); + }, "name", { value: "GetDeliveryPipeline" }); + + /** + * Calls GetDeliveryPipeline. + * @function getDeliveryPipeline + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IGetDeliveryPipelineRequest} request GetDeliveryPipelineRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#createDeliveryPipeline}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef CreateDeliveryPipelineCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateDeliveryPipeline. + * @function createDeliveryPipeline + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.ICreateDeliveryPipelineRequest} request CreateDeliveryPipelineRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.CreateDeliveryPipelineCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudDeploy.prototype.createDeliveryPipeline = function createDeliveryPipeline(request, callback) { + return this.rpcCall(createDeliveryPipeline, $root.google.cloud.deploy.v1.CreateDeliveryPipelineRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateDeliveryPipeline" }); + + /** + * Calls CreateDeliveryPipeline. + * @function createDeliveryPipeline + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.ICreateDeliveryPipelineRequest} request CreateDeliveryPipelineRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#updateDeliveryPipeline}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef UpdateDeliveryPipelineCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateDeliveryPipeline. + * @function updateDeliveryPipeline + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest} request UpdateDeliveryPipelineRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.UpdateDeliveryPipelineCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudDeploy.prototype.updateDeliveryPipeline = function updateDeliveryPipeline(request, callback) { + return this.rpcCall(updateDeliveryPipeline, $root.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateDeliveryPipeline" }); + + /** + * Calls UpdateDeliveryPipeline. + * @function updateDeliveryPipeline + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest} request UpdateDeliveryPipelineRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#deleteDeliveryPipeline}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef DeleteDeliveryPipelineCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteDeliveryPipeline. + * @function deleteDeliveryPipeline + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest} request DeleteDeliveryPipelineRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.DeleteDeliveryPipelineCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudDeploy.prototype.deleteDeliveryPipeline = function deleteDeliveryPipeline(request, callback) { + return this.rpcCall(deleteDeliveryPipeline, $root.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteDeliveryPipeline" }); + + /** + * Calls DeleteDeliveryPipeline. + * @function deleteDeliveryPipeline + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest} request DeleteDeliveryPipelineRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#listTargets}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef ListTargetsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.deploy.v1.ListTargetsResponse} [response] ListTargetsResponse + */ + + /** + * Calls ListTargets. + * @function listTargets + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IListTargetsRequest} request ListTargetsRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.ListTargetsCallback} callback Node-style callback called with the error, if any, and ListTargetsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudDeploy.prototype.listTargets = function listTargets(request, callback) { + return this.rpcCall(listTargets, $root.google.cloud.deploy.v1.ListTargetsRequest, $root.google.cloud.deploy.v1.ListTargetsResponse, request, callback); + }, "name", { value: "ListTargets" }); + + /** + * Calls ListTargets. + * @function listTargets + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IListTargetsRequest} request ListTargetsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#getTarget}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef GetTargetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.deploy.v1.Target} [response] Target + */ + + /** + * Calls GetTarget. + * @function getTarget + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IGetTargetRequest} request GetTargetRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.GetTargetCallback} callback Node-style callback called with the error, if any, and Target + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudDeploy.prototype.getTarget = function getTarget(request, callback) { + return this.rpcCall(getTarget, $root.google.cloud.deploy.v1.GetTargetRequest, $root.google.cloud.deploy.v1.Target, request, callback); + }, "name", { value: "GetTarget" }); + + /** + * Calls GetTarget. + * @function getTarget + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IGetTargetRequest} request GetTargetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#createTarget}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef CreateTargetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateTarget. + * @function createTarget + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.ICreateTargetRequest} request CreateTargetRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.CreateTargetCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudDeploy.prototype.createTarget = function createTarget(request, callback) { + return this.rpcCall(createTarget, $root.google.cloud.deploy.v1.CreateTargetRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateTarget" }); + + /** + * Calls CreateTarget. + * @function createTarget + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.ICreateTargetRequest} request CreateTargetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#updateTarget}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef UpdateTargetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateTarget. + * @function updateTarget + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IUpdateTargetRequest} request UpdateTargetRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.UpdateTargetCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudDeploy.prototype.updateTarget = function updateTarget(request, callback) { + return this.rpcCall(updateTarget, $root.google.cloud.deploy.v1.UpdateTargetRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateTarget" }); + + /** + * Calls UpdateTarget. + * @function updateTarget + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IUpdateTargetRequest} request UpdateTargetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#deleteTarget}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef DeleteTargetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteTarget. + * @function deleteTarget + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IDeleteTargetRequest} request DeleteTargetRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.DeleteTargetCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudDeploy.prototype.deleteTarget = function deleteTarget(request, callback) { + return this.rpcCall(deleteTarget, $root.google.cloud.deploy.v1.DeleteTargetRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteTarget" }); + + /** + * Calls DeleteTarget. + * @function deleteTarget + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IDeleteTargetRequest} request DeleteTargetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#listReleases}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef ListReleasesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.deploy.v1.ListReleasesResponse} [response] ListReleasesResponse + */ + + /** + * Calls ListReleases. + * @function listReleases + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IListReleasesRequest} request ListReleasesRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.ListReleasesCallback} callback Node-style callback called with the error, if any, and ListReleasesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudDeploy.prototype.listReleases = function listReleases(request, callback) { + return this.rpcCall(listReleases, $root.google.cloud.deploy.v1.ListReleasesRequest, $root.google.cloud.deploy.v1.ListReleasesResponse, request, callback); + }, "name", { value: "ListReleases" }); + + /** + * Calls ListReleases. + * @function listReleases + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IListReleasesRequest} request ListReleasesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#getRelease}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef GetReleaseCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.deploy.v1.Release} [response] Release + */ + + /** + * Calls GetRelease. + * @function getRelease + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IGetReleaseRequest} request GetReleaseRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.GetReleaseCallback} callback Node-style callback called with the error, if any, and Release + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudDeploy.prototype.getRelease = function getRelease(request, callback) { + return this.rpcCall(getRelease, $root.google.cloud.deploy.v1.GetReleaseRequest, $root.google.cloud.deploy.v1.Release, request, callback); + }, "name", { value: "GetRelease" }); + + /** + * Calls GetRelease. + * @function getRelease + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IGetReleaseRequest} request GetReleaseRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#createRelease}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef CreateReleaseCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateRelease. + * @function createRelease + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.ICreateReleaseRequest} request CreateReleaseRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.CreateReleaseCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudDeploy.prototype.createRelease = function createRelease(request, callback) { + return this.rpcCall(createRelease, $root.google.cloud.deploy.v1.CreateReleaseRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateRelease" }); + + /** + * Calls CreateRelease. + * @function createRelease + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.ICreateReleaseRequest} request CreateReleaseRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#approveRollout}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef ApproveRolloutCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.deploy.v1.ApproveRolloutResponse} [response] ApproveRolloutResponse + */ + + /** + * Calls ApproveRollout. + * @function approveRollout + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IApproveRolloutRequest} request ApproveRolloutRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.ApproveRolloutCallback} callback Node-style callback called with the error, if any, and ApproveRolloutResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudDeploy.prototype.approveRollout = function approveRollout(request, callback) { + return this.rpcCall(approveRollout, $root.google.cloud.deploy.v1.ApproveRolloutRequest, $root.google.cloud.deploy.v1.ApproveRolloutResponse, request, callback); + }, "name", { value: "ApproveRollout" }); + + /** + * Calls ApproveRollout. + * @function approveRollout + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IApproveRolloutRequest} request ApproveRolloutRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#listRollouts}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef ListRolloutsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.deploy.v1.ListRolloutsResponse} [response] ListRolloutsResponse + */ + + /** + * Calls ListRollouts. + * @function listRollouts + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IListRolloutsRequest} request ListRolloutsRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.ListRolloutsCallback} callback Node-style callback called with the error, if any, and ListRolloutsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudDeploy.prototype.listRollouts = function listRollouts(request, callback) { + return this.rpcCall(listRollouts, $root.google.cloud.deploy.v1.ListRolloutsRequest, $root.google.cloud.deploy.v1.ListRolloutsResponse, request, callback); + }, "name", { value: "ListRollouts" }); + + /** + * Calls ListRollouts. + * @function listRollouts + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IListRolloutsRequest} request ListRolloutsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#getRollout}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef GetRolloutCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.deploy.v1.Rollout} [response] Rollout + */ + + /** + * Calls GetRollout. + * @function getRollout + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IGetRolloutRequest} request GetRolloutRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.GetRolloutCallback} callback Node-style callback called with the error, if any, and Rollout + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudDeploy.prototype.getRollout = function getRollout(request, callback) { + return this.rpcCall(getRollout, $root.google.cloud.deploy.v1.GetRolloutRequest, $root.google.cloud.deploy.v1.Rollout, request, callback); + }, "name", { value: "GetRollout" }); + + /** + * Calls GetRollout. + * @function getRollout + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IGetRolloutRequest} request GetRolloutRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#createRollout}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef CreateRolloutCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateRollout. + * @function createRollout + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.ICreateRolloutRequest} request CreateRolloutRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.CreateRolloutCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudDeploy.prototype.createRollout = function createRollout(request, callback) { + return this.rpcCall(createRollout, $root.google.cloud.deploy.v1.CreateRolloutRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateRollout" }); + + /** + * Calls CreateRollout. + * @function createRollout + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.ICreateRolloutRequest} request CreateRolloutRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#getConfig}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef GetConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.deploy.v1.Config} [response] Config + */ + + /** + * Calls GetConfig. + * @function getConfig + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IGetConfigRequest} request GetConfigRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.GetConfigCallback} callback Node-style callback called with the error, if any, and Config + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudDeploy.prototype.getConfig = function getConfig(request, callback) { + return this.rpcCall(getConfig, $root.google.cloud.deploy.v1.GetConfigRequest, $root.google.cloud.deploy.v1.Config, request, callback); + }, "name", { value: "GetConfig" }); + + /** + * Calls GetConfig. + * @function getConfig + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IGetConfigRequest} request GetConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return CloudDeploy; + })(); + + v1.DeliveryPipeline = (function() { + + /** + * Properties of a DeliveryPipeline. + * @memberof google.cloud.deploy.v1 + * @interface IDeliveryPipeline + * @property {string|null} [name] DeliveryPipeline name + * @property {string|null} [uid] DeliveryPipeline uid + * @property {string|null} [description] DeliveryPipeline description + * @property {Object.|null} [annotations] DeliveryPipeline annotations + * @property {Object.|null} [labels] DeliveryPipeline labels + * @property {google.protobuf.ITimestamp|null} [createTime] DeliveryPipeline createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] DeliveryPipeline updateTime + * @property {google.cloud.deploy.v1.ISerialPipeline|null} [serialPipeline] DeliveryPipeline serialPipeline + * @property {google.cloud.deploy.v1.IPipelineCondition|null} [condition] DeliveryPipeline condition + * @property {string|null} [etag] DeliveryPipeline etag + */ + + /** + * Constructs a new DeliveryPipeline. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a DeliveryPipeline. + * @implements IDeliveryPipeline + * @constructor + * @param {google.cloud.deploy.v1.IDeliveryPipeline=} [properties] Properties to set + */ + function DeliveryPipeline(properties) { + this.annotations = {}; + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeliveryPipeline name. + * @member {string} name + * @memberof google.cloud.deploy.v1.DeliveryPipeline + * @instance + */ + DeliveryPipeline.prototype.name = ""; + + /** + * DeliveryPipeline uid. + * @member {string} uid + * @memberof google.cloud.deploy.v1.DeliveryPipeline + * @instance + */ + DeliveryPipeline.prototype.uid = ""; + + /** + * DeliveryPipeline description. + * @member {string} description + * @memberof google.cloud.deploy.v1.DeliveryPipeline + * @instance + */ + DeliveryPipeline.prototype.description = ""; + + /** + * DeliveryPipeline annotations. + * @member {Object.} annotations + * @memberof google.cloud.deploy.v1.DeliveryPipeline + * @instance + */ + DeliveryPipeline.prototype.annotations = $util.emptyObject; + + /** + * DeliveryPipeline labels. + * @member {Object.} labels + * @memberof google.cloud.deploy.v1.DeliveryPipeline + * @instance + */ + DeliveryPipeline.prototype.labels = $util.emptyObject; + + /** + * DeliveryPipeline createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.deploy.v1.DeliveryPipeline + * @instance + */ + DeliveryPipeline.prototype.createTime = null; + + /** + * DeliveryPipeline updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.deploy.v1.DeliveryPipeline + * @instance + */ + DeliveryPipeline.prototype.updateTime = null; + + /** + * DeliveryPipeline serialPipeline. + * @member {google.cloud.deploy.v1.ISerialPipeline|null|undefined} serialPipeline + * @memberof google.cloud.deploy.v1.DeliveryPipeline + * @instance + */ + DeliveryPipeline.prototype.serialPipeline = null; + + /** + * DeliveryPipeline condition. + * @member {google.cloud.deploy.v1.IPipelineCondition|null|undefined} condition + * @memberof google.cloud.deploy.v1.DeliveryPipeline + * @instance + */ + DeliveryPipeline.prototype.condition = null; + + /** + * DeliveryPipeline etag. + * @member {string} etag + * @memberof google.cloud.deploy.v1.DeliveryPipeline + * @instance + */ + DeliveryPipeline.prototype.etag = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DeliveryPipeline pipeline. + * @member {"serialPipeline"|undefined} pipeline + * @memberof google.cloud.deploy.v1.DeliveryPipeline + * @instance + */ + Object.defineProperty(DeliveryPipeline.prototype, "pipeline", { + get: $util.oneOfGetter($oneOfFields = ["serialPipeline"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DeliveryPipeline instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.DeliveryPipeline + * @static + * @param {google.cloud.deploy.v1.IDeliveryPipeline=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.DeliveryPipeline} DeliveryPipeline instance + */ + DeliveryPipeline.create = function create(properties) { + return new DeliveryPipeline(properties); + }; + + /** + * Encodes the specified DeliveryPipeline message. Does not implicitly {@link google.cloud.deploy.v1.DeliveryPipeline.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.DeliveryPipeline + * @static + * @param {google.cloud.deploy.v1.IDeliveryPipeline} message DeliveryPipeline message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeliveryPipeline.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) + for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.serialPipeline != null && Object.hasOwnProperty.call(message, "serialPipeline")) + $root.google.cloud.deploy.v1.SerialPipeline.encode(message.serialPipeline, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.etag); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + $root.google.cloud.deploy.v1.PipelineCondition.encode(message.condition, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DeliveryPipeline message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeliveryPipeline.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.DeliveryPipeline + * @static + * @param {google.cloud.deploy.v1.IDeliveryPipeline} message DeliveryPipeline message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeliveryPipeline.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeliveryPipeline message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.DeliveryPipeline + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.DeliveryPipeline} DeliveryPipeline + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeliveryPipeline.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.DeliveryPipeline(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.uid = reader.string(); + break; + case 3: + message.description = reader.string(); + break; + case 4: + if (message.annotations === $util.emptyObject) + message.annotations = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.annotations[key] = value; + break; + case 5: + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + case 6: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 7: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 8: + message.serialPipeline = $root.google.cloud.deploy.v1.SerialPipeline.decode(reader, reader.uint32()); + break; + case 11: + message.condition = $root.google.cloud.deploy.v1.PipelineCondition.decode(reader, reader.uint32()); + break; + case 10: + message.etag = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeliveryPipeline message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.DeliveryPipeline + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.DeliveryPipeline} DeliveryPipeline + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeliveryPipeline.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeliveryPipeline message. + * @function verify + * @memberof google.cloud.deploy.v1.DeliveryPipeline + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeliveryPipeline.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.annotations != null && message.hasOwnProperty("annotations")) { + if (!$util.isObject(message.annotations)) + return "annotations: object expected"; + var key = Object.keys(message.annotations); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.annotations[key[i]])) + return "annotations: string{k:string} expected"; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.serialPipeline != null && message.hasOwnProperty("serialPipeline")) { + properties.pipeline = 1; + { + var error = $root.google.cloud.deploy.v1.SerialPipeline.verify(message.serialPipeline); + if (error) + return "serialPipeline." + error; + } + } + if (message.condition != null && message.hasOwnProperty("condition")) { + var error = $root.google.cloud.deploy.v1.PipelineCondition.verify(message.condition); + if (error) + return "condition." + error; + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; + + /** + * Creates a DeliveryPipeline message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.DeliveryPipeline + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.DeliveryPipeline} DeliveryPipeline + */ + DeliveryPipeline.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.DeliveryPipeline) + return object; + var message = new $root.google.cloud.deploy.v1.DeliveryPipeline(); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.description != null) + message.description = String(object.description); + if (object.annotations) { + if (typeof object.annotations !== "object") + throw TypeError(".google.cloud.deploy.v1.DeliveryPipeline.annotations: object expected"); + message.annotations = {}; + for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) + message.annotations[keys[i]] = String(object.annotations[keys[i]]); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.deploy.v1.DeliveryPipeline.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.deploy.v1.DeliveryPipeline.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.deploy.v1.DeliveryPipeline.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.serialPipeline != null) { + if (typeof object.serialPipeline !== "object") + throw TypeError(".google.cloud.deploy.v1.DeliveryPipeline.serialPipeline: object expected"); + message.serialPipeline = $root.google.cloud.deploy.v1.SerialPipeline.fromObject(object.serialPipeline); + } + if (object.condition != null) { + if (typeof object.condition !== "object") + throw TypeError(".google.cloud.deploy.v1.DeliveryPipeline.condition: object expected"); + message.condition = $root.google.cloud.deploy.v1.PipelineCondition.fromObject(object.condition); + } + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; + + /** + * Creates a plain object from a DeliveryPipeline message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.DeliveryPipeline + * @static + * @param {google.cloud.deploy.v1.DeliveryPipeline} message DeliveryPipeline + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeliveryPipeline.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) { + object.annotations = {}; + object.labels = {}; + } + if (options.defaults) { + object.name = ""; + object.uid = ""; + object.description = ""; + object.createTime = null; + object.updateTime = null; + object.etag = ""; + object.condition = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + var keys2; + if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { + object.annotations = {}; + for (var j = 0; j < keys2.length; ++j) + object.annotations[keys2[j]] = message.annotations[keys2[j]]; + } + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.serialPipeline != null && message.hasOwnProperty("serialPipeline")) { + object.serialPipeline = $root.google.cloud.deploy.v1.SerialPipeline.toObject(message.serialPipeline, options); + if (options.oneofs) + object.pipeline = "serialPipeline"; + } + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = $root.google.cloud.deploy.v1.PipelineCondition.toObject(message.condition, options); + return object; + }; + + /** + * Converts this DeliveryPipeline to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.DeliveryPipeline + * @instance + * @returns {Object.} JSON object + */ + DeliveryPipeline.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeliveryPipeline; + })(); + + v1.SerialPipeline = (function() { + + /** + * Properties of a SerialPipeline. + * @memberof google.cloud.deploy.v1 + * @interface ISerialPipeline + * @property {Array.|null} [stages] SerialPipeline stages + */ + + /** + * Constructs a new SerialPipeline. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a SerialPipeline. + * @implements ISerialPipeline + * @constructor + * @param {google.cloud.deploy.v1.ISerialPipeline=} [properties] Properties to set + */ + function SerialPipeline(properties) { + this.stages = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SerialPipeline stages. + * @member {Array.} stages + * @memberof google.cloud.deploy.v1.SerialPipeline + * @instance + */ + SerialPipeline.prototype.stages = $util.emptyArray; + + /** + * Creates a new SerialPipeline instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.SerialPipeline + * @static + * @param {google.cloud.deploy.v1.ISerialPipeline=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.SerialPipeline} SerialPipeline instance + */ + SerialPipeline.create = function create(properties) { + return new SerialPipeline(properties); + }; + + /** + * Encodes the specified SerialPipeline message. Does not implicitly {@link google.cloud.deploy.v1.SerialPipeline.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.SerialPipeline + * @static + * @param {google.cloud.deploy.v1.ISerialPipeline} message SerialPipeline message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SerialPipeline.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.stages != null && message.stages.length) + for (var i = 0; i < message.stages.length; ++i) + $root.google.cloud.deploy.v1.Stage.encode(message.stages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SerialPipeline message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.SerialPipeline.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.SerialPipeline + * @static + * @param {google.cloud.deploy.v1.ISerialPipeline} message SerialPipeline message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SerialPipeline.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SerialPipeline message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.SerialPipeline + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.SerialPipeline} SerialPipeline + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SerialPipeline.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.SerialPipeline(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.stages && message.stages.length)) + message.stages = []; + message.stages.push($root.google.cloud.deploy.v1.Stage.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SerialPipeline message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.SerialPipeline + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.SerialPipeline} SerialPipeline + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SerialPipeline.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SerialPipeline message. + * @function verify + * @memberof google.cloud.deploy.v1.SerialPipeline + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SerialPipeline.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.stages != null && message.hasOwnProperty("stages")) { + if (!Array.isArray(message.stages)) + return "stages: array expected"; + for (var i = 0; i < message.stages.length; ++i) { + var error = $root.google.cloud.deploy.v1.Stage.verify(message.stages[i]); + if (error) + return "stages." + error; + } + } + return null; + }; + + /** + * Creates a SerialPipeline message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.SerialPipeline + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.SerialPipeline} SerialPipeline + */ + SerialPipeline.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.SerialPipeline) + return object; + var message = new $root.google.cloud.deploy.v1.SerialPipeline(); + if (object.stages) { + if (!Array.isArray(object.stages)) + throw TypeError(".google.cloud.deploy.v1.SerialPipeline.stages: array expected"); + message.stages = []; + for (var i = 0; i < object.stages.length; ++i) { + if (typeof object.stages[i] !== "object") + throw TypeError(".google.cloud.deploy.v1.SerialPipeline.stages: object expected"); + message.stages[i] = $root.google.cloud.deploy.v1.Stage.fromObject(object.stages[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SerialPipeline message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.SerialPipeline + * @static + * @param {google.cloud.deploy.v1.SerialPipeline} message SerialPipeline + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SerialPipeline.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.stages = []; + if (message.stages && message.stages.length) { + object.stages = []; + for (var j = 0; j < message.stages.length; ++j) + object.stages[j] = $root.google.cloud.deploy.v1.Stage.toObject(message.stages[j], options); + } + return object; + }; + + /** + * Converts this SerialPipeline to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.SerialPipeline + * @instance + * @returns {Object.} JSON object + */ + SerialPipeline.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SerialPipeline; + })(); + + v1.Stage = (function() { + + /** + * Properties of a Stage. + * @memberof google.cloud.deploy.v1 + * @interface IStage + * @property {string|null} [targetId] Stage targetId + * @property {Array.|null} [profiles] Stage profiles + */ + + /** + * Constructs a new Stage. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a Stage. + * @implements IStage + * @constructor + * @param {google.cloud.deploy.v1.IStage=} [properties] Properties to set + */ + function Stage(properties) { + this.profiles = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Stage targetId. + * @member {string} targetId + * @memberof google.cloud.deploy.v1.Stage + * @instance + */ + Stage.prototype.targetId = ""; + + /** + * Stage profiles. + * @member {Array.} profiles + * @memberof google.cloud.deploy.v1.Stage + * @instance + */ + Stage.prototype.profiles = $util.emptyArray; + + /** + * Creates a new Stage instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.Stage + * @static + * @param {google.cloud.deploy.v1.IStage=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.Stage} Stage instance + */ + Stage.create = function create(properties) { + return new Stage(properties); + }; + + /** + * Encodes the specified Stage message. Does not implicitly {@link google.cloud.deploy.v1.Stage.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.Stage + * @static + * @param {google.cloud.deploy.v1.IStage} message Stage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Stage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.targetId != null && Object.hasOwnProperty.call(message, "targetId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.targetId); + if (message.profiles != null && message.profiles.length) + for (var i = 0; i < message.profiles.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.profiles[i]); + return writer; + }; + + /** + * Encodes the specified Stage message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Stage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.Stage + * @static + * @param {google.cloud.deploy.v1.IStage} message Stage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Stage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Stage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.Stage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.Stage} Stage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Stage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Stage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.targetId = reader.string(); + break; + case 2: + if (!(message.profiles && message.profiles.length)) + message.profiles = []; + message.profiles.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Stage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.Stage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.Stage} Stage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Stage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Stage message. + * @function verify + * @memberof google.cloud.deploy.v1.Stage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Stage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.targetId != null && message.hasOwnProperty("targetId")) + if (!$util.isString(message.targetId)) + return "targetId: string expected"; + if (message.profiles != null && message.hasOwnProperty("profiles")) { + if (!Array.isArray(message.profiles)) + return "profiles: array expected"; + for (var i = 0; i < message.profiles.length; ++i) + if (!$util.isString(message.profiles[i])) + return "profiles: string[] expected"; + } + return null; + }; + + /** + * Creates a Stage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.Stage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.Stage} Stage + */ + Stage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.Stage) + return object; + var message = new $root.google.cloud.deploy.v1.Stage(); + if (object.targetId != null) + message.targetId = String(object.targetId); + if (object.profiles) { + if (!Array.isArray(object.profiles)) + throw TypeError(".google.cloud.deploy.v1.Stage.profiles: array expected"); + message.profiles = []; + for (var i = 0; i < object.profiles.length; ++i) + message.profiles[i] = String(object.profiles[i]); + } + return message; + }; + + /** + * Creates a plain object from a Stage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.Stage + * @static + * @param {google.cloud.deploy.v1.Stage} message Stage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Stage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.profiles = []; + if (options.defaults) + object.targetId = ""; + if (message.targetId != null && message.hasOwnProperty("targetId")) + object.targetId = message.targetId; + if (message.profiles && message.profiles.length) { + object.profiles = []; + for (var j = 0; j < message.profiles.length; ++j) + object.profiles[j] = message.profiles[j]; + } + return object; + }; + + /** + * Converts this Stage to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.Stage + * @instance + * @returns {Object.} JSON object + */ + Stage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Stage; + })(); + + v1.PipelineReadyCondition = (function() { + + /** + * Properties of a PipelineReadyCondition. + * @memberof google.cloud.deploy.v1 + * @interface IPipelineReadyCondition + * @property {boolean|null} [status] PipelineReadyCondition status + * @property {google.protobuf.ITimestamp|null} [updateTime] PipelineReadyCondition updateTime + */ + + /** + * Constructs a new PipelineReadyCondition. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a PipelineReadyCondition. + * @implements IPipelineReadyCondition + * @constructor + * @param {google.cloud.deploy.v1.IPipelineReadyCondition=} [properties] Properties to set + */ + function PipelineReadyCondition(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PipelineReadyCondition status. + * @member {boolean} status + * @memberof google.cloud.deploy.v1.PipelineReadyCondition + * @instance + */ + PipelineReadyCondition.prototype.status = false; + + /** + * PipelineReadyCondition updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.deploy.v1.PipelineReadyCondition + * @instance + */ + PipelineReadyCondition.prototype.updateTime = null; + + /** + * Creates a new PipelineReadyCondition instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.PipelineReadyCondition + * @static + * @param {google.cloud.deploy.v1.IPipelineReadyCondition=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.PipelineReadyCondition} PipelineReadyCondition instance + */ + PipelineReadyCondition.create = function create(properties) { + return new PipelineReadyCondition(properties); + }; + + /** + * Encodes the specified PipelineReadyCondition message. Does not implicitly {@link google.cloud.deploy.v1.PipelineReadyCondition.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.PipelineReadyCondition + * @static + * @param {google.cloud.deploy.v1.IPipelineReadyCondition} message PipelineReadyCondition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PipelineReadyCondition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.status); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PipelineReadyCondition message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.PipelineReadyCondition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.PipelineReadyCondition + * @static + * @param {google.cloud.deploy.v1.IPipelineReadyCondition} message PipelineReadyCondition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PipelineReadyCondition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PipelineReadyCondition message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.PipelineReadyCondition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.PipelineReadyCondition} PipelineReadyCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PipelineReadyCondition.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.PipelineReadyCondition(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + message.status = reader.bool(); + break; + case 4: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PipelineReadyCondition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.PipelineReadyCondition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.PipelineReadyCondition} PipelineReadyCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PipelineReadyCondition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PipelineReadyCondition message. + * @function verify + * @memberof google.cloud.deploy.v1.PipelineReadyCondition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PipelineReadyCondition.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.status != null && message.hasOwnProperty("status")) + if (typeof message.status !== "boolean") + return "status: boolean expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + return null; + }; + + /** + * Creates a PipelineReadyCondition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.PipelineReadyCondition + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.PipelineReadyCondition} PipelineReadyCondition + */ + PipelineReadyCondition.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.PipelineReadyCondition) + return object; + var message = new $root.google.cloud.deploy.v1.PipelineReadyCondition(); + if (object.status != null) + message.status = Boolean(object.status); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.deploy.v1.PipelineReadyCondition.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a PipelineReadyCondition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.PipelineReadyCondition + * @static + * @param {google.cloud.deploy.v1.PipelineReadyCondition} message PipelineReadyCondition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PipelineReadyCondition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.status = false; + object.updateTime = null; + } + if (message.status != null && message.hasOwnProperty("status")) + object.status = message.status; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + return object; + }; + + /** + * Converts this PipelineReadyCondition to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.PipelineReadyCondition + * @instance + * @returns {Object.} JSON object + */ + PipelineReadyCondition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PipelineReadyCondition; + })(); + + v1.TargetsPresentCondition = (function() { + + /** + * Properties of a TargetsPresentCondition. + * @memberof google.cloud.deploy.v1 + * @interface ITargetsPresentCondition + * @property {boolean|null} [status] TargetsPresentCondition status + * @property {Array.|null} [missingTargets] TargetsPresentCondition missingTargets + * @property {google.protobuf.ITimestamp|null} [updateTime] TargetsPresentCondition updateTime + */ + + /** + * Constructs a new TargetsPresentCondition. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a TargetsPresentCondition. + * @implements ITargetsPresentCondition + * @constructor + * @param {google.cloud.deploy.v1.ITargetsPresentCondition=} [properties] Properties to set + */ + function TargetsPresentCondition(properties) { + this.missingTargets = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TargetsPresentCondition status. + * @member {boolean} status + * @memberof google.cloud.deploy.v1.TargetsPresentCondition + * @instance + */ + TargetsPresentCondition.prototype.status = false; + + /** + * TargetsPresentCondition missingTargets. + * @member {Array.} missingTargets + * @memberof google.cloud.deploy.v1.TargetsPresentCondition + * @instance + */ + TargetsPresentCondition.prototype.missingTargets = $util.emptyArray; + + /** + * TargetsPresentCondition updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.deploy.v1.TargetsPresentCondition + * @instance + */ + TargetsPresentCondition.prototype.updateTime = null; + + /** + * Creates a new TargetsPresentCondition instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.TargetsPresentCondition + * @static + * @param {google.cloud.deploy.v1.ITargetsPresentCondition=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.TargetsPresentCondition} TargetsPresentCondition instance + */ + TargetsPresentCondition.create = function create(properties) { + return new TargetsPresentCondition(properties); + }; + + /** + * Encodes the specified TargetsPresentCondition message. Does not implicitly {@link google.cloud.deploy.v1.TargetsPresentCondition.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.TargetsPresentCondition + * @static + * @param {google.cloud.deploy.v1.ITargetsPresentCondition} message TargetsPresentCondition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TargetsPresentCondition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.status); + if (message.missingTargets != null && message.missingTargets.length) + for (var i = 0; i < message.missingTargets.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.missingTargets[i]); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TargetsPresentCondition message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.TargetsPresentCondition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.TargetsPresentCondition + * @static + * @param {google.cloud.deploy.v1.ITargetsPresentCondition} message TargetsPresentCondition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TargetsPresentCondition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TargetsPresentCondition message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.TargetsPresentCondition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.TargetsPresentCondition} TargetsPresentCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetsPresentCondition.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.TargetsPresentCondition(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.status = reader.bool(); + break; + case 2: + if (!(message.missingTargets && message.missingTargets.length)) + message.missingTargets = []; + message.missingTargets.push(reader.string()); + break; + case 4: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TargetsPresentCondition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.TargetsPresentCondition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.TargetsPresentCondition} TargetsPresentCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetsPresentCondition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TargetsPresentCondition message. + * @function verify + * @memberof google.cloud.deploy.v1.TargetsPresentCondition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TargetsPresentCondition.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.status != null && message.hasOwnProperty("status")) + if (typeof message.status !== "boolean") + return "status: boolean expected"; + if (message.missingTargets != null && message.hasOwnProperty("missingTargets")) { + if (!Array.isArray(message.missingTargets)) + return "missingTargets: array expected"; + for (var i = 0; i < message.missingTargets.length; ++i) + if (!$util.isString(message.missingTargets[i])) + return "missingTargets: string[] expected"; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + return null; + }; + + /** + * Creates a TargetsPresentCondition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.TargetsPresentCondition + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.TargetsPresentCondition} TargetsPresentCondition + */ + TargetsPresentCondition.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.TargetsPresentCondition) + return object; + var message = new $root.google.cloud.deploy.v1.TargetsPresentCondition(); + if (object.status != null) + message.status = Boolean(object.status); + if (object.missingTargets) { + if (!Array.isArray(object.missingTargets)) + throw TypeError(".google.cloud.deploy.v1.TargetsPresentCondition.missingTargets: array expected"); + message.missingTargets = []; + for (var i = 0; i < object.missingTargets.length; ++i) + message.missingTargets[i] = String(object.missingTargets[i]); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.deploy.v1.TargetsPresentCondition.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a TargetsPresentCondition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.TargetsPresentCondition + * @static + * @param {google.cloud.deploy.v1.TargetsPresentCondition} message TargetsPresentCondition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TargetsPresentCondition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.missingTargets = []; + if (options.defaults) { + object.status = false; + object.updateTime = null; + } + if (message.status != null && message.hasOwnProperty("status")) + object.status = message.status; + if (message.missingTargets && message.missingTargets.length) { + object.missingTargets = []; + for (var j = 0; j < message.missingTargets.length; ++j) + object.missingTargets[j] = message.missingTargets[j]; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + return object; + }; + + /** + * Converts this TargetsPresentCondition to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.TargetsPresentCondition + * @instance + * @returns {Object.} JSON object + */ + TargetsPresentCondition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TargetsPresentCondition; + })(); + + v1.PipelineCondition = (function() { + + /** + * Properties of a PipelineCondition. + * @memberof google.cloud.deploy.v1 + * @interface IPipelineCondition + * @property {google.cloud.deploy.v1.IPipelineReadyCondition|null} [pipelineReadyCondition] PipelineCondition pipelineReadyCondition + * @property {google.cloud.deploy.v1.ITargetsPresentCondition|null} [targetsPresentCondition] PipelineCondition targetsPresentCondition + */ + + /** + * Constructs a new PipelineCondition. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a PipelineCondition. + * @implements IPipelineCondition + * @constructor + * @param {google.cloud.deploy.v1.IPipelineCondition=} [properties] Properties to set + */ + function PipelineCondition(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PipelineCondition pipelineReadyCondition. + * @member {google.cloud.deploy.v1.IPipelineReadyCondition|null|undefined} pipelineReadyCondition + * @memberof google.cloud.deploy.v1.PipelineCondition + * @instance + */ + PipelineCondition.prototype.pipelineReadyCondition = null; + + /** + * PipelineCondition targetsPresentCondition. + * @member {google.cloud.deploy.v1.ITargetsPresentCondition|null|undefined} targetsPresentCondition + * @memberof google.cloud.deploy.v1.PipelineCondition + * @instance + */ + PipelineCondition.prototype.targetsPresentCondition = null; + + /** + * Creates a new PipelineCondition instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.PipelineCondition + * @static + * @param {google.cloud.deploy.v1.IPipelineCondition=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.PipelineCondition} PipelineCondition instance + */ + PipelineCondition.create = function create(properties) { + return new PipelineCondition(properties); + }; + + /** + * Encodes the specified PipelineCondition message. Does not implicitly {@link google.cloud.deploy.v1.PipelineCondition.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.PipelineCondition + * @static + * @param {google.cloud.deploy.v1.IPipelineCondition} message PipelineCondition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PipelineCondition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pipelineReadyCondition != null && Object.hasOwnProperty.call(message, "pipelineReadyCondition")) + $root.google.cloud.deploy.v1.PipelineReadyCondition.encode(message.pipelineReadyCondition, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.targetsPresentCondition != null && Object.hasOwnProperty.call(message, "targetsPresentCondition")) + $root.google.cloud.deploy.v1.TargetsPresentCondition.encode(message.targetsPresentCondition, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PipelineCondition message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.PipelineCondition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.PipelineCondition + * @static + * @param {google.cloud.deploy.v1.IPipelineCondition} message PipelineCondition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PipelineCondition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PipelineCondition message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.PipelineCondition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.PipelineCondition} PipelineCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PipelineCondition.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.PipelineCondition(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pipelineReadyCondition = $root.google.cloud.deploy.v1.PipelineReadyCondition.decode(reader, reader.uint32()); + break; + case 3: + message.targetsPresentCondition = $root.google.cloud.deploy.v1.TargetsPresentCondition.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PipelineCondition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.PipelineCondition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.PipelineCondition} PipelineCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PipelineCondition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PipelineCondition message. + * @function verify + * @memberof google.cloud.deploy.v1.PipelineCondition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PipelineCondition.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pipelineReadyCondition != null && message.hasOwnProperty("pipelineReadyCondition")) { + var error = $root.google.cloud.deploy.v1.PipelineReadyCondition.verify(message.pipelineReadyCondition); + if (error) + return "pipelineReadyCondition." + error; + } + if (message.targetsPresentCondition != null && message.hasOwnProperty("targetsPresentCondition")) { + var error = $root.google.cloud.deploy.v1.TargetsPresentCondition.verify(message.targetsPresentCondition); + if (error) + return "targetsPresentCondition." + error; + } + return null; + }; + + /** + * Creates a PipelineCondition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.PipelineCondition + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.PipelineCondition} PipelineCondition + */ + PipelineCondition.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.PipelineCondition) + return object; + var message = new $root.google.cloud.deploy.v1.PipelineCondition(); + if (object.pipelineReadyCondition != null) { + if (typeof object.pipelineReadyCondition !== "object") + throw TypeError(".google.cloud.deploy.v1.PipelineCondition.pipelineReadyCondition: object expected"); + message.pipelineReadyCondition = $root.google.cloud.deploy.v1.PipelineReadyCondition.fromObject(object.pipelineReadyCondition); + } + if (object.targetsPresentCondition != null) { + if (typeof object.targetsPresentCondition !== "object") + throw TypeError(".google.cloud.deploy.v1.PipelineCondition.targetsPresentCondition: object expected"); + message.targetsPresentCondition = $root.google.cloud.deploy.v1.TargetsPresentCondition.fromObject(object.targetsPresentCondition); + } + return message; + }; + + /** + * Creates a plain object from a PipelineCondition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.PipelineCondition + * @static + * @param {google.cloud.deploy.v1.PipelineCondition} message PipelineCondition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PipelineCondition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.pipelineReadyCondition = null; + object.targetsPresentCondition = null; + } + if (message.pipelineReadyCondition != null && message.hasOwnProperty("pipelineReadyCondition")) + object.pipelineReadyCondition = $root.google.cloud.deploy.v1.PipelineReadyCondition.toObject(message.pipelineReadyCondition, options); + if (message.targetsPresentCondition != null && message.hasOwnProperty("targetsPresentCondition")) + object.targetsPresentCondition = $root.google.cloud.deploy.v1.TargetsPresentCondition.toObject(message.targetsPresentCondition, options); + return object; + }; + + /** + * Converts this PipelineCondition to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.PipelineCondition + * @instance + * @returns {Object.} JSON object + */ + PipelineCondition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PipelineCondition; + })(); + + v1.ListDeliveryPipelinesRequest = (function() { + + /** + * Properties of a ListDeliveryPipelinesRequest. + * @memberof google.cloud.deploy.v1 + * @interface IListDeliveryPipelinesRequest + * @property {string|null} [parent] ListDeliveryPipelinesRequest parent + * @property {number|null} [pageSize] ListDeliveryPipelinesRequest pageSize + * @property {string|null} [pageToken] ListDeliveryPipelinesRequest pageToken + * @property {string|null} [filter] ListDeliveryPipelinesRequest filter + * @property {string|null} [orderBy] ListDeliveryPipelinesRequest orderBy + */ + + /** + * Constructs a new ListDeliveryPipelinesRequest. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a ListDeliveryPipelinesRequest. + * @implements IListDeliveryPipelinesRequest + * @constructor + * @param {google.cloud.deploy.v1.IListDeliveryPipelinesRequest=} [properties] Properties to set + */ + function ListDeliveryPipelinesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDeliveryPipelinesRequest parent. + * @member {string} parent + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest + * @instance + */ + ListDeliveryPipelinesRequest.prototype.parent = ""; + + /** + * ListDeliveryPipelinesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest + * @instance + */ + ListDeliveryPipelinesRequest.prototype.pageSize = 0; + + /** + * ListDeliveryPipelinesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest + * @instance + */ + ListDeliveryPipelinesRequest.prototype.pageToken = ""; + + /** + * ListDeliveryPipelinesRequest filter. + * @member {string} filter + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest + * @instance + */ + ListDeliveryPipelinesRequest.prototype.filter = ""; + + /** + * ListDeliveryPipelinesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest + * @instance + */ + ListDeliveryPipelinesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListDeliveryPipelinesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest + * @static + * @param {google.cloud.deploy.v1.IListDeliveryPipelinesRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ListDeliveryPipelinesRequest} ListDeliveryPipelinesRequest instance + */ + ListDeliveryPipelinesRequest.create = function create(properties) { + return new ListDeliveryPipelinesRequest(properties); + }; + + /** + * Encodes the specified ListDeliveryPipelinesRequest message. Does not implicitly {@link google.cloud.deploy.v1.ListDeliveryPipelinesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest + * @static + * @param {google.cloud.deploy.v1.IListDeliveryPipelinesRequest} message ListDeliveryPipelinesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDeliveryPipelinesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListDeliveryPipelinesRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListDeliveryPipelinesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest + * @static + * @param {google.cloud.deploy.v1.IListDeliveryPipelinesRequest} message ListDeliveryPipelinesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDeliveryPipelinesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDeliveryPipelinesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.ListDeliveryPipelinesRequest} ListDeliveryPipelinesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDeliveryPipelinesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListDeliveryPipelinesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 4: + message.filter = reader.string(); + break; + case 5: + message.orderBy = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDeliveryPipelinesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.ListDeliveryPipelinesRequest} ListDeliveryPipelinesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDeliveryPipelinesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDeliveryPipelinesRequest message. + * @function verify + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDeliveryPipelinesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListDeliveryPipelinesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.ListDeliveryPipelinesRequest} ListDeliveryPipelinesRequest + */ + ListDeliveryPipelinesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ListDeliveryPipelinesRequest) + return object; + var message = new $root.google.cloud.deploy.v1.ListDeliveryPipelinesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListDeliveryPipelinesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest + * @static + * @param {google.cloud.deploy.v1.ListDeliveryPipelinesRequest} message ListDeliveryPipelinesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDeliveryPipelinesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListDeliveryPipelinesRequest to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest + * @instance + * @returns {Object.} JSON object + */ + ListDeliveryPipelinesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListDeliveryPipelinesRequest; + })(); + + v1.ListDeliveryPipelinesResponse = (function() { + + /** + * Properties of a ListDeliveryPipelinesResponse. + * @memberof google.cloud.deploy.v1 + * @interface IListDeliveryPipelinesResponse + * @property {Array.|null} [deliveryPipelines] ListDeliveryPipelinesResponse deliveryPipelines + * @property {string|null} [nextPageToken] ListDeliveryPipelinesResponse nextPageToken + * @property {Array.|null} [unreachable] ListDeliveryPipelinesResponse unreachable + */ + + /** + * Constructs a new ListDeliveryPipelinesResponse. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a ListDeliveryPipelinesResponse. + * @implements IListDeliveryPipelinesResponse + * @constructor + * @param {google.cloud.deploy.v1.IListDeliveryPipelinesResponse=} [properties] Properties to set + */ + function ListDeliveryPipelinesResponse(properties) { + this.deliveryPipelines = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDeliveryPipelinesResponse deliveryPipelines. + * @member {Array.} deliveryPipelines + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesResponse + * @instance + */ + ListDeliveryPipelinesResponse.prototype.deliveryPipelines = $util.emptyArray; + + /** + * ListDeliveryPipelinesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesResponse + * @instance + */ + ListDeliveryPipelinesResponse.prototype.nextPageToken = ""; + + /** + * ListDeliveryPipelinesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesResponse + * @instance + */ + ListDeliveryPipelinesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListDeliveryPipelinesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesResponse + * @static + * @param {google.cloud.deploy.v1.IListDeliveryPipelinesResponse=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ListDeliveryPipelinesResponse} ListDeliveryPipelinesResponse instance + */ + ListDeliveryPipelinesResponse.create = function create(properties) { + return new ListDeliveryPipelinesResponse(properties); + }; + + /** + * Encodes the specified ListDeliveryPipelinesResponse message. Does not implicitly {@link google.cloud.deploy.v1.ListDeliveryPipelinesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesResponse + * @static + * @param {google.cloud.deploy.v1.IListDeliveryPipelinesResponse} message ListDeliveryPipelinesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDeliveryPipelinesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deliveryPipelines != null && message.deliveryPipelines.length) + for (var i = 0; i < message.deliveryPipelines.length; ++i) + $root.google.cloud.deploy.v1.DeliveryPipeline.encode(message.deliveryPipelines[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListDeliveryPipelinesResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListDeliveryPipelinesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesResponse + * @static + * @param {google.cloud.deploy.v1.IListDeliveryPipelinesResponse} message ListDeliveryPipelinesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDeliveryPipelinesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDeliveryPipelinesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.ListDeliveryPipelinesResponse} ListDeliveryPipelinesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDeliveryPipelinesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListDeliveryPipelinesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.deliveryPipelines && message.deliveryPipelines.length)) + message.deliveryPipelines = []; + message.deliveryPipelines.push($root.google.cloud.deploy.v1.DeliveryPipeline.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + case 3: + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDeliveryPipelinesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.ListDeliveryPipelinesResponse} ListDeliveryPipelinesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDeliveryPipelinesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDeliveryPipelinesResponse message. + * @function verify + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDeliveryPipelinesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deliveryPipelines != null && message.hasOwnProperty("deliveryPipelines")) { + if (!Array.isArray(message.deliveryPipelines)) + return "deliveryPipelines: array expected"; + for (var i = 0; i < message.deliveryPipelines.length; ++i) { + var error = $root.google.cloud.deploy.v1.DeliveryPipeline.verify(message.deliveryPipelines[i]); + if (error) + return "deliveryPipelines." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListDeliveryPipelinesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.ListDeliveryPipelinesResponse} ListDeliveryPipelinesResponse + */ + ListDeliveryPipelinesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ListDeliveryPipelinesResponse) + return object; + var message = new $root.google.cloud.deploy.v1.ListDeliveryPipelinesResponse(); + if (object.deliveryPipelines) { + if (!Array.isArray(object.deliveryPipelines)) + throw TypeError(".google.cloud.deploy.v1.ListDeliveryPipelinesResponse.deliveryPipelines: array expected"); + message.deliveryPipelines = []; + for (var i = 0; i < object.deliveryPipelines.length; ++i) { + if (typeof object.deliveryPipelines[i] !== "object") + throw TypeError(".google.cloud.deploy.v1.ListDeliveryPipelinesResponse.deliveryPipelines: object expected"); + message.deliveryPipelines[i] = $root.google.cloud.deploy.v1.DeliveryPipeline.fromObject(object.deliveryPipelines[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.deploy.v1.ListDeliveryPipelinesResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListDeliveryPipelinesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesResponse + * @static + * @param {google.cloud.deploy.v1.ListDeliveryPipelinesResponse} message ListDeliveryPipelinesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDeliveryPipelinesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.deliveryPipelines = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.deliveryPipelines && message.deliveryPipelines.length) { + object.deliveryPipelines = []; + for (var j = 0; j < message.deliveryPipelines.length; ++j) + object.deliveryPipelines[j] = $root.google.cloud.deploy.v1.DeliveryPipeline.toObject(message.deliveryPipelines[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListDeliveryPipelinesResponse to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesResponse + * @instance + * @returns {Object.} JSON object + */ + ListDeliveryPipelinesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListDeliveryPipelinesResponse; + })(); + + v1.GetDeliveryPipelineRequest = (function() { + + /** + * Properties of a GetDeliveryPipelineRequest. + * @memberof google.cloud.deploy.v1 + * @interface IGetDeliveryPipelineRequest + * @property {string|null} [name] GetDeliveryPipelineRequest name + */ + + /** + * Constructs a new GetDeliveryPipelineRequest. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a GetDeliveryPipelineRequest. + * @implements IGetDeliveryPipelineRequest + * @constructor + * @param {google.cloud.deploy.v1.IGetDeliveryPipelineRequest=} [properties] Properties to set + */ + function GetDeliveryPipelineRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDeliveryPipelineRequest name. + * @member {string} name + * @memberof google.cloud.deploy.v1.GetDeliveryPipelineRequest + * @instance + */ + GetDeliveryPipelineRequest.prototype.name = ""; + + /** + * Creates a new GetDeliveryPipelineRequest instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.GetDeliveryPipelineRequest + * @static + * @param {google.cloud.deploy.v1.IGetDeliveryPipelineRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.GetDeliveryPipelineRequest} GetDeliveryPipelineRequest instance + */ + GetDeliveryPipelineRequest.create = function create(properties) { + return new GetDeliveryPipelineRequest(properties); + }; + + /** + * Encodes the specified GetDeliveryPipelineRequest message. Does not implicitly {@link google.cloud.deploy.v1.GetDeliveryPipelineRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.GetDeliveryPipelineRequest + * @static + * @param {google.cloud.deploy.v1.IGetDeliveryPipelineRequest} message GetDeliveryPipelineRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDeliveryPipelineRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetDeliveryPipelineRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GetDeliveryPipelineRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.GetDeliveryPipelineRequest + * @static + * @param {google.cloud.deploy.v1.IGetDeliveryPipelineRequest} message GetDeliveryPipelineRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDeliveryPipelineRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDeliveryPipelineRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.GetDeliveryPipelineRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.GetDeliveryPipelineRequest} GetDeliveryPipelineRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDeliveryPipelineRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.GetDeliveryPipelineRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetDeliveryPipelineRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.GetDeliveryPipelineRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.GetDeliveryPipelineRequest} GetDeliveryPipelineRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDeliveryPipelineRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDeliveryPipelineRequest message. + * @function verify + * @memberof google.cloud.deploy.v1.GetDeliveryPipelineRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDeliveryPipelineRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetDeliveryPipelineRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.GetDeliveryPipelineRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.GetDeliveryPipelineRequest} GetDeliveryPipelineRequest + */ + GetDeliveryPipelineRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.GetDeliveryPipelineRequest) + return object; + var message = new $root.google.cloud.deploy.v1.GetDeliveryPipelineRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetDeliveryPipelineRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.GetDeliveryPipelineRequest + * @static + * @param {google.cloud.deploy.v1.GetDeliveryPipelineRequest} message GetDeliveryPipelineRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDeliveryPipelineRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetDeliveryPipelineRequest to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.GetDeliveryPipelineRequest + * @instance + * @returns {Object.} JSON object + */ + GetDeliveryPipelineRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetDeliveryPipelineRequest; + })(); + + v1.CreateDeliveryPipelineRequest = (function() { + + /** + * Properties of a CreateDeliveryPipelineRequest. + * @memberof google.cloud.deploy.v1 + * @interface ICreateDeliveryPipelineRequest + * @property {string|null} [parent] CreateDeliveryPipelineRequest parent + * @property {string|null} [deliveryPipelineId] CreateDeliveryPipelineRequest deliveryPipelineId + * @property {google.cloud.deploy.v1.IDeliveryPipeline|null} [deliveryPipeline] CreateDeliveryPipelineRequest deliveryPipeline + * @property {string|null} [requestId] CreateDeliveryPipelineRequest requestId + * @property {boolean|null} [validateOnly] CreateDeliveryPipelineRequest validateOnly + */ + + /** + * Constructs a new CreateDeliveryPipelineRequest. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a CreateDeliveryPipelineRequest. + * @implements ICreateDeliveryPipelineRequest + * @constructor + * @param {google.cloud.deploy.v1.ICreateDeliveryPipelineRequest=} [properties] Properties to set + */ + function CreateDeliveryPipelineRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateDeliveryPipelineRequest parent. + * @member {string} parent + * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest + * @instance + */ + CreateDeliveryPipelineRequest.prototype.parent = ""; + + /** + * CreateDeliveryPipelineRequest deliveryPipelineId. + * @member {string} deliveryPipelineId + * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest + * @instance + */ + CreateDeliveryPipelineRequest.prototype.deliveryPipelineId = ""; + + /** + * CreateDeliveryPipelineRequest deliveryPipeline. + * @member {google.cloud.deploy.v1.IDeliveryPipeline|null|undefined} deliveryPipeline + * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest + * @instance + */ + CreateDeliveryPipelineRequest.prototype.deliveryPipeline = null; + + /** + * CreateDeliveryPipelineRequest requestId. + * @member {string} requestId + * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest + * @instance + */ + CreateDeliveryPipelineRequest.prototype.requestId = ""; + + /** + * CreateDeliveryPipelineRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest + * @instance + */ + CreateDeliveryPipelineRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateDeliveryPipelineRequest instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest + * @static + * @param {google.cloud.deploy.v1.ICreateDeliveryPipelineRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.CreateDeliveryPipelineRequest} CreateDeliveryPipelineRequest instance + */ + CreateDeliveryPipelineRequest.create = function create(properties) { + return new CreateDeliveryPipelineRequest(properties); + }; + + /** + * Encodes the specified CreateDeliveryPipelineRequest message. Does not implicitly {@link google.cloud.deploy.v1.CreateDeliveryPipelineRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest + * @static + * @param {google.cloud.deploy.v1.ICreateDeliveryPipelineRequest} message CreateDeliveryPipelineRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDeliveryPipelineRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.deliveryPipelineId != null && Object.hasOwnProperty.call(message, "deliveryPipelineId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.deliveryPipelineId); + if (message.deliveryPipeline != null && Object.hasOwnProperty.call(message, "deliveryPipeline")) + $root.google.cloud.deploy.v1.DeliveryPipeline.encode(message.deliveryPipeline, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreateDeliveryPipelineRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CreateDeliveryPipelineRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest + * @static + * @param {google.cloud.deploy.v1.ICreateDeliveryPipelineRequest} message CreateDeliveryPipelineRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDeliveryPipelineRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateDeliveryPipelineRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.CreateDeliveryPipelineRequest} CreateDeliveryPipelineRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDeliveryPipelineRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.CreateDeliveryPipelineRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.deliveryPipelineId = reader.string(); + break; + case 3: + message.deliveryPipeline = $root.google.cloud.deploy.v1.DeliveryPipeline.decode(reader, reader.uint32()); + break; + case 4: + message.requestId = reader.string(); + break; + case 5: + message.validateOnly = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateDeliveryPipelineRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.CreateDeliveryPipelineRequest} CreateDeliveryPipelineRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDeliveryPipelineRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateDeliveryPipelineRequest message. + * @function verify + * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateDeliveryPipelineRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.deliveryPipelineId != null && message.hasOwnProperty("deliveryPipelineId")) + if (!$util.isString(message.deliveryPipelineId)) + return "deliveryPipelineId: string expected"; + if (message.deliveryPipeline != null && message.hasOwnProperty("deliveryPipeline")) { + var error = $root.google.cloud.deploy.v1.DeliveryPipeline.verify(message.deliveryPipeline); + if (error) + return "deliveryPipeline." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateDeliveryPipelineRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.CreateDeliveryPipelineRequest} CreateDeliveryPipelineRequest + */ + CreateDeliveryPipelineRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.CreateDeliveryPipelineRequest) + return object; + var message = new $root.google.cloud.deploy.v1.CreateDeliveryPipelineRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.deliveryPipelineId != null) + message.deliveryPipelineId = String(object.deliveryPipelineId); + if (object.deliveryPipeline != null) { + if (typeof object.deliveryPipeline !== "object") + throw TypeError(".google.cloud.deploy.v1.CreateDeliveryPipelineRequest.deliveryPipeline: object expected"); + message.deliveryPipeline = $root.google.cloud.deploy.v1.DeliveryPipeline.fromObject(object.deliveryPipeline); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateDeliveryPipelineRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest + * @static + * @param {google.cloud.deploy.v1.CreateDeliveryPipelineRequest} message CreateDeliveryPipelineRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateDeliveryPipelineRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.deliveryPipelineId = ""; + object.deliveryPipeline = null; + object.requestId = ""; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.deliveryPipelineId != null && message.hasOwnProperty("deliveryPipelineId")) + object.deliveryPipelineId = message.deliveryPipelineId; + if (message.deliveryPipeline != null && message.hasOwnProperty("deliveryPipeline")) + object.deliveryPipeline = $root.google.cloud.deploy.v1.DeliveryPipeline.toObject(message.deliveryPipeline, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateDeliveryPipelineRequest to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest + * @instance + * @returns {Object.} JSON object + */ + CreateDeliveryPipelineRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateDeliveryPipelineRequest; + })(); + + v1.UpdateDeliveryPipelineRequest = (function() { + + /** + * Properties of an UpdateDeliveryPipelineRequest. + * @memberof google.cloud.deploy.v1 + * @interface IUpdateDeliveryPipelineRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDeliveryPipelineRequest updateMask + * @property {google.cloud.deploy.v1.IDeliveryPipeline|null} [deliveryPipeline] UpdateDeliveryPipelineRequest deliveryPipeline + * @property {string|null} [requestId] UpdateDeliveryPipelineRequest requestId + * @property {boolean|null} [allowMissing] UpdateDeliveryPipelineRequest allowMissing + * @property {boolean|null} [validateOnly] UpdateDeliveryPipelineRequest validateOnly + */ + + /** + * Constructs a new UpdateDeliveryPipelineRequest. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents an UpdateDeliveryPipelineRequest. + * @implements IUpdateDeliveryPipelineRequest + * @constructor + * @param {google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest=} [properties] Properties to set + */ + function UpdateDeliveryPipelineRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateDeliveryPipelineRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest + * @instance + */ + UpdateDeliveryPipelineRequest.prototype.updateMask = null; + + /** + * UpdateDeliveryPipelineRequest deliveryPipeline. + * @member {google.cloud.deploy.v1.IDeliveryPipeline|null|undefined} deliveryPipeline + * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest + * @instance + */ + UpdateDeliveryPipelineRequest.prototype.deliveryPipeline = null; + + /** + * UpdateDeliveryPipelineRequest requestId. + * @member {string} requestId + * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest + * @instance + */ + UpdateDeliveryPipelineRequest.prototype.requestId = ""; + + /** + * UpdateDeliveryPipelineRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest + * @instance + */ + UpdateDeliveryPipelineRequest.prototype.allowMissing = false; + + /** + * UpdateDeliveryPipelineRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest + * @instance + */ + UpdateDeliveryPipelineRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateDeliveryPipelineRequest instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest + * @static + * @param {google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.UpdateDeliveryPipelineRequest} UpdateDeliveryPipelineRequest instance + */ + UpdateDeliveryPipelineRequest.create = function create(properties) { + return new UpdateDeliveryPipelineRequest(properties); + }; + + /** + * Encodes the specified UpdateDeliveryPipelineRequest message. Does not implicitly {@link google.cloud.deploy.v1.UpdateDeliveryPipelineRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest + * @static + * @param {google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest} message UpdateDeliveryPipelineRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDeliveryPipelineRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.deliveryPipeline != null && Object.hasOwnProperty.call(message, "deliveryPipeline")) + $root.google.cloud.deploy.v1.DeliveryPipeline.encode(message.deliveryPipeline, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.allowMissing); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified UpdateDeliveryPipelineRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.UpdateDeliveryPipelineRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest + * @static + * @param {google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest} message UpdateDeliveryPipelineRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDeliveryPipelineRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateDeliveryPipelineRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.UpdateDeliveryPipelineRequest} UpdateDeliveryPipelineRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDeliveryPipelineRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 2: + message.deliveryPipeline = $root.google.cloud.deploy.v1.DeliveryPipeline.decode(reader, reader.uint32()); + break; + case 3: + message.requestId = reader.string(); + break; + case 4: + message.allowMissing = reader.bool(); + break; + case 5: + message.validateOnly = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateDeliveryPipelineRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.UpdateDeliveryPipelineRequest} UpdateDeliveryPipelineRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDeliveryPipelineRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateDeliveryPipelineRequest message. + * @function verify + * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateDeliveryPipelineRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.deliveryPipeline != null && message.hasOwnProperty("deliveryPipeline")) { + var error = $root.google.cloud.deploy.v1.DeliveryPipeline.verify(message.deliveryPipeline); + if (error) + return "deliveryPipeline." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates an UpdateDeliveryPipelineRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.UpdateDeliveryPipelineRequest} UpdateDeliveryPipelineRequest + */ + UpdateDeliveryPipelineRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest) + return object; + var message = new $root.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.deploy.v1.UpdateDeliveryPipelineRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.deliveryPipeline != null) { + if (typeof object.deliveryPipeline !== "object") + throw TypeError(".google.cloud.deploy.v1.UpdateDeliveryPipelineRequest.deliveryPipeline: object expected"); + message.deliveryPipeline = $root.google.cloud.deploy.v1.DeliveryPipeline.fromObject(object.deliveryPipeline); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from an UpdateDeliveryPipelineRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest + * @static + * @param {google.cloud.deploy.v1.UpdateDeliveryPipelineRequest} message UpdateDeliveryPipelineRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateDeliveryPipelineRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.deliveryPipeline = null; + object.requestId = ""; + object.allowMissing = false; + object.validateOnly = false; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.deliveryPipeline != null && message.hasOwnProperty("deliveryPipeline")) + object.deliveryPipeline = $root.google.cloud.deploy.v1.DeliveryPipeline.toObject(message.deliveryPipeline, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this UpdateDeliveryPipelineRequest to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateDeliveryPipelineRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateDeliveryPipelineRequest; + })(); + + v1.DeleteDeliveryPipelineRequest = (function() { + + /** + * Properties of a DeleteDeliveryPipelineRequest. + * @memberof google.cloud.deploy.v1 + * @interface IDeleteDeliveryPipelineRequest + * @property {string|null} [name] DeleteDeliveryPipelineRequest name + * @property {string|null} [requestId] DeleteDeliveryPipelineRequest requestId + * @property {boolean|null} [allowMissing] DeleteDeliveryPipelineRequest allowMissing + * @property {boolean|null} [validateOnly] DeleteDeliveryPipelineRequest validateOnly + * @property {boolean|null} [force] DeleteDeliveryPipelineRequest force + * @property {string|null} [etag] DeleteDeliveryPipelineRequest etag + */ + + /** + * Constructs a new DeleteDeliveryPipelineRequest. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a DeleteDeliveryPipelineRequest. + * @implements IDeleteDeliveryPipelineRequest + * @constructor + * @param {google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest=} [properties] Properties to set + */ + function DeleteDeliveryPipelineRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteDeliveryPipelineRequest name. + * @member {string} name + * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest + * @instance + */ + DeleteDeliveryPipelineRequest.prototype.name = ""; + + /** + * DeleteDeliveryPipelineRequest requestId. + * @member {string} requestId + * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest + * @instance + */ + DeleteDeliveryPipelineRequest.prototype.requestId = ""; + + /** + * DeleteDeliveryPipelineRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest + * @instance + */ + DeleteDeliveryPipelineRequest.prototype.allowMissing = false; + + /** + * DeleteDeliveryPipelineRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest + * @instance + */ + DeleteDeliveryPipelineRequest.prototype.validateOnly = false; + + /** + * DeleteDeliveryPipelineRequest force. + * @member {boolean} force + * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest + * @instance + */ + DeleteDeliveryPipelineRequest.prototype.force = false; + + /** + * DeleteDeliveryPipelineRequest etag. + * @member {string} etag + * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest + * @instance + */ + DeleteDeliveryPipelineRequest.prototype.etag = ""; + + /** + * Creates a new DeleteDeliveryPipelineRequest instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest + * @static + * @param {google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.DeleteDeliveryPipelineRequest} DeleteDeliveryPipelineRequest instance + */ + DeleteDeliveryPipelineRequest.create = function create(properties) { + return new DeleteDeliveryPipelineRequest(properties); + }; + + /** + * Encodes the specified DeleteDeliveryPipelineRequest message. Does not implicitly {@link google.cloud.deploy.v1.DeleteDeliveryPipelineRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest + * @static + * @param {google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest} message DeleteDeliveryPipelineRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDeliveryPipelineRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowMissing); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.etag); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.force); + return writer; + }; + + /** + * Encodes the specified DeleteDeliveryPipelineRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeleteDeliveryPipelineRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest + * @static + * @param {google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest} message DeleteDeliveryPipelineRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDeliveryPipelineRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteDeliveryPipelineRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.DeleteDeliveryPipelineRequest} DeleteDeliveryPipelineRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDeliveryPipelineRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.requestId = reader.string(); + break; + case 3: + message.allowMissing = reader.bool(); + break; + case 4: + message.validateOnly = reader.bool(); + break; + case 6: + message.force = reader.bool(); + break; + case 5: + message.etag = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteDeliveryPipelineRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.DeleteDeliveryPipelineRequest} DeleteDeliveryPipelineRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDeliveryPipelineRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteDeliveryPipelineRequest message. + * @function verify + * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteDeliveryPipelineRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; + + /** + * Creates a DeleteDeliveryPipelineRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.DeleteDeliveryPipelineRequest} DeleteDeliveryPipelineRequest + */ + DeleteDeliveryPipelineRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest) + return object; + var message = new $root.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + if (object.force != null) + message.force = Boolean(object.force); + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; + + /** + * Creates a plain object from a DeleteDeliveryPipelineRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest + * @static + * @param {google.cloud.deploy.v1.DeleteDeliveryPipelineRequest} message DeleteDeliveryPipelineRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteDeliveryPipelineRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.requestId = ""; + object.allowMissing = false; + object.validateOnly = false; + object.etag = ""; + object.force = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + return object; + }; + + /** + * Converts this DeleteDeliveryPipelineRequest to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteDeliveryPipelineRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteDeliveryPipelineRequest; + })(); + + v1.Target = (function() { + + /** + * Properties of a Target. + * @memberof google.cloud.deploy.v1 + * @interface ITarget + * @property {string|null} [name] Target name + * @property {string|null} [targetId] Target targetId + * @property {string|null} [uid] Target uid + * @property {string|null} [description] Target description + * @property {Object.|null} [annotations] Target annotations + * @property {Object.|null} [labels] Target labels + * @property {boolean|null} [requireApproval] Target requireApproval + * @property {google.protobuf.ITimestamp|null} [createTime] Target createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Target updateTime + * @property {google.cloud.deploy.v1.IGkeCluster|null} [gke] Target gke + * @property {string|null} [etag] Target etag + * @property {Array.|null} [executionConfigs] Target executionConfigs + */ + + /** + * Constructs a new Target. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a Target. + * @implements ITarget + * @constructor + * @param {google.cloud.deploy.v1.ITarget=} [properties] Properties to set + */ + function Target(properties) { + this.annotations = {}; + this.labels = {}; + this.executionConfigs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Target name. + * @member {string} name + * @memberof google.cloud.deploy.v1.Target + * @instance + */ + Target.prototype.name = ""; + + /** + * Target targetId. + * @member {string} targetId + * @memberof google.cloud.deploy.v1.Target + * @instance + */ + Target.prototype.targetId = ""; + + /** + * Target uid. + * @member {string} uid + * @memberof google.cloud.deploy.v1.Target + * @instance + */ + Target.prototype.uid = ""; + + /** + * Target description. + * @member {string} description + * @memberof google.cloud.deploy.v1.Target + * @instance + */ + Target.prototype.description = ""; + + /** + * Target annotations. + * @member {Object.} annotations + * @memberof google.cloud.deploy.v1.Target + * @instance + */ + Target.prototype.annotations = $util.emptyObject; + + /** + * Target labels. + * @member {Object.} labels + * @memberof google.cloud.deploy.v1.Target + * @instance + */ + Target.prototype.labels = $util.emptyObject; + + /** + * Target requireApproval. + * @member {boolean} requireApproval + * @memberof google.cloud.deploy.v1.Target + * @instance + */ + Target.prototype.requireApproval = false; + + /** + * Target createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.deploy.v1.Target + * @instance + */ + Target.prototype.createTime = null; + + /** + * Target updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.deploy.v1.Target + * @instance + */ + Target.prototype.updateTime = null; + + /** + * Target gke. + * @member {google.cloud.deploy.v1.IGkeCluster|null|undefined} gke + * @memberof google.cloud.deploy.v1.Target + * @instance + */ + Target.prototype.gke = null; + + /** + * Target etag. + * @member {string} etag + * @memberof google.cloud.deploy.v1.Target + * @instance + */ + Target.prototype.etag = ""; + + /** + * Target executionConfigs. + * @member {Array.} executionConfigs + * @memberof google.cloud.deploy.v1.Target + * @instance + */ + Target.prototype.executionConfigs = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Target deploymentTarget. + * @member {"gke"|undefined} deploymentTarget + * @memberof google.cloud.deploy.v1.Target + * @instance + */ + Object.defineProperty(Target.prototype, "deploymentTarget", { + get: $util.oneOfGetter($oneOfFields = ["gke"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Target instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.Target + * @static + * @param {google.cloud.deploy.v1.ITarget=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.Target} Target instance + */ + Target.create = function create(properties) { + return new Target(properties); + }; + + /** + * Encodes the specified Target message. Does not implicitly {@link google.cloud.deploy.v1.Target.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.Target + * @static + * @param {google.cloud.deploy.v1.ITarget} message Target message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Target.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.targetId != null && Object.hasOwnProperty.call(message, "targetId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.targetId); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.uid); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); + if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) + for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.etag); + if (message.requireApproval != null && Object.hasOwnProperty.call(message, "requireApproval")) + writer.uint32(/* id 13, wireType 0 =*/104).bool(message.requireApproval); + if (message.gke != null && Object.hasOwnProperty.call(message, "gke")) + $root.google.cloud.deploy.v1.GkeCluster.encode(message.gke, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.executionConfigs != null && message.executionConfigs.length) + for (var i = 0; i < message.executionConfigs.length; ++i) + $root.google.cloud.deploy.v1.ExecutionConfig.encode(message.executionConfigs[i], writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Target message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Target.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.Target + * @static + * @param {google.cloud.deploy.v1.ITarget} message Target message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Target.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Target message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.Target + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.Target} Target + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Target.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Target(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.targetId = reader.string(); + break; + case 3: + message.uid = reader.string(); + break; + case 4: + message.description = reader.string(); + break; + case 5: + if (message.annotations === $util.emptyObject) + message.annotations = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.annotations[key] = value; + break; + case 6: + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + case 13: + message.requireApproval = reader.bool(); + break; + case 8: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 9: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 15: + message.gke = $root.google.cloud.deploy.v1.GkeCluster.decode(reader, reader.uint32()); + break; + case 12: + message.etag = reader.string(); + break; + case 16: + if (!(message.executionConfigs && message.executionConfigs.length)) + message.executionConfigs = []; + message.executionConfigs.push($root.google.cloud.deploy.v1.ExecutionConfig.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Target message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.Target + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.Target} Target + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Target.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Target message. + * @function verify + * @memberof google.cloud.deploy.v1.Target + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Target.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.targetId != null && message.hasOwnProperty("targetId")) + if (!$util.isString(message.targetId)) + return "targetId: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.annotations != null && message.hasOwnProperty("annotations")) { + if (!$util.isObject(message.annotations)) + return "annotations: object expected"; + var key = Object.keys(message.annotations); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.annotations[key[i]])) + return "annotations: string{k:string} expected"; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.requireApproval != null && message.hasOwnProperty("requireApproval")) + if (typeof message.requireApproval !== "boolean") + return "requireApproval: boolean expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.gke != null && message.hasOwnProperty("gke")) { + properties.deploymentTarget = 1; + { + var error = $root.google.cloud.deploy.v1.GkeCluster.verify(message.gke); + if (error) + return "gke." + error; + } + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.executionConfigs != null && message.hasOwnProperty("executionConfigs")) { + if (!Array.isArray(message.executionConfigs)) + return "executionConfigs: array expected"; + for (var i = 0; i < message.executionConfigs.length; ++i) { + var error = $root.google.cloud.deploy.v1.ExecutionConfig.verify(message.executionConfigs[i]); + if (error) + return "executionConfigs." + error; + } + } + return null; + }; + + /** + * Creates a Target message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.Target + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.Target} Target + */ + Target.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.Target) + return object; + var message = new $root.google.cloud.deploy.v1.Target(); + if (object.name != null) + message.name = String(object.name); + if (object.targetId != null) + message.targetId = String(object.targetId); + if (object.uid != null) + message.uid = String(object.uid); + if (object.description != null) + message.description = String(object.description); + if (object.annotations) { + if (typeof object.annotations !== "object") + throw TypeError(".google.cloud.deploy.v1.Target.annotations: object expected"); + message.annotations = {}; + for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) + message.annotations[keys[i]] = String(object.annotations[keys[i]]); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.deploy.v1.Target.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.requireApproval != null) + message.requireApproval = Boolean(object.requireApproval); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.deploy.v1.Target.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.deploy.v1.Target.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.gke != null) { + if (typeof object.gke !== "object") + throw TypeError(".google.cloud.deploy.v1.Target.gke: object expected"); + message.gke = $root.google.cloud.deploy.v1.GkeCluster.fromObject(object.gke); + } + if (object.etag != null) + message.etag = String(object.etag); + if (object.executionConfigs) { + if (!Array.isArray(object.executionConfigs)) + throw TypeError(".google.cloud.deploy.v1.Target.executionConfigs: array expected"); + message.executionConfigs = []; + for (var i = 0; i < object.executionConfigs.length; ++i) { + if (typeof object.executionConfigs[i] !== "object") + throw TypeError(".google.cloud.deploy.v1.Target.executionConfigs: object expected"); + message.executionConfigs[i] = $root.google.cloud.deploy.v1.ExecutionConfig.fromObject(object.executionConfigs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Target message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.Target + * @static + * @param {google.cloud.deploy.v1.Target} message Target + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Target.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.executionConfigs = []; + if (options.objects || options.defaults) { + object.annotations = {}; + object.labels = {}; + } + if (options.defaults) { + object.name = ""; + object.targetId = ""; + object.uid = ""; + object.description = ""; + object.createTime = null; + object.updateTime = null; + object.etag = ""; + object.requireApproval = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.targetId != null && message.hasOwnProperty("targetId")) + object.targetId = message.targetId; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + var keys2; + if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { + object.annotations = {}; + for (var j = 0; j < keys2.length; ++j) + object.annotations[keys2[j]] = message.annotations[keys2[j]]; + } + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.requireApproval != null && message.hasOwnProperty("requireApproval")) + object.requireApproval = message.requireApproval; + if (message.gke != null && message.hasOwnProperty("gke")) { + object.gke = $root.google.cloud.deploy.v1.GkeCluster.toObject(message.gke, options); + if (options.oneofs) + object.deploymentTarget = "gke"; + } + if (message.executionConfigs && message.executionConfigs.length) { + object.executionConfigs = []; + for (var j = 0; j < message.executionConfigs.length; ++j) + object.executionConfigs[j] = $root.google.cloud.deploy.v1.ExecutionConfig.toObject(message.executionConfigs[j], options); + } + return object; + }; + + /** + * Converts this Target to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.Target + * @instance + * @returns {Object.} JSON object + */ + Target.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Target; + })(); + + v1.ExecutionConfig = (function() { + + /** + * Properties of an ExecutionConfig. + * @memberof google.cloud.deploy.v1 + * @interface IExecutionConfig + * @property {Array.|null} [usages] ExecutionConfig usages + * @property {google.cloud.deploy.v1.IDefaultPool|null} [defaultPool] ExecutionConfig defaultPool + * @property {google.cloud.deploy.v1.IPrivatePool|null} [privatePool] ExecutionConfig privatePool + */ + + /** + * Constructs a new ExecutionConfig. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents an ExecutionConfig. + * @implements IExecutionConfig + * @constructor + * @param {google.cloud.deploy.v1.IExecutionConfig=} [properties] Properties to set + */ + function ExecutionConfig(properties) { + this.usages = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExecutionConfig usages. + * @member {Array.} usages + * @memberof google.cloud.deploy.v1.ExecutionConfig + * @instance + */ + ExecutionConfig.prototype.usages = $util.emptyArray; + + /** + * ExecutionConfig defaultPool. + * @member {google.cloud.deploy.v1.IDefaultPool|null|undefined} defaultPool + * @memberof google.cloud.deploy.v1.ExecutionConfig + * @instance + */ + ExecutionConfig.prototype.defaultPool = null; + + /** + * ExecutionConfig privatePool. + * @member {google.cloud.deploy.v1.IPrivatePool|null|undefined} privatePool + * @memberof google.cloud.deploy.v1.ExecutionConfig + * @instance + */ + ExecutionConfig.prototype.privatePool = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ExecutionConfig executionEnvironment. + * @member {"defaultPool"|"privatePool"|undefined} executionEnvironment + * @memberof google.cloud.deploy.v1.ExecutionConfig + * @instance + */ + Object.defineProperty(ExecutionConfig.prototype, "executionEnvironment", { + get: $util.oneOfGetter($oneOfFields = ["defaultPool", "privatePool"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ExecutionConfig instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.ExecutionConfig + * @static + * @param {google.cloud.deploy.v1.IExecutionConfig=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ExecutionConfig} ExecutionConfig instance + */ + ExecutionConfig.create = function create(properties) { + return new ExecutionConfig(properties); + }; + + /** + * Encodes the specified ExecutionConfig message. Does not implicitly {@link google.cloud.deploy.v1.ExecutionConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.ExecutionConfig + * @static + * @param {google.cloud.deploy.v1.IExecutionConfig} message ExecutionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecutionConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.usages != null && message.usages.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.usages.length; ++i) + writer.int32(message.usages[i]); + writer.ldelim(); + } + if (message.defaultPool != null && Object.hasOwnProperty.call(message, "defaultPool")) + $root.google.cloud.deploy.v1.DefaultPool.encode(message.defaultPool, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.privatePool != null && Object.hasOwnProperty.call(message, "privatePool")) + $root.google.cloud.deploy.v1.PrivatePool.encode(message.privatePool, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExecutionConfig message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ExecutionConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.ExecutionConfig + * @static + * @param {google.cloud.deploy.v1.IExecutionConfig} message ExecutionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecutionConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExecutionConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.ExecutionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.ExecutionConfig} ExecutionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecutionConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ExecutionConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.usages && message.usages.length)) + message.usages = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.usages.push(reader.int32()); + } else + message.usages.push(reader.int32()); + break; + case 2: + message.defaultPool = $root.google.cloud.deploy.v1.DefaultPool.decode(reader, reader.uint32()); + break; + case 3: + message.privatePool = $root.google.cloud.deploy.v1.PrivatePool.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExecutionConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.ExecutionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.ExecutionConfig} ExecutionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecutionConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExecutionConfig message. + * @function verify + * @memberof google.cloud.deploy.v1.ExecutionConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecutionConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.usages != null && message.hasOwnProperty("usages")) { + if (!Array.isArray(message.usages)) + return "usages: array expected"; + for (var i = 0; i < message.usages.length; ++i) + switch (message.usages[i]) { + default: + return "usages: enum value[] expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.defaultPool != null && message.hasOwnProperty("defaultPool")) { + properties.executionEnvironment = 1; + { + var error = $root.google.cloud.deploy.v1.DefaultPool.verify(message.defaultPool); + if (error) + return "defaultPool." + error; + } + } + if (message.privatePool != null && message.hasOwnProperty("privatePool")) { + if (properties.executionEnvironment === 1) + return "executionEnvironment: multiple values"; + properties.executionEnvironment = 1; + { + var error = $root.google.cloud.deploy.v1.PrivatePool.verify(message.privatePool); + if (error) + return "privatePool." + error; + } + } + return null; + }; + + /** + * Creates an ExecutionConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.ExecutionConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.ExecutionConfig} ExecutionConfig + */ + ExecutionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ExecutionConfig) + return object; + var message = new $root.google.cloud.deploy.v1.ExecutionConfig(); + if (object.usages) { + if (!Array.isArray(object.usages)) + throw TypeError(".google.cloud.deploy.v1.ExecutionConfig.usages: array expected"); + message.usages = []; + for (var i = 0; i < object.usages.length; ++i) + switch (object.usages[i]) { + default: + case "EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED": + case 0: + message.usages[i] = 0; + break; + case "RENDER": + case 1: + message.usages[i] = 1; + break; + case "DEPLOY": + case 2: + message.usages[i] = 2; + break; + } + } + if (object.defaultPool != null) { + if (typeof object.defaultPool !== "object") + throw TypeError(".google.cloud.deploy.v1.ExecutionConfig.defaultPool: object expected"); + message.defaultPool = $root.google.cloud.deploy.v1.DefaultPool.fromObject(object.defaultPool); + } + if (object.privatePool != null) { + if (typeof object.privatePool !== "object") + throw TypeError(".google.cloud.deploy.v1.ExecutionConfig.privatePool: object expected"); + message.privatePool = $root.google.cloud.deploy.v1.PrivatePool.fromObject(object.privatePool); + } + return message; + }; + + /** + * Creates a plain object from an ExecutionConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.ExecutionConfig + * @static + * @param {google.cloud.deploy.v1.ExecutionConfig} message ExecutionConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecutionConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.usages = []; + if (message.usages && message.usages.length) { + object.usages = []; + for (var j = 0; j < message.usages.length; ++j) + object.usages[j] = options.enums === String ? $root.google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage[message.usages[j]] : message.usages[j]; + } + if (message.defaultPool != null && message.hasOwnProperty("defaultPool")) { + object.defaultPool = $root.google.cloud.deploy.v1.DefaultPool.toObject(message.defaultPool, options); + if (options.oneofs) + object.executionEnvironment = "defaultPool"; + } + if (message.privatePool != null && message.hasOwnProperty("privatePool")) { + object.privatePool = $root.google.cloud.deploy.v1.PrivatePool.toObject(message.privatePool, options); + if (options.oneofs) + object.executionEnvironment = "privatePool"; + } + return object; + }; + + /** + * Converts this ExecutionConfig to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.ExecutionConfig + * @instance + * @returns {Object.} JSON object + */ + ExecutionConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * ExecutionEnvironmentUsage enum. + * @name google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage + * @enum {number} + * @property {number} EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED=0 EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED value + * @property {number} RENDER=1 RENDER value + * @property {number} DEPLOY=2 DEPLOY value + */ + ExecutionConfig.ExecutionEnvironmentUsage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RENDER"] = 1; + values[valuesById[2] = "DEPLOY"] = 2; + return values; + })(); + + return ExecutionConfig; + })(); + + v1.DefaultPool = (function() { + + /** + * Properties of a DefaultPool. + * @memberof google.cloud.deploy.v1 + * @interface IDefaultPool + * @property {string|null} [serviceAccount] DefaultPool serviceAccount + * @property {string|null} [artifactStorage] DefaultPool artifactStorage + */ + + /** + * Constructs a new DefaultPool. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a DefaultPool. + * @implements IDefaultPool + * @constructor + * @param {google.cloud.deploy.v1.IDefaultPool=} [properties] Properties to set + */ + function DefaultPool(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DefaultPool serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.deploy.v1.DefaultPool + * @instance + */ + DefaultPool.prototype.serviceAccount = ""; + + /** + * DefaultPool artifactStorage. + * @member {string} artifactStorage + * @memberof google.cloud.deploy.v1.DefaultPool + * @instance + */ + DefaultPool.prototype.artifactStorage = ""; + + /** + * Creates a new DefaultPool instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.DefaultPool + * @static + * @param {google.cloud.deploy.v1.IDefaultPool=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.DefaultPool} DefaultPool instance + */ + DefaultPool.create = function create(properties) { + return new DefaultPool(properties); + }; + + /** + * Encodes the specified DefaultPool message. Does not implicitly {@link google.cloud.deploy.v1.DefaultPool.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.DefaultPool + * @static + * @param {google.cloud.deploy.v1.IDefaultPool} message DefaultPool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DefaultPool.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.serviceAccount); + if (message.artifactStorage != null && Object.hasOwnProperty.call(message, "artifactStorage")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.artifactStorage); + return writer; + }; + + /** + * Encodes the specified DefaultPool message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DefaultPool.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.DefaultPool + * @static + * @param {google.cloud.deploy.v1.IDefaultPool} message DefaultPool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DefaultPool.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DefaultPool message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.DefaultPool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.DefaultPool} DefaultPool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DefaultPool.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.DefaultPool(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.serviceAccount = reader.string(); + break; + case 2: + message.artifactStorage = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DefaultPool message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.DefaultPool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.DefaultPool} DefaultPool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DefaultPool.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DefaultPool message. + * @function verify + * @memberof google.cloud.deploy.v1.DefaultPool + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DefaultPool.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.artifactStorage != null && message.hasOwnProperty("artifactStorage")) + if (!$util.isString(message.artifactStorage)) + return "artifactStorage: string expected"; + return null; + }; + + /** + * Creates a DefaultPool message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.DefaultPool + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.DefaultPool} DefaultPool + */ + DefaultPool.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.DefaultPool) + return object; + var message = new $root.google.cloud.deploy.v1.DefaultPool(); + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.artifactStorage != null) + message.artifactStorage = String(object.artifactStorage); + return message; + }; + + /** + * Creates a plain object from a DefaultPool message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.DefaultPool + * @static + * @param {google.cloud.deploy.v1.DefaultPool} message DefaultPool + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DefaultPool.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.serviceAccount = ""; + object.artifactStorage = ""; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.artifactStorage != null && message.hasOwnProperty("artifactStorage")) + object.artifactStorage = message.artifactStorage; + return object; + }; + + /** + * Converts this DefaultPool to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.DefaultPool + * @instance + * @returns {Object.} JSON object + */ + DefaultPool.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DefaultPool; + })(); + + v1.PrivatePool = (function() { + + /** + * Properties of a PrivatePool. + * @memberof google.cloud.deploy.v1 + * @interface IPrivatePool + * @property {string|null} [workerPool] PrivatePool workerPool + * @property {string|null} [serviceAccount] PrivatePool serviceAccount + * @property {string|null} [artifactStorage] PrivatePool artifactStorage + */ + + /** + * Constructs a new PrivatePool. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a PrivatePool. + * @implements IPrivatePool + * @constructor + * @param {google.cloud.deploy.v1.IPrivatePool=} [properties] Properties to set + */ + function PrivatePool(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PrivatePool workerPool. + * @member {string} workerPool + * @memberof google.cloud.deploy.v1.PrivatePool + * @instance + */ + PrivatePool.prototype.workerPool = ""; + + /** + * PrivatePool serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.deploy.v1.PrivatePool + * @instance + */ + PrivatePool.prototype.serviceAccount = ""; + + /** + * PrivatePool artifactStorage. + * @member {string} artifactStorage + * @memberof google.cloud.deploy.v1.PrivatePool + * @instance + */ + PrivatePool.prototype.artifactStorage = ""; + + /** + * Creates a new PrivatePool instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.PrivatePool + * @static + * @param {google.cloud.deploy.v1.IPrivatePool=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.PrivatePool} PrivatePool instance + */ + PrivatePool.create = function create(properties) { + return new PrivatePool(properties); + }; + + /** + * Encodes the specified PrivatePool message. Does not implicitly {@link google.cloud.deploy.v1.PrivatePool.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.PrivatePool + * @static + * @param {google.cloud.deploy.v1.IPrivatePool} message PrivatePool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivatePool.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workerPool != null && Object.hasOwnProperty.call(message, "workerPool")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workerPool); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.serviceAccount); + if (message.artifactStorage != null && Object.hasOwnProperty.call(message, "artifactStorage")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.artifactStorage); + return writer; + }; + + /** + * Encodes the specified PrivatePool message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.PrivatePool.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.PrivatePool + * @static + * @param {google.cloud.deploy.v1.IPrivatePool} message PrivatePool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivatePool.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PrivatePool message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.PrivatePool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.PrivatePool} PrivatePool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivatePool.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.PrivatePool(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.workerPool = reader.string(); + break; + case 2: + message.serviceAccount = reader.string(); + break; + case 3: + message.artifactStorage = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PrivatePool message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.PrivatePool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.PrivatePool} PrivatePool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivatePool.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PrivatePool message. + * @function verify + * @memberof google.cloud.deploy.v1.PrivatePool + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PrivatePool.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workerPool != null && message.hasOwnProperty("workerPool")) + if (!$util.isString(message.workerPool)) + return "workerPool: string expected"; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.artifactStorage != null && message.hasOwnProperty("artifactStorage")) + if (!$util.isString(message.artifactStorage)) + return "artifactStorage: string expected"; + return null; + }; + + /** + * Creates a PrivatePool message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.PrivatePool + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.PrivatePool} PrivatePool + */ + PrivatePool.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.PrivatePool) + return object; + var message = new $root.google.cloud.deploy.v1.PrivatePool(); + if (object.workerPool != null) + message.workerPool = String(object.workerPool); + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.artifactStorage != null) + message.artifactStorage = String(object.artifactStorage); + return message; + }; + + /** + * Creates a plain object from a PrivatePool message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.PrivatePool + * @static + * @param {google.cloud.deploy.v1.PrivatePool} message PrivatePool + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PrivatePool.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.workerPool = ""; + object.serviceAccount = ""; + object.artifactStorage = ""; + } + if (message.workerPool != null && message.hasOwnProperty("workerPool")) + object.workerPool = message.workerPool; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.artifactStorage != null && message.hasOwnProperty("artifactStorage")) + object.artifactStorage = message.artifactStorage; + return object; + }; + + /** + * Converts this PrivatePool to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.PrivatePool + * @instance + * @returns {Object.} JSON object + */ + PrivatePool.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PrivatePool; + })(); + + v1.GkeCluster = (function() { + + /** + * Properties of a GkeCluster. + * @memberof google.cloud.deploy.v1 + * @interface IGkeCluster + * @property {string|null} [cluster] GkeCluster cluster + */ + + /** + * Constructs a new GkeCluster. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a GkeCluster. + * @implements IGkeCluster + * @constructor + * @param {google.cloud.deploy.v1.IGkeCluster=} [properties] Properties to set + */ + function GkeCluster(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GkeCluster cluster. + * @member {string} cluster + * @memberof google.cloud.deploy.v1.GkeCluster + * @instance + */ + GkeCluster.prototype.cluster = ""; + + /** + * Creates a new GkeCluster instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.GkeCluster + * @static + * @param {google.cloud.deploy.v1.IGkeCluster=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.GkeCluster} GkeCluster instance + */ + GkeCluster.create = function create(properties) { + return new GkeCluster(properties); + }; + + /** + * Encodes the specified GkeCluster message. Does not implicitly {@link google.cloud.deploy.v1.GkeCluster.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.GkeCluster + * @static + * @param {google.cloud.deploy.v1.IGkeCluster} message GkeCluster message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GkeCluster.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cluster != null && Object.hasOwnProperty.call(message, "cluster")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cluster); + return writer; + }; + + /** + * Encodes the specified GkeCluster message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GkeCluster.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.GkeCluster + * @static + * @param {google.cloud.deploy.v1.IGkeCluster} message GkeCluster message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GkeCluster.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GkeCluster message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.GkeCluster + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.GkeCluster} GkeCluster + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GkeCluster.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.GkeCluster(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.cluster = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GkeCluster message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.GkeCluster + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.GkeCluster} GkeCluster + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GkeCluster.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GkeCluster message. + * @function verify + * @memberof google.cloud.deploy.v1.GkeCluster + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GkeCluster.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cluster != null && message.hasOwnProperty("cluster")) + if (!$util.isString(message.cluster)) + return "cluster: string expected"; + return null; + }; + + /** + * Creates a GkeCluster message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.GkeCluster + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.GkeCluster} GkeCluster + */ + GkeCluster.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.GkeCluster) + return object; + var message = new $root.google.cloud.deploy.v1.GkeCluster(); + if (object.cluster != null) + message.cluster = String(object.cluster); + return message; + }; + + /** + * Creates a plain object from a GkeCluster message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.GkeCluster + * @static + * @param {google.cloud.deploy.v1.GkeCluster} message GkeCluster + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GkeCluster.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.cluster = ""; + if (message.cluster != null && message.hasOwnProperty("cluster")) + object.cluster = message.cluster; + return object; + }; + + /** + * Converts this GkeCluster to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.GkeCluster + * @instance + * @returns {Object.} JSON object + */ + GkeCluster.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GkeCluster; + })(); + + v1.ListTargetsRequest = (function() { + + /** + * Properties of a ListTargetsRequest. + * @memberof google.cloud.deploy.v1 + * @interface IListTargetsRequest + * @property {string|null} [parent] ListTargetsRequest parent + * @property {number|null} [pageSize] ListTargetsRequest pageSize + * @property {string|null} [pageToken] ListTargetsRequest pageToken + * @property {string|null} [filter] ListTargetsRequest filter + * @property {string|null} [orderBy] ListTargetsRequest orderBy + */ + + /** + * Constructs a new ListTargetsRequest. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a ListTargetsRequest. + * @implements IListTargetsRequest + * @constructor + * @param {google.cloud.deploy.v1.IListTargetsRequest=} [properties] Properties to set + */ + function ListTargetsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListTargetsRequest parent. + * @member {string} parent + * @memberof google.cloud.deploy.v1.ListTargetsRequest + * @instance + */ + ListTargetsRequest.prototype.parent = ""; + + /** + * ListTargetsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.deploy.v1.ListTargetsRequest + * @instance + */ + ListTargetsRequest.prototype.pageSize = 0; + + /** + * ListTargetsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.deploy.v1.ListTargetsRequest + * @instance + */ + ListTargetsRequest.prototype.pageToken = ""; + + /** + * ListTargetsRequest filter. + * @member {string} filter + * @memberof google.cloud.deploy.v1.ListTargetsRequest + * @instance + */ + ListTargetsRequest.prototype.filter = ""; + + /** + * ListTargetsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.deploy.v1.ListTargetsRequest + * @instance + */ + ListTargetsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListTargetsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.ListTargetsRequest + * @static + * @param {google.cloud.deploy.v1.IListTargetsRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ListTargetsRequest} ListTargetsRequest instance + */ + ListTargetsRequest.create = function create(properties) { + return new ListTargetsRequest(properties); + }; + + /** + * Encodes the specified ListTargetsRequest message. Does not implicitly {@link google.cloud.deploy.v1.ListTargetsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.ListTargetsRequest + * @static + * @param {google.cloud.deploy.v1.IListTargetsRequest} message ListTargetsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTargetsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListTargetsRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListTargetsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.ListTargetsRequest + * @static + * @param {google.cloud.deploy.v1.IListTargetsRequest} message ListTargetsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTargetsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListTargetsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.ListTargetsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.ListTargetsRequest} ListTargetsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTargetsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListTargetsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 4: + message.filter = reader.string(); + break; + case 5: + message.orderBy = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListTargetsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.ListTargetsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.ListTargetsRequest} ListTargetsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTargetsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListTargetsRequest message. + * @function verify + * @memberof google.cloud.deploy.v1.ListTargetsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListTargetsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListTargetsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.ListTargetsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.ListTargetsRequest} ListTargetsRequest + */ + ListTargetsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ListTargetsRequest) + return object; + var message = new $root.google.cloud.deploy.v1.ListTargetsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListTargetsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.ListTargetsRequest + * @static + * @param {google.cloud.deploy.v1.ListTargetsRequest} message ListTargetsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListTargetsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListTargetsRequest to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.ListTargetsRequest + * @instance + * @returns {Object.} JSON object + */ + ListTargetsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListTargetsRequest; + })(); + + v1.ListTargetsResponse = (function() { + + /** + * Properties of a ListTargetsResponse. + * @memberof google.cloud.deploy.v1 + * @interface IListTargetsResponse + * @property {Array.|null} [targets] ListTargetsResponse targets + * @property {string|null} [nextPageToken] ListTargetsResponse nextPageToken + * @property {Array.|null} [unreachable] ListTargetsResponse unreachable + */ + + /** + * Constructs a new ListTargetsResponse. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a ListTargetsResponse. + * @implements IListTargetsResponse + * @constructor + * @param {google.cloud.deploy.v1.IListTargetsResponse=} [properties] Properties to set + */ + function ListTargetsResponse(properties) { + this.targets = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListTargetsResponse targets. + * @member {Array.} targets + * @memberof google.cloud.deploy.v1.ListTargetsResponse + * @instance + */ + ListTargetsResponse.prototype.targets = $util.emptyArray; + + /** + * ListTargetsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.deploy.v1.ListTargetsResponse + * @instance + */ + ListTargetsResponse.prototype.nextPageToken = ""; + + /** + * ListTargetsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.deploy.v1.ListTargetsResponse + * @instance + */ + ListTargetsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListTargetsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.ListTargetsResponse + * @static + * @param {google.cloud.deploy.v1.IListTargetsResponse=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ListTargetsResponse} ListTargetsResponse instance + */ + ListTargetsResponse.create = function create(properties) { + return new ListTargetsResponse(properties); + }; + + /** + * Encodes the specified ListTargetsResponse message. Does not implicitly {@link google.cloud.deploy.v1.ListTargetsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.ListTargetsResponse + * @static + * @param {google.cloud.deploy.v1.IListTargetsResponse} message ListTargetsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTargetsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.targets != null && message.targets.length) + for (var i = 0; i < message.targets.length; ++i) + $root.google.cloud.deploy.v1.Target.encode(message.targets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListTargetsResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListTargetsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.ListTargetsResponse + * @static + * @param {google.cloud.deploy.v1.IListTargetsResponse} message ListTargetsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTargetsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListTargetsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.ListTargetsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.ListTargetsResponse} ListTargetsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTargetsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListTargetsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.targets && message.targets.length)) + message.targets = []; + message.targets.push($root.google.cloud.deploy.v1.Target.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + case 3: + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListTargetsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.ListTargetsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.ListTargetsResponse} ListTargetsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTargetsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListTargetsResponse message. + * @function verify + * @memberof google.cloud.deploy.v1.ListTargetsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListTargetsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.targets != null && message.hasOwnProperty("targets")) { + if (!Array.isArray(message.targets)) + return "targets: array expected"; + for (var i = 0; i < message.targets.length; ++i) { + var error = $root.google.cloud.deploy.v1.Target.verify(message.targets[i]); + if (error) + return "targets." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListTargetsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.ListTargetsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.ListTargetsResponse} ListTargetsResponse + */ + ListTargetsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ListTargetsResponse) + return object; + var message = new $root.google.cloud.deploy.v1.ListTargetsResponse(); + if (object.targets) { + if (!Array.isArray(object.targets)) + throw TypeError(".google.cloud.deploy.v1.ListTargetsResponse.targets: array expected"); + message.targets = []; + for (var i = 0; i < object.targets.length; ++i) { + if (typeof object.targets[i] !== "object") + throw TypeError(".google.cloud.deploy.v1.ListTargetsResponse.targets: object expected"); + message.targets[i] = $root.google.cloud.deploy.v1.Target.fromObject(object.targets[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.deploy.v1.ListTargetsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListTargetsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.ListTargetsResponse + * @static + * @param {google.cloud.deploy.v1.ListTargetsResponse} message ListTargetsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListTargetsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.targets = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.targets && message.targets.length) { + object.targets = []; + for (var j = 0; j < message.targets.length; ++j) + object.targets[j] = $root.google.cloud.deploy.v1.Target.toObject(message.targets[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListTargetsResponse to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.ListTargetsResponse + * @instance + * @returns {Object.} JSON object + */ + ListTargetsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListTargetsResponse; + })(); + + v1.GetTargetRequest = (function() { + + /** + * Properties of a GetTargetRequest. + * @memberof google.cloud.deploy.v1 + * @interface IGetTargetRequest + * @property {string|null} [name] GetTargetRequest name + */ + + /** + * Constructs a new GetTargetRequest. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a GetTargetRequest. + * @implements IGetTargetRequest + * @constructor + * @param {google.cloud.deploy.v1.IGetTargetRequest=} [properties] Properties to set + */ + function GetTargetRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetTargetRequest name. + * @member {string} name + * @memberof google.cloud.deploy.v1.GetTargetRequest + * @instance + */ + GetTargetRequest.prototype.name = ""; + + /** + * Creates a new GetTargetRequest instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.GetTargetRequest + * @static + * @param {google.cloud.deploy.v1.IGetTargetRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.GetTargetRequest} GetTargetRequest instance + */ + GetTargetRequest.create = function create(properties) { + return new GetTargetRequest(properties); + }; + + /** + * Encodes the specified GetTargetRequest message. Does not implicitly {@link google.cloud.deploy.v1.GetTargetRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.GetTargetRequest + * @static + * @param {google.cloud.deploy.v1.IGetTargetRequest} message GetTargetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTargetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetTargetRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GetTargetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.GetTargetRequest + * @static + * @param {google.cloud.deploy.v1.IGetTargetRequest} message GetTargetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTargetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetTargetRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.GetTargetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.GetTargetRequest} GetTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTargetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.GetTargetRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetTargetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.GetTargetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.GetTargetRequest} GetTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTargetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetTargetRequest message. + * @function verify + * @memberof google.cloud.deploy.v1.GetTargetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetTargetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetTargetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.GetTargetRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.GetTargetRequest} GetTargetRequest + */ + GetTargetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.GetTargetRequest) + return object; + var message = new $root.google.cloud.deploy.v1.GetTargetRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetTargetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.GetTargetRequest + * @static + * @param {google.cloud.deploy.v1.GetTargetRequest} message GetTargetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetTargetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetTargetRequest to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.GetTargetRequest + * @instance + * @returns {Object.} JSON object + */ + GetTargetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetTargetRequest; + })(); + + v1.CreateTargetRequest = (function() { + + /** + * Properties of a CreateTargetRequest. + * @memberof google.cloud.deploy.v1 + * @interface ICreateTargetRequest + * @property {string|null} [parent] CreateTargetRequest parent + * @property {string|null} [targetId] CreateTargetRequest targetId + * @property {google.cloud.deploy.v1.ITarget|null} [target] CreateTargetRequest target + * @property {string|null} [requestId] CreateTargetRequest requestId + * @property {boolean|null} [validateOnly] CreateTargetRequest validateOnly + */ + + /** + * Constructs a new CreateTargetRequest. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a CreateTargetRequest. + * @implements ICreateTargetRequest + * @constructor + * @param {google.cloud.deploy.v1.ICreateTargetRequest=} [properties] Properties to set + */ + function CreateTargetRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateTargetRequest parent. + * @member {string} parent + * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @instance + */ + CreateTargetRequest.prototype.parent = ""; + + /** + * CreateTargetRequest targetId. + * @member {string} targetId + * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @instance + */ + CreateTargetRequest.prototype.targetId = ""; + + /** + * CreateTargetRequest target. + * @member {google.cloud.deploy.v1.ITarget|null|undefined} target + * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @instance + */ + CreateTargetRequest.prototype.target = null; + + /** + * CreateTargetRequest requestId. + * @member {string} requestId + * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @instance + */ + CreateTargetRequest.prototype.requestId = ""; + + /** + * CreateTargetRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @instance + */ + CreateTargetRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateTargetRequest instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @static + * @param {google.cloud.deploy.v1.ICreateTargetRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.CreateTargetRequest} CreateTargetRequest instance + */ + CreateTargetRequest.create = function create(properties) { + return new CreateTargetRequest(properties); + }; + + /** + * Encodes the specified CreateTargetRequest message. Does not implicitly {@link google.cloud.deploy.v1.CreateTargetRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @static + * @param {google.cloud.deploy.v1.ICreateTargetRequest} message CreateTargetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTargetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.targetId != null && Object.hasOwnProperty.call(message, "targetId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.targetId); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.google.cloud.deploy.v1.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreateTargetRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CreateTargetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @static + * @param {google.cloud.deploy.v1.ICreateTargetRequest} message CreateTargetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTargetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateTargetRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.CreateTargetRequest} CreateTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTargetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.CreateTargetRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.targetId = reader.string(); + break; + case 3: + message.target = $root.google.cloud.deploy.v1.Target.decode(reader, reader.uint32()); + break; + case 4: + message.requestId = reader.string(); + break; + case 5: + message.validateOnly = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateTargetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.CreateTargetRequest} CreateTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTargetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateTargetRequest message. + * @function verify + * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateTargetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.targetId != null && message.hasOwnProperty("targetId")) + if (!$util.isString(message.targetId)) + return "targetId: string expected"; + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.google.cloud.deploy.v1.Target.verify(message.target); + if (error) + return "target." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateTargetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.CreateTargetRequest} CreateTargetRequest + */ + CreateTargetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.CreateTargetRequest) + return object; + var message = new $root.google.cloud.deploy.v1.CreateTargetRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.targetId != null) + message.targetId = String(object.targetId); + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".google.cloud.deploy.v1.CreateTargetRequest.target: object expected"); + message.target = $root.google.cloud.deploy.v1.Target.fromObject(object.target); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateTargetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @static + * @param {google.cloud.deploy.v1.CreateTargetRequest} message CreateTargetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateTargetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.targetId = ""; + object.target = null; + object.requestId = ""; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.targetId != null && message.hasOwnProperty("targetId")) + object.targetId = message.targetId; + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.google.cloud.deploy.v1.Target.toObject(message.target, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateTargetRequest to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @instance + * @returns {Object.} JSON object + */ + CreateTargetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateTargetRequest; + })(); + + v1.UpdateTargetRequest = (function() { + + /** + * Properties of an UpdateTargetRequest. + * @memberof google.cloud.deploy.v1 + * @interface IUpdateTargetRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTargetRequest updateMask + * @property {google.cloud.deploy.v1.ITarget|null} [target] UpdateTargetRequest target + * @property {string|null} [requestId] UpdateTargetRequest requestId + * @property {boolean|null} [allowMissing] UpdateTargetRequest allowMissing + * @property {boolean|null} [validateOnly] UpdateTargetRequest validateOnly + */ + + /** + * Constructs a new UpdateTargetRequest. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents an UpdateTargetRequest. + * @implements IUpdateTargetRequest + * @constructor + * @param {google.cloud.deploy.v1.IUpdateTargetRequest=} [properties] Properties to set + */ + function UpdateTargetRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateTargetRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @instance + */ + UpdateTargetRequest.prototype.updateMask = null; + + /** + * UpdateTargetRequest target. + * @member {google.cloud.deploy.v1.ITarget|null|undefined} target + * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @instance + */ + UpdateTargetRequest.prototype.target = null; + + /** + * UpdateTargetRequest requestId. + * @member {string} requestId + * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @instance + */ + UpdateTargetRequest.prototype.requestId = ""; + + /** + * UpdateTargetRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @instance + */ + UpdateTargetRequest.prototype.allowMissing = false; + + /** + * UpdateTargetRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @instance + */ + UpdateTargetRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateTargetRequest instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @static + * @param {google.cloud.deploy.v1.IUpdateTargetRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.UpdateTargetRequest} UpdateTargetRequest instance + */ + UpdateTargetRequest.create = function create(properties) { + return new UpdateTargetRequest(properties); + }; + + /** + * Encodes the specified UpdateTargetRequest message. Does not implicitly {@link google.cloud.deploy.v1.UpdateTargetRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @static + * @param {google.cloud.deploy.v1.IUpdateTargetRequest} message UpdateTargetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateTargetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.google.cloud.deploy.v1.Target.encode(message.target, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.allowMissing); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified UpdateTargetRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.UpdateTargetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @static + * @param {google.cloud.deploy.v1.IUpdateTargetRequest} message UpdateTargetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateTargetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateTargetRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.UpdateTargetRequest} UpdateTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateTargetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.UpdateTargetRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 2: + message.target = $root.google.cloud.deploy.v1.Target.decode(reader, reader.uint32()); + break; + case 3: + message.requestId = reader.string(); + break; + case 4: + message.allowMissing = reader.bool(); + break; + case 5: + message.validateOnly = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateTargetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.UpdateTargetRequest} UpdateTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateTargetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateTargetRequest message. + * @function verify + * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateTargetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.google.cloud.deploy.v1.Target.verify(message.target); + if (error) + return "target." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates an UpdateTargetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.UpdateTargetRequest} UpdateTargetRequest + */ + UpdateTargetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.UpdateTargetRequest) + return object; + var message = new $root.google.cloud.deploy.v1.UpdateTargetRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.deploy.v1.UpdateTargetRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".google.cloud.deploy.v1.UpdateTargetRequest.target: object expected"); + message.target = $root.google.cloud.deploy.v1.Target.fromObject(object.target); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from an UpdateTargetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @static + * @param {google.cloud.deploy.v1.UpdateTargetRequest} message UpdateTargetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateTargetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.target = null; + object.requestId = ""; + object.allowMissing = false; + object.validateOnly = false; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.google.cloud.deploy.v1.Target.toObject(message.target, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this UpdateTargetRequest to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateTargetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateTargetRequest; + })(); + + v1.DeleteTargetRequest = (function() { + + /** + * Properties of a DeleteTargetRequest. + * @memberof google.cloud.deploy.v1 + * @interface IDeleteTargetRequest + * @property {string|null} [name] DeleteTargetRequest name + * @property {string|null} [requestId] DeleteTargetRequest requestId + * @property {boolean|null} [allowMissing] DeleteTargetRequest allowMissing + * @property {boolean|null} [validateOnly] DeleteTargetRequest validateOnly + * @property {string|null} [etag] DeleteTargetRequest etag + */ + + /** + * Constructs a new DeleteTargetRequest. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a DeleteTargetRequest. + * @implements IDeleteTargetRequest + * @constructor + * @param {google.cloud.deploy.v1.IDeleteTargetRequest=} [properties] Properties to set + */ + function DeleteTargetRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteTargetRequest name. + * @member {string} name + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @instance + */ + DeleteTargetRequest.prototype.name = ""; + + /** + * DeleteTargetRequest requestId. + * @member {string} requestId + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @instance + */ + DeleteTargetRequest.prototype.requestId = ""; + + /** + * DeleteTargetRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @instance + */ + DeleteTargetRequest.prototype.allowMissing = false; + + /** + * DeleteTargetRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @instance + */ + DeleteTargetRequest.prototype.validateOnly = false; + + /** + * DeleteTargetRequest etag. + * @member {string} etag + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @instance + */ + DeleteTargetRequest.prototype.etag = ""; + + /** + * Creates a new DeleteTargetRequest instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @static + * @param {google.cloud.deploy.v1.IDeleteTargetRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.DeleteTargetRequest} DeleteTargetRequest instance + */ + DeleteTargetRequest.create = function create(properties) { + return new DeleteTargetRequest(properties); + }; + + /** + * Encodes the specified DeleteTargetRequest message. Does not implicitly {@link google.cloud.deploy.v1.DeleteTargetRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @static + * @param {google.cloud.deploy.v1.IDeleteTargetRequest} message DeleteTargetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteTargetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowMissing); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.etag); + return writer; + }; + + /** + * Encodes the specified DeleteTargetRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeleteTargetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @static + * @param {google.cloud.deploy.v1.IDeleteTargetRequest} message DeleteTargetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteTargetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteTargetRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.DeleteTargetRequest} DeleteTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteTargetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.DeleteTargetRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.requestId = reader.string(); + break; + case 3: + message.allowMissing = reader.bool(); + break; + case 4: + message.validateOnly = reader.bool(); + break; + case 5: + message.etag = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteTargetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.DeleteTargetRequest} DeleteTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteTargetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteTargetRequest message. + * @function verify + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteTargetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; + + /** + * Creates a DeleteTargetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.DeleteTargetRequest} DeleteTargetRequest + */ + DeleteTargetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.DeleteTargetRequest) + return object; + var message = new $root.google.cloud.deploy.v1.DeleteTargetRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; + + /** + * Creates a plain object from a DeleteTargetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @static + * @param {google.cloud.deploy.v1.DeleteTargetRequest} message DeleteTargetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteTargetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.requestId = ""; + object.allowMissing = false; + object.validateOnly = false; + object.etag = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + return object; + }; + + /** + * Converts this DeleteTargetRequest to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteTargetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteTargetRequest; + })(); + + v1.Release = (function() { + + /** + * Properties of a Release. + * @memberof google.cloud.deploy.v1 + * @interface IRelease + * @property {string|null} [name] Release name + * @property {string|null} [uid] Release uid + * @property {string|null} [description] Release description + * @property {Object.|null} [annotations] Release annotations + * @property {Object.|null} [labels] Release labels + * @property {google.protobuf.ITimestamp|null} [createTime] Release createTime + * @property {google.protobuf.ITimestamp|null} [renderStartTime] Release renderStartTime + * @property {google.protobuf.ITimestamp|null} [renderEndTime] Release renderEndTime + * @property {string|null} [skaffoldConfigUri] Release skaffoldConfigUri + * @property {string|null} [skaffoldConfigPath] Release skaffoldConfigPath + * @property {Array.|null} [buildArtifacts] Release buildArtifacts + * @property {google.cloud.deploy.v1.IDeliveryPipeline|null} [deliveryPipelineSnapshot] Release deliveryPipelineSnapshot + * @property {Array.|null} [targetSnapshots] Release targetSnapshots + * @property {google.cloud.deploy.v1.Release.RenderState|null} [renderState] Release renderState + * @property {string|null} [etag] Release etag + * @property {string|null} [skaffoldVersion] Release skaffoldVersion + * @property {Object.|null} [targetArtifacts] Release targetArtifacts + * @property {Object.|null} [targetRenders] Release targetRenders + */ + + /** + * Constructs a new Release. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a Release. + * @implements IRelease + * @constructor + * @param {google.cloud.deploy.v1.IRelease=} [properties] Properties to set + */ + function Release(properties) { + this.annotations = {}; + this.labels = {}; + this.buildArtifacts = []; + this.targetSnapshots = []; + this.targetArtifacts = {}; + this.targetRenders = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Release name. + * @member {string} name + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.name = ""; + + /** + * Release uid. + * @member {string} uid + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.uid = ""; + + /** + * Release description. + * @member {string} description + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.description = ""; + + /** + * Release annotations. + * @member {Object.} annotations + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.annotations = $util.emptyObject; + + /** + * Release labels. + * @member {Object.} labels + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.labels = $util.emptyObject; + + /** + * Release createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.createTime = null; + + /** + * Release renderStartTime. + * @member {google.protobuf.ITimestamp|null|undefined} renderStartTime + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.renderStartTime = null; + + /** + * Release renderEndTime. + * @member {google.protobuf.ITimestamp|null|undefined} renderEndTime + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.renderEndTime = null; + + /** + * Release skaffoldConfigUri. + * @member {string} skaffoldConfigUri + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.skaffoldConfigUri = ""; + + /** + * Release skaffoldConfigPath. + * @member {string} skaffoldConfigPath + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.skaffoldConfigPath = ""; + + /** + * Release buildArtifacts. + * @member {Array.} buildArtifacts + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.buildArtifacts = $util.emptyArray; + + /** + * Release deliveryPipelineSnapshot. + * @member {google.cloud.deploy.v1.IDeliveryPipeline|null|undefined} deliveryPipelineSnapshot + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.deliveryPipelineSnapshot = null; + + /** + * Release targetSnapshots. + * @member {Array.} targetSnapshots + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.targetSnapshots = $util.emptyArray; + + /** + * Release renderState. + * @member {google.cloud.deploy.v1.Release.RenderState} renderState + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.renderState = 0; + + /** + * Release etag. + * @member {string} etag + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.etag = ""; + + /** + * Release skaffoldVersion. + * @member {string} skaffoldVersion + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.skaffoldVersion = ""; + + /** + * Release targetArtifacts. + * @member {Object.} targetArtifacts + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.targetArtifacts = $util.emptyObject; + + /** + * Release targetRenders. + * @member {Object.} targetRenders + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.targetRenders = $util.emptyObject; + + /** + * Creates a new Release instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.Release + * @static + * @param {google.cloud.deploy.v1.IRelease=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.Release} Release instance + */ + Release.create = function create(properties) { + return new Release(properties); + }; + + /** + * Encodes the specified Release message. Does not implicitly {@link google.cloud.deploy.v1.Release.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.Release + * @static + * @param {google.cloud.deploy.v1.IRelease} message Release message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Release.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) + for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.renderStartTime != null && Object.hasOwnProperty.call(message, "renderStartTime")) + $root.google.protobuf.Timestamp.encode(message.renderStartTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.renderEndTime != null && Object.hasOwnProperty.call(message, "renderEndTime")) + $root.google.protobuf.Timestamp.encode(message.renderEndTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.skaffoldConfigPath != null && Object.hasOwnProperty.call(message, "skaffoldConfigPath")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.skaffoldConfigPath); + if (message.buildArtifacts != null && message.buildArtifacts.length) + for (var i = 0; i < message.buildArtifacts.length; ++i) + $root.google.cloud.deploy.v1.BuildArtifact.encode(message.buildArtifacts[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.deliveryPipelineSnapshot != null && Object.hasOwnProperty.call(message, "deliveryPipelineSnapshot")) + $root.google.cloud.deploy.v1.DeliveryPipeline.encode(message.deliveryPipelineSnapshot, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.targetSnapshots != null && message.targetSnapshots.length) + for (var i = 0; i < message.targetSnapshots.length; ++i) + $root.google.cloud.deploy.v1.Target.encode(message.targetSnapshots[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.renderState != null && Object.hasOwnProperty.call(message, "renderState")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.renderState); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.etag); + if (message.skaffoldConfigUri != null && Object.hasOwnProperty.call(message, "skaffoldConfigUri")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.skaffoldConfigUri); + if (message.skaffoldVersion != null && Object.hasOwnProperty.call(message, "skaffoldVersion")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.skaffoldVersion); + if (message.targetArtifacts != null && Object.hasOwnProperty.call(message, "targetArtifacts")) + for (var keys = Object.keys(message.targetArtifacts), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 20, wireType 2 =*/162).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.deploy.v1.TargetArtifact.encode(message.targetArtifacts[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.targetRenders != null && Object.hasOwnProperty.call(message, "targetRenders")) + for (var keys = Object.keys(message.targetRenders), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 22, wireType 2 =*/178).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.deploy.v1.Release.TargetRender.encode(message.targetRenders[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified Release message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Release.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.Release + * @static + * @param {google.cloud.deploy.v1.IRelease} message Release message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Release.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Release message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.Release + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.Release} Release + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Release.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Release(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.uid = reader.string(); + break; + case 3: + message.description = reader.string(); + break; + case 4: + if (message.annotations === $util.emptyObject) + message.annotations = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.annotations[key] = value; + break; + case 5: + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + case 6: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 7: + message.renderStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 8: + message.renderEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 17: + message.skaffoldConfigUri = reader.string(); + break; + case 9: + message.skaffoldConfigPath = reader.string(); + break; + case 10: + if (!(message.buildArtifacts && message.buildArtifacts.length)) + message.buildArtifacts = []; + message.buildArtifacts.push($root.google.cloud.deploy.v1.BuildArtifact.decode(reader, reader.uint32())); + break; + case 11: + message.deliveryPipelineSnapshot = $root.google.cloud.deploy.v1.DeliveryPipeline.decode(reader, reader.uint32()); + break; + case 12: + if (!(message.targetSnapshots && message.targetSnapshots.length)) + message.targetSnapshots = []; + message.targetSnapshots.push($root.google.cloud.deploy.v1.Target.decode(reader, reader.uint32())); + break; + case 13: + message.renderState = reader.int32(); + break; + case 16: + message.etag = reader.string(); + break; + case 19: + message.skaffoldVersion = reader.string(); + break; + case 20: + if (message.targetArtifacts === $util.emptyObject) + message.targetArtifacts = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.deploy.v1.TargetArtifact.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.targetArtifacts[key] = value; + break; + case 22: + if (message.targetRenders === $util.emptyObject) + message.targetRenders = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.deploy.v1.Release.TargetRender.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.targetRenders[key] = value; + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Release message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.Release + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.Release} Release + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Release.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Release message. + * @function verify + * @memberof google.cloud.deploy.v1.Release + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Release.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.annotations != null && message.hasOwnProperty("annotations")) { + if (!$util.isObject(message.annotations)) + return "annotations: object expected"; + var key = Object.keys(message.annotations); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.annotations[key[i]])) + return "annotations: string{k:string} expected"; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.renderStartTime != null && message.hasOwnProperty("renderStartTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.renderStartTime); + if (error) + return "renderStartTime." + error; + } + if (message.renderEndTime != null && message.hasOwnProperty("renderEndTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.renderEndTime); + if (error) + return "renderEndTime." + error; + } + if (message.skaffoldConfigUri != null && message.hasOwnProperty("skaffoldConfigUri")) + if (!$util.isString(message.skaffoldConfigUri)) + return "skaffoldConfigUri: string expected"; + if (message.skaffoldConfigPath != null && message.hasOwnProperty("skaffoldConfigPath")) + if (!$util.isString(message.skaffoldConfigPath)) + return "skaffoldConfigPath: string expected"; + if (message.buildArtifacts != null && message.hasOwnProperty("buildArtifacts")) { + if (!Array.isArray(message.buildArtifacts)) + return "buildArtifacts: array expected"; + for (var i = 0; i < message.buildArtifacts.length; ++i) { + var error = $root.google.cloud.deploy.v1.BuildArtifact.verify(message.buildArtifacts[i]); + if (error) + return "buildArtifacts." + error; + } + } + if (message.deliveryPipelineSnapshot != null && message.hasOwnProperty("deliveryPipelineSnapshot")) { + var error = $root.google.cloud.deploy.v1.DeliveryPipeline.verify(message.deliveryPipelineSnapshot); + if (error) + return "deliveryPipelineSnapshot." + error; + } + if (message.targetSnapshots != null && message.hasOwnProperty("targetSnapshots")) { + if (!Array.isArray(message.targetSnapshots)) + return "targetSnapshots: array expected"; + for (var i = 0; i < message.targetSnapshots.length; ++i) { + var error = $root.google.cloud.deploy.v1.Target.verify(message.targetSnapshots[i]); + if (error) + return "targetSnapshots." + error; + } + } + if (message.renderState != null && message.hasOwnProperty("renderState")) + switch (message.renderState) { + default: + return "renderState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.skaffoldVersion != null && message.hasOwnProperty("skaffoldVersion")) + if (!$util.isString(message.skaffoldVersion)) + return "skaffoldVersion: string expected"; + if (message.targetArtifacts != null && message.hasOwnProperty("targetArtifacts")) { + if (!$util.isObject(message.targetArtifacts)) + return "targetArtifacts: object expected"; + var key = Object.keys(message.targetArtifacts); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.deploy.v1.TargetArtifact.verify(message.targetArtifacts[key[i]]); + if (error) + return "targetArtifacts." + error; + } + } + if (message.targetRenders != null && message.hasOwnProperty("targetRenders")) { + if (!$util.isObject(message.targetRenders)) + return "targetRenders: object expected"; + var key = Object.keys(message.targetRenders); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.deploy.v1.Release.TargetRender.verify(message.targetRenders[key[i]]); + if (error) + return "targetRenders." + error; + } + } + return null; + }; + + /** + * Creates a Release message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.Release + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.Release} Release + */ + Release.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.Release) + return object; + var message = new $root.google.cloud.deploy.v1.Release(); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.description != null) + message.description = String(object.description); + if (object.annotations) { + if (typeof object.annotations !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.annotations: object expected"); + message.annotations = {}; + for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) + message.annotations[keys[i]] = String(object.annotations[keys[i]]); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.renderStartTime != null) { + if (typeof object.renderStartTime !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.renderStartTime: object expected"); + message.renderStartTime = $root.google.protobuf.Timestamp.fromObject(object.renderStartTime); + } + if (object.renderEndTime != null) { + if (typeof object.renderEndTime !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.renderEndTime: object expected"); + message.renderEndTime = $root.google.protobuf.Timestamp.fromObject(object.renderEndTime); + } + if (object.skaffoldConfigUri != null) + message.skaffoldConfigUri = String(object.skaffoldConfigUri); + if (object.skaffoldConfigPath != null) + message.skaffoldConfigPath = String(object.skaffoldConfigPath); + if (object.buildArtifacts) { + if (!Array.isArray(object.buildArtifacts)) + throw TypeError(".google.cloud.deploy.v1.Release.buildArtifacts: array expected"); + message.buildArtifacts = []; + for (var i = 0; i < object.buildArtifacts.length; ++i) { + if (typeof object.buildArtifacts[i] !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.buildArtifacts: object expected"); + message.buildArtifacts[i] = $root.google.cloud.deploy.v1.BuildArtifact.fromObject(object.buildArtifacts[i]); + } + } + if (object.deliveryPipelineSnapshot != null) { + if (typeof object.deliveryPipelineSnapshot !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.deliveryPipelineSnapshot: object expected"); + message.deliveryPipelineSnapshot = $root.google.cloud.deploy.v1.DeliveryPipeline.fromObject(object.deliveryPipelineSnapshot); + } + if (object.targetSnapshots) { + if (!Array.isArray(object.targetSnapshots)) + throw TypeError(".google.cloud.deploy.v1.Release.targetSnapshots: array expected"); + message.targetSnapshots = []; + for (var i = 0; i < object.targetSnapshots.length; ++i) { + if (typeof object.targetSnapshots[i] !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.targetSnapshots: object expected"); + message.targetSnapshots[i] = $root.google.cloud.deploy.v1.Target.fromObject(object.targetSnapshots[i]); + } + } + switch (object.renderState) { + case "RENDER_STATE_UNSPECIFIED": + case 0: + message.renderState = 0; + break; + case "SUCCEEDED": + case 1: + message.renderState = 1; + break; + case "FAILED": + case 2: + message.renderState = 2; + break; + case "IN_PROGRESS": + case 3: + message.renderState = 3; + break; + } + if (object.etag != null) + message.etag = String(object.etag); + if (object.skaffoldVersion != null) + message.skaffoldVersion = String(object.skaffoldVersion); + if (object.targetArtifacts) { + if (typeof object.targetArtifacts !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.targetArtifacts: object expected"); + message.targetArtifacts = {}; + for (var keys = Object.keys(object.targetArtifacts), i = 0; i < keys.length; ++i) { + if (typeof object.targetArtifacts[keys[i]] !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.targetArtifacts: object expected"); + message.targetArtifacts[keys[i]] = $root.google.cloud.deploy.v1.TargetArtifact.fromObject(object.targetArtifacts[keys[i]]); + } + } + if (object.targetRenders) { + if (typeof object.targetRenders !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.targetRenders: object expected"); + message.targetRenders = {}; + for (var keys = Object.keys(object.targetRenders), i = 0; i < keys.length; ++i) { + if (typeof object.targetRenders[keys[i]] !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.targetRenders: object expected"); + message.targetRenders[keys[i]] = $root.google.cloud.deploy.v1.Release.TargetRender.fromObject(object.targetRenders[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from a Release message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.Release + * @static + * @param {google.cloud.deploy.v1.Release} message Release + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Release.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.buildArtifacts = []; + object.targetSnapshots = []; + } + if (options.objects || options.defaults) { + object.annotations = {}; + object.labels = {}; + object.targetArtifacts = {}; + object.targetRenders = {}; + } + if (options.defaults) { + object.name = ""; + object.uid = ""; + object.description = ""; + object.createTime = null; + object.renderStartTime = null; + object.renderEndTime = null; + object.skaffoldConfigPath = ""; + object.deliveryPipelineSnapshot = null; + object.renderState = options.enums === String ? "RENDER_STATE_UNSPECIFIED" : 0; + object.etag = ""; + object.skaffoldConfigUri = ""; + object.skaffoldVersion = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + var keys2; + if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { + object.annotations = {}; + for (var j = 0; j < keys2.length; ++j) + object.annotations[keys2[j]] = message.annotations[keys2[j]]; + } + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.renderStartTime != null && message.hasOwnProperty("renderStartTime")) + object.renderStartTime = $root.google.protobuf.Timestamp.toObject(message.renderStartTime, options); + if (message.renderEndTime != null && message.hasOwnProperty("renderEndTime")) + object.renderEndTime = $root.google.protobuf.Timestamp.toObject(message.renderEndTime, options); + if (message.skaffoldConfigPath != null && message.hasOwnProperty("skaffoldConfigPath")) + object.skaffoldConfigPath = message.skaffoldConfigPath; + if (message.buildArtifacts && message.buildArtifacts.length) { + object.buildArtifacts = []; + for (var j = 0; j < message.buildArtifacts.length; ++j) + object.buildArtifacts[j] = $root.google.cloud.deploy.v1.BuildArtifact.toObject(message.buildArtifacts[j], options); + } + if (message.deliveryPipelineSnapshot != null && message.hasOwnProperty("deliveryPipelineSnapshot")) + object.deliveryPipelineSnapshot = $root.google.cloud.deploy.v1.DeliveryPipeline.toObject(message.deliveryPipelineSnapshot, options); + if (message.targetSnapshots && message.targetSnapshots.length) { + object.targetSnapshots = []; + for (var j = 0; j < message.targetSnapshots.length; ++j) + object.targetSnapshots[j] = $root.google.cloud.deploy.v1.Target.toObject(message.targetSnapshots[j], options); + } + if (message.renderState != null && message.hasOwnProperty("renderState")) + object.renderState = options.enums === String ? $root.google.cloud.deploy.v1.Release.RenderState[message.renderState] : message.renderState; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.skaffoldConfigUri != null && message.hasOwnProperty("skaffoldConfigUri")) + object.skaffoldConfigUri = message.skaffoldConfigUri; + if (message.skaffoldVersion != null && message.hasOwnProperty("skaffoldVersion")) + object.skaffoldVersion = message.skaffoldVersion; + if (message.targetArtifacts && (keys2 = Object.keys(message.targetArtifacts)).length) { + object.targetArtifacts = {}; + for (var j = 0; j < keys2.length; ++j) + object.targetArtifacts[keys2[j]] = $root.google.cloud.deploy.v1.TargetArtifact.toObject(message.targetArtifacts[keys2[j]], options); + } + if (message.targetRenders && (keys2 = Object.keys(message.targetRenders)).length) { + object.targetRenders = {}; + for (var j = 0; j < keys2.length; ++j) + object.targetRenders[keys2[j]] = $root.google.cloud.deploy.v1.Release.TargetRender.toObject(message.targetRenders[keys2[j]], options); + } + return object; + }; + + /** + * Converts this Release to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.Release + * @instance + * @returns {Object.} JSON object + */ + Release.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Release.TargetRender = (function() { + + /** + * Properties of a TargetRender. + * @memberof google.cloud.deploy.v1.Release + * @interface ITargetRender + * @property {string|null} [renderingBuild] TargetRender renderingBuild + * @property {google.cloud.deploy.v1.Release.TargetRender.TargetRenderState|null} [renderingState] TargetRender renderingState + */ + + /** + * Constructs a new TargetRender. + * @memberof google.cloud.deploy.v1.Release + * @classdesc Represents a TargetRender. + * @implements ITargetRender + * @constructor + * @param {google.cloud.deploy.v1.Release.ITargetRender=} [properties] Properties to set + */ + function TargetRender(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TargetRender renderingBuild. + * @member {string} renderingBuild + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @instance + */ + TargetRender.prototype.renderingBuild = ""; + + /** + * TargetRender renderingState. + * @member {google.cloud.deploy.v1.Release.TargetRender.TargetRenderState} renderingState + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @instance + */ + TargetRender.prototype.renderingState = 0; + + /** + * Creates a new TargetRender instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @static + * @param {google.cloud.deploy.v1.Release.ITargetRender=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.Release.TargetRender} TargetRender instance + */ + TargetRender.create = function create(properties) { + return new TargetRender(properties); + }; + + /** + * Encodes the specified TargetRender message. Does not implicitly {@link google.cloud.deploy.v1.Release.TargetRender.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @static + * @param {google.cloud.deploy.v1.Release.ITargetRender} message TargetRender message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TargetRender.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.renderingBuild != null && Object.hasOwnProperty.call(message, "renderingBuild")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.renderingBuild); + if (message.renderingState != null && Object.hasOwnProperty.call(message, "renderingState")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.renderingState); + return writer; + }; + + /** + * Encodes the specified TargetRender message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Release.TargetRender.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @static + * @param {google.cloud.deploy.v1.Release.ITargetRender} message TargetRender message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TargetRender.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TargetRender message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.Release.TargetRender} TargetRender + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetRender.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Release.TargetRender(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.renderingBuild = reader.string(); + break; + case 2: + message.renderingState = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TargetRender message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.Release.TargetRender} TargetRender + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetRender.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TargetRender message. + * @function verify + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TargetRender.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.renderingBuild != null && message.hasOwnProperty("renderingBuild")) + if (!$util.isString(message.renderingBuild)) + return "renderingBuild: string expected"; + if (message.renderingState != null && message.hasOwnProperty("renderingState")) + switch (message.renderingState) { + default: + return "renderingState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a TargetRender message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.Release.TargetRender} TargetRender + */ + TargetRender.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.Release.TargetRender) + return object; + var message = new $root.google.cloud.deploy.v1.Release.TargetRender(); + if (object.renderingBuild != null) + message.renderingBuild = String(object.renderingBuild); + switch (object.renderingState) { + case "TARGET_RENDER_STATE_UNSPECIFIED": + case 0: + message.renderingState = 0; + break; + case "SUCCEEDED": + case 1: + message.renderingState = 1; + break; + case "FAILED": + case 2: + message.renderingState = 2; + break; + case "IN_PROGRESS": + case 3: + message.renderingState = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a TargetRender message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @static + * @param {google.cloud.deploy.v1.Release.TargetRender} message TargetRender + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TargetRender.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.renderingBuild = ""; + object.renderingState = options.enums === String ? "TARGET_RENDER_STATE_UNSPECIFIED" : 0; + } + if (message.renderingBuild != null && message.hasOwnProperty("renderingBuild")) + object.renderingBuild = message.renderingBuild; + if (message.renderingState != null && message.hasOwnProperty("renderingState")) + object.renderingState = options.enums === String ? $root.google.cloud.deploy.v1.Release.TargetRender.TargetRenderState[message.renderingState] : message.renderingState; + return object; + }; + + /** + * Converts this TargetRender to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @instance + * @returns {Object.} JSON object + */ + TargetRender.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * TargetRenderState enum. + * @name google.cloud.deploy.v1.Release.TargetRender.TargetRenderState + * @enum {number} + * @property {number} TARGET_RENDER_STATE_UNSPECIFIED=0 TARGET_RENDER_STATE_UNSPECIFIED value + * @property {number} SUCCEEDED=1 SUCCEEDED value + * @property {number} FAILED=2 FAILED value + * @property {number} IN_PROGRESS=3 IN_PROGRESS value + */ + TargetRender.TargetRenderState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_RENDER_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SUCCEEDED"] = 1; + values[valuesById[2] = "FAILED"] = 2; + values[valuesById[3] = "IN_PROGRESS"] = 3; + return values; + })(); + + return TargetRender; + })(); + + /** + * RenderState enum. + * @name google.cloud.deploy.v1.Release.RenderState + * @enum {number} + * @property {number} RENDER_STATE_UNSPECIFIED=0 RENDER_STATE_UNSPECIFIED value + * @property {number} SUCCEEDED=1 SUCCEEDED value + * @property {number} FAILED=2 FAILED value + * @property {number} IN_PROGRESS=3 IN_PROGRESS value + */ + Release.RenderState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RENDER_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SUCCEEDED"] = 1; + values[valuesById[2] = "FAILED"] = 2; + values[valuesById[3] = "IN_PROGRESS"] = 3; + return values; + })(); + + return Release; + })(); + + v1.BuildArtifact = (function() { + + /** + * Properties of a BuildArtifact. + * @memberof google.cloud.deploy.v1 + * @interface IBuildArtifact + * @property {string|null} [image] BuildArtifact image + * @property {string|null} [tag] BuildArtifact tag + */ + + /** + * Constructs a new BuildArtifact. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a BuildArtifact. + * @implements IBuildArtifact + * @constructor + * @param {google.cloud.deploy.v1.IBuildArtifact=} [properties] Properties to set + */ + function BuildArtifact(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BuildArtifact image. + * @member {string} image + * @memberof google.cloud.deploy.v1.BuildArtifact + * @instance + */ + BuildArtifact.prototype.image = ""; + + /** + * BuildArtifact tag. + * @member {string} tag + * @memberof google.cloud.deploy.v1.BuildArtifact + * @instance + */ + BuildArtifact.prototype.tag = ""; + + /** + * Creates a new BuildArtifact instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.BuildArtifact + * @static + * @param {google.cloud.deploy.v1.IBuildArtifact=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.BuildArtifact} BuildArtifact instance + */ + BuildArtifact.create = function create(properties) { + return new BuildArtifact(properties); + }; + + /** + * Encodes the specified BuildArtifact message. Does not implicitly {@link google.cloud.deploy.v1.BuildArtifact.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.BuildArtifact + * @static + * @param {google.cloud.deploy.v1.IBuildArtifact} message BuildArtifact message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BuildArtifact.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.tag); + if (message.image != null && Object.hasOwnProperty.call(message, "image")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.image); + return writer; + }; + + /** + * Encodes the specified BuildArtifact message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.BuildArtifact.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.BuildArtifact + * @static + * @param {google.cloud.deploy.v1.IBuildArtifact} message BuildArtifact message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BuildArtifact.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BuildArtifact message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.BuildArtifact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.BuildArtifact} BuildArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BuildArtifact.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.BuildArtifact(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + message.image = reader.string(); + break; + case 2: + message.tag = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BuildArtifact message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.BuildArtifact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.BuildArtifact} BuildArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BuildArtifact.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BuildArtifact message. + * @function verify + * @memberof google.cloud.deploy.v1.BuildArtifact + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BuildArtifact.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.image != null && message.hasOwnProperty("image")) + if (!$util.isString(message.image)) + return "image: string expected"; + if (message.tag != null && message.hasOwnProperty("tag")) + if (!$util.isString(message.tag)) + return "tag: string expected"; + return null; + }; + + /** + * Creates a BuildArtifact message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.BuildArtifact + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.BuildArtifact} BuildArtifact + */ + BuildArtifact.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.BuildArtifact) + return object; + var message = new $root.google.cloud.deploy.v1.BuildArtifact(); + if (object.image != null) + message.image = String(object.image); + if (object.tag != null) + message.tag = String(object.tag); + return message; + }; + + /** + * Creates a plain object from a BuildArtifact message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.BuildArtifact + * @static + * @param {google.cloud.deploy.v1.BuildArtifact} message BuildArtifact + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BuildArtifact.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.tag = ""; + object.image = ""; + } + if (message.tag != null && message.hasOwnProperty("tag")) + object.tag = message.tag; + if (message.image != null && message.hasOwnProperty("image")) + object.image = message.image; + return object; + }; + + /** + * Converts this BuildArtifact to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.BuildArtifact + * @instance + * @returns {Object.} JSON object + */ + BuildArtifact.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BuildArtifact; + })(); + + v1.TargetArtifact = (function() { + + /** + * Properties of a TargetArtifact. + * @memberof google.cloud.deploy.v1 + * @interface ITargetArtifact + * @property {string|null} [artifactUri] TargetArtifact artifactUri + * @property {string|null} [skaffoldConfigPath] TargetArtifact skaffoldConfigPath + * @property {string|null} [manifestPath] TargetArtifact manifestPath + */ + + /** + * Constructs a new TargetArtifact. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a TargetArtifact. + * @implements ITargetArtifact + * @constructor + * @param {google.cloud.deploy.v1.ITargetArtifact=} [properties] Properties to set + */ + function TargetArtifact(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TargetArtifact artifactUri. + * @member {string|null|undefined} artifactUri + * @memberof google.cloud.deploy.v1.TargetArtifact + * @instance + */ + TargetArtifact.prototype.artifactUri = null; + + /** + * TargetArtifact skaffoldConfigPath. + * @member {string} skaffoldConfigPath + * @memberof google.cloud.deploy.v1.TargetArtifact + * @instance + */ + TargetArtifact.prototype.skaffoldConfigPath = ""; + + /** + * TargetArtifact manifestPath. + * @member {string} manifestPath + * @memberof google.cloud.deploy.v1.TargetArtifact + * @instance + */ + TargetArtifact.prototype.manifestPath = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TargetArtifact uri. + * @member {"artifactUri"|undefined} uri + * @memberof google.cloud.deploy.v1.TargetArtifact + * @instance + */ + Object.defineProperty(TargetArtifact.prototype, "uri", { + get: $util.oneOfGetter($oneOfFields = ["artifactUri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TargetArtifact instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.TargetArtifact + * @static + * @param {google.cloud.deploy.v1.ITargetArtifact=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.TargetArtifact} TargetArtifact instance + */ + TargetArtifact.create = function create(properties) { + return new TargetArtifact(properties); + }; + + /** + * Encodes the specified TargetArtifact message. Does not implicitly {@link google.cloud.deploy.v1.TargetArtifact.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.TargetArtifact + * @static + * @param {google.cloud.deploy.v1.ITargetArtifact} message TargetArtifact message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TargetArtifact.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.skaffoldConfigPath != null && Object.hasOwnProperty.call(message, "skaffoldConfigPath")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.skaffoldConfigPath); + if (message.manifestPath != null && Object.hasOwnProperty.call(message, "manifestPath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.manifestPath); + if (message.artifactUri != null && Object.hasOwnProperty.call(message, "artifactUri")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.artifactUri); + return writer; + }; + + /** + * Encodes the specified TargetArtifact message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.TargetArtifact.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.TargetArtifact + * @static + * @param {google.cloud.deploy.v1.ITargetArtifact} message TargetArtifact message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TargetArtifact.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TargetArtifact message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.TargetArtifact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.TargetArtifact} TargetArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetArtifact.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.TargetArtifact(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: + message.artifactUri = reader.string(); + break; + case 2: + message.skaffoldConfigPath = reader.string(); + break; + case 3: + message.manifestPath = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TargetArtifact message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.TargetArtifact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.TargetArtifact} TargetArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetArtifact.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TargetArtifact message. + * @function verify + * @memberof google.cloud.deploy.v1.TargetArtifact + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TargetArtifact.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.artifactUri != null && message.hasOwnProperty("artifactUri")) { + properties.uri = 1; + if (!$util.isString(message.artifactUri)) + return "artifactUri: string expected"; + } + if (message.skaffoldConfigPath != null && message.hasOwnProperty("skaffoldConfigPath")) + if (!$util.isString(message.skaffoldConfigPath)) + return "skaffoldConfigPath: string expected"; + if (message.manifestPath != null && message.hasOwnProperty("manifestPath")) + if (!$util.isString(message.manifestPath)) + return "manifestPath: string expected"; + return null; + }; + + /** + * Creates a TargetArtifact message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.TargetArtifact + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.TargetArtifact} TargetArtifact + */ + TargetArtifact.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.TargetArtifact) + return object; + var message = new $root.google.cloud.deploy.v1.TargetArtifact(); + if (object.artifactUri != null) + message.artifactUri = String(object.artifactUri); + if (object.skaffoldConfigPath != null) + message.skaffoldConfigPath = String(object.skaffoldConfigPath); + if (object.manifestPath != null) + message.manifestPath = String(object.manifestPath); + return message; + }; + + /** + * Creates a plain object from a TargetArtifact message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.TargetArtifact + * @static + * @param {google.cloud.deploy.v1.TargetArtifact} message TargetArtifact + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TargetArtifact.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.skaffoldConfigPath = ""; + object.manifestPath = ""; + } + if (message.skaffoldConfigPath != null && message.hasOwnProperty("skaffoldConfigPath")) + object.skaffoldConfigPath = message.skaffoldConfigPath; + if (message.manifestPath != null && message.hasOwnProperty("manifestPath")) + object.manifestPath = message.manifestPath; + if (message.artifactUri != null && message.hasOwnProperty("artifactUri")) { + object.artifactUri = message.artifactUri; + if (options.oneofs) + object.uri = "artifactUri"; + } + return object; + }; + + /** + * Converts this TargetArtifact to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.TargetArtifact + * @instance + * @returns {Object.} JSON object + */ + TargetArtifact.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TargetArtifact; + })(); + + v1.ListReleasesRequest = (function() { + + /** + * Properties of a ListReleasesRequest. + * @memberof google.cloud.deploy.v1 + * @interface IListReleasesRequest + * @property {string|null} [parent] ListReleasesRequest parent + * @property {number|null} [pageSize] ListReleasesRequest pageSize + * @property {string|null} [pageToken] ListReleasesRequest pageToken + * @property {string|null} [filter] ListReleasesRequest filter + * @property {string|null} [orderBy] ListReleasesRequest orderBy + */ + + /** + * Constructs a new ListReleasesRequest. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a ListReleasesRequest. + * @implements IListReleasesRequest + * @constructor + * @param {google.cloud.deploy.v1.IListReleasesRequest=} [properties] Properties to set + */ + function ListReleasesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListReleasesRequest parent. + * @member {string} parent + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @instance + */ + ListReleasesRequest.prototype.parent = ""; + + /** + * ListReleasesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @instance + */ + ListReleasesRequest.prototype.pageSize = 0; + + /** + * ListReleasesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @instance + */ + ListReleasesRequest.prototype.pageToken = ""; + + /** + * ListReleasesRequest filter. + * @member {string} filter + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @instance + */ + ListReleasesRequest.prototype.filter = ""; + + /** + * ListReleasesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @instance + */ + ListReleasesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListReleasesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @static + * @param {google.cloud.deploy.v1.IListReleasesRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ListReleasesRequest} ListReleasesRequest instance + */ + ListReleasesRequest.create = function create(properties) { + return new ListReleasesRequest(properties); + }; + + /** + * Encodes the specified ListReleasesRequest message. Does not implicitly {@link google.cloud.deploy.v1.ListReleasesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @static + * @param {google.cloud.deploy.v1.IListReleasesRequest} message ListReleasesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReleasesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListReleasesRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListReleasesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @static + * @param {google.cloud.deploy.v1.IListReleasesRequest} message ListReleasesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReleasesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListReleasesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.ListReleasesRequest} ListReleasesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReleasesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListReleasesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 4: + message.filter = reader.string(); + break; + case 5: + message.orderBy = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListReleasesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.ListReleasesRequest} ListReleasesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReleasesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListReleasesRequest message. + * @function verify + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListReleasesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListReleasesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.ListReleasesRequest} ListReleasesRequest + */ + ListReleasesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ListReleasesRequest) + return object; + var message = new $root.google.cloud.deploy.v1.ListReleasesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListReleasesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @static + * @param {google.cloud.deploy.v1.ListReleasesRequest} message ListReleasesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListReleasesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListReleasesRequest to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @instance + * @returns {Object.} JSON object + */ + ListReleasesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListReleasesRequest; + })(); + + v1.ListReleasesResponse = (function() { + + /** + * Properties of a ListReleasesResponse. + * @memberof google.cloud.deploy.v1 + * @interface IListReleasesResponse + * @property {Array.|null} [releases] ListReleasesResponse releases + * @property {string|null} [nextPageToken] ListReleasesResponse nextPageToken + * @property {Array.|null} [unreachable] ListReleasesResponse unreachable + */ + + /** + * Constructs a new ListReleasesResponse. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a ListReleasesResponse. + * @implements IListReleasesResponse + * @constructor + * @param {google.cloud.deploy.v1.IListReleasesResponse=} [properties] Properties to set + */ + function ListReleasesResponse(properties) { + this.releases = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListReleasesResponse releases. + * @member {Array.} releases + * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @instance + */ + ListReleasesResponse.prototype.releases = $util.emptyArray; + + /** + * ListReleasesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @instance + */ + ListReleasesResponse.prototype.nextPageToken = ""; + + /** + * ListReleasesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @instance + */ + ListReleasesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListReleasesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @static + * @param {google.cloud.deploy.v1.IListReleasesResponse=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ListReleasesResponse} ListReleasesResponse instance + */ + ListReleasesResponse.create = function create(properties) { + return new ListReleasesResponse(properties); + }; + + /** + * Encodes the specified ListReleasesResponse message. Does not implicitly {@link google.cloud.deploy.v1.ListReleasesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @static + * @param {google.cloud.deploy.v1.IListReleasesResponse} message ListReleasesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReleasesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.releases != null && message.releases.length) + for (var i = 0; i < message.releases.length; ++i) + $root.google.cloud.deploy.v1.Release.encode(message.releases[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListReleasesResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListReleasesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @static + * @param {google.cloud.deploy.v1.IListReleasesResponse} message ListReleasesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReleasesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListReleasesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.ListReleasesResponse} ListReleasesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReleasesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListReleasesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.releases && message.releases.length)) + message.releases = []; + message.releases.push($root.google.cloud.deploy.v1.Release.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + case 3: + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListReleasesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.ListReleasesResponse} ListReleasesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReleasesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListReleasesResponse message. + * @function verify + * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListReleasesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.releases != null && message.hasOwnProperty("releases")) { + if (!Array.isArray(message.releases)) + return "releases: array expected"; + for (var i = 0; i < message.releases.length; ++i) { + var error = $root.google.cloud.deploy.v1.Release.verify(message.releases[i]); + if (error) + return "releases." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListReleasesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.ListReleasesResponse} ListReleasesResponse + */ + ListReleasesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ListReleasesResponse) + return object; + var message = new $root.google.cloud.deploy.v1.ListReleasesResponse(); + if (object.releases) { + if (!Array.isArray(object.releases)) + throw TypeError(".google.cloud.deploy.v1.ListReleasesResponse.releases: array expected"); + message.releases = []; + for (var i = 0; i < object.releases.length; ++i) { + if (typeof object.releases[i] !== "object") + throw TypeError(".google.cloud.deploy.v1.ListReleasesResponse.releases: object expected"); + message.releases[i] = $root.google.cloud.deploy.v1.Release.fromObject(object.releases[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.deploy.v1.ListReleasesResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListReleasesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @static + * @param {google.cloud.deploy.v1.ListReleasesResponse} message ListReleasesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListReleasesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.releases = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.releases && message.releases.length) { + object.releases = []; + for (var j = 0; j < message.releases.length; ++j) + object.releases[j] = $root.google.cloud.deploy.v1.Release.toObject(message.releases[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListReleasesResponse to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @instance + * @returns {Object.} JSON object + */ + ListReleasesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListReleasesResponse; + })(); + + v1.GetReleaseRequest = (function() { + + /** + * Properties of a GetReleaseRequest. + * @memberof google.cloud.deploy.v1 + * @interface IGetReleaseRequest + * @property {string|null} [name] GetReleaseRequest name + */ + + /** + * Constructs a new GetReleaseRequest. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a GetReleaseRequest. + * @implements IGetReleaseRequest + * @constructor + * @param {google.cloud.deploy.v1.IGetReleaseRequest=} [properties] Properties to set + */ + function GetReleaseRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetReleaseRequest name. + * @member {string} name + * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @instance + */ + GetReleaseRequest.prototype.name = ""; + + /** + * Creates a new GetReleaseRequest instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @static + * @param {google.cloud.deploy.v1.IGetReleaseRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.GetReleaseRequest} GetReleaseRequest instance + */ + GetReleaseRequest.create = function create(properties) { + return new GetReleaseRequest(properties); + }; + + /** + * Encodes the specified GetReleaseRequest message. Does not implicitly {@link google.cloud.deploy.v1.GetReleaseRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @static + * @param {google.cloud.deploy.v1.IGetReleaseRequest} message GetReleaseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetReleaseRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetReleaseRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GetReleaseRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @static + * @param {google.cloud.deploy.v1.IGetReleaseRequest} message GetReleaseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetReleaseRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetReleaseRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.GetReleaseRequest} GetReleaseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetReleaseRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.GetReleaseRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetReleaseRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.GetReleaseRequest} GetReleaseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetReleaseRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetReleaseRequest message. + * @function verify + * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetReleaseRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetReleaseRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.GetReleaseRequest} GetReleaseRequest + */ + GetReleaseRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.GetReleaseRequest) + return object; + var message = new $root.google.cloud.deploy.v1.GetReleaseRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetReleaseRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @static + * @param {google.cloud.deploy.v1.GetReleaseRequest} message GetReleaseRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetReleaseRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetReleaseRequest to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @instance + * @returns {Object.} JSON object + */ + GetReleaseRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetReleaseRequest; + })(); + + v1.CreateReleaseRequest = (function() { + + /** + * Properties of a CreateReleaseRequest. + * @memberof google.cloud.deploy.v1 + * @interface ICreateReleaseRequest + * @property {string|null} [parent] CreateReleaseRequest parent + * @property {string|null} [releaseId] CreateReleaseRequest releaseId + * @property {google.cloud.deploy.v1.IRelease|null} [release] CreateReleaseRequest release + * @property {string|null} [requestId] CreateReleaseRequest requestId + * @property {boolean|null} [validateOnly] CreateReleaseRequest validateOnly + */ + + /** + * Constructs a new CreateReleaseRequest. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a CreateReleaseRequest. + * @implements ICreateReleaseRequest + * @constructor + * @param {google.cloud.deploy.v1.ICreateReleaseRequest=} [properties] Properties to set + */ + function CreateReleaseRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateReleaseRequest parent. + * @member {string} parent + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @instance + */ + CreateReleaseRequest.prototype.parent = ""; + + /** + * CreateReleaseRequest releaseId. + * @member {string} releaseId + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @instance + */ + CreateReleaseRequest.prototype.releaseId = ""; + + /** + * CreateReleaseRequest release. + * @member {google.cloud.deploy.v1.IRelease|null|undefined} release + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @instance + */ + CreateReleaseRequest.prototype.release = null; + + /** + * CreateReleaseRequest requestId. + * @member {string} requestId + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @instance + */ + CreateReleaseRequest.prototype.requestId = ""; + + /** + * CreateReleaseRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @instance + */ + CreateReleaseRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateReleaseRequest instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @static + * @param {google.cloud.deploy.v1.ICreateReleaseRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.CreateReleaseRequest} CreateReleaseRequest instance + */ + CreateReleaseRequest.create = function create(properties) { + return new CreateReleaseRequest(properties); + }; + + /** + * Encodes the specified CreateReleaseRequest message. Does not implicitly {@link google.cloud.deploy.v1.CreateReleaseRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @static + * @param {google.cloud.deploy.v1.ICreateReleaseRequest} message CreateReleaseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateReleaseRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.releaseId != null && Object.hasOwnProperty.call(message, "releaseId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.releaseId); + if (message.release != null && Object.hasOwnProperty.call(message, "release")) + $root.google.cloud.deploy.v1.Release.encode(message.release, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreateReleaseRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CreateReleaseRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @static + * @param {google.cloud.deploy.v1.ICreateReleaseRequest} message CreateReleaseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateReleaseRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateReleaseRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.CreateReleaseRequest} CreateReleaseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateReleaseRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.CreateReleaseRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.releaseId = reader.string(); + break; + case 3: + message.release = $root.google.cloud.deploy.v1.Release.decode(reader, reader.uint32()); + break; + case 4: + message.requestId = reader.string(); + break; + case 5: + message.validateOnly = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateReleaseRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.CreateReleaseRequest} CreateReleaseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateReleaseRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateReleaseRequest message. + * @function verify + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateReleaseRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.releaseId != null && message.hasOwnProperty("releaseId")) + if (!$util.isString(message.releaseId)) + return "releaseId: string expected"; + if (message.release != null && message.hasOwnProperty("release")) { + var error = $root.google.cloud.deploy.v1.Release.verify(message.release); + if (error) + return "release." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateReleaseRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.CreateReleaseRequest} CreateReleaseRequest + */ + CreateReleaseRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.CreateReleaseRequest) + return object; + var message = new $root.google.cloud.deploy.v1.CreateReleaseRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.releaseId != null) + message.releaseId = String(object.releaseId); + if (object.release != null) { + if (typeof object.release !== "object") + throw TypeError(".google.cloud.deploy.v1.CreateReleaseRequest.release: object expected"); + message.release = $root.google.cloud.deploy.v1.Release.fromObject(object.release); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateReleaseRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @static + * @param {google.cloud.deploy.v1.CreateReleaseRequest} message CreateReleaseRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateReleaseRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.releaseId = ""; + object.release = null; + object.requestId = ""; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.releaseId != null && message.hasOwnProperty("releaseId")) + object.releaseId = message.releaseId; + if (message.release != null && message.hasOwnProperty("release")) + object.release = $root.google.cloud.deploy.v1.Release.toObject(message.release, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateReleaseRequest to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @instance + * @returns {Object.} JSON object + */ + CreateReleaseRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateReleaseRequest; + })(); + + v1.Rollout = (function() { + + /** + * Properties of a Rollout. + * @memberof google.cloud.deploy.v1 + * @interface IRollout + * @property {string|null} [name] Rollout name + * @property {string|null} [uid] Rollout uid + * @property {string|null} [description] Rollout description + * @property {Object.|null} [annotations] Rollout annotations + * @property {Object.|null} [labels] Rollout labels + * @property {google.protobuf.ITimestamp|null} [createTime] Rollout createTime + * @property {google.protobuf.ITimestamp|null} [approveTime] Rollout approveTime + * @property {google.protobuf.ITimestamp|null} [enqueueTime] Rollout enqueueTime + * @property {google.protobuf.ITimestamp|null} [deployStartTime] Rollout deployStartTime + * @property {google.protobuf.ITimestamp|null} [deployEndTime] Rollout deployEndTime + * @property {string|null} [targetId] Rollout targetId + * @property {google.cloud.deploy.v1.Rollout.ApprovalState|null} [approvalState] Rollout approvalState + * @property {google.cloud.deploy.v1.Rollout.State|null} [state] Rollout state + * @property {string|null} [failureReason] Rollout failureReason + * @property {string|null} [deployingBuild] Rollout deployingBuild + * @property {string|null} [etag] Rollout etag + */ + + /** + * Constructs a new Rollout. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a Rollout. + * @implements IRollout + * @constructor + * @param {google.cloud.deploy.v1.IRollout=} [properties] Properties to set + */ + function Rollout(properties) { + this.annotations = {}; + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Rollout name. + * @member {string} name + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.name = ""; + + /** + * Rollout uid. + * @member {string} uid + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.uid = ""; + + /** + * Rollout description. + * @member {string} description + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.description = ""; + + /** + * Rollout annotations. + * @member {Object.} annotations + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.annotations = $util.emptyObject; + + /** + * Rollout labels. + * @member {Object.} labels + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.labels = $util.emptyObject; + + /** + * Rollout createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.createTime = null; + + /** + * Rollout approveTime. + * @member {google.protobuf.ITimestamp|null|undefined} approveTime + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.approveTime = null; + + /** + * Rollout enqueueTime. + * @member {google.protobuf.ITimestamp|null|undefined} enqueueTime + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.enqueueTime = null; + + /** + * Rollout deployStartTime. + * @member {google.protobuf.ITimestamp|null|undefined} deployStartTime + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.deployStartTime = null; + + /** + * Rollout deployEndTime. + * @member {google.protobuf.ITimestamp|null|undefined} deployEndTime + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.deployEndTime = null; + + /** + * Rollout targetId. + * @member {string} targetId + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.targetId = ""; + + /** + * Rollout approvalState. + * @member {google.cloud.deploy.v1.Rollout.ApprovalState} approvalState + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.approvalState = 0; + + /** + * Rollout state. + * @member {google.cloud.deploy.v1.Rollout.State} state + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.state = 0; + + /** + * Rollout failureReason. + * @member {string} failureReason + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.failureReason = ""; + + /** + * Rollout deployingBuild. + * @member {string} deployingBuild + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.deployingBuild = ""; + + /** + * Rollout etag. + * @member {string} etag + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.etag = ""; + + /** + * Creates a new Rollout instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.Rollout + * @static + * @param {google.cloud.deploy.v1.IRollout=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.Rollout} Rollout instance + */ + Rollout.create = function create(properties) { + return new Rollout(properties); + }; + + /** + * Encodes the specified Rollout message. Does not implicitly {@link google.cloud.deploy.v1.Rollout.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.Rollout + * @static + * @param {google.cloud.deploy.v1.IRollout} message Rollout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Rollout.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) + for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.approveTime != null && Object.hasOwnProperty.call(message, "approveTime")) + $root.google.protobuf.Timestamp.encode(message.approveTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.enqueueTime != null && Object.hasOwnProperty.call(message, "enqueueTime")) + $root.google.protobuf.Timestamp.encode(message.enqueueTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.deployStartTime != null && Object.hasOwnProperty.call(message, "deployStartTime")) + $root.google.protobuf.Timestamp.encode(message.deployStartTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.deployEndTime != null && Object.hasOwnProperty.call(message, "deployEndTime")) + $root.google.protobuf.Timestamp.encode(message.deployEndTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.approvalState != null && Object.hasOwnProperty.call(message, "approvalState")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.approvalState); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.state); + if (message.failureReason != null && Object.hasOwnProperty.call(message, "failureReason")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.failureReason); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.etag); + if (message.deployingBuild != null && Object.hasOwnProperty.call(message, "deployingBuild")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.deployingBuild); + if (message.targetId != null && Object.hasOwnProperty.call(message, "targetId")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.targetId); + return writer; + }; + + /** + * Encodes the specified Rollout message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Rollout.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.Rollout + * @static + * @param {google.cloud.deploy.v1.IRollout} message Rollout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Rollout.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Rollout message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.Rollout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.Rollout} Rollout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Rollout.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Rollout(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.uid = reader.string(); + break; + case 3: + message.description = reader.string(); + break; + case 4: + if (message.annotations === $util.emptyObject) + message.annotations = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.annotations[key] = value; + break; + case 5: + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + case 6: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 7: + message.approveTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 8: + message.enqueueTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 9: + message.deployStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 10: + message.deployEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 18: + message.targetId = reader.string(); + break; + case 12: + message.approvalState = reader.int32(); + break; + case 13: + message.state = reader.int32(); + break; + case 14: + message.failureReason = reader.string(); + break; + case 17: + message.deployingBuild = reader.string(); + break; + case 16: + message.etag = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Rollout message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.Rollout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.Rollout} Rollout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Rollout.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Rollout message. + * @function verify + * @memberof google.cloud.deploy.v1.Rollout + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Rollout.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.annotations != null && message.hasOwnProperty("annotations")) { + if (!$util.isObject(message.annotations)) + return "annotations: object expected"; + var key = Object.keys(message.annotations); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.annotations[key[i]])) + return "annotations: string{k:string} expected"; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.approveTime != null && message.hasOwnProperty("approveTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.approveTime); + if (error) + return "approveTime." + error; + } + if (message.enqueueTime != null && message.hasOwnProperty("enqueueTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.enqueueTime); + if (error) + return "enqueueTime." + error; + } + if (message.deployStartTime != null && message.hasOwnProperty("deployStartTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.deployStartTime); + if (error) + return "deployStartTime." + error; + } + if (message.deployEndTime != null && message.hasOwnProperty("deployEndTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.deployEndTime); + if (error) + return "deployEndTime." + error; + } + if (message.targetId != null && message.hasOwnProperty("targetId")) + if (!$util.isString(message.targetId)) + return "targetId: string expected"; + if (message.approvalState != null && message.hasOwnProperty("approvalState")) + switch (message.approvalState) { + default: + return "approvalState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.failureReason != null && message.hasOwnProperty("failureReason")) + if (!$util.isString(message.failureReason)) + return "failureReason: string expected"; + if (message.deployingBuild != null && message.hasOwnProperty("deployingBuild")) + if (!$util.isString(message.deployingBuild)) + return "deployingBuild: string expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; + + /** + * Creates a Rollout message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.Rollout + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.Rollout} Rollout + */ + Rollout.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.Rollout) + return object; + var message = new $root.google.cloud.deploy.v1.Rollout(); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.description != null) + message.description = String(object.description); + if (object.annotations) { + if (typeof object.annotations !== "object") + throw TypeError(".google.cloud.deploy.v1.Rollout.annotations: object expected"); + message.annotations = {}; + for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) + message.annotations[keys[i]] = String(object.annotations[keys[i]]); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.deploy.v1.Rollout.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.deploy.v1.Rollout.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.approveTime != null) { + if (typeof object.approveTime !== "object") + throw TypeError(".google.cloud.deploy.v1.Rollout.approveTime: object expected"); + message.approveTime = $root.google.protobuf.Timestamp.fromObject(object.approveTime); + } + if (object.enqueueTime != null) { + if (typeof object.enqueueTime !== "object") + throw TypeError(".google.cloud.deploy.v1.Rollout.enqueueTime: object expected"); + message.enqueueTime = $root.google.protobuf.Timestamp.fromObject(object.enqueueTime); + } + if (object.deployStartTime != null) { + if (typeof object.deployStartTime !== "object") + throw TypeError(".google.cloud.deploy.v1.Rollout.deployStartTime: object expected"); + message.deployStartTime = $root.google.protobuf.Timestamp.fromObject(object.deployStartTime); + } + if (object.deployEndTime != null) { + if (typeof object.deployEndTime !== "object") + throw TypeError(".google.cloud.deploy.v1.Rollout.deployEndTime: object expected"); + message.deployEndTime = $root.google.protobuf.Timestamp.fromObject(object.deployEndTime); + } + if (object.targetId != null) + message.targetId = String(object.targetId); + switch (object.approvalState) { + case "APPROVAL_STATE_UNSPECIFIED": + case 0: + message.approvalState = 0; + break; + case "NEEDS_APPROVAL": + case 1: + message.approvalState = 1; + break; + case "DOES_NOT_NEED_APPROVAL": + case 2: + message.approvalState = 2; + break; + case "APPROVED": + case 3: + message.approvalState = 3; + break; + case "REJECTED": + case 4: + message.approvalState = 4; + break; + } + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "SUCCEEDED": + case 1: + message.state = 1; + break; + case "FAILED": + case 2: + message.state = 2; + break; + case "IN_PROGRESS": + case 3: + message.state = 3; + break; + case "PENDING_APPROVAL": + case 4: + message.state = 4; + break; + case "APPROVAL_REJECTED": + case 5: + message.state = 5; + break; + case "PENDING": + case 6: + message.state = 6; + break; + case "PENDING_RELEASE": + case 7: + message.state = 7; + break; + } + if (object.failureReason != null) + message.failureReason = String(object.failureReason); + if (object.deployingBuild != null) + message.deployingBuild = String(object.deployingBuild); + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; + + /** + * Creates a plain object from a Rollout message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.Rollout + * @static + * @param {google.cloud.deploy.v1.Rollout} message Rollout + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Rollout.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) { + object.annotations = {}; + object.labels = {}; + } + if (options.defaults) { + object.name = ""; + object.uid = ""; + object.description = ""; + object.createTime = null; + object.approveTime = null; + object.enqueueTime = null; + object.deployStartTime = null; + object.deployEndTime = null; + object.approvalState = options.enums === String ? "APPROVAL_STATE_UNSPECIFIED" : 0; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.failureReason = ""; + object.etag = ""; + object.deployingBuild = ""; + object.targetId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + var keys2; + if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { + object.annotations = {}; + for (var j = 0; j < keys2.length; ++j) + object.annotations[keys2[j]] = message.annotations[keys2[j]]; + } + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.approveTime != null && message.hasOwnProperty("approveTime")) + object.approveTime = $root.google.protobuf.Timestamp.toObject(message.approveTime, options); + if (message.enqueueTime != null && message.hasOwnProperty("enqueueTime")) + object.enqueueTime = $root.google.protobuf.Timestamp.toObject(message.enqueueTime, options); + if (message.deployStartTime != null && message.hasOwnProperty("deployStartTime")) + object.deployStartTime = $root.google.protobuf.Timestamp.toObject(message.deployStartTime, options); + if (message.deployEndTime != null && message.hasOwnProperty("deployEndTime")) + object.deployEndTime = $root.google.protobuf.Timestamp.toObject(message.deployEndTime, options); + if (message.approvalState != null && message.hasOwnProperty("approvalState")) + object.approvalState = options.enums === String ? $root.google.cloud.deploy.v1.Rollout.ApprovalState[message.approvalState] : message.approvalState; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.deploy.v1.Rollout.State[message.state] : message.state; + if (message.failureReason != null && message.hasOwnProperty("failureReason")) + object.failureReason = message.failureReason; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.deployingBuild != null && message.hasOwnProperty("deployingBuild")) + object.deployingBuild = message.deployingBuild; + if (message.targetId != null && message.hasOwnProperty("targetId")) + object.targetId = message.targetId; + return object; + }; + + /** + * Converts this Rollout to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.Rollout + * @instance + * @returns {Object.} JSON object + */ + Rollout.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * ApprovalState enum. + * @name google.cloud.deploy.v1.Rollout.ApprovalState + * @enum {number} + * @property {number} APPROVAL_STATE_UNSPECIFIED=0 APPROVAL_STATE_UNSPECIFIED value + * @property {number} NEEDS_APPROVAL=1 NEEDS_APPROVAL value + * @property {number} DOES_NOT_NEED_APPROVAL=2 DOES_NOT_NEED_APPROVAL value + * @property {number} APPROVED=3 APPROVED value + * @property {number} REJECTED=4 REJECTED value + */ + Rollout.ApprovalState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "APPROVAL_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NEEDS_APPROVAL"] = 1; + values[valuesById[2] = "DOES_NOT_NEED_APPROVAL"] = 2; + values[valuesById[3] = "APPROVED"] = 3; + values[valuesById[4] = "REJECTED"] = 4; + return values; + })(); + + /** + * State enum. + * @name google.cloud.deploy.v1.Rollout.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} SUCCEEDED=1 SUCCEEDED value + * @property {number} FAILED=2 FAILED value + * @property {number} IN_PROGRESS=3 IN_PROGRESS value + * @property {number} PENDING_APPROVAL=4 PENDING_APPROVAL value + * @property {number} APPROVAL_REJECTED=5 APPROVAL_REJECTED value + * @property {number} PENDING=6 PENDING value + * @property {number} PENDING_RELEASE=7 PENDING_RELEASE value + */ + Rollout.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SUCCEEDED"] = 1; + values[valuesById[2] = "FAILED"] = 2; + values[valuesById[3] = "IN_PROGRESS"] = 3; + values[valuesById[4] = "PENDING_APPROVAL"] = 4; + values[valuesById[5] = "APPROVAL_REJECTED"] = 5; + values[valuesById[6] = "PENDING"] = 6; + values[valuesById[7] = "PENDING_RELEASE"] = 7; + return values; + })(); + + return Rollout; + })(); + + v1.ListRolloutsRequest = (function() { + + /** + * Properties of a ListRolloutsRequest. + * @memberof google.cloud.deploy.v1 + * @interface IListRolloutsRequest + * @property {string|null} [parent] ListRolloutsRequest parent + * @property {number|null} [pageSize] ListRolloutsRequest pageSize + * @property {string|null} [pageToken] ListRolloutsRequest pageToken + * @property {string|null} [filter] ListRolloutsRequest filter + * @property {string|null} [orderBy] ListRolloutsRequest orderBy + */ + + /** + * Constructs a new ListRolloutsRequest. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a ListRolloutsRequest. + * @implements IListRolloutsRequest + * @constructor + * @param {google.cloud.deploy.v1.IListRolloutsRequest=} [properties] Properties to set + */ + function ListRolloutsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListRolloutsRequest parent. + * @member {string} parent + * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @instance + */ + ListRolloutsRequest.prototype.parent = ""; + + /** + * ListRolloutsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @instance + */ + ListRolloutsRequest.prototype.pageSize = 0; + + /** + * ListRolloutsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @instance + */ + ListRolloutsRequest.prototype.pageToken = ""; + + /** + * ListRolloutsRequest filter. + * @member {string} filter + * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @instance + */ + ListRolloutsRequest.prototype.filter = ""; + + /** + * ListRolloutsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @instance + */ + ListRolloutsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListRolloutsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @static + * @param {google.cloud.deploy.v1.IListRolloutsRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ListRolloutsRequest} ListRolloutsRequest instance + */ + ListRolloutsRequest.create = function create(properties) { + return new ListRolloutsRequest(properties); + }; + + /** + * Encodes the specified ListRolloutsRequest message. Does not implicitly {@link google.cloud.deploy.v1.ListRolloutsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @static + * @param {google.cloud.deploy.v1.IListRolloutsRequest} message ListRolloutsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRolloutsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListRolloutsRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListRolloutsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @static + * @param {google.cloud.deploy.v1.IListRolloutsRequest} message ListRolloutsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRolloutsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListRolloutsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.ListRolloutsRequest} ListRolloutsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRolloutsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListRolloutsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 4: + message.filter = reader.string(); + break; + case 5: + message.orderBy = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListRolloutsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.ListRolloutsRequest} ListRolloutsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRolloutsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListRolloutsRequest message. + * @function verify + * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListRolloutsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListRolloutsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.ListRolloutsRequest} ListRolloutsRequest + */ + ListRolloutsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ListRolloutsRequest) + return object; + var message = new $root.google.cloud.deploy.v1.ListRolloutsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListRolloutsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @static + * @param {google.cloud.deploy.v1.ListRolloutsRequest} message ListRolloutsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListRolloutsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListRolloutsRequest to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @instance + * @returns {Object.} JSON object + */ + ListRolloutsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListRolloutsRequest; + })(); + + v1.ListRolloutsResponse = (function() { + + /** + * Properties of a ListRolloutsResponse. + * @memberof google.cloud.deploy.v1 + * @interface IListRolloutsResponse + * @property {Array.|null} [rollouts] ListRolloutsResponse rollouts + * @property {string|null} [nextPageToken] ListRolloutsResponse nextPageToken + * @property {Array.|null} [unreachable] ListRolloutsResponse unreachable + */ + + /** + * Constructs a new ListRolloutsResponse. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a ListRolloutsResponse. + * @implements IListRolloutsResponse + * @constructor + * @param {google.cloud.deploy.v1.IListRolloutsResponse=} [properties] Properties to set + */ + function ListRolloutsResponse(properties) { + this.rollouts = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListRolloutsResponse rollouts. + * @member {Array.} rollouts + * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @instance + */ + ListRolloutsResponse.prototype.rollouts = $util.emptyArray; + + /** + * ListRolloutsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @instance + */ + ListRolloutsResponse.prototype.nextPageToken = ""; + + /** + * ListRolloutsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @instance + */ + ListRolloutsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListRolloutsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @static + * @param {google.cloud.deploy.v1.IListRolloutsResponse=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ListRolloutsResponse} ListRolloutsResponse instance + */ + ListRolloutsResponse.create = function create(properties) { + return new ListRolloutsResponse(properties); + }; + + /** + * Encodes the specified ListRolloutsResponse message. Does not implicitly {@link google.cloud.deploy.v1.ListRolloutsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @static + * @param {google.cloud.deploy.v1.IListRolloutsResponse} message ListRolloutsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRolloutsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rollouts != null && message.rollouts.length) + for (var i = 0; i < message.rollouts.length; ++i) + $root.google.cloud.deploy.v1.Rollout.encode(message.rollouts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListRolloutsResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListRolloutsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @static + * @param {google.cloud.deploy.v1.IListRolloutsResponse} message ListRolloutsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRolloutsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListRolloutsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.ListRolloutsResponse} ListRolloutsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRolloutsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListRolloutsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.rollouts && message.rollouts.length)) + message.rollouts = []; + message.rollouts.push($root.google.cloud.deploy.v1.Rollout.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + case 3: + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListRolloutsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.ListRolloutsResponse} ListRolloutsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRolloutsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListRolloutsResponse message. + * @function verify + * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListRolloutsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rollouts != null && message.hasOwnProperty("rollouts")) { + if (!Array.isArray(message.rollouts)) + return "rollouts: array expected"; + for (var i = 0; i < message.rollouts.length; ++i) { + var error = $root.google.cloud.deploy.v1.Rollout.verify(message.rollouts[i]); + if (error) + return "rollouts." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListRolloutsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.ListRolloutsResponse} ListRolloutsResponse + */ + ListRolloutsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ListRolloutsResponse) + return object; + var message = new $root.google.cloud.deploy.v1.ListRolloutsResponse(); + if (object.rollouts) { + if (!Array.isArray(object.rollouts)) + throw TypeError(".google.cloud.deploy.v1.ListRolloutsResponse.rollouts: array expected"); + message.rollouts = []; + for (var i = 0; i < object.rollouts.length; ++i) { + if (typeof object.rollouts[i] !== "object") + throw TypeError(".google.cloud.deploy.v1.ListRolloutsResponse.rollouts: object expected"); + message.rollouts[i] = $root.google.cloud.deploy.v1.Rollout.fromObject(object.rollouts[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.deploy.v1.ListRolloutsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListRolloutsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @static + * @param {google.cloud.deploy.v1.ListRolloutsResponse} message ListRolloutsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListRolloutsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.rollouts = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.rollouts && message.rollouts.length) { + object.rollouts = []; + for (var j = 0; j < message.rollouts.length; ++j) + object.rollouts[j] = $root.google.cloud.deploy.v1.Rollout.toObject(message.rollouts[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListRolloutsResponse to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @instance + * @returns {Object.} JSON object + */ + ListRolloutsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListRolloutsResponse; + })(); + + v1.GetRolloutRequest = (function() { + + /** + * Properties of a GetRolloutRequest. + * @memberof google.cloud.deploy.v1 + * @interface IGetRolloutRequest + * @property {string|null} [name] GetRolloutRequest name + */ + + /** + * Constructs a new GetRolloutRequest. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a GetRolloutRequest. + * @implements IGetRolloutRequest + * @constructor + * @param {google.cloud.deploy.v1.IGetRolloutRequest=} [properties] Properties to set + */ + function GetRolloutRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetRolloutRequest name. + * @member {string} name + * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @instance + */ + GetRolloutRequest.prototype.name = ""; + + /** + * Creates a new GetRolloutRequest instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @static + * @param {google.cloud.deploy.v1.IGetRolloutRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.GetRolloutRequest} GetRolloutRequest instance + */ + GetRolloutRequest.create = function create(properties) { + return new GetRolloutRequest(properties); + }; + + /** + * Encodes the specified GetRolloutRequest message. Does not implicitly {@link google.cloud.deploy.v1.GetRolloutRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @static + * @param {google.cloud.deploy.v1.IGetRolloutRequest} message GetRolloutRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRolloutRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetRolloutRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GetRolloutRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @static + * @param {google.cloud.deploy.v1.IGetRolloutRequest} message GetRolloutRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRolloutRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetRolloutRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.GetRolloutRequest} GetRolloutRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRolloutRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.GetRolloutRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetRolloutRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.GetRolloutRequest} GetRolloutRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRolloutRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetRolloutRequest message. + * @function verify + * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetRolloutRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetRolloutRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.GetRolloutRequest} GetRolloutRequest + */ + GetRolloutRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.GetRolloutRequest) + return object; + var message = new $root.google.cloud.deploy.v1.GetRolloutRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetRolloutRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @static + * @param {google.cloud.deploy.v1.GetRolloutRequest} message GetRolloutRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetRolloutRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetRolloutRequest to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @instance + * @returns {Object.} JSON object + */ + GetRolloutRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetRolloutRequest; + })(); + + v1.CreateRolloutRequest = (function() { + + /** + * Properties of a CreateRolloutRequest. + * @memberof google.cloud.deploy.v1 + * @interface ICreateRolloutRequest + * @property {string|null} [parent] CreateRolloutRequest parent + * @property {string|null} [rolloutId] CreateRolloutRequest rolloutId + * @property {google.cloud.deploy.v1.IRollout|null} [rollout] CreateRolloutRequest rollout + * @property {string|null} [requestId] CreateRolloutRequest requestId + * @property {boolean|null} [validateOnly] CreateRolloutRequest validateOnly + */ + + /** + * Constructs a new CreateRolloutRequest. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a CreateRolloutRequest. + * @implements ICreateRolloutRequest + * @constructor + * @param {google.cloud.deploy.v1.ICreateRolloutRequest=} [properties] Properties to set + */ + function CreateRolloutRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateRolloutRequest parent. + * @member {string} parent + * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @instance + */ + CreateRolloutRequest.prototype.parent = ""; + + /** + * CreateRolloutRequest rolloutId. + * @member {string} rolloutId + * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @instance + */ + CreateRolloutRequest.prototype.rolloutId = ""; + + /** + * CreateRolloutRequest rollout. + * @member {google.cloud.deploy.v1.IRollout|null|undefined} rollout + * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @instance + */ + CreateRolloutRequest.prototype.rollout = null; + + /** + * CreateRolloutRequest requestId. + * @member {string} requestId + * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @instance + */ + CreateRolloutRequest.prototype.requestId = ""; + + /** + * CreateRolloutRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @instance + */ + CreateRolloutRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateRolloutRequest instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @static + * @param {google.cloud.deploy.v1.ICreateRolloutRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.CreateRolloutRequest} CreateRolloutRequest instance + */ + CreateRolloutRequest.create = function create(properties) { + return new CreateRolloutRequest(properties); + }; + + /** + * Encodes the specified CreateRolloutRequest message. Does not implicitly {@link google.cloud.deploy.v1.CreateRolloutRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @static + * @param {google.cloud.deploy.v1.ICreateRolloutRequest} message CreateRolloutRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateRolloutRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.rolloutId != null && Object.hasOwnProperty.call(message, "rolloutId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.rolloutId); + if (message.rollout != null && Object.hasOwnProperty.call(message, "rollout")) + $root.google.cloud.deploy.v1.Rollout.encode(message.rollout, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreateRolloutRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CreateRolloutRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @static + * @param {google.cloud.deploy.v1.ICreateRolloutRequest} message CreateRolloutRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateRolloutRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateRolloutRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.CreateRolloutRequest} CreateRolloutRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateRolloutRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.CreateRolloutRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.rolloutId = reader.string(); + break; + case 3: + message.rollout = $root.google.cloud.deploy.v1.Rollout.decode(reader, reader.uint32()); + break; + case 4: + message.requestId = reader.string(); + break; + case 5: + message.validateOnly = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateRolloutRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.CreateRolloutRequest} CreateRolloutRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateRolloutRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateRolloutRequest message. + * @function verify + * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateRolloutRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.rolloutId != null && message.hasOwnProperty("rolloutId")) + if (!$util.isString(message.rolloutId)) + return "rolloutId: string expected"; + if (message.rollout != null && message.hasOwnProperty("rollout")) { + var error = $root.google.cloud.deploy.v1.Rollout.verify(message.rollout); + if (error) + return "rollout." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateRolloutRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.CreateRolloutRequest} CreateRolloutRequest + */ + CreateRolloutRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.CreateRolloutRequest) + return object; + var message = new $root.google.cloud.deploy.v1.CreateRolloutRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.rolloutId != null) + message.rolloutId = String(object.rolloutId); + if (object.rollout != null) { + if (typeof object.rollout !== "object") + throw TypeError(".google.cloud.deploy.v1.CreateRolloutRequest.rollout: object expected"); + message.rollout = $root.google.cloud.deploy.v1.Rollout.fromObject(object.rollout); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateRolloutRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @static + * @param {google.cloud.deploy.v1.CreateRolloutRequest} message CreateRolloutRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateRolloutRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.rolloutId = ""; + object.rollout = null; + object.requestId = ""; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.rolloutId != null && message.hasOwnProperty("rolloutId")) + object.rolloutId = message.rolloutId; + if (message.rollout != null && message.hasOwnProperty("rollout")) + object.rollout = $root.google.cloud.deploy.v1.Rollout.toObject(message.rollout, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateRolloutRequest to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @instance + * @returns {Object.} JSON object + */ + CreateRolloutRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateRolloutRequest; + })(); + + v1.OperationMetadata = (function() { + + /** + * Properties of an OperationMetadata. + * @memberof google.cloud.deploy.v1 + * @interface IOperationMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime + * @property {string|null} [target] OperationMetadata target + * @property {string|null} [verb] OperationMetadata verb + * @property {string|null} [statusMessage] OperationMetadata statusMessage + * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation + * @property {string|null} [apiVersion] OperationMetadata apiVersion + */ + + /** + * Constructs a new OperationMetadata. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata + * @constructor + * @param {google.cloud.deploy.v1.IOperationMetadata=} [properties] Properties to set + */ + function OperationMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.deploy.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.createTime = null; + + /** + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.deploy.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.endTime = null; + + /** + * OperationMetadata target. + * @member {string} target + * @memberof google.cloud.deploy.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.target = ""; + + /** + * OperationMetadata verb. + * @member {string} verb + * @memberof google.cloud.deploy.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.verb = ""; + + /** + * OperationMetadata statusMessage. + * @member {string} statusMessage + * @memberof google.cloud.deploy.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.statusMessage = ""; + + /** + * OperationMetadata requestedCancellation. + * @member {boolean} requestedCancellation + * @memberof google.cloud.deploy.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.requestedCancellation = false; + + /** + * OperationMetadata apiVersion. + * @member {string} apiVersion + * @memberof google.cloud.deploy.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.apiVersion = ""; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.OperationMetadata + * @static + * @param {google.cloud.deploy.v1.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.OperationMetadata} OperationMetadata instance + */ + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); + }; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.deploy.v1.OperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.OperationMetadata + * @static + * @param {google.cloud.deploy.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); + if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); + if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); + if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.requestedCancellation); + if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); + return writer; + }; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.OperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.OperationMetadata + * @static + * @param {google.cloud.deploy.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.OperationMetadata} OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.OperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 2: + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.target = reader.string(); + break; + case 4: + message.verb = reader.string(); + break; + case 5: + message.statusMessage = reader.string(); + break; + case 6: + message.requestedCancellation = reader.bool(); + break; + case 7: + message.apiVersion = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.OperationMetadata} OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationMetadata message. + * @function verify + * @memberof google.cloud.deploy.v1.OperationMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.target != null && message.hasOwnProperty("target")) + if (!$util.isString(message.target)) + return "target: string expected"; + if (message.verb != null && message.hasOwnProperty("verb")) + if (!$util.isString(message.verb)) + return "verb: string expected"; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + if (!$util.isString(message.statusMessage)) + return "statusMessage: string expected"; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + if (typeof message.requestedCancellation !== "boolean") + return "requestedCancellation: boolean expected"; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + if (!$util.isString(message.apiVersion)) + return "apiVersion: string expected"; + return null; + }; + + /** + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.OperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.OperationMetadata} OperationMetadata + */ + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.OperationMetadata) + return object; + var message = new $root.google.cloud.deploy.v1.OperationMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.deploy.v1.OperationMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.deploy.v1.OperationMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.target != null) + message.target = String(object.target); + if (object.verb != null) + message.verb = String(object.verb); + if (object.statusMessage != null) + message.statusMessage = String(object.statusMessage); + if (object.requestedCancellation != null) + message.requestedCancellation = Boolean(object.requestedCancellation); + if (object.apiVersion != null) + message.apiVersion = String(object.apiVersion); + return message; + }; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.OperationMetadata + * @static + * @param {google.cloud.deploy.v1.OperationMetadata} message OperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.target = ""; + object.verb = ""; + object.statusMessage = ""; + object.requestedCancellation = false; + object.apiVersion = ""; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = message.target; + if (message.verb != null && message.hasOwnProperty("verb")) + object.verb = message.verb; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + object.statusMessage = message.statusMessage; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + object.requestedCancellation = message.requestedCancellation; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + object.apiVersion = message.apiVersion; + return object; + }; + + /** + * Converts this OperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.OperationMetadata + * @instance + * @returns {Object.} JSON object + */ + OperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OperationMetadata; + })(); + + v1.ApproveRolloutRequest = (function() { + + /** + * Properties of an ApproveRolloutRequest. + * @memberof google.cloud.deploy.v1 + * @interface IApproveRolloutRequest + * @property {string|null} [name] ApproveRolloutRequest name + * @property {boolean|null} [approved] ApproveRolloutRequest approved + */ + + /** + * Constructs a new ApproveRolloutRequest. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents an ApproveRolloutRequest. + * @implements IApproveRolloutRequest + * @constructor + * @param {google.cloud.deploy.v1.IApproveRolloutRequest=} [properties] Properties to set + */ + function ApproveRolloutRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ApproveRolloutRequest name. + * @member {string} name + * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * @instance + */ + ApproveRolloutRequest.prototype.name = ""; + + /** + * ApproveRolloutRequest approved. + * @member {boolean} approved + * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * @instance + */ + ApproveRolloutRequest.prototype.approved = false; + + /** + * Creates a new ApproveRolloutRequest instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * @static + * @param {google.cloud.deploy.v1.IApproveRolloutRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ApproveRolloutRequest} ApproveRolloutRequest instance + */ + ApproveRolloutRequest.create = function create(properties) { + return new ApproveRolloutRequest(properties); + }; + + /** + * Encodes the specified ApproveRolloutRequest message. Does not implicitly {@link google.cloud.deploy.v1.ApproveRolloutRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * @static + * @param {google.cloud.deploy.v1.IApproveRolloutRequest} message ApproveRolloutRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ApproveRolloutRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.approved != null && Object.hasOwnProperty.call(message, "approved")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.approved); + return writer; + }; + + /** + * Encodes the specified ApproveRolloutRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ApproveRolloutRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * @static + * @param {google.cloud.deploy.v1.IApproveRolloutRequest} message ApproveRolloutRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ApproveRolloutRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ApproveRolloutRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.ApproveRolloutRequest} ApproveRolloutRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ApproveRolloutRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ApproveRolloutRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.approved = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ApproveRolloutRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.ApproveRolloutRequest} ApproveRolloutRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ApproveRolloutRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ApproveRolloutRequest message. + * @function verify + * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ApproveRolloutRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.approved != null && message.hasOwnProperty("approved")) + if (typeof message.approved !== "boolean") + return "approved: boolean expected"; + return null; + }; + + /** + * Creates an ApproveRolloutRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.ApproveRolloutRequest} ApproveRolloutRequest + */ + ApproveRolloutRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ApproveRolloutRequest) + return object; + var message = new $root.google.cloud.deploy.v1.ApproveRolloutRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.approved != null) + message.approved = Boolean(object.approved); + return message; + }; + + /** + * Creates a plain object from an ApproveRolloutRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * @static + * @param {google.cloud.deploy.v1.ApproveRolloutRequest} message ApproveRolloutRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ApproveRolloutRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.approved = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.approved != null && message.hasOwnProperty("approved")) + object.approved = message.approved; + return object; + }; + + /** + * Converts this ApproveRolloutRequest to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * @instance + * @returns {Object.} JSON object + */ + ApproveRolloutRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ApproveRolloutRequest; + })(); + + v1.ApproveRolloutResponse = (function() { + + /** + * Properties of an ApproveRolloutResponse. + * @memberof google.cloud.deploy.v1 + * @interface IApproveRolloutResponse + */ + + /** + * Constructs a new ApproveRolloutResponse. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents an ApproveRolloutResponse. + * @implements IApproveRolloutResponse + * @constructor + * @param {google.cloud.deploy.v1.IApproveRolloutResponse=} [properties] Properties to set + */ + function ApproveRolloutResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new ApproveRolloutResponse instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.ApproveRolloutResponse + * @static + * @param {google.cloud.deploy.v1.IApproveRolloutResponse=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ApproveRolloutResponse} ApproveRolloutResponse instance + */ + ApproveRolloutResponse.create = function create(properties) { + return new ApproveRolloutResponse(properties); + }; + + /** + * Encodes the specified ApproveRolloutResponse message. Does not implicitly {@link google.cloud.deploy.v1.ApproveRolloutResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.ApproveRolloutResponse + * @static + * @param {google.cloud.deploy.v1.IApproveRolloutResponse} message ApproveRolloutResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ApproveRolloutResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified ApproveRolloutResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ApproveRolloutResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.ApproveRolloutResponse + * @static + * @param {google.cloud.deploy.v1.IApproveRolloutResponse} message ApproveRolloutResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ApproveRolloutResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ApproveRolloutResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.ApproveRolloutResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.ApproveRolloutResponse} ApproveRolloutResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ApproveRolloutResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ApproveRolloutResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ApproveRolloutResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.ApproveRolloutResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.ApproveRolloutResponse} ApproveRolloutResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ApproveRolloutResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ApproveRolloutResponse message. + * @function verify + * @memberof google.cloud.deploy.v1.ApproveRolloutResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ApproveRolloutResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an ApproveRolloutResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.ApproveRolloutResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.ApproveRolloutResponse} ApproveRolloutResponse + */ + ApproveRolloutResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ApproveRolloutResponse) + return object; + return new $root.google.cloud.deploy.v1.ApproveRolloutResponse(); + }; + + /** + * Creates a plain object from an ApproveRolloutResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.ApproveRolloutResponse + * @static + * @param {google.cloud.deploy.v1.ApproveRolloutResponse} message ApproveRolloutResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ApproveRolloutResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this ApproveRolloutResponse to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.ApproveRolloutResponse + * @instance + * @returns {Object.} JSON object + */ + ApproveRolloutResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ApproveRolloutResponse; + })(); + + v1.Config = (function() { + + /** + * Properties of a Config. + * @memberof google.cloud.deploy.v1 + * @interface IConfig + * @property {string|null} [name] Config name + * @property {Array.|null} [supportedVersions] Config supportedVersions + * @property {string|null} [defaultSkaffoldVersion] Config defaultSkaffoldVersion + */ + + /** + * Constructs a new Config. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a Config. + * @implements IConfig + * @constructor + * @param {google.cloud.deploy.v1.IConfig=} [properties] Properties to set + */ + function Config(properties) { + this.supportedVersions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Config name. + * @member {string} name + * @memberof google.cloud.deploy.v1.Config + * @instance + */ + Config.prototype.name = ""; + + /** + * Config supportedVersions. + * @member {Array.} supportedVersions + * @memberof google.cloud.deploy.v1.Config + * @instance + */ + Config.prototype.supportedVersions = $util.emptyArray; + + /** + * Config defaultSkaffoldVersion. + * @member {string} defaultSkaffoldVersion + * @memberof google.cloud.deploy.v1.Config + * @instance + */ + Config.prototype.defaultSkaffoldVersion = ""; + + /** + * Creates a new Config instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.Config + * @static + * @param {google.cloud.deploy.v1.IConfig=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.Config} Config instance + */ + Config.create = function create(properties) { + return new Config(properties); + }; + + /** + * Encodes the specified Config message. Does not implicitly {@link google.cloud.deploy.v1.Config.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.Config + * @static + * @param {google.cloud.deploy.v1.IConfig} message Config message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Config.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.supportedVersions != null && message.supportedVersions.length) + for (var i = 0; i < message.supportedVersions.length; ++i) + $root.google.cloud.deploy.v1.SkaffoldVersion.encode(message.supportedVersions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.defaultSkaffoldVersion != null && Object.hasOwnProperty.call(message, "defaultSkaffoldVersion")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.defaultSkaffoldVersion); + return writer; + }; + + /** + * Encodes the specified Config message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Config.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.Config + * @static + * @param {google.cloud.deploy.v1.IConfig} message Config message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Config.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Config message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.Config + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.Config} Config + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Config.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Config(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.supportedVersions && message.supportedVersions.length)) + message.supportedVersions = []; + message.supportedVersions.push($root.google.cloud.deploy.v1.SkaffoldVersion.decode(reader, reader.uint32())); + break; + case 3: + message.defaultSkaffoldVersion = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Config message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.Config + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.Config} Config + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Config.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Config message. + * @function verify + * @memberof google.cloud.deploy.v1.Config + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Config.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.supportedVersions != null && message.hasOwnProperty("supportedVersions")) { + if (!Array.isArray(message.supportedVersions)) + return "supportedVersions: array expected"; + for (var i = 0; i < message.supportedVersions.length; ++i) { + var error = $root.google.cloud.deploy.v1.SkaffoldVersion.verify(message.supportedVersions[i]); + if (error) + return "supportedVersions." + error; + } + } + if (message.defaultSkaffoldVersion != null && message.hasOwnProperty("defaultSkaffoldVersion")) + if (!$util.isString(message.defaultSkaffoldVersion)) + return "defaultSkaffoldVersion: string expected"; + return null; + }; + + /** + * Creates a Config message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.Config + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.Config} Config + */ + Config.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.Config) + return object; + var message = new $root.google.cloud.deploy.v1.Config(); + if (object.name != null) + message.name = String(object.name); + if (object.supportedVersions) { + if (!Array.isArray(object.supportedVersions)) + throw TypeError(".google.cloud.deploy.v1.Config.supportedVersions: array expected"); + message.supportedVersions = []; + for (var i = 0; i < object.supportedVersions.length; ++i) { + if (typeof object.supportedVersions[i] !== "object") + throw TypeError(".google.cloud.deploy.v1.Config.supportedVersions: object expected"); + message.supportedVersions[i] = $root.google.cloud.deploy.v1.SkaffoldVersion.fromObject(object.supportedVersions[i]); + } + } + if (object.defaultSkaffoldVersion != null) + message.defaultSkaffoldVersion = String(object.defaultSkaffoldVersion); + return message; + }; + + /** + * Creates a plain object from a Config message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.Config + * @static + * @param {google.cloud.deploy.v1.Config} message Config + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Config.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.supportedVersions = []; + if (options.defaults) { + object.name = ""; + object.defaultSkaffoldVersion = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.supportedVersions && message.supportedVersions.length) { + object.supportedVersions = []; + for (var j = 0; j < message.supportedVersions.length; ++j) + object.supportedVersions[j] = $root.google.cloud.deploy.v1.SkaffoldVersion.toObject(message.supportedVersions[j], options); + } + if (message.defaultSkaffoldVersion != null && message.hasOwnProperty("defaultSkaffoldVersion")) + object.defaultSkaffoldVersion = message.defaultSkaffoldVersion; + return object; + }; + + /** + * Converts this Config to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.Config + * @instance + * @returns {Object.} JSON object + */ + Config.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Config; + })(); + + v1.SkaffoldVersion = (function() { + + /** + * Properties of a SkaffoldVersion. + * @memberof google.cloud.deploy.v1 + * @interface ISkaffoldVersion + * @property {string|null} [version] SkaffoldVersion version + * @property {google.type.IDate|null} [supportEndDate] SkaffoldVersion supportEndDate + */ + + /** + * Constructs a new SkaffoldVersion. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a SkaffoldVersion. + * @implements ISkaffoldVersion + * @constructor + * @param {google.cloud.deploy.v1.ISkaffoldVersion=} [properties] Properties to set + */ + function SkaffoldVersion(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SkaffoldVersion version. + * @member {string} version + * @memberof google.cloud.deploy.v1.SkaffoldVersion + * @instance + */ + SkaffoldVersion.prototype.version = ""; + + /** + * SkaffoldVersion supportEndDate. + * @member {google.type.IDate|null|undefined} supportEndDate + * @memberof google.cloud.deploy.v1.SkaffoldVersion + * @instance + */ + SkaffoldVersion.prototype.supportEndDate = null; + + /** + * Creates a new SkaffoldVersion instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.SkaffoldVersion + * @static + * @param {google.cloud.deploy.v1.ISkaffoldVersion=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.SkaffoldVersion} SkaffoldVersion instance + */ + SkaffoldVersion.create = function create(properties) { + return new SkaffoldVersion(properties); + }; + + /** + * Encodes the specified SkaffoldVersion message. Does not implicitly {@link google.cloud.deploy.v1.SkaffoldVersion.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.SkaffoldVersion + * @static + * @param {google.cloud.deploy.v1.ISkaffoldVersion} message SkaffoldVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SkaffoldVersion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.supportEndDate != null && Object.hasOwnProperty.call(message, "supportEndDate")) + $root.google.type.Date.encode(message.supportEndDate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SkaffoldVersion message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.SkaffoldVersion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.SkaffoldVersion + * @static + * @param {google.cloud.deploy.v1.ISkaffoldVersion} message SkaffoldVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SkaffoldVersion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SkaffoldVersion message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.SkaffoldVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.SkaffoldVersion} SkaffoldVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SkaffoldVersion.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.SkaffoldVersion(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.version = reader.string(); + break; + case 2: + message.supportEndDate = $root.google.type.Date.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SkaffoldVersion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.SkaffoldVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.SkaffoldVersion} SkaffoldVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SkaffoldVersion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SkaffoldVersion message. + * @function verify + * @memberof google.cloud.deploy.v1.SkaffoldVersion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SkaffoldVersion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.supportEndDate != null && message.hasOwnProperty("supportEndDate")) { + var error = $root.google.type.Date.verify(message.supportEndDate); + if (error) + return "supportEndDate." + error; + } + return null; + }; + + /** + * Creates a SkaffoldVersion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.SkaffoldVersion + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.SkaffoldVersion} SkaffoldVersion + */ + SkaffoldVersion.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.SkaffoldVersion) + return object; + var message = new $root.google.cloud.deploy.v1.SkaffoldVersion(); + if (object.version != null) + message.version = String(object.version); + if (object.supportEndDate != null) { + if (typeof object.supportEndDate !== "object") + throw TypeError(".google.cloud.deploy.v1.SkaffoldVersion.supportEndDate: object expected"); + message.supportEndDate = $root.google.type.Date.fromObject(object.supportEndDate); + } + return message; + }; + + /** + * Creates a plain object from a SkaffoldVersion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.SkaffoldVersion + * @static + * @param {google.cloud.deploy.v1.SkaffoldVersion} message SkaffoldVersion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SkaffoldVersion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + object.supportEndDate = null; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.supportEndDate != null && message.hasOwnProperty("supportEndDate")) + object.supportEndDate = $root.google.type.Date.toObject(message.supportEndDate, options); + return object; + }; + + /** + * Converts this SkaffoldVersion to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.SkaffoldVersion + * @instance + * @returns {Object.} JSON object + */ + SkaffoldVersion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SkaffoldVersion; + })(); + + v1.GetConfigRequest = (function() { + + /** + * Properties of a GetConfigRequest. + * @memberof google.cloud.deploy.v1 + * @interface IGetConfigRequest + * @property {string|null} [name] GetConfigRequest name + */ + + /** + * Constructs a new GetConfigRequest. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a GetConfigRequest. + * @implements IGetConfigRequest + * @constructor + * @param {google.cloud.deploy.v1.IGetConfigRequest=} [properties] Properties to set + */ + function GetConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetConfigRequest name. + * @member {string} name + * @memberof google.cloud.deploy.v1.GetConfigRequest + * @instance + */ + GetConfigRequest.prototype.name = ""; + + /** + * Creates a new GetConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.GetConfigRequest + * @static + * @param {google.cloud.deploy.v1.IGetConfigRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.GetConfigRequest} GetConfigRequest instance + */ + GetConfigRequest.create = function create(properties) { + return new GetConfigRequest(properties); + }; + + /** + * Encodes the specified GetConfigRequest message. Does not implicitly {@link google.cloud.deploy.v1.GetConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.GetConfigRequest + * @static + * @param {google.cloud.deploy.v1.IGetConfigRequest} message GetConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetConfigRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetConfigRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GetConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.GetConfigRequest + * @static + * @param {google.cloud.deploy.v1.IGetConfigRequest} message GetConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.GetConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.GetConfigRequest} GetConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.GetConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.GetConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.GetConfigRequest} GetConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetConfigRequest message. + * @function verify + * @memberof google.cloud.deploy.v1.GetConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetConfigRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.GetConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.GetConfigRequest} GetConfigRequest + */ + GetConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.GetConfigRequest) + return object; + var message = new $root.google.cloud.deploy.v1.GetConfigRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.GetConfigRequest + * @static + * @param {google.cloud.deploy.v1.GetConfigRequest} message GetConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.GetConfigRequest + * @instance + * @returns {Object.} JSON object + */ + GetConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetConfigRequest; + })(); + + return v1; + })(); + + return deploy; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + case 2: + message.fullyDecodeReservedExpansion = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.selector = reader.string(); + break; + case 2: + message.get = reader.string(); + break; + case 3: + message.put = reader.string(); + break; + case 4: + message.post = reader.string(); + break; + case 5: + message["delete"] = reader.string(); + break; + case 6: + message.patch = reader.string(); + break; + case 8: + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + case 7: + message.body = reader.string(); + break; + case 12: + message.responseBody = reader.string(); + break; + case 11: + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.kind = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CustomHttpPattern; + })(); + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + return values; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + case 3: + message.nameField = reader.string(); + break; + case 4: + message.history = reader.int32(); + break; + case 5: + message.plural = reader.string(); + break; + case 6: + message.singular = reader.string(); + break; + case 10: + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + message.childType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResourceReference; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FileDescriptorSet; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message["package"] = reader.string(); + break; + case 3: + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + case 10: + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + case 11: + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + case 4: + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + case 7: + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 8: + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + case 9: + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + case 12: + message.syntax = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + case 8: + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + case 7: + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + case 9: + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + case 10: + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + case 3: + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 3: + message.number = reader.int32(); + break; + case 4: + message.label = reader.int32(); + break; + case 5: + message.type = reader.int32(); + break; + case 6: + message.typeName = reader.string(); + break; + case 2: + message.extendee = reader.string(); + break; + case 7: + message.defaultValue = reader.string(); + break; + case 9: + message.oneofIndex = reader.int32(); + break; + case 10: + message.jsonName = reader.string(); + break; + case 8: + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + case 17: + message.proto3Optional = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + } + switch (object.type) { + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.number = reader.int32(); + break; + case 3: + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.inputType = reader.string(); + break; + case 3: + message.outputType = reader.string(); + break; + case 4: + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + case 5: + message.clientStreaming = reader.bool(); + break; + case 6: + message.serverStreaming = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions phpGenericServices. + * @member {boolean} phpGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices")) + writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.javaPackage = reader.string(); + break; + case 8: + message.javaOuterClassname = reader.string(); + break; + case 10: + message.javaMultipleFiles = reader.bool(); + break; + case 20: + message.javaGenerateEqualsAndHash = reader.bool(); + break; + case 27: + message.javaStringCheckUtf8 = reader.bool(); + break; + case 9: + message.optimizeFor = reader.int32(); + break; + case 11: + message.goPackage = reader.string(); + break; + case 16: + message.ccGenericServices = reader.bool(); + break; + case 17: + message.javaGenericServices = reader.bool(); + break; + case 18: + message.pyGenericServices = reader.bool(); + break; + case 42: + message.phpGenericServices = reader.bool(); + break; + case 23: + message.deprecated = reader.bool(); + break; + case 31: + message.ccEnableArenas = reader.bool(); + break; + case 36: + message.objcClassPrefix = reader.string(); + break; + case 37: + message.csharpNamespace = reader.string(); + break; + case 39: + message.swiftPrefix = reader.string(); + break; + case 40: + message.phpClassPrefix = reader.string(); + break; + case 41: + message.phpNamespace = reader.string(); + break; + case 44: + message.phpMetadataNamespace = reader.string(); + break; + case 45: + message.rubyPackage = reader.string(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1053: + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + if (typeof message.phpGenericServices !== "boolean") + return "phpGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.phpGenericServices != null) + message.phpGenericServices = Boolean(object.phpGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpGenericServices = false; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + object.phpGenericServices = message.phpGenericServices; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.messageSetWireFormat = reader.bool(); + break; + case 2: + message.noStandardDescriptorAccessor = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 7: + message.mapEntry = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1053: + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) { + writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.int32(message[".google.api.fieldBehavior"][i]); + writer.ldelim(); + } + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.ctype = reader.int32(); + break; + case 2: + message.packed = reader.bool(); + break; + case 6: + message.jstype = reader.int32(); + break; + case 5: + message.lazy = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 10: + message.weak = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1052: + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + case 1055: + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object[".google.api.resourceReference"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.allowAlias = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.deprecated = false; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1049: + message[".google.api.defaultHost"] = reader.string(); + break; + case 1050: + message[".google.api.oauthScopes"] = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * MethodOptions .google.longrunning.operationInfo. + * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.longrunning.operationInfo"] = null; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) + $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 34: + message.idempotencyLevel = reader.int32(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 72295728: + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + case 1051: + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + case 1049: + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { + var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); + if (error) + return ".google.longrunning.operationInfo." + error; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + if (object[".google.longrunning.operationInfo"] != null) { + if (typeof object[".google.longrunning.operationInfo"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.longrunning.operationInfo"] = null; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) + object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + case 3: + message.identifierValue = reader.string(); + break; + case 4: + message.positiveIntValue = reader.uint64(); + break; + case 5: + message.negativeIntValue = reader.int64(); + break; + case 6: + message.doubleValue = reader.double(); + break; + case 7: + message.stringValue = reader.bytes(); + break; + case 8: + message.aggregateValue = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.namePart = reader.string(); + break; + case 2: + message.isExtension = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + case 2: + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + case 3: + message.leadingComments = reader.string(); + break; + case 4: + message.trailingComments = reader.string(); + break; + case 6: + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + case 2: + message.sourceFile = reader.string(); + break; + case 3: + message.begin = reader.int32(); + break; + case 4: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Any = (function() { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type_url = reader.string(); + break; + case 2: + message.value = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) + return object; + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Any; + })(); + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Duration; + })(); + + protobuf.Empty = (function() { + + /** + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty + */ + + /** + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set + */ + function Empty(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Empty instance using the specified properties. + * @function create + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + Empty.create = function create(properties) { + return new Empty(properties); + }; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @memberof google.protobuf.Empty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Empty; + })(); + + protobuf.FieldMask = (function() { + + /** + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ + + /** + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask + * @constructor + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + */ + function FieldMask(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @instance + */ + FieldMask.prototype.paths = $util.emptyArray; + + /** + * Creates a new FieldMask instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance + */ + FieldMask.create = function create(properties) { + return new FieldMask(properties); + }; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + return writer; + }; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldMask message. + * @function verify + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldMask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldMask} FieldMask + */ + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) + return object; + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.FieldMask} message FieldMask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; + + /** + * Converts this FieldMask to JSON. + * @function toJSON + * @memberof google.protobuf.FieldMask + * @instance + * @returns {Object.} JSON object + */ + FieldMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FieldMask; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Timestamp; + })(); + + return protobuf; + })(); + + google.longrunning = (function() { + + /** + * Namespace longrunning. + * @memberof google + * @namespace + */ + var longrunning = {}; + + longrunning.Operations = (function() { + + /** + * Constructs a new Operations service. + * @memberof google.longrunning + * @classdesc Represents an Operations + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Operations(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; + + /** + * Creates new Operations service using the specified rpc implementation. + * @function create + * @memberof google.longrunning.Operations + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Operations} RPC service. Useful where requests and/or responses are streamed. + */ + Operations.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.longrunning.Operations#listOperations}. + * @memberof google.longrunning.Operations + * @typedef ListOperationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.ListOperationsResponse} [response] ListOperationsResponse + */ + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @param {google.longrunning.Operations.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) { + return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); + }, "name", { value: "ListOperations" }); + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations#getOperation}. + * @memberof google.longrunning.Operations + * @typedef GetOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { + return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "GetOperation" }); + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations#deleteOperation}. + * @memberof google.longrunning.Operations + * @typedef DeleteOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { + return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteOperation" }); + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations#cancelOperation}. + * @memberof google.longrunning.Operations + * @typedef CancelOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @param {google.longrunning.Operations.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) { + return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelOperation" }); + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations#waitOperation}. + * @memberof google.longrunning.Operations + * @typedef WaitOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @param {google.longrunning.Operations.WaitOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) { + return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "WaitOperation" }); + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Operations; + })(); + + longrunning.Operation = (function() { + + /** + * Properties of an Operation. + * @memberof google.longrunning + * @interface IOperation + * @property {string|null} [name] Operation name + * @property {google.protobuf.IAny|null} [metadata] Operation metadata + * @property {boolean|null} [done] Operation done + * @property {google.rpc.IStatus|null} [error] Operation error + * @property {google.protobuf.IAny|null} [response] Operation response + */ + + /** + * Constructs a new Operation. + * @memberof google.longrunning + * @classdesc Represents an Operation. + * @implements IOperation + * @constructor + * @param {google.longrunning.IOperation=} [properties] Properties to set + */ + function Operation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Operation name. + * @member {string} name + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.name = ""; + + /** + * Operation metadata. + * @member {google.protobuf.IAny|null|undefined} metadata + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.metadata = null; + + /** + * Operation done. + * @member {boolean} done + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.done = false; + + /** + * Operation error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.error = null; + + /** + * Operation response. + * @member {google.protobuf.IAny|null|undefined} response + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.response = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Operation result. + * @member {"error"|"response"|undefined} result + * @memberof google.longrunning.Operation + * @instance + */ + Object.defineProperty(Operation.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["error", "response"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Operation instance using the specified properties. + * @function create + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation=} [properties] Properties to set + * @returns {google.longrunning.Operation} Operation instance + */ + Operation.create = function create(properties) { + return new Operation(properties); + }; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encode + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.done != null && Object.hasOwnProperty.call(message, "done")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.response != null && Object.hasOwnProperty.call(message, "response")) + $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 3: + message.done = reader.bool(); + break; + case 4: + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + case 5: + message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Operation message. + * @function verify + * @memberof google.longrunning.Operation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Operation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.protobuf.Any.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.done != null && message.hasOwnProperty("done")) + if (typeof message.done !== "boolean") + return "done: boolean expected"; + if (message.error != null && message.hasOwnProperty("error")) { + properties.result = 1; + { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + } + if (message.response != null && message.hasOwnProperty("response")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.protobuf.Any.verify(message.response); + if (error) + return "response." + error; + } + } + return null; + }; + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.Operation + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.Operation} Operation + */ + Operation.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.Operation) + return object; + var message = new $root.google.longrunning.Operation(); + if (object.name != null) + message.name = String(object.name); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.longrunning.Operation.metadata: object expected"); + message.metadata = $root.google.protobuf.Any.fromObject(object.metadata); + } + if (object.done != null) + message.done = Boolean(object.done); + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.longrunning.Operation.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + if (object.response != null) { + if (typeof object.response !== "object") + throw TypeError(".google.longrunning.Operation.response: object expected"); + message.response = $root.google.protobuf.Any.fromObject(object.response); + } + return message; + }; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.Operation} message Operation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Operation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.metadata = null; + object.done = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options); + if (message.done != null && message.hasOwnProperty("done")) + object.done = message.done; + if (message.error != null && message.hasOwnProperty("error")) { + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (options.oneofs) + object.result = "error"; + } + if (message.response != null && message.hasOwnProperty("response")) { + object.response = $root.google.protobuf.Any.toObject(message.response, options); + if (options.oneofs) + object.result = "response"; + } + return object; + }; + + /** + * Converts this Operation to JSON. + * @function toJSON + * @memberof google.longrunning.Operation + * @instance + * @returns {Object.} JSON object + */ + Operation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Operation; + })(); + + longrunning.GetOperationRequest = (function() { + + /** + * Properties of a GetOperationRequest. + * @memberof google.longrunning + * @interface IGetOperationRequest + * @property {string|null} [name] GetOperationRequest name + */ + + /** + * Constructs a new GetOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a GetOperationRequest. + * @implements IGetOperationRequest + * @constructor + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + */ + function GetOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetOperationRequest name. + * @member {string} name + * @memberof google.longrunning.GetOperationRequest + * @instance + */ + GetOperationRequest.prototype.name = ""; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance + */ + GetOperationRequest.create = function create(properties) { + return new GetOperationRequest(properties); + }; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOperationRequest message. + * @function verify + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + */ + GetOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.GetOperationRequest) + return object; + var message = new $root.google.longrunning.GetOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.GetOperationRequest} message GetOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.GetOperationRequest + * @instance + * @returns {Object.} JSON object + */ + GetOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetOperationRequest; + })(); + + longrunning.ListOperationsRequest = (function() { + + /** + * Properties of a ListOperationsRequest. + * @memberof google.longrunning + * @interface IListOperationsRequest + * @property {string|null} [name] ListOperationsRequest name + * @property {string|null} [filter] ListOperationsRequest filter + * @property {number|null} [pageSize] ListOperationsRequest pageSize + * @property {string|null} [pageToken] ListOperationsRequest pageToken + */ + + /** + * Constructs a new ListOperationsRequest. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsRequest. + * @implements IListOperationsRequest + * @constructor + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + */ + function ListOperationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsRequest name. + * @member {string} name + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.name = ""; + + /** + * ListOperationsRequest filter. + * @member {string} filter + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.filter = ""; + + /** + * ListOperationsRequest pageSize. + * @member {number} pageSize + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageSize = 0; + + /** + * ListOperationsRequest pageToken. + * @member {string} pageToken + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest instance + */ + ListOperationsRequest.create = function create(properties) { + return new ListOperationsRequest(properties); + }; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + return writer; + }; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: + message.name = reader.string(); + break; + case 1: + message.filter = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsRequest message. + * @function verify + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + */ + ListOperationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsRequest) + return object; + var message = new $root.google.longrunning.ListOperationsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.ListOperationsRequest} message ListOperationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + object.name = ""; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this ListOperationsRequest to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListOperationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListOperationsRequest; + })(); + + longrunning.ListOperationsResponse = (function() { + + /** + * Properties of a ListOperationsResponse. + * @memberof google.longrunning + * @interface IListOperationsResponse + * @property {Array.|null} [operations] ListOperationsResponse operations + * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken + */ + + /** + * Constructs a new ListOperationsResponse. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsResponse. + * @implements IListOperationsResponse + * @constructor + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + */ + function ListOperationsResponse(properties) { + this.operations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsResponse operations. + * @member {Array.} operations + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.operations = $util.emptyArray; + + /** + * ListOperationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance + */ + ListOperationsResponse.create = function create(properties) { + return new ListOperationsResponse(properties); + }; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operations != null && message.operations.length) + for (var i = 0; i < message.operations.length; ++i) + $root.google.longrunning.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsResponse message. + * @function verify + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operations != null && message.hasOwnProperty("operations")) { + if (!Array.isArray(message.operations)) + return "operations: array expected"; + for (var i = 0; i < message.operations.length; ++i) { + var error = $root.google.longrunning.Operation.verify(message.operations[i]); + if (error) + return "operations." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + */ + ListOperationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsResponse) + return object; + var message = new $root.google.longrunning.ListOperationsResponse(); + if (object.operations) { + if (!Array.isArray(object.operations)) + throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected"); + message.operations = []; + for (var i = 0; i < object.operations.length; ++i) { + if (typeof object.operations[i] !== "object") + throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected"); + message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.operations = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.operations && message.operations.length) { + object.operations = []; + for (var j = 0; j < message.operations.length; ++j) + object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListOperationsResponse to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListOperationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListOperationsResponse; + })(); + + longrunning.CancelOperationRequest = (function() { + + /** + * Properties of a CancelOperationRequest. + * @memberof google.longrunning + * @interface ICancelOperationRequest + * @property {string|null} [name] CancelOperationRequest name + */ + + /** + * Constructs a new CancelOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a CancelOperationRequest. + * @implements ICancelOperationRequest + * @constructor + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + */ + function CancelOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelOperationRequest name. + * @member {string} name + * @memberof google.longrunning.CancelOperationRequest + * @instance + */ + CancelOperationRequest.prototype.name = ""; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance + */ + CancelOperationRequest.create = function create(properties) { + return new CancelOperationRequest(properties); + }; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelOperationRequest message. + * @function verify + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + */ + CancelOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.CancelOperationRequest) + return object; + var message = new $root.google.longrunning.CancelOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this CancelOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.CancelOperationRequest + * @instance + * @returns {Object.} JSON object + */ + CancelOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CancelOperationRequest; + })(); + + longrunning.DeleteOperationRequest = (function() { + + /** + * Properties of a DeleteOperationRequest. + * @memberof google.longrunning + * @interface IDeleteOperationRequest + * @property {string|null} [name] DeleteOperationRequest name + */ + + /** + * Constructs a new DeleteOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a DeleteOperationRequest. + * @implements IDeleteOperationRequest + * @constructor + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + */ + function DeleteOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteOperationRequest name. + * @member {string} name + * @memberof google.longrunning.DeleteOperationRequest + * @instance + */ + DeleteOperationRequest.prototype.name = ""; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance + */ + DeleteOperationRequest.create = function create(properties) { + return new DeleteOperationRequest(properties); + }; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteOperationRequest message. + * @function verify + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + */ + DeleteOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.DeleteOperationRequest) + return object; + var message = new $root.google.longrunning.DeleteOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.DeleteOperationRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteOperationRequest; + })(); + + longrunning.WaitOperationRequest = (function() { + + /** + * Properties of a WaitOperationRequest. + * @memberof google.longrunning + * @interface IWaitOperationRequest + * @property {string|null} [name] WaitOperationRequest name + * @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout + */ + + /** + * Constructs a new WaitOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a WaitOperationRequest. + * @implements IWaitOperationRequest + * @constructor + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + */ + function WaitOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WaitOperationRequest name. + * @member {string} name + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.name = ""; + + /** + * WaitOperationRequest timeout. + * @member {google.protobuf.IDuration|null|undefined} timeout + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.timeout = null; + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance + */ + WaitOperationRequest.create = function create(properties) { + return new WaitOperationRequest(properties); + }; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) + $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WaitOperationRequest message. + * @function verify + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WaitOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.timeout != null && message.hasOwnProperty("timeout")) { + var error = $root.google.protobuf.Duration.verify(message.timeout); + if (error) + return "timeout." + error; + } + return null; + }; + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + */ + WaitOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.WaitOperationRequest) + return object; + var message = new $root.google.longrunning.WaitOperationRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.timeout != null) { + if (typeof object.timeout !== "object") + throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected"); + message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); + } + return message; + }; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WaitOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.timeout = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.timeout != null && message.hasOwnProperty("timeout")) + object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); + return object; + }; + + /** + * Converts this WaitOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.WaitOperationRequest + * @instance + * @returns {Object.} JSON object + */ + WaitOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WaitOperationRequest; + })(); + + longrunning.OperationInfo = (function() { + + /** + * Properties of an OperationInfo. + * @memberof google.longrunning + * @interface IOperationInfo + * @property {string|null} [responseType] OperationInfo responseType + * @property {string|null} [metadataType] OperationInfo metadataType + */ + + /** + * Constructs a new OperationInfo. + * @memberof google.longrunning + * @classdesc Represents an OperationInfo. + * @implements IOperationInfo + * @constructor + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + */ + function OperationInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationInfo responseType. + * @member {string} responseType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.responseType = ""; + + /** + * OperationInfo metadataType. + * @member {string} metadataType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.metadataType = ""; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @function create + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + * @returns {google.longrunning.OperationInfo} OperationInfo instance + */ + OperationInfo.create = function create(properties) { + return new OperationInfo(properties); + }; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encode + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType); + if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType); + return writer; + }; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.responseType = reader.string(); + break; + case 2: + message.metadataType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationInfo message. + * @function verify + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.responseType != null && message.hasOwnProperty("responseType")) + if (!$util.isString(message.responseType)) + return "responseType: string expected"; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + if (!$util.isString(message.metadataType)) + return "metadataType: string expected"; + return null; + }; + + /** + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.OperationInfo} OperationInfo + */ + OperationInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.OperationInfo) + return object; + var message = new $root.google.longrunning.OperationInfo(); + if (object.responseType != null) + message.responseType = String(object.responseType); + if (object.metadataType != null) + message.metadataType = String(object.metadataType); + return message; + }; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.OperationInfo} message OperationInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.responseType = ""; + object.metadataType = ""; + } + if (message.responseType != null && message.hasOwnProperty("responseType")) + object.responseType = message.responseType; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + object.metadataType = message.metadataType; + return object; + }; + + /** + * Converts this OperationInfo to JSON. + * @function toJSON + * @memberof google.longrunning.OperationInfo + * @instance + * @returns {Object.} JSON object + */ + OperationInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OperationInfo; + })(); + + return longrunning; + })(); + + google.rpc = (function() { + + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; + + rpc.Status = (function() { + + /** + * Properties of a Status. + * @memberof google.rpc + * @interface IStatus + * @property {number|null} [code] Status code + * @property {string|null} [message] Status message + * @property {Array.|null} [details] Status details + */ + + /** + * Constructs a new Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus + * @constructor + * @param {google.rpc.IStatus=} [properties] Properties to set + */ + function Status(properties) { + this.details = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Status code. + * @member {number} code + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.code = 0; + + /** + * Status message. + * @member {string} message + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.message = ""; + + /** + * Status details. + * @member {Array.} details + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.details = $util.emptyArray; + + /** + * Creates a new Status instance using the specified properties. + * @function create + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus=} [properties] Properties to set + * @returns {google.rpc.Status} Status instance + */ + Status.create = function create(properties) { + return new Status(properties); + }; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encode + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.details != null && message.details.length) + for (var i = 0; i < message.details.length; ++i) + $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Status message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.code = reader.int32(); + break; + case 2: + message.message = reader.string(); + break; + case 3: + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Status message. + * @function verify + * @memberof google.rpc.Status + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Status.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.details != null && message.hasOwnProperty("details")) { + if (!Array.isArray(message.details)) + return "details: array expected"; + for (var i = 0; i < message.details.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.details[i]); + if (error) + return "details." + error; + } + } + return null; + }; + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.Status + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.Status} Status + */ + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) + return object; + var message = new $root.google.rpc.Status(); + if (object.code != null) + message.code = object.code | 0; + if (object.message != null) + message.message = String(object.message); + if (object.details) { + if (!Array.isArray(object.details)) + throw TypeError(".google.rpc.Status.details: array expected"); + message.details = []; + for (var i = 0; i < object.details.length; ++i) { + if (typeof object.details[i] !== "object") + throw TypeError(".google.rpc.Status.details: object expected"); + message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.Status + * @static + * @param {google.rpc.Status} message Status + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Status.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.details = []; + if (options.defaults) { + object.code = 0; + object.message = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.details && message.details.length) { + object.details = []; + for (var j = 0; j < message.details.length; ++j) + object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); + } + return object; + }; + + /** + * Converts this Status to JSON. + * @function toJSON + * @memberof google.rpc.Status + * @instance + * @returns {Object.} JSON object + */ + Status.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Status; + })(); + + return rpc; + })(); + + google.type = (function() { + + /** + * Namespace type. + * @memberof google + * @namespace + */ + var type = {}; + + type.Date = (function() { + + /** + * Properties of a Date. + * @memberof google.type + * @interface IDate + * @property {number|null} [year] Date year + * @property {number|null} [month] Date month + * @property {number|null} [day] Date day + */ + + /** + * Constructs a new Date. + * @memberof google.type + * @classdesc Represents a Date. + * @implements IDate + * @constructor + * @param {google.type.IDate=} [properties] Properties to set + */ + function Date(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Date year. + * @member {number} year + * @memberof google.type.Date + * @instance + */ + Date.prototype.year = 0; + + /** + * Date month. + * @member {number} month + * @memberof google.type.Date + * @instance + */ + Date.prototype.month = 0; + + /** + * Date day. + * @member {number} day + * @memberof google.type.Date + * @instance + */ + Date.prototype.day = 0; + + /** + * Creates a new Date instance using the specified properties. + * @function create + * @memberof google.type.Date + * @static + * @param {google.type.IDate=} [properties] Properties to set + * @returns {google.type.Date} Date instance + */ + Date.create = function create(properties) { + return new Date(properties); + }; + + /** + * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @function encode + * @memberof google.type.Date + * @static + * @param {google.type.IDate} message Date message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Date.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.year != null && Object.hasOwnProperty.call(message, "year")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.year); + if (message.month != null && Object.hasOwnProperty.call(message, "month")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.month); + if (message.day != null && Object.hasOwnProperty.call(message, "day")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.day); + return writer; + }; + + /** + * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @function encodeDelimited + * @memberof google.type.Date + * @static + * @param {google.type.IDate} message Date message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Date.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Date message from the specified reader or buffer. + * @function decode + * @memberof google.type.Date + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.type.Date} Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Date.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Date(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.year = reader.int32(); + break; + case 2: + message.month = reader.int32(); + break; + case 3: + message.day = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Date message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.type.Date + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.type.Date} Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Date.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Date message. + * @function verify + * @memberof google.type.Date + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Date.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.year != null && message.hasOwnProperty("year")) + if (!$util.isInteger(message.year)) + return "year: integer expected"; + if (message.month != null && message.hasOwnProperty("month")) + if (!$util.isInteger(message.month)) + return "month: integer expected"; + if (message.day != null && message.hasOwnProperty("day")) + if (!$util.isInteger(message.day)) + return "day: integer expected"; + return null; + }; + + /** + * Creates a Date message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.type.Date + * @static + * @param {Object.} object Plain object + * @returns {google.type.Date} Date + */ + Date.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.Date) + return object; + var message = new $root.google.type.Date(); + if (object.year != null) + message.year = object.year | 0; + if (object.month != null) + message.month = object.month | 0; + if (object.day != null) + message.day = object.day | 0; + return message; + }; + + /** + * Creates a plain object from a Date message. Also converts values to other types if specified. + * @function toObject + * @memberof google.type.Date + * @static + * @param {google.type.Date} message Date + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Date.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.year = 0; + object.month = 0; + object.day = 0; + } + if (message.year != null && message.hasOwnProperty("year")) + object.year = message.year; + if (message.month != null && message.hasOwnProperty("month")) + object.month = message.month; + if (message.day != null && message.hasOwnProperty("day")) + object.day = message.day; + return object; + }; + + /** + * Converts this Date to JSON. + * @function toJSON + * @memberof google.type.Date + * @instance + * @returns {Object.} JSON object + */ + Date.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Date; + })(); + + return type; + })(); + + return google; + })(); + + return $root; +}); diff --git a/packages/google-cloud-deploy/protos/protos.json b/packages/google-cloud-deploy/protos/protos.json new file mode 100644 index 00000000000..d72cb778101 --- /dev/null +++ b/packages/google-cloud-deploy/protos/protos.json @@ -0,0 +1,3249 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "deploy": { + "nested": { + "v1": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/cloud/deploy/v1;deploy", + "java_multiple_files": true, + "java_outer_classname": "CloudDeployProto", + "java_package": "com.google.cloud.deploy.v1", + "(google.api.resource_definition).type": "cloudbuild.googleapis.com/WorkerPool", + "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/workerPools/{worker_pool}" + }, + "nested": { + "CloudDeploy": { + "options": { + "(google.api.default_host)": "clouddeploy.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListDeliveryPipelines": { + "requestType": "ListDeliveryPipelinesRequest", + "responseType": "ListDeliveryPipelinesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/deliveryPipelines", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/deliveryPipelines" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetDeliveryPipeline": { + "requestType": "GetDeliveryPipelineRequest", + "responseType": "DeliveryPipeline", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/deliveryPipelines/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/deliveryPipelines/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateDeliveryPipeline": { + "requestType": "CreateDeliveryPipelineRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/deliveryPipelines", + "(google.api.http).body": "delivery_pipeline", + "(google.api.method_signature)": "parent,delivery_pipeline,delivery_pipeline_id", + "(google.longrunning.operation_info).response_type": "DeliveryPipeline", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/deliveryPipelines", + "body": "delivery_pipeline" + } + }, + { + "(google.api.method_signature)": "parent,delivery_pipeline,delivery_pipeline_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "DeliveryPipeline", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateDeliveryPipeline": { + "requestType": "UpdateDeliveryPipelineRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{delivery_pipeline.name=projects/*/locations/*/deliveryPipelines/*}", + "(google.api.http).body": "delivery_pipeline", + "(google.api.method_signature)": "delivery_pipeline,update_mask", + "(google.longrunning.operation_info).response_type": "DeliveryPipeline", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{delivery_pipeline.name=projects/*/locations/*/deliveryPipelines/*}", + "body": "delivery_pipeline" + } + }, + { + "(google.api.method_signature)": "delivery_pipeline,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "DeliveryPipeline", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteDeliveryPipeline": { + "requestType": "DeleteDeliveryPipelineRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/deliveryPipelines/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/deliveryPipelines/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListTargets": { + "requestType": "ListTargetsRequest", + "responseType": "ListTargetsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/targets", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/targets" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetTarget": { + "requestType": "GetTargetRequest", + "responseType": "Target", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/targets/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/targets/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateTarget": { + "requestType": "CreateTargetRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/targets", + "(google.api.http).body": "target", + "(google.api.method_signature)": "parent,target,target_id", + "(google.longrunning.operation_info).response_type": "Target", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/targets", + "body": "target" + } + }, + { + "(google.api.method_signature)": "parent,target,target_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Target", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateTarget": { + "requestType": "UpdateTargetRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{target.name=projects/*/locations/*/targets/*}", + "(google.api.http).body": "target", + "(google.api.method_signature)": "target,update_mask", + "(google.longrunning.operation_info).response_type": "Target", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{target.name=projects/*/locations/*/targets/*}", + "body": "target" + } + }, + { + "(google.api.method_signature)": "target,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Target", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteTarget": { + "requestType": "DeleteTargetRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/targets/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/targets/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListReleases": { + "requestType": "ListReleasesRequest", + "responseType": "ListReleasesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/releases", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/releases" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetRelease": { + "requestType": "GetReleaseRequest", + "responseType": "Release", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateRelease": { + "requestType": "CreateReleaseRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/releases", + "(google.api.http).body": "release", + "(google.api.method_signature)": "parent,release,release_id", + "(google.longrunning.operation_info).response_type": "Release", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/releases", + "body": "release" + } + }, + { + "(google.api.method_signature)": "parent,release,release_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Release", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ApproveRollout": { + "requestType": "ApproveRolloutRequest", + "responseType": "ApproveRolloutResponse", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}:approve", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}:approve", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListRollouts": { + "requestType": "ListRolloutsRequest", + "responseType": "ListRolloutsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/deliveryPipelines/*/releases/*}/rollouts", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/deliveryPipelines/*/releases/*}/rollouts" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetRollout": { + "requestType": "GetRolloutRequest", + "responseType": "Rollout", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateRollout": { + "requestType": "CreateRolloutRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/deliveryPipelines/*/releases/*}/rollouts", + "(google.api.http).body": "rollout", + "(google.api.method_signature)": "parent,rollout,rollout_id", + "(google.longrunning.operation_info).response_type": "Rollout", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/deliveryPipelines/*/releases/*}/rollouts", + "body": "rollout" + } + }, + { + "(google.api.method_signature)": "parent,rollout,rollout_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Rollout", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetConfig": { + "requestType": "GetConfigRequest", + "responseType": "Config", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/config}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/config}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + } + } + }, + "DeliveryPipeline": { + "options": { + "(google.api.resource).type": "clouddeploy.googleapis.com/DeliveryPipeline", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}" + }, + "oneofs": { + "pipeline": { + "oneof": [ + "serialPipeline" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "uid": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 3 + }, + "annotations": { + "keyType": "string", + "type": "string", + "id": 4 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 5 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "serialPipeline": { + "type": "SerialPipeline", + "id": 8 + }, + "condition": { + "type": "PipelineCondition", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "etag": { + "type": "string", + "id": 10 + } + } + }, + "SerialPipeline": { + "fields": { + "stages": { + "rule": "repeated", + "type": "Stage", + "id": 1 + } + } + }, + "Stage": { + "fields": { + "targetId": { + "type": "string", + "id": 1 + }, + "profiles": { + "rule": "repeated", + "type": "string", + "id": 2 + } + } + }, + "PipelineReadyCondition": { + "fields": { + "status": { + "type": "bool", + "id": 3 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + } + } + }, + "TargetsPresentCondition": { + "fields": { + "status": { + "type": "bool", + "id": 1 + }, + "missingTargets": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.resource_reference).type": "clouddeploy.googleapis.com/Target" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + } + } + }, + "PipelineCondition": { + "fields": { + "pipelineReadyCondition": { + "type": "PipelineReadyCondition", + "id": 1 + }, + "targetsPresentCondition": { + "type": "TargetsPresentCondition", + "id": 3 + } + } + }, + "ListDeliveryPipelinesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "clouddeploy.googleapis.com/DeliveryPipeline" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + }, + "orderBy": { + "type": "string", + "id": 5 + } + } + }, + "ListDeliveryPipelinesResponse": { + "fields": { + "deliveryPipelines": { + "rule": "repeated", + "type": "DeliveryPipeline", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetDeliveryPipelineRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "clouddeploy.googleapis.com/DeliveryPipeline" + } + } + } + }, + "CreateDeliveryPipelineRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "clouddeploy.googleapis.com/DeliveryPipeline" + } + }, + "deliveryPipelineId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "deliveryPipeline": { + "type": "DeliveryPipeline", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "validateOnly": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateDeliveryPipelineRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "deliveryPipeline": { + "type": "DeliveryPipeline", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allowMissing": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "validateOnly": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteDeliveryPipelineRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "clouddeploy.googleapis.com/DeliveryPipeline" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allowMissing": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "force": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "etag": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Target": { + "options": { + "(google.api.resource).type": "clouddeploy.googleapis.com/Target", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/targets/{target}" + }, + "oneofs": { + "deploymentTarget": { + "oneof": [ + "gke" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "targetId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "uid": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "annotations": { + "keyType": "string", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "requireApproval": { + "type": "bool", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "gke": { + "type": "GkeCluster", + "id": 15 + }, + "etag": { + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "executionConfigs": { + "rule": "repeated", + "type": "ExecutionConfig", + "id": 16 + } + } + }, + "ExecutionConfig": { + "oneofs": { + "executionEnvironment": { + "oneof": [ + "defaultPool", + "privatePool" + ] + } + }, + "fields": { + "usages": { + "rule": "repeated", + "type": "ExecutionEnvironmentUsage", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "defaultPool": { + "type": "DefaultPool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "privatePool": { + "type": "PrivatePool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "ExecutionEnvironmentUsage": { + "values": { + "EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED": 0, + "RENDER": 1, + "DEPLOY": 2 + } + } + } + }, + "DefaultPool": { + "fields": { + "serviceAccount": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "artifactStorage": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "PrivatePool": { + "fields": { + "workerPool": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudbuild.googleapis.com/WorkerPool" + } + }, + "serviceAccount": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "artifactStorage": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GkeCluster": { + "fields": { + "cluster": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "container.googleapis.com/Cluster" + } + } + } + }, + "ListTargetsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "clouddeploy.googleapis.com/Target" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListTargetsResponse": { + "fields": { + "targets": { + "rule": "repeated", + "type": "Target", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetTargetRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "clouddeploy.googleapis.com/Target" + } + } + } + }, + "CreateTargetRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "clouddeploy.googleapis.com/Target" + } + }, + "targetId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "target": { + "type": "Target", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "validateOnly": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateTargetRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "target": { + "type": "Target", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allowMissing": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "validateOnly": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteTargetRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "clouddeploy.googleapis.com/Target" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allowMissing": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "etag": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Release": { + "options": { + "(google.api.resource).type": "clouddeploy.googleapis.com/Release", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "uid": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 3 + }, + "annotations": { + "keyType": "string", + "type": "string", + "id": 4 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 5 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "renderStartTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "renderEndTime": { + "type": "google.protobuf.Timestamp", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "skaffoldConfigUri": { + "type": "string", + "id": 17 + }, + "skaffoldConfigPath": { + "type": "string", + "id": 9 + }, + "buildArtifacts": { + "rule": "repeated", + "type": "BuildArtifact", + "id": 10 + }, + "deliveryPipelineSnapshot": { + "type": "DeliveryPipeline", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "targetSnapshots": { + "rule": "repeated", + "type": "Target", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "renderState": { + "type": "RenderState", + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "etag": { + "type": "string", + "id": 16 + }, + "skaffoldVersion": { + "type": "string", + "id": 19 + }, + "targetArtifacts": { + "keyType": "string", + "type": "TargetArtifact", + "id": 20, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "targetRenders": { + "keyType": "string", + "type": "TargetRender", + "id": 22, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "TargetRender": { + "fields": { + "renderingBuild": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "cloudbuild.googleapis.com/Build" + } + }, + "renderingState": { + "type": "TargetRenderState", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "TargetRenderState": { + "values": { + "TARGET_RENDER_STATE_UNSPECIFIED": 0, + "SUCCEEDED": 1, + "FAILED": 2, + "IN_PROGRESS": 3 + } + } + } + }, + "RenderState": { + "values": { + "RENDER_STATE_UNSPECIFIED": 0, + "SUCCEEDED": 1, + "FAILED": 2, + "IN_PROGRESS": 3 + } + } + } + }, + "BuildArtifact": { + "fields": { + "image": { + "type": "string", + "id": 3 + }, + "tag": { + "type": "string", + "id": 2 + } + } + }, + "TargetArtifact": { + "oneofs": { + "uri": { + "oneof": [ + "artifactUri" + ] + } + }, + "fields": { + "artifactUri": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "skaffoldConfigPath": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "manifestPath": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ListReleasesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "clouddeploy.googleapis.com/DeliveryPipeline" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListReleasesResponse": { + "fields": { + "releases": { + "rule": "repeated", + "type": "Release", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetReleaseRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "clouddeploy.googleapis.com/Release" + } + } + } + }, + "CreateReleaseRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "clouddeploy.googleapis.com/DeliveryPipeline" + } + }, + "releaseId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "release": { + "type": "Release", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "validateOnly": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Rollout": { + "options": { + "(google.api.resource).type": "clouddeploy.googleapis.com/Rollout", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}/rollouts/{rollout}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "uid": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 3 + }, + "annotations": { + "keyType": "string", + "type": "string", + "id": 4 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 5 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "approveTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "enqueueTime": { + "type": "google.protobuf.Timestamp", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "deployStartTime": { + "type": "google.protobuf.Timestamp", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "deployEndTime": { + "type": "google.protobuf.Timestamp", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "targetId": { + "type": "string", + "id": 18, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "approvalState": { + "type": "ApprovalState", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "failureReason": { + "type": "string", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "deployingBuild": { + "type": "string", + "id": 17, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "cloudbuild.googleapis.com/Build" + } + }, + "etag": { + "type": "string", + "id": 16 + } + }, + "nested": { + "ApprovalState": { + "values": { + "APPROVAL_STATE_UNSPECIFIED": 0, + "NEEDS_APPROVAL": 1, + "DOES_NOT_NEED_APPROVAL": 2, + "APPROVED": 3, + "REJECTED": 4 + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "SUCCEEDED": 1, + "FAILED": 2, + "IN_PROGRESS": 3, + "PENDING_APPROVAL": 4, + "APPROVAL_REJECTED": 5, + "PENDING": 6, + "PENDING_RELEASE": 7 + } + } + } + }, + "ListRolloutsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "clouddeploy.googleapis.com/Release" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListRolloutsResponse": { + "fields": { + "rollouts": { + "rule": "repeated", + "type": "Rollout", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetRolloutRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "clouddeploy.googleapis.com/Rollout" + } + } + } + }, + "CreateRolloutRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "clouddeploy.googleapis.com/Release" + } + }, + "rolloutId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "rollout": { + "type": "Rollout", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "validateOnly": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "OperationMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "target": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "verb": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "statusMessage": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "requestedCancellation": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "apiVersion": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ApproveRolloutRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "clouddeploy.googleapis.com/Rollout" + } + }, + "approved": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ApproveRolloutResponse": { + "fields": {} + }, + "Config": { + "options": { + "(google.api.resource).type": "clouddeploy.googleapis.com/Config", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/config" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "supportedVersions": { + "rule": "repeated", + "type": "SkaffoldVersion", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "defaultSkaffoldVersion": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "SkaffoldVersion": { + "fields": { + "version": { + "type": "string", + "id": 1 + }, + "supportEndDate": { + "type": "google.type.Date", + "id": 2 + } + } + }, + "GetConfigRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "clouddeploy.googleapis.com/Config" + } + } + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "ResourceProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "FileDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + } + } + }, + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "FieldDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REQUIRED": 2, + "LABEL_REPEATED": 3 + } + } + } + }, + "OneofDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "phpGenericServices": { + "type": "bool", + "id": 42, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + } + } + }, + "OneofOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + } + } + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "longrunning": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.LongRunning", + "go_package": "google.golang.org/genproto/googleapis/longrunning;longrunning", + "java_multiple_files": true, + "java_outer_classname": "OperationsProto", + "java_package": "com.google.longrunning", + "php_namespace": "Google\\LongRunning" + }, + "nested": { + "operationInfo": { + "type": "google.longrunning.OperationInfo", + "id": 1049, + "extend": "google.protobuf.MethodOptions" + }, + "Operations": { + "options": { + "(google.api.default_host)": "longrunning.googleapis.com" + }, + "methods": { + "ListOperations": { + "requestType": "ListOperationsRequest", + "responseType": "ListOperationsResponse", + "options": { + "(google.api.http).get": "/v1/{name=operations}", + "(google.api.method_signature)": "name,filter" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations}" + } + }, + { + "(google.api.method_signature)": "name,filter" + } + ] + }, + "GetOperation": { + "requestType": "GetOperationRequest", + "responseType": "Operation", + "options": { + "(google.api.http).get": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteOperation": { + "requestType": "DeleteOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CancelOperation": { + "requestType": "CancelOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1/{name=operations/**}:cancel", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=operations/**}:cancel", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "WaitOperation": { + "requestType": "WaitOperationRequest", + "responseType": "Operation" + } + } + }, + "Operation": { + "oneofs": { + "result": { + "oneof": [ + "error", + "response" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "metadata": { + "type": "google.protobuf.Any", + "id": 2 + }, + "done": { + "type": "bool", + "id": 3 + }, + "error": { + "type": "google.rpc.Status", + "id": 4 + }, + "response": { + "type": "google.protobuf.Any", + "id": 5 + } + } + }, + "GetOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "ListOperationsRequest": { + "fields": { + "name": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListOperationsResponse": { + "fields": { + "operations": { + "rule": "repeated", + "type": "Operation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CancelOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "DeleteOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "WaitOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "timeout": { + "type": "google.protobuf.Duration", + "id": 2 + } + } + }, + "OperationInfo": { + "fields": { + "responseType": { + "type": "string", + "id": 1 + }, + "metadataType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "rpc": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", + "java_multiple_files": true, + "java_outer_classname": "StatusProto", + "java_package": "com.google.rpc", + "objc_class_prefix": "RPC" + }, + "nested": { + "Status": { + "fields": { + "code": { + "type": "int32", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "details": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 + } + } + } + } + }, + "type": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/type/date;date", + "java_multiple_files": true, + "java_outer_classname": "DateProto", + "java_package": "com.google.type", + "objc_class_prefix": "GTP" + }, + "nested": { + "Date": { + "fields": { + "year": { + "type": "int32", + "id": 1 + }, + "month": { + "type": "int32", + "id": 2 + }, + "day": { + "type": "int32", + "id": 3 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/google-cloud-deploy/samples/README.md b/packages/google-cloud-deploy/samples/README.md new file mode 100644 index 00000000000..dd19d7e5697 --- /dev/null +++ b/packages/google-cloud-deploy/samples/README.md @@ -0,0 +1,50 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [Google Cloud Deploy: Node.js Samples](https://github.com/googleapis/nodejs-deploy) + +[![Open in Cloud Shell][shell_img]][shell_link] + + + +## Table of Contents + +* [Before you begin](#before-you-begin) +* [Samples](#samples) + * [Quickstart](#quickstart) + +## Before you begin + +Before running the samples, make sure you've followed the steps outlined in +[Using the client library](https://github.com/googleapis/nodejs-deploy#using-the-client-library). + +`cd samples` + +`npm install` + +`cd ..` + +## Samples + + + +### Quickstart + +View the [source code](https://github.com/googleapis/nodejs-deploy/blob/main/samples/quickstart.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-deploy&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node samples/quickstart.js` + + + + + + +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-deploy&page=editor&open_in_editor=samples/README.md +[product-docs]: https://cloud.google.com/deploy/ diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.approve_rollout.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.approve_rollout.js new file mode 100644 index 00000000000..26681f90bdd --- /dev/null +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.approve_rollout.js @@ -0,0 +1,59 @@ +// Copyright 2021 Google LLC +// +// 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. + +'use strict'; + +function main(name, approved) { + // [START clouddeploy_v1_generated_CloudDeploy_ApproveRollout_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the Rollout. Format is + * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ + * releases/{release}/rollouts/{rollout}. + */ + // const name = 'abc123' + /** + * Required. True = approve; false = reject + */ + // const approved = true + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function approveRollout() { + // Construct request + const request = { + name, + approved, + }; + + // Run request + const response = await deployClient.approveRollout(request); + console.log(response); + } + + approveRollout(); + // [END clouddeploy_v1_generated_CloudDeploy_ApproveRollout_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js new file mode 100644 index 00000000000..33293df93ef --- /dev/null +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js @@ -0,0 +1,83 @@ +// Copyright 2021 Google LLC +// +// 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. + +'use strict'; + +function main(parent, deliveryPipelineId, deliveryPipeline) { + // [START clouddeploy_v1_generated_CloudDeploy_CreateDeliveryPipeline_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent collection in which the `DeliveryPipeline` should be created. + * Format should be projects/{project_id}/locations/{location_name}. + */ + // const parent = 'abc123' + /** + * Required. ID of the `DeliveryPipeline`. + */ + // const deliveryPipelineId = 'abc123' + /** + * Required. The `DeliveryPipeline` to create. + */ + // const deliveryPipeline = '' + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + /** + * Optional. If set to true, the request is validated and the user is provided with + * an expected result, but no actual change is made. + */ + // const validateOnly = true + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function createDeliveryPipeline() { + // Construct request + const request = { + parent, + deliveryPipelineId, + deliveryPipeline, + }; + + // Run request + const [operation] = await deployClient.createDeliveryPipeline(request); + const [response] = await operation.promise(); + console.log(response); + } + + createDeliveryPipeline(); + // [END clouddeploy_v1_generated_CloudDeploy_CreateDeliveryPipeline_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_release.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_release.js new file mode 100644 index 00000000000..f531182151e --- /dev/null +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_release.js @@ -0,0 +1,84 @@ +// Copyright 2021 Google LLC +// +// 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. + +'use strict'; + +function main(parent, releaseId, release) { + // [START clouddeploy_v1_generated_CloudDeploy_CreateRelease_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent collection in which the `Release` should be created. + * Format should be + * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. + */ + // const parent = 'abc123' + /** + * Required. ID of the `Release`. + */ + // const releaseId = 'abc123' + /** + * Required. The `Release` to create. + */ + // const release = '' + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + /** + * Optional. If set to true, the request is validated and the user is provided with + * an expected result, but no actual change is made. + */ + // const validateOnly = true + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function createRelease() { + // Construct request + const request = { + parent, + releaseId, + release, + }; + + // Run request + const [operation] = await deployClient.createRelease(request); + const [response] = await operation.promise(); + console.log(response); + } + + createRelease(); + // [END clouddeploy_v1_generated_CloudDeploy_CreateRelease_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_rollout.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_rollout.js new file mode 100644 index 00000000000..77f8ebc7a94 --- /dev/null +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_rollout.js @@ -0,0 +1,84 @@ +// Copyright 2021 Google LLC +// +// 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. + +'use strict'; + +function main(parent, rolloutId, rollout) { + // [START clouddeploy_v1_generated_CloudDeploy_CreateRollout_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent collection in which the `Rollout` should be created. + * Format should be + * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}. + */ + // const parent = 'abc123' + /** + * Required. ID of the `Rollout`. + */ + // const rolloutId = 'abc123' + /** + * Required. The `Rollout` to create. + */ + // const rollout = '' + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + /** + * Optional. If set to true, the request is validated and the user is provided with + * an expected result, but no actual change is made. + */ + // const validateOnly = true + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function createRollout() { + // Construct request + const request = { + parent, + rolloutId, + rollout, + }; + + // Run request + const [operation] = await deployClient.createRollout(request); + const [response] = await operation.promise(); + console.log(response); + } + + createRollout(); + // [END clouddeploy_v1_generated_CloudDeploy_CreateRollout_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_target.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_target.js new file mode 100644 index 00000000000..ffcdad0c210 --- /dev/null +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_target.js @@ -0,0 +1,84 @@ +// Copyright 2021 Google LLC +// +// 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. + +'use strict'; + +function main(parent, targetId, target) { + // [START clouddeploy_v1_generated_CloudDeploy_CreateTarget_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent collection in which the `Target` should be created. + * Format should be + * projects/{project_id}/locations/{location_name}. + */ + // const parent = 'abc123' + /** + * Required. ID of the `Target`. + */ + // const targetId = 'abc123' + /** + * Required. The `Target` to create. + */ + // const target = '' + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + /** + * Optional. If set to true, the request is validated and the user is provided with + * an expected result, but no actual change is made. + */ + // const validateOnly = true + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function createTarget() { + // Construct request + const request = { + parent, + targetId, + target, + }; + + // Run request + const [operation] = await deployClient.createTarget(request); + const [response] = await operation.promise(); + console.log(response); + } + + createTarget(); + // [END clouddeploy_v1_generated_CloudDeploy_CreateTarget_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js new file mode 100644 index 00000000000..3e8e363ac34 --- /dev/null +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js @@ -0,0 +1,90 @@ +// Copyright 2021 Google LLC +// +// 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. + +'use strict'; + +function main(name) { + // [START clouddeploy_v1_generated_CloudDeploy_DeleteDeliveryPipeline_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the `DeliveryPipeline` to delete. Format should be + * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. + */ + // const name = 'abc123' + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + /** + * Optional. If set to true, then deleting an already deleted or non-existing + * `DeliveryPipeline` will succeed. + */ + // const allowMissing = true + /** + * Optional. If set, validate the request and preview the review, but do not actually + * post it. + */ + // const validateOnly = true + /** + * Optional. If set to true, all child resources under this pipeline will also be + * deleted. Otherwise, the request will only work if the pipeline has + * no child resources. + */ + // const force = true + /** + * Optional. This checksum is computed by the server based on the value of other + * fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + */ + // const etag = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function deleteDeliveryPipeline() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await deployClient.deleteDeliveryPipeline(request); + const [response] = await operation.promise(); + console.log(response); + } + + deleteDeliveryPipeline(); + // [END clouddeploy_v1_generated_CloudDeploy_DeleteDeliveryPipeline_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_target.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_target.js new file mode 100644 index 00000000000..06889ad3cea --- /dev/null +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_target.js @@ -0,0 +1,84 @@ +// Copyright 2021 Google LLC +// +// 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. + +'use strict'; + +function main(name) { + // [START clouddeploy_v1_generated_CloudDeploy_DeleteTarget_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the `Target` to delete. Format should be + * projects/{project_id}/locations/{location_name}/targets/{target_name}. + */ + // const name = 'abc123' + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + /** + * Optional. If set to true, then deleting an already deleted or non-existing + * DeliveryPipeline will succeed. + */ + // const allowMissing = true + /** + * Optional. If set, validate the request and preview the review, but do not actually + * post it. + */ + // const validateOnly = true + /** + * Optional. This checksum is computed by the server based on the value of other + * fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + */ + // const etag = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function deleteTarget() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await deployClient.deleteTarget(request); + const [response] = await operation.promise(); + console.log(response); + } + + deleteTarget(); + // [END clouddeploy_v1_generated_CloudDeploy_DeleteTarget_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_config.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_config.js new file mode 100644 index 00000000000..d9609cddc07 --- /dev/null +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_config.js @@ -0,0 +1,52 @@ +// Copyright 2021 Google LLC +// +// 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. + +'use strict'; + +function main(name) { + // [START clouddeploy_v1_generated_CloudDeploy_GetConfig_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of requested configuration. + */ + // const name = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function getConfig() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await deployClient.getConfig(request); + console.log(response); + } + + getConfig(); + // [END clouddeploy_v1_generated_CloudDeploy_GetConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_delivery_pipeline.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_delivery_pipeline.js new file mode 100644 index 00000000000..8c1299e9ad7 --- /dev/null +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_delivery_pipeline.js @@ -0,0 +1,53 @@ +// Copyright 2021 Google LLC +// +// 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. + +'use strict'; + +function main(name) { + // [START clouddeploy_v1_generated_CloudDeploy_GetDeliveryPipeline_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the `DeliveryPipeline`. Format must be + * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. + */ + // const name = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function getDeliveryPipeline() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await deployClient.getDeliveryPipeline(request); + console.log(response); + } + + getDeliveryPipeline(); + // [END clouddeploy_v1_generated_CloudDeploy_GetDeliveryPipeline_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_release.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_release.js new file mode 100644 index 00000000000..c44910227a3 --- /dev/null +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_release.js @@ -0,0 +1,53 @@ +// Copyright 2021 Google LLC +// +// 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. + +'use strict'; + +function main(name) { + // [START clouddeploy_v1_generated_CloudDeploy_GetRelease_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the `Release`. Format must be + * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}. + */ + // const name = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function getRelease() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await deployClient.getRelease(request); + console.log(response); + } + + getRelease(); + // [END clouddeploy_v1_generated_CloudDeploy_GetRelease_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_rollout.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_rollout.js new file mode 100644 index 00000000000..d22c3ed4975 --- /dev/null +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_rollout.js @@ -0,0 +1,53 @@ +// Copyright 2021 Google LLC +// +// 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. + +'use strict'; + +function main(name) { + // [START clouddeploy_v1_generated_CloudDeploy_GetRollout_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the `Rollout`. Format must be + * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}. + */ + // const name = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function getRollout() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await deployClient.getRollout(request); + console.log(response); + } + + getRollout(); + // [END clouddeploy_v1_generated_CloudDeploy_GetRollout_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_target.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_target.js new file mode 100644 index 00000000000..ce605f3ba14 --- /dev/null +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_target.js @@ -0,0 +1,53 @@ +// Copyright 2021 Google LLC +// +// 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. + +'use strict'; + +function main(name) { + // [START clouddeploy_v1_generated_CloudDeploy_GetTarget_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the `Target`. Format must be + * projects/{project_id}/locations/{location_name}/targets/{target_name}. + */ + // const name = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function getTarget() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await deployClient.getTarget(request); + console.log(response); + } + + getTarget(); + // [END clouddeploy_v1_generated_CloudDeploy_GetTarget_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js new file mode 100644 index 00000000000..1e4d974d064 --- /dev/null +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js @@ -0,0 +1,78 @@ +// Copyright 2021 Google LLC +// +// 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. + +'use strict'; + +function main(parent) { + // [START clouddeploy_v1_generated_CloudDeploy_ListDeliveryPipelines_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of pipelines. Format must be + * projects/{project_id}/locations/{location_name}. + */ + // const parent = 'abc123' + /** + * The maximum number of pipelines to return. The service may return + * fewer than this value. If unspecified, at most 50 pipelines will + * be returned. The maximum value is 1000; values above 1000 will be set + * to 1000. + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListDeliveryPipelines` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other provided parameters match + * the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Filter builds to be returned. See https://google.aip.dev/160 for more + * details. + */ + // const filter = 'abc123' + /** + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + */ + // const orderBy = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function listDeliveryPipelines() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await deployClient.listDeliveryPipelinesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + listDeliveryPipelines(); + // [END clouddeploy_v1_generated_CloudDeploy_ListDeliveryPipelines_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_releases.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_releases.js new file mode 100644 index 00000000000..ef0a21a0cc0 --- /dev/null +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_releases.js @@ -0,0 +1,76 @@ +// Copyright 2021 Google LLC +// +// 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. + +'use strict'; + +function main(parent) { + // [START clouddeploy_v1_generated_CloudDeploy_ListReleases_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The `DeliveryPipeline` which owns this collection of `Release` objects. + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of `Release` objects to return. The service may return + * fewer than this value. If unspecified, at most 50 `Release` objects will be + * returned. The maximum value is 1000; values above 1000 will be set to 1000. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListReleases` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other provided parameters match + * the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more + * details. + */ + // const filter = 'abc123' + /** + * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details. + */ + // const orderBy = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function listReleases() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await deployClient.listReleasesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + listReleases(); + // [END clouddeploy_v1_generated_CloudDeploy_ListReleases_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_rollouts.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_rollouts.js new file mode 100644 index 00000000000..c1ad018e43d --- /dev/null +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_rollouts.js @@ -0,0 +1,76 @@ +// Copyright 2021 Google LLC +// +// 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. + +'use strict'; + +function main(parent) { + // [START clouddeploy_v1_generated_CloudDeploy_ListRollouts_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The `Release` which owns this collection of `Rollout` objects. + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of `Rollout` objects to return. The service may return + * fewer than this value. If unspecified, at most 50 `Rollout` objects will be + * returned. The maximum value is 1000; values above 1000 will be set to 1000. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListRollouts` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other provided parameters match + * the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more + * details. + */ + // const filter = 'abc123' + /** + * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details. + */ + // const orderBy = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function listRollouts() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await deployClient.listRolloutsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + listRollouts(); + // [END clouddeploy_v1_generated_CloudDeploy_ListRollouts_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_targets.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_targets.js new file mode 100644 index 00000000000..407789f3f13 --- /dev/null +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_targets.js @@ -0,0 +1,77 @@ +// Copyright 2021 Google LLC +// +// 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. + +'use strict'; + +function main(parent) { + // [START clouddeploy_v1_generated_CloudDeploy_ListTargets_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of targets. Format must be + * projects/{project_id}/locations/{location_name}. + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of `Target` objects to return. The service may return + * fewer than this value. If unspecified, at most 50 `Target` objects will be + * returned. The maximum value is 1000; values above 1000 will be set to 1000. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListTargets` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other provided parameters match + * the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more + * details. + */ + // const filter = 'abc123' + /** + * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details. + */ + // const orderBy = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function listTargets() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await deployClient.listTargetsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + listTargets(); + // [END clouddeploy_v1_generated_CloudDeploy_ListTargets_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js new file mode 100644 index 00000000000..a88782e76d9 --- /dev/null +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js @@ -0,0 +1,86 @@ +// Copyright 2021 Google LLC +// +// 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. + +'use strict'; + +function main(updateMask, deliveryPipeline) { + // [START clouddeploy_v1_generated_CloudDeploy_UpdateDeliveryPipeline_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `DeliveryPipeline` resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + */ + // const updateMask = '' + /** + * Required. The `DeliveryPipeline` to update. + */ + // const deliveryPipeline = '' + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + /** + * Optional. If set to true, updating a `DeliveryPipeline` that does not exist will + * result in the creation of a new `DeliveryPipeline`. + */ + // const allowMissing = true + /** + * Optional. If set to true, the request is validated and the user is provided with + * an expected result, but no actual change is made. + */ + // const validateOnly = true + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function updateDeliveryPipeline() { + // Construct request + const request = { + updateMask, + deliveryPipeline, + }; + + // Run request + const [operation] = await deployClient.updateDeliveryPipeline(request); + const [response] = await operation.promise(); + console.log(response); + } + + updateDeliveryPipeline(); + // [END clouddeploy_v1_generated_CloudDeploy_UpdateDeliveryPipeline_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_target.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_target.js new file mode 100644 index 00000000000..9569dd1bfa6 --- /dev/null +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_target.js @@ -0,0 +1,86 @@ +// Copyright 2021 Google LLC +// +// 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. + +'use strict'; + +function main(updateMask, target) { + // [START clouddeploy_v1_generated_CloudDeploy_UpdateTarget_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Target resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + */ + // const updateMask = '' + /** + * Required. The `Target` to update. + */ + // const target = '' + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + /** + * Optional. If set to true, updating a `Target` that does not exist will + * result in the creation of a new `Target`. + */ + // const allowMissing = true + /** + * Optional. If set to true, the request is validated and the user is provided with + * an expected result, but no actual change is made. + */ + // const validateOnly = true + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function updateTarget() { + // Construct request + const request = { + updateMask, + target, + }; + + // Run request + const [operation] = await deployClient.updateTarget(request); + const [response] = await operation.promise(); + console.log(response); + } + + updateTarget(); + // [END clouddeploy_v1_generated_CloudDeploy_UpdateTarget_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-deploy/samples/package.json b/packages/google-cloud-deploy/samples/package.json new file mode 100644 index 00000000000..4d6b851328e --- /dev/null +++ b/packages/google-cloud-deploy/samples/package.json @@ -0,0 +1,23 @@ +{ + "name": "nodejs-deploy", + "private": true, + "license": "Apache-2.0", + "author": "Google LLC", + "engines": { + "node": ">=10" + }, + "files": [ + "*.js" + ], + "scripts": { + "test": "c8 mocha --timeout 600000 test/*.js" + }, + "dependencies": { + "@google-cloud/deploy": "^0.1.0" + }, + "devDependencies": { + "c8": "^7.1.0", + "chai": "^4.2.0", + "mocha": "^8.0.0" + } +} diff --git a/packages/google-cloud-deploy/samples/quickstart.js b/packages/google-cloud-deploy/samples/quickstart.js new file mode 100644 index 00000000000..62c40ac106e --- /dev/null +++ b/packages/google-cloud-deploy/samples/quickstart.js @@ -0,0 +1,78 @@ +// Copyright 2021 Google LLC +// +// 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. + +'use strict'; + +function main(parent) { + // [START clouddeploy_quickstart] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of pipelines. Format must be + * projects/{project_id}/locations/{location_name}. + */ + // const parent = 'abc123' + /** + * The maximum number of pipelines to return. The service may return + * fewer than this value. If unspecified, at most 50 pipelines will + * be returned. The maximum value is 1000; values above 1000 will be set + * to 1000. + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListDeliveryPipelines` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other provided parameters match + * the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Filter builds to be returned. See https://google.aip.dev/160 for more + * details. + */ + // const filter = 'abc123' + /** + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + */ + // const orderBy = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function listDeliveryPipelines() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await deployClient.listDeliveryPipelinesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + listDeliveryPipelines(); + // [END clouddeploy_quickstart] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-deploy/samples/test/quickstart.js b/packages/google-cloud-deploy/samples/test/quickstart.js new file mode 100644 index 00000000000..3c783c46cc2 --- /dev/null +++ b/packages/google-cloud-deploy/samples/test/quickstart.js @@ -0,0 +1,48 @@ +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +const path = require('path'); +const cp = require('child_process'); +const {before, describe, it} = require('mocha'); +// eslint-disable-next-line node/no-missing-require +const {CloudDeployClient} = require('@google-cloud/deploy'); +// eslint-disable-next-line no-unused-vars, node/no-missing-require +const {assert} = require('chai'); + +const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); + +const cwd = path.join(__dirname, '..'); + +const client = new CloudDeployClient(); + +describe('Quickstart', () => { + let projectId; + + before(async () => { + projectId = await client.getProjectId(); + }); + + it('should run quickstart', async () => { + const stdout = execSync( + `node ./quickstart.js projects/${projectId}/locations/us-central1`, + {cwd} + ); + assert(stdout !== null); + }); +}); diff --git a/packages/google-cloud-deploy/src/index.ts b/packages/google-cloud-deploy/src/index.ts new file mode 100644 index 00000000000..8fcb5c66e0d --- /dev/null +++ b/packages/google-cloud-deploy/src/index.ts @@ -0,0 +1,27 @@ +// Copyright 2020 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by synthtool. ** +// ** https://github.com/googleapis/synthtool ** +// ** All changes to this file may be overwritten. ** + +import * as v1 from './v1'; + +const CloudDeployClient = v1.CloudDeployClient; +type CloudDeployClient = v1.CloudDeployClient; + +export {v1, CloudDeployClient}; +export default {v1, CloudDeployClient}; +import * as protos from '../protos/protos'; +export {protos}; diff --git a/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts b/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts new file mode 100644 index 00000000000..4fef6026581 --- /dev/null +++ b/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts @@ -0,0 +1,3768 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import * as gax from 'google-gax'; +import { + Callback, + CallOptions, + Descriptors, + ClientOptions, + LROperation, + PaginationCallback, + GaxCall, +} from 'google-gax'; + +import {Transform} from 'stream'; +import {RequestType} from 'google-gax/build/src/apitypes'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1/cloud_deploy_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './cloud_deploy_client_config.json'; +import {operationsProtos} from 'google-gax'; +const version = require('../../../package.json').version; + +/** + * CloudDeploy service creates and manages Continuous Delivery operations + * on Google Cloud Platform via Skaffold (https://skaffold.dev). + * @class + * @memberof v1 + */ +export class CloudDeployClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + cloudDeployStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of CloudDeployClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. + * In fallback mode, a special browser-compatible transport implementation is used + * instead of gRPC transport. In browser context (if the `window` object is defined) + * the fallback mode is enabled automatically; set `options.fallback` to `false` + * if you need to override this behavior. + */ + constructor(opts?: ClientOptions) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof CloudDeployClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gax.fallback : gax; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + buildPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/builds/{build}' + ), + clusterPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/clusters/{cluster}' + ), + configPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/config' + ), + deliveryPipelinePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + releasePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}' + ), + rolloutPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}/rollouts/{rollout}' + ), + targetPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/targets/{target}' + ), + workerPoolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/workerPools/{worker_pool}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listDeliveryPipelines: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'deliveryPipelines' + ), + listTargets: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'targets' + ), + listReleases: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'releases' + ), + listRollouts: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'rollouts' + ), + }; + + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); + + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + + this.operationsClient = this._gaxModule + .lro({ + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }) + .operationsClient(opts); + const createDeliveryPipelineResponse = protoFilesRoot.lookup( + '.google.cloud.deploy.v1.DeliveryPipeline' + ) as gax.protobuf.Type; + const createDeliveryPipelineMetadata = protoFilesRoot.lookup( + '.google.cloud.deploy.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updateDeliveryPipelineResponse = protoFilesRoot.lookup( + '.google.cloud.deploy.v1.DeliveryPipeline' + ) as gax.protobuf.Type; + const updateDeliveryPipelineMetadata = protoFilesRoot.lookup( + '.google.cloud.deploy.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteDeliveryPipelineResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteDeliveryPipelineMetadata = protoFilesRoot.lookup( + '.google.cloud.deploy.v1.OperationMetadata' + ) as gax.protobuf.Type; + const createTargetResponse = protoFilesRoot.lookup( + '.google.cloud.deploy.v1.Target' + ) as gax.protobuf.Type; + const createTargetMetadata = protoFilesRoot.lookup( + '.google.cloud.deploy.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updateTargetResponse = protoFilesRoot.lookup( + '.google.cloud.deploy.v1.Target' + ) as gax.protobuf.Type; + const updateTargetMetadata = protoFilesRoot.lookup( + '.google.cloud.deploy.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteTargetResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteTargetMetadata = protoFilesRoot.lookup( + '.google.cloud.deploy.v1.OperationMetadata' + ) as gax.protobuf.Type; + const createReleaseResponse = protoFilesRoot.lookup( + '.google.cloud.deploy.v1.Release' + ) as gax.protobuf.Type; + const createReleaseMetadata = protoFilesRoot.lookup( + '.google.cloud.deploy.v1.OperationMetadata' + ) as gax.protobuf.Type; + const createRolloutResponse = protoFilesRoot.lookup( + '.google.cloud.deploy.v1.Rollout' + ) as gax.protobuf.Type; + const createRolloutMetadata = protoFilesRoot.lookup( + '.google.cloud.deploy.v1.OperationMetadata' + ) as gax.protobuf.Type; + + this.descriptors.longrunning = { + createDeliveryPipeline: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createDeliveryPipelineResponse.decode.bind( + createDeliveryPipelineResponse + ), + createDeliveryPipelineMetadata.decode.bind( + createDeliveryPipelineMetadata + ) + ), + updateDeliveryPipeline: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateDeliveryPipelineResponse.decode.bind( + updateDeliveryPipelineResponse + ), + updateDeliveryPipelineMetadata.decode.bind( + updateDeliveryPipelineMetadata + ) + ), + deleteDeliveryPipeline: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteDeliveryPipelineResponse.decode.bind( + deleteDeliveryPipelineResponse + ), + deleteDeliveryPipelineMetadata.decode.bind( + deleteDeliveryPipelineMetadata + ) + ), + createTarget: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createTargetResponse.decode.bind(createTargetResponse), + createTargetMetadata.decode.bind(createTargetMetadata) + ), + updateTarget: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateTargetResponse.decode.bind(updateTargetResponse), + updateTargetMetadata.decode.bind(updateTargetMetadata) + ), + deleteTarget: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteTargetResponse.decode.bind(deleteTargetResponse), + deleteTargetMetadata.decode.bind(deleteTargetMetadata) + ), + createRelease: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createReleaseResponse.decode.bind(createReleaseResponse), + createReleaseMetadata.decode.bind(createReleaseMetadata) + ), + createRollout: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createRolloutResponse.decode.bind(createRolloutResponse), + createRolloutMetadata.decode.bind(createRolloutMetadata) + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.deploy.v1.CloudDeploy', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = gax.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.cloudDeployStub) { + return this.cloudDeployStub; + } + + // Put together the "service stub" for + // google.cloud.deploy.v1.CloudDeploy. + this.cloudDeployStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.deploy.v1.CloudDeploy' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.deploy.v1.CloudDeploy, + this._opts, + this._providedCustomServicePath + ) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const cloudDeployStubMethods = [ + 'listDeliveryPipelines', + 'getDeliveryPipeline', + 'createDeliveryPipeline', + 'updateDeliveryPipeline', + 'deleteDeliveryPipeline', + 'listTargets', + 'getTarget', + 'createTarget', + 'updateTarget', + 'deleteTarget', + 'listReleases', + 'getRelease', + 'createRelease', + 'approveRollout', + 'listRollouts', + 'getRollout', + 'createRollout', + 'getConfig', + ]; + for (const methodName of cloudDeployStubMethods) { + const callPromise = this.cloudDeployStub.then( + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.cloudDeployStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'clouddeploy.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'clouddeploy.googleapis.com'; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return ['https://www.googleapis.com/auth/cloud-platform']; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + getDeliveryPipeline( + request?: protos.google.cloud.deploy.v1.IGetDeliveryPipelineRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.deploy.v1.IDeliveryPipeline, + protos.google.cloud.deploy.v1.IGetDeliveryPipelineRequest | undefined, + {} | undefined + ] + >; + getDeliveryPipeline( + request: protos.google.cloud.deploy.v1.IGetDeliveryPipelineRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.deploy.v1.IDeliveryPipeline, + | protos.google.cloud.deploy.v1.IGetDeliveryPipelineRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getDeliveryPipeline( + request: protos.google.cloud.deploy.v1.IGetDeliveryPipelineRequest, + callback: Callback< + protos.google.cloud.deploy.v1.IDeliveryPipeline, + | protos.google.cloud.deploy.v1.IGetDeliveryPipelineRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Gets details of a single DeliveryPipeline. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the `DeliveryPipeline`. Format must be + * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [DeliveryPipeline]{@link google.cloud.deploy.v1.DeliveryPipeline}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.getDeliveryPipeline(request); + */ + getDeliveryPipeline( + request?: protos.google.cloud.deploy.v1.IGetDeliveryPipelineRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.deploy.v1.IDeliveryPipeline, + | protos.google.cloud.deploy.v1.IGetDeliveryPipelineRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.deploy.v1.IDeliveryPipeline, + | protos.google.cloud.deploy.v1.IGetDeliveryPipelineRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.deploy.v1.IDeliveryPipeline, + protos.google.cloud.deploy.v1.IGetDeliveryPipelineRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getDeliveryPipeline(request, options, callback); + } + getTarget( + request?: protos.google.cloud.deploy.v1.IGetTargetRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IGetTargetRequest | undefined, + {} | undefined + ] + >; + getTarget( + request: protos.google.cloud.deploy.v1.IGetTargetRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IGetTargetRequest | null | undefined, + {} | null | undefined + > + ): void; + getTarget( + request: protos.google.cloud.deploy.v1.IGetTargetRequest, + callback: Callback< + protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IGetTargetRequest | null | undefined, + {} | null | undefined + > + ): void; + /** + * Gets details of a single Target. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the `Target`. Format must be + * projects/{project_id}/locations/{location_name}/targets/{target_name}. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Target]{@link google.cloud.deploy.v1.Target}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.getTarget(request); + */ + getTarget( + request?: protos.google.cloud.deploy.v1.IGetTargetRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IGetTargetRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IGetTargetRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IGetTargetRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getTarget(request, options, callback); + } + getRelease( + request?: protos.google.cloud.deploy.v1.IGetReleaseRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.deploy.v1.IRelease, + protos.google.cloud.deploy.v1.IGetReleaseRequest | undefined, + {} | undefined + ] + >; + getRelease( + request: protos.google.cloud.deploy.v1.IGetReleaseRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.deploy.v1.IRelease, + protos.google.cloud.deploy.v1.IGetReleaseRequest | null | undefined, + {} | null | undefined + > + ): void; + getRelease( + request: protos.google.cloud.deploy.v1.IGetReleaseRequest, + callback: Callback< + protos.google.cloud.deploy.v1.IRelease, + protos.google.cloud.deploy.v1.IGetReleaseRequest | null | undefined, + {} | null | undefined + > + ): void; + /** + * Gets details of a single Release. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the `Release`. Format must be + * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Release]{@link google.cloud.deploy.v1.Release}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.getRelease(request); + */ + getRelease( + request?: protos.google.cloud.deploy.v1.IGetReleaseRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.deploy.v1.IRelease, + protos.google.cloud.deploy.v1.IGetReleaseRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.deploy.v1.IRelease, + protos.google.cloud.deploy.v1.IGetReleaseRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.deploy.v1.IRelease, + protos.google.cloud.deploy.v1.IGetReleaseRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getRelease(request, options, callback); + } + approveRollout( + request?: protos.google.cloud.deploy.v1.IApproveRolloutRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.deploy.v1.IApproveRolloutResponse, + protos.google.cloud.deploy.v1.IApproveRolloutRequest | undefined, + {} | undefined + ] + >; + approveRollout( + request: protos.google.cloud.deploy.v1.IApproveRolloutRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.deploy.v1.IApproveRolloutResponse, + protos.google.cloud.deploy.v1.IApproveRolloutRequest | null | undefined, + {} | null | undefined + > + ): void; + approveRollout( + request: protos.google.cloud.deploy.v1.IApproveRolloutRequest, + callback: Callback< + protos.google.cloud.deploy.v1.IApproveRolloutResponse, + protos.google.cloud.deploy.v1.IApproveRolloutRequest | null | undefined, + {} | null | undefined + > + ): void; + /** + * Approves a Rollout. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the Rollout. Format is + * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ + * releases/{release}/rollouts/{rollout}. + * @param {boolean} request.approved + * Required. True = approve; false = reject + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [ApproveRolloutResponse]{@link google.cloud.deploy.v1.ApproveRolloutResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.approveRollout(request); + */ + approveRollout( + request?: protos.google.cloud.deploy.v1.IApproveRolloutRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.deploy.v1.IApproveRolloutResponse, + | protos.google.cloud.deploy.v1.IApproveRolloutRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.deploy.v1.IApproveRolloutResponse, + protos.google.cloud.deploy.v1.IApproveRolloutRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.deploy.v1.IApproveRolloutResponse, + protos.google.cloud.deploy.v1.IApproveRolloutRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.approveRollout(request, options, callback); + } + getRollout( + request?: protos.google.cloud.deploy.v1.IGetRolloutRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.deploy.v1.IRollout, + protos.google.cloud.deploy.v1.IGetRolloutRequest | undefined, + {} | undefined + ] + >; + getRollout( + request: protos.google.cloud.deploy.v1.IGetRolloutRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.deploy.v1.IRollout, + protos.google.cloud.deploy.v1.IGetRolloutRequest | null | undefined, + {} | null | undefined + > + ): void; + getRollout( + request: protos.google.cloud.deploy.v1.IGetRolloutRequest, + callback: Callback< + protos.google.cloud.deploy.v1.IRollout, + protos.google.cloud.deploy.v1.IGetRolloutRequest | null | undefined, + {} | null | undefined + > + ): void; + /** + * Gets details of a single Rollout. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the `Rollout`. Format must be + * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Rollout]{@link google.cloud.deploy.v1.Rollout}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.getRollout(request); + */ + getRollout( + request?: protos.google.cloud.deploy.v1.IGetRolloutRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.deploy.v1.IRollout, + protos.google.cloud.deploy.v1.IGetRolloutRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.deploy.v1.IRollout, + protos.google.cloud.deploy.v1.IGetRolloutRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.deploy.v1.IRollout, + protos.google.cloud.deploy.v1.IGetRolloutRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getRollout(request, options, callback); + } + getConfig( + request?: protos.google.cloud.deploy.v1.IGetConfigRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.deploy.v1.IConfig, + protos.google.cloud.deploy.v1.IGetConfigRequest | undefined, + {} | undefined + ] + >; + getConfig( + request: protos.google.cloud.deploy.v1.IGetConfigRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.deploy.v1.IConfig, + protos.google.cloud.deploy.v1.IGetConfigRequest | null | undefined, + {} | null | undefined + > + ): void; + getConfig( + request: protos.google.cloud.deploy.v1.IGetConfigRequest, + callback: Callback< + protos.google.cloud.deploy.v1.IConfig, + protos.google.cloud.deploy.v1.IGetConfigRequest | null | undefined, + {} | null | undefined + > + ): void; + /** + * Gets the configuration for a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of requested configuration. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Config]{@link google.cloud.deploy.v1.Config}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.getConfig(request); + */ + getConfig( + request?: protos.google.cloud.deploy.v1.IGetConfigRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.deploy.v1.IConfig, + protos.google.cloud.deploy.v1.IGetConfigRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.deploy.v1.IConfig, + protos.google.cloud.deploy.v1.IGetConfigRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.deploy.v1.IConfig, + protos.google.cloud.deploy.v1.IGetConfigRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getConfig(request, options, callback); + } + + createDeliveryPipeline( + request?: protos.google.cloud.deploy.v1.ICreateDeliveryPipelineRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.deploy.v1.IDeliveryPipeline, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createDeliveryPipeline( + request: protos.google.cloud.deploy.v1.ICreateDeliveryPipelineRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.deploy.v1.IDeliveryPipeline, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createDeliveryPipeline( + request: protos.google.cloud.deploy.v1.ICreateDeliveryPipelineRequest, + callback: Callback< + LROperation< + protos.google.cloud.deploy.v1.IDeliveryPipeline, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Creates a new DeliveryPipeline in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent collection in which the `DeliveryPipeline` should be created. + * Format should be projects/{project_id}/locations/{location_name}. + * @param {string} request.deliveryPipelineId + * Required. ID of the `DeliveryPipeline`. + * @param {google.cloud.deploy.v1.DeliveryPipeline} request.deliveryPipeline + * Required. The `DeliveryPipeline` to create. + * @param {string} [request.requestId] + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean} [request.validateOnly] + * Optional. If set to true, the request is validated and the user is provided with + * an expected result, but no actual change is made. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.createDeliveryPipeline(request); + * const [response] = await operation.promise(); + */ + createDeliveryPipeline( + request?: protos.google.cloud.deploy.v1.ICreateDeliveryPipelineRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.deploy.v1.IDeliveryPipeline, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.deploy.v1.IDeliveryPipeline, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.deploy.v1.IDeliveryPipeline, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createDeliveryPipeline( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `createDeliveryPipeline()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkCreateDeliveryPipelineProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkCreateDeliveryPipelineProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.deploy.v1.DeliveryPipeline, + protos.google.cloud.deploy.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.createDeliveryPipeline, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.deploy.v1.DeliveryPipeline, + protos.google.cloud.deploy.v1.OperationMetadata + >; + } + updateDeliveryPipeline( + request?: protos.google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.deploy.v1.IDeliveryPipeline, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateDeliveryPipeline( + request: protos.google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.deploy.v1.IDeliveryPipeline, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateDeliveryPipeline( + request: protos.google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest, + callback: Callback< + LROperation< + protos.google.cloud.deploy.v1.IDeliveryPipeline, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Updates the parameters of a single DeliveryPipeline. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Field mask is used to specify the fields to be overwritten in the + * `DeliveryPipeline` resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @param {google.cloud.deploy.v1.DeliveryPipeline} request.deliveryPipeline + * Required. The `DeliveryPipeline` to update. + * @param {string} [request.requestId] + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean} [request.allowMissing] + * Optional. If set to true, updating a `DeliveryPipeline` that does not exist will + * result in the creation of a new `DeliveryPipeline`. + * @param {boolean} [request.validateOnly] + * Optional. If set to true, the request is validated and the user is provided with + * an expected result, but no actual change is made. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.updateDeliveryPipeline(request); + * const [response] = await operation.promise(); + */ + updateDeliveryPipeline( + request?: protos.google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.deploy.v1.IDeliveryPipeline, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.deploy.v1.IDeliveryPipeline, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.deploy.v1.IDeliveryPipeline, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'delivery_pipeline.name': request.deliveryPipeline!.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateDeliveryPipeline( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `updateDeliveryPipeline()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkUpdateDeliveryPipelineProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkUpdateDeliveryPipelineProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.deploy.v1.DeliveryPipeline, + protos.google.cloud.deploy.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.updateDeliveryPipeline, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.deploy.v1.DeliveryPipeline, + protos.google.cloud.deploy.v1.OperationMetadata + >; + } + deleteDeliveryPipeline( + request?: protos.google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteDeliveryPipeline( + request: protos.google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteDeliveryPipeline( + request: protos.google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Deletes a single DeliveryPipeline. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the `DeliveryPipeline` to delete. Format should be + * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. + * @param {string} [request.requestId] + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean} [request.allowMissing] + * Optional. If set to true, then deleting an already deleted or non-existing + * `DeliveryPipeline` will succeed. + * @param {boolean} [request.validateOnly] + * Optional. If set, validate the request and preview the review, but do not actually + * post it. + * @param {boolean} [request.force] + * Optional. If set to true, all child resources under this pipeline will also be + * deleted. Otherwise, the request will only work if the pipeline has + * no child resources. + * @param {string} [request.etag] + * Optional. This checksum is computed by the server based on the value of other + * fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.deleteDeliveryPipeline(request); + * const [response] = await operation.promise(); + */ + deleteDeliveryPipeline( + request?: protos.google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deleteDeliveryPipeline( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `deleteDeliveryPipeline()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkDeleteDeliveryPipelineProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkDeleteDeliveryPipelineProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.deploy.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.deleteDeliveryPipeline, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.deploy.v1.OperationMetadata + >; + } + createTarget( + request?: protos.google.cloud.deploy.v1.ICreateTargetRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createTarget( + request: protos.google.cloud.deploy.v1.ICreateTargetRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createTarget( + request: protos.google.cloud.deploy.v1.ICreateTargetRequest, + callback: Callback< + LROperation< + protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Creates a new Target in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent collection in which the `Target` should be created. + * Format should be + * projects/{project_id}/locations/{location_name}. + * @param {string} request.targetId + * Required. ID of the `Target`. + * @param {google.cloud.deploy.v1.Target} request.target + * Required. The `Target` to create. + * @param {string} [request.requestId] + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean} [request.validateOnly] + * Optional. If set to true, the request is validated and the user is provided with + * an expected result, but no actual change is made. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.createTarget(request); + * const [response] = await operation.promise(); + */ + createTarget( + request?: protos.google.cloud.deploy.v1.ICreateTargetRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createTarget(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createTarget()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkCreateTargetProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkCreateTargetProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.deploy.v1.Target, + protos.google.cloud.deploy.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.createTarget, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.deploy.v1.Target, + protos.google.cloud.deploy.v1.OperationMetadata + >; + } + updateTarget( + request?: protos.google.cloud.deploy.v1.IUpdateTargetRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateTarget( + request: protos.google.cloud.deploy.v1.IUpdateTargetRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateTarget( + request: protos.google.cloud.deploy.v1.IUpdateTargetRequest, + callback: Callback< + LROperation< + protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Updates the parameters of a single Target. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Field mask is used to specify the fields to be overwritten in the + * Target resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @param {google.cloud.deploy.v1.Target} request.target + * Required. The `Target` to update. + * @param {string} [request.requestId] + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean} [request.allowMissing] + * Optional. If set to true, updating a `Target` that does not exist will + * result in the creation of a new `Target`. + * @param {boolean} [request.validateOnly] + * Optional. If set to true, the request is validated and the user is provided with + * an expected result, but no actual change is made. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.updateTarget(request); + * const [response] = await operation.promise(); + */ + updateTarget( + request?: protos.google.cloud.deploy.v1.IUpdateTargetRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'target.name': request.target!.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateTarget(request, options, callback); + } + /** + * Check the status of the long running operation returned by `updateTarget()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkUpdateTargetProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkUpdateTargetProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.deploy.v1.Target, + protos.google.cloud.deploy.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.updateTarget, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.deploy.v1.Target, + protos.google.cloud.deploy.v1.OperationMetadata + >; + } + deleteTarget( + request?: protos.google.cloud.deploy.v1.IDeleteTargetRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteTarget( + request: protos.google.cloud.deploy.v1.IDeleteTargetRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteTarget( + request: protos.google.cloud.deploy.v1.IDeleteTargetRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Deletes a single Target. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the `Target` to delete. Format should be + * projects/{project_id}/locations/{location_name}/targets/{target_name}. + * @param {string} [request.requestId] + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean} [request.allowMissing] + * Optional. If set to true, then deleting an already deleted or non-existing + * DeliveryPipeline will succeed. + * @param {boolean} [request.validateOnly] + * Optional. If set, validate the request and preview the review, but do not actually + * post it. + * @param {string} [request.etag] + * Optional. This checksum is computed by the server based on the value of other + * fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.deleteTarget(request); + * const [response] = await operation.promise(); + */ + deleteTarget( + request?: protos.google.cloud.deploy.v1.IDeleteTargetRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deleteTarget(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteTarget()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkDeleteTargetProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkDeleteTargetProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.deploy.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.deleteTarget, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.deploy.v1.OperationMetadata + >; + } + createRelease( + request?: protos.google.cloud.deploy.v1.ICreateReleaseRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.deploy.v1.IRelease, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createRelease( + request: protos.google.cloud.deploy.v1.ICreateReleaseRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.deploy.v1.IRelease, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createRelease( + request: protos.google.cloud.deploy.v1.ICreateReleaseRequest, + callback: Callback< + LROperation< + protos.google.cloud.deploy.v1.IRelease, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Creates a new Release in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent collection in which the `Release` should be created. + * Format should be + * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. + * @param {string} request.releaseId + * Required. ID of the `Release`. + * @param {google.cloud.deploy.v1.Release} request.release + * Required. The `Release` to create. + * @param {string} [request.requestId] + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean} [request.validateOnly] + * Optional. If set to true, the request is validated and the user is provided with + * an expected result, but no actual change is made. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.createRelease(request); + * const [response] = await operation.promise(); + */ + createRelease( + request?: protos.google.cloud.deploy.v1.ICreateReleaseRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.deploy.v1.IRelease, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.deploy.v1.IRelease, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.deploy.v1.IRelease, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createRelease(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createRelease()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkCreateReleaseProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkCreateReleaseProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.deploy.v1.Release, + protos.google.cloud.deploy.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.createRelease, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.deploy.v1.Release, + protos.google.cloud.deploy.v1.OperationMetadata + >; + } + createRollout( + request?: protos.google.cloud.deploy.v1.ICreateRolloutRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.deploy.v1.IRollout, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createRollout( + request: protos.google.cloud.deploy.v1.ICreateRolloutRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.deploy.v1.IRollout, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createRollout( + request: protos.google.cloud.deploy.v1.ICreateRolloutRequest, + callback: Callback< + LROperation< + protos.google.cloud.deploy.v1.IRollout, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Creates a new Rollout in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent collection in which the `Rollout` should be created. + * Format should be + * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}. + * @param {string} request.rolloutId + * Required. ID of the `Rollout`. + * @param {google.cloud.deploy.v1.Rollout} request.rollout + * Required. The `Rollout` to create. + * @param {string} [request.requestId] + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean} [request.validateOnly] + * Optional. If set to true, the request is validated and the user is provided with + * an expected result, but no actual change is made. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.createRollout(request); + * const [response] = await operation.promise(); + */ + createRollout( + request?: protos.google.cloud.deploy.v1.ICreateRolloutRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.deploy.v1.IRollout, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.deploy.v1.IRollout, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.deploy.v1.IRollout, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createRollout(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createRollout()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkCreateRolloutProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkCreateRolloutProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.deploy.v1.Rollout, + protos.google.cloud.deploy.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.createRollout, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.deploy.v1.Rollout, + protos.google.cloud.deploy.v1.OperationMetadata + >; + } + listDeliveryPipelines( + request?: protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.deploy.v1.IDeliveryPipeline[], + protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest | null, + protos.google.cloud.deploy.v1.IListDeliveryPipelinesResponse + ] + >; + listDeliveryPipelines( + request: protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + | protos.google.cloud.deploy.v1.IListDeliveryPipelinesResponse + | null + | undefined, + protos.google.cloud.deploy.v1.IDeliveryPipeline + > + ): void; + listDeliveryPipelines( + request: protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + callback: PaginationCallback< + protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + | protos.google.cloud.deploy.v1.IListDeliveryPipelinesResponse + | null + | undefined, + protos.google.cloud.deploy.v1.IDeliveryPipeline + > + ): void; + /** + * Lists DeliveryPipelines in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of pipelines. Format must be + * projects/{project_id}/locations/{location_name}. + * @param {number} request.pageSize + * The maximum number of pipelines to return. The service may return + * fewer than this value. If unspecified, at most 50 pipelines will + * be returned. The maximum value is 1000; values above 1000 will be set + * to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListDeliveryPipelines` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} request.filter + * Filter builds to be returned. See https://google.aip.dev/160 for more + * details. + * @param {string} request.orderBy + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [DeliveryPipeline]{@link google.cloud.deploy.v1.DeliveryPipeline}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listDeliveryPipelinesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listDeliveryPipelines( + request?: protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + | protos.google.cloud.deploy.v1.IListDeliveryPipelinesResponse + | null + | undefined, + protos.google.cloud.deploy.v1.IDeliveryPipeline + >, + callback?: PaginationCallback< + protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + | protos.google.cloud.deploy.v1.IListDeliveryPipelinesResponse + | null + | undefined, + protos.google.cloud.deploy.v1.IDeliveryPipeline + > + ): Promise< + [ + protos.google.cloud.deploy.v1.IDeliveryPipeline[], + protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest | null, + protos.google.cloud.deploy.v1.IListDeliveryPipelinesResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listDeliveryPipelines(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of pipelines. Format must be + * projects/{project_id}/locations/{location_name}. + * @param {number} request.pageSize + * The maximum number of pipelines to return. The service may return + * fewer than this value. If unspecified, at most 50 pipelines will + * be returned. The maximum value is 1000; values above 1000 will be set + * to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListDeliveryPipelines` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} request.filter + * Filter builds to be returned. See https://google.aip.dev/160 for more + * details. + * @param {string} request.orderBy + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [DeliveryPipeline]{@link google.cloud.deploy.v1.DeliveryPipeline} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listDeliveryPipelinesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listDeliveryPipelinesStream( + request?: protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listDeliveryPipelines']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDeliveryPipelines.createStream( + this.innerApiCalls.listDeliveryPipelines as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listDeliveryPipelines`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of pipelines. Format must be + * projects/{project_id}/locations/{location_name}. + * @param {number} request.pageSize + * The maximum number of pipelines to return. The service may return + * fewer than this value. If unspecified, at most 50 pipelines will + * be returned. The maximum value is 1000; values above 1000 will be set + * to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListDeliveryPipelines` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} request.filter + * Filter builds to be returned. See https://google.aip.dev/160 for more + * details. + * @param {string} request.orderBy + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [DeliveryPipeline]{@link google.cloud.deploy.v1.DeliveryPipeline}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * const iterable = client.listDeliveryPipelinesAsync(request); + * for await (const response of iterable) { + * // process response + * } + */ + listDeliveryPipelinesAsync( + request?: protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + options = options || {}; + const defaultCallSettings = this._defaults['listDeliveryPipelines']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDeliveryPipelines.asyncIterate( + this.innerApiCalls['listDeliveryPipelines'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + listTargets( + request?: protos.google.cloud.deploy.v1.IListTargetsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.deploy.v1.ITarget[], + protos.google.cloud.deploy.v1.IListTargetsRequest | null, + protos.google.cloud.deploy.v1.IListTargetsResponse + ] + >; + listTargets( + request: protos.google.cloud.deploy.v1.IListTargetsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.deploy.v1.IListTargetsRequest, + protos.google.cloud.deploy.v1.IListTargetsResponse | null | undefined, + protos.google.cloud.deploy.v1.ITarget + > + ): void; + listTargets( + request: protos.google.cloud.deploy.v1.IListTargetsRequest, + callback: PaginationCallback< + protos.google.cloud.deploy.v1.IListTargetsRequest, + protos.google.cloud.deploy.v1.IListTargetsResponse | null | undefined, + protos.google.cloud.deploy.v1.ITarget + > + ): void; + /** + * Lists Targets in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of targets. Format must be + * projects/{project_id}/locations/{location_name}. + * @param {number} [request.pageSize] + * Optional. The maximum number of `Target` objects to return. The service may return + * fewer than this value. If unspecified, at most 50 `Target` objects will be + * returned. The maximum value is 1000; values above 1000 will be set to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListTargets` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more + * details. + * @param {string} [request.orderBy] + * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Target]{@link google.cloud.deploy.v1.Target}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listTargetsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listTargets( + request?: protos.google.cloud.deploy.v1.IListTargetsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.deploy.v1.IListTargetsRequest, + protos.google.cloud.deploy.v1.IListTargetsResponse | null | undefined, + protos.google.cloud.deploy.v1.ITarget + >, + callback?: PaginationCallback< + protos.google.cloud.deploy.v1.IListTargetsRequest, + protos.google.cloud.deploy.v1.IListTargetsResponse | null | undefined, + protos.google.cloud.deploy.v1.ITarget + > + ): Promise< + [ + protos.google.cloud.deploy.v1.ITarget[], + protos.google.cloud.deploy.v1.IListTargetsRequest | null, + protos.google.cloud.deploy.v1.IListTargetsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listTargets(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of targets. Format must be + * projects/{project_id}/locations/{location_name}. + * @param {number} [request.pageSize] + * Optional. The maximum number of `Target` objects to return. The service may return + * fewer than this value. If unspecified, at most 50 `Target` objects will be + * returned. The maximum value is 1000; values above 1000 will be set to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListTargets` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more + * details. + * @param {string} [request.orderBy] + * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [Target]{@link google.cloud.deploy.v1.Target} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listTargetsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listTargetsStream( + request?: protos.google.cloud.deploy.v1.IListTargetsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listTargets']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listTargets.createStream( + this.innerApiCalls.listTargets as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listTargets`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of targets. Format must be + * projects/{project_id}/locations/{location_name}. + * @param {number} [request.pageSize] + * Optional. The maximum number of `Target` objects to return. The service may return + * fewer than this value. If unspecified, at most 50 `Target` objects will be + * returned. The maximum value is 1000; values above 1000 will be set to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListTargets` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more + * details. + * @param {string} [request.orderBy] + * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Target]{@link google.cloud.deploy.v1.Target}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * const iterable = client.listTargetsAsync(request); + * for await (const response of iterable) { + * // process response + * } + */ + listTargetsAsync( + request?: protos.google.cloud.deploy.v1.IListTargetsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + options = options || {}; + const defaultCallSettings = this._defaults['listTargets']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listTargets.asyncIterate( + this.innerApiCalls['listTargets'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + listReleases( + request?: protos.google.cloud.deploy.v1.IListReleasesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.deploy.v1.IRelease[], + protos.google.cloud.deploy.v1.IListReleasesRequest | null, + protos.google.cloud.deploy.v1.IListReleasesResponse + ] + >; + listReleases( + request: protos.google.cloud.deploy.v1.IListReleasesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.deploy.v1.IListReleasesRequest, + protos.google.cloud.deploy.v1.IListReleasesResponse | null | undefined, + protos.google.cloud.deploy.v1.IRelease + > + ): void; + listReleases( + request: protos.google.cloud.deploy.v1.IListReleasesRequest, + callback: PaginationCallback< + protos.google.cloud.deploy.v1.IListReleasesRequest, + protos.google.cloud.deploy.v1.IListReleasesResponse | null | undefined, + protos.google.cloud.deploy.v1.IRelease + > + ): void; + /** + * Lists Releases in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The `DeliveryPipeline` which owns this collection of `Release` objects. + * @param {number} [request.pageSize] + * Optional. The maximum number of `Release` objects to return. The service may return + * fewer than this value. If unspecified, at most 50 `Release` objects will be + * returned. The maximum value is 1000; values above 1000 will be set to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListReleases` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more + * details. + * @param {string} [request.orderBy] + * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Release]{@link google.cloud.deploy.v1.Release}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listReleasesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listReleases( + request?: protos.google.cloud.deploy.v1.IListReleasesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.deploy.v1.IListReleasesRequest, + | protos.google.cloud.deploy.v1.IListReleasesResponse + | null + | undefined, + protos.google.cloud.deploy.v1.IRelease + >, + callback?: PaginationCallback< + protos.google.cloud.deploy.v1.IListReleasesRequest, + protos.google.cloud.deploy.v1.IListReleasesResponse | null | undefined, + protos.google.cloud.deploy.v1.IRelease + > + ): Promise< + [ + protos.google.cloud.deploy.v1.IRelease[], + protos.google.cloud.deploy.v1.IListReleasesRequest | null, + protos.google.cloud.deploy.v1.IListReleasesResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listReleases(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The `DeliveryPipeline` which owns this collection of `Release` objects. + * @param {number} [request.pageSize] + * Optional. The maximum number of `Release` objects to return. The service may return + * fewer than this value. If unspecified, at most 50 `Release` objects will be + * returned. The maximum value is 1000; values above 1000 will be set to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListReleases` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more + * details. + * @param {string} [request.orderBy] + * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [Release]{@link google.cloud.deploy.v1.Release} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listReleasesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listReleasesStream( + request?: protos.google.cloud.deploy.v1.IListReleasesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listReleases']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listReleases.createStream( + this.innerApiCalls.listReleases as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listReleases`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The `DeliveryPipeline` which owns this collection of `Release` objects. + * @param {number} [request.pageSize] + * Optional. The maximum number of `Release` objects to return. The service may return + * fewer than this value. If unspecified, at most 50 `Release` objects will be + * returned. The maximum value is 1000; values above 1000 will be set to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListReleases` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more + * details. + * @param {string} [request.orderBy] + * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Release]{@link google.cloud.deploy.v1.Release}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * const iterable = client.listReleasesAsync(request); + * for await (const response of iterable) { + * // process response + * } + */ + listReleasesAsync( + request?: protos.google.cloud.deploy.v1.IListReleasesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + options = options || {}; + const defaultCallSettings = this._defaults['listReleases']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listReleases.asyncIterate( + this.innerApiCalls['listReleases'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + listRollouts( + request?: protos.google.cloud.deploy.v1.IListRolloutsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.deploy.v1.IRollout[], + protos.google.cloud.deploy.v1.IListRolloutsRequest | null, + protos.google.cloud.deploy.v1.IListRolloutsResponse + ] + >; + listRollouts( + request: protos.google.cloud.deploy.v1.IListRolloutsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.deploy.v1.IListRolloutsRequest, + protos.google.cloud.deploy.v1.IListRolloutsResponse | null | undefined, + protos.google.cloud.deploy.v1.IRollout + > + ): void; + listRollouts( + request: protos.google.cloud.deploy.v1.IListRolloutsRequest, + callback: PaginationCallback< + protos.google.cloud.deploy.v1.IListRolloutsRequest, + protos.google.cloud.deploy.v1.IListRolloutsResponse | null | undefined, + protos.google.cloud.deploy.v1.IRollout + > + ): void; + /** + * Lists Rollouts in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The `Release` which owns this collection of `Rollout` objects. + * @param {number} [request.pageSize] + * Optional. The maximum number of `Rollout` objects to return. The service may return + * fewer than this value. If unspecified, at most 50 `Rollout` objects will be + * returned. The maximum value is 1000; values above 1000 will be set to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListRollouts` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more + * details. + * @param {string} [request.orderBy] + * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Rollout]{@link google.cloud.deploy.v1.Rollout}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listRolloutsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listRollouts( + request?: protos.google.cloud.deploy.v1.IListRolloutsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.deploy.v1.IListRolloutsRequest, + | protos.google.cloud.deploy.v1.IListRolloutsResponse + | null + | undefined, + protos.google.cloud.deploy.v1.IRollout + >, + callback?: PaginationCallback< + protos.google.cloud.deploy.v1.IListRolloutsRequest, + protos.google.cloud.deploy.v1.IListRolloutsResponse | null | undefined, + protos.google.cloud.deploy.v1.IRollout + > + ): Promise< + [ + protos.google.cloud.deploy.v1.IRollout[], + protos.google.cloud.deploy.v1.IListRolloutsRequest | null, + protos.google.cloud.deploy.v1.IListRolloutsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listRollouts(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The `Release` which owns this collection of `Rollout` objects. + * @param {number} [request.pageSize] + * Optional. The maximum number of `Rollout` objects to return. The service may return + * fewer than this value. If unspecified, at most 50 `Rollout` objects will be + * returned. The maximum value is 1000; values above 1000 will be set to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListRollouts` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more + * details. + * @param {string} [request.orderBy] + * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [Rollout]{@link google.cloud.deploy.v1.Rollout} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listRolloutsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listRolloutsStream( + request?: protos.google.cloud.deploy.v1.IListRolloutsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listRollouts']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listRollouts.createStream( + this.innerApiCalls.listRollouts as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listRollouts`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The `Release` which owns this collection of `Rollout` objects. + * @param {number} [request.pageSize] + * Optional. The maximum number of `Rollout` objects to return. The service may return + * fewer than this value. If unspecified, at most 50 `Rollout` objects will be + * returned. The maximum value is 1000; values above 1000 will be set to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListRollouts` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more + * details. + * @param {string} [request.orderBy] + * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Rollout]{@link google.cloud.deploy.v1.Rollout}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * const iterable = client.listRolloutsAsync(request); + * for await (const response of iterable) { + * // process response + * } + */ + listRolloutsAsync( + request?: protos.google.cloud.deploy.v1.IListRolloutsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + options = options || {}; + const defaultCallSettings = this._defaults['listRollouts']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listRollouts.asyncIterate( + this.innerApiCalls['listRollouts'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified build resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} build + * @returns {string} Resource name string. + */ + buildPath(project: string, location: string, build: string) { + return this.pathTemplates.buildPathTemplate.render({ + project: project, + location: location, + build: build, + }); + } + + /** + * Parse the project from Build resource. + * + * @param {string} buildName + * A fully-qualified path representing Build resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBuildName(buildName: string) { + return this.pathTemplates.buildPathTemplate.match(buildName).project; + } + + /** + * Parse the location from Build resource. + * + * @param {string} buildName + * A fully-qualified path representing Build resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBuildName(buildName: string) { + return this.pathTemplates.buildPathTemplate.match(buildName).location; + } + + /** + * Parse the build from Build resource. + * + * @param {string} buildName + * A fully-qualified path representing Build resource. + * @returns {string} A string representing the build. + */ + matchBuildFromBuildName(buildName: string) { + return this.pathTemplates.buildPathTemplate.match(buildName).build; + } + + /** + * Return a fully-qualified cluster resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} cluster + * @returns {string} Resource name string. + */ + clusterPath(project: string, location: string, cluster: string) { + return this.pathTemplates.clusterPathTemplate.render({ + project: project, + location: location, + cluster: cluster, + }); + } + + /** + * Parse the project from Cluster resource. + * + * @param {string} clusterName + * A fully-qualified path representing Cluster resource. + * @returns {string} A string representing the project. + */ + matchProjectFromClusterName(clusterName: string) { + return this.pathTemplates.clusterPathTemplate.match(clusterName).project; + } + + /** + * Parse the location from Cluster resource. + * + * @param {string} clusterName + * A fully-qualified path representing Cluster resource. + * @returns {string} A string representing the location. + */ + matchLocationFromClusterName(clusterName: string) { + return this.pathTemplates.clusterPathTemplate.match(clusterName).location; + } + + /** + * Parse the cluster from Cluster resource. + * + * @param {string} clusterName + * A fully-qualified path representing Cluster resource. + * @returns {string} A string representing the cluster. + */ + matchClusterFromClusterName(clusterName: string) { + return this.pathTemplates.clusterPathTemplate.match(clusterName).cluster; + } + + /** + * Return a fully-qualified config resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + configPath(project: string, location: string) { + return this.pathTemplates.configPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from Config resource. + * + * @param {string} configName + * A fully-qualified path representing Config resource. + * @returns {string} A string representing the project. + */ + matchProjectFromConfigName(configName: string) { + return this.pathTemplates.configPathTemplate.match(configName).project; + } + + /** + * Parse the location from Config resource. + * + * @param {string} configName + * A fully-qualified path representing Config resource. + * @returns {string} A string representing the location. + */ + matchLocationFromConfigName(configName: string) { + return this.pathTemplates.configPathTemplate.match(configName).location; + } + + /** + * Return a fully-qualified deliveryPipeline resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} delivery_pipeline + * @returns {string} Resource name string. + */ + deliveryPipelinePath( + project: string, + location: string, + deliveryPipeline: string + ) { + return this.pathTemplates.deliveryPipelinePathTemplate.render({ + project: project, + location: location, + delivery_pipeline: deliveryPipeline, + }); + } + + /** + * Parse the project from DeliveryPipeline resource. + * + * @param {string} deliveryPipelineName + * A fully-qualified path representing DeliveryPipeline resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDeliveryPipelineName(deliveryPipelineName: string) { + return this.pathTemplates.deliveryPipelinePathTemplate.match( + deliveryPipelineName + ).project; + } + + /** + * Parse the location from DeliveryPipeline resource. + * + * @param {string} deliveryPipelineName + * A fully-qualified path representing DeliveryPipeline resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDeliveryPipelineName(deliveryPipelineName: string) { + return this.pathTemplates.deliveryPipelinePathTemplate.match( + deliveryPipelineName + ).location; + } + + /** + * Parse the delivery_pipeline from DeliveryPipeline resource. + * + * @param {string} deliveryPipelineName + * A fully-qualified path representing DeliveryPipeline resource. + * @returns {string} A string representing the delivery_pipeline. + */ + matchDeliveryPipelineFromDeliveryPipelineName(deliveryPipelineName: string) { + return this.pathTemplates.deliveryPipelinePathTemplate.match( + deliveryPipelineName + ).delivery_pipeline; + } + + /** + * Return a fully-qualified location resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(project: string, location: string) { + return this.pathTemplates.locationPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).project; + } + + /** + * Parse the location from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).location; + } + + /** + * Return a fully-qualified project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project: string) { + return this.pathTemplates.projectPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this.pathTemplates.projectPathTemplate.match(projectName).project; + } + + /** + * Return a fully-qualified release resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} delivery_pipeline + * @param {string} release + * @returns {string} Resource name string. + */ + releasePath( + project: string, + location: string, + deliveryPipeline: string, + release: string + ) { + return this.pathTemplates.releasePathTemplate.render({ + project: project, + location: location, + delivery_pipeline: deliveryPipeline, + release: release, + }); + } + + /** + * Parse the project from Release resource. + * + * @param {string} releaseName + * A fully-qualified path representing Release resource. + * @returns {string} A string representing the project. + */ + matchProjectFromReleaseName(releaseName: string) { + return this.pathTemplates.releasePathTemplate.match(releaseName).project; + } + + /** + * Parse the location from Release resource. + * + * @param {string} releaseName + * A fully-qualified path representing Release resource. + * @returns {string} A string representing the location. + */ + matchLocationFromReleaseName(releaseName: string) { + return this.pathTemplates.releasePathTemplate.match(releaseName).location; + } + + /** + * Parse the delivery_pipeline from Release resource. + * + * @param {string} releaseName + * A fully-qualified path representing Release resource. + * @returns {string} A string representing the delivery_pipeline. + */ + matchDeliveryPipelineFromReleaseName(releaseName: string) { + return this.pathTemplates.releasePathTemplate.match(releaseName) + .delivery_pipeline; + } + + /** + * Parse the release from Release resource. + * + * @param {string} releaseName + * A fully-qualified path representing Release resource. + * @returns {string} A string representing the release. + */ + matchReleaseFromReleaseName(releaseName: string) { + return this.pathTemplates.releasePathTemplate.match(releaseName).release; + } + + /** + * Return a fully-qualified rollout resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} delivery_pipeline + * @param {string} release + * @param {string} rollout + * @returns {string} Resource name string. + */ + rolloutPath( + project: string, + location: string, + deliveryPipeline: string, + release: string, + rollout: string + ) { + return this.pathTemplates.rolloutPathTemplate.render({ + project: project, + location: location, + delivery_pipeline: deliveryPipeline, + release: release, + rollout: rollout, + }); + } + + /** + * Parse the project from Rollout resource. + * + * @param {string} rolloutName + * A fully-qualified path representing Rollout resource. + * @returns {string} A string representing the project. + */ + matchProjectFromRolloutName(rolloutName: string) { + return this.pathTemplates.rolloutPathTemplate.match(rolloutName).project; + } + + /** + * Parse the location from Rollout resource. + * + * @param {string} rolloutName + * A fully-qualified path representing Rollout resource. + * @returns {string} A string representing the location. + */ + matchLocationFromRolloutName(rolloutName: string) { + return this.pathTemplates.rolloutPathTemplate.match(rolloutName).location; + } + + /** + * Parse the delivery_pipeline from Rollout resource. + * + * @param {string} rolloutName + * A fully-qualified path representing Rollout resource. + * @returns {string} A string representing the delivery_pipeline. + */ + matchDeliveryPipelineFromRolloutName(rolloutName: string) { + return this.pathTemplates.rolloutPathTemplate.match(rolloutName) + .delivery_pipeline; + } + + /** + * Parse the release from Rollout resource. + * + * @param {string} rolloutName + * A fully-qualified path representing Rollout resource. + * @returns {string} A string representing the release. + */ + matchReleaseFromRolloutName(rolloutName: string) { + return this.pathTemplates.rolloutPathTemplate.match(rolloutName).release; + } + + /** + * Parse the rollout from Rollout resource. + * + * @param {string} rolloutName + * A fully-qualified path representing Rollout resource. + * @returns {string} A string representing the rollout. + */ + matchRolloutFromRolloutName(rolloutName: string) { + return this.pathTemplates.rolloutPathTemplate.match(rolloutName).rollout; + } + + /** + * Return a fully-qualified target resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} target + * @returns {string} Resource name string. + */ + targetPath(project: string, location: string, target: string) { + return this.pathTemplates.targetPathTemplate.render({ + project: project, + location: location, + target: target, + }); + } + + /** + * Parse the project from Target resource. + * + * @param {string} targetName + * A fully-qualified path representing Target resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTargetName(targetName: string) { + return this.pathTemplates.targetPathTemplate.match(targetName).project; + } + + /** + * Parse the location from Target resource. + * + * @param {string} targetName + * A fully-qualified path representing Target resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTargetName(targetName: string) { + return this.pathTemplates.targetPathTemplate.match(targetName).location; + } + + /** + * Parse the target from Target resource. + * + * @param {string} targetName + * A fully-qualified path representing Target resource. + * @returns {string} A string representing the target. + */ + matchTargetFromTargetName(targetName: string) { + return this.pathTemplates.targetPathTemplate.match(targetName).target; + } + + /** + * Return a fully-qualified workerPool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} worker_pool + * @returns {string} Resource name string. + */ + workerPoolPath(project: string, location: string, workerPool: string) { + return this.pathTemplates.workerPoolPathTemplate.render({ + project: project, + location: location, + worker_pool: workerPool, + }); + } + + /** + * Parse the project from WorkerPool resource. + * + * @param {string} workerPoolName + * A fully-qualified path representing WorkerPool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromWorkerPoolName(workerPoolName: string) { + return this.pathTemplates.workerPoolPathTemplate.match(workerPoolName) + .project; + } + + /** + * Parse the location from WorkerPool resource. + * + * @param {string} workerPoolName + * A fully-qualified path representing WorkerPool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromWorkerPoolName(workerPoolName: string) { + return this.pathTemplates.workerPoolPathTemplate.match(workerPoolName) + .location; + } + + /** + * Parse the worker_pool from WorkerPool resource. + * + * @param {string} workerPoolName + * A fully-qualified path representing WorkerPool resource. + * @returns {string} A string representing the worker_pool. + */ + matchWorkerPoolFromWorkerPoolName(workerPoolName: string) { + return this.pathTemplates.workerPoolPathTemplate.match(workerPoolName) + .worker_pool; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + this.initialize(); + if (!this._terminated) { + return this.cloudDeployStub!.then(stub => { + this._terminated = true; + stub.close(); + this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-deploy/src/v1/cloud_deploy_client_config.json b/packages/google-cloud-deploy/src/v1/cloud_deploy_client_config.json new file mode 100644 index 00000000000..66d903ee9ea --- /dev/null +++ b/packages/google-cloud-deploy/src/v1/cloud_deploy_client_config.json @@ -0,0 +1,128 @@ +{ + "interfaces": { + "google.cloud.deploy.v1.CloudDeploy": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unavailable": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + }, + "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "ListDeliveryPipelines": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetDeliveryPipeline": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateDeliveryPipeline": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateDeliveryPipeline": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteDeliveryPipeline": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListTargets": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetTarget": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateTarget": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateTarget": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteTarget": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListReleases": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetRelease": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateRelease": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ApproveRollout": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListRollouts": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetRollout": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateRollout": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetConfig": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + } + } + } + } +} diff --git a/packages/google-cloud-deploy/src/v1/cloud_deploy_proto_list.json b/packages/google-cloud-deploy/src/v1/cloud_deploy_proto_list.json new file mode 100644 index 00000000000..3b48250d236 --- /dev/null +++ b/packages/google-cloud-deploy/src/v1/cloud_deploy_proto_list.json @@ -0,0 +1,3 @@ +[ + "../../protos/google/cloud/deploy/v1/cloud_deploy.proto" +] diff --git a/packages/google-cloud-deploy/src/v1/gapic_metadata.json b/packages/google-cloud-deploy/src/v1/gapic_metadata.json new file mode 100644 index 00000000000..70fe48dec2c --- /dev/null +++ b/packages/google-cloud-deploy/src/v1/gapic_metadata.json @@ -0,0 +1,219 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.deploy.v1", + "libraryPackage": "@google-cloud/deploy", + "services": { + "CloudDeploy": { + "clients": { + "grpc": { + "libraryClient": "CloudDeployClient", + "rpcs": { + "GetDeliveryPipeline": { + "methods": [ + "getDeliveryPipeline" + ] + }, + "GetTarget": { + "methods": [ + "getTarget" + ] + }, + "GetRelease": { + "methods": [ + "getRelease" + ] + }, + "ApproveRollout": { + "methods": [ + "approveRollout" + ] + }, + "GetRollout": { + "methods": [ + "getRollout" + ] + }, + "GetConfig": { + "methods": [ + "getConfig" + ] + }, + "CreateDeliveryPipeline": { + "methods": [ + "createDeliveryPipeline" + ] + }, + "UpdateDeliveryPipeline": { + "methods": [ + "updateDeliveryPipeline" + ] + }, + "DeleteDeliveryPipeline": { + "methods": [ + "deleteDeliveryPipeline" + ] + }, + "CreateTarget": { + "methods": [ + "createTarget" + ] + }, + "UpdateTarget": { + "methods": [ + "updateTarget" + ] + }, + "DeleteTarget": { + "methods": [ + "deleteTarget" + ] + }, + "CreateRelease": { + "methods": [ + "createRelease" + ] + }, + "CreateRollout": { + "methods": [ + "createRollout" + ] + }, + "ListDeliveryPipelines": { + "methods": [ + "listDeliveryPipelines", + "listDeliveryPipelinesStream", + "listDeliveryPipelinesAsync" + ] + }, + "ListTargets": { + "methods": [ + "listTargets", + "listTargetsStream", + "listTargetsAsync" + ] + }, + "ListReleases": { + "methods": [ + "listReleases", + "listReleasesStream", + "listReleasesAsync" + ] + }, + "ListRollouts": { + "methods": [ + "listRollouts", + "listRolloutsStream", + "listRolloutsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "CloudDeployClient", + "rpcs": { + "GetDeliveryPipeline": { + "methods": [ + "getDeliveryPipeline" + ] + }, + "GetTarget": { + "methods": [ + "getTarget" + ] + }, + "GetRelease": { + "methods": [ + "getRelease" + ] + }, + "ApproveRollout": { + "methods": [ + "approveRollout" + ] + }, + "GetRollout": { + "methods": [ + "getRollout" + ] + }, + "GetConfig": { + "methods": [ + "getConfig" + ] + }, + "CreateDeliveryPipeline": { + "methods": [ + "createDeliveryPipeline" + ] + }, + "UpdateDeliveryPipeline": { + "methods": [ + "updateDeliveryPipeline" + ] + }, + "DeleteDeliveryPipeline": { + "methods": [ + "deleteDeliveryPipeline" + ] + }, + "CreateTarget": { + "methods": [ + "createTarget" + ] + }, + "UpdateTarget": { + "methods": [ + "updateTarget" + ] + }, + "DeleteTarget": { + "methods": [ + "deleteTarget" + ] + }, + "CreateRelease": { + "methods": [ + "createRelease" + ] + }, + "CreateRollout": { + "methods": [ + "createRollout" + ] + }, + "ListDeliveryPipelines": { + "methods": [ + "listDeliveryPipelines", + "listDeliveryPipelinesStream", + "listDeliveryPipelinesAsync" + ] + }, + "ListTargets": { + "methods": [ + "listTargets", + "listTargetsStream", + "listTargetsAsync" + ] + }, + "ListReleases": { + "methods": [ + "listReleases", + "listReleasesStream", + "listReleasesAsync" + ] + }, + "ListRollouts": { + "methods": [ + "listRollouts", + "listRolloutsStream", + "listRolloutsAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/google-cloud-deploy/src/v1/index.ts b/packages/google-cloud-deploy/src/v1/index.ts new file mode 100644 index 00000000000..d7b0c0b4599 --- /dev/null +++ b/packages/google-cloud-deploy/src/v1/index.ts @@ -0,0 +1,19 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +export {CloudDeployClient} from './cloud_deploy_client'; diff --git a/packages/google-cloud-deploy/system-test/fixtures/sample/src/index.js b/packages/google-cloud-deploy/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..e9defe6426d --- /dev/null +++ b/packages/google-cloud-deploy/system-test/fixtures/sample/src/index.js @@ -0,0 +1,26 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* eslint-disable node/no-missing-require, no-unused-vars */ +const deploy = require('@google-cloud/deploy'); + +function main() { + const cloudDeployClient = new deploy.CloudDeployClient(); +} + +main(); diff --git a/packages/google-cloud-deploy/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-deploy/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..3bb895b186e --- /dev/null +++ b/packages/google-cloud-deploy/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,32 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {CloudDeployClient} from '@google-cloud/deploy'; + +// check that the client class type name can be used +function doStuffWithCloudDeployClient(client: CloudDeployClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const cloudDeployClient = new CloudDeployClient(); + doStuffWithCloudDeployClient(cloudDeployClient); +} + +main(); diff --git a/packages/google-cloud-deploy/system-test/install.ts b/packages/google-cloud-deploy/system-test/install.ts new file mode 100644 index 00000000000..d2d61c0396f --- /dev/null +++ b/packages/google-cloud-deploy/system-test/install.ts @@ -0,0 +1,51 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; + +describe('📦 pack-n-play test', () => { + it('TypeScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync( + './system-test/fixtures/sample/src/index.ts' + ).toString(), + }, + }; + await packNTest(options); + }); + + it('JavaScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + ts: readFileSync( + './system-test/fixtures/sample/src/index.js' + ).toString(), + }, + }; + await packNTest(options); + }); +}); diff --git a/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts b/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts new file mode 100644 index 00000000000..61b9dbbb861 --- /dev/null +++ b/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts @@ -0,0 +1,4225 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as clouddeployModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LROperation, operationsProtos} from 'google-gax'; + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubLongRunningCall( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().rejects(callError) + : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().callsArgWith(2, callError) + : sinon.stub().callsArgWith(2, null, mockOperation); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.CloudDeployClient', () => { + it('has servicePath', () => { + const servicePath = clouddeployModule.v1.CloudDeployClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = clouddeployModule.v1.CloudDeployClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = clouddeployModule.v1.CloudDeployClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new clouddeployModule.v1.CloudDeployClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.cloudDeployStub, undefined); + await client.initialize(); + assert(client.cloudDeployStub); + }); + + it('has close method', () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + + describe('getDeliveryPipeline', () => { + it('invokes getDeliveryPipeline without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetDeliveryPipelineRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.DeliveryPipeline() + ); + client.innerApiCalls.getDeliveryPipeline = + stubSimpleCall(expectedResponse); + const [response] = await client.getDeliveryPipeline(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getDeliveryPipeline as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getDeliveryPipeline without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetDeliveryPipelineRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.DeliveryPipeline() + ); + client.innerApiCalls.getDeliveryPipeline = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getDeliveryPipeline( + request, + ( + err?: Error | null, + result?: protos.google.cloud.deploy.v1.IDeliveryPipeline | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getDeliveryPipeline as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getDeliveryPipeline with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetDeliveryPipelineRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getDeliveryPipeline = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getDeliveryPipeline(request), expectedError); + assert( + (client.innerApiCalls.getDeliveryPipeline as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getTarget', () => { + it('invokes getTarget without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetTargetRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.Target() + ); + client.innerApiCalls.getTarget = stubSimpleCall(expectedResponse); + const [response] = await client.getTarget(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getTarget as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getTarget without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetTargetRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.Target() + ); + client.innerApiCalls.getTarget = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getTarget( + request, + ( + err?: Error | null, + result?: protos.google.cloud.deploy.v1.ITarget | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getTarget as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getTarget with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetTargetRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getTarget = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getTarget(request), expectedError); + assert( + (client.innerApiCalls.getTarget as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getRelease', () => { + it('invokes getRelease without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetReleaseRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.Release() + ); + client.innerApiCalls.getRelease = stubSimpleCall(expectedResponse); + const [response] = await client.getRelease(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getRelease as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getRelease without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetReleaseRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.Release() + ); + client.innerApiCalls.getRelease = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getRelease( + request, + ( + err?: Error | null, + result?: protos.google.cloud.deploy.v1.IRelease | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getRelease as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getRelease with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetReleaseRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getRelease = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getRelease(request), expectedError); + assert( + (client.innerApiCalls.getRelease as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('approveRollout', () => { + it('invokes approveRollout without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ApproveRolloutRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.ApproveRolloutResponse() + ); + client.innerApiCalls.approveRollout = stubSimpleCall(expectedResponse); + const [response] = await client.approveRollout(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.approveRollout as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes approveRollout without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ApproveRolloutRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.ApproveRolloutResponse() + ); + client.innerApiCalls.approveRollout = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.approveRollout( + request, + ( + err?: Error | null, + result?: protos.google.cloud.deploy.v1.IApproveRolloutResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.approveRollout as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes approveRollout with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ApproveRolloutRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.approveRollout = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.approveRollout(request), expectedError); + assert( + (client.innerApiCalls.approveRollout as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getRollout', () => { + it('invokes getRollout without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetRolloutRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.Rollout() + ); + client.innerApiCalls.getRollout = stubSimpleCall(expectedResponse); + const [response] = await client.getRollout(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getRollout as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getRollout without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetRolloutRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.Rollout() + ); + client.innerApiCalls.getRollout = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getRollout( + request, + ( + err?: Error | null, + result?: protos.google.cloud.deploy.v1.IRollout | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getRollout as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getRollout with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetRolloutRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getRollout = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getRollout(request), expectedError); + assert( + (client.innerApiCalls.getRollout as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getConfig', () => { + it('invokes getConfig without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetConfigRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.Config() + ); + client.innerApiCalls.getConfig = stubSimpleCall(expectedResponse); + const [response] = await client.getConfig(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getConfig without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetConfigRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.Config() + ); + client.innerApiCalls.getConfig = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getConfig( + request, + ( + err?: Error | null, + result?: protos.google.cloud.deploy.v1.IConfig | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getConfig with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetConfigRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getConfig = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getConfig(request), expectedError); + assert( + (client.innerApiCalls.getConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('createDeliveryPipeline', () => { + it('invokes createDeliveryPipeline without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createDeliveryPipeline = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createDeliveryPipeline(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createDeliveryPipeline as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createDeliveryPipeline without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createDeliveryPipeline = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createDeliveryPipeline( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.deploy.v1.IDeliveryPipeline, + protos.google.cloud.deploy.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.deploy.v1.IDeliveryPipeline, + protos.google.cloud.deploy.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createDeliveryPipeline as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createDeliveryPipeline with call error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createDeliveryPipeline = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.createDeliveryPipeline(request), + expectedError + ); + assert( + (client.innerApiCalls.createDeliveryPipeline as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createDeliveryPipeline with LRO error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createDeliveryPipeline = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createDeliveryPipeline(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.createDeliveryPipeline as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkCreateDeliveryPipelineProgress without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateDeliveryPipelineProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateDeliveryPipelineProgress with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkCreateDeliveryPipelineProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateDeliveryPipeline', () => { + it('invokes updateDeliveryPipeline without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest() + ); + request.deliveryPipeline = {}; + request.deliveryPipeline.name = ''; + const expectedHeaderRequestParams = 'delivery_pipeline.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateDeliveryPipeline = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateDeliveryPipeline(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateDeliveryPipeline as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateDeliveryPipeline without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest() + ); + request.deliveryPipeline = {}; + request.deliveryPipeline.name = ''; + const expectedHeaderRequestParams = 'delivery_pipeline.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateDeliveryPipeline = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateDeliveryPipeline( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.deploy.v1.IDeliveryPipeline, + protos.google.cloud.deploy.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.deploy.v1.IDeliveryPipeline, + protos.google.cloud.deploy.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateDeliveryPipeline as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateDeliveryPipeline with call error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest() + ); + request.deliveryPipeline = {}; + request.deliveryPipeline.name = ''; + const expectedHeaderRequestParams = 'delivery_pipeline.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDeliveryPipeline = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.updateDeliveryPipeline(request), + expectedError + ); + assert( + (client.innerApiCalls.updateDeliveryPipeline as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateDeliveryPipeline with LRO error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest() + ); + request.deliveryPipeline = {}; + request.deliveryPipeline.name = ''; + const expectedHeaderRequestParams = 'delivery_pipeline.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDeliveryPipeline = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateDeliveryPipeline(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.updateDeliveryPipeline as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkUpdateDeliveryPipelineProgress without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateDeliveryPipelineProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateDeliveryPipelineProgress with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkUpdateDeliveryPipelineProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteDeliveryPipeline', () => { + it('invokes deleteDeliveryPipeline without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteDeliveryPipeline = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteDeliveryPipeline(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteDeliveryPipeline as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteDeliveryPipeline without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteDeliveryPipeline = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteDeliveryPipeline( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteDeliveryPipeline as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteDeliveryPipeline with call error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteDeliveryPipeline = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.deleteDeliveryPipeline(request), + expectedError + ); + assert( + (client.innerApiCalls.deleteDeliveryPipeline as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteDeliveryPipeline with LRO error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteDeliveryPipeline = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteDeliveryPipeline(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.deleteDeliveryPipeline as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkDeleteDeliveryPipelineProgress without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteDeliveryPipelineProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteDeliveryPipelineProgress with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkDeleteDeliveryPipelineProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createTarget', () => { + it('invokes createTarget without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateTargetRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createTarget = stubLongRunningCall(expectedResponse); + const [operation] = await client.createTarget(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createTarget as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createTarget without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateTargetRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createTarget = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createTarget( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createTarget as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createTarget with call error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateTargetRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createTarget = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createTarget(request), expectedError); + assert( + (client.innerApiCalls.createTarget as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createTarget with LRO error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateTargetRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createTarget = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createTarget(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.createTarget as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkCreateTargetProgress without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateTargetProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateTargetProgress with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.checkCreateTargetProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateTarget', () => { + it('invokes updateTarget without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.UpdateTargetRequest() + ); + request.target = {}; + request.target.name = ''; + const expectedHeaderRequestParams = 'target.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateTarget = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateTarget(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateTarget as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateTarget without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.UpdateTargetRequest() + ); + request.target = {}; + request.target.name = ''; + const expectedHeaderRequestParams = 'target.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateTarget = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateTarget( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateTarget as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateTarget with call error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.UpdateTargetRequest() + ); + request.target = {}; + request.target.name = ''; + const expectedHeaderRequestParams = 'target.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateTarget = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updateTarget(request), expectedError); + assert( + (client.innerApiCalls.updateTarget as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateTarget with LRO error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.UpdateTargetRequest() + ); + request.target = {}; + request.target.name = ''; + const expectedHeaderRequestParams = 'target.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateTarget = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateTarget(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.updateTarget as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkUpdateTargetProgress without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateTargetProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateTargetProgress with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.checkUpdateTargetProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteTarget', () => { + it('invokes deleteTarget without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.DeleteTargetRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteTarget = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteTarget(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteTarget as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteTarget without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.DeleteTargetRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteTarget = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteTarget( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteTarget as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteTarget with call error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.DeleteTargetRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteTarget = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteTarget(request), expectedError); + assert( + (client.innerApiCalls.deleteTarget as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteTarget with LRO error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.DeleteTargetRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteTarget = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteTarget(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.deleteTarget as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkDeleteTargetProgress without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteTargetProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteTargetProgress with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.checkDeleteTargetProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createRelease', () => { + it('invokes createRelease without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateReleaseRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createRelease = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createRelease(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createRelease as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createRelease without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateReleaseRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createRelease = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createRelease( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.deploy.v1.IRelease, + protos.google.cloud.deploy.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.deploy.v1.IRelease, + protos.google.cloud.deploy.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createRelease as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createRelease with call error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateReleaseRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createRelease = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createRelease(request), expectedError); + assert( + (client.innerApiCalls.createRelease as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createRelease with LRO error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateReleaseRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createRelease = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createRelease(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.createRelease as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkCreateReleaseProgress without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateReleaseProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateReleaseProgress with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkCreateReleaseProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createRollout', () => { + it('invokes createRollout without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateRolloutRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createRollout = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createRollout(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createRollout as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createRollout without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateRolloutRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createRollout = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createRollout( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.deploy.v1.IRollout, + protos.google.cloud.deploy.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.deploy.v1.IRollout, + protos.google.cloud.deploy.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createRollout as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createRollout with call error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateRolloutRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createRollout = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createRollout(request), expectedError); + assert( + (client.innerApiCalls.createRollout as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createRollout with LRO error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateRolloutRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createRollout = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createRollout(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.createRollout as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkCreateRolloutProgress without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateRolloutProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateRolloutProgress with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkCreateRolloutProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listDeliveryPipelines', () => { + it('invokes listDeliveryPipelines without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.deploy.v1.DeliveryPipeline() + ), + generateSampleMessage( + new protos.google.cloud.deploy.v1.DeliveryPipeline() + ), + generateSampleMessage( + new protos.google.cloud.deploy.v1.DeliveryPipeline() + ), + ]; + client.innerApiCalls.listDeliveryPipelines = + stubSimpleCall(expectedResponse); + const [response] = await client.listDeliveryPipelines(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listDeliveryPipelines as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listDeliveryPipelines without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.deploy.v1.DeliveryPipeline() + ), + generateSampleMessage( + new protos.google.cloud.deploy.v1.DeliveryPipeline() + ), + generateSampleMessage( + new protos.google.cloud.deploy.v1.DeliveryPipeline() + ), + ]; + client.innerApiCalls.listDeliveryPipelines = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDeliveryPipelines( + request, + ( + err?: Error | null, + result?: protos.google.cloud.deploy.v1.IDeliveryPipeline[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listDeliveryPipelines as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listDeliveryPipelines with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listDeliveryPipelines = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listDeliveryPipelines(request), + expectedError + ); + assert( + (client.innerApiCalls.listDeliveryPipelines as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listDeliveryPipelinesStream without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.deploy.v1.DeliveryPipeline() + ), + generateSampleMessage( + new protos.google.cloud.deploy.v1.DeliveryPipeline() + ), + generateSampleMessage( + new protos.google.cloud.deploy.v1.DeliveryPipeline() + ), + ]; + client.descriptors.page.listDeliveryPipelines.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listDeliveryPipelinesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.deploy.v1.DeliveryPipeline[] = []; + stream.on( + 'data', + (response: protos.google.cloud.deploy.v1.DeliveryPipeline) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.listDeliveryPipelines + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listDeliveryPipelines, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listDeliveryPipelines + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listDeliveryPipelinesStream with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listDeliveryPipelines.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listDeliveryPipelinesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.deploy.v1.DeliveryPipeline[] = []; + stream.on( + 'data', + (response: protos.google.cloud.deploy.v1.DeliveryPipeline) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listDeliveryPipelines + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listDeliveryPipelines, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listDeliveryPipelines + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listDeliveryPipelines without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.deploy.v1.DeliveryPipeline() + ), + generateSampleMessage( + new protos.google.cloud.deploy.v1.DeliveryPipeline() + ), + generateSampleMessage( + new protos.google.cloud.deploy.v1.DeliveryPipeline() + ), + ]; + client.descriptors.page.listDeliveryPipelines.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.deploy.v1.IDeliveryPipeline[] = []; + const iterable = client.listDeliveryPipelinesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listDeliveryPipelines + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listDeliveryPipelines + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listDeliveryPipelines with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listDeliveryPipelines.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listDeliveryPipelinesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.deploy.v1.IDeliveryPipeline[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listDeliveryPipelines + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listDeliveryPipelines + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listTargets', () => { + it('invokes listTargets without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListTargetsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + ]; + client.innerApiCalls.listTargets = stubSimpleCall(expectedResponse); + const [response] = await client.listTargets(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listTargets as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listTargets without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListTargetsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + ]; + client.innerApiCalls.listTargets = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listTargets( + request, + ( + err?: Error | null, + result?: protos.google.cloud.deploy.v1.ITarget[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listTargets as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listTargets with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListTargetsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listTargets = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listTargets(request), expectedError); + assert( + (client.innerApiCalls.listTargets as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listTargetsStream without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListTargetsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + ]; + client.descriptors.page.listTargets.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listTargetsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.deploy.v1.Target[] = []; + stream.on('data', (response: protos.google.cloud.deploy.v1.Target) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listTargets.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listTargets, request) + ); + assert.strictEqual( + (client.descriptors.page.listTargets.createStream as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listTargetsStream with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListTargetsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listTargets.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listTargetsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.deploy.v1.Target[] = []; + stream.on('data', (response: protos.google.cloud.deploy.v1.Target) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listTargets.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listTargets, request) + ); + assert.strictEqual( + (client.descriptors.page.listTargets.createStream as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listTargets without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListTargetsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + ]; + client.descriptors.page.listTargets.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.deploy.v1.ITarget[] = []; + const iterable = client.listTargetsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listTargets.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listTargets.asyncIterate as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listTargets with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListTargetsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listTargets.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listTargetsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.deploy.v1.ITarget[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listTargets.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listTargets.asyncIterate as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listReleases', () => { + it('invokes listReleases without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListReleasesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), + ]; + client.innerApiCalls.listReleases = stubSimpleCall(expectedResponse); + const [response] = await client.listReleases(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listReleases as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listReleases without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListReleasesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), + ]; + client.innerApiCalls.listReleases = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listReleases( + request, + ( + err?: Error | null, + result?: protos.google.cloud.deploy.v1.IRelease[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listReleases as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listReleases with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListReleasesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listReleases = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listReleases(request), expectedError); + assert( + (client.innerApiCalls.listReleases as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listReleasesStream without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListReleasesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), + ]; + client.descriptors.page.listReleases.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listReleasesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.deploy.v1.Release[] = []; + stream.on('data', (response: protos.google.cloud.deploy.v1.Release) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listReleases.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listReleases, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listReleases.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listReleasesStream with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListReleasesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listReleases.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listReleasesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.deploy.v1.Release[] = []; + stream.on('data', (response: protos.google.cloud.deploy.v1.Release) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listReleases.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listReleases, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listReleases.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listReleases without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListReleasesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), + ]; + client.descriptors.page.listReleases.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.deploy.v1.IRelease[] = []; + const iterable = client.listReleasesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listReleases.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listReleases.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listReleases with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListReleasesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listReleases.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listReleasesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.deploy.v1.IRelease[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listReleases.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listReleases.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listRollouts', () => { + it('invokes listRollouts without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListRolloutsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), + ]; + client.innerApiCalls.listRollouts = stubSimpleCall(expectedResponse); + const [response] = await client.listRollouts(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listRollouts as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listRollouts without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListRolloutsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), + ]; + client.innerApiCalls.listRollouts = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listRollouts( + request, + ( + err?: Error | null, + result?: protos.google.cloud.deploy.v1.IRollout[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listRollouts as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listRollouts with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListRolloutsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listRollouts = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listRollouts(request), expectedError); + assert( + (client.innerApiCalls.listRollouts as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listRolloutsStream without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListRolloutsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), + ]; + client.descriptors.page.listRollouts.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listRolloutsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.deploy.v1.Rollout[] = []; + stream.on('data', (response: protos.google.cloud.deploy.v1.Rollout) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listRollouts.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listRollouts, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listRollouts.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listRolloutsStream with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListRolloutsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listRollouts.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listRolloutsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.deploy.v1.Rollout[] = []; + stream.on('data', (response: protos.google.cloud.deploy.v1.Rollout) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listRollouts.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listRollouts, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listRollouts.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listRollouts without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListRolloutsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), + ]; + client.descriptors.page.listRollouts.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.deploy.v1.IRollout[] = []; + const iterable = client.listRolloutsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listRollouts.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listRollouts.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listRollouts with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListRolloutsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listRollouts.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listRolloutsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.deploy.v1.IRollout[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listRollouts.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listRollouts.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('Path templates', () => { + describe('build', () => { + const fakePath = '/rendered/path/build'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + build: 'buildValue', + }; + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.buildPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.buildPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('buildPath', () => { + const result = client.buildPath( + 'projectValue', + 'locationValue', + 'buildValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.buildPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromBuildName', () => { + const result = client.matchProjectFromBuildName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.buildPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromBuildName', () => { + const result = client.matchLocationFromBuildName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.buildPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBuildFromBuildName', () => { + const result = client.matchBuildFromBuildName(fakePath); + assert.strictEqual(result, 'buildValue'); + assert( + (client.pathTemplates.buildPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('cluster', () => { + const fakePath = '/rendered/path/cluster'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + cluster: 'clusterValue', + }; + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.clusterPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.clusterPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('clusterPath', () => { + const result = client.clusterPath( + 'projectValue', + 'locationValue', + 'clusterValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.clusterPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromClusterName', () => { + const result = client.matchProjectFromClusterName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.clusterPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromClusterName', () => { + const result = client.matchLocationFromClusterName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.clusterPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchClusterFromClusterName', () => { + const result = client.matchClusterFromClusterName(fakePath); + assert.strictEqual(result, 'clusterValue'); + assert( + (client.pathTemplates.clusterPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('config', () => { + const fakePath = '/rendered/path/config'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.configPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.configPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('configPath', () => { + const result = client.configPath('projectValue', 'locationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.configPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromConfigName', () => { + const result = client.matchProjectFromConfigName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.configPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromConfigName', () => { + const result = client.matchLocationFromConfigName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.configPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('deliveryPipeline', () => { + const fakePath = '/rendered/path/deliveryPipeline'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + delivery_pipeline: 'deliveryPipelineValue', + }; + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.deliveryPipelinePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.deliveryPipelinePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('deliveryPipelinePath', () => { + const result = client.deliveryPipelinePath( + 'projectValue', + 'locationValue', + 'deliveryPipelineValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.deliveryPipelinePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromDeliveryPipelineName', () => { + const result = client.matchProjectFromDeliveryPipelineName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.deliveryPipelinePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromDeliveryPipelineName', () => { + const result = client.matchLocationFromDeliveryPipelineName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.deliveryPipelinePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDeliveryPipelineFromDeliveryPipelineName', () => { + const result = + client.matchDeliveryPipelineFromDeliveryPipelineName(fakePath); + assert.strictEqual(result, 'deliveryPipelineValue'); + assert( + (client.pathTemplates.deliveryPipelinePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('location', () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.locationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.locationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath('projectValue', 'locationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('project', () => { + const fakePath = '/rendered/path/project'; + const expectedParameters = { + project: 'projectValue', + }; + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectPath', () => { + const result = client.projectPath('projectValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectName', () => { + const result = client.matchProjectFromProjectName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('release', () => { + const fakePath = '/rendered/path/release'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + delivery_pipeline: 'deliveryPipelineValue', + release: 'releaseValue', + }; + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.releasePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.releasePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('releasePath', () => { + const result = client.releasePath( + 'projectValue', + 'locationValue', + 'deliveryPipelineValue', + 'releaseValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.releasePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromReleaseName', () => { + const result = client.matchProjectFromReleaseName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.releasePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromReleaseName', () => { + const result = client.matchLocationFromReleaseName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.releasePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDeliveryPipelineFromReleaseName', () => { + const result = client.matchDeliveryPipelineFromReleaseName(fakePath); + assert.strictEqual(result, 'deliveryPipelineValue'); + assert( + (client.pathTemplates.releasePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchReleaseFromReleaseName', () => { + const result = client.matchReleaseFromReleaseName(fakePath); + assert.strictEqual(result, 'releaseValue'); + assert( + (client.pathTemplates.releasePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('rollout', () => { + const fakePath = '/rendered/path/rollout'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + delivery_pipeline: 'deliveryPipelineValue', + release: 'releaseValue', + rollout: 'rolloutValue', + }; + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.rolloutPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.rolloutPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('rolloutPath', () => { + const result = client.rolloutPath( + 'projectValue', + 'locationValue', + 'deliveryPipelineValue', + 'releaseValue', + 'rolloutValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.rolloutPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromRolloutName', () => { + const result = client.matchProjectFromRolloutName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.rolloutPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromRolloutName', () => { + const result = client.matchLocationFromRolloutName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.rolloutPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDeliveryPipelineFromRolloutName', () => { + const result = client.matchDeliveryPipelineFromRolloutName(fakePath); + assert.strictEqual(result, 'deliveryPipelineValue'); + assert( + (client.pathTemplates.rolloutPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchReleaseFromRolloutName', () => { + const result = client.matchReleaseFromRolloutName(fakePath); + assert.strictEqual(result, 'releaseValue'); + assert( + (client.pathTemplates.rolloutPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRolloutFromRolloutName', () => { + const result = client.matchRolloutFromRolloutName(fakePath); + assert.strictEqual(result, 'rolloutValue'); + assert( + (client.pathTemplates.rolloutPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('target', () => { + const fakePath = '/rendered/path/target'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + target: 'targetValue', + }; + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.targetPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.targetPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('targetPath', () => { + const result = client.targetPath( + 'projectValue', + 'locationValue', + 'targetValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.targetPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromTargetName', () => { + const result = client.matchProjectFromTargetName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.targetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromTargetName', () => { + const result = client.matchLocationFromTargetName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.targetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTargetFromTargetName', () => { + const result = client.matchTargetFromTargetName(fakePath); + assert.strictEqual(result, 'targetValue'); + assert( + (client.pathTemplates.targetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('workerPool', () => { + const fakePath = '/rendered/path/workerPool'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + worker_pool: 'workerPoolValue', + }; + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.workerPoolPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.workerPoolPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('workerPoolPath', () => { + const result = client.workerPoolPath( + 'projectValue', + 'locationValue', + 'workerPoolValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.workerPoolPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromWorkerPoolName', () => { + const result = client.matchProjectFromWorkerPoolName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.workerPoolPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromWorkerPoolName', () => { + const result = client.matchLocationFromWorkerPoolName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.workerPoolPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchWorkerPoolFromWorkerPoolName', () => { + const result = client.matchWorkerPoolFromWorkerPoolName(fakePath); + assert.strictEqual(result, 'workerPoolValue'); + assert( + (client.pathTemplates.workerPoolPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-deploy/tsconfig.json b/packages/google-cloud-deploy/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/packages/google-cloud-deploy/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2018", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts" + ] +} diff --git a/packages/google-cloud-deploy/webpack.config.js b/packages/google-cloud-deploy/webpack.config.js new file mode 100644 index 00000000000..68d3b06f32d --- /dev/null +++ b/packages/google-cloud-deploy/webpack.config.js @@ -0,0 +1,64 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// https://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. + +const path = require('path'); + +module.exports = { + entry: './src/index.ts', + output: { + library: 'CloudDeploy', + filename: './cloud-deploy.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/, + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]gtoken/, + use: 'null-loader', + }, + ], + }, + mode: 'production', +}; From 034956ad18e4176430c5c422a4f995075886b4c9 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 7 Oct 2021 16:38:22 -0700 Subject: [PATCH 079/254] chore: release 0.2.0 (#3) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-deploy/CHANGELOG.md | 14 ++++++++++++++ packages/google-cloud-deploy/package.json | 2 +- packages/google-cloud-deploy/samples/package.json | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 packages/google-cloud-deploy/CHANGELOG.md diff --git a/packages/google-cloud-deploy/CHANGELOG.md b/packages/google-cloud-deploy/CHANGELOG.md new file mode 100644 index 00000000000..ad49ada49fd --- /dev/null +++ b/packages/google-cloud-deploy/CHANGELOG.md @@ -0,0 +1,14 @@ +# Changelog + +## 0.2.0 (2021-10-07) + + +### Features + +* initial generation of library ([#1](https://www.github.com/googleapis/nodejs-deploy/issues/1)) ([c22e971](https://www.github.com/googleapis/nodejs-deploy/commit/c22e9711390855c0c992d3f89ac47360c7e47daf)) +* initial stub of library ([7b1cddd](https://www.github.com/googleapis/nodejs-deploy/commit/7b1cdddd39f236838bba28d70ab9b24ba66a8aa5)) + + +### Miscellaneous Chores + +* force minor version bump ([ec4abc9](https://www.github.com/googleapis/nodejs-deploy/commit/ec4abc940641181946ae5c27079c9e72b26774cf)) diff --git a/packages/google-cloud-deploy/package.json b/packages/google-cloud-deploy/package.json index 59199627079..72efd21e08d 100644 --- a/packages/google-cloud-deploy/package.json +++ b/packages/google-cloud-deploy/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/deploy", - "version": "0.1.0", + "version": "0.2.0", "description": "clouddeploy client for Node.js", "repository": "googleapis/nodejs-deploy", "license": "Apache-2.0", diff --git a/packages/google-cloud-deploy/samples/package.json b/packages/google-cloud-deploy/samples/package.json index 4d6b851328e..8bed2463166 100644 --- a/packages/google-cloud-deploy/samples/package.json +++ b/packages/google-cloud-deploy/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/deploy": "^0.1.0" + "@google-cloud/deploy": "^0.2.0" }, "devDependencies": { "c8": "^7.1.0", From ac7d011dc1a300b4625205e8ef28961a58897941 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 12 Oct 2021 18:56:19 +0200 Subject: [PATCH 080/254] chore(deps): update dependency mocha to v9 (#4) --- packages/google-cloud-deploy/package.json | 4 ++-- packages/google-cloud-deploy/samples/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-deploy/package.json b/packages/google-cloud-deploy/package.json index 72efd21e08d..fae9b346eb7 100644 --- a/packages/google-cloud-deploy/package.json +++ b/packages/google-cloud-deploy/package.json @@ -42,7 +42,7 @@ "google-gax": "^2.12.0" }, "devDependencies": { - "@types/mocha": "^8.2.2", + "@types/mocha": "^9.0.0", "@types/node": "^14.14.44", "@types/sinon": "^10.0.0", "c8": "^7.7.2", @@ -51,7 +51,7 @@ "jsdoc-fresh": "^1.0.2", "jsdoc-region-tag": "^1.0.6", "linkinator": "^2.13.6", - "mocha": "^8.4.0", + "mocha": "^9.0.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", "sinon": "^10.0.0", diff --git a/packages/google-cloud-deploy/samples/package.json b/packages/google-cloud-deploy/samples/package.json index 8bed2463166..984f9b1ed15 100644 --- a/packages/google-cloud-deploy/samples/package.json +++ b/packages/google-cloud-deploy/samples/package.json @@ -18,6 +18,6 @@ "devDependencies": { "c8": "^7.1.0", "chai": "^4.2.0", - "mocha": "^8.0.0" + "mocha": "^9.0.0" } } From 9883da7a686a02a9de4fe85edfa970735370b8b8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 12 Oct 2021 20:28:25 +0200 Subject: [PATCH 081/254] chore(deps): update dependency sinon to v11 (#5) --- packages/google-cloud-deploy/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-deploy/package.json b/packages/google-cloud-deploy/package.json index fae9b346eb7..1cf4b83cd55 100644 --- a/packages/google-cloud-deploy/package.json +++ b/packages/google-cloud-deploy/package.json @@ -54,7 +54,7 @@ "mocha": "^9.0.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", - "sinon": "^10.0.0", + "sinon": "^11.0.0", "ts-loader": "^9.1.2", "typescript": "^4.2.4", "webpack": "^5.36.2", From 767d606b7d06ed73d88df4de9ed7af59bbd766dc Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 14 Oct 2021 00:46:28 +0000 Subject: [PATCH 082/254] build(node): update deps used during postprocessing (#1243) (#33) --- .../protos/protos.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/google-cloud-gkeconnect-gateway/protos/protos.json b/packages/google-cloud-gkeconnect-gateway/protos/protos.json index 34b005d1551..4457ae24728 100644 --- a/packages/google-cloud-gkeconnect-gateway/protos/protos.json +++ b/packages/google-cloud-gkeconnect-gateway/protos/protos.json @@ -798,6 +798,18 @@ ] ], "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], [ 8, 8 From cecdd112df99fbd42a007773466bbfe17cd45d3a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 14 Oct 2021 00:46:32 +0000 Subject: [PATCH 083/254] build(node): update deps used during postprocessing (#1243) (#84) --- .../protos/protos.d.ts | 3 ++- .../protos/protos.js | 7 +++++++ .../protos/protos.json | 15 ++++++++++++++- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-policytroubleshooter/protos/protos.d.ts b/packages/google-cloud-policytroubleshooter/protos/protos.d.ts index 63270726e0f..7117b7f6084 100644 --- a/packages/google-cloud-policytroubleshooter/protos/protos.d.ts +++ b/packages/google-cloud-policytroubleshooter/protos/protos.d.ts @@ -745,7 +745,8 @@ export namespace google { OUTPUT_ONLY = 3, INPUT_ONLY = 4, IMMUTABLE = 5, - UNORDERED_LIST = 6 + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7 } /** Properties of a Http. */ diff --git a/packages/google-cloud-policytroubleshooter/protos/protos.js b/packages/google-cloud-policytroubleshooter/protos/protos.js index 513edb9493c..6b145c83ff6 100644 --- a/packages/google-cloud-policytroubleshooter/protos/protos.js +++ b/packages/google-cloud-policytroubleshooter/protos/protos.js @@ -1980,6 +1980,7 @@ * @property {number} INPUT_ONLY=4 INPUT_ONLY value * @property {number} IMMUTABLE=5 IMMUTABLE value * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value */ api.FieldBehavior = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -1990,6 +1991,7 @@ values[valuesById[4] = "INPUT_ONLY"] = 4; values[valuesById[5] = "IMMUTABLE"] = 5; values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; return values; })(); @@ -8342,6 +8344,7 @@ case 4: case 5: case 6: + case 7: break; } } @@ -8441,6 +8444,10 @@ case 6: message[".google.api.fieldBehavior"][i] = 6; break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; } } return message; diff --git a/packages/google-cloud-policytroubleshooter/protos/protos.json b/packages/google-cloud-policytroubleshooter/protos/protos.json index 8ba046c7010..0b5f7d56d40 100644 --- a/packages/google-cloud-policytroubleshooter/protos/protos.json +++ b/packages/google-cloud-policytroubleshooter/protos/protos.json @@ -226,7 +226,8 @@ "OUTPUT_ONLY": 3, "INPUT_ONLY": 4, "IMMUTABLE": 5, - "UNORDERED_LIST": 6 + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7 } }, "http": { @@ -895,6 +896,18 @@ ] ], "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], [ 8, 8 From 489a56ee4622c3d99a3e6015396002558707fb9e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 14 Oct 2021 00:48:31 +0000 Subject: [PATCH 084/254] build(node): update deps used during postprocessing (#1243) (#44) --- packages/google-cloud-shell/protos/protos.d.ts | 3 ++- packages/google-cloud-shell/protos/protos.js | 7 +++++++ packages/google-cloud-shell/protos/protos.json | 15 ++++++++++++++- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-shell/protos/protos.d.ts b/packages/google-cloud-shell/protos/protos.d.ts index 7de9f348cbb..2e82de739af 100644 --- a/packages/google-cloud-shell/protos/protos.d.ts +++ b/packages/google-cloud-shell/protos/protos.d.ts @@ -2122,7 +2122,8 @@ export namespace google { OUTPUT_ONLY = 3, INPUT_ONLY = 4, IMMUTABLE = 5, - UNORDERED_LIST = 6 + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7 } /** Properties of a ResourceDescriptor. */ diff --git a/packages/google-cloud-shell/protos/protos.js b/packages/google-cloud-shell/protos/protos.js index 9a14505b3ce..204cfa44050 100644 --- a/packages/google-cloud-shell/protos/protos.js +++ b/packages/google-cloud-shell/protos/protos.js @@ -4712,6 +4712,7 @@ * @property {number} INPUT_ONLY=4 INPUT_ONLY value * @property {number} IMMUTABLE=5 IMMUTABLE value * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value */ api.FieldBehavior = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -4722,6 +4723,7 @@ values[valuesById[4] = "INPUT_ONLY"] = 4; values[valuesById[5] = "IMMUTABLE"] = 5; values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; return values; })(); @@ -10890,6 +10892,7 @@ case 4: case 5: case 6: + case 7: break; } } @@ -10994,6 +10997,10 @@ case 6: message[".google.api.fieldBehavior"][i] = 6; break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; } } if (object[".google.api.resourceReference"] != null) { diff --git a/packages/google-cloud-shell/protos/protos.json b/packages/google-cloud-shell/protos/protos.json index 4440fc1cae9..956ddd412b1 100644 --- a/packages/google-cloud-shell/protos/protos.json +++ b/packages/google-cloud-shell/protos/protos.json @@ -500,7 +500,8 @@ "OUTPUT_ONLY": 3, "INPUT_ONLY": 4, "IMMUTABLE": 5, - "UNORDERED_LIST": 6 + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7 } }, "resourceReference": { @@ -1143,6 +1144,18 @@ ] ], "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], [ 8, 8 From 45ca8cf479a35936b035b416994ac10db2b4e9d1 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 14 Oct 2021 08:28:32 -0700 Subject: [PATCH 085/254] docs: update reference documentation url (#8) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: update reference documentation url * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- packages/google-cloud-deploy/.repo-metadata.json | 2 +- packages/google-cloud-deploy/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-deploy/.repo-metadata.json b/packages/google-cloud-deploy/.repo-metadata.json index 5dc0ec58a32..fc8828662b6 100644 --- a/packages/google-cloud-deploy/.repo-metadata.json +++ b/packages/google-cloud-deploy/.repo-metadata.json @@ -2,7 +2,7 @@ "name": "clouddeploy", "name_pretty": "Google Cloud Deploy", "product_documentation": "https://cloud.google.com/deploy/", - "client_documentation": "https://cloud.google.com/nodejs/docs/reference/clouddeploy/latest", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/deploy/latest", "issue_tracker": "https://github.com/googleapis/nodejs-deploy/issues", "release_level": "beta", "language": "nodejs", diff --git a/packages/google-cloud-deploy/README.md b/packages/google-cloud-deploy/README.md index c0de367de0e..62474336b43 100644 --- a/packages/google-cloud-deploy/README.md +++ b/packages/google-cloud-deploy/README.md @@ -183,7 +183,7 @@ Apache Version 2.0 See [LICENSE](https://github.com/googleapis/nodejs-deploy/blob/main/LICENSE) -[client-docs]: https://cloud.google.com/nodejs/docs/reference/clouddeploy/latest +[client-docs]: https://cloud.google.com/nodejs/docs/reference/deploy/latest [product-docs]: https://cloud.google.com/deploy/ [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png [projects]: https://console.cloud.google.com/project From 9ec5b6aafe7a63dc82ead401b985079e08b25b3c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 14 Oct 2021 15:34:11 +0000 Subject: [PATCH 086/254] build(node): update deps used during postprocessing (#1243) (#6) --- packages/google-cloud-deploy/protos/protos.d.ts | 3 ++- packages/google-cloud-deploy/protos/protos.js | 7 +++++++ packages/google-cloud-deploy/protos/protos.json | 15 ++++++++++++++- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-deploy/protos/protos.d.ts b/packages/google-cloud-deploy/protos/protos.d.ts index fef7eef3c44..999721ef412 100644 --- a/packages/google-cloud-deploy/protos/protos.d.ts +++ b/packages/google-cloud-deploy/protos/protos.d.ts @@ -5421,7 +5421,8 @@ export namespace google { OUTPUT_ONLY = 3, INPUT_ONLY = 4, IMMUTABLE = 5, - UNORDERED_LIST = 6 + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7 } /** Properties of a ResourceDescriptor. */ diff --git a/packages/google-cloud-deploy/protos/protos.js b/packages/google-cloud-deploy/protos/protos.js index c07b7460e95..d00c0a47c06 100644 --- a/packages/google-cloud-deploy/protos/protos.js +++ b/packages/google-cloud-deploy/protos/protos.js @@ -13584,6 +13584,7 @@ * @property {number} INPUT_ONLY=4 INPUT_ONLY value * @property {number} IMMUTABLE=5 IMMUTABLE value * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value */ api.FieldBehavior = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -13594,6 +13595,7 @@ values[valuesById[4] = "INPUT_ONLY"] = 4; values[valuesById[5] = "IMMUTABLE"] = 5; values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; return values; })(); @@ -19762,6 +19764,7 @@ case 4: case 5: case 6: + case 7: break; } } @@ -19866,6 +19869,10 @@ case 6: message[".google.api.fieldBehavior"][i] = 6; break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; } } if (object[".google.api.resourceReference"] != null) { diff --git a/packages/google-cloud-deploy/protos/protos.json b/packages/google-cloud-deploy/protos/protos.json index d72cb778101..b1382894c5d 100644 --- a/packages/google-cloud-deploy/protos/protos.json +++ b/packages/google-cloud-deploy/protos/protos.json @@ -1943,7 +1943,8 @@ "OUTPUT_ONLY": 3, "INPUT_ONLY": 4, "IMMUTABLE": 5, - "UNORDERED_LIST": 6 + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7 } }, "resourceReference": { @@ -2586,6 +2587,18 @@ ] ], "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], [ 8, 8 From 0b299f66929b530e3cb45e505956d1d641867c8b Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 19 Oct 2021 15:53:54 -0700 Subject: [PATCH 087/254] docs: fix docstring formatting (#9) Committer: @parthea PiperOrigin-RevId: 403986035 Source-Link: https://github.com/googleapis/googleapis/commit/bbe8aa1896799a456a90dfda189e9150ed92c310 Source-Link: https://github.com/googleapis/googleapis-gen/commit/4a43c7a5873fefde138a03b37e184ea27834c5f5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGE0M2M3YTU4NzNmZWZkZTEzOGEwM2IzN2UxODRlYTI3ODM0YzVmNSJ9 --- .../google/cloud/deploy/v1/cloud_deploy.proto | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/cloud_deploy.proto b/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/cloud_deploy.proto index 54071e0945f..ebdfb8891a3 100644 --- a/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/cloud_deploy.proto +++ b/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/cloud_deploy.proto @@ -265,9 +265,9 @@ message DeliveryPipeline { // Labels are attributes that can be set and used by both the // user and by Google Cloud Deploy. Labels must meet the following // constraints: Each resource is limited to 64 labels. Keys must conform to - // the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp: - // [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be - // <= 128 bytes in size. + // the regexp: `[a-zA-Z][a-zA-Z0-9_-]{0,62}`. Values must conform to the + // regexp: `[a-zA-Z0-9_-]{0,63}`. Both keys and values are additionally + // constrained to be <= 128 bytes in size. map labels = 5; // Output only. Time at which the pipeline was created. @@ -559,9 +559,9 @@ message Target { // Optional. Labels are attributes that can be set and used by both the // user and by Google Cloud Deploy. Labels must meet the following // constraints: Each resource is limited to 64 labels. Keys must conform to - // the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp: - // [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be - // <= 128 bytes in size. + // the regexp: `[a-zA-Z][a-zA-Z0-9_-]{0,62}`. Values must conform to the + // regexp: `[a-zA-Z0-9_-]{0,63}`. Both keys and values are additionally + // constrained to be <= 128 bytes in size. map labels = 6 [(google.api.field_behavior) = OPTIONAL]; // Optional. Whether or not the `Target` requires approval. @@ -914,9 +914,9 @@ message Release { // Labels are attributes that can be set and used by both the // user and by Google Cloud Deploy. Labels must meet the following // constraints: Each resource is limited to 64 labels. Keys must conform to - // the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp: - // [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be - // <= 128 bytes in size. + // the regexp: `[a-zA-Z][a-zA-Z0-9_-]{0,62}`. Values must conform to the + // regexp: `[a-zA-Z0-9_-]{0,63}`. Both keys and values are additionally + // constrained to be <= 128 bytes in size. map labels = 5; // Output only. Time at which the `Release` was created. @@ -1162,9 +1162,9 @@ message Rollout { // Labels are attributes that can be set and used by both the // user and by Google Cloud Deploy. Labels must meet the following // constraints: Each resource is limited to 64 labels. Keys must conform to - // the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp: - // [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be - // <= 128 bytes in size. + // the regexp: `[a-zA-Z][a-zA-Z0-9_-]{0,62}`. Values must conform to the + // regexp: `[a-zA-Z0-9_-]{0,63}`. Both keys and values are additionally + // constrained to be <= 128 bytes in size. map labels = 5; // Output only. Time at which the `Rollout` was created. From 410f592d35d1f4bd2e075aaef15898341194e809 Mon Sep 17 00:00:00 2001 From: Takashi Matsuo Date: Wed, 27 Oct 2021 06:32:48 -0700 Subject: [PATCH 088/254] chore: fix the wrong post processor image (#47) --- packages/google-cloud-shell/.github/.OwlBot.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-shell/.github/.OwlBot.yaml b/packages/google-cloud-shell/.github/.OwlBot.yaml index f06430a74b5..48848c007f0 100644 --- a/packages/google-cloud-shell/.github/.OwlBot.yaml +++ b/packages/google-cloud-shell/.github/.OwlBot.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. docker: - image: gcr.io/repo-automation-bots/owlbot-nodejs:latest + image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest deep-remove-regex: - /owl-bot-staging From 5206e9c9e42cdd37675d72d47d5e4868afe5a740 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 27 Oct 2021 17:33:03 +0200 Subject: [PATCH 089/254] chore(deps): update dependency @types/node to v16 (#46) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@types/node](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | [`^14.14.44` -> `^16.0.0`](https://renovatebot.com/diffs/npm/@types%2fnode/14.17.1/16.11.6) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.6/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.6/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.6/compatibility-slim/14.17.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.6/confidence-slim/14.17.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-cloud-shell). --- packages/google-cloud-shell/package-lock.json | 6 +++--- packages/google-cloud-shell/package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-shell/package-lock.json b/packages/google-cloud-shell/package-lock.json index c85647d246b..517ce7ca505 100644 --- a/packages/google-cloud-shell/package-lock.json +++ b/packages/google-cloud-shell/package-lock.json @@ -369,9 +369,9 @@ "dev": true }, "@types/node": { - "version": "14.17.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.17.1.tgz", - "integrity": "sha512-/tpUyFD7meeooTRwl3sYlihx2BrJE7q9XF71EguPFIySj9B7qgnRtHsHTho+0AUm4m1SvWGm6uSncrR94q6Vtw==" + "version": "16.11.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.6.tgz", + "integrity": "sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==" }, "@types/normalize-package-data": { "version": "2.4.0", diff --git a/packages/google-cloud-shell/package.json b/packages/google-cloud-shell/package.json index 001c51e019e..49d127cc59e 100644 --- a/packages/google-cloud-shell/package.json +++ b/packages/google-cloud-shell/package.json @@ -43,7 +43,7 @@ }, "devDependencies": { "@types/mocha": "^9.0.0", - "@types/node": "^14.14.44", + "@types/node": "^16.0.0", "@types/sinon": "^10.0.0", "c8": "^7.7.2", "gts": "^3.1.0", From 1e47d962d61523480cb19654f51d4429c42dce1b Mon Sep 17 00:00:00 2001 From: Takashi Matsuo Date: Wed, 27 Oct 2021 11:24:40 -0700 Subject: [PATCH 090/254] chore: fix the wrong post processor image (#86) --- packages/google-cloud-policytroubleshooter/.github/.OwlBot.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-policytroubleshooter/.github/.OwlBot.yaml b/packages/google-cloud-policytroubleshooter/.github/.OwlBot.yaml index 7755d95cc48..3d79186b3e6 100644 --- a/packages/google-cloud-policytroubleshooter/.github/.OwlBot.yaml +++ b/packages/google-cloud-policytroubleshooter/.github/.OwlBot.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. docker: - image: gcr.io/repo-automation-bots/owlbot-nodejs:latest + image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest deep-remove-regex: - /owl-bot-staging From a0cb9d03052f5c01fc32675272b337dabb0449e7 Mon Sep 17 00:00:00 2001 From: Takashi Matsuo Date: Wed, 27 Oct 2021 11:24:52 -0700 Subject: [PATCH 091/254] chore: fix the wrong post processor image (#35) --- packages/google-cloud-gkeconnect-gateway/.github/.OwlBot.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-gkeconnect-gateway/.github/.OwlBot.yaml b/packages/google-cloud-gkeconnect-gateway/.github/.OwlBot.yaml index 2a1fed1c72a..c89dac7e60c 100644 --- a/packages/google-cloud-gkeconnect-gateway/.github/.OwlBot.yaml +++ b/packages/google-cloud-gkeconnect-gateway/.github/.OwlBot.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. docker: - image: gcr.io/repo-automation-bots/owlbot-nodejs:latest + image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest deep-remove-regex: - /owl-bot-staging From 75aa7d034a308223d3a46e3e0b970a29b1f6a1bd Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 27 Oct 2021 20:50:26 +0200 Subject: [PATCH 092/254] chore(deps): update dependency @types/node to v16 (#34) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@types/node](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | [`^14.14.44` -> `^16.0.0`](https://renovatebot.com/diffs/npm/@types%2fnode/14.17.32/16.11.6) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.6/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.6/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.6/compatibility-slim/14.17.32)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.6/confidence-slim/14.17.32)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-gke-connect-gateway). --- packages/google-cloud-gkeconnect-gateway/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-gkeconnect-gateway/package.json b/packages/google-cloud-gkeconnect-gateway/package.json index 9948a2b8482..9fce996ed0a 100644 --- a/packages/google-cloud-gkeconnect-gateway/package.json +++ b/packages/google-cloud-gkeconnect-gateway/package.json @@ -43,7 +43,7 @@ }, "devDependencies": { "@types/mocha": "^9.0.0", - "@types/node": "^14.14.44", + "@types/node": "^16.0.0", "@types/sinon": "^10.0.0", "c8": "^7.7.2", "gts": "^3.1.0", From d69812a489c4588d2bf694a494f18fa1985626ff Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 27 Oct 2021 21:46:31 +0200 Subject: [PATCH 093/254] chore(deps): update dependency @types/node to v16 (#85) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@types/node](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | [`^14.14.10` -> `^16.0.0`](https://renovatebot.com/diffs/npm/@types%2fnode/14.17.32/16.11.6) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.6/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.6/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.6/compatibility-slim/14.17.32)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.6/confidence-slim/14.17.32)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-policy-troubleshooter). --- packages/google-cloud-policytroubleshooter/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-policytroubleshooter/package.json b/packages/google-cloud-policytroubleshooter/package.json index 669d6c7bd25..c09ce09a61c 100644 --- a/packages/google-cloud-policytroubleshooter/package.json +++ b/packages/google-cloud-policytroubleshooter/package.json @@ -43,7 +43,7 @@ }, "devDependencies": { "@types/mocha": "^8.0.4", - "@types/node": "^14.14.10", + "@types/node": "^16.0.0", "@types/sinon": "^10.0.0", "c8": "^7.3.5", "gts": "^3.0.3", From d93779c6f7c9bab126dade35bc9874d82a35eafa Mon Sep 17 00:00:00 2001 From: Takashi Matsuo Date: Wed, 27 Oct 2021 13:16:46 -0700 Subject: [PATCH 094/254] chore: fix the wrong post processor image (#11) --- packages/google-cloud-deploy/.github/.OwlBot.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-deploy/.github/.OwlBot.yaml b/packages/google-cloud-deploy/.github/.OwlBot.yaml index 5640bfb8925..9ca7b092bd6 100644 --- a/packages/google-cloud-deploy/.github/.OwlBot.yaml +++ b/packages/google-cloud-deploy/.github/.OwlBot.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. docker: - image: gcr.io/repo-automation-bots/owlbot-nodejs:latest + image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest deep-remove-regex: - /owl-bot-staging From c7dfe4b7fa2ed3a405acc542a3fa0791b6bb122b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 27 Oct 2021 22:45:58 +0200 Subject: [PATCH 095/254] chore(deps): update dependency @types/node to v16 (#10) Co-authored-by: Takashi Matsuo --- packages/google-cloud-deploy/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-deploy/package.json b/packages/google-cloud-deploy/package.json index 1cf4b83cd55..f77e25bf866 100644 --- a/packages/google-cloud-deploy/package.json +++ b/packages/google-cloud-deploy/package.json @@ -43,7 +43,7 @@ }, "devDependencies": { "@types/mocha": "^9.0.0", - "@types/node": "^14.14.44", + "@types/node": "^16.0.0", "@types/sinon": "^10.0.0", "c8": "^7.7.2", "gts": "^3.1.0", From 44400caeaa89dd99a916f37bb36e4d3986980edf Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Wed, 3 Nov 2021 11:42:13 -0400 Subject: [PATCH 096/254] chore(cloud-rad): delete api-extractor config (#48) --- .../google-cloud-shell/api-extractor.json | 369 ------------------ 1 file changed, 369 deletions(-) delete mode 100644 packages/google-cloud-shell/api-extractor.json diff --git a/packages/google-cloud-shell/api-extractor.json b/packages/google-cloud-shell/api-extractor.json deleted file mode 100644 index de228294b23..00000000000 --- a/packages/google-cloud-shell/api-extractor.json +++ /dev/null @@ -1,369 +0,0 @@ -/** - * Config file for API Extractor. For more info, please visit: https://api-extractor.com - */ -{ - "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - - /** - * Optionally specifies another JSON config file that this file extends from. This provides a way for - * standard settings to be shared across multiple projects. - * - * If the path starts with "./" or "../", the path is resolved relative to the folder of the file that contains - * the "extends" field. Otherwise, the first path segment is interpreted as an NPM package name, and will be - * resolved using NodeJS require(). - * - * SUPPORTED TOKENS: none - * DEFAULT VALUE: "" - */ - // "extends": "./shared/api-extractor-base.json" - // "extends": "my-package/include/api-extractor-base.json" - - /** - * Determines the "" token that can be used with other config file settings. The project folder - * typically contains the tsconfig.json and package.json config files, but the path is user-defined. - * - * The path is resolved relative to the folder of the config file that contains the setting. - * - * The default value for "projectFolder" is the token "", which means the folder is determined by traversing - * parent folders, starting from the folder containing api-extractor.json, and stopping at the first folder - * that contains a tsconfig.json file. If a tsconfig.json file cannot be found in this way, then an error - * will be reported. - * - * SUPPORTED TOKENS: - * DEFAULT VALUE: "" - */ - // "projectFolder": "..", - - /** - * (REQUIRED) Specifies the .d.ts file to be used as the starting point for analysis. API Extractor - * analyzes the symbols exported by this module. - * - * The file extension must be ".d.ts" and not ".ts". - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - */ - "mainEntryPointFilePath": "/protos/protos.d.ts", - - /** - * A list of NPM package names whose exports should be treated as part of this package. - * - * For example, suppose that Webpack is used to generate a distributed bundle for the project "library1", - * and another NPM package "library2" is embedded in this bundle. Some types from library2 may become part - * of the exported API for library1, but by default API Extractor would generate a .d.ts rollup that explicitly - * imports library2. To avoid this, we can specify: - * - * "bundledPackages": [ "library2" ], - * - * This would direct API Extractor to embed those types directly in the .d.ts rollup, as if they had been - * local files for library1. - */ - "bundledPackages": [ ], - - /** - * Determines how the TypeScript compiler engine will be invoked by API Extractor. - */ - "compiler": { - /** - * Specifies the path to the tsconfig.json file to be used by API Extractor when analyzing the project. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * Note: This setting will be ignored if "overrideTsconfig" is used. - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/tsconfig.json" - */ - // "tsconfigFilePath": "/tsconfig.json", - - /** - * Provides a compiler configuration that will be used instead of reading the tsconfig.json file from disk. - * The object must conform to the TypeScript tsconfig schema: - * - * http://json.schemastore.org/tsconfig - * - * If omitted, then the tsconfig.json file will be read from the "projectFolder". - * - * DEFAULT VALUE: no overrideTsconfig section - */ - // "overrideTsconfig": { - // . . . - // } - - /** - * This option causes the compiler to be invoked with the --skipLibCheck option. This option is not recommended - * and may cause API Extractor to produce incomplete or incorrect declarations, but it may be required when - * dependencies contain declarations that are incompatible with the TypeScript engine that API Extractor uses - * for its analysis. Where possible, the underlying issue should be fixed rather than relying on skipLibCheck. - * - * DEFAULT VALUE: false - */ - // "skipLibCheck": true, - }, - - /** - * Configures how the API report file (*.api.md) will be generated. - */ - "apiReport": { - /** - * (REQUIRED) Whether to generate an API report. - */ - "enabled": true, - - /** - * The filename for the API report files. It will be combined with "reportFolder" or "reportTempFolder" to produce - * a full file path. - * - * The file extension should be ".api.md", and the string should not contain a path separator such as "\" or "/". - * - * SUPPORTED TOKENS: , - * DEFAULT VALUE: ".api.md" - */ - // "reportFileName": ".api.md", - - /** - * Specifies the folder where the API report file is written. The file name portion is determined by - * the "reportFileName" setting. - * - * The API report file is normally tracked by Git. Changes to it can be used to trigger a branch policy, - * e.g. for an API review. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/etc/" - */ - // "reportFolder": "/etc/", - - /** - * Specifies the folder where the temporary report file is written. The file name portion is determined by - * the "reportFileName" setting. - * - * After the temporary file is written to disk, it is compared with the file in the "reportFolder". - * If they are different, a production build will fail. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/temp/" - */ - // "reportTempFolder": "/temp/" - }, - - /** - * Configures how the doc model file (*.api.json) will be generated. - */ - "docModel": { - /** - * (REQUIRED) Whether to generate a doc model file. - */ - "enabled": true, - - /** - * The output path for the doc model file. The file extension should be ".api.json". - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/temp/.api.json" - */ - // "apiJsonFilePath": "/temp/.api.json" - }, - - /** - * Configures how the .d.ts rollup file will be generated. - */ - "dtsRollup": { - /** - * (REQUIRED) Whether to generate the .d.ts rollup file. - */ - "enabled": true, - - /** - * Specifies the output path for a .d.ts rollup file to be generated without any trimming. - * This file will include all declarations that are exported by the main entry point. - * - * If the path is an empty string, then this file will not be written. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/dist/.d.ts" - */ - // "untrimmedFilePath": "/dist/.d.ts", - - /** - * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "beta" release. - * This file will include only declarations that are marked as "@public" or "@beta". - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "" - */ - // "betaTrimmedFilePath": "/dist/-beta.d.ts", - - - /** - * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "public" release. - * This file will include only declarations that are marked as "@public". - * - * If the path is an empty string, then this file will not be written. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "" - */ - // "publicTrimmedFilePath": "/dist/-public.d.ts", - - /** - * When a declaration is trimmed, by default it will be replaced by a code comment such as - * "Excluded from this release type: exampleMember". Set "omitTrimmingComments" to true to remove the - * declaration completely. - * - * DEFAULT VALUE: false - */ - // "omitTrimmingComments": true - }, - - /** - * Configures how the tsdoc-metadata.json file will be generated. - */ - "tsdocMetadata": { - /** - * Whether to generate the tsdoc-metadata.json file. - * - * DEFAULT VALUE: true - */ - // "enabled": true, - - /** - * Specifies where the TSDoc metadata file should be written. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * The default value is "", which causes the path to be automatically inferred from the "tsdocMetadata", - * "typings" or "main" fields of the project's package.json. If none of these fields are set, the lookup - * falls back to "tsdoc-metadata.json" in the package folder. - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "" - */ - // "tsdocMetadataFilePath": "/dist/tsdoc-metadata.json" - }, - - /** - * Specifies what type of newlines API Extractor should use when writing output files. By default, the output files - * will be written with Windows-style newlines. To use POSIX-style newlines, specify "lf" instead. - * To use the OS's default newline kind, specify "os". - * - * DEFAULT VALUE: "crlf" - */ - // "newlineKind": "crlf", - - /** - * Configures how API Extractor reports error and warning messages produced during analysis. - * - * There are three sources of messages: compiler messages, API Extractor messages, and TSDoc messages. - */ - "messages": { - /** - * Configures handling of diagnostic messages reported by the TypeScript compiler engine while analyzing - * the input .d.ts files. - * - * TypeScript message identifiers start with "TS" followed by an integer. For example: "TS2551" - * - * DEFAULT VALUE: A single "default" entry with logLevel=warning. - */ - "compilerMessageReporting": { - /** - * Configures the default routing for messages that don't match an explicit rule in this table. - */ - "default": { - /** - * Specifies whether the message should be written to the the tool's output log. Note that - * the "addToApiReportFile" property may supersede this option. - * - * Possible values: "error", "warning", "none" - * - * Errors cause the build to fail and return a nonzero exit code. Warnings cause a production build fail - * and return a nonzero exit code. For a non-production build (e.g. when "api-extractor run" includes - * the "--local" option), the warning is displayed but the build will not fail. - * - * DEFAULT VALUE: "warning" - */ - "logLevel": "warning", - - /** - * When addToApiReportFile is true: If API Extractor is configured to write an API report file (.api.md), - * then the message will be written inside that file; otherwise, the message is instead logged according to - * the "logLevel" option. - * - * DEFAULT VALUE: false - */ - // "addToApiReportFile": false - }, - - // "TS2551": { - // "logLevel": "warning", - // "addToApiReportFile": true - // }, - // - // . . . - }, - - /** - * Configures handling of messages reported by API Extractor during its analysis. - * - * API Extractor message identifiers start with "ae-". For example: "ae-extra-release-tag" - * - * DEFAULT VALUE: See api-extractor-defaults.json for the complete table of extractorMessageReporting mappings - */ - "extractorMessageReporting": { - "default": { - "logLevel": "warning", - // "addToApiReportFile": false - }, - - // "ae-extra-release-tag": { - // "logLevel": "warning", - // "addToApiReportFile": true - // }, - // - // . . . - }, - - /** - * Configures handling of messages reported by the TSDoc parser when analyzing code comments. - * - * TSDoc message identifiers start with "tsdoc-". For example: "tsdoc-link-tag-unescaped-text" - * - * DEFAULT VALUE: A single "default" entry with logLevel=warning. - */ - "tsdocMessageReporting": { - "default": { - "logLevel": "warning", - // "addToApiReportFile": false - } - - // "tsdoc-link-tag-unescaped-text": { - // "logLevel": "warning", - // "addToApiReportFile": true - // }, - // - // . . . - } - } - -} From 600814e294babf949df4f7a44a34a627e408eed4 Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Thu, 4 Nov 2021 11:50:38 -0400 Subject: [PATCH 097/254] chore(cloud-rad): delete api-extractor config (#88) --- .../api-extractor.json | 369 ------------------ 1 file changed, 369 deletions(-) delete mode 100644 packages/google-cloud-policytroubleshooter/api-extractor.json diff --git a/packages/google-cloud-policytroubleshooter/api-extractor.json b/packages/google-cloud-policytroubleshooter/api-extractor.json deleted file mode 100644 index de228294b23..00000000000 --- a/packages/google-cloud-policytroubleshooter/api-extractor.json +++ /dev/null @@ -1,369 +0,0 @@ -/** - * Config file for API Extractor. For more info, please visit: https://api-extractor.com - */ -{ - "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - - /** - * Optionally specifies another JSON config file that this file extends from. This provides a way for - * standard settings to be shared across multiple projects. - * - * If the path starts with "./" or "../", the path is resolved relative to the folder of the file that contains - * the "extends" field. Otherwise, the first path segment is interpreted as an NPM package name, and will be - * resolved using NodeJS require(). - * - * SUPPORTED TOKENS: none - * DEFAULT VALUE: "" - */ - // "extends": "./shared/api-extractor-base.json" - // "extends": "my-package/include/api-extractor-base.json" - - /** - * Determines the "" token that can be used with other config file settings. The project folder - * typically contains the tsconfig.json and package.json config files, but the path is user-defined. - * - * The path is resolved relative to the folder of the config file that contains the setting. - * - * The default value for "projectFolder" is the token "", which means the folder is determined by traversing - * parent folders, starting from the folder containing api-extractor.json, and stopping at the first folder - * that contains a tsconfig.json file. If a tsconfig.json file cannot be found in this way, then an error - * will be reported. - * - * SUPPORTED TOKENS: - * DEFAULT VALUE: "" - */ - // "projectFolder": "..", - - /** - * (REQUIRED) Specifies the .d.ts file to be used as the starting point for analysis. API Extractor - * analyzes the symbols exported by this module. - * - * The file extension must be ".d.ts" and not ".ts". - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - */ - "mainEntryPointFilePath": "/protos/protos.d.ts", - - /** - * A list of NPM package names whose exports should be treated as part of this package. - * - * For example, suppose that Webpack is used to generate a distributed bundle for the project "library1", - * and another NPM package "library2" is embedded in this bundle. Some types from library2 may become part - * of the exported API for library1, but by default API Extractor would generate a .d.ts rollup that explicitly - * imports library2. To avoid this, we can specify: - * - * "bundledPackages": [ "library2" ], - * - * This would direct API Extractor to embed those types directly in the .d.ts rollup, as if they had been - * local files for library1. - */ - "bundledPackages": [ ], - - /** - * Determines how the TypeScript compiler engine will be invoked by API Extractor. - */ - "compiler": { - /** - * Specifies the path to the tsconfig.json file to be used by API Extractor when analyzing the project. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * Note: This setting will be ignored if "overrideTsconfig" is used. - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/tsconfig.json" - */ - // "tsconfigFilePath": "/tsconfig.json", - - /** - * Provides a compiler configuration that will be used instead of reading the tsconfig.json file from disk. - * The object must conform to the TypeScript tsconfig schema: - * - * http://json.schemastore.org/tsconfig - * - * If omitted, then the tsconfig.json file will be read from the "projectFolder". - * - * DEFAULT VALUE: no overrideTsconfig section - */ - // "overrideTsconfig": { - // . . . - // } - - /** - * This option causes the compiler to be invoked with the --skipLibCheck option. This option is not recommended - * and may cause API Extractor to produce incomplete or incorrect declarations, but it may be required when - * dependencies contain declarations that are incompatible with the TypeScript engine that API Extractor uses - * for its analysis. Where possible, the underlying issue should be fixed rather than relying on skipLibCheck. - * - * DEFAULT VALUE: false - */ - // "skipLibCheck": true, - }, - - /** - * Configures how the API report file (*.api.md) will be generated. - */ - "apiReport": { - /** - * (REQUIRED) Whether to generate an API report. - */ - "enabled": true, - - /** - * The filename for the API report files. It will be combined with "reportFolder" or "reportTempFolder" to produce - * a full file path. - * - * The file extension should be ".api.md", and the string should not contain a path separator such as "\" or "/". - * - * SUPPORTED TOKENS: , - * DEFAULT VALUE: ".api.md" - */ - // "reportFileName": ".api.md", - - /** - * Specifies the folder where the API report file is written. The file name portion is determined by - * the "reportFileName" setting. - * - * The API report file is normally tracked by Git. Changes to it can be used to trigger a branch policy, - * e.g. for an API review. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/etc/" - */ - // "reportFolder": "/etc/", - - /** - * Specifies the folder where the temporary report file is written. The file name portion is determined by - * the "reportFileName" setting. - * - * After the temporary file is written to disk, it is compared with the file in the "reportFolder". - * If they are different, a production build will fail. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/temp/" - */ - // "reportTempFolder": "/temp/" - }, - - /** - * Configures how the doc model file (*.api.json) will be generated. - */ - "docModel": { - /** - * (REQUIRED) Whether to generate a doc model file. - */ - "enabled": true, - - /** - * The output path for the doc model file. The file extension should be ".api.json". - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/temp/.api.json" - */ - // "apiJsonFilePath": "/temp/.api.json" - }, - - /** - * Configures how the .d.ts rollup file will be generated. - */ - "dtsRollup": { - /** - * (REQUIRED) Whether to generate the .d.ts rollup file. - */ - "enabled": true, - - /** - * Specifies the output path for a .d.ts rollup file to be generated without any trimming. - * This file will include all declarations that are exported by the main entry point. - * - * If the path is an empty string, then this file will not be written. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/dist/.d.ts" - */ - // "untrimmedFilePath": "/dist/.d.ts", - - /** - * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "beta" release. - * This file will include only declarations that are marked as "@public" or "@beta". - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "" - */ - // "betaTrimmedFilePath": "/dist/-beta.d.ts", - - - /** - * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "public" release. - * This file will include only declarations that are marked as "@public". - * - * If the path is an empty string, then this file will not be written. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "" - */ - // "publicTrimmedFilePath": "/dist/-public.d.ts", - - /** - * When a declaration is trimmed, by default it will be replaced by a code comment such as - * "Excluded from this release type: exampleMember". Set "omitTrimmingComments" to true to remove the - * declaration completely. - * - * DEFAULT VALUE: false - */ - // "omitTrimmingComments": true - }, - - /** - * Configures how the tsdoc-metadata.json file will be generated. - */ - "tsdocMetadata": { - /** - * Whether to generate the tsdoc-metadata.json file. - * - * DEFAULT VALUE: true - */ - // "enabled": true, - - /** - * Specifies where the TSDoc metadata file should be written. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * The default value is "", which causes the path to be automatically inferred from the "tsdocMetadata", - * "typings" or "main" fields of the project's package.json. If none of these fields are set, the lookup - * falls back to "tsdoc-metadata.json" in the package folder. - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "" - */ - // "tsdocMetadataFilePath": "/dist/tsdoc-metadata.json" - }, - - /** - * Specifies what type of newlines API Extractor should use when writing output files. By default, the output files - * will be written with Windows-style newlines. To use POSIX-style newlines, specify "lf" instead. - * To use the OS's default newline kind, specify "os". - * - * DEFAULT VALUE: "crlf" - */ - // "newlineKind": "crlf", - - /** - * Configures how API Extractor reports error and warning messages produced during analysis. - * - * There are three sources of messages: compiler messages, API Extractor messages, and TSDoc messages. - */ - "messages": { - /** - * Configures handling of diagnostic messages reported by the TypeScript compiler engine while analyzing - * the input .d.ts files. - * - * TypeScript message identifiers start with "TS" followed by an integer. For example: "TS2551" - * - * DEFAULT VALUE: A single "default" entry with logLevel=warning. - */ - "compilerMessageReporting": { - /** - * Configures the default routing for messages that don't match an explicit rule in this table. - */ - "default": { - /** - * Specifies whether the message should be written to the the tool's output log. Note that - * the "addToApiReportFile" property may supersede this option. - * - * Possible values: "error", "warning", "none" - * - * Errors cause the build to fail and return a nonzero exit code. Warnings cause a production build fail - * and return a nonzero exit code. For a non-production build (e.g. when "api-extractor run" includes - * the "--local" option), the warning is displayed but the build will not fail. - * - * DEFAULT VALUE: "warning" - */ - "logLevel": "warning", - - /** - * When addToApiReportFile is true: If API Extractor is configured to write an API report file (.api.md), - * then the message will be written inside that file; otherwise, the message is instead logged according to - * the "logLevel" option. - * - * DEFAULT VALUE: false - */ - // "addToApiReportFile": false - }, - - // "TS2551": { - // "logLevel": "warning", - // "addToApiReportFile": true - // }, - // - // . . . - }, - - /** - * Configures handling of messages reported by API Extractor during its analysis. - * - * API Extractor message identifiers start with "ae-". For example: "ae-extra-release-tag" - * - * DEFAULT VALUE: See api-extractor-defaults.json for the complete table of extractorMessageReporting mappings - */ - "extractorMessageReporting": { - "default": { - "logLevel": "warning", - // "addToApiReportFile": false - }, - - // "ae-extra-release-tag": { - // "logLevel": "warning", - // "addToApiReportFile": true - // }, - // - // . . . - }, - - /** - * Configures handling of messages reported by the TSDoc parser when analyzing code comments. - * - * TSDoc message identifiers start with "tsdoc-". For example: "tsdoc-link-tag-unescaped-text" - * - * DEFAULT VALUE: A single "default" entry with logLevel=warning. - */ - "tsdocMessageReporting": { - "default": { - "logLevel": "warning", - // "addToApiReportFile": false - } - - // "tsdoc-link-tag-unescaped-text": { - // "logLevel": "warning", - // "addToApiReportFile": true - // }, - // - // . . . - } - } - -} From da92a07e69b4b9491a9b8d551c868bab5c61b373 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 4 Nov 2021 20:44:22 +0100 Subject: [PATCH 098/254] chore(deps): update dependency sinon to v12 (#49) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^11.0.0` -> `^12.0.0`](https://renovatebot.com/diffs/npm/sinon/11.1.1/12.0.1) | [![age](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/compatibility-slim/11.1.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/confidence-slim/11.1.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v12.0.1`](https://togithub.com/sinonjs/sinon/blob/master/CHANGES.md#​1201) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v12.0.0...v12.0.1) - [`3f598221`](https://togithub.com/sinonjs/sinon/commit/3f598221045904681f2b3b3ba1df617ed5e230e3) Fix issue with npm unlink for npm version > 6 (Carl-Erik Kopseng) > 'npm unlink' would implicitly unlink the current dir > until version 7, which requires an argument - [`51417a38`](https://togithub.com/sinonjs/sinon/commit/51417a38111eeeb7cd14338bfb762cc2df487e1b) Fix bundling of cjs module ([#​2412](https://togithub.com/sinonjs/sinon/issues/2412)) (Julian Grinblat) > - Fix bundling of cjs module > > - Run prettier *Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2021-11-04.* #### 12.0.0 ### [`v12.0.0`](https://togithub.com/sinonjs/sinon/compare/v11.1.2...v12.0.0) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v11.1.2...v12.0.0) ### [`v11.1.2`](https://togithub.com/sinonjs/sinon/blob/master/CHANGES.md#​1112) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v11.1.1...v11.1.2) - Upgrade [@​sinonjs/fake-timers](https://togithub.com/sinonjs/fake-timers) to latest, see https://github.com/sinonjs/fake-timers/blob/master/CHANGELOG.md#​712--2021-05-28 - Copy over accessor properties to target object [#​2387](https://togithub.com/sinonjs/sinon/issues/2387)
--- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-cloud-shell). --- packages/google-cloud-shell/package-lock.json | 19 +++++++++++++++---- packages/google-cloud-shell/package.json | 2 +- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-shell/package-lock.json b/packages/google-cloud-shell/package-lock.json index 517ce7ca505..f4dd6c03217 100644 --- a/packages/google-cloud-shell/package-lock.json +++ b/packages/google-cloud-shell/package-lock.json @@ -4235,17 +4235,28 @@ "dev": true }, "sinon": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-11.1.1.tgz", - "integrity": "sha512-ZSSmlkSyhUWbkF01Z9tEbxZLF/5tRC9eojCdFh33gtQaP7ITQVaMWQHGuFM7Cuf/KEfihuh1tTl3/ABju3AQMg==", + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-12.0.0.tgz", + "integrity": "sha512-wVMT1jvgyLroQu+tWTa2XJu2g5SoVaEBhdwGPuzmWlRvZNSG+pcEb8HEmsxTdoPjUL58pJFQ3+oFRWrhC4JKHw==", "dev": true, "requires": { "@sinonjs/commons": "^1.8.3", - "@sinonjs/fake-timers": "^7.1.0", + "@sinonjs/fake-timers": "^8.1.0", "@sinonjs/samsam": "^6.0.2", "diff": "^5.0.0", "nise": "^5.1.0", "supports-color": "^7.2.0" + }, + "dependencies": { + "@sinonjs/fake-timers": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz", + "integrity": "sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0" + } + } } }, "slash": { diff --git a/packages/google-cloud-shell/package.json b/packages/google-cloud-shell/package.json index 49d127cc59e..6ffd7ff908a 100644 --- a/packages/google-cloud-shell/package.json +++ b/packages/google-cloud-shell/package.json @@ -54,7 +54,7 @@ "mocha": "^9.0.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", - "sinon": "^11.0.0", + "sinon": "^12.0.0", "ts-loader": "^9.1.2", "typescript": "^4.2.4", "webpack": "^5.36.2", From 1ac39bfdb20e357d85e8ce57351d5c83b65de140 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 4 Nov 2021 20:48:16 +0100 Subject: [PATCH 099/254] chore(deps): update dependency sinon to v12 (#12) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^11.0.0` -> `^12.0.0`](https://renovatebot.com/diffs/npm/sinon/11.1.2/12.0.1) | [![age](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/compatibility-slim/11.1.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/confidence-slim/11.1.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v12.0.1`](https://togithub.com/sinonjs/sinon/blob/master/CHANGES.md#​1201) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v12.0.0...v12.0.1) - [`3f598221`](https://togithub.com/sinonjs/sinon/commit/3f598221045904681f2b3b3ba1df617ed5e230e3) Fix issue with npm unlink for npm version > 6 (Carl-Erik Kopseng) > 'npm unlink' would implicitly unlink the current dir > until version 7, which requires an argument - [`51417a38`](https://togithub.com/sinonjs/sinon/commit/51417a38111eeeb7cd14338bfb762cc2df487e1b) Fix bundling of cjs module ([#​2412](https://togithub.com/sinonjs/sinon/issues/2412)) (Julian Grinblat) > - Fix bundling of cjs module > > - Run prettier *Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2021-11-04.* #### 12.0.0 ### [`v12.0.0`](https://togithub.com/sinonjs/sinon/compare/v11.1.2...v12.0.0) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v11.1.2...v12.0.0)
--- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-deploy). --- packages/google-cloud-deploy/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-deploy/package.json b/packages/google-cloud-deploy/package.json index f77e25bf866..217d26f37df 100644 --- a/packages/google-cloud-deploy/package.json +++ b/packages/google-cloud-deploy/package.json @@ -54,7 +54,7 @@ "mocha": "^9.0.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", - "sinon": "^11.0.0", + "sinon": "^12.0.0", "ts-loader": "^9.1.2", "typescript": "^4.2.4", "webpack": "^5.36.2", From 6e2ba007f4335ef7ec3c60ac91696e2d74d8948d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 4 Nov 2021 20:50:12 +0100 Subject: [PATCH 100/254] chore(deps): update dependency sinon to v12 (#87) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^11.0.0` -> `^12.0.0`](https://renovatebot.com/diffs/npm/sinon/11.1.2/12.0.1) | [![age](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/compatibility-slim/11.1.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/confidence-slim/11.1.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v12.0.1`](https://togithub.com/sinonjs/sinon/blob/master/CHANGES.md#​1201) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v12.0.0...v12.0.1) - [`3f598221`](https://togithub.com/sinonjs/sinon/commit/3f598221045904681f2b3b3ba1df617ed5e230e3) Fix issue with npm unlink for npm version > 6 (Carl-Erik Kopseng) > 'npm unlink' would implicitly unlink the current dir > until version 7, which requires an argument - [`51417a38`](https://togithub.com/sinonjs/sinon/commit/51417a38111eeeb7cd14338bfb762cc2df487e1b) Fix bundling of cjs module ([#​2412](https://togithub.com/sinonjs/sinon/issues/2412)) (Julian Grinblat) > - Fix bundling of cjs module > > - Run prettier *Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2021-11-04.* #### 12.0.0 ### [`v12.0.0`](https://togithub.com/sinonjs/sinon/compare/v11.1.2...v12.0.0) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v11.1.2...v12.0.0)
--- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-policy-troubleshooter). --- packages/google-cloud-policytroubleshooter/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-policytroubleshooter/package.json b/packages/google-cloud-policytroubleshooter/package.json index c09ce09a61c..0d4837ef9a8 100644 --- a/packages/google-cloud-policytroubleshooter/package.json +++ b/packages/google-cloud-policytroubleshooter/package.json @@ -54,7 +54,7 @@ "mocha": "^8.2.1", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", - "sinon": "^11.0.0", + "sinon": "^12.0.0", "ts-loader": "^9.0.0", "typescript": "^4.1.2", "webpack": "^5.9.0", From 7baaa6f7745179f9bc5ddea1da5fc24d93316cd5 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 4 Nov 2021 20:56:20 +0100 Subject: [PATCH 101/254] chore(deps): update dependency sinon to v12 (#36) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^11.0.0` -> `^12.0.0`](https://renovatebot.com/diffs/npm/sinon/11.1.2/12.0.1) | [![age](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/compatibility-slim/11.1.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/confidence-slim/11.1.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v12.0.1`](https://togithub.com/sinonjs/sinon/blob/master/CHANGES.md#​1201) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v12.0.0...v12.0.1) - [`3f598221`](https://togithub.com/sinonjs/sinon/commit/3f598221045904681f2b3b3ba1df617ed5e230e3) Fix issue with npm unlink for npm version > 6 (Carl-Erik Kopseng) > 'npm unlink' would implicitly unlink the current dir > until version 7, which requires an argument - [`51417a38`](https://togithub.com/sinonjs/sinon/commit/51417a38111eeeb7cd14338bfb762cc2df487e1b) Fix bundling of cjs module ([#​2412](https://togithub.com/sinonjs/sinon/issues/2412)) (Julian Grinblat) > - Fix bundling of cjs module > > - Run prettier *Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2021-11-04.* #### 12.0.0 ### [`v12.0.0`](https://togithub.com/sinonjs/sinon/compare/v11.1.2...v12.0.0) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v11.1.2...v12.0.0)
--- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-gke-connect-gateway). --- packages/google-cloud-gkeconnect-gateway/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-gkeconnect-gateway/package.json b/packages/google-cloud-gkeconnect-gateway/package.json index 9fce996ed0a..4ff78b3bbf6 100644 --- a/packages/google-cloud-gkeconnect-gateway/package.json +++ b/packages/google-cloud-gkeconnect-gateway/package.json @@ -54,7 +54,7 @@ "mocha": "^9.0.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", - "sinon": "^11.0.0", + "sinon": "^12.0.0", "ts-loader": "^9.1.2", "typescript": "^4.2.4", "webpack": "^5.36.2", From 775376c19be9190881ecdb291811b17eb50921a3 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 10 Nov 2021 21:40:35 +0000 Subject: [PATCH 102/254] docs(samples): add example tags to generated samples (#89) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 408439482 Source-Link: https://github.com/googleapis/googleapis/commit/b9f61843dc80c7c285fc34fd3a40aae55082c2b9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/eb888bc214efc7bf43bf4634b470254565a659a5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWI4ODhiYzIxNGVmYzdiZjQzYmY0NjM0YjQ3MDI1NDU2NWE2NTlhNSJ9 --- .../linkinator.config.json | 2 +- .../v1/iam_checker.troubleshoot_iam_policy.js | 53 +++++++++++++++++++ .../src/v1/iam_checker_client.ts | 40 +++++++------- .../test/gapic_iam_checker_v1.ts | 6 +-- 4 files changed, 78 insertions(+), 23 deletions(-) create mode 100644 packages/google-cloud-policytroubleshooter/samples/generated/v1/iam_checker.troubleshoot_iam_policy.js diff --git a/packages/google-cloud-policytroubleshooter/linkinator.config.json b/packages/google-cloud-policytroubleshooter/linkinator.config.json index 29a223b6db6..0121dfa684f 100644 --- a/packages/google-cloud-policytroubleshooter/linkinator.config.json +++ b/packages/google-cloud-policytroubleshooter/linkinator.config.json @@ -6,5 +6,5 @@ "img.shields.io" ], "silent": true, - "concurrency": 10 + "concurrency": 5 } diff --git a/packages/google-cloud-policytroubleshooter/samples/generated/v1/iam_checker.troubleshoot_iam_policy.js b/packages/google-cloud-policytroubleshooter/samples/generated/v1/iam_checker.troubleshoot_iam_policy.js new file mode 100644 index 00000000000..73088c089d4 --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/samples/generated/v1/iam_checker.troubleshoot_iam_policy.js @@ -0,0 +1,53 @@ +// Copyright 2021 Google LLC +// +// 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. + +'use strict'; + +function main() { + // [START policytroubleshooter_v1_generated_IamChecker_TroubleshootIamPolicy_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The information to use for checking whether a member has a permission for a + * resource. + */ + // const accessTuple = {} + + // Imports the Policytroubleshooter library + const {IamCheckerClient} = require('@google-cloud/policy-troubleshooter').v1; + + // Instantiates a client + const policytroubleshooterClient = new IamCheckerClient(); + + async function callTroubleshootIamPolicy() { + // Construct request + const request = {}; + + // Run request + const response = await policytroubleshooterClient.troubleshootIamPolicy( + request + ); + console.log(response); + } + + callTroubleshootIamPolicy(); + // [END policytroubleshooter_v1_generated_IamChecker_TroubleshootIamPolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts b/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts index a0ef44b8bcc..2f02a2a46a0 100644 --- a/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts +++ b/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts @@ -283,6 +283,25 @@ export class IamCheckerClient { // ------------------- // -- Service calls -- // ------------------- + /** + * Checks whether a member has a specific permission for a specific resource, + * and explains why the member does or does not have that permission. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.policytroubleshooter.v1.AccessTuple} request.accessTuple + * The information to use for checking whether a member has a permission for a + * resource. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [TroubleshootIamPolicyResponse]{@link google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/iam_checker.troubleshoot_iam_policy.js + * region_tag:policytroubleshooter_v1_generated_IamChecker_TroubleshootIamPolicy_async + */ troubleshootIamPolicy( request?: protos.google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyRequest, options?: CallOptions @@ -317,25 +336,6 @@ export class IamCheckerClient { {} | null | undefined > ): void; - /** - * Checks whether a member has a specific permission for a specific resource, - * and explains why the member does or does not have that permission. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.policytroubleshooter.v1.AccessTuple} request.accessTuple - * The information to use for checking whether a member has a permission for a - * resource. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [TroubleshootIamPolicyResponse]{@link google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.troubleshootIamPolicy(request); - */ troubleshootIamPolicy( request?: protos.google.cloud.policytroubleshooter.v1.ITroubleshootIamPolicyRequest, optionsOrCallback?: @@ -373,6 +373,8 @@ export class IamCheckerClient { options = optionsOrCallback as CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; this.initialize(); return this.innerApiCalls.troubleshootIamPolicy(request, options, callback); } diff --git a/packages/google-cloud-policytroubleshooter/test/gapic_iam_checker_v1.ts b/packages/google-cloud-policytroubleshooter/test/gapic_iam_checker_v1.ts index 178c50d0176..fec432d36af 100644 --- a/packages/google-cloud-policytroubleshooter/test/gapic_iam_checker_v1.ts +++ b/packages/google-cloud-policytroubleshooter/test/gapic_iam_checker_v1.ts @@ -140,7 +140,7 @@ describe('v1.IamCheckerClient', () => { const request = generateSampleMessage( new protos.google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse() ); @@ -164,7 +164,7 @@ describe('v1.IamCheckerClient', () => { const request = generateSampleMessage( new protos.google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse() ); @@ -203,7 +203,7 @@ describe('v1.IamCheckerClient', () => { const request = generateSampleMessage( new protos.google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest() ); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.troubleshootIamPolicy = stubSimpleCall( undefined, From 5e41ce3f783c29f124976362bc25025f973fffb9 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 11 Nov 2021 16:08:43 -0800 Subject: [PATCH 103/254] docs(samples): add example tags to generated samples (#37) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs(samples): add example tags to generated samples PiperOrigin-RevId: 408439482 Source-Link: https://github.com/googleapis/googleapis/commit/b9f61843dc80c7c285fc34fd3a40aae55082c2b9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/eb888bc214efc7bf43bf4634b470254565a659a5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWI4ODhiYzIxNGVmYzdiZjQzYmY0NjM0YjQ3MDI1NDU2NWE2NTlhNSJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../linkinator.config.json | 2 +- .../gateway_service.delete_resource.js | 4 +- .../v1beta1/gateway_service.get_resource.js | 4 +- .../v1beta1/gateway_service.patch_resource.js | 4 +- .../v1beta1/gateway_service.post_resource.js | 4 +- .../v1beta1/gateway_service.put_resource.js | 4 +- .../src/v1beta1/gateway_service_client.ts | 230 +++++++++--------- .../test/gapic_gateway_service_v1beta1.ts | 30 +-- 8 files changed, 146 insertions(+), 136 deletions(-) diff --git a/packages/google-cloud-gkeconnect-gateway/linkinator.config.json b/packages/google-cloud-gkeconnect-gateway/linkinator.config.json index 29a223b6db6..0121dfa684f 100644 --- a/packages/google-cloud-gkeconnect-gateway/linkinator.config.json +++ b/packages/google-cloud-gkeconnect-gateway/linkinator.config.json @@ -6,5 +6,5 @@ "img.shields.io" ], "silent": true, - "concurrency": 10 + "concurrency": 5 } diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.delete_resource.js b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.delete_resource.js index ec54ce42e11..5a244bc6897 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.delete_resource.js +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.delete_resource.js @@ -40,7 +40,7 @@ function main() { // Instantiates a client const gatewayClient = new GatewayServiceClient(); - async function deleteResource() { + async function callDeleteResource() { // Construct request const request = {}; @@ -49,7 +49,7 @@ function main() { console.log(response); } - deleteResource(); + callDeleteResource(); // [END connectgateway_v1beta1_generated_GatewayService_DeleteResource_async] } diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.get_resource.js b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.get_resource.js index 19115308d05..dce42a3ba37 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.get_resource.js +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.get_resource.js @@ -40,7 +40,7 @@ function main() { // Instantiates a client const gatewayClient = new GatewayServiceClient(); - async function getResource() { + async function callGetResource() { // Construct request const request = {}; @@ -49,7 +49,7 @@ function main() { console.log(response); } - getResource(); + callGetResource(); // [END connectgateway_v1beta1_generated_GatewayService_GetResource_async] } diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.patch_resource.js b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.patch_resource.js index 98fd0db958c..5395ee9948f 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.patch_resource.js +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.patch_resource.js @@ -40,7 +40,7 @@ function main() { // Instantiates a client const gatewayClient = new GatewayServiceClient(); - async function patchResource() { + async function callPatchResource() { // Construct request const request = {}; @@ -49,7 +49,7 @@ function main() { console.log(response); } - patchResource(); + callPatchResource(); // [END connectgateway_v1beta1_generated_GatewayService_PatchResource_async] } diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.post_resource.js b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.post_resource.js index ad581725015..89cc3b23f72 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.post_resource.js +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.post_resource.js @@ -40,7 +40,7 @@ function main() { // Instantiates a client const gatewayClient = new GatewayServiceClient(); - async function postResource() { + async function callPostResource() { // Construct request const request = {}; @@ -49,7 +49,7 @@ function main() { console.log(response); } - postResource(); + callPostResource(); // [END connectgateway_v1beta1_generated_GatewayService_PostResource_async] } diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.put_resource.js b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.put_resource.js index 5e367a75c16..ab4f0a8b6ad 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.put_resource.js +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.put_resource.js @@ -40,7 +40,7 @@ function main() { // Instantiates a client const gatewayClient = new GatewayServiceClient(); - async function putResource() { + async function callPutResource() { // Construct request const request = {}; @@ -49,7 +49,7 @@ function main() { console.log(response); } - putResource(); + callPutResource(); // [END connectgateway_v1beta1_generated_GatewayService_PutResource_async] } diff --git a/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts b/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts index e51f7ac5274..8f3d8ee102d 100644 --- a/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts +++ b/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts @@ -292,6 +292,28 @@ export class GatewayServiceClient { // ------------------- // -- Service calls -- // ------------------- + /** + * GetResource performs an HTTP GET request on the Kubernetes API Server. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.contentType + * The HTTP Content-Type header value specifying the content type of the body. + * @param {Buffer} request.data + * The HTTP request/response body as raw binary. + * @param {number[]} request.extensions + * Application specific response metadata. Must be set in the first response + * for streaming APIs. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [HttpBody]{@link google.api.HttpBody}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/gateway_service.get_resource.js + * region_tag:connectgateway_v1beta1_generated_GatewayService_GetResource_async + */ getResource( request?: protos.google.api.IHttpBody, options?: CallOptions @@ -319,28 +341,6 @@ export class GatewayServiceClient { {} | null | undefined > ): void; - /** - * GetResource performs an HTTP GET request on the Kubernetes API Server. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.contentType - * The HTTP Content-Type header value specifying the content type of the body. - * @param {Buffer} request.data - * The HTTP request/response body as raw binary. - * @param {number[]} request.extensions - * Application specific response metadata. Must be set in the first response - * for streaming APIs. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [HttpBody]{@link google.api.HttpBody}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getResource(request); - */ getResource( request?: protos.google.api.IHttpBody, optionsOrCallback?: @@ -371,9 +371,33 @@ export class GatewayServiceClient { options = optionsOrCallback as CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; this.initialize(); return this.innerApiCalls.getResource(request, options, callback); } + /** + * PostResource performs an HTTP POST on the Kubernetes API Server. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.contentType + * The HTTP Content-Type header value specifying the content type of the body. + * @param {Buffer} request.data + * The HTTP request/response body as raw binary. + * @param {number[]} request.extensions + * Application specific response metadata. Must be set in the first response + * for streaming APIs. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [HttpBody]{@link google.api.HttpBody}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/gateway_service.post_resource.js + * region_tag:connectgateway_v1beta1_generated_GatewayService_PostResource_async + */ postResource( request?: protos.google.api.IHttpBody, options?: CallOptions @@ -401,28 +425,6 @@ export class GatewayServiceClient { {} | null | undefined > ): void; - /** - * PostResource performs an HTTP POST on the Kubernetes API Server. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.contentType - * The HTTP Content-Type header value specifying the content type of the body. - * @param {Buffer} request.data - * The HTTP request/response body as raw binary. - * @param {number[]} request.extensions - * Application specific response metadata. Must be set in the first response - * for streaming APIs. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [HttpBody]{@link google.api.HttpBody}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.postResource(request); - */ postResource( request?: protos.google.api.IHttpBody, optionsOrCallback?: @@ -453,9 +455,33 @@ export class GatewayServiceClient { options = optionsOrCallback as CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; this.initialize(); return this.innerApiCalls.postResource(request, options, callback); } + /** + * DeleteResource performs an HTTP DELETE on the Kubernetes API Server. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.contentType + * The HTTP Content-Type header value specifying the content type of the body. + * @param {Buffer} request.data + * The HTTP request/response body as raw binary. + * @param {number[]} request.extensions + * Application specific response metadata. Must be set in the first response + * for streaming APIs. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [HttpBody]{@link google.api.HttpBody}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/gateway_service.delete_resource.js + * region_tag:connectgateway_v1beta1_generated_GatewayService_DeleteResource_async + */ deleteResource( request?: protos.google.api.IHttpBody, options?: CallOptions @@ -483,28 +509,6 @@ export class GatewayServiceClient { {} | null | undefined > ): void; - /** - * DeleteResource performs an HTTP DELETE on the Kubernetes API Server. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.contentType - * The HTTP Content-Type header value specifying the content type of the body. - * @param {Buffer} request.data - * The HTTP request/response body as raw binary. - * @param {number[]} request.extensions - * Application specific response metadata. Must be set in the first response - * for streaming APIs. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [HttpBody]{@link google.api.HttpBody}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.deleteResource(request); - */ deleteResource( request?: protos.google.api.IHttpBody, optionsOrCallback?: @@ -535,9 +539,33 @@ export class GatewayServiceClient { options = optionsOrCallback as CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; this.initialize(); return this.innerApiCalls.deleteResource(request, options, callback); } + /** + * PutResource performs an HTTP PUT on the Kubernetes API Server. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.contentType + * The HTTP Content-Type header value specifying the content type of the body. + * @param {Buffer} request.data + * The HTTP request/response body as raw binary. + * @param {number[]} request.extensions + * Application specific response metadata. Must be set in the first response + * for streaming APIs. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [HttpBody]{@link google.api.HttpBody}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/gateway_service.put_resource.js + * region_tag:connectgateway_v1beta1_generated_GatewayService_PutResource_async + */ putResource( request?: protos.google.api.IHttpBody, options?: CallOptions @@ -565,28 +593,6 @@ export class GatewayServiceClient { {} | null | undefined > ): void; - /** - * PutResource performs an HTTP PUT on the Kubernetes API Server. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.contentType - * The HTTP Content-Type header value specifying the content type of the body. - * @param {Buffer} request.data - * The HTTP request/response body as raw binary. - * @param {number[]} request.extensions - * Application specific response metadata. Must be set in the first response - * for streaming APIs. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [HttpBody]{@link google.api.HttpBody}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.putResource(request); - */ putResource( request?: protos.google.api.IHttpBody, optionsOrCallback?: @@ -617,9 +623,33 @@ export class GatewayServiceClient { options = optionsOrCallback as CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; this.initialize(); return this.innerApiCalls.putResource(request, options, callback); } + /** + * PatchResource performs an HTTP PATCH on the Kubernetes API Server. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.contentType + * The HTTP Content-Type header value specifying the content type of the body. + * @param {Buffer} request.data + * The HTTP request/response body as raw binary. + * @param {number[]} request.extensions + * Application specific response metadata. Must be set in the first response + * for streaming APIs. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [HttpBody]{@link google.api.HttpBody}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/gateway_service.patch_resource.js + * region_tag:connectgateway_v1beta1_generated_GatewayService_PatchResource_async + */ patchResource( request?: protos.google.api.IHttpBody, options?: CallOptions @@ -647,28 +677,6 @@ export class GatewayServiceClient { {} | null | undefined > ): void; - /** - * PatchResource performs an HTTP PATCH on the Kubernetes API Server. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.contentType - * The HTTP Content-Type header value specifying the content type of the body. - * @param {Buffer} request.data - * The HTTP request/response body as raw binary. - * @param {number[]} request.extensions - * Application specific response metadata. Must be set in the first response - * for streaming APIs. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [HttpBody]{@link google.api.HttpBody}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.patchResource(request); - */ patchResource( request?: protos.google.api.IHttpBody, optionsOrCallback?: @@ -699,6 +707,8 @@ export class GatewayServiceClient { options = optionsOrCallback as CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; this.initialize(); return this.innerApiCalls.patchResource(request, options, callback); } diff --git a/packages/google-cloud-gkeconnect-gateway/test/gapic_gateway_service_v1beta1.ts b/packages/google-cloud-gkeconnect-gateway/test/gapic_gateway_service_v1beta1.ts index 9bff4c07bfc..2d81713902f 100644 --- a/packages/google-cloud-gkeconnect-gateway/test/gapic_gateway_service_v1beta1.ts +++ b/packages/google-cloud-gkeconnect-gateway/test/gapic_gateway_service_v1beta1.ts @@ -140,7 +140,7 @@ describe('v1beta1.GatewayServiceClient', () => { }); client.initialize(); const request = generateSampleMessage(new protos.google.api.HttpBody()); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.api.HttpBody() ); @@ -161,7 +161,7 @@ describe('v1beta1.GatewayServiceClient', () => { }); client.initialize(); const request = generateSampleMessage(new protos.google.api.HttpBody()); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.api.HttpBody() ); @@ -195,7 +195,7 @@ describe('v1beta1.GatewayServiceClient', () => { }); client.initialize(); const request = generateSampleMessage(new protos.google.api.HttpBody()); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.getResource = stubSimpleCall( undefined, @@ -218,7 +218,7 @@ describe('v1beta1.GatewayServiceClient', () => { }); client.initialize(); const request = generateSampleMessage(new protos.google.api.HttpBody()); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.api.HttpBody() ); @@ -239,7 +239,7 @@ describe('v1beta1.GatewayServiceClient', () => { }); client.initialize(); const request = generateSampleMessage(new protos.google.api.HttpBody()); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.api.HttpBody() ); @@ -273,7 +273,7 @@ describe('v1beta1.GatewayServiceClient', () => { }); client.initialize(); const request = generateSampleMessage(new protos.google.api.HttpBody()); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.postResource = stubSimpleCall( undefined, @@ -296,7 +296,7 @@ describe('v1beta1.GatewayServiceClient', () => { }); client.initialize(); const request = generateSampleMessage(new protos.google.api.HttpBody()); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.api.HttpBody() ); @@ -317,7 +317,7 @@ describe('v1beta1.GatewayServiceClient', () => { }); client.initialize(); const request = generateSampleMessage(new protos.google.api.HttpBody()); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.api.HttpBody() ); @@ -351,7 +351,7 @@ describe('v1beta1.GatewayServiceClient', () => { }); client.initialize(); const request = generateSampleMessage(new protos.google.api.HttpBody()); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.deleteResource = stubSimpleCall( undefined, @@ -374,7 +374,7 @@ describe('v1beta1.GatewayServiceClient', () => { }); client.initialize(); const request = generateSampleMessage(new protos.google.api.HttpBody()); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.api.HttpBody() ); @@ -395,7 +395,7 @@ describe('v1beta1.GatewayServiceClient', () => { }); client.initialize(); const request = generateSampleMessage(new protos.google.api.HttpBody()); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.api.HttpBody() ); @@ -429,7 +429,7 @@ describe('v1beta1.GatewayServiceClient', () => { }); client.initialize(); const request = generateSampleMessage(new protos.google.api.HttpBody()); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.putResource = stubSimpleCall( undefined, @@ -452,7 +452,7 @@ describe('v1beta1.GatewayServiceClient', () => { }); client.initialize(); const request = generateSampleMessage(new protos.google.api.HttpBody()); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.api.HttpBody() ); @@ -473,7 +473,7 @@ describe('v1beta1.GatewayServiceClient', () => { }); client.initialize(); const request = generateSampleMessage(new protos.google.api.HttpBody()); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.api.HttpBody() ); @@ -507,7 +507,7 @@ describe('v1beta1.GatewayServiceClient', () => { }); client.initialize(); const request = generateSampleMessage(new protos.google.api.HttpBody()); - const expectedOptions = {}; + const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.patchResource = stubSimpleCall( undefined, From fe5be639b367e38d83fee68c90b48f97b0a31077 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 11 Nov 2021 16:12:32 -0800 Subject: [PATCH 104/254] docs(samples): add example tags to generated samples (#13) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs(samples): add example tags to generated samples PiperOrigin-RevId: 408439482 Source-Link: https://github.com/googleapis/googleapis/commit/b9f61843dc80c7c285fc34fd3a40aae55082c2b9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/eb888bc214efc7bf43bf4634b470254565a659a5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWI4ODhiYzIxNGVmYzdiZjQzYmY0NjM0YjQ3MDI1NDU2NWE2NTlhNSJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../linkinator.config.json | 2 +- .../v1/cloud_deploy.approve_rollout.js | 4 +- .../cloud_deploy.create_delivery_pipeline.js | 6 +- .../v1/cloud_deploy.create_release.js | 6 +- .../v1/cloud_deploy.create_rollout.js | 6 +- .../v1/cloud_deploy.create_target.js | 6 +- .../cloud_deploy.delete_delivery_pipeline.js | 4 +- .../v1/cloud_deploy.delete_target.js | 4 +- .../generated/v1/cloud_deploy.get_config.js | 4 +- .../v1/cloud_deploy.get_delivery_pipeline.js | 4 +- .../generated/v1/cloud_deploy.get_release.js | 4 +- .../generated/v1/cloud_deploy.get_rollout.js | 4 +- .../generated/v1/cloud_deploy.get_target.js | 4 +- .../cloud_deploy.list_delivery_pipelines.js | 4 +- .../v1/cloud_deploy.list_releases.js | 4 +- .../v1/cloud_deploy.list_rollouts.js | 4 +- .../generated/v1/cloud_deploy.list_targets.js | 4 +- .../cloud_deploy.update_delivery_pipeline.js | 8 +- .../v1/cloud_deploy.update_target.js | 8 +- .../src/v1/cloud_deploy_client.ts | 1256 ++++++++--------- 20 files changed, 649 insertions(+), 697 deletions(-) diff --git a/packages/google-cloud-deploy/linkinator.config.json b/packages/google-cloud-deploy/linkinator.config.json index 29a223b6db6..0121dfa684f 100644 --- a/packages/google-cloud-deploy/linkinator.config.json +++ b/packages/google-cloud-deploy/linkinator.config.json @@ -6,5 +6,5 @@ "img.shields.io" ], "silent": true, - "concurrency": 10 + "concurrency": 5 } diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.approve_rollout.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.approve_rollout.js index 26681f90bdd..e6c5de051fd 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.approve_rollout.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.approve_rollout.js @@ -36,7 +36,7 @@ function main(name, approved) { // Instantiates a client const deployClient = new CloudDeployClient(); - async function approveRollout() { + async function callApproveRollout() { // Construct request const request = { name, @@ -48,7 +48,7 @@ function main(name, approved) { console.log(response); } - approveRollout(); + callApproveRollout(); // [END clouddeploy_v1_generated_CloudDeploy_ApproveRollout_async] } diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js index 33293df93ef..333ae0dc75a 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js @@ -31,7 +31,7 @@ function main(parent, deliveryPipelineId, deliveryPipeline) { /** * Required. The `DeliveryPipeline` to create. */ - // const deliveryPipeline = '' + // const deliveryPipeline = {} /** * Optional. A request ID to identify requests. Specify a unique request ID * so that if you must retry your request, the server will know to ignore @@ -58,7 +58,7 @@ function main(parent, deliveryPipelineId, deliveryPipeline) { // Instantiates a client const deployClient = new CloudDeployClient(); - async function createDeliveryPipeline() { + async function callCreateDeliveryPipeline() { // Construct request const request = { parent, @@ -72,7 +72,7 @@ function main(parent, deliveryPipelineId, deliveryPipeline) { console.log(response); } - createDeliveryPipeline(); + callCreateDeliveryPipeline(); // [END clouddeploy_v1_generated_CloudDeploy_CreateDeliveryPipeline_async] } diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_release.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_release.js index f531182151e..4c21caf99ee 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_release.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_release.js @@ -32,7 +32,7 @@ function main(parent, releaseId, release) { /** * Required. The `Release` to create. */ - // const release = '' + // const release = {} /** * Optional. A request ID to identify requests. Specify a unique request ID * so that if you must retry your request, the server will know to ignore @@ -59,7 +59,7 @@ function main(parent, releaseId, release) { // Instantiates a client const deployClient = new CloudDeployClient(); - async function createRelease() { + async function callCreateRelease() { // Construct request const request = { parent, @@ -73,7 +73,7 @@ function main(parent, releaseId, release) { console.log(response); } - createRelease(); + callCreateRelease(); // [END clouddeploy_v1_generated_CloudDeploy_CreateRelease_async] } diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_rollout.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_rollout.js index 77f8ebc7a94..33450507197 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_rollout.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_rollout.js @@ -32,7 +32,7 @@ function main(parent, rolloutId, rollout) { /** * Required. The `Rollout` to create. */ - // const rollout = '' + // const rollout = {} /** * Optional. A request ID to identify requests. Specify a unique request ID * so that if you must retry your request, the server will know to ignore @@ -59,7 +59,7 @@ function main(parent, rolloutId, rollout) { // Instantiates a client const deployClient = new CloudDeployClient(); - async function createRollout() { + async function callCreateRollout() { // Construct request const request = { parent, @@ -73,7 +73,7 @@ function main(parent, rolloutId, rollout) { console.log(response); } - createRollout(); + callCreateRollout(); // [END clouddeploy_v1_generated_CloudDeploy_CreateRollout_async] } diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_target.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_target.js index ffcdad0c210..6c3652b8767 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_target.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_target.js @@ -32,7 +32,7 @@ function main(parent, targetId, target) { /** * Required. The `Target` to create. */ - // const target = '' + // const target = {} /** * Optional. A request ID to identify requests. Specify a unique request ID * so that if you must retry your request, the server will know to ignore @@ -59,7 +59,7 @@ function main(parent, targetId, target) { // Instantiates a client const deployClient = new CloudDeployClient(); - async function createTarget() { + async function callCreateTarget() { // Construct request const request = { parent, @@ -73,7 +73,7 @@ function main(parent, targetId, target) { console.log(response); } - createTarget(); + callCreateTarget(); // [END clouddeploy_v1_generated_CloudDeploy_CreateTarget_async] } diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js index 3e8e363ac34..2e37e96b90a 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js @@ -67,7 +67,7 @@ function main(name) { // Instantiates a client const deployClient = new CloudDeployClient(); - async function deleteDeliveryPipeline() { + async function callDeleteDeliveryPipeline() { // Construct request const request = { name, @@ -79,7 +79,7 @@ function main(name) { console.log(response); } - deleteDeliveryPipeline(); + callDeleteDeliveryPipeline(); // [END clouddeploy_v1_generated_CloudDeploy_DeleteDeliveryPipeline_async] } diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_target.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_target.js index 06889ad3cea..5e3689bc455 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_target.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_target.js @@ -61,7 +61,7 @@ function main(name) { // Instantiates a client const deployClient = new CloudDeployClient(); - async function deleteTarget() { + async function callDeleteTarget() { // Construct request const request = { name, @@ -73,7 +73,7 @@ function main(name) { console.log(response); } - deleteTarget(); + callDeleteTarget(); // [END clouddeploy_v1_generated_CloudDeploy_DeleteTarget_async] } diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_config.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_config.js index d9609cddc07..570c9293612 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_config.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_config.js @@ -30,7 +30,7 @@ function main(name) { // Instantiates a client const deployClient = new CloudDeployClient(); - async function getConfig() { + async function callGetConfig() { // Construct request const request = { name, @@ -41,7 +41,7 @@ function main(name) { console.log(response); } - getConfig(); + callGetConfig(); // [END clouddeploy_v1_generated_CloudDeploy_GetConfig_async] } diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_delivery_pipeline.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_delivery_pipeline.js index 8c1299e9ad7..a0040ef301e 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_delivery_pipeline.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_delivery_pipeline.js @@ -31,7 +31,7 @@ function main(name) { // Instantiates a client const deployClient = new CloudDeployClient(); - async function getDeliveryPipeline() { + async function callGetDeliveryPipeline() { // Construct request const request = { name, @@ -42,7 +42,7 @@ function main(name) { console.log(response); } - getDeliveryPipeline(); + callGetDeliveryPipeline(); // [END clouddeploy_v1_generated_CloudDeploy_GetDeliveryPipeline_async] } diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_release.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_release.js index c44910227a3..2b3fa963c9e 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_release.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_release.js @@ -31,7 +31,7 @@ function main(name) { // Instantiates a client const deployClient = new CloudDeployClient(); - async function getRelease() { + async function callGetRelease() { // Construct request const request = { name, @@ -42,7 +42,7 @@ function main(name) { console.log(response); } - getRelease(); + callGetRelease(); // [END clouddeploy_v1_generated_CloudDeploy_GetRelease_async] } diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_rollout.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_rollout.js index d22c3ed4975..d4c2bcfbc1f 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_rollout.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_rollout.js @@ -31,7 +31,7 @@ function main(name) { // Instantiates a client const deployClient = new CloudDeployClient(); - async function getRollout() { + async function callGetRollout() { // Construct request const request = { name, @@ -42,7 +42,7 @@ function main(name) { console.log(response); } - getRollout(); + callGetRollout(); // [END clouddeploy_v1_generated_CloudDeploy_GetRollout_async] } diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_target.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_target.js index ce605f3ba14..67278b9df80 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_target.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_target.js @@ -31,7 +31,7 @@ function main(name) { // Instantiates a client const deployClient = new CloudDeployClient(); - async function getTarget() { + async function callGetTarget() { // Construct request const request = { name, @@ -42,7 +42,7 @@ function main(name) { console.log(response); } - getTarget(); + callGetTarget(); // [END clouddeploy_v1_generated_CloudDeploy_GetTarget_async] } diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js index 1e4d974d064..40beed5b5b7 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js @@ -54,7 +54,7 @@ function main(parent) { // Instantiates a client const deployClient = new CloudDeployClient(); - async function listDeliveryPipelines() { + async function callListDeliveryPipelines() { // Construct request const request = { parent, @@ -67,7 +67,7 @@ function main(parent) { } } - listDeliveryPipelines(); + callListDeliveryPipelines(); // [END clouddeploy_v1_generated_CloudDeploy_ListDeliveryPipelines_async] } diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_releases.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_releases.js index ef0a21a0cc0..9b440eba11c 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_releases.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_releases.js @@ -52,7 +52,7 @@ function main(parent) { // Instantiates a client const deployClient = new CloudDeployClient(); - async function listReleases() { + async function callListReleases() { // Construct request const request = { parent, @@ -65,7 +65,7 @@ function main(parent) { } } - listReleases(); + callListReleases(); // [END clouddeploy_v1_generated_CloudDeploy_ListReleases_async] } diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_rollouts.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_rollouts.js index c1ad018e43d..caf07436d21 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_rollouts.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_rollouts.js @@ -52,7 +52,7 @@ function main(parent) { // Instantiates a client const deployClient = new CloudDeployClient(); - async function listRollouts() { + async function callListRollouts() { // Construct request const request = { parent, @@ -65,7 +65,7 @@ function main(parent) { } } - listRollouts(); + callListRollouts(); // [END clouddeploy_v1_generated_CloudDeploy_ListRollouts_async] } diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_targets.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_targets.js index 407789f3f13..31998a5873c 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_targets.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_targets.js @@ -53,7 +53,7 @@ function main(parent) { // Instantiates a client const deployClient = new CloudDeployClient(); - async function listTargets() { + async function callListTargets() { // Construct request const request = { parent, @@ -66,7 +66,7 @@ function main(parent) { } } - listTargets(); + callListTargets(); // [END clouddeploy_v1_generated_CloudDeploy_ListTargets_async] } diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js index a88782e76d9..e0a0c90f53a 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js @@ -26,11 +26,11 @@ function main(updateMask, deliveryPipeline) { * the full request. A field will be overwritten if it is in the mask. If the * user does not provide a mask then all fields will be overwritten. */ - // const updateMask = '' + // const updateMask = {} /** * Required. The `DeliveryPipeline` to update. */ - // const deliveryPipeline = '' + // const deliveryPipeline = {} /** * Optional. A request ID to identify requests. Specify a unique request ID * so that if you must retry your request, the server will know to ignore @@ -62,7 +62,7 @@ function main(updateMask, deliveryPipeline) { // Instantiates a client const deployClient = new CloudDeployClient(); - async function updateDeliveryPipeline() { + async function callUpdateDeliveryPipeline() { // Construct request const request = { updateMask, @@ -75,7 +75,7 @@ function main(updateMask, deliveryPipeline) { console.log(response); } - updateDeliveryPipeline(); + callUpdateDeliveryPipeline(); // [END clouddeploy_v1_generated_CloudDeploy_UpdateDeliveryPipeline_async] } diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_target.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_target.js index 9569dd1bfa6..bc865c546c3 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_target.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_target.js @@ -26,11 +26,11 @@ function main(updateMask, target) { * the full request. A field will be overwritten if it is in the mask. If the * user does not provide a mask then all fields will be overwritten. */ - // const updateMask = '' + // const updateMask = {} /** * Required. The `Target` to update. */ - // const target = '' + // const target = {} /** * Optional. A request ID to identify requests. Specify a unique request ID * so that if you must retry your request, the server will know to ignore @@ -62,7 +62,7 @@ function main(updateMask, target) { // Instantiates a client const deployClient = new CloudDeployClient(); - async function updateTarget() { + async function callUpdateTarget() { // Construct request const request = { updateMask, @@ -75,7 +75,7 @@ function main(updateMask, target) { console.log(response); } - updateTarget(); + callUpdateTarget(); // [END clouddeploy_v1_generated_CloudDeploy_UpdateTarget_async] } diff --git a/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts b/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts index 4fef6026581..e8634a652a9 100644 --- a/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts +++ b/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts @@ -494,6 +494,24 @@ export class CloudDeployClient { // ------------------- // -- Service calls -- // ------------------- + /** + * Gets details of a single DeliveryPipeline. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the `DeliveryPipeline`. Format must be + * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [DeliveryPipeline]{@link google.cloud.deploy.v1.DeliveryPipeline}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.get_delivery_pipeline.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_GetDeliveryPipeline_async + */ getDeliveryPipeline( request?: protos.google.cloud.deploy.v1.IGetDeliveryPipelineRequest, options?: CallOptions @@ -525,24 +543,6 @@ export class CloudDeployClient { {} | null | undefined > ): void; - /** - * Gets details of a single DeliveryPipeline. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the `DeliveryPipeline`. Format must be - * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [DeliveryPipeline]{@link google.cloud.deploy.v1.DeliveryPipeline}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getDeliveryPipeline(request); - */ getDeliveryPipeline( request?: protos.google.cloud.deploy.v1.IGetDeliveryPipelineRequest, optionsOrCallback?: @@ -586,6 +586,24 @@ export class CloudDeployClient { this.initialize(); return this.innerApiCalls.getDeliveryPipeline(request, options, callback); } + /** + * Gets details of a single Target. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the `Target`. Format must be + * projects/{project_id}/locations/{location_name}/targets/{target_name}. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Target]{@link google.cloud.deploy.v1.Target}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.get_target.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_GetTarget_async + */ getTarget( request?: protos.google.cloud.deploy.v1.IGetTargetRequest, options?: CallOptions @@ -613,24 +631,6 @@ export class CloudDeployClient { {} | null | undefined > ): void; - /** - * Gets details of a single Target. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the `Target`. Format must be - * projects/{project_id}/locations/{location_name}/targets/{target_name}. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Target]{@link google.cloud.deploy.v1.Target}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getTarget(request); - */ getTarget( request?: protos.google.cloud.deploy.v1.IGetTargetRequest, optionsOrCallback?: @@ -670,6 +670,24 @@ export class CloudDeployClient { this.initialize(); return this.innerApiCalls.getTarget(request, options, callback); } + /** + * Gets details of a single Release. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the `Release`. Format must be + * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Release]{@link google.cloud.deploy.v1.Release}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.get_release.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_GetRelease_async + */ getRelease( request?: protos.google.cloud.deploy.v1.IGetReleaseRequest, options?: CallOptions @@ -697,24 +715,6 @@ export class CloudDeployClient { {} | null | undefined > ): void; - /** - * Gets details of a single Release. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the `Release`. Format must be - * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Release]{@link google.cloud.deploy.v1.Release}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getRelease(request); - */ getRelease( request?: protos.google.cloud.deploy.v1.IGetReleaseRequest, optionsOrCallback?: @@ -754,6 +754,27 @@ export class CloudDeployClient { this.initialize(); return this.innerApiCalls.getRelease(request, options, callback); } + /** + * Approves a Rollout. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the Rollout. Format is + * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ + * releases/{release}/rollouts/{rollout}. + * @param {boolean} request.approved + * Required. True = approve; false = reject + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [ApproveRolloutResponse]{@link google.cloud.deploy.v1.ApproveRolloutResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.approve_rollout.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_ApproveRollout_async + */ approveRollout( request?: protos.google.cloud.deploy.v1.IApproveRolloutRequest, options?: CallOptions @@ -781,27 +802,6 @@ export class CloudDeployClient { {} | null | undefined > ): void; - /** - * Approves a Rollout. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the Rollout. Format is - * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - * releases/{release}/rollouts/{rollout}. - * @param {boolean} request.approved - * Required. True = approve; false = reject - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [ApproveRolloutResponse]{@link google.cloud.deploy.v1.ApproveRolloutResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.approveRollout(request); - */ approveRollout( request?: protos.google.cloud.deploy.v1.IApproveRolloutRequest, optionsOrCallback?: @@ -843,6 +843,24 @@ export class CloudDeployClient { this.initialize(); return this.innerApiCalls.approveRollout(request, options, callback); } + /** + * Gets details of a single Rollout. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the `Rollout`. Format must be + * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Rollout]{@link google.cloud.deploy.v1.Rollout}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.get_rollout.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_GetRollout_async + */ getRollout( request?: protos.google.cloud.deploy.v1.IGetRolloutRequest, options?: CallOptions @@ -870,24 +888,6 @@ export class CloudDeployClient { {} | null | undefined > ): void; - /** - * Gets details of a single Rollout. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the `Rollout`. Format must be - * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Rollout]{@link google.cloud.deploy.v1.Rollout}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getRollout(request); - */ getRollout( request?: protos.google.cloud.deploy.v1.IGetRolloutRequest, optionsOrCallback?: @@ -927,6 +927,23 @@ export class CloudDeployClient { this.initialize(); return this.innerApiCalls.getRollout(request, options, callback); } + /** + * Gets the configuration for a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of requested configuration. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Config]{@link google.cloud.deploy.v1.Config}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.get_config.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_GetConfig_async + */ getConfig( request?: protos.google.cloud.deploy.v1.IGetConfigRequest, options?: CallOptions @@ -954,23 +971,6 @@ export class CloudDeployClient { {} | null | undefined > ): void; - /** - * Gets the configuration for a location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of requested configuration. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Config]{@link google.cloud.deploy.v1.Config}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getConfig(request); - */ getConfig( request?: protos.google.cloud.deploy.v1.IGetConfigRequest, optionsOrCallback?: @@ -1011,42 +1011,6 @@ export class CloudDeployClient { return this.innerApiCalls.getConfig(request, options, callback); } - createDeliveryPipeline( - request?: protos.google.cloud.deploy.v1.ICreateDeliveryPipelineRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.cloud.deploy.v1.IDeliveryPipeline, - protos.google.cloud.deploy.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - createDeliveryPipeline( - request: protos.google.cloud.deploy.v1.ICreateDeliveryPipelineRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.cloud.deploy.v1.IDeliveryPipeline, - protos.google.cloud.deploy.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - createDeliveryPipeline( - request: protos.google.cloud.deploy.v1.ICreateDeliveryPipelineRequest, - callback: Callback< - LROperation< - protos.google.cloud.deploy.v1.IDeliveryPipeline, - protos.google.cloud.deploy.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; /** * Creates a new DeliveryPipeline in a given project and location. * @@ -1085,30 +1049,12 @@ export class CloudDeployClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const [operation] = await client.createDeliveryPipeline(request); - * const [response] = await operation.promise(); + * @example include:samples/generated/v1/cloud_deploy.create_delivery_pipeline.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateDeliveryPipeline_async */ createDeliveryPipeline( request?: protos.google.cloud.deploy.v1.ICreateDeliveryPipelineRequest, - optionsOrCallback?: - | CallOptions - | Callback< - LROperation< - protos.google.cloud.deploy.v1.IDeliveryPipeline, - protos.google.cloud.deploy.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - >, - callback?: Callback< - LROperation< - protos.google.cloud.deploy.v1.IDeliveryPipeline, - protos.google.cloud.deploy.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > + options?: CallOptions ): Promise< [ LROperation< @@ -1118,11 +1064,64 @@ export class CloudDeployClient { protos.google.longrunning.IOperation | undefined, {} | undefined ] - > | void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; + >; + createDeliveryPipeline( + request: protos.google.cloud.deploy.v1.ICreateDeliveryPipelineRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.deploy.v1.IDeliveryPipeline, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createDeliveryPipeline( + request: protos.google.cloud.deploy.v1.ICreateDeliveryPipelineRequest, + callback: Callback< + LROperation< + protos.google.cloud.deploy.v1.IDeliveryPipeline, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createDeliveryPipeline( + request?: protos.google.cloud.deploy.v1.ICreateDeliveryPipelineRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.deploy.v1.IDeliveryPipeline, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.deploy.v1.IDeliveryPipeline, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.deploy.v1.IDeliveryPipeline, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; options = {}; } else { options = optionsOrCallback as CallOptions; @@ -1150,11 +1149,8 @@ export class CloudDeployClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkCreateDeliveryPipelineProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/cloud_deploy.create_delivery_pipeline.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateDeliveryPipeline_async */ async checkCreateDeliveryPipelineProgress( name: string @@ -1178,42 +1174,6 @@ export class CloudDeployClient { protos.google.cloud.deploy.v1.OperationMetadata >; } - updateDeliveryPipeline( - request?: protos.google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.cloud.deploy.v1.IDeliveryPipeline, - protos.google.cloud.deploy.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - updateDeliveryPipeline( - request: protos.google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.cloud.deploy.v1.IDeliveryPipeline, - protos.google.cloud.deploy.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - updateDeliveryPipeline( - request: protos.google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest, - callback: Callback< - LROperation< - protos.google.cloud.deploy.v1.IDeliveryPipeline, - protos.google.cloud.deploy.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; /** * Updates the parameters of a single DeliveryPipeline. * @@ -1256,10 +1216,45 @@ export class CloudDeployClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const [operation] = await client.updateDeliveryPipeline(request); - * const [response] = await operation.promise(); + * @example include:samples/generated/v1/cloud_deploy.update_delivery_pipeline.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_UpdateDeliveryPipeline_async */ + updateDeliveryPipeline( + request?: protos.google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.deploy.v1.IDeliveryPipeline, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateDeliveryPipeline( + request: protos.google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.deploy.v1.IDeliveryPipeline, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateDeliveryPipeline( + request: protos.google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest, + callback: Callback< + LROperation< + protos.google.cloud.deploy.v1.IDeliveryPipeline, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; updateDeliveryPipeline( request?: protos.google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest, optionsOrCallback?: @@ -1321,11 +1316,8 @@ export class CloudDeployClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkUpdateDeliveryPipelineProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/cloud_deploy.update_delivery_pipeline.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_UpdateDeliveryPipeline_async */ async checkUpdateDeliveryPipelineProgress( name: string @@ -1349,42 +1341,6 @@ export class CloudDeployClient { protos.google.cloud.deploy.v1.OperationMetadata >; } - deleteDeliveryPipeline( - request?: protos.google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.deploy.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - deleteDeliveryPipeline( - request: protos.google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.deploy.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - deleteDeliveryPipeline( - request: protos.google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest, - callback: Callback< - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.deploy.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; /** * Deletes a single DeliveryPipeline. * @@ -1430,10 +1386,45 @@ export class CloudDeployClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const [operation] = await client.deleteDeliveryPipeline(request); - * const [response] = await operation.promise(); + * @example include:samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_DeleteDeliveryPipeline_async */ + deleteDeliveryPipeline( + request?: protos.google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteDeliveryPipeline( + request: protos.google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteDeliveryPipeline( + request: protos.google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; deleteDeliveryPipeline( request?: protos.google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest, optionsOrCallback?: @@ -1495,11 +1486,8 @@ export class CloudDeployClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkDeleteDeliveryPipelineProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_DeleteDeliveryPipeline_async */ async checkDeleteDeliveryPipelineProgress( name: string @@ -1523,42 +1511,6 @@ export class CloudDeployClient { protos.google.cloud.deploy.v1.OperationMetadata >; } - createTarget( - request?: protos.google.cloud.deploy.v1.ICreateTargetRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.cloud.deploy.v1.ITarget, - protos.google.cloud.deploy.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - createTarget( - request: protos.google.cloud.deploy.v1.ICreateTargetRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.cloud.deploy.v1.ITarget, - protos.google.cloud.deploy.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - createTarget( - request: protos.google.cloud.deploy.v1.ICreateTargetRequest, - callback: Callback< - LROperation< - protos.google.cloud.deploy.v1.ITarget, - protos.google.cloud.deploy.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; /** * Creates a new Target in a given project and location. * @@ -1598,10 +1550,45 @@ export class CloudDeployClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const [operation] = await client.createTarget(request); - * const [response] = await operation.promise(); + * @example include:samples/generated/v1/cloud_deploy.create_target.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateTarget_async */ + createTarget( + request?: protos.google.cloud.deploy.v1.ICreateTargetRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createTarget( + request: protos.google.cloud.deploy.v1.ICreateTargetRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createTarget( + request: protos.google.cloud.deploy.v1.ICreateTargetRequest, + callback: Callback< + LROperation< + protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; createTarget( request?: protos.google.cloud.deploy.v1.ICreateTargetRequest, optionsOrCallback?: @@ -1650,79 +1637,40 @@ export class CloudDeployClient { this.initialize(); return this.innerApiCalls.createTarget(request, options, callback); } - /** - * Check the status of the long running operation returned by `createTarget()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const decodedOperation = await checkCreateTargetProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); - */ - async checkCreateTargetProgress( - name: string - ): Promise< - LROperation< - protos.google.cloud.deploy.v1.Target, - protos.google.cloud.deploy.v1.OperationMetadata - > - > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( - operation, - this.descriptors.longrunning.createTarget, - gax.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.cloud.deploy.v1.Target, - protos.google.cloud.deploy.v1.OperationMetadata - >; - } - updateTarget( - request?: protos.google.cloud.deploy.v1.IUpdateTargetRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.cloud.deploy.v1.ITarget, - protos.google.cloud.deploy.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - updateTarget( - request: protos.google.cloud.deploy.v1.IUpdateTargetRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.cloud.deploy.v1.ITarget, - protos.google.cloud.deploy.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - updateTarget( - request: protos.google.cloud.deploy.v1.IUpdateTargetRequest, - callback: Callback< - LROperation< - protos.google.cloud.deploy.v1.ITarget, - protos.google.cloud.deploy.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined + /** + * Check the status of the long running operation returned by `createTarget()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.create_target.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateTarget_async + */ + async checkCreateTargetProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.deploy.v1.Target, + protos.google.cloud.deploy.v1.OperationMetadata > - ): void; + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.createTarget, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.deploy.v1.Target, + protos.google.cloud.deploy.v1.OperationMetadata + >; + } /** * Updates the parameters of a single Target. * @@ -1765,10 +1713,45 @@ export class CloudDeployClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const [operation] = await client.updateTarget(request); - * const [response] = await operation.promise(); + * @example include:samples/generated/v1/cloud_deploy.update_target.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_UpdateTarget_async */ + updateTarget( + request?: protos.google.cloud.deploy.v1.IUpdateTargetRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateTarget( + request: protos.google.cloud.deploy.v1.IUpdateTargetRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateTarget( + request: protos.google.cloud.deploy.v1.IUpdateTargetRequest, + callback: Callback< + LROperation< + protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; updateTarget( request?: protos.google.cloud.deploy.v1.IUpdateTargetRequest, optionsOrCallback?: @@ -1826,11 +1809,8 @@ export class CloudDeployClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkUpdateTargetProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/cloud_deploy.update_target.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_UpdateTarget_async */ async checkUpdateTargetProgress( name: string @@ -1854,42 +1834,6 @@ export class CloudDeployClient { protos.google.cloud.deploy.v1.OperationMetadata >; } - deleteTarget( - request?: protos.google.cloud.deploy.v1.IDeleteTargetRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.deploy.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - deleteTarget( - request: protos.google.cloud.deploy.v1.IDeleteTargetRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.deploy.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - deleteTarget( - request: protos.google.cloud.deploy.v1.IDeleteTargetRequest, - callback: Callback< - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.deploy.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; /** * Deletes a single Target. * @@ -1931,10 +1875,45 @@ export class CloudDeployClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const [operation] = await client.deleteTarget(request); - * const [response] = await operation.promise(); + * @example include:samples/generated/v1/cloud_deploy.delete_target.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_DeleteTarget_async */ + deleteTarget( + request?: protos.google.cloud.deploy.v1.IDeleteTargetRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteTarget( + request: protos.google.cloud.deploy.v1.IDeleteTargetRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteTarget( + request: protos.google.cloud.deploy.v1.IDeleteTargetRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; deleteTarget( request?: protos.google.cloud.deploy.v1.IDeleteTargetRequest, optionsOrCallback?: @@ -1992,11 +1971,8 @@ export class CloudDeployClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkDeleteTargetProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/cloud_deploy.delete_target.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_DeleteTarget_async */ async checkDeleteTargetProgress( name: string @@ -2020,42 +1996,6 @@ export class CloudDeployClient { protos.google.cloud.deploy.v1.OperationMetadata >; } - createRelease( - request?: protos.google.cloud.deploy.v1.ICreateReleaseRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.cloud.deploy.v1.IRelease, - protos.google.cloud.deploy.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - createRelease( - request: protos.google.cloud.deploy.v1.ICreateReleaseRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.cloud.deploy.v1.IRelease, - protos.google.cloud.deploy.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - createRelease( - request: protos.google.cloud.deploy.v1.ICreateReleaseRequest, - callback: Callback< - LROperation< - protos.google.cloud.deploy.v1.IRelease, - protos.google.cloud.deploy.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; /** * Creates a new Release in a given project and location. * @@ -2095,10 +2035,45 @@ export class CloudDeployClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const [operation] = await client.createRelease(request); - * const [response] = await operation.promise(); + * @example include:samples/generated/v1/cloud_deploy.create_release.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateRelease_async */ + createRelease( + request?: protos.google.cloud.deploy.v1.ICreateReleaseRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.deploy.v1.IRelease, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createRelease( + request: protos.google.cloud.deploy.v1.ICreateReleaseRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.deploy.v1.IRelease, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createRelease( + request: protos.google.cloud.deploy.v1.ICreateReleaseRequest, + callback: Callback< + LROperation< + protos.google.cloud.deploy.v1.IRelease, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; createRelease( request?: protos.google.cloud.deploy.v1.ICreateReleaseRequest, optionsOrCallback?: @@ -2156,11 +2131,8 @@ export class CloudDeployClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkCreateReleaseProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/cloud_deploy.create_release.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateRelease_async */ async checkCreateReleaseProgress( name: string @@ -2184,42 +2156,6 @@ export class CloudDeployClient { protos.google.cloud.deploy.v1.OperationMetadata >; } - createRollout( - request?: protos.google.cloud.deploy.v1.ICreateRolloutRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.cloud.deploy.v1.IRollout, - protos.google.cloud.deploy.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - createRollout( - request: protos.google.cloud.deploy.v1.ICreateRolloutRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.cloud.deploy.v1.IRollout, - protos.google.cloud.deploy.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - createRollout( - request: protos.google.cloud.deploy.v1.ICreateRolloutRequest, - callback: Callback< - LROperation< - protos.google.cloud.deploy.v1.IRollout, - protos.google.cloud.deploy.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; /** * Creates a new Rollout in a given project and location. * @@ -2259,10 +2195,45 @@ export class CloudDeployClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const [operation] = await client.createRollout(request); - * const [response] = await operation.promise(); + * @example include:samples/generated/v1/cloud_deploy.create_rollout.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateRollout_async */ + createRollout( + request?: protos.google.cloud.deploy.v1.ICreateRolloutRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.deploy.v1.IRollout, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createRollout( + request: protos.google.cloud.deploy.v1.ICreateRolloutRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.deploy.v1.IRollout, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createRollout( + request: protos.google.cloud.deploy.v1.ICreateRolloutRequest, + callback: Callback< + LROperation< + protos.google.cloud.deploy.v1.IRollout, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; createRollout( request?: protos.google.cloud.deploy.v1.ICreateRolloutRequest, optionsOrCallback?: @@ -2320,11 +2291,8 @@ export class CloudDeployClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkCreateRolloutProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/cloud_deploy.create_rollout.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateRollout_async */ async checkCreateRolloutProgress( name: string @@ -2348,37 +2316,6 @@ export class CloudDeployClient { protos.google.cloud.deploy.v1.OperationMetadata >; } - listDeliveryPipelines( - request?: protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.deploy.v1.IDeliveryPipeline[], - protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest | null, - protos.google.cloud.deploy.v1.IListDeliveryPipelinesResponse - ] - >; - listDeliveryPipelines( - request: protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, - | protos.google.cloud.deploy.v1.IListDeliveryPipelinesResponse - | null - | undefined, - protos.google.cloud.deploy.v1.IDeliveryPipeline - > - ): void; - listDeliveryPipelines( - request: protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, - callback: PaginationCallback< - protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, - | protos.google.cloud.deploy.v1.IListDeliveryPipelinesResponse - | null - | undefined, - protos.google.cloud.deploy.v1.IDeliveryPipeline - > - ): void; /** * Lists DeliveryPipelines in a given project and location. * @@ -2416,6 +2353,37 @@ export class CloudDeployClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listDeliveryPipelines( + request?: protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.deploy.v1.IDeliveryPipeline[], + protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest | null, + protos.google.cloud.deploy.v1.IListDeliveryPipelinesResponse + ] + >; + listDeliveryPipelines( + request: protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + | protos.google.cloud.deploy.v1.IListDeliveryPipelinesResponse + | null + | undefined, + protos.google.cloud.deploy.v1.IDeliveryPipeline + > + ): void; + listDeliveryPipelines( + request: protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + callback: PaginationCallback< + protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + | protos.google.cloud.deploy.v1.IListDeliveryPipelinesResponse + | null + | undefined, + protos.google.cloud.deploy.v1.IDeliveryPipeline + > + ): void; listDeliveryPipelines( request?: protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, optionsOrCallback?: @@ -2552,11 +2520,8 @@ export class CloudDeployClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.listDeliveryPipelinesAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1/cloud_deploy.list_delivery_pipelines.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_ListDeliveryPipelines_async */ listDeliveryPipelinesAsync( request?: protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, @@ -2570,7 +2535,6 @@ export class CloudDeployClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listDeliveryPipelines']; const callSettings = defaultCallSettings.merge(options); this.initialize(); @@ -2580,33 +2544,6 @@ export class CloudDeployClient { callSettings ) as AsyncIterable; } - listTargets( - request?: protos.google.cloud.deploy.v1.IListTargetsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.deploy.v1.ITarget[], - protos.google.cloud.deploy.v1.IListTargetsRequest | null, - protos.google.cloud.deploy.v1.IListTargetsResponse - ] - >; - listTargets( - request: protos.google.cloud.deploy.v1.IListTargetsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.deploy.v1.IListTargetsRequest, - protos.google.cloud.deploy.v1.IListTargetsResponse | null | undefined, - protos.google.cloud.deploy.v1.ITarget - > - ): void; - listTargets( - request: protos.google.cloud.deploy.v1.IListTargetsRequest, - callback: PaginationCallback< - protos.google.cloud.deploy.v1.IListTargetsRequest, - protos.google.cloud.deploy.v1.IListTargetsResponse | null | undefined, - protos.google.cloud.deploy.v1.ITarget - > - ): void; /** * Lists Targets in a given project and location. * @@ -2643,6 +2580,33 @@ export class CloudDeployClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listTargets( + request?: protos.google.cloud.deploy.v1.IListTargetsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.deploy.v1.ITarget[], + protos.google.cloud.deploy.v1.IListTargetsRequest | null, + protos.google.cloud.deploy.v1.IListTargetsResponse + ] + >; + listTargets( + request: protos.google.cloud.deploy.v1.IListTargetsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.deploy.v1.IListTargetsRequest, + protos.google.cloud.deploy.v1.IListTargetsResponse | null | undefined, + protos.google.cloud.deploy.v1.ITarget + > + ): void; + listTargets( + request: protos.google.cloud.deploy.v1.IListTargetsRequest, + callback: PaginationCallback< + protos.google.cloud.deploy.v1.IListTargetsRequest, + protos.google.cloud.deploy.v1.IListTargetsResponse | null | undefined, + protos.google.cloud.deploy.v1.ITarget + > + ): void; listTargets( request?: protos.google.cloud.deploy.v1.IListTargetsRequest, optionsOrCallback?: @@ -2773,11 +2737,8 @@ export class CloudDeployClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.listTargetsAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1/cloud_deploy.list_targets.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_ListTargets_async */ listTargetsAsync( request?: protos.google.cloud.deploy.v1.IListTargetsRequest, @@ -2791,7 +2752,6 @@ export class CloudDeployClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listTargets']; const callSettings = defaultCallSettings.merge(options); this.initialize(); @@ -2801,33 +2761,6 @@ export class CloudDeployClient { callSettings ) as AsyncIterable; } - listReleases( - request?: protos.google.cloud.deploy.v1.IListReleasesRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.deploy.v1.IRelease[], - protos.google.cloud.deploy.v1.IListReleasesRequest | null, - protos.google.cloud.deploy.v1.IListReleasesResponse - ] - >; - listReleases( - request: protos.google.cloud.deploy.v1.IListReleasesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.deploy.v1.IListReleasesRequest, - protos.google.cloud.deploy.v1.IListReleasesResponse | null | undefined, - protos.google.cloud.deploy.v1.IRelease - > - ): void; - listReleases( - request: protos.google.cloud.deploy.v1.IListReleasesRequest, - callback: PaginationCallback< - protos.google.cloud.deploy.v1.IListReleasesRequest, - protos.google.cloud.deploy.v1.IListReleasesResponse | null | undefined, - protos.google.cloud.deploy.v1.IRelease - > - ): void; /** * Lists Releases in a given project and location. * @@ -2863,6 +2796,33 @@ export class CloudDeployClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listReleases( + request?: protos.google.cloud.deploy.v1.IListReleasesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.deploy.v1.IRelease[], + protos.google.cloud.deploy.v1.IListReleasesRequest | null, + protos.google.cloud.deploy.v1.IListReleasesResponse + ] + >; + listReleases( + request: protos.google.cloud.deploy.v1.IListReleasesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.deploy.v1.IListReleasesRequest, + protos.google.cloud.deploy.v1.IListReleasesResponse | null | undefined, + protos.google.cloud.deploy.v1.IRelease + > + ): void; + listReleases( + request: protos.google.cloud.deploy.v1.IListReleasesRequest, + callback: PaginationCallback< + protos.google.cloud.deploy.v1.IListReleasesRequest, + protos.google.cloud.deploy.v1.IListReleasesResponse | null | undefined, + protos.google.cloud.deploy.v1.IRelease + > + ): void; listReleases( request?: protos.google.cloud.deploy.v1.IListReleasesRequest, optionsOrCallback?: @@ -2993,11 +2953,8 @@ export class CloudDeployClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.listReleasesAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1/cloud_deploy.list_releases.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_ListReleases_async */ listReleasesAsync( request?: protos.google.cloud.deploy.v1.IListReleasesRequest, @@ -3011,7 +2968,6 @@ export class CloudDeployClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listReleases']; const callSettings = defaultCallSettings.merge(options); this.initialize(); @@ -3021,33 +2977,6 @@ export class CloudDeployClient { callSettings ) as AsyncIterable; } - listRollouts( - request?: protos.google.cloud.deploy.v1.IListRolloutsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.deploy.v1.IRollout[], - protos.google.cloud.deploy.v1.IListRolloutsRequest | null, - protos.google.cloud.deploy.v1.IListRolloutsResponse - ] - >; - listRollouts( - request: protos.google.cloud.deploy.v1.IListRolloutsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.deploy.v1.IListRolloutsRequest, - protos.google.cloud.deploy.v1.IListRolloutsResponse | null | undefined, - protos.google.cloud.deploy.v1.IRollout - > - ): void; - listRollouts( - request: protos.google.cloud.deploy.v1.IListRolloutsRequest, - callback: PaginationCallback< - protos.google.cloud.deploy.v1.IListRolloutsRequest, - protos.google.cloud.deploy.v1.IListRolloutsResponse | null | undefined, - protos.google.cloud.deploy.v1.IRollout - > - ): void; /** * Lists Rollouts in a given project and location. * @@ -3083,6 +3012,33 @@ export class CloudDeployClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listRollouts( + request?: protos.google.cloud.deploy.v1.IListRolloutsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.deploy.v1.IRollout[], + protos.google.cloud.deploy.v1.IListRolloutsRequest | null, + protos.google.cloud.deploy.v1.IListRolloutsResponse + ] + >; + listRollouts( + request: protos.google.cloud.deploy.v1.IListRolloutsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.deploy.v1.IListRolloutsRequest, + protos.google.cloud.deploy.v1.IListRolloutsResponse | null | undefined, + protos.google.cloud.deploy.v1.IRollout + > + ): void; + listRollouts( + request: protos.google.cloud.deploy.v1.IListRolloutsRequest, + callback: PaginationCallback< + protos.google.cloud.deploy.v1.IListRolloutsRequest, + protos.google.cloud.deploy.v1.IListRolloutsResponse | null | undefined, + protos.google.cloud.deploy.v1.IRollout + > + ): void; listRollouts( request?: protos.google.cloud.deploy.v1.IListRolloutsRequest, optionsOrCallback?: @@ -3213,11 +3169,8 @@ export class CloudDeployClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.listRolloutsAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1/cloud_deploy.list_rollouts.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_ListRollouts_async */ listRolloutsAsync( request?: protos.google.cloud.deploy.v1.IListRolloutsRequest, @@ -3231,7 +3184,6 @@ export class CloudDeployClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listRollouts']; const callSettings = defaultCallSettings.merge(options); this.initialize(); From 5e855ccffb7954f9362860396d26a346621f1ef1 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 10 Dec 2021 21:14:18 +0000 Subject: [PATCH 105/254] build: add generated samples to .eslintignore (#14) --- packages/google-cloud-deploy/.eslintignore | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/google-cloud-deploy/.eslintignore b/packages/google-cloud-deploy/.eslintignore index 9340ad9b86d..ea5b04aebe6 100644 --- a/packages/google-cloud-deploy/.eslintignore +++ b/packages/google-cloud-deploy/.eslintignore @@ -4,3 +4,4 @@ test/fixtures build/ docs/ protos/ +samples/generated/ From 624ecd98ebe89612d68ff73afb907731588d3dc8 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 10 Dec 2021 21:14:29 +0000 Subject: [PATCH 106/254] build: add generated samples to .eslintignore (#90) --- packages/google-cloud-policytroubleshooter/.eslintignore | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/google-cloud-policytroubleshooter/.eslintignore b/packages/google-cloud-policytroubleshooter/.eslintignore index 9340ad9b86d..ea5b04aebe6 100644 --- a/packages/google-cloud-policytroubleshooter/.eslintignore +++ b/packages/google-cloud-policytroubleshooter/.eslintignore @@ -4,3 +4,4 @@ test/fixtures build/ docs/ protos/ +samples/generated/ From 1e5847770f1629951080c0ed2021ff3a56d11e74 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 10 Dec 2021 21:16:24 +0000 Subject: [PATCH 107/254] build: add generated samples to .eslintignore (#38) --- packages/google-cloud-gkeconnect-gateway/.eslintignore | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/google-cloud-gkeconnect-gateway/.eslintignore b/packages/google-cloud-gkeconnect-gateway/.eslintignore index 9340ad9b86d..ea5b04aebe6 100644 --- a/packages/google-cloud-gkeconnect-gateway/.eslintignore +++ b/packages/google-cloud-gkeconnect-gateway/.eslintignore @@ -4,3 +4,4 @@ test/fixtures build/ docs/ protos/ +samples/generated/ From 96d5b427ce17b921c7d1b2150279087fdca29de6 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 10 Dec 2021 21:18:33 +0000 Subject: [PATCH 108/254] build: add generated samples to .eslintignore (#51) --- packages/google-cloud-shell/.eslintignore | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/google-cloud-shell/.eslintignore b/packages/google-cloud-shell/.eslintignore index 9340ad9b86d..ea5b04aebe6 100644 --- a/packages/google-cloud-shell/.eslintignore +++ b/packages/google-cloud-shell/.eslintignore @@ -4,3 +4,4 @@ test/fixtures build/ docs/ protos/ +samples/generated/ From 2bd3b0b565b9f0f6586a0b398a9f005ada5cd3bc Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 29 Dec 2021 21:36:14 +0000 Subject: [PATCH 109/254] docs(node): support "stable"/"preview" release level (#1312) (#54) --- packages/google-cloud-shell/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/google-cloud-shell/README.md b/packages/google-cloud-shell/README.md index a3885d83a7b..27c4fa53067 100644 --- a/packages/google-cloud-shell/README.md +++ b/packages/google-cloud-shell/README.md @@ -131,6 +131,8 @@ are addressed with the highest priority. + + More Information: [Google Cloud Platform Launch Stages][launch_stages] [launch_stages]: https://cloud.google.com/terms/launch-stages From 9a5bdbe5c97c1c1cc65394e44ad0b8f5ae38cff5 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 29 Dec 2021 21:36:34 +0000 Subject: [PATCH 110/254] docs(node): support "stable"/"preview" release level (#1312) (#93) --- packages/google-cloud-policytroubleshooter/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/google-cloud-policytroubleshooter/README.md b/packages/google-cloud-policytroubleshooter/README.md index 591e1ae6b4a..7b0f79660a5 100644 --- a/packages/google-cloud-policytroubleshooter/README.md +++ b/packages/google-cloud-policytroubleshooter/README.md @@ -134,6 +134,8 @@ are addressed with the highest priority. + + More Information: [Google Cloud Platform Launch Stages][launch_stages] [launch_stages]: https://cloud.google.com/terms/launch-stages From 6b9c886aa13296225c2a7dd90d3c713c76065849 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 29 Dec 2021 21:38:13 +0000 Subject: [PATCH 111/254] docs(node): support "stable"/"preview" release level (#1312) (#41) --- packages/google-cloud-gkeconnect-gateway/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/google-cloud-gkeconnect-gateway/README.md b/packages/google-cloud-gkeconnect-gateway/README.md index 6b63535263e..eb5ecaaf0ac 100644 --- a/packages/google-cloud-gkeconnect-gateway/README.md +++ b/packages/google-cloud-gkeconnect-gateway/README.md @@ -112,6 +112,8 @@ This library follows [Semantic Versioning](http://semver.org/). + + More Information: [Google Cloud Platform Launch Stages][launch_stages] [launch_stages]: https://cloud.google.com/terms/launch-stages From 9be3e95daf0ddec6cece09588c4f7b1caff41c19 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 29 Dec 2021 21:40:17 +0000 Subject: [PATCH 112/254] docs(node): support "stable"/"preview" release level (#1312) (#17) --- packages/google-cloud-deploy/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/google-cloud-deploy/README.md b/packages/google-cloud-deploy/README.md index 62474336b43..f803d4a70b4 100644 --- a/packages/google-cloud-deploy/README.md +++ b/packages/google-cloud-deploy/README.md @@ -155,6 +155,7 @@ This library follows [Semantic Versioning](http://semver.org/). + This library is considered to be in **beta**. This means it is expected to be mostly stable while we work toward a general availability release; however, complete stability is not guaranteed. We will address issues and requests @@ -163,6 +164,7 @@ against beta libraries with a high priority. + More Information: [Google Cloud Platform Launch Stages][launch_stages] [launch_stages]: https://cloud.google.com/terms/launch-stages From e91cc63d2c332df73ba8a5a04111561558cf3d53 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 30 Dec 2021 11:30:52 -0500 Subject: [PATCH 113/254] chore: add api_shortname and library_type to repo metadata (#16) --- packages/google-cloud-deploy/.repo-metadata.json | 7 ++++--- packages/google-cloud-deploy/README.md | 9 ++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/google-cloud-deploy/.repo-metadata.json b/packages/google-cloud-deploy/.repo-metadata.json index fc8828662b6..19e55d738ca 100644 --- a/packages/google-cloud-deploy/.repo-metadata.json +++ b/packages/google-cloud-deploy/.repo-metadata.json @@ -4,12 +4,13 @@ "product_documentation": "https://cloud.google.com/deploy/", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/deploy/latest", "issue_tracker": "https://github.com/googleapis/nodejs-deploy/issues", - "release_level": "beta", + "release_level": "preview", "language": "nodejs", "repo": "googleapis/nodejs-deploy", "distribution_name": "@google-cloud/deploy", "api_id": "clouddeploy.googleapis.com", "default_version": "v1", - "requires_billing": true + "requires_billing": true, + "api_shortname": "clouddeploy", + "library_type": "GAPIC_AUTO" } - diff --git a/packages/google-cloud-deploy/README.md b/packages/google-cloud-deploy/README.md index f803d4a70b4..5b12e5c939b 100644 --- a/packages/google-cloud-deploy/README.md +++ b/packages/google-cloud-deploy/README.md @@ -4,7 +4,7 @@ # [Google Cloud Deploy: Node.js Client](https://github.com/googleapis/nodejs-deploy) -[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) + [![npm version](https://img.shields.io/npm/v/@google-cloud/deploy.svg)](https://www.npmjs.org/package/@google-cloud/deploy) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-deploy/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-deploy) @@ -156,13 +156,12 @@ This library follows [Semantic Versioning](http://semver.org/). -This library is considered to be in **beta**. This means it is expected to be -mostly stable while we work toward a general availability release; however, -complete stability is not guaranteed. We will address issues and requests -against beta libraries with a high priority. +This library is considered to be in **preview**. This means it is still a +work-in-progress and under active development. Any release is subject to +backwards-incompatible changes at any time. More Information: [Google Cloud Platform Launch Stages][launch_stages] From 96e6a5fd0a41fbed048f6920cfddd232b40c9d5d Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 30 Dec 2021 11:40:44 -0500 Subject: [PATCH 114/254] chore: add api_shortname and library_type to repo metadata (#40) --- .../google-cloud-gkeconnect-gateway/.repo-metadata.json | 6 ++++-- packages/google-cloud-gkeconnect-gateway/README.md | 6 +++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-gkeconnect-gateway/.repo-metadata.json b/packages/google-cloud-gkeconnect-gateway/.repo-metadata.json index 189ace012ac..3b0ad384525 100644 --- a/packages/google-cloud-gkeconnect-gateway/.repo-metadata.json +++ b/packages/google-cloud-gkeconnect-gateway/.repo-metadata.json @@ -4,11 +4,13 @@ "product_documentation": "https://cloud.google.com/api-gateway/", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/gke-connect-gateway/latest", "issue_tracker": "https://github.com/googleapis/nodejs-gke-connect-gateway/issues", - "release_level": "BETA", + "release_level": "preview", "language": "nodejs", "repo": "googleapis/nodejs-gke-connect-gateway", "distribution_name": "@google-cloud/gke-connect-gateway", "api_id": "gateway.googleapis.com", "default_version": "v1beta1", - "requires_billing": true + "requires_billing": true, + "api_shortname": "apigateway", + "library_type": "GAPIC_AUTO" } diff --git a/packages/google-cloud-gkeconnect-gateway/README.md b/packages/google-cloud-gkeconnect-gateway/README.md index eb5ecaaf0ac..d4b5afa5609 100644 --- a/packages/google-cloud-gkeconnect-gateway/README.md +++ b/packages/google-cloud-gkeconnect-gateway/README.md @@ -4,7 +4,7 @@ # [API Gateway: Node.js Client](https://github.com/googleapis/nodejs-gke-connect-gateway) -[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) + [![npm version](https://img.shields.io/npm/v/@google-cloud/gke-connect-gateway.svg)](https://www.npmjs.org/package/@google-cloud/gke-connect-gateway) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-gke-connect-gateway/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-gke-connect-gateway) @@ -113,6 +113,10 @@ This library follows [Semantic Versioning](http://semver.org/). +This library is considered to be in **preview**. This means it is still a +work-in-progress and under active development. Any release is subject to +backwards-incompatible changes at any time. + More Information: [Google Cloud Platform Launch Stages][launch_stages] From 45e4a85d1432938784a7cabe6b57eaf4945ffa89 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 30 Dec 2021 11:43:48 -0500 Subject: [PATCH 115/254] chore: add api_shortname and library_type to repo metadata (#53) --- packages/google-cloud-shell/.repo-metadata.json | 6 ++++-- packages/google-cloud-shell/README.md | 9 ++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/google-cloud-shell/.repo-metadata.json b/packages/google-cloud-shell/.repo-metadata.json index e18da0656c6..e39f2aa27e7 100644 --- a/packages/google-cloud-shell/.repo-metadata.json +++ b/packages/google-cloud-shell/.repo-metadata.json @@ -4,11 +4,13 @@ "product_documentation": "https://cloud.google.com/shell/", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/shell/latest", "issue_tracker": "https://github.com/googleapis/nodejs-cloud-shell/issues", - "release_level": "ga", + "release_level": "stable", "language": "nodejs", "repo": "googleapis/nodejs-cloud-shell", "distribution_name": "@google-cloud/shell", "api_id": "shell.googleapis.com", "default_version": "v1", - "requires_billing": true + "requires_billing": true, + "api_shortname": "cloudshell", + "library_type": "GAPIC_AUTO" } diff --git a/packages/google-cloud-shell/README.md b/packages/google-cloud-shell/README.md index 27c4fa53067..f7f6877bfa0 100644 --- a/packages/google-cloud-shell/README.md +++ b/packages/google-cloud-shell/README.md @@ -4,7 +4,7 @@ # [Cloud Shell: Node.js Client](https://github.com/googleapis/nodejs-cloud-shell) -[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) + [![npm version](https://img.shields.io/npm/v/@google-cloud/shell.svg)](https://www.npmjs.org/package/@google-cloud/shell) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-cloud-shell/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-cloud-shell) @@ -121,10 +121,10 @@ _Legacy Node.js versions are supported as a best effort:_ This library follows [Semantic Versioning](http://semver.org/). -This library is considered to be **General Availability (GA)**. This means it -is stable; the code surface will not change in backwards-incompatible ways + +This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways unless absolutely necessary (e.g. because of critical security issues) or with -an extensive deprecation period. Issues and requests against **GA** libraries +an extensive deprecation period. Issues and requests against **stable** libraries are addressed with the highest priority. @@ -132,7 +132,6 @@ are addressed with the highest priority. - More Information: [Google Cloud Platform Launch Stages][launch_stages] [launch_stages]: https://cloud.google.com/terms/launch-stages From b2169fe3d8bfdb64b25864ddefb0f0bef44f0092 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 30 Dec 2021 12:01:39 -0500 Subject: [PATCH 116/254] chore: add api_shortname and library_type to repo metadata (#92) --- .../.repo-metadata.json | 6 ++++-- packages/google-cloud-policytroubleshooter/README.md | 9 ++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/google-cloud-policytroubleshooter/.repo-metadata.json b/packages/google-cloud-policytroubleshooter/.repo-metadata.json index a9e3158ebb1..85b83be5a28 100644 --- a/packages/google-cloud-policytroubleshooter/.repo-metadata.json +++ b/packages/google-cloud-policytroubleshooter/.repo-metadata.json @@ -2,7 +2,7 @@ "client_documentation": "https://cloud.google.com/nodejs/docs/reference/policy-troubleshooter/latest", "api_id": "policytroubleshooter.googleapis.com", "distribution_name": "@google-cloud/policy-troubleshooter", - "release_level": "ga", + "release_level": "stable", "default_version": "v1", "language": "nodejs", "name_pretty": "IAM Policy Troubleshooter API", @@ -10,5 +10,7 @@ "product_documentation": "https://cloud.google.com/iam/docs/troubleshooting-access#rest-api/", "requires_billing": true, "name": "policytroubleshooter", - "issue_tracker": "https://github.com/googleapis/nodejs-policy-troubleshooter/issues" + "issue_tracker": "https://github.com/googleapis/nodejs-policy-troubleshooter/issues", + "api_shortname": "policytroubleshooter", + "library_type": "GAPIC_AUTO" } diff --git a/packages/google-cloud-policytroubleshooter/README.md b/packages/google-cloud-policytroubleshooter/README.md index 7b0f79660a5..dfd72c4bffe 100644 --- a/packages/google-cloud-policytroubleshooter/README.md +++ b/packages/google-cloud-policytroubleshooter/README.md @@ -4,7 +4,7 @@ # [IAM Policy Troubleshooter API: Node.js Client](https://github.com/googleapis/nodejs-policy-troubleshooter) -[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) + [![npm version](https://img.shields.io/npm/v/@google-cloud/policy-troubleshooter.svg)](https://www.npmjs.org/package/@google-cloud/policy-troubleshooter) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-policy-troubleshooter/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-policy-troubleshooter) @@ -124,10 +124,10 @@ _Legacy Node.js versions are supported as a best effort:_ This library follows [Semantic Versioning](http://semver.org/). -This library is considered to be **General Availability (GA)**. This means it -is stable; the code surface will not change in backwards-incompatible ways + +This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways unless absolutely necessary (e.g. because of critical security issues) or with -an extensive deprecation period. Issues and requests against **GA** libraries +an extensive deprecation period. Issues and requests against **stable** libraries are addressed with the highest priority. @@ -135,7 +135,6 @@ are addressed with the highest priority. - More Information: [Google Cloud Platform Launch Stages][launch_stages] [launch_stages]: https://cloud.google.com/terms/launch-stages From e1bb03899fa7ce62f6350fca1b32ea8b4f1d6dd9 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 30 Dec 2021 22:42:19 +0000 Subject: [PATCH 117/254] docs(badges): tweak badge to use new preview/stable language (#1314) (#43) --- packages/google-cloud-gkeconnect-gateway/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/google-cloud-gkeconnect-gateway/README.md b/packages/google-cloud-gkeconnect-gateway/README.md index d4b5afa5609..ba8715d3588 100644 --- a/packages/google-cloud-gkeconnect-gateway/README.md +++ b/packages/google-cloud-gkeconnect-gateway/README.md @@ -4,9 +4,8 @@ # [API Gateway: Node.js Client](https://github.com/googleapis/nodejs-gke-connect-gateway) - +[![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/gke-connect-gateway.svg)](https://www.npmjs.org/package/@google-cloud/gke-connect-gateway) -[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-gke-connect-gateway/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-gke-connect-gateway) From b3c6ea5af8e9b02fff2d92f7176ab5db412f6587 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 30 Dec 2021 22:42:23 +0000 Subject: [PATCH 118/254] docs(badges): tweak badge to use new preview/stable language (#1314) (#56) --- packages/google-cloud-shell/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/google-cloud-shell/README.md b/packages/google-cloud-shell/README.md index f7f6877bfa0..73087ec9bfe 100644 --- a/packages/google-cloud-shell/README.md +++ b/packages/google-cloud-shell/README.md @@ -4,9 +4,8 @@ # [Cloud Shell: Node.js Client](https://github.com/googleapis/nodejs-cloud-shell) - +[![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/shell.svg)](https://www.npmjs.org/package/@google-cloud/shell) -[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-cloud-shell/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-cloud-shell) From 1c7777233614234f7721061001f55ef6ee8a7245 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 30 Dec 2021 22:44:11 +0000 Subject: [PATCH 119/254] docs(badges): tweak badge to use new preview/stable language (#1314) (#95) --- packages/google-cloud-policytroubleshooter/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/google-cloud-policytroubleshooter/README.md b/packages/google-cloud-policytroubleshooter/README.md index dfd72c4bffe..f2426dbbb70 100644 --- a/packages/google-cloud-policytroubleshooter/README.md +++ b/packages/google-cloud-policytroubleshooter/README.md @@ -4,9 +4,8 @@ # [IAM Policy Troubleshooter API: Node.js Client](https://github.com/googleapis/nodejs-policy-troubleshooter) - +[![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/policy-troubleshooter.svg)](https://www.npmjs.org/package/@google-cloud/policy-troubleshooter) -[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-policy-troubleshooter/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-policy-troubleshooter) From 6689799efc7a11472cc1832ebf78505f0efea8c7 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 30 Dec 2021 22:48:11 +0000 Subject: [PATCH 120/254] docs(badges): tweak badge to use new preview/stable language (#1314) (#19) --- packages/google-cloud-deploy/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/google-cloud-deploy/README.md b/packages/google-cloud-deploy/README.md index 5b12e5c939b..5602363a48d 100644 --- a/packages/google-cloud-deploy/README.md +++ b/packages/google-cloud-deploy/README.md @@ -4,9 +4,8 @@ # [Google Cloud Deploy: Node.js Client](https://github.com/googleapis/nodejs-deploy) - +[![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/deploy.svg)](https://www.npmjs.org/package/@google-cloud/deploy) -[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-deploy/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-deploy) From 3b9bfe66d527b981a82e39855c1d09e49a3fd165 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 6 Jan 2022 18:46:15 -0500 Subject: [PATCH 121/254] chore: fix name and api_shortname in repo metadata (#45) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: fix name and api_shortname in repo metadata * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix name_pretty * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../.repo-metadata.json | 10 +++++----- .../CONTRIBUTING.md | 4 ++-- packages/google-cloud-gkeconnect-gateway/README.md | 14 +++++++------- .../protos/protos.d.ts | 2 +- .../protos/protos.js | 2 +- .../samples/README.md | 4 ++-- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/google-cloud-gkeconnect-gateway/.repo-metadata.json b/packages/google-cloud-gkeconnect-gateway/.repo-metadata.json index 3b0ad384525..29ba65ba5a5 100644 --- a/packages/google-cloud-gkeconnect-gateway/.repo-metadata.json +++ b/packages/google-cloud-gkeconnect-gateway/.repo-metadata.json @@ -1,16 +1,16 @@ { - "name": "apigateway", - "name_pretty": "API Gateway", - "product_documentation": "https://cloud.google.com/api-gateway/", + "name": "connectgateway", + "name_pretty": "GKE Connect Gateway", + "product_documentation": "https://cloud.google.com/anthos/multicluster-management/gateway", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/gke-connect-gateway/latest", "issue_tracker": "https://github.com/googleapis/nodejs-gke-connect-gateway/issues", "release_level": "preview", "language": "nodejs", "repo": "googleapis/nodejs-gke-connect-gateway", "distribution_name": "@google-cloud/gke-connect-gateway", - "api_id": "gateway.googleapis.com", + "api_id": "connectgateway.googleapis.com", "default_version": "v1beta1", "requires_billing": true, - "api_shortname": "apigateway", + "api_shortname": "connectgateway", "library_type": "GAPIC_AUTO" } diff --git a/packages/google-cloud-gkeconnect-gateway/CONTRIBUTING.md b/packages/google-cloud-gkeconnect-gateway/CONTRIBUTING.md index 9f4a30623c3..1489648d4cc 100644 --- a/packages/google-cloud-gkeconnect-gateway/CONTRIBUTING.md +++ b/packages/google-cloud-gkeconnect-gateway/CONTRIBUTING.md @@ -41,7 +41,7 @@ accept your pull requests. 1. [Select or create a Cloud Platform project][projects]. 1. [Enable billing for your project][billing]. -1. [Enable the API Gateway API][enable_api]. +1. [Enable the GKE Connect Gateway API][enable_api]. 1. [Set up authentication with a service account][auth] so you can access the API from your local workstation. @@ -72,5 +72,5 @@ accept your pull requests. [setup]: https://cloud.google.com/nodejs/docs/setup [projects]: https://console.cloud.google.com/project [billing]: https://support.google.com/cloud/answer/6293499#enable-billing -[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=gateway.googleapis.com +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=connectgateway.googleapis.com [auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-cloud-gkeconnect-gateway/README.md b/packages/google-cloud-gkeconnect-gateway/README.md index ba8715d3588..50e1c00f85a 100644 --- a/packages/google-cloud-gkeconnect-gateway/README.md +++ b/packages/google-cloud-gkeconnect-gateway/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [API Gateway: Node.js Client](https://github.com/googleapis/nodejs-gke-connect-gateway) +# [GKE Connect Gateway: Node.js Client](https://github.com/googleapis/nodejs-gke-connect-gateway) [![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/gke-connect-gateway.svg)](https://www.npmjs.org/package/@google-cloud/gke-connect-gateway) @@ -16,8 +16,8 @@ apigateway client for Node.js A comprehensive list of changes in each version may be found in [the CHANGELOG](https://github.com/googleapis/nodejs-gke-connect-gateway/blob/main/CHANGELOG.md). -* [API Gateway Node.js Client API Reference][client-docs] -* [API Gateway Documentation][product-docs] +* [GKE Connect Gateway Node.js Client API Reference][client-docs] +* [GKE Connect Gateway Documentation][product-docs] * [github.com/googleapis/nodejs-gke-connect-gateway](https://github.com/googleapis/nodejs-gke-connect-gateway) Read more about the client libraries for Cloud APIs, including the older @@ -43,7 +43,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. 1. [Select or create a Cloud Platform project][projects]. 1. [Enable billing for your project][billing]. -1. [Enable the API Gateway API][enable_api]. +1. [Enable the GKE Connect Gateway API][enable_api]. 1. [Set up authentication with a service account][auth] so you can access the API from your local workstation. @@ -78,7 +78,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/nodejs-gke-connect -The [API Gateway Node.js Client API Reference][client-docs] documentation +The [GKE Connect Gateway Node.js Client API Reference][client-docs] documentation also contains samples. ## Supported Node.js Versions @@ -138,9 +138,9 @@ Apache Version 2.0 See [LICENSE](https://github.com/googleapis/nodejs-gke-connect-gateway/blob/main/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/gke-connect-gateway/latest -[product-docs]: https://cloud.google.com/api-gateway/ +[product-docs]: https://cloud.google.com/anthos/multicluster-management/gateway [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png [projects]: https://console.cloud.google.com/project [billing]: https://support.google.com/cloud/answer/6293499#enable-billing -[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=gateway.googleapis.com +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=connectgateway.googleapis.com [auth]: https://cloud.google.com/docs/authentication/getting-started diff --git a/packages/google-cloud-gkeconnect-gateway/protos/protos.d.ts b/packages/google-cloud-gkeconnect-gateway/protos/protos.d.ts index 22dfff7d57f..89242aa1323 100644 --- a/packages/google-cloud-gkeconnect-gateway/protos/protos.d.ts +++ b/packages/google-cloud-gkeconnect-gateway/protos/protos.d.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-gkeconnect-gateway/protos/protos.js b/packages/google-cloud-gkeconnect-gateway/protos/protos.js index 6a999ec0f21..dbeaf13673d 100644 --- a/packages/google-cloud-gkeconnect-gateway/protos/protos.js +++ b/packages/google-cloud-gkeconnect-gateway/protos/protos.js @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-gkeconnect-gateway/samples/README.md b/packages/google-cloud-gkeconnect-gateway/samples/README.md index eebf0b0cf6b..59cf64c1fa4 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/README.md +++ b/packages/google-cloud-gkeconnect-gateway/samples/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [API Gateway: Node.js Samples](https://github.com/googleapis/nodejs-gke-connect-gateway) +# [GKE Connect Gateway: Node.js Samples](https://github.com/googleapis/nodejs-gke-connect-gateway) [![Open in Cloud Shell][shell_img]][shell_link] @@ -47,4 +47,4 @@ __Usage:__ [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png [shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-gke-connect-gateway&page=editor&open_in_editor=samples/README.md -[product-docs]: https://cloud.google.com/api-gateway/ +[product-docs]: https://cloud.google.com/anthos/multicluster-management/gateway From b568d23ffecc9e3d28e8c2781e3e55b9f56ce8c6 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 11 Jan 2022 17:02:21 +0000 Subject: [PATCH 122/254] test(nodejs): remove 15 add 16 (#1322) (#21) --- packages/google-cloud-deploy/protos/protos.d.ts | 2 +- packages/google-cloud-deploy/protos/protos.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-deploy/protos/protos.d.ts b/packages/google-cloud-deploy/protos/protos.d.ts index 999721ef412..152c473f28c 100644 --- a/packages/google-cloud-deploy/protos/protos.d.ts +++ b/packages/google-cloud-deploy/protos/protos.d.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-deploy/protos/protos.js b/packages/google-cloud-deploy/protos/protos.js index d00c0a47c06..860307cfa0a 100644 --- a/packages/google-cloud-deploy/protos/protos.js +++ b/packages/google-cloud-deploy/protos/protos.js @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From de3a34149b0eaa7801da603a2b7ddb7603bc6af5 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 11 Jan 2022 17:18:56 +0000 Subject: [PATCH 123/254] test(nodejs): remove 15 add 16 (#1322) (#97) --- packages/google-cloud-policytroubleshooter/protos/protos.d.ts | 2 +- packages/google-cloud-policytroubleshooter/protos/protos.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-policytroubleshooter/protos/protos.d.ts b/packages/google-cloud-policytroubleshooter/protos/protos.d.ts index 7117b7f6084..9a58bbde96b 100644 --- a/packages/google-cloud-policytroubleshooter/protos/protos.d.ts +++ b/packages/google-cloud-policytroubleshooter/protos/protos.d.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-policytroubleshooter/protos/protos.js b/packages/google-cloud-policytroubleshooter/protos/protos.js index 6b145c83ff6..81d9211ee89 100644 --- a/packages/google-cloud-policytroubleshooter/protos/protos.js +++ b/packages/google-cloud-policytroubleshooter/protos/protos.js @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From 34c43b81bb0d216db214f5d19744af9516645eaf Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 11 Jan 2022 17:20:21 +0000 Subject: [PATCH 124/254] test(nodejs): remove 15 add 16 (#1322) (#58) --- packages/google-cloud-shell/protos/protos.d.ts | 2 +- packages/google-cloud-shell/protos/protos.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-shell/protos/protos.d.ts b/packages/google-cloud-shell/protos/protos.d.ts index 2e82de739af..0760a29a7f1 100644 --- a/packages/google-cloud-shell/protos/protos.d.ts +++ b/packages/google-cloud-shell/protos/protos.d.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-shell/protos/protos.js b/packages/google-cloud-shell/protos/protos.js index 204cfa44050..d35dc7118f0 100644 --- a/packages/google-cloud-shell/protos/protos.js +++ b/packages/google-cloud-shell/protos/protos.js @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From 090b244b5566b884627830b03d16241e1a784d7b Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 20 Jan 2022 00:24:39 -0800 Subject: [PATCH 125/254] build: update copyright year to 2022 (#99) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): upgrade gapic-generator-java to 2.4.1 PiperOrigin-RevId: 422607515 Source-Link: https://github.com/googleapis/googleapis/commit/ba2ffd6fe6642e28b4fed2ffae217b4c5f084034 Source-Link: https://github.com/googleapis/googleapis-gen/commit/73ba4add239a619da567ffbd4e5730fdd6de04d3 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzNiYTRhZGQyMzlhNjE5ZGE1NjdmZmJkNGU1NzMwZmRkNmRlMDRkMyJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- packages/google-cloud-policytroubleshooter/.jsdoc.js | 4 ++-- .../generated/v1/iam_checker.troubleshoot_iam_policy.js | 8 ++++---- .../src/v1/iam_checker_client.ts | 2 +- .../google-cloud-policytroubleshooter/src/v1/index.ts | 2 +- .../system-test/fixtures/sample/src/index.js | 2 +- .../system-test/fixtures/sample/src/index.ts | 2 +- .../system-test/install.ts | 2 +- .../test/gapic_iam_checker_v1.ts | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/google-cloud-policytroubleshooter/.jsdoc.js b/packages/google-cloud-policytroubleshooter/.jsdoc.js index 9fafe924903..8e49f2f2905 100644 --- a/packages/google-cloud-policytroubleshooter/.jsdoc.js +++ b/packages/google-cloud-policytroubleshooter/.jsdoc.js @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -40,7 +40,7 @@ module.exports = { includePattern: '\\.js$' }, templates: { - copyright: 'Copyright 2021 Google LLC', + copyright: 'Copyright 2022 Google LLC', includeDate: false, sourceFiles: false, systemName: '@google-cloud/policy-troubleshooter', diff --git a/packages/google-cloud-policytroubleshooter/samples/generated/v1/iam_checker.troubleshoot_iam_policy.js b/packages/google-cloud-policytroubleshooter/samples/generated/v1/iam_checker.troubleshoot_iam_policy.js index 73088c089d4..82676c5b5c6 100644 --- a/packages/google-cloud-policytroubleshooter/samples/generated/v1/iam_checker.troubleshoot_iam_policy.js +++ b/packages/google-cloud-policytroubleshooter/samples/generated/v1/iam_checker.troubleshoot_iam_policy.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main() { @@ -33,12 +34,11 @@ function main() { async function callTroubleshootIamPolicy() { // Construct request - const request = {}; + const request = { + }; // Run request - const response = await policytroubleshooterClient.troubleshootIamPolicy( - request - ); + const response = await policytroubleshooterClient.troubleshootIamPolicy(request); console.log(response); } diff --git a/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts b/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts index 2f02a2a46a0..6df1fdd1996 100644 --- a/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts +++ b/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-policytroubleshooter/src/v1/index.ts b/packages/google-cloud-policytroubleshooter/src/v1/index.ts index 9548a7f7215..9610c4c4455 100644 --- a/packages/google-cloud-policytroubleshooter/src/v1/index.ts +++ b/packages/google-cloud-policytroubleshooter/src/v1/index.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-policytroubleshooter/system-test/fixtures/sample/src/index.js b/packages/google-cloud-policytroubleshooter/system-test/fixtures/sample/src/index.js index 29fb5bf4d4c..c536c310670 100644 --- a/packages/google-cloud-policytroubleshooter/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-policytroubleshooter/system-test/fixtures/sample/src/index.js @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-policytroubleshooter/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-policytroubleshooter/system-test/fixtures/sample/src/index.ts index 210e6787a3f..bbddec21877 100644 --- a/packages/google-cloud-policytroubleshooter/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-policytroubleshooter/system-test/fixtures/sample/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-policytroubleshooter/system-test/install.ts b/packages/google-cloud-policytroubleshooter/system-test/install.ts index d2d61c0396f..6dd1eaadafa 100644 --- a/packages/google-cloud-policytroubleshooter/system-test/install.ts +++ b/packages/google-cloud-policytroubleshooter/system-test/install.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-policytroubleshooter/test/gapic_iam_checker_v1.ts b/packages/google-cloud-policytroubleshooter/test/gapic_iam_checker_v1.ts index fec432d36af..fbd7f64d1eb 100644 --- a/packages/google-cloud-policytroubleshooter/test/gapic_iam_checker_v1.ts +++ b/packages/google-cloud-policytroubleshooter/test/gapic_iam_checker_v1.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From d94b6410f4bf9454a0406784c115559d03fe5f97 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 20 Jan 2022 00:42:03 -0800 Subject: [PATCH 126/254] build: update copyright year to 2022 (#48) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): upgrade gapic-generator-java to 2.4.1 PiperOrigin-RevId: 422607515 Source-Link: https://github.com/googleapis/googleapis/commit/ba2ffd6fe6642e28b4fed2ffae217b4c5f084034 Source-Link: https://github.com/googleapis/googleapis-gen/commit/73ba4add239a619da567ffbd4e5730fdd6de04d3 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzNiYTRhZGQyMzlhNjE5ZGE1NjdmZmJkNGU1NzMwZmRkNmRlMDRkMyJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- packages/google-cloud-gkeconnect-gateway/.jsdoc.js | 4 ++-- .../generated/v1beta1/gateway_service.delete_resource.js | 7 ++++--- .../generated/v1beta1/gateway_service.get_resource.js | 7 ++++--- .../generated/v1beta1/gateway_service.patch_resource.js | 7 ++++--- .../generated/v1beta1/gateway_service.post_resource.js | 7 ++++--- .../generated/v1beta1/gateway_service.put_resource.js | 7 ++++--- .../src/v1beta1/gateway_service_client.ts | 2 +- .../google-cloud-gkeconnect-gateway/src/v1beta1/index.ts | 2 +- .../system-test/fixtures/sample/src/index.js | 2 +- .../system-test/fixtures/sample/src/index.ts | 2 +- .../google-cloud-gkeconnect-gateway/system-test/install.ts | 2 +- .../test/gapic_gateway_service_v1beta1.ts | 2 +- 12 files changed, 28 insertions(+), 23 deletions(-) diff --git a/packages/google-cloud-gkeconnect-gateway/.jsdoc.js b/packages/google-cloud-gkeconnect-gateway/.jsdoc.js index 0e7e239f75a..fe9b8630ce4 100644 --- a/packages/google-cloud-gkeconnect-gateway/.jsdoc.js +++ b/packages/google-cloud-gkeconnect-gateway/.jsdoc.js @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -40,7 +40,7 @@ module.exports = { includePattern: '\\.js$' }, templates: { - copyright: 'Copyright 2021 Google LLC', + copyright: 'Copyright 2022 Google LLC', includeDate: false, sourceFiles: false, systemName: '@google-cloud/gke-connect-gateway', diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.delete_resource.js b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.delete_resource.js index 5a244bc6897..efc3f9de82f 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.delete_resource.js +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.delete_resource.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main() { @@ -34,15 +35,15 @@ function main() { // const extensions = 1234 // Imports the Gateway library - const {GatewayServiceClient} = - require('@google-cloud/gke-connect-gateway').v1beta1; + const {GatewayServiceClient} = require('@google-cloud/gke-connect-gateway').v1beta1; // Instantiates a client const gatewayClient = new GatewayServiceClient(); async function callDeleteResource() { // Construct request - const request = {}; + const request = { + }; // Run request const response = await gatewayClient.deleteResource(request); diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.get_resource.js b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.get_resource.js index dce42a3ba37..785db18697b 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.get_resource.js +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.get_resource.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main() { @@ -34,15 +35,15 @@ function main() { // const extensions = 1234 // Imports the Gateway library - const {GatewayServiceClient} = - require('@google-cloud/gke-connect-gateway').v1beta1; + const {GatewayServiceClient} = require('@google-cloud/gke-connect-gateway').v1beta1; // Instantiates a client const gatewayClient = new GatewayServiceClient(); async function callGetResource() { // Construct request - const request = {}; + const request = { + }; // Run request const response = await gatewayClient.getResource(request); diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.patch_resource.js b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.patch_resource.js index 5395ee9948f..ce00bce9d93 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.patch_resource.js +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.patch_resource.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main() { @@ -34,15 +35,15 @@ function main() { // const extensions = 1234 // Imports the Gateway library - const {GatewayServiceClient} = - require('@google-cloud/gke-connect-gateway').v1beta1; + const {GatewayServiceClient} = require('@google-cloud/gke-connect-gateway').v1beta1; // Instantiates a client const gatewayClient = new GatewayServiceClient(); async function callPatchResource() { // Construct request - const request = {}; + const request = { + }; // Run request const response = await gatewayClient.patchResource(request); diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.post_resource.js b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.post_resource.js index 89cc3b23f72..530e6f22a87 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.post_resource.js +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.post_resource.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main() { @@ -34,15 +35,15 @@ function main() { // const extensions = 1234 // Imports the Gateway library - const {GatewayServiceClient} = - require('@google-cloud/gke-connect-gateway').v1beta1; + const {GatewayServiceClient} = require('@google-cloud/gke-connect-gateway').v1beta1; // Instantiates a client const gatewayClient = new GatewayServiceClient(); async function callPostResource() { // Construct request - const request = {}; + const request = { + }; // Run request const response = await gatewayClient.postResource(request); diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.put_resource.js b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.put_resource.js index ab4f0a8b6ad..bb7b27c6348 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.put_resource.js +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.put_resource.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main() { @@ -34,15 +35,15 @@ function main() { // const extensions = 1234 // Imports the Gateway library - const {GatewayServiceClient} = - require('@google-cloud/gke-connect-gateway').v1beta1; + const {GatewayServiceClient} = require('@google-cloud/gke-connect-gateway').v1beta1; // Instantiates a client const gatewayClient = new GatewayServiceClient(); async function callPutResource() { // Construct request - const request = {}; + const request = { + }; // Run request const response = await gatewayClient.putResource(request); diff --git a/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts b/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts index 8f3d8ee102d..2eadc1d29f6 100644 --- a/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts +++ b/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-gkeconnect-gateway/src/v1beta1/index.ts b/packages/google-cloud-gkeconnect-gateway/src/v1beta1/index.ts index 62d52d4ade6..8d9d6e0b87f 100644 --- a/packages/google-cloud-gkeconnect-gateway/src/v1beta1/index.ts +++ b/packages/google-cloud-gkeconnect-gateway/src/v1beta1/index.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-gkeconnect-gateway/system-test/fixtures/sample/src/index.js b/packages/google-cloud-gkeconnect-gateway/system-test/fixtures/sample/src/index.js index e32669bfbf3..ae15a5b0b74 100644 --- a/packages/google-cloud-gkeconnect-gateway/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-gkeconnect-gateway/system-test/fixtures/sample/src/index.js @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-gkeconnect-gateway/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-gkeconnect-gateway/system-test/fixtures/sample/src/index.ts index 817c03b2a56..dbad3f4602b 100644 --- a/packages/google-cloud-gkeconnect-gateway/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-gkeconnect-gateway/system-test/fixtures/sample/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-gkeconnect-gateway/system-test/install.ts b/packages/google-cloud-gkeconnect-gateway/system-test/install.ts index d2d61c0396f..6dd1eaadafa 100644 --- a/packages/google-cloud-gkeconnect-gateway/system-test/install.ts +++ b/packages/google-cloud-gkeconnect-gateway/system-test/install.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-gkeconnect-gateway/test/gapic_gateway_service_v1beta1.ts b/packages/google-cloud-gkeconnect-gateway/test/gapic_gateway_service_v1beta1.ts index 2d81713902f..8dac7c810b7 100644 --- a/packages/google-cloud-gkeconnect-gateway/test/gapic_gateway_service_v1beta1.ts +++ b/packages/google-cloud-gkeconnect-gateway/test/gapic_gateway_service_v1beta1.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From be56e0e27142402c4a022cfaf07f07bf595acf43 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 20 Jan 2022 00:47:07 -0800 Subject: [PATCH 127/254] build: update copyright year to 2022 (#23) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): upgrade gapic-generator-java to 2.4.1 PiperOrigin-RevId: 422607515 Source-Link: https://github.com/googleapis/googleapis/commit/ba2ffd6fe6642e28b4fed2ffae217b4c5f084034 Source-Link: https://github.com/googleapis/googleapis-gen/commit/73ba4add239a619da567ffbd4e5730fdd6de04d3 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzNiYTRhZGQyMzlhNjE5ZGE1NjdmZmJkNGU1NzMwZmRkNmRlMDRkMyJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- packages/google-cloud-deploy/.jsdoc.js | 4 ++-- .../samples/generated/v1/cloud_deploy.approve_rollout.js | 1 + .../generated/v1/cloud_deploy.create_delivery_pipeline.js | 1 + .../samples/generated/v1/cloud_deploy.create_release.js | 1 + .../samples/generated/v1/cloud_deploy.create_rollout.js | 1 + .../samples/generated/v1/cloud_deploy.create_target.js | 1 + .../generated/v1/cloud_deploy.delete_delivery_pipeline.js | 1 + .../samples/generated/v1/cloud_deploy.delete_target.js | 1 + .../samples/generated/v1/cloud_deploy.get_config.js | 1 + .../generated/v1/cloud_deploy.get_delivery_pipeline.js | 1 + .../samples/generated/v1/cloud_deploy.get_release.js | 1 + .../samples/generated/v1/cloud_deploy.get_rollout.js | 1 + .../samples/generated/v1/cloud_deploy.get_target.js | 1 + .../generated/v1/cloud_deploy.list_delivery_pipelines.js | 3 ++- .../samples/generated/v1/cloud_deploy.list_releases.js | 3 ++- .../samples/generated/v1/cloud_deploy.list_rollouts.js | 3 ++- .../samples/generated/v1/cloud_deploy.list_targets.js | 3 ++- .../generated/v1/cloud_deploy.update_delivery_pipeline.js | 1 + .../samples/generated/v1/cloud_deploy.update_target.js | 1 + packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts | 2 +- packages/google-cloud-deploy/src/v1/index.ts | 2 +- .../system-test/fixtures/sample/src/index.js | 2 +- .../system-test/fixtures/sample/src/index.ts | 2 +- packages/google-cloud-deploy/system-test/install.ts | 2 +- packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts | 2 +- 25 files changed, 30 insertions(+), 12 deletions(-) diff --git a/packages/google-cloud-deploy/.jsdoc.js b/packages/google-cloud-deploy/.jsdoc.js index c88d0999044..1ad417e7a8e 100644 --- a/packages/google-cloud-deploy/.jsdoc.js +++ b/packages/google-cloud-deploy/.jsdoc.js @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -40,7 +40,7 @@ module.exports = { includePattern: '\\.js$' }, templates: { - copyright: 'Copyright 2021 Google LLC', + copyright: 'Copyright 2022 Google LLC', includeDate: false, sourceFiles: false, systemName: '@google-cloud/deploy', diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.approve_rollout.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.approve_rollout.js index e6c5de051fd..44dcda6e1a7 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.approve_rollout.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.approve_rollout.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name, approved) { diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js index 333ae0dc75a..c0c039a830e 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent, deliveryPipelineId, deliveryPipeline) { diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_release.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_release.js index 4c21caf99ee..8a26f9fb03b 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_release.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_release.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent, releaseId, release) { diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_rollout.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_rollout.js index 33450507197..360433d1e20 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_rollout.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_rollout.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent, rolloutId, rollout) { diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_target.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_target.js index 6c3652b8767..600c8f47a67 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_target.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_target.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent, targetId, target) { diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js index 2e37e96b90a..945f997f12d 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_target.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_target.js index 5e3689bc455..c31e61bde65 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_target.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_target.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_config.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_config.js index 570c9293612..5b62830c0df 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_config.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_config.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_delivery_pipeline.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_delivery_pipeline.js index a0040ef301e..e56bd3fb9bb 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_delivery_pipeline.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_delivery_pipeline.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_release.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_release.js index 2b3fa963c9e..16a68b5e91c 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_release.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_release.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_rollout.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_rollout.js index d4c2bcfbc1f..5074cb1b92d 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_rollout.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_rollout.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_target.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_target.js index 67278b9df80..608c0279ae3 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_target.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_target.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js index 40beed5b5b7..cf4745f3900 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent) { @@ -63,7 +64,7 @@ function main(parent) { // Run request const iterable = await deployClient.listDeliveryPipelinesAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_releases.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_releases.js index 9b440eba11c..009fb644915 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_releases.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_releases.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent) { @@ -61,7 +62,7 @@ function main(parent) { // Run request const iterable = await deployClient.listReleasesAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_rollouts.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_rollouts.js index caf07436d21..8f25061073c 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_rollouts.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_rollouts.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent) { @@ -61,7 +62,7 @@ function main(parent) { // Run request const iterable = await deployClient.listRolloutsAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_targets.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_targets.js index 31998a5873c..1ce2ea1140e 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_targets.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_targets.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent) { @@ -62,7 +63,7 @@ function main(parent) { // Run request const iterable = await deployClient.listTargetsAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js index e0a0c90f53a..c676b52e7dd 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(updateMask, deliveryPipeline) { diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_target.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_target.js index bc865c546c3..733f9288e45 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_target.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_target.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(updateMask, target) { diff --git a/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts b/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts index e8634a652a9..5e588c3bca7 100644 --- a/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts +++ b/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-deploy/src/v1/index.ts b/packages/google-cloud-deploy/src/v1/index.ts index d7b0c0b4599..7f00861da8f 100644 --- a/packages/google-cloud-deploy/src/v1/index.ts +++ b/packages/google-cloud-deploy/src/v1/index.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-deploy/system-test/fixtures/sample/src/index.js b/packages/google-cloud-deploy/system-test/fixtures/sample/src/index.js index e9defe6426d..e49888e8641 100644 --- a/packages/google-cloud-deploy/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-deploy/system-test/fixtures/sample/src/index.js @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-deploy/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-deploy/system-test/fixtures/sample/src/index.ts index 3bb895b186e..b1c846e6dc1 100644 --- a/packages/google-cloud-deploy/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-deploy/system-test/fixtures/sample/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-deploy/system-test/install.ts b/packages/google-cloud-deploy/system-test/install.ts index d2d61c0396f..6dd1eaadafa 100644 --- a/packages/google-cloud-deploy/system-test/install.ts +++ b/packages/google-cloud-deploy/system-test/install.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts b/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts index 61b9dbbb861..7bf386774fb 100644 --- a/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts +++ b/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From 7454f4eda7d3b90682b28a3f70dd95009b6fbde0 Mon Sep 17 00:00:00 2001 From: Dina Graves Portman Date: Thu, 20 Jan 2022 12:29:32 -0500 Subject: [PATCH 128/254] chore: Add codeowners (#62) --- packages/google-cloud-shell/.repo-metadata.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-shell/.repo-metadata.json b/packages/google-cloud-shell/.repo-metadata.json index e39f2aa27e7..28783c45638 100644 --- a/packages/google-cloud-shell/.repo-metadata.json +++ b/packages/google-cloud-shell/.repo-metadata.json @@ -12,5 +12,6 @@ "default_version": "v1", "requires_billing": true, "api_shortname": "cloudshell", - "library_type": "GAPIC_AUTO" + "library_type": "GAPIC_AUTO", + "codeowner_team": "@googleapis/aap-dpes" } From 1793d3ecbf530e95d993313a256935ddc8a188dd Mon Sep 17 00:00:00 2001 From: Dina Graves Portman Date: Thu, 20 Jan 2022 12:33:33 -0500 Subject: [PATCH 129/254] chore: add codeowners (#25) See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> Co-authored-by: Benjamin E. Coe --- packages/google-cloud-deploy/.repo-metadata.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-deploy/.repo-metadata.json b/packages/google-cloud-deploy/.repo-metadata.json index 19e55d738ca..c25ac44b699 100644 --- a/packages/google-cloud-deploy/.repo-metadata.json +++ b/packages/google-cloud-deploy/.repo-metadata.json @@ -12,5 +12,6 @@ "default_version": "v1", "requires_billing": true, "api_shortname": "clouddeploy", - "library_type": "GAPIC_AUTO" + "library_type": "GAPIC_AUTO", + "codeowner_team": "@googleapis/aap-dpes" } From 2ceb5979c995376c7890ed33c4b22be8944dd3da Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 27 Jan 2022 16:30:41 +0000 Subject: [PATCH 130/254] chore: update v2.12.0 gapic-generator-typescript (#50) - [ ] Regenerate this pull request now. Committer: @summer-ji-eng PiperOrigin-RevId: 424244721 Source-Link: https://github.com/googleapis/googleapis/commit/4b6b01f507ebc3df95fdf8e1d76b0ae0ae33e52c Source-Link: https://github.com/googleapis/googleapis-gen/commit/8ac83fba606d008c7e8a42e7d55b6596ec4be35f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGFjODNmYmE2MDZkMDA4YzdlOGE0MmU3ZDU1YjY1OTZlYzRiZTM1ZiJ9 --- .../linkinator.config.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-gkeconnect-gateway/linkinator.config.json b/packages/google-cloud-gkeconnect-gateway/linkinator.config.json index 0121dfa684f..befd23c8633 100644 --- a/packages/google-cloud-gkeconnect-gateway/linkinator.config.json +++ b/packages/google-cloud-gkeconnect-gateway/linkinator.config.json @@ -3,8 +3,14 @@ "skip": [ "https://codecov.io/gh/googleapis/", "www.googleapis.com", - "img.shields.io" + "img.shields.io", + "https://console.cloud.google.com/cloudshell", + "https://support.google.com" ], "silent": true, - "concurrency": 5 + "concurrency": 5, + "retry": true, + "retryErrors": true, + "retryErrorsCount": 5, + "retryErrorsJitter": 3000 } From 14af2230f0931929f47f35730a40dd3ae971f1ec Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 27 Jan 2022 16:31:03 +0000 Subject: [PATCH 131/254] chore: update v2.12.0 gapic-generator-typescript (#101) - [ ] Regenerate this pull request now. Committer: @summer-ji-eng PiperOrigin-RevId: 424244721 Source-Link: https://github.com/googleapis/googleapis/commit/4b6b01f507ebc3df95fdf8e1d76b0ae0ae33e52c Source-Link: https://github.com/googleapis/googleapis-gen/commit/8ac83fba606d008c7e8a42e7d55b6596ec4be35f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGFjODNmYmE2MDZkMDA4YzdlOGE0MmU3ZDU1YjY1OTZlYzRiZTM1ZiJ9 --- .../linkinator.config.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-policytroubleshooter/linkinator.config.json b/packages/google-cloud-policytroubleshooter/linkinator.config.json index 0121dfa684f..befd23c8633 100644 --- a/packages/google-cloud-policytroubleshooter/linkinator.config.json +++ b/packages/google-cloud-policytroubleshooter/linkinator.config.json @@ -3,8 +3,14 @@ "skip": [ "https://codecov.io/gh/googleapis/", "www.googleapis.com", - "img.shields.io" + "img.shields.io", + "https://console.cloud.google.com/cloudshell", + "https://support.google.com" ], "silent": true, - "concurrency": 5 + "concurrency": 5, + "retry": true, + "retryErrors": true, + "retryErrorsCount": 5, + "retryErrorsJitter": 3000 } From 3d00f59842688374ec7f956d9e0cf99b606da703 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 27 Jan 2022 16:32:28 +0000 Subject: [PATCH 132/254] chore: update v2.12.0 gapic-generator-typescript (#26) - [ ] Regenerate this pull request now. Committer: @summer-ji-eng PiperOrigin-RevId: 424244721 Source-Link: https://github.com/googleapis/googleapis/commit/4b6b01f507ebc3df95fdf8e1d76b0ae0ae33e52c Source-Link: https://github.com/googleapis/googleapis-gen/commit/8ac83fba606d008c7e8a42e7d55b6596ec4be35f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGFjODNmYmE2MDZkMDA4YzdlOGE0MmU3ZDU1YjY1OTZlYzRiZTM1ZiJ9 --- packages/google-cloud-deploy/linkinator.config.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-deploy/linkinator.config.json b/packages/google-cloud-deploy/linkinator.config.json index 0121dfa684f..befd23c8633 100644 --- a/packages/google-cloud-deploy/linkinator.config.json +++ b/packages/google-cloud-deploy/linkinator.config.json @@ -3,8 +3,14 @@ "skip": [ "https://codecov.io/gh/googleapis/", "www.googleapis.com", - "img.shields.io" + "img.shields.io", + "https://console.cloud.google.com/cloudshell", + "https://support.google.com" ], "silent": true, - "concurrency": 5 + "concurrency": 5, + "retry": true, + "retryErrors": true, + "retryErrorsCount": 5, + "retryErrorsJitter": 3000 } From 11c0deca8235018d1029f2a823fc87895a90afd6 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Mon, 31 Jan 2022 16:02:50 -0800 Subject: [PATCH 133/254] feat: initial generation --- packages/google-cloud-dataplex/.eslintignore | 7 + packages/google-cloud-dataplex/.eslintrc.json | 3 + packages/google-cloud-dataplex/.gitattributes | 4 + .../.github/.OwlBot.yaml | 22 + packages/google-cloud-dataplex/.gitignore | 14 + packages/google-cloud-dataplex/.jsdoc.js | 55 + packages/google-cloud-dataplex/.mocharc.js | 29 + packages/google-cloud-dataplex/.nycrc | 24 + .../google-cloud-dataplex/.prettierignore | 6 + packages/google-cloud-dataplex/.prettierrc.js | 17 + .../google-cloud-dataplex/.repo-metadata.json | 15 + .../google-cloud-dataplex/CODE_OF_CONDUCT.md | 94 + .../google-cloud-dataplex/CONTRIBUTING.md | 76 + packages/google-cloud-dataplex/LICENSE | 202 + packages/google-cloud-dataplex/README.md | 126 + .../linkinator.config.json | 16 + packages/google-cloud-dataplex/package.json | 64 + .../google/cloud/dataplex/v1/logs.proto | 281 + .../google/cloud/dataplex/v1/metadata.proto | 580 + .../google/cloud/dataplex/v1/resources.proto | 798 + .../google/cloud/dataplex/v1/service.proto | 897 + .../google/cloud/dataplex/v1/tasks.proto | 344 + .../google-cloud-dataplex/protos/protos.d.ts | 16206 ++++++ .../google-cloud-dataplex/protos/protos.js | 40911 ++++++++++++++++ .../google-cloud-dataplex/protos/protos.json | 5112 ++ .../v1/dataplex_service.cancel_job.js | 54 + .../v1/dataplex_service.create_asset.js | 77 + .../v1/dataplex_service.create_lake.js | 78 + .../v1/dataplex_service.create_task.js | 70 + .../v1/dataplex_service.create_zone.js | 78 + .../v1/dataplex_service.delete_asset.js | 55 + .../v1/dataplex_service.delete_lake.js | 55 + .../v1/dataplex_service.delete_task.js | 55 + .../v1/dataplex_service.delete_zone.js | 55 + .../v1/dataplex_service.get_asset.js | 54 + .../generated/v1/dataplex_service.get_job.js | 54 + .../generated/v1/dataplex_service.get_lake.js | 54 + .../generated/v1/dataplex_service.get_task.js | 54 + .../generated/v1/dataplex_service.get_zone.js | 54 + .../v1/dataplex_service.list_asset_actions.js | 69 + .../v1/dataplex_service.list_assets.js | 77 + .../v1/dataplex_service.list_jobs.js | 69 + .../v1/dataplex_service.list_lake_actions.js | 69 + .../v1/dataplex_service.list_lakes.js | 77 + .../v1/dataplex_service.list_tasks.js | 76 + .../v1/dataplex_service.list_zone_actions.js | 69 + .../v1/dataplex_service.list_zones.js | 76 + .../v1/dataplex_service.update_asset.js | 65 + .../v1/dataplex_service.update_lake.js | 65 + .../v1/dataplex_service.update_task.js | 65 + .../v1/dataplex_service.update_zone.js | 65 + .../v1/metadata_service.get_entity.js | 59 + .../v1/metadata_service.get_partition.js | 54 + .../v1/metadata_service.list_entities.js | 78 + .../v1/metadata_service.list_partitions.js | 73 + packages/google-cloud-dataplex/src/index.ts | 29 + .../src/v1/dataplex_service_client.ts | 5318 ++ .../v1/dataplex_service_client_config.json | 168 + .../src/v1/dataplex_service_proto_list.json | 7 + .../src/v1/gapic_metadata.json | 377 + .../google-cloud-dataplex/src/v1/index.ts | 20 + .../src/v1/metadata_service_client.ts | 1793 + .../v1/metadata_service_client_config.json | 58 + .../src/v1/metadata_service_proto_list.json | 7 + .../system-test/fixtures/sample/src/index.js | 27 + .../system-test/fixtures/sample/src/index.ts | 41 + .../system-test/install.ts | 51 + .../test/gapic_dataplex_service_v1.ts | 6341 +++ .../test/gapic_metadata_service_v1.ts | 1897 + packages/google-cloud-dataplex/tsconfig.json | 19 + .../google-cloud-dataplex/webpack.config.js | 64 + 71 files changed, 84073 insertions(+) create mode 100644 packages/google-cloud-dataplex/.eslintignore create mode 100644 packages/google-cloud-dataplex/.eslintrc.json create mode 100644 packages/google-cloud-dataplex/.gitattributes create mode 100644 packages/google-cloud-dataplex/.github/.OwlBot.yaml create mode 100644 packages/google-cloud-dataplex/.gitignore create mode 100644 packages/google-cloud-dataplex/.jsdoc.js create mode 100644 packages/google-cloud-dataplex/.mocharc.js create mode 100644 packages/google-cloud-dataplex/.nycrc create mode 100644 packages/google-cloud-dataplex/.prettierignore create mode 100644 packages/google-cloud-dataplex/.prettierrc.js create mode 100644 packages/google-cloud-dataplex/.repo-metadata.json create mode 100644 packages/google-cloud-dataplex/CODE_OF_CONDUCT.md create mode 100644 packages/google-cloud-dataplex/CONTRIBUTING.md create mode 100644 packages/google-cloud-dataplex/LICENSE create mode 100644 packages/google-cloud-dataplex/README.md create mode 100644 packages/google-cloud-dataplex/linkinator.config.json create mode 100644 packages/google-cloud-dataplex/package.json create mode 100644 packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/logs.proto create mode 100644 packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/metadata.proto create mode 100644 packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/resources.proto create mode 100644 packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/service.proto create mode 100644 packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/tasks.proto create mode 100644 packages/google-cloud-dataplex/protos/protos.d.ts create mode 100644 packages/google-cloud-dataplex/protos/protos.js create mode 100644 packages/google-cloud-dataplex/protos/protos.json create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.cancel_job.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_asset.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_lake.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_task.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_zone.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_asset.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_lake.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_task.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_zone.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_asset.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_job.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_lake.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_task.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_zone.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_asset_actions.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_assets.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_jobs.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lake_actions.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lakes.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_tasks.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zone_actions.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zones.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_asset.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_lake.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_task.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_zone.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_entity.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_partition.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_entities.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_partitions.js create mode 100644 packages/google-cloud-dataplex/src/index.ts create mode 100644 packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts create mode 100644 packages/google-cloud-dataplex/src/v1/dataplex_service_client_config.json create mode 100644 packages/google-cloud-dataplex/src/v1/dataplex_service_proto_list.json create mode 100644 packages/google-cloud-dataplex/src/v1/gapic_metadata.json create mode 100644 packages/google-cloud-dataplex/src/v1/index.ts create mode 100644 packages/google-cloud-dataplex/src/v1/metadata_service_client.ts create mode 100644 packages/google-cloud-dataplex/src/v1/metadata_service_client_config.json create mode 100644 packages/google-cloud-dataplex/src/v1/metadata_service_proto_list.json create mode 100644 packages/google-cloud-dataplex/system-test/fixtures/sample/src/index.js create mode 100644 packages/google-cloud-dataplex/system-test/fixtures/sample/src/index.ts create mode 100644 packages/google-cloud-dataplex/system-test/install.ts create mode 100644 packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts create mode 100644 packages/google-cloud-dataplex/test/gapic_metadata_service_v1.ts create mode 100644 packages/google-cloud-dataplex/tsconfig.json create mode 100644 packages/google-cloud-dataplex/webpack.config.js diff --git a/packages/google-cloud-dataplex/.eslintignore b/packages/google-cloud-dataplex/.eslintignore new file mode 100644 index 00000000000..ea5b04aebe6 --- /dev/null +++ b/packages/google-cloud-dataplex/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ +samples/generated/ diff --git a/packages/google-cloud-dataplex/.eslintrc.json b/packages/google-cloud-dataplex/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/packages/google-cloud-dataplex/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/packages/google-cloud-dataplex/.gitattributes b/packages/google-cloud-dataplex/.gitattributes new file mode 100644 index 00000000000..33739cb74e4 --- /dev/null +++ b/packages/google-cloud-dataplex/.gitattributes @@ -0,0 +1,4 @@ +*.ts text eol=lf +*.js text eol=lf +protos/* linguist-generated +**/api-extractor.json linguist-language=JSON-with-Comments diff --git a/packages/google-cloud-dataplex/.github/.OwlBot.yaml b/packages/google-cloud-dataplex/.github/.OwlBot.yaml new file mode 100644 index 00000000000..62fb1fb24eb --- /dev/null +++ b/packages/google-cloud-dataplex/.github/.OwlBot.yaml @@ -0,0 +1,22 @@ +# Copyright 2021 Google LLC +# +# 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. +docker: + image: gcr.io/repo-automation-bots/owlbot-nodejs:latest + +deep-remove-regex: + - /owl-bot-staging + +deep-copy-regex: + - source: /google/cloud/dataplex/(.*)/.*-nodejs/(.*) + dest: /owl-bot-staging/$1/$2 diff --git a/packages/google-cloud-dataplex/.gitignore b/packages/google-cloud-dataplex/.gitignore new file mode 100644 index 00000000000..5d32b23782f --- /dev/null +++ b/packages/google-cloud-dataplex/.gitignore @@ -0,0 +1,14 @@ +**/*.log +**/node_modules +.coverage +coverage +.nyc_output +docs/ +out/ +build/ +system-test/secrets.js +system-test/*key.json +*.lock +.DS_Store +package-lock.json +__pycache__ diff --git a/packages/google-cloud-dataplex/.jsdoc.js b/packages/google-cloud-dataplex/.jsdoc.js new file mode 100644 index 00000000000..ee5e526879d --- /dev/null +++ b/packages/google-cloud-dataplex/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2022 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +module.exports = { + opts: { + readme: './README.md', + package: './package.json', + template: './node_modules/jsdoc-fresh', + recurse: true, + verbose: true, + destination: './docs/' + }, + plugins: [ + 'plugins/markdown', + 'jsdoc-region-tag' + ], + source: { + excludePattern: '(^|\\/|\\\\)[._]', + include: [ + 'build/src', + 'protos' + ], + includePattern: '\\.js$' + }, + templates: { + copyright: 'Copyright 2022 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/dataplex', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/packages/google-cloud-dataplex/.mocharc.js b/packages/google-cloud-dataplex/.mocharc.js new file mode 100644 index 00000000000..0b600509bed --- /dev/null +++ b/packages/google-cloud-dataplex/.mocharc.js @@ -0,0 +1,29 @@ +// Copyright 2020 Google LLC +// +// 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. +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000, + "recursive": true +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} +module.exports = config diff --git a/packages/google-cloud-dataplex/.nycrc b/packages/google-cloud-dataplex/.nycrc new file mode 100644 index 00000000000..b18d5472b62 --- /dev/null +++ b/packages/google-cloud-dataplex/.nycrc @@ -0,0 +1,24 @@ +{ + "report-dir": "./.coverage", + "reporter": ["text", "lcov"], + "exclude": [ + "**/*-test", + "**/.coverage", + "**/apis", + "**/benchmark", + "**/conformance", + "**/docs", + "**/samples", + "**/scripts", + "**/protos", + "**/test", + "**/*.d.ts", + ".jsdoc.js", + "**/.jsdoc.js", + "karma.conf.js", + "webpack-tests.config.js", + "webpack.config.js" + ], + "exclude-after-remap": false, + "all": true +} diff --git a/packages/google-cloud-dataplex/.prettierignore b/packages/google-cloud-dataplex/.prettierignore new file mode 100644 index 00000000000..9340ad9b86d --- /dev/null +++ b/packages/google-cloud-dataplex/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-cloud-dataplex/.prettierrc.js b/packages/google-cloud-dataplex/.prettierrc.js new file mode 100644 index 00000000000..d1b95106f4c --- /dev/null +++ b/packages/google-cloud-dataplex/.prettierrc.js @@ -0,0 +1,17 @@ +// Copyright 2020 Google LLC +// +// 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 +// +// https://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. + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/packages/google-cloud-dataplex/.repo-metadata.json b/packages/google-cloud-dataplex/.repo-metadata.json new file mode 100644 index 00000000000..d9314a6a5d7 --- /dev/null +++ b/packages/google-cloud-dataplex/.repo-metadata.json @@ -0,0 +1,15 @@ +{ + "name": "dataplex", + "name_pretty": "Cloud Dataplex", + "product_documentation": "https://cloud.google.com/dataplex/", + "client_documentation": "https://cloud.google.com/dataplex", + "issue_tracker": "https://github.com/googleapis/nodejs-dataplex/issues", + "release_level": "beta", + "language": "nodejs", + "repo": "googleapis/nodejs-dataplex", + "distribution_name": "@google-cloud/dataplex", + "api_id": "dataplex.googleapis.com", + "default_version": "v1", + "requires_billing": true +} + diff --git a/packages/google-cloud-dataplex/CODE_OF_CONDUCT.md b/packages/google-cloud-dataplex/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..2add2547a81 --- /dev/null +++ b/packages/google-cloud-dataplex/CODE_OF_CONDUCT.md @@ -0,0 +1,94 @@ + +# Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +This Code of Conduct also applies outside the project spaces when the Project +Steward has a reasonable belief that an individual's behavior may have a +negative impact on the project or its community. + +## Conflict Resolution + +We do not believe that all conflict is bad; healthy debate and disagreement +often yield positive results. However, it is never okay to be disrespectful or +to engage in behavior that violates the project’s code of conduct. + +If you see someone violating the code of conduct, you are encouraged to address +the behavior directly with those involved. Many issues can be resolved quickly +and easily, and this gives people more control over the outcome of their +dispute. If you are unable to resolve the matter for any reason, or if the +behavior is threatening or harassing, report it. We are dedicated to providing +an environment where participants feel welcome and safe. + +Reports should be directed to *googleapis-stewards@google.com*, the +Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to +receive and address reported violations of the code of conduct. They will then +work with a committee consisting of representatives from the Open Source +Programs Office and the Google Open Source Strategy team. If for any reason you +are uncomfortable reaching out to the Project Steward, please email +opensource@google.com. + +We will investigate every complaint, but you may not receive a direct response. +We will use our discretion in determining when and how to follow up on reported +incidents, which may range from not taking action to permanent expulsion from +the project and project-sponsored spaces. We will notify the accused of the +report and provide them an opportunity to discuss it before any action is taken. +The identity of the reporter will be omitted from the details of the report +supplied to the accused. In potentially harmful situations, such as ongoing +harassment or threats to anyone's safety, we may take action without notice. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/packages/google-cloud-dataplex/CONTRIBUTING.md b/packages/google-cloud-dataplex/CONTRIBUTING.md new file mode 100644 index 00000000000..7786ca4f303 --- /dev/null +++ b/packages/google-cloud-dataplex/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# How to become a contributor and submit your own code + +**Table of contents** + +* [Contributor License Agreements](#contributor-license-agreements) +* [Contributing a patch](#contributing-a-patch) +* [Running the tests](#running-the-tests) +* [Releasing the library](#releasing-the-library) + +## Contributor License Agreements + +We'd love to accept your sample apps and patches! Before we can take them, we +have to jump a couple of legal hurdles. + +Please fill out either the individual or corporate Contributor License Agreement +(CLA). + + * If you are an individual writing original source code and you're sure you + own the intellectual property, then you'll need to sign an [individual CLA](https://developers.google.com/open-source/cla/individual). + * If you work for a company that wants to allow you to contribute your work, + then you'll need to sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate). + +Follow either of the two links above to access the appropriate CLA and +instructions for how to sign and return it. Once we receive it, we'll be able to +accept your pull requests. + +## Contributing A Patch + +1. Submit an issue describing your proposed change to the repo in question. +1. The repo owner will respond to your issue promptly. +1. If your proposed change is accepted, and you haven't already done so, sign a + Contributor License Agreement (see details above). +1. Fork the desired repo, develop and test your code changes. +1. Ensure that your code adheres to the existing style in the code to which + you are contributing. +1. Ensure that your code has an appropriate set of tests which all pass. +1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. +1. Submit a pull request. + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Cloud Dataplex API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + + +## Running the tests + +1. [Prepare your environment for Node.js setup][setup]. + +1. Install dependencies: + + npm install + +1. Run the tests: + + # Run unit tests. + npm test + + # Run sample integration tests. + npm run samples-test + + # Run all system tests. + npm run system-test + +1. Lint (and maybe fix) any changes: + + npm run fix + +[setup]: https://cloud.google.com/nodejs/docs/setup +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=dataplex.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-cloud-dataplex/LICENSE b/packages/google-cloud-dataplex/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/packages/google-cloud-dataplex/LICENSE @@ -0,0 +1,202 @@ + + 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/packages/google-cloud-dataplex/README.md b/packages/google-cloud-dataplex/README.md new file mode 100644 index 00000000000..b3a5710965b --- /dev/null +++ b/packages/google-cloud-dataplex/README.md @@ -0,0 +1,126 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [Cloud Dataplex: Node.js Client](https://github.com/googleapis/nodejs-dataplex) + +[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![npm version](https://img.shields.io/npm/v/@google-cloud/dataplex.svg)](https://www.npmjs.org/package/@google-cloud/dataplex) + + + + +dataplex client for Node.js + + +A comprehensive list of changes in each version may be found in +[the CHANGELOG](https://github.com/googleapis/nodejs-dataplex/blob/master/CHANGELOG.md). + +* [Cloud Dataplex Node.js Client API Reference][client-docs] +* [Cloud Dataplex Documentation][product-docs] +* [github.com/googleapis/nodejs-dataplex](https://github.com/googleapis/nodejs-dataplex) + +Read more about the client libraries for Cloud APIs, including the older +Google APIs Client Libraries, in [Client Libraries Explained][explained]. + +[explained]: https://cloud.google.com/apis/docs/client-libraries-explained + +**Table of contents:** + + +* [Quickstart](#quickstart) + * [Before you begin](#before-you-begin) + * [Installing the client library](#installing-the-client-library) + + +* [Versioning](#versioning) +* [Contributing](#contributing) +* [License](#license) + +## Quickstart + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Cloud Dataplex API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + +### Installing the client library + +```bash +npm install @google-cloud/dataplex +``` + + + + + +The [Cloud Dataplex Node.js Client API Reference][client-docs] documentation +also contains samples. + +## Supported Node.js Versions + +Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). +Libraries are compatible with all current _active_ and _maintenance_ versions of +Node.js. + +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. + +_Legacy Node.js versions are supported as a best effort:_ + +* Legacy versions will not be tested in continuous integration. +* Some security patches may not be able to be backported. +* Dependencies will not be kept up-to-date, and features will not be backported. + +#### Legacy tags available + +* `legacy-8`: install client libraries from this dist-tag for versions + compatible with Node.js 8. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + + + + +This library is considered to be in **beta**. This means it is expected to be +mostly stable while we work toward a general availability release; however, +complete stability is not guaranteed. We will address issues and requests +against beta libraries with a high priority. + + + + + +More Information: [Google Cloud Platform Launch Stages][launch_stages] + +[launch_stages]: https://cloud.google.com/terms/launch-stages + +## Contributing + +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-dataplex/blob/master/CONTRIBUTING.md). + +Please note that this `README.md`, the `samples/README.md`, +and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) +are generated from a central template. To edit one of these files, make an edit +to its templates in +[directory](https://github.com/googleapis/synthtool). + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com/googleapis/nodejs-dataplex/blob/master/LICENSE) + +[client-docs]: https://cloud.google.com/dataplex +[product-docs]: https://cloud.google.com/dataplex/ +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=dataplex.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started diff --git a/packages/google-cloud-dataplex/linkinator.config.json b/packages/google-cloud-dataplex/linkinator.config.json new file mode 100644 index 00000000000..befd23c8633 --- /dev/null +++ b/packages/google-cloud-dataplex/linkinator.config.json @@ -0,0 +1,16 @@ +{ + "recurse": true, + "skip": [ + "https://codecov.io/gh/googleapis/", + "www.googleapis.com", + "img.shields.io", + "https://console.cloud.google.com/cloudshell", + "https://support.google.com" + ], + "silent": true, + "concurrency": 5, + "retry": true, + "retryErrors": true, + "retryErrorsCount": 5, + "retryErrorsJitter": 3000 +} diff --git a/packages/google-cloud-dataplex/package.json b/packages/google-cloud-dataplex/package.json new file mode 100644 index 00000000000..8419c4bb6a9 --- /dev/null +++ b/packages/google-cloud-dataplex/package.json @@ -0,0 +1,64 @@ +{ + "name": "@google-cloud/dataplex", + "version": "0.1.0", + "description": "dataplex client for Node.js", + "repository": "googleapis/googleapis/nodejs-dataplex", + "license": "Apache-2.0", + "author": "Google LLC", + "main": "build/src/index.js", + "files": [ + "build/src", + "build/protos" + ], + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google dataplex", + "dataplex", + "dataplex service" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" + }, + "dependencies": { + "google-gax": "^2.12.0" + }, + "devDependencies": { + "@types/mocha": "^8.2.2", + "@types/node": "^14.14.44", + "@types/sinon": "^10.0.0", + "c8": "^7.7.2", + "gts": "^3.1.0", + "jsdoc": "^3.6.6", + "jsdoc-fresh": "^1.0.2", + "jsdoc-region-tag": "^1.0.6", + "linkinator": "^2.13.6", + "mocha": "^8.4.0", + "null-loader": "^4.0.1", + "pack-n-play": "^1.0.0-2", + "sinon": "^10.0.0", + "ts-loader": "^9.1.2", + "typescript": "^4.2.4", + "webpack": "^5.36.2", + "webpack-cli": "^4.7.0" + }, + "engines": { + "node": ">=v10.0.0" + } +} diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/logs.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/logs.proto new file mode 100644 index 00000000000..7539b35300b --- /dev/null +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/logs.proto @@ -0,0 +1,281 @@ +// Copyright 2022 Google LLC +// +// 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. + +syntax = "proto3"; + +package google.cloud.dataplex.v1; + +import "google/api/annotations.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/dataplex/v1;dataplex"; +option java_multiple_files = true; +option java_outer_classname = "LogsProto"; +option java_package = "com.google.cloud.dataplex.v1"; + +// The payload associated with Discovery data processing. +message DiscoveryEvent { + // The type of the event. + enum EventType { + // An unspecified event type. + EVENT_TYPE_UNSPECIFIED = 0; + + // An event representing discovery configuration in effect. + CONFIG = 1; + + // An event representing a metadata entity being created. + ENTITY_CREATED = 2; + + // An event representing a metadata entity being updated. + ENTITY_UPDATED = 3; + + // An event representing a metadata entity being deleted. + ENTITY_DELETED = 4; + + // An event representing a partition being created. + PARTITION_CREATED = 5; + + // An event representing a partition being updated. + PARTITION_UPDATED = 6; + + // An event representing a partition being deleted. + PARTITION_DELETED = 7; + } + + // The type of the entity. + enum EntityType { + // An unspecified event type. + ENTITY_TYPE_UNSPECIFIED = 0; + + // Entities representing structured data. + TABLE = 1; + + // Entities representing unstructured data. + FILESET = 2; + } + + // Details about configuration events. + message ConfigDetails { + // A list of discovery configuration parameters in effect. + // The keys are the field paths within DiscoverySpec. + // Eg. includePatterns, excludePatterns, csvOptions.disableTypeInference, + // etc. + map parameters = 1; + } + + // Details about the entity. + message EntityDetails { + // The name of the entity resource. + // The name is the fully-qualified resource name. + string entity = 1; + + // The type of the entity resource. + EntityType type = 2; + } + + // Details about the partition. + message PartitionDetails { + // The name to the partition resource. + // The name is the fully-qualified resource name. + string partition = 1; + + // The name to the containing entity resource. + // The name is the fully-qualified resource name. + string entity = 2; + + // The type of the containing entity resource. + EntityType type = 3; + } + + // Details about the action. + message ActionDetails { + // The type of action. + // Eg. IncompatibleDataSchema, InvalidDataFormat + string type = 1; + } + + // The log message. + string message = 1; + + // The id of the associated lake. + string lake_id = 2; + + // The id of the associated zone. + string zone_id = 3; + + // The id of the associated asset. + string asset_id = 4; + + // The data location associated with the event. + string data_location = 5; + + // The type of the event being logged. + EventType type = 10; + + // Additional details about the event. + oneof details { + // Details about discovery configuration in effect. + ConfigDetails config = 20; + + // Details about the entity associated with the event. + EntityDetails entity = 21; + + // Details about the partition associated with the event. + PartitionDetails partition = 22; + + // Details about the action associated with the event. + ActionDetails action = 23; + } +} + +// The payload associated with Job logs that contains events describing jobs +// that have run within a Lake. +message JobEvent { + // The type of the job. + enum Type { + // Unspecified job type. + TYPE_UNSPECIFIED = 0; + + // Spark jobs. + SPARK = 1; + + // Notebook jobs. + NOTEBOOK = 2; + } + + // The completion status of the job. + enum State { + // Unspecified job state. + STATE_UNSPECIFIED = 0; + + // Job successfully completed. + SUCCEEDED = 1; + + // Job was unsuccessful. + FAILED = 2; + + // Job was cancelled by the user. + CANCELLED = 3; + + // Job was cancelled or aborted via the service executing the job. + ABORTED = 4; + } + + // The service used to execute the job. + enum Service { + // Unspecified service. + SERVICE_UNSPECIFIED = 0; + + // Cloud Dataproc. + DATAPROC = 1; + } + + // The log message. + string message = 1; + + // The unique id identifying the job. + string job_id = 2; + + // The time when the job started running. + google.protobuf.Timestamp start_time = 3; + + // The time when the job ended running. + google.protobuf.Timestamp end_time = 4; + + // The job state on completion. + State state = 5; + + // The number of retries. + int32 retries = 6; + + // The type of the job. + Type type = 7; + + // The service used to execute the job. + Service service = 8; + + // The reference to the job within the service. + string service_job = 9; +} + +// These messages contain information about sessions within an environment. +// The monitored resource is 'Environment'. +message SessionEvent { + // The type of the event. + enum EventType { + // An unspecified event type. + EVENT_TYPE_UNSPECIFIED = 0; + + // Event for start of a session. + START = 1; + + // Event for stop of a session. + STOP = 2; + + // Query events in the session. + QUERY = 3; + } + + // Execution details of the query. + message QueryDetail { + // Query Execution engine. + enum Engine { + // An unspecified Engine type. + ENGINE_UNSPECIFIED = 0; + + // Spark-sql engine is specified in Query. + SPARK_SQL = 1; + + // BigQuery engine is specified in Query. + BIGQUERY = 2; + } + + // The unique Query id identifying the query. + string query_id = 1; + + // The query text executed. + string query_text = 2; + + // Query Execution engine. + Engine engine = 3; + + // Time taken for execution of the query. + google.protobuf.Duration duration = 4; + + // The size of results the query produced. + int64 result_size_bytes = 5; + + // The data processed by the query. + int64 data_processed_bytes = 6; + } + + // The log message. + string message = 1; + + // The information about the user that created the session. + string user_id = 2; + + // Unique identifier for the session. + string session_id = 3; + + // The type of the event. + EventType type = 4; + + // Additional information about the Query metadata. + oneof detail { + // The execution details of the query. + QueryDetail query = 5; + } +} diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/metadata.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/metadata.proto new file mode 100644 index 00000000000..5320013ecf3 --- /dev/null +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/metadata.proto @@ -0,0 +1,580 @@ +// Copyright 2022 Google LLC +// +// 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. + +syntax = "proto3"; + +package google.cloud.dataplex.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/dataplex/v1;dataplex"; +option java_multiple_files = true; +option java_outer_classname = "MetadataProto"; +option java_package = "com.google.cloud.dataplex.v1"; + +// Metadata service manages metadata resources such as tables, filesets and +// partitions. +service MetadataService { + option (google.api.default_host) = "dataplex.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Get a metadata entity. + rpc GetEntity(GetEntityRequest) returns (Entity) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List metadata entities in a zone. + rpc ListEntities(ListEntitiesRequest) returns (ListEntitiesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/entities" + }; + option (google.api.method_signature) = "parent"; + } + + // Get a metadata partition of an entity. + rpc GetPartition(GetPartitionRequest) returns (Partition) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*/partitions/**}" + }; + option (google.api.method_signature) = "name"; + } + + // List metadata partitions of an entity. + rpc ListPartitions(ListPartitionsRequest) returns (ListPartitionsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/entities/*}/partitions" + }; + option (google.api.method_signature) = "parent"; + } +} + +// List metadata entities request. +message ListEntitiesRequest { + // Entity views. + enum EntityView { + // The default unset value. The API will default to the FULL view. + ENTITY_VIEW_UNSPECIFIED = 0; + + // Only list table entities. + TABLES = 1; + + // Only list fileset entities. + FILESETS = 2; + } + + // Required. The resource name of the parent zone: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Zone" + } + ]; + + // Required. Specify the entity view to make a partial list request. + EntityView view = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Maximum number of entities to return. The service may return fewer than + // this value. If unspecified, at most 10 entities will be returned. The + // maximum value is 1000; values above 1000 are set to 1000. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListEntities` call. Provide + // this to retrieve the subsequent page. When paginating, all other parameters + // provided to `ListEntities` must match the call that provided the + // page token. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter request by name prefix. + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// List metadata entities response. +message ListEntitiesResponse { + // Entities in the specified parent zone. + repeated Entity entities = 1; + + // Token to retrieve the next page of results, or empty if there are no + // remaining results in the list. + string next_page_token = 2; +} + +// Get metadata entity request. +message GetEntityRequest { + // Entity views for get entity partial result. + enum EntityView { + // The API will default to the `BASIC` view. + ENTITY_VIEW_UNSPECIFIED = 0; + + // Minimal view that does not include the schema. + BASIC = 1; + + // Include basic information and schema. + SCHEMA = 2; + + // Include everything. + FULL = 4; + } + + // Required. The resource name of the entity: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Entity" + } + ]; + + // Optional. Used to select the subset of entity information to return. + // Defaults to `BASIC`. + EntityView view = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// List metadata partitions request. +message ListPartitionsRequest { + // Required. The resource name of the parent entity: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Entity" + } + ]; + + // Optional. Maximum number of partitions to return. The service may return fewer than + // this value. If unspecified, at most 10 partitions will be returned. The + // maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListPartitions` call. Provide + // this to retrieve the subsequent page. When paginating, all other parameters + // provided to `ListPartitions` must match the call that provided the + // page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter request. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// List metadata partitions response. +message ListPartitionsResponse { + // Partitions under the specified parent entity. + repeated Partition partitions = 1; + + // Token to retrieve the next page of results, or empty if there are no + // remaining results in the list. + string next_page_token = 2; +} + +// Get metadata partition request. +message GetPartitionRequest { + // Required. The resource name of the partition: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Partition" + } + ]; +} + +// Represents tables and fileset metadata contained within a zone. +message Entity { + option (google.api.resource) = { + type: "dataplex.googleapis.com/Entity" + pattern: "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}" + }; + + // The type of entity. + enum Type { + // Type unspecified. + TYPE_UNSPECIFIED = 0; + + // Structured and semi-structured data. + TABLE = 1; + + // Unstructured data. + FILESET = 2; + } + + // Provides compatibility information for various metadata stores. + message CompatibilityStatus { + // Provides compatibility information for a specific metadata store. + message Compatibility { + // Output only. Whether the entity is compatible and can be represented in the metadata + // store. + bool compatible = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Provides additional detail if the entity is incompatible with the + // metadata store. + string reason = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. Whether this entity is compatible with Hive Metastore. + Compatibility hive_metastore = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Whether this entity is compatible with BigQuery. + Compatibility bigquery = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. The resource name of the entity, of the form: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{id}`. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Entity" + } + ]; + + // Optional. User friendly display name. + string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User friendly longer description text. + string description = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The time when the entity was created. + google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the entity was last updated. + google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. A user-provided entity ID. It is mutable, and will be used as the + // published table name. Specifying a new ID in an update entity + // request will override the existing value. + string id = 7 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The etag for this entity. + // Required for update requests. It must match the server's etag. + string etag = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The type of entity. + Type type = 10 [(google.api.field_behavior) = REQUIRED]; + + // Required. The name of the asset associated with the storage location containing the + // entity data. + string asset = 11 [(google.api.field_behavior) = REQUIRED]; + + // Required. Immutable. The storage path of the entity data. + // For Cloud Storage data, this is the fully-qualified path to the entity, + // such as `gs://bucket/path/to/data`. For BigQuery data, this is the name of + // the table resource, such as + // `projects/project_id/datasets/dataset_id/tables/table_id`. + string data_path = 12 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. The set of items within the data path constituting the data in the entity, + // represented as a glob path. + // Example: `gs://bucket/path/to/data/**/*.csv`. + string data_path_pattern = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The name of the associated Data Catalog entry. + string catalog_entry = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Identifies the storage system of the entity data. + StorageSystem system = 15 [(google.api.field_behavior) = REQUIRED]; + + // Required. Identifies the storage format of the entity data. + // It does not apply to entities with data stored in BigQuery. + StorageFormat format = 16 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Metadata stores that the entity is compatible with. + CompatibilityStatus compatibility = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The description of the data structure and layout. + // The schema is not included in list responses. It is only included in + // `SCHEMA` and `FULL` entity views of a `GetEntity` response. + Schema schema = 50 [(google.api.field_behavior) = REQUIRED]; +} + +// Represents partition metadata contained within entity instances. +message Partition { + option (google.api.resource) = { + type: "dataplex.googleapis.com/Partition" + pattern: "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}" + }; + + // Output only. The resource name of the partition, of the form: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_id}`. + // {partition_id} is a generated unique ID. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Partition" + } + ]; + + // Required. Immutable. The set of values representing the partition, which correspond to the + // partition schema defined in the parent entity. + repeated string values = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Required. Immutable. The location of the entity data within the partition, for example, + // `gs://bucket/path/to/entity/key1=value1/key2=value2`. + string location = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. The etag for this partition. + // Required for update requests. It must match the server's etag. + string etag = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Schema information describing the structure and layout of the data. +message Schema { + // Type information for fields in schemas and partition schemas. + enum Type { + // SchemaType unspecified. + TYPE_UNSPECIFIED = 0; + + // Boolean field. + BOOLEAN = 1; + + // Single byte numeric field. + BYTE = 2; + + // 16-bit numeric field. + INT16 = 3; + + // 32-bit numeric field. + INT32 = 4; + + // 64-bit numeric field. + INT64 = 5; + + // Floating point numeric field. + FLOAT = 6; + + // Double precision numeric field. + DOUBLE = 7; + + // Real value numeric field. + DECIMAL = 8; + + // Sequence of characters field. + STRING = 9; + + // Sequence of bytes field. + BINARY = 10; + + // Date and time field. + TIMESTAMP = 11; + + // Date field. + DATE = 12; + + // Time field. + TIME = 13; + + // Structured field. Nested fields that define the structure of the map. + // If all nested fields are nullable, this field represents a union. + RECORD = 14; + + // Null field that does not have values. + NULL = 100; + } + + // Additional qualifiers to define field semantics. + enum Mode { + // Mode unspecified. + MODE_UNSPECIFIED = 0; + + // The field has required semantics. + REQUIRED = 1; + + // The field has optional semantics, and may be null. + NULLABLE = 2; + + // The field has repeated (0 or more) semantics, and is a list of values. + REPEATED = 3; + } + + // Represents a column field within a table schema. + message SchemaField { + // Required. The name of the field. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. User friendly field description. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The type of field. + Type type = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Additional field semantics. + Mode mode = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Any nested field for complex types. + repeated SchemaField fields = 10 [(google.api.field_behavior) = OPTIONAL]; + } + + // Represents a key field within the entity's partition structure. + message PartitionField { + // Required. The name of the field. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The type of field. + Type type = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // The structure of paths within the entity, which represent partitions. + enum PartitionStyle { + // PartitionStyle unspecified + PARTITION_STYLE_UNSPECIFIED = 0; + + // Partitions are hive-compatible. + // Examples: `gs://bucket/path/to/table/dt=2019-10-31/lang=en`, + // `gs://bucket/path/to/table/dt=2019-10-31/lang=en/late`. + HIVE_COMPATIBLE = 1; + } + + // Required. Whether the schema is user-managed or managed by the service. User-managed + // schemas are not automatically updated by discovery jobs. + bool user_managed = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The sequence of fields describing data in table entities. + repeated SchemaField fields = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The sequence of fields describing the partition structure in entities. + // If this field is empty, there are no partitions within the data. + repeated PartitionField partition_fields = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The structure of paths containing partition data within the entity. + PartitionStyle partition_style = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Describes the format of the data within its storage location. +message StorageFormat { + // Describes CSV and similar semi-structured data formats. + message CsvOptions { + // Optional. The character encoding of the data. The default is UTF-8. + string encoding = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of rows to interpret as header rows that should be skipped + // when reading data rows. + int32 header_rows = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The delimiter used to separate values. Defaults to ','. + string delimiter = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The character used to quote column values. Defaults to empty, + // implying unquoted data. + string quote = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Describes JSON data format. + message JsonOptions { + // Optional. The character encoding of the data. The default is UTF-8. + string encoding = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // The specific file format of the data. + enum Format { + // Format unspecified. + FORMAT_UNSPECIFIED = 0; + + // Parquet-formatted structured data. + PARQUET = 1; + + // Avro-formatted structured data. + AVRO = 2; + + // Orc-formatted structured data. + ORC = 3; + + // Csv-formatted semi-structured data. + CSV = 100; + + // Json-formatted semi-structured data. + JSON = 101; + + // Image data formats (such as jpg and png). + IMAGE = 200; + + // Audio data formats (such as mp3 and wav). + AUDIO = 201; + + // Video data formats (such as mp4 and mpg). + VIDEO = 202; + + // Textual data formats (such as txt and xml). + TEXT = 203; + + // TensorFlow record format. + TFRECORD = 204; + + // Data that doesn't match a specific format. + OTHER = 1000; + + // Data of an unknown format. + UNKNOWN = 1001; + } + + // The specific compressed file format of the data. + enum CompressionFormat { + // CompressionFormat unspecified. Implies uncompressed data. + COMPRESSION_FORMAT_UNSPECIFIED = 0; + + // GZip compressed set of files. + GZIP = 2; + + // BZip2 compressed set of files. + BZIP2 = 3; + } + + // Output only. The data format associated with the stored data, which represents + // content type values. + Format format = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The compression type associated with the stored data. + // If unspecified, the data is uncompressed. + CompressionFormat compression_format = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The mime type descriptor for the data. This field is valid for formats + // other than `UNKNOWN` and `MIXED`. + string mime_type = 3 [(google.api.field_behavior) = REQUIRED]; + + // Additional format-specific options. + oneof options { + // Optional. Additional information about CSV formatted data. + CsvOptions csv = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Additional information about CSV formatted data. + JsonOptions json = 11 [(google.api.field_behavior) = OPTIONAL]; + } +} + +// Identifies the cloud system that manages the data storage. +enum StorageSystem { + // Storage system unspecified. + STORAGE_SYSTEM_UNSPECIFIED = 0; + + // The entity data is contained within a Cloud Storage bucket. + CLOUD_STORAGE = 1; + + // The entity data is contained within a BigQuery dataset. + BIGQUERY = 2; +} diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/resources.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/resources.proto new file mode 100644 index 00000000000..5c71a9bb531 --- /dev/null +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/resources.proto @@ -0,0 +1,798 @@ +// Copyright 2022 Google LLC +// +// 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. + +syntax = "proto3"; + +package google.cloud.dataplex.v1; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/dataplex/v1;dataplex"; +option java_multiple_files = true; +option java_outer_classname = "ResourcesProto"; +option java_package = "com.google.cloud.dataplex.v1"; + +// A lake is a centralized repository for managing enterprise data across the +// organization distributed across many cloud projects, and stored in a variety +// of storage services such as Google Cloud Storage and BigQuery. The resources +// attached to a lake are referred to as managed resources. Data within these +// managed resources can be structured or unstructured. A lake provides data +// admins with tools to organize, secure and manage their data at scale, and +// provides data scientists and data engineers an integrated experience to +// easily search, discover, analyze and transform data and associated metadata. +message Lake { + option (google.api.resource) = { + type: "dataplex.googleapis.com/Lake" + pattern: "projects/{project}/locations/{location}/lakes/{lake}" + }; + + // Settings to manage association of Dataproc Metastore with a lake. + message Metastore { + // Optional. A relative reference to the Dataproc Metastore + // (https://cloud.google.com/dataproc-metastore/docs) service associated + // with the lake: + // `projects/{project_id}/locations/{location_id}/services/{service_id}` + string service = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // Status of Lake and Dataproc Metastore service instance association. + message MetastoreStatus { + // Current state of association. + enum State { + // Unspecified. + STATE_UNSPECIFIED = 0; + + // A Metastore service instance is not associated with the lake. + NONE = 1; + + // A Metastore service instance is attached to the lake. + READY = 2; + + // Attach/detach is in progress. + UPDATING = 3; + + // Attach/detach could not be done due to errors. + ERROR = 4; + } + + // Current state of association. + State state = 1; + + // Additional information about the current status. + string message = 2; + + // Last update time of the metastore status of the lake. + google.protobuf.Timestamp update_time = 3; + + // The URI of the endpoint used to access the Metastore service. + string endpoint = 4; + } + + // Output only. The relative resource name of the lake, of the form: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Lake" + } + ]; + + // Optional. User friendly display name. + string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. System generated globally unique ID for the lake. This ID will be + // different if the lake is deleted and re-created with the same name. + string uid = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the lake was created. + google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the lake was last updated. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. User-defined labels for the lake. + map labels = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Description of the lake. + string description = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Current state of the lake. + State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Service account associated with this lake. This service account must be + // authorized to access or operate on resources managed by the lake. + string service_account = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Settings to manage lake and Dataproc Metastore service instance + // association. + Metastore metastore = 102 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Aggregated status of the underlying assets of the lake. + AssetStatus asset_status = 103 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Metastore status of the lake. + MetastoreStatus metastore_status = 104 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Aggregated status of the underlying assets of a lake or zone. +message AssetStatus { + // Last update time of the status. + google.protobuf.Timestamp update_time = 1; + + // Number of active assets. + int32 active_assets = 2; + + // Number of assets that are in process of updating the security policy on + // attached resources. + int32 security_policy_applying_assets = 3; +} + +// A zone represents a logical group of related assets within a lake. A zone can +// be used to map to organizational structure or represent stages of data +// readiness from raw to curated. It provides managing behavior that is shared +// or inherited by all contained assets. +message Zone { + option (google.api.resource) = { + type: "dataplex.googleapis.com/Zone" + pattern: "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}" + }; + + // Type of zone. + enum Type { + // Zone type not specified. + TYPE_UNSPECIFIED = 0; + + // A zone that contains data that needs further processing before it is + // considered generally ready for consumption and analytics workloads. + RAW = 1; + + // A zone that contains data that is considered to be ready for broader + // consumption and analytics workloads. Curated structured data stored in + // Cloud Storage must conform to certain file formats (parquet, avro and + // orc) and organized in a hive-compatible directory layout. + CURATED = 2; + } + + // Settings for resources attached as assets within a zone. + message ResourceSpec { + // Location type of the resources attached to a zone. + enum LocationType { + // Unspecified location type. + LOCATION_TYPE_UNSPECIFIED = 0; + + // Resources that are associated with a single region. + SINGLE_REGION = 1; + + // Resources that are associated with a multi-region location. + MULTI_REGION = 2; + } + + // Required. Immutable. The location type of the resources that are allowed to be attached to the + // assets within this zone. + LocationType location_type = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + } + + // Settings to manage the metadata discovery and publishing in a zone. + message DiscoverySpec { + // Describe CSV and similar semi-structured data formats. + message CsvOptions { + // Optional. The number of rows to interpret as header rows that should be skipped + // when reading data rows. + int32 header_rows = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The delimiter being used to separate values. This defaults to ','. + string delimiter = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The character encoding of the data. The default is UTF-8. + string encoding = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether to disable the inference of data type for CSV data. + // If true, all columns will be registered as strings. + bool disable_type_inference = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Describe JSON data format. + message JsonOptions { + // Optional. The character encoding of the data. The default is UTF-8. + string encoding = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether to disable the inference of data type for Json data. + // If true, all columns will be registered as their primitive types + // (strings, number or boolean). + bool disable_type_inference = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. Whether discovery is enabled. + bool enabled = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The list of patterns to apply for selecting data to include during + // discovery if only a subset of the data should considered. For Cloud + // Storage bucket assets, these are interpreted as glob patterns used to + // match object names. For BigQuery dataset assets, these are + // interpreted as patterns to match table names. + repeated string include_patterns = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The list of patterns to apply for selecting data to exclude during + // discovery. For Cloud Storage bucket assets, these are interpreted as + // glob patterns used to match object names. For BigQuery dataset assets, + // these are interpreted as patterns to match table names. + repeated string exclude_patterns = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for CSV data. + CsvOptions csv_options = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for Json data. + JsonOptions json_options = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Determines when discovery is triggered. + oneof trigger { + // Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for running + // discovery periodically. Successive discovery runs must be scheduled at + // least 60 minutes apart. + // The default value is to run discovery every 60 minutes. + // To explicitly set a timezone to the cron tab, apply a prefix in the + // cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or TZ=${IANA_TIME_ZONE}". + // The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone + // database. For example, "CRON_TZ=America/New_York 1 * * * *", or + // "TZ=America/New_York 1 * * * *". + string schedule = 10 [(google.api.field_behavior) = OPTIONAL]; + } + } + + // Output only. The relative resource name of the zone, of the form: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}` + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Zone" + } + ]; + + // Optional. User friendly display name. + string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. System generated globally unique ID for the zone. This ID will be + // different if the zone is deleted and re-created with the same name. + string uid = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the zone was created. + google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the zone was last updated. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. User defined labels for the zone. + map labels = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Description of the zone. + string description = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Current state of the zone. + State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Immutable. The type of the zone. + Type type = 9 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. Specification of the discovery feature applied to data in this zone. + DiscoverySpec discovery_spec = 103 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Specification of the resources that are referenced by the assets within + // this zone. + ResourceSpec resource_spec = 104 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Aggregated status of the underlying assets of the zone. + AssetStatus asset_status = 105 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Action represents an issue requiring administrator action for resolution. +message Action { + option (google.api.resource) = { + type: "dataplex.googleapis.com/Action" + pattern: "projects/{project}/locations/{location}/lakes/{lake}/actions/{action}" + pattern: "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}" + pattern: "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}" + }; + + // The category of issues. + enum Category { + // Unspecified category. + CATEGORY_UNSPECIFIED = 0; + + // Resource management related issues. + RESOURCE_MANAGEMENT = 1; + + // Security policy related issues. + SECURITY_POLICY = 2; + + // Data and discovery related issues. + DATA_DISCOVERY = 3; + } + + // Action details for resource references in assets that cannot be located. + message MissingResource { + + } + + // Action details for unauthorized resource issues raised to indicate that the + // service account associated with the lake instance is not authorized to + // access or manage the resource associated with an asset. + message UnauthorizedResource { + + } + + // Failed to apply security policy to the managed resource(s) under a + // lake, zone or an asset. For a lake or zone resource, one or more underlying + // assets has a failure applying security policy to the associated managed + // resource. + message FailedSecurityPolicyApply { + // Resource name of one of the assets with failing security policy + // application. Populated for a lake or zone resource only. + string asset = 1; + } + + // Action details for invalid or unsupported data files detected by discovery. + message InvalidDataFormat { + // The list of data locations sampled and used for format/schema + // inference. + repeated string sampled_data_locations = 1; + + // The expected data format of the entity. + string expected_format = 2; + + // The new unexpected data format within the entity. + string new_format = 3; + } + + // Action details for incompatible schemas detected by discovery. + message IncompatibleDataSchema { + // Whether the action relates to a schema that is incompatible or modified. + enum SchemaChange { + // Schema change unspecified. + SCHEMA_CHANGE_UNSPECIFIED = 0; + + // Newly discovered schema is incompatible with existing schema. + INCOMPATIBLE = 1; + + // Newly discovered schema has changed from existing schema for data in a + // curated zone. + MODIFIED = 2; + } + + // The name of the table containing invalid data. + string table = 1; + + // The existing and expected schema of the table. The schema is provided as + // a JSON formatted structure listing columns and data types. + string existing_schema = 2; + + // The new and incompatible schema within the table. The schema is provided + // as a JSON formatted structured listing columns and data types. + string new_schema = 3; + + // The list of data locations sampled and used for format/schema + // inference. + repeated string sampled_data_locations = 4; + + // Whether the action relates to a schema that is incompatible or modified. + SchemaChange schema_change = 5; + } + + // Action details for invalid or unsupported partitions detected by discovery. + message InvalidDataPartition { + // The expected partition structure. + enum PartitionStructure { + // PartitionStructure unspecified. + PARTITION_STRUCTURE_UNSPECIFIED = 0; + + // Consistent hive-style partition definition (both raw and curated zone). + CONSISTENT_KEYS = 1; + + // Hive style partition definition (curated zone only). + HIVE_STYLE_KEYS = 2; + } + + // The issue type of InvalidDataPartition. + PartitionStructure expected_structure = 1; + } + + // Action details for absence of data detected by discovery. + message MissingData { + + } + + // Action details for invalid data arrangement. + message InvalidDataOrganization { + + } + + // The category of issue associated with the action. + Category category = 1; + + // Detailed description of the issue requiring action. + string issue = 2; + + // The time that the issue was detected. + google.protobuf.Timestamp detect_time = 4; + + // Output only. The relative resource name of the action, of the form: + // `projects/{project}/locations/{location}/lakes/{lake}/actions/{action}` + // `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}` + // `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}`. + string name = 5 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Action" + } + ]; + + // Output only. The relative resource name of the lake, of the form: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + string lake = 6 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Lake" + } + ]; + + // Output only. The relative resource name of the zone, of the form: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + string zone = 7 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Zone" + } + ]; + + // Output only. The relative resource name of the asset, of the form: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + string asset = 8 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Asset" + } + ]; + + // The list of data locations associated with this action. Cloud Storage + // locations are represented as URI paths(E.g. + // `gs://bucket/table1/year=2020/month=Jan/`). BigQuery locations refer to + // resource names(E.g. + // `bigquery.googleapis.com/projects/project-id/datasets/dataset-id`). + repeated string data_locations = 9; + + // Additional details about the action based on the action category. + oneof details { + // Details for issues related to invalid or unsupported data formats. + InvalidDataFormat invalid_data_format = 10; + + // Details for issues related to incompatible schemas detected within data. + IncompatibleDataSchema incompatible_data_schema = 11; + + // Details for issues related to invalid or unsupported data partition + // structure. + InvalidDataPartition invalid_data_partition = 12; + + // Details for issues related to absence of data within managed resources. + MissingData missing_data = 13; + + // Details for issues related to absence of a managed resource. + MissingResource missing_resource = 14; + + // Details for issues related to lack of permissions to access data + // resources. + UnauthorizedResource unauthorized_resource = 15; + + // Details for issues related to applying security policy. + FailedSecurityPolicyApply failed_security_policy_apply = 21; + + // Details for issues related to invalid data arrangement. + InvalidDataOrganization invalid_data_organization = 22; + } +} + +// An asset represents a cloud resource that is being managed within a lake as a +// member of a zone. +message Asset { + option (google.api.resource) = { + type: "dataplex.googleapis.com/Asset" + pattern: "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}" + }; + + // Security policy status of the asset. Data security policy, i.e., readers, + // writers & owners, should be specified in the lake/zone/asset IAM policy. + message SecurityStatus { + // The state of the security policy. + enum State { + // State unspecified. + STATE_UNSPECIFIED = 0; + + // Security policy has been successfully applied to the attached resource. + READY = 1; + + // Security policy is in the process of being applied to the attached + // resource. + APPLYING = 2; + + // Security policy could not be applied to the attached resource due to + // errors. + ERROR = 3; + } + + // The current state of the security policy applied to the attached + // resource. + State state = 1; + + // Additional information about the current state. + string message = 2; + + // Last update time of the status. + google.protobuf.Timestamp update_time = 3; + } + + // Settings to manage the metadata discovery and publishing for an asset. + message DiscoverySpec { + // Describe CSV and similar semi-structured data formats. + message CsvOptions { + // Optional. The number of rows to interpret as header rows that should be skipped + // when reading data rows. + int32 header_rows = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The delimiter being used to separate values. This defaults to ','. + string delimiter = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The character encoding of the data. The default is UTF-8. + string encoding = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether to disable the inference of data type for CSV data. + // If true, all columns will be registered as strings. + bool disable_type_inference = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Describe JSON data format. + message JsonOptions { + // Optional. The character encoding of the data. The default is UTF-8. + string encoding = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether to disable the inference of data type for Json data. + // If true, all columns will be registered as their primitive types + // (strings, number or boolean). + bool disable_type_inference = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. Whether discovery is enabled. + bool enabled = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The list of patterns to apply for selecting data to include during + // discovery if only a subset of the data should considered. For Cloud + // Storage bucket assets, these are interpreted as glob patterns used to + // match object names. For BigQuery dataset assets, these are interpreted as + // patterns to match table names. + repeated string include_patterns = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The list of patterns to apply for selecting data to exclude during + // discovery. For Cloud Storage bucket assets, these are interpreted as + // glob patterns used to match object names. For BigQuery dataset assets, + // these are interpreted as patterns to match table names. + repeated string exclude_patterns = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for CSV data. + CsvOptions csv_options = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for Json data. + JsonOptions json_options = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Determines when discovery is triggered. + oneof trigger { + // Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for running + // discovery periodically. Successive discovery runs must be scheduled at + // least 60 minutes apart. + // The default value is to run discovery every 60 minutes. + // To explicitly set a timezone to the cron tab, apply a prefix in the + // cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or TZ=${IANA_TIME_ZONE}". + // The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone + // database. For example, "CRON_TZ=America/New_York 1 * * * *", or + // "TZ=America/New_York 1 * * * *". + string schedule = 10 [(google.api.field_behavior) = OPTIONAL]; + } + } + + // Identifies the cloud resource that is referenced by this asset. + message ResourceSpec { + // Type of resource. + enum Type { + // Type not specified. + TYPE_UNSPECIFIED = 0; + + // Cloud Storage bucket. + STORAGE_BUCKET = 1; + + // BigQuery dataset. + BIGQUERY_DATASET = 2; + } + + // Immutable. Relative name of the cloud resource that contains the data that is + // being managed within a lake. For example: + // `projects/{project_number}/buckets/{bucket_id}` + // `projects/{project_number}/datasets/{dataset_id}` + // If the creation policy indicates ATTACH behavior, then an existing + // resource must be provided. + // If the policy indicates CREATE behavior, new resource will be created + // with the given name.However if it is empty, then the resource will be + // created using {asset_id}-{UUID} template for name. + // The location of the referenced resource must always match that of the + // asset. + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Required. Immutable. Type of resource. + Type type = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + } + + // Status of the resource referenced by an asset. + message ResourceStatus { + // The state of a resource. + enum State { + // State unspecified. + STATE_UNSPECIFIED = 0; + + // Resource does not have any errors. + READY = 1; + + // Resource has errors. + ERROR = 2; + } + + // The current state of the managed resource. + State state = 1; + + // Additional information about the current state. + string message = 2; + + // Last update time of the status. + google.protobuf.Timestamp update_time = 3; + } + + // Status of discovery for an asset. + message DiscoveryStatus { + // Current state of discovery. + enum State { + // State is unspecified. + STATE_UNSPECIFIED = 0; + + // Discovery for the asset is scheduled. + SCHEDULED = 1; + + // Discovery for the asset is running. + IN_PROGRESS = 2; + + // Discovery for the asset is currently paused (e.g. due to a lack + // of available resources). It will be automatically resumed. + PAUSED = 3; + + // Discovery for the asset is disabled. + DISABLED = 5; + } + + // The aggregated data statistics for the asset reported by discovery. + message Stats { + // The count of data items within the referenced resource. + int64 data_items = 1; + + // The number of stored data bytes within the referenced resource. + int64 data_size = 2; + + // The count of table entities within the referenced resource. + int64 tables = 3; + + // The count of fileset entities within the referenced resource. + int64 filesets = 4; + } + + // The current status of the discovery feature. + State state = 1; + + // Additional information about the current state. + string message = 2; + + // Last update time of the status. + google.protobuf.Timestamp update_time = 3; + + // The start time of the last discovery run. + google.protobuf.Timestamp last_run_time = 4; + + // Data Stats of the asset reported by discovery. + Stats stats = 6; + + // The duration of the last discovery run. + google.protobuf.Duration last_run_duration = 7; + } + + // Output only. The relative resource name of the asset, of the form: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Asset" + } + ]; + + // Optional. User friendly display name. + string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. System generated globally unique ID for the asset. This ID will be + // different if the asset is deleted and re-created with the same name. + string uid = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the asset was created. + google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the asset was last updated. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. User defined labels for the asset. + map labels = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Description of the asset. + string description = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Current state of the asset. + State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Specification of the resource that is referenced by this asset. + ResourceSpec resource_spec = 100 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Status of the resource referenced by this asset. + ResourceStatus resource_status = 101 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Status of the security policy applied to resource referenced by this asset. + SecurityStatus security_status = 103 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Specification of the discovery feature applied to data referenced by this + // asset. + // When this spec is left unset, the asset will use the spec set on the parent + // zone. + DiscoverySpec discovery_spec = 106 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Status of the discovery feature applied to data referenced by this asset. + DiscoveryStatus discovery_status = 107 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// State of a resource. +enum State { + // State is not specified. + STATE_UNSPECIFIED = 0; + + // Resource is active, i.e., ready to use. + ACTIVE = 1; + + // Resource is under creation. + CREATING = 2; + + // Resource is under deletion. + DELETING = 3; + + // Resource is active but has unresolved actions. + ACTION_REQUIRED = 4; +} diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/service.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/service.proto new file mode 100644 index 00000000000..401cb9a8332 --- /dev/null +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/service.proto @@ -0,0 +1,897 @@ +// Copyright 2022 Google LLC +// +// 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. + +syntax = "proto3"; + +package google.cloud.dataplex.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/dataplex/v1/resources.proto"; +import "google/cloud/dataplex/v1/tasks.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/dataplex/v1;dataplex"; +option java_multiple_files = true; +option java_outer_classname = "ServiceProto"; +option java_package = "com.google.cloud.dataplex.v1"; + +// Dataplex service provides data lakes as a service. The primary resources +// offered by this service are Lakes, Zones and Assets which collectively allow +// a data adminstrator to organize, manage, secure and catalog data across their +// organization located across cloud projects in a variety of storage systems +// including Cloud Storage and BigQuery. +service DataplexService { + option (google.api.default_host) = "dataplex.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a lake resource. + rpc CreateLake(CreateLakeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/lakes" + body: "lake" + }; + option (google.api.method_signature) = "parent,lake,lake_id"; + option (google.longrunning.operation_info) = { + response_type: "Lake" + metadata_type: "OperationMetadata" + }; + } + + // Updates a lake resource. + rpc UpdateLake(UpdateLakeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{lake.name=projects/*/locations/*/lakes/*}" + body: "lake" + }; + option (google.api.method_signature) = "lake,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Lake" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a lake resource. All zones within the lake must be deleted before + // the lake can be deleted. + rpc DeleteLake(DeleteLakeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/lakes/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists lake resources in a project and location. + rpc ListLakes(ListLakesRequest) returns (ListLakesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/lakes" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves a lake resource. + rpc GetLake(GetLakeRequest) returns (Lake) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/lakes/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists action resources in a lake. + rpc ListLakeActions(ListLakeActionsRequest) returns (ListActionsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/lakes/*}/actions" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a zone resource within a lake. + rpc CreateZone(CreateZoneRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/lakes/*}/zones" + body: "zone" + }; + option (google.api.method_signature) = "parent,zone,zone_id"; + option (google.longrunning.operation_info) = { + response_type: "Zone" + metadata_type: "OperationMetadata" + }; + } + + // Updates a zone resource. + rpc UpdateZone(UpdateZoneRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{zone.name=projects/*/locations/*/lakes/*/zones/*}" + body: "zone" + }; + option (google.api.method_signature) = "zone,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Zone" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a zone resource. All assets within a zone must be deleted before + // the zone can be deleted. + rpc DeleteZone(DeleteZoneRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/lakes/*/zones/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists zone resources in a lake. + rpc ListZones(ListZonesRequest) returns (ListZonesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/lakes/*}/zones" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves a zone resource. + rpc GetZone(GetZoneRequest) returns (Zone) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/lakes/*/zones/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists action resources in a zone. + rpc ListZoneActions(ListZoneActionsRequest) returns (ListActionsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/actions" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates an asset resource. + rpc CreateAsset(CreateAssetRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets" + body: "asset" + }; + option (google.api.method_signature) = "parent,asset,asset_id"; + option (google.longrunning.operation_info) = { + response_type: "Asset" + metadata_type: "OperationMetadata" + }; + } + + // Updates an asset resource. + rpc UpdateAsset(UpdateAssetRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{asset.name=projects/*/locations/*/lakes/*/zones/*/assets/*}" + body: "asset" + }; + option (google.api.method_signature) = "asset,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Asset" + metadata_type: "OperationMetadata" + }; + } + + // Deletes an asset resource. The referenced storage resource is detached + // (default) or deleted based on the associated Lifecycle policy. + rpc DeleteAsset(DeleteAssetRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists asset resources in a zone. + rpc ListAssets(ListAssetsRequest) returns (ListAssetsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves an asset resource. + rpc GetAsset(GetAssetRequest) returns (Asset) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists action resources in an asset. + rpc ListAssetActions(ListAssetActionsRequest) returns (ListActionsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/assets/*}/actions" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a task resource within a lake. + rpc CreateTask(CreateTaskRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/lakes/*}/tasks" + body: "task" + }; + option (google.api.method_signature) = "parent,task,task_id"; + option (google.longrunning.operation_info) = { + response_type: "Task" + metadata_type: "OperationMetadata" + }; + } + + // Update the task resource. + rpc UpdateTask(UpdateTaskRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{task.name=projects/*/locations/*/lakes/*/tasks/*}" + body: "task" + }; + option (google.api.method_signature) = "task,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Task" + metadata_type: "OperationMetadata" + }; + } + + // Delete the task resource. + rpc DeleteTask(DeleteTaskRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists tasks under the given lake. + rpc ListTasks(ListTasksRequest) returns (ListTasksResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/lakes/*}/tasks" + }; + option (google.api.method_signature) = "parent"; + } + + // Get task resource. + rpc GetTask(GetTaskRequest) returns (Task) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists Jobs under the given task. + rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/lakes/*/tasks/*}/jobs" + }; + option (google.api.method_signature) = "parent"; + } + + // Get job resource. + rpc GetJob(GetJobRequest) returns (Job) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Cancel jobs running for the task resource. + rpc CancelJob(CancelJobRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}:cancel" + body: "*" + }; + option (google.api.method_signature) = "name"; + } +} + +// Create lake request. +message CreateLakeRequest { + // Required. The resource name of the lake location, of the form: + // `projects/{project_number}/locations/{location_id}` + // where `location_id` refers to a GCP region. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. Lake identifier. + // This ID will be used to generate names such as database and dataset names + // when publishing metadata to Hive Metastore and BigQuery. + // * Must contain only lowercase letters, numbers and hyphens. + // * Must start with a letter. + // * Must end with a number or a letter. + // * Must be between 1-63 characters. + // * Must be unique within the customer project / location. + string lake_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Lake resource + Lake lake = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Update lake request. +message UpdateLakeRequest { + // Required. Mask of fields to update. + google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Update description. + // Only fields specified in `update_mask` are updated. + Lake lake = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Delete lake request. +message DeleteLakeRequest { + // Required. The resource name of the lake: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Lake" + } + ]; +} + +// List lakes request. +message ListLakesRequest { + // Required. The resource name of the lake location, of the form: + // `projects/{project_number}/locations/{location_id}` + // where `location_id` refers to a GCP region. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. Maximum number of Lakes to return. The service may return fewer than this + // value. If unspecified, at most 10 lakes will be returned. The maximum + // value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListLakes` call. Provide this to + // retrieve the subsequent page. When paginating, all other parameters + // provided to `ListLakes` must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter request. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Order by fields for the result. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// List lakes response. +message ListLakesResponse { + // Lakes under the given parent location. + repeated Lake lakes = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable_locations = 3; +} + +// List lake actions request. +message ListLakeActionsRequest { + // Required. The resource name of the parent lake: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Lake" + } + ]; + + // Optional. Maximum number of actions to return. The service may return fewer than this + // value. If unspecified, at most 10 actions will be returned. The maximum + // value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListLakeActions` call. Provide this to + // retrieve the subsequent page. When paginating, all other parameters + // provided to `ListLakeActions` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// List actions response. +message ListActionsResponse { + // Actions under the given parent lake/zone/asset. + repeated Action actions = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// Get lake request. +message GetLakeRequest { + // Required. The resource name of the lake: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Lake" + } + ]; +} + +// Create zone request. +message CreateZoneRequest { + // Required. The resource name of the parent lake: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Lake" + } + ]; + + // Required. Zone identifier. + // This ID will be used to generate names such as database and dataset names + // when publishing metadata to Hive Metastore and BigQuery. + // * Must contain only lowercase letters, numbers and hyphens. + // * Must start with a letter. + // * Must end with a number or a letter. + // * Must be between 1-63 characters. + // * Must be unique across all lakes from all locations in a project. + // * Must not be one of the reserved IDs (i.e. "default", "global-temp") + string zone_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Zone resource. + Zone zone = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Update zone request. +message UpdateZoneRequest { + // Required. Mask of fields to update. + google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Update description. + // Only fields specified in `update_mask` are updated. + Zone zone = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Delete zone request. +message DeleteZoneRequest { + // Required. The resource name of the zone: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Zone" + } + ]; +} + +// List zones request. +message ListZonesRequest { + // Required. The resource name of the parent lake: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Lake" + } + ]; + + // Optional. Maximum number of zones to return. The service may return fewer than this + // value. If unspecified, at most 10 zones will be returned. The maximum + // value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListZones` call. Provide this to + // retrieve the subsequent page. When paginating, all other parameters + // provided to `ListZones` must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter request. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Order by fields for the result. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// List zones response. +message ListZonesResponse { + // Zones under the given parent lake. + repeated Zone zones = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// List zone actions request. +message ListZoneActionsRequest { + // Required. The resource name of the parent zone: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Zone" + } + ]; + + // Optional. Maximum number of actions to return. The service may return fewer than this + // value. If unspecified, at most 10 actions will be returned. The maximum + // value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListZoneActions` call. Provide this to + // retrieve the subsequent page. When paginating, all other parameters + // provided to `ListZoneActions` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Get zone request. +message GetZoneRequest { + // Required. The resource name of the zone: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Zone" + } + ]; +} + +// Create asset request. +message CreateAssetRequest { + // Required. The resource name of the parent zone: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Zone" + } + ]; + + // Required. Asset identifier. + // This ID will be used to generate names such as table names when publishing + // metadata to Hive Metastore and BigQuery. + // * Must contain only lowercase letters, numbers and hyphens. + // * Must start with a letter. + // * Must end with a number or a letter. + // * Must be between 1-63 characters. + // * Must be unique within the zone. + string asset_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Asset resource. + Asset asset = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Update asset request. +message UpdateAssetRequest { + // Required. Mask of fields to update. + google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Update description. + // Only fields specified in `update_mask` are updated. + Asset asset = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Delete asset request. +message DeleteAssetRequest { + // Required. The resource name of the asset: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Asset" + } + ]; +} + +// List assets request. +message ListAssetsRequest { + // Required. The resource name of the parent zone: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Zone" + } + ]; + + // Optional. Maximum number of asset to return. The service may return fewer than + // this value. If unspecified, at most 10 assets will be returned. The + // maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListAssets` call. Provide this to + // retrieve the subsequent page. When paginating, all other parameters + // provided to `ListAssets` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter request. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Order by fields for the result. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// List assets response. +message ListAssetsResponse { + // Asset under the given parent zone. + repeated Asset assets = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// List asset actions request. +message ListAssetActionsRequest { + // Required. The resource name of the parent asset: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Asset" + } + ]; + + // Optional. Maximum number of actions to return. The service may return fewer than this + // value. If unspecified, at most 10 actions will be returned. The maximum + // value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListAssetActions` call. Provide this + // to retrieve the subsequent page. When paginating, all other parameters + // provided to `ListAssetActions` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Get asset request. +message GetAssetRequest { + // Required. The resource name of the asset: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Asset" + } + ]; +} + +// Represents the metadata of a long-running operation. +message OperationMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the user has requested cancellation + // of the operation. Operations that have successfully been cancelled + // have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + // corresponding to `Code.CANCELLED`. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Create task request. +message CreateTaskRequest { + // Required. The resource name of the parent lake: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Lake" + } + ]; + + // Required. Task identifier. + string task_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Task resource. + Task task = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Update task request. +message UpdateTaskRequest { + // Required. Mask of fields to update. + google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Update description. + // Only fields specified in `update_mask` are updated. + Task task = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Delete task request. +message DeleteTaskRequest { + // Required. The resource name of the task: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Task" + } + ]; +} + +// List tasks request. +message ListTasksRequest { + // Required. The resource name of the parent lake: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Lake" + } + ]; + + // Optional. Maximum number of tasks to return. The service may return fewer than this + // value. If unspecified, at most 10 tasks will be returned. The maximum + // value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListZones` call. Provide this to + // retrieve the subsequent page. When paginating, all other parameters + // provided to `ListZones` must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter request. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Order by fields for the result. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// List tasks response. +message ListTasksResponse { + // Tasks under the given parent lake. + repeated Task tasks = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable_locations = 3; +} + +// Get task request. +message GetTaskRequest { + // Required. The resource name of the task: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Task" + } + ]; +} + +// Get job request. +message GetJobRequest { + // Required. The resource name of the job: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Job" + } + ]; +} + +// List jobs request. +message ListJobsRequest { + // Required. The resource name of the parent environment: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Task" + } + ]; + + // Optional. Maximum number of jobs to return. The service may return fewer than + // this value. If unspecified, at most 10 jobs will be returned. The + // maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListJobs` call. Provide this to + // retrieve the subsequent page. When paginating, all other parameters + // provided to `ListJobs` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// List jobs response. +message ListJobsResponse { + // Jobs under a given task. + repeated Job jobs = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// Cancel task jobs. +message CancelJobRequest { + // Required. The resource name of the job: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Job" + } + ]; +} diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/tasks.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/tasks.proto new file mode 100644 index 00000000000..c716944c65f --- /dev/null +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/tasks.proto @@ -0,0 +1,344 @@ +// Copyright 2022 Google LLC +// +// 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. + +syntax = "proto3"; + +package google.cloud.dataplex.v1; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/dataplex/v1/resources.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/dataplex/v1;dataplex"; +option java_multiple_files = true; +option java_outer_classname = "TasksProto"; +option java_package = "com.google.cloud.dataplex.v1"; + +// A task represents a user-visible job. +message Task { + option (google.api.resource) = { + type: "dataplex.googleapis.com/Task" + pattern: "projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}" + }; + + // Configuration for the underlying infrastructure used to run workloads. + message InfrastructureSpec { + // Batch compute resources associated with the task. + message BatchComputeResources { + // Optional. Total number of job executors. + int32 executors_count = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Max configurable executors. + // If max_executors_count > executors_count, then auto-scaling is enabled. + int32 max_executors_count = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Container Image Runtime Configuration used with Batch execution. + message ContainerImageRuntime { + // Optional. A list of Java JARS to add to the classpath. + // Valid input includes Cloud Storage URIs to Jar binaries. + // For example, `gs://bucket-name/my/path/to/file.jar`. + repeated string java_jars = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of python packages to be installed. + // Valid formats include Cloud Storage URI to a PIP installable library. + // For example, `gs://bucket-name/my/path/to/lib.tar.gz`. + repeated string python_packages = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Override to common configuration of open source components installed on + // the Dataproc cluster. + // The properties to set on daemon config files. + // Property keys are specified in `prefix:property` format, for example + // `core:hadoop.tmp.dir`. + // For more information, see [Cluster + // properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties). + map properties = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Cloud VPC Network used to run the infrastructure. + message VpcNetwork { + // The Cloud VPC network identifier. + oneof network_name { + // Optional. The Cloud VPC network in which the job is run. By default, the Cloud + // VPC network named Default within the project is used. + string network = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Cloud VPC sub-network in which the job is run. + string sub_network = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. List of network tags to apply to the job. + repeated string network_tags = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Hardware config. + oneof resources { + // Compute resources needed for a Task when using Dataproc Serverless. + BatchComputeResources batch = 52; + } + + // Software config. + oneof runtime { + // Container Image Runtime Configuration. + ContainerImageRuntime container_image = 101; + } + + // Networking config. + oneof network { + // Vpc network. + VpcNetwork vpc_network = 150; + } + } + + // Task scheduling and trigger settings. + message TriggerSpec { + // Determines how often and when the job will run. + enum Type { + // Unspecified trigger type. + TYPE_UNSPECIFIED = 0; + + // The task runs one-time shortly after Task Creation. + ON_DEMAND = 1; + + // The task is scheduled to run periodically. + RECURRING = 2; + } + + // Required. Immutable. Trigger type of the user-specified Task. + Type type = 5 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. The first run of the task will be after this time. + // If not specified, the task will run shortly after being submitted if + // ON_DEMAND and based on the schedule if RECURRING. + google.protobuf.Timestamp start_time = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Prevent the task from executing. + // This does not cancel already running tasks. It is intended to temporarily + // disable RECURRING tasks. + bool disabled = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Number of retry attempts before aborting. + // Set to zero to never attempt to retry a failed task. + int32 max_retries = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Trigger only applies for `RECURRING` tasks. + oneof trigger { + // Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for running + // tasks periodically. + // To explicitly set a timezone to the cron tab, apply a prefix in the + // cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or "TZ=${IANA_TIME_ZONE}". + // The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone + // database. For example, "CRON_TZ=America/New_York 1 * * * *", or + // "TZ=America/New_York 1 * * * *". + // This field is required for RECURRING tasks. + string schedule = 100 [(google.api.field_behavior) = OPTIONAL]; + } + } + + // Execution related settings, like retry and service_account. + message ExecutionSpec { + // Optional. The arguments to pass to the task. + // The args can use placeholders of the format ${placeholder} as + // part of key/value string. These will be interpolated before passing the + // args to the driver. Currently supported placeholders: + // - ${task_id} + // - ${job_time} + // To pass positional args, set the key as TASK_ARGS. The value should be a + // comma-separated string of all the positional arguments. To use a + // delimiter other than comma, refer to + // https://cloud.google.com/sdk/gcloud/reference/topic/escaping. In case of + // other keys being present in the args, then TASK_ARGS will be passed as + // the last argument. + map args = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Service account to use to execute a task. + // If not provided, the default Compute service account for the project is + // used. + string service_account = 5 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The maximum duration after which the job execution is expired. + google.protobuf.Duration max_job_execution_lifetime = 8 [(google.api.field_behavior) = OPTIONAL]; + } + + // User-specified config for running a Spark task. + message SparkTaskConfig { + // Required. The specification of the main method to call to drive the + // job. Specify either the jar file that contains the main class or the + // main class name. + oneof driver { + // The Cloud Storage URI of the jar file that contains the main class. + // The execution args are passed in as a sequence of named process + // arguments (`--key=value`). + string main_jar_file_uri = 100; + + // The name of the driver's main class. The jar file that contains the + // class must be in the default CLASSPATH or specified in + // `jar_file_uris`. + // The execution args are passed in as a sequence of named process + // arguments (`--key=value`). + string main_class = 101; + + // The Gcloud Storage URI of the main Python file to use as the driver. + // Must be a .py file. The execution args are passed in as a sequence of + // named process arguments (`--key=value`). + string python_script_file = 102; + + // A reference to a query file. This can be the Cloud Storage URI of the + // query file or it can the path to a SqlScript Content. The execution + // args are used to declare a set of script variables + // (`set key="value";`). + string sql_script_file = 104; + + // The query text. + // The execution args are used to declare a set of script variables + // (`set key="value";`). + string sql_script = 105; + } + + // Optional. Cloud Storage URIs of files to be placed in the working directory of each + // executor. + repeated string file_uris = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Cloud Storage URIs of archives to be extracted into the working directory + // of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and + // .zip. + repeated string archive_uris = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Infrastructure specification for the execution. + InfrastructureSpec infrastructure_spec = 6 [(google.api.field_behavior) = OPTIONAL]; + } + + // Output only. The relative resource name of the task, of the form: + // projects/{project_number}/locations/{location_id}/lakes/{lake_id}/ + // tasks/{task_id}. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Task" + } + ]; + + // Output only. System generated globally unique ID for the task. This ID will be + // different if the task is deleted and re-created with the same name. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the task was created. + google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the task was last updated. + google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Description of the task. + string description = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User friendly display name. + string display_name = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Current state of the task. + State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. User-defined labels for the task. + map labels = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Spec related to how often and when a task should be triggered. + TriggerSpec trigger_spec = 100 [(google.api.field_behavior) = REQUIRED]; + + // Required. Spec related to how a task is executed. + ExecutionSpec execution_spec = 101 [(google.api.field_behavior) = REQUIRED]; + + // Task template specific user-specified config. + oneof config { + // Config related to running custom Spark tasks. + SparkTaskConfig spark = 300; + } +} + +// A job represents an instance of a task. +message Job { + option (google.api.resource) = { + type: "dataplex.googleapis.com/Job" + pattern: "projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}" + }; + + enum Service { + // Service used to run the job is unspecified. + SERVICE_UNSPECIFIED = 0; + + // Dataproc service is used to run this job. + DATAPROC = 1; + } + + enum State { + // The job state is unknown. + STATE_UNSPECIFIED = 0; + + // The job is running. + RUNNING = 1; + + // The job is cancelling. + CANCELLING = 2; + + // The job cancellation was successful. + CANCELLED = 3; + + // The job completed successfully. + SUCCEEDED = 4; + + // The job is no longer running due to an error. + FAILED = 5; + + // The job was cancelled outside of Dataplex. + ABORTED = 6; + } + + // Output only. The relative resource name of the job, of the form: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Job" + } + ]; + + // Output only. System generated globally unique ID for the job. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the job was started. + google.protobuf.Timestamp start_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the job ended. + google.protobuf.Timestamp end_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Execution state for the job. + State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of times the job has been retried (excluding the + // initial attempt). + uint32 retry_count = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The underlying service running a job. + Service service = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The full resource name for the job run under a particular service. + string service_job = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information about the current state. + string message = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-cloud-dataplex/protos/protos.d.ts b/packages/google-cloud-dataplex/protos/protos.d.ts new file mode 100644 index 00000000000..e8042eff9e4 --- /dev/null +++ b/packages/google-cloud-dataplex/protos/protos.d.ts @@ -0,0 +1,16206 @@ +// Copyright 2022 Google LLC +// +// 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. + +import * as Long from "long"; +import {protobuf as $protobuf} from "google-gax"; +/** Namespace google. */ +export namespace google { + + /** Namespace cloud. */ + namespace cloud { + + /** Namespace dataplex. */ + namespace dataplex { + + /** Namespace v1. */ + namespace v1 { + + /** Properties of a DiscoveryEvent. */ + interface IDiscoveryEvent { + + /** DiscoveryEvent message */ + message?: (string|null); + + /** DiscoveryEvent lakeId */ + lakeId?: (string|null); + + /** DiscoveryEvent zoneId */ + zoneId?: (string|null); + + /** DiscoveryEvent assetId */ + assetId?: (string|null); + + /** DiscoveryEvent dataLocation */ + dataLocation?: (string|null); + + /** DiscoveryEvent type */ + type?: (google.cloud.dataplex.v1.DiscoveryEvent.EventType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EventType|null); + + /** DiscoveryEvent config */ + config?: (google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null); + + /** DiscoveryEvent entity */ + entity?: (google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null); + + /** DiscoveryEvent partition */ + partition?: (google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null); + + /** DiscoveryEvent action */ + action?: (google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null); + } + + /** Represents a DiscoveryEvent. */ + class DiscoveryEvent implements IDiscoveryEvent { + + /** + * Constructs a new DiscoveryEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDiscoveryEvent); + + /** DiscoveryEvent message. */ + public message: string; + + /** DiscoveryEvent lakeId. */ + public lakeId: string; + + /** DiscoveryEvent zoneId. */ + public zoneId: string; + + /** DiscoveryEvent assetId. */ + public assetId: string; + + /** DiscoveryEvent dataLocation. */ + public dataLocation: string; + + /** DiscoveryEvent type. */ + public type: (google.cloud.dataplex.v1.DiscoveryEvent.EventType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EventType); + + /** DiscoveryEvent config. */ + public config?: (google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null); + + /** DiscoveryEvent entity. */ + public entity?: (google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null); + + /** DiscoveryEvent partition. */ + public partition?: (google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null); + + /** DiscoveryEvent action. */ + public action?: (google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null); + + /** DiscoveryEvent details. */ + public details?: ("config"|"entity"|"partition"|"action"); + + /** + * Creates a new DiscoveryEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoveryEvent instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDiscoveryEvent): google.cloud.dataplex.v1.DiscoveryEvent; + + /** + * Encodes the specified DiscoveryEvent message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. + * @param message DiscoveryEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDiscoveryEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoveryEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. + * @param message DiscoveryEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDiscoveryEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoveryEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoveryEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DiscoveryEvent; + + /** + * Decodes a DiscoveryEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoveryEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DiscoveryEvent; + + /** + * Verifies a DiscoveryEvent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiscoveryEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoveryEvent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent; + + /** + * Creates a plain object from a DiscoveryEvent message. Also converts values to other types if specified. + * @param message DiscoveryEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoveryEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DiscoveryEvent { + + /** EventType enum. */ + enum EventType { + EVENT_TYPE_UNSPECIFIED = 0, + CONFIG = 1, + ENTITY_CREATED = 2, + ENTITY_UPDATED = 3, + ENTITY_DELETED = 4, + PARTITION_CREATED = 5, + PARTITION_UPDATED = 6, + PARTITION_DELETED = 7 + } + + /** EntityType enum. */ + enum EntityType { + ENTITY_TYPE_UNSPECIFIED = 0, + TABLE = 1, + FILESET = 2 + } + + /** Properties of a ConfigDetails. */ + interface IConfigDetails { + + /** ConfigDetails parameters */ + parameters?: ({ [k: string]: string }|null); + } + + /** Represents a ConfigDetails. */ + class ConfigDetails implements IConfigDetails { + + /** + * Constructs a new ConfigDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails); + + /** ConfigDetails parameters. */ + public parameters: { [k: string]: string }; + + /** + * Creates a new ConfigDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns ConfigDetails instance + */ + public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails): google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails; + + /** + * Encodes the specified ConfigDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. + * @param message ConfigDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConfigDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. + * @param message ConfigDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConfigDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConfigDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails; + + /** + * Decodes a ConfigDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConfigDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails; + + /** + * Verifies a ConfigDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConfigDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConfigDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails; + + /** + * Creates a plain object from a ConfigDetails message. Also converts values to other types if specified. + * @param message ConfigDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConfigDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EntityDetails. */ + interface IEntityDetails { + + /** EntityDetails entity */ + entity?: (string|null); + + /** EntityDetails type */ + type?: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null); + } + + /** Represents an EntityDetails. */ + class EntityDetails implements IEntityDetails { + + /** + * Constructs a new EntityDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails); + + /** EntityDetails entity. */ + public entity: string; + + /** EntityDetails type. */ + public type: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType); + + /** + * Creates a new EntityDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns EntityDetails instance + */ + public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails): google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails; + + /** + * Encodes the specified EntityDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. + * @param message EntityDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EntityDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. + * @param message EntityDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EntityDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EntityDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails; + + /** + * Decodes an EntityDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EntityDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails; + + /** + * Verifies an EntityDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EntityDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EntityDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails; + + /** + * Creates a plain object from an EntityDetails message. Also converts values to other types if specified. + * @param message EntityDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EntityDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PartitionDetails. */ + interface IPartitionDetails { + + /** PartitionDetails partition */ + partition?: (string|null); + + /** PartitionDetails entity */ + entity?: (string|null); + + /** PartitionDetails type */ + type?: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null); + } + + /** Represents a PartitionDetails. */ + class PartitionDetails implements IPartitionDetails { + + /** + * Constructs a new PartitionDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails); + + /** PartitionDetails partition. */ + public partition: string; + + /** PartitionDetails entity. */ + public entity: string; + + /** PartitionDetails type. */ + public type: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType); + + /** + * Creates a new PartitionDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns PartitionDetails instance + */ + public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails): google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails; + + /** + * Encodes the specified PartitionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. + * @param message PartitionDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PartitionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. + * @param message PartitionDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PartitionDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PartitionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails; + + /** + * Decodes a PartitionDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PartitionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails; + + /** + * Verifies a PartitionDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PartitionDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PartitionDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails; + + /** + * Creates a plain object from a PartitionDetails message. Also converts values to other types if specified. + * @param message PartitionDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PartitionDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an ActionDetails. */ + interface IActionDetails { + + /** ActionDetails type */ + type?: (string|null); + } + + /** Represents an ActionDetails. */ + class ActionDetails implements IActionDetails { + + /** + * Constructs a new ActionDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails); + + /** ActionDetails type. */ + public type: string; + + /** + * Creates a new ActionDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns ActionDetails instance + */ + public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails): google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails; + + /** + * Encodes the specified ActionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. + * @param message ActionDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ActionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. + * @param message ActionDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ActionDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ActionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails; + + /** + * Decodes an ActionDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ActionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails; + + /** + * Verifies an ActionDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ActionDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ActionDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails; + + /** + * Creates a plain object from an ActionDetails message. Also converts values to other types if specified. + * @param message ActionDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ActionDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a JobEvent. */ + interface IJobEvent { + + /** JobEvent message */ + message?: (string|null); + + /** JobEvent jobId */ + jobId?: (string|null); + + /** JobEvent startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** JobEvent endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** JobEvent state */ + state?: (google.cloud.dataplex.v1.JobEvent.State|keyof typeof google.cloud.dataplex.v1.JobEvent.State|null); + + /** JobEvent retries */ + retries?: (number|null); + + /** JobEvent type */ + type?: (google.cloud.dataplex.v1.JobEvent.Type|keyof typeof google.cloud.dataplex.v1.JobEvent.Type|null); + + /** JobEvent service */ + service?: (google.cloud.dataplex.v1.JobEvent.Service|keyof typeof google.cloud.dataplex.v1.JobEvent.Service|null); + + /** JobEvent serviceJob */ + serviceJob?: (string|null); + } + + /** Represents a JobEvent. */ + class JobEvent implements IJobEvent { + + /** + * Constructs a new JobEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IJobEvent); + + /** JobEvent message. */ + public message: string; + + /** JobEvent jobId. */ + public jobId: string; + + /** JobEvent startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** JobEvent endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** JobEvent state. */ + public state: (google.cloud.dataplex.v1.JobEvent.State|keyof typeof google.cloud.dataplex.v1.JobEvent.State); + + /** JobEvent retries. */ + public retries: number; + + /** JobEvent type. */ + public type: (google.cloud.dataplex.v1.JobEvent.Type|keyof typeof google.cloud.dataplex.v1.JobEvent.Type); + + /** JobEvent service. */ + public service: (google.cloud.dataplex.v1.JobEvent.Service|keyof typeof google.cloud.dataplex.v1.JobEvent.Service); + + /** JobEvent serviceJob. */ + public serviceJob: string; + + /** + * Creates a new JobEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns JobEvent instance + */ + public static create(properties?: google.cloud.dataplex.v1.IJobEvent): google.cloud.dataplex.v1.JobEvent; + + /** + * Encodes the specified JobEvent message. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. + * @param message JobEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IJobEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JobEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. + * @param message JobEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IJobEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JobEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JobEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.JobEvent; + + /** + * Decodes a JobEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JobEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.JobEvent; + + /** + * Verifies a JobEvent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JobEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JobEvent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.JobEvent; + + /** + * Creates a plain object from a JobEvent message. Also converts values to other types if specified. + * @param message JobEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.JobEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JobEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace JobEvent { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + SPARK = 1, + NOTEBOOK = 2 + } + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + SUCCEEDED = 1, + FAILED = 2, + CANCELLED = 3, + ABORTED = 4 + } + + /** Service enum. */ + enum Service { + SERVICE_UNSPECIFIED = 0, + DATAPROC = 1 + } + } + + /** Properties of a SessionEvent. */ + interface ISessionEvent { + + /** SessionEvent message */ + message?: (string|null); + + /** SessionEvent userId */ + userId?: (string|null); + + /** SessionEvent sessionId */ + sessionId?: (string|null); + + /** SessionEvent type */ + type?: (google.cloud.dataplex.v1.SessionEvent.EventType|keyof typeof google.cloud.dataplex.v1.SessionEvent.EventType|null); + + /** SessionEvent query */ + query?: (google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null); + } + + /** Represents a SessionEvent. */ + class SessionEvent implements ISessionEvent { + + /** + * Constructs a new SessionEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ISessionEvent); + + /** SessionEvent message. */ + public message: string; + + /** SessionEvent userId. */ + public userId: string; + + /** SessionEvent sessionId. */ + public sessionId: string; + + /** SessionEvent type. */ + public type: (google.cloud.dataplex.v1.SessionEvent.EventType|keyof typeof google.cloud.dataplex.v1.SessionEvent.EventType); + + /** SessionEvent query. */ + public query?: (google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null); + + /** SessionEvent detail. */ + public detail?: "query"; + + /** + * Creates a new SessionEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns SessionEvent instance + */ + public static create(properties?: google.cloud.dataplex.v1.ISessionEvent): google.cloud.dataplex.v1.SessionEvent; + + /** + * Encodes the specified SessionEvent message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. + * @param message SessionEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ISessionEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SessionEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. + * @param message SessionEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ISessionEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SessionEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SessionEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.SessionEvent; + + /** + * Decodes a SessionEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SessionEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.SessionEvent; + + /** + * Verifies a SessionEvent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SessionEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SessionEvent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.SessionEvent; + + /** + * Creates a plain object from a SessionEvent message. Also converts values to other types if specified. + * @param message SessionEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.SessionEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SessionEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace SessionEvent { + + /** EventType enum. */ + enum EventType { + EVENT_TYPE_UNSPECIFIED = 0, + START = 1, + STOP = 2, + QUERY = 3 + } + + /** Properties of a QueryDetail. */ + interface IQueryDetail { + + /** QueryDetail queryId */ + queryId?: (string|null); + + /** QueryDetail queryText */ + queryText?: (string|null); + + /** QueryDetail engine */ + engine?: (google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|keyof typeof google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|null); + + /** QueryDetail duration */ + duration?: (google.protobuf.IDuration|null); + + /** QueryDetail resultSizeBytes */ + resultSizeBytes?: (number|Long|string|null); + + /** QueryDetail dataProcessedBytes */ + dataProcessedBytes?: (number|Long|string|null); + } + + /** Represents a QueryDetail. */ + class QueryDetail implements IQueryDetail { + + /** + * Constructs a new QueryDetail. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.SessionEvent.IQueryDetail); + + /** QueryDetail queryId. */ + public queryId: string; + + /** QueryDetail queryText. */ + public queryText: string; + + /** QueryDetail engine. */ + public engine: (google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|keyof typeof google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine); + + /** QueryDetail duration. */ + public duration?: (google.protobuf.IDuration|null); + + /** QueryDetail resultSizeBytes. */ + public resultSizeBytes: (number|Long|string); + + /** QueryDetail dataProcessedBytes. */ + public dataProcessedBytes: (number|Long|string); + + /** + * Creates a new QueryDetail instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDetail instance + */ + public static create(properties?: google.cloud.dataplex.v1.SessionEvent.IQueryDetail): google.cloud.dataplex.v1.SessionEvent.QueryDetail; + + /** + * Encodes the specified QueryDetail message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. + * @param message QueryDetail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.SessionEvent.IQueryDetail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryDetail message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. + * @param message QueryDetail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.SessionEvent.IQueryDetail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryDetail message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.SessionEvent.QueryDetail; + + /** + * Decodes a QueryDetail message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.SessionEvent.QueryDetail; + + /** + * Verifies a QueryDetail message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryDetail message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryDetail + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.SessionEvent.QueryDetail; + + /** + * Creates a plain object from a QueryDetail message. Also converts values to other types if specified. + * @param message QueryDetail + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.SessionEvent.QueryDetail, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryDetail to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace QueryDetail { + + /** Engine enum. */ + enum Engine { + ENGINE_UNSPECIFIED = 0, + SPARK_SQL = 1, + BIGQUERY = 2 + } + } + } + + /** Represents a MetadataService */ + class MetadataService extends $protobuf.rpc.Service { + + /** + * Constructs a new MetadataService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new MetadataService service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): MetadataService; + + /** + * Calls GetEntity. + * @param request GetEntityRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Entity + */ + public getEntity(request: google.cloud.dataplex.v1.IGetEntityRequest, callback: google.cloud.dataplex.v1.MetadataService.GetEntityCallback): void; + + /** + * Calls GetEntity. + * @param request GetEntityRequest message or plain object + * @returns Promise + */ + public getEntity(request: google.cloud.dataplex.v1.IGetEntityRequest): Promise; + + /** + * Calls ListEntities. + * @param request ListEntitiesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListEntitiesResponse + */ + public listEntities(request: google.cloud.dataplex.v1.IListEntitiesRequest, callback: google.cloud.dataplex.v1.MetadataService.ListEntitiesCallback): void; + + /** + * Calls ListEntities. + * @param request ListEntitiesRequest message or plain object + * @returns Promise + */ + public listEntities(request: google.cloud.dataplex.v1.IListEntitiesRequest): Promise; + + /** + * Calls GetPartition. + * @param request GetPartitionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Partition + */ + public getPartition(request: google.cloud.dataplex.v1.IGetPartitionRequest, callback: google.cloud.dataplex.v1.MetadataService.GetPartitionCallback): void; + + /** + * Calls GetPartition. + * @param request GetPartitionRequest message or plain object + * @returns Promise + */ + public getPartition(request: google.cloud.dataplex.v1.IGetPartitionRequest): Promise; + + /** + * Calls ListPartitions. + * @param request ListPartitionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListPartitionsResponse + */ + public listPartitions(request: google.cloud.dataplex.v1.IListPartitionsRequest, callback: google.cloud.dataplex.v1.MetadataService.ListPartitionsCallback): void; + + /** + * Calls ListPartitions. + * @param request ListPartitionsRequest message or plain object + * @returns Promise + */ + public listPartitions(request: google.cloud.dataplex.v1.IListPartitionsRequest): Promise; + } + + namespace MetadataService { + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#getEntity}. + * @param error Error, if any + * @param [response] Entity + */ + type GetEntityCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Entity) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#listEntities}. + * @param error Error, if any + * @param [response] ListEntitiesResponse + */ + type ListEntitiesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListEntitiesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#getPartition}. + * @param error Error, if any + * @param [response] Partition + */ + type GetPartitionCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Partition) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#listPartitions}. + * @param error Error, if any + * @param [response] ListPartitionsResponse + */ + type ListPartitionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListPartitionsResponse) => void; + } + + /** Properties of a ListEntitiesRequest. */ + interface IListEntitiesRequest { + + /** ListEntitiesRequest parent */ + parent?: (string|null); + + /** ListEntitiesRequest view */ + view?: (google.cloud.dataplex.v1.ListEntitiesRequest.EntityView|keyof typeof google.cloud.dataplex.v1.ListEntitiesRequest.EntityView|null); + + /** ListEntitiesRequest pageSize */ + pageSize?: (number|null); + + /** ListEntitiesRequest pageToken */ + pageToken?: (string|null); + + /** ListEntitiesRequest filter */ + filter?: (string|null); + } + + /** Represents a ListEntitiesRequest. */ + class ListEntitiesRequest implements IListEntitiesRequest { + + /** + * Constructs a new ListEntitiesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListEntitiesRequest); + + /** ListEntitiesRequest parent. */ + public parent: string; + + /** ListEntitiesRequest view. */ + public view: (google.cloud.dataplex.v1.ListEntitiesRequest.EntityView|keyof typeof google.cloud.dataplex.v1.ListEntitiesRequest.EntityView); + + /** ListEntitiesRequest pageSize. */ + public pageSize: number; + + /** ListEntitiesRequest pageToken. */ + public pageToken: string; + + /** ListEntitiesRequest filter. */ + public filter: string; + + /** + * Creates a new ListEntitiesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEntitiesRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListEntitiesRequest): google.cloud.dataplex.v1.ListEntitiesRequest; + + /** + * Encodes the specified ListEntitiesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesRequest.verify|verify} messages. + * @param message ListEntitiesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListEntitiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListEntitiesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesRequest.verify|verify} messages. + * @param message ListEntitiesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListEntitiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListEntitiesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListEntitiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListEntitiesRequest; + + /** + * Decodes a ListEntitiesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListEntitiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListEntitiesRequest; + + /** + * Verifies a ListEntitiesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListEntitiesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListEntitiesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListEntitiesRequest; + + /** + * Creates a plain object from a ListEntitiesRequest message. Also converts values to other types if specified. + * @param message ListEntitiesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListEntitiesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListEntitiesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ListEntitiesRequest { + + /** EntityView enum. */ + enum EntityView { + ENTITY_VIEW_UNSPECIFIED = 0, + TABLES = 1, + FILESETS = 2 + } + } + + /** Properties of a ListEntitiesResponse. */ + interface IListEntitiesResponse { + + /** ListEntitiesResponse entities */ + entities?: (google.cloud.dataplex.v1.IEntity[]|null); + + /** ListEntitiesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListEntitiesResponse. */ + class ListEntitiesResponse implements IListEntitiesResponse { + + /** + * Constructs a new ListEntitiesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListEntitiesResponse); + + /** ListEntitiesResponse entities. */ + public entities: google.cloud.dataplex.v1.IEntity[]; + + /** ListEntitiesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListEntitiesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEntitiesResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListEntitiesResponse): google.cloud.dataplex.v1.ListEntitiesResponse; + + /** + * Encodes the specified ListEntitiesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesResponse.verify|verify} messages. + * @param message ListEntitiesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListEntitiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListEntitiesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesResponse.verify|verify} messages. + * @param message ListEntitiesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListEntitiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListEntitiesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListEntitiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListEntitiesResponse; + + /** + * Decodes a ListEntitiesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListEntitiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListEntitiesResponse; + + /** + * Verifies a ListEntitiesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListEntitiesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListEntitiesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListEntitiesResponse; + + /** + * Creates a plain object from a ListEntitiesResponse message. Also converts values to other types if specified. + * @param message ListEntitiesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListEntitiesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListEntitiesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetEntityRequest. */ + interface IGetEntityRequest { + + /** GetEntityRequest name */ + name?: (string|null); + + /** GetEntityRequest view */ + view?: (google.cloud.dataplex.v1.GetEntityRequest.EntityView|keyof typeof google.cloud.dataplex.v1.GetEntityRequest.EntityView|null); + } + + /** Represents a GetEntityRequest. */ + class GetEntityRequest implements IGetEntityRequest { + + /** + * Constructs a new GetEntityRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGetEntityRequest); + + /** GetEntityRequest name. */ + public name: string; + + /** GetEntityRequest view. */ + public view: (google.cloud.dataplex.v1.GetEntityRequest.EntityView|keyof typeof google.cloud.dataplex.v1.GetEntityRequest.EntityView); + + /** + * Creates a new GetEntityRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetEntityRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGetEntityRequest): google.cloud.dataplex.v1.GetEntityRequest; + + /** + * Encodes the specified GetEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetEntityRequest.verify|verify} messages. + * @param message GetEntityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IGetEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetEntityRequest.verify|verify} messages. + * @param message GetEntityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetEntityRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetEntityRequest; + + /** + * Decodes a GetEntityRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetEntityRequest; + + /** + * Verifies a GetEntityRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetEntityRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetEntityRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetEntityRequest; + + /** + * Creates a plain object from a GetEntityRequest message. Also converts values to other types if specified. + * @param message GetEntityRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GetEntityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetEntityRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace GetEntityRequest { + + /** EntityView enum. */ + enum EntityView { + ENTITY_VIEW_UNSPECIFIED = 0, + BASIC = 1, + SCHEMA = 2, + FULL = 4 + } + } + + /** Properties of a ListPartitionsRequest. */ + interface IListPartitionsRequest { + + /** ListPartitionsRequest parent */ + parent?: (string|null); + + /** ListPartitionsRequest pageSize */ + pageSize?: (number|null); + + /** ListPartitionsRequest pageToken */ + pageToken?: (string|null); + + /** ListPartitionsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListPartitionsRequest. */ + class ListPartitionsRequest implements IListPartitionsRequest { + + /** + * Constructs a new ListPartitionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListPartitionsRequest); + + /** ListPartitionsRequest parent. */ + public parent: string; + + /** ListPartitionsRequest pageSize. */ + public pageSize: number; + + /** ListPartitionsRequest pageToken. */ + public pageToken: string; + + /** ListPartitionsRequest filter. */ + public filter: string; + + /** + * Creates a new ListPartitionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPartitionsRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListPartitionsRequest): google.cloud.dataplex.v1.ListPartitionsRequest; + + /** + * Encodes the specified ListPartitionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsRequest.verify|verify} messages. + * @param message ListPartitionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListPartitionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPartitionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsRequest.verify|verify} messages. + * @param message ListPartitionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListPartitionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPartitionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPartitionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListPartitionsRequest; + + /** + * Decodes a ListPartitionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPartitionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListPartitionsRequest; + + /** + * Verifies a ListPartitionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPartitionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPartitionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListPartitionsRequest; + + /** + * Creates a plain object from a ListPartitionsRequest message. Also converts values to other types if specified. + * @param message ListPartitionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListPartitionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPartitionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListPartitionsResponse. */ + interface IListPartitionsResponse { + + /** ListPartitionsResponse partitions */ + partitions?: (google.cloud.dataplex.v1.IPartition[]|null); + + /** ListPartitionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListPartitionsResponse. */ + class ListPartitionsResponse implements IListPartitionsResponse { + + /** + * Constructs a new ListPartitionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListPartitionsResponse); + + /** ListPartitionsResponse partitions. */ + public partitions: google.cloud.dataplex.v1.IPartition[]; + + /** ListPartitionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListPartitionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPartitionsResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListPartitionsResponse): google.cloud.dataplex.v1.ListPartitionsResponse; + + /** + * Encodes the specified ListPartitionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsResponse.verify|verify} messages. + * @param message ListPartitionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListPartitionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPartitionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsResponse.verify|verify} messages. + * @param message ListPartitionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListPartitionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPartitionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPartitionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListPartitionsResponse; + + /** + * Decodes a ListPartitionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPartitionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListPartitionsResponse; + + /** + * Verifies a ListPartitionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPartitionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPartitionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListPartitionsResponse; + + /** + * Creates a plain object from a ListPartitionsResponse message. Also converts values to other types if specified. + * @param message ListPartitionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListPartitionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPartitionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetPartitionRequest. */ + interface IGetPartitionRequest { + + /** GetPartitionRequest name */ + name?: (string|null); + } + + /** Represents a GetPartitionRequest. */ + class GetPartitionRequest implements IGetPartitionRequest { + + /** + * Constructs a new GetPartitionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGetPartitionRequest); + + /** GetPartitionRequest name. */ + public name: string; + + /** + * Creates a new GetPartitionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPartitionRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGetPartitionRequest): google.cloud.dataplex.v1.GetPartitionRequest; + + /** + * Encodes the specified GetPartitionRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetPartitionRequest.verify|verify} messages. + * @param message GetPartitionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IGetPartitionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPartitionRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetPartitionRequest.verify|verify} messages. + * @param message GetPartitionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetPartitionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPartitionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPartitionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetPartitionRequest; + + /** + * Decodes a GetPartitionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPartitionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetPartitionRequest; + + /** + * Verifies a GetPartitionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetPartitionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPartitionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetPartitionRequest; + + /** + * Creates a plain object from a GetPartitionRequest message. Also converts values to other types if specified. + * @param message GetPartitionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GetPartitionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPartitionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Entity. */ + interface IEntity { + + /** Entity name */ + name?: (string|null); + + /** Entity displayName */ + displayName?: (string|null); + + /** Entity description */ + description?: (string|null); + + /** Entity createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Entity updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Entity id */ + id?: (string|null); + + /** Entity etag */ + etag?: (string|null); + + /** Entity type */ + type?: (google.cloud.dataplex.v1.Entity.Type|keyof typeof google.cloud.dataplex.v1.Entity.Type|null); + + /** Entity asset */ + asset?: (string|null); + + /** Entity dataPath */ + dataPath?: (string|null); + + /** Entity dataPathPattern */ + dataPathPattern?: (string|null); + + /** Entity catalogEntry */ + catalogEntry?: (string|null); + + /** Entity system */ + system?: (google.cloud.dataplex.v1.StorageSystem|keyof typeof google.cloud.dataplex.v1.StorageSystem|null); + + /** Entity format */ + format?: (google.cloud.dataplex.v1.IStorageFormat|null); + + /** Entity compatibility */ + compatibility?: (google.cloud.dataplex.v1.Entity.ICompatibilityStatus|null); + + /** Entity schema */ + schema?: (google.cloud.dataplex.v1.ISchema|null); + } + + /** Represents an Entity. */ + class Entity implements IEntity { + + /** + * Constructs a new Entity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IEntity); + + /** Entity name. */ + public name: string; + + /** Entity displayName. */ + public displayName: string; + + /** Entity description. */ + public description: string; + + /** Entity createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Entity updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Entity id. */ + public id: string; + + /** Entity etag. */ + public etag: string; + + /** Entity type. */ + public type: (google.cloud.dataplex.v1.Entity.Type|keyof typeof google.cloud.dataplex.v1.Entity.Type); + + /** Entity asset. */ + public asset: string; + + /** Entity dataPath. */ + public dataPath: string; + + /** Entity dataPathPattern. */ + public dataPathPattern: string; + + /** Entity catalogEntry. */ + public catalogEntry: string; + + /** Entity system. */ + public system: (google.cloud.dataplex.v1.StorageSystem|keyof typeof google.cloud.dataplex.v1.StorageSystem); + + /** Entity format. */ + public format?: (google.cloud.dataplex.v1.IStorageFormat|null); + + /** Entity compatibility. */ + public compatibility?: (google.cloud.dataplex.v1.Entity.ICompatibilityStatus|null); + + /** Entity schema. */ + public schema?: (google.cloud.dataplex.v1.ISchema|null); + + /** + * Creates a new Entity instance using the specified properties. + * @param [properties] Properties to set + * @returns Entity instance + */ + public static create(properties?: google.cloud.dataplex.v1.IEntity): google.cloud.dataplex.v1.Entity; + + /** + * Encodes the specified Entity message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.verify|verify} messages. + * @param message Entity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.verify|verify} messages. + * @param message Entity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Entity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Entity; + + /** + * Decodes an Entity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Entity; + + /** + * Verifies an Entity message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Entity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Entity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Entity; + + /** + * Creates a plain object from an Entity message. Also converts values to other types if specified. + * @param message Entity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Entity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Entity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Entity { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + TABLE = 1, + FILESET = 2 + } + + /** Properties of a CompatibilityStatus. */ + interface ICompatibilityStatus { + + /** CompatibilityStatus hiveMetastore */ + hiveMetastore?: (google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null); + + /** CompatibilityStatus bigquery */ + bigquery?: (google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null); + } + + /** Represents a CompatibilityStatus. */ + class CompatibilityStatus implements ICompatibilityStatus { + + /** + * Constructs a new CompatibilityStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Entity.ICompatibilityStatus); + + /** CompatibilityStatus hiveMetastore. */ + public hiveMetastore?: (google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null); + + /** CompatibilityStatus bigquery. */ + public bigquery?: (google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null); + + /** + * Creates a new CompatibilityStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns CompatibilityStatus instance + */ + public static create(properties?: google.cloud.dataplex.v1.Entity.ICompatibilityStatus): google.cloud.dataplex.v1.Entity.CompatibilityStatus; + + /** + * Encodes the specified CompatibilityStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify|verify} messages. + * @param message CompatibilityStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Entity.ICompatibilityStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CompatibilityStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify|verify} messages. + * @param message CompatibilityStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Entity.ICompatibilityStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompatibilityStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CompatibilityStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Entity.CompatibilityStatus; + + /** + * Decodes a CompatibilityStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CompatibilityStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Entity.CompatibilityStatus; + + /** + * Verifies a CompatibilityStatus message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CompatibilityStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CompatibilityStatus + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Entity.CompatibilityStatus; + + /** + * Creates a plain object from a CompatibilityStatus message. Also converts values to other types if specified. + * @param message CompatibilityStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Entity.CompatibilityStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CompatibilityStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace CompatibilityStatus { + + /** Properties of a Compatibility. */ + interface ICompatibility { + + /** Compatibility compatible */ + compatible?: (boolean|null); + + /** Compatibility reason */ + reason?: (string|null); + } + + /** Represents a Compatibility. */ + class Compatibility implements ICompatibility { + + /** + * Constructs a new Compatibility. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility); + + /** Compatibility compatible. */ + public compatible: boolean; + + /** Compatibility reason. */ + public reason: string; + + /** + * Creates a new Compatibility instance using the specified properties. + * @param [properties] Properties to set + * @returns Compatibility instance + */ + public static create(properties?: google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility): google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility; + + /** + * Encodes the specified Compatibility message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify|verify} messages. + * @param message Compatibility message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Compatibility message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify|verify} messages. + * @param message Compatibility message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Compatibility message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Compatibility + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility; + + /** + * Decodes a Compatibility message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Compatibility + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility; + + /** + * Verifies a Compatibility message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Compatibility message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Compatibility + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility; + + /** + * Creates a plain object from a Compatibility message. Also converts values to other types if specified. + * @param message Compatibility + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Compatibility to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** Properties of a Partition. */ + interface IPartition { + + /** Partition name */ + name?: (string|null); + + /** Partition values */ + values?: (string[]|null); + + /** Partition location */ + location?: (string|null); + + /** Partition etag */ + etag?: (string|null); + } + + /** Represents a Partition. */ + class Partition implements IPartition { + + /** + * Constructs a new Partition. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IPartition); + + /** Partition name. */ + public name: string; + + /** Partition values. */ + public values: string[]; + + /** Partition location. */ + public location: string; + + /** Partition etag. */ + public etag: string; + + /** + * Creates a new Partition instance using the specified properties. + * @param [properties] Properties to set + * @returns Partition instance + */ + public static create(properties?: google.cloud.dataplex.v1.IPartition): google.cloud.dataplex.v1.Partition; + + /** + * Encodes the specified Partition message. Does not implicitly {@link google.cloud.dataplex.v1.Partition.verify|verify} messages. + * @param message Partition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IPartition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Partition message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Partition.verify|verify} messages. + * @param message Partition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IPartition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Partition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Partition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Partition; + + /** + * Decodes a Partition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Partition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Partition; + + /** + * Verifies a Partition message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Partition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Partition + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Partition; + + /** + * Creates a plain object from a Partition message. Also converts values to other types if specified. + * @param message Partition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Partition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Partition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Schema. */ + interface ISchema { + + /** Schema userManaged */ + userManaged?: (boolean|null); + + /** Schema fields */ + fields?: (google.cloud.dataplex.v1.Schema.ISchemaField[]|null); + + /** Schema partitionFields */ + partitionFields?: (google.cloud.dataplex.v1.Schema.IPartitionField[]|null); + + /** Schema partitionStyle */ + partitionStyle?: (google.cloud.dataplex.v1.Schema.PartitionStyle|keyof typeof google.cloud.dataplex.v1.Schema.PartitionStyle|null); + } + + /** Represents a Schema. */ + class Schema implements ISchema { + + /** + * Constructs a new Schema. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ISchema); + + /** Schema userManaged. */ + public userManaged: boolean; + + /** Schema fields. */ + public fields: google.cloud.dataplex.v1.Schema.ISchemaField[]; + + /** Schema partitionFields. */ + public partitionFields: google.cloud.dataplex.v1.Schema.IPartitionField[]; + + /** Schema partitionStyle. */ + public partitionStyle: (google.cloud.dataplex.v1.Schema.PartitionStyle|keyof typeof google.cloud.dataplex.v1.Schema.PartitionStyle); + + /** + * Creates a new Schema instance using the specified properties. + * @param [properties] Properties to set + * @returns Schema instance + */ + public static create(properties?: google.cloud.dataplex.v1.ISchema): google.cloud.dataplex.v1.Schema; + + /** + * Encodes the specified Schema message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.verify|verify} messages. + * @param message Schema message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ISchema, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Schema message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.verify|verify} messages. + * @param message Schema message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ISchema, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Schema message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Schema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Schema; + + /** + * Decodes a Schema message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Schema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Schema; + + /** + * Verifies a Schema message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Schema message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Schema + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Schema; + + /** + * Creates a plain object from a Schema message. Also converts values to other types if specified. + * @param message Schema + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Schema, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Schema to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Schema { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + BOOLEAN = 1, + BYTE = 2, + INT16 = 3, + INT32 = 4, + INT64 = 5, + FLOAT = 6, + DOUBLE = 7, + DECIMAL = 8, + STRING = 9, + BINARY = 10, + TIMESTAMP = 11, + DATE = 12, + TIME = 13, + RECORD = 14, + NULL = 100 + } + + /** Mode enum. */ + enum Mode { + MODE_UNSPECIFIED = 0, + REQUIRED = 1, + NULLABLE = 2, + REPEATED = 3 + } + + /** Properties of a SchemaField. */ + interface ISchemaField { + + /** SchemaField name */ + name?: (string|null); + + /** SchemaField description */ + description?: (string|null); + + /** SchemaField type */ + type?: (google.cloud.dataplex.v1.Schema.Type|keyof typeof google.cloud.dataplex.v1.Schema.Type|null); + + /** SchemaField mode */ + mode?: (google.cloud.dataplex.v1.Schema.Mode|keyof typeof google.cloud.dataplex.v1.Schema.Mode|null); + + /** SchemaField fields */ + fields?: (google.cloud.dataplex.v1.Schema.ISchemaField[]|null); + } + + /** Represents a SchemaField. */ + class SchemaField implements ISchemaField { + + /** + * Constructs a new SchemaField. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Schema.ISchemaField); + + /** SchemaField name. */ + public name: string; + + /** SchemaField description. */ + public description: string; + + /** SchemaField type. */ + public type: (google.cloud.dataplex.v1.Schema.Type|keyof typeof google.cloud.dataplex.v1.Schema.Type); + + /** SchemaField mode. */ + public mode: (google.cloud.dataplex.v1.Schema.Mode|keyof typeof google.cloud.dataplex.v1.Schema.Mode); + + /** SchemaField fields. */ + public fields: google.cloud.dataplex.v1.Schema.ISchemaField[]; + + /** + * Creates a new SchemaField instance using the specified properties. + * @param [properties] Properties to set + * @returns SchemaField instance + */ + public static create(properties?: google.cloud.dataplex.v1.Schema.ISchemaField): google.cloud.dataplex.v1.Schema.SchemaField; + + /** + * Encodes the specified SchemaField message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.SchemaField.verify|verify} messages. + * @param message SchemaField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Schema.ISchemaField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SchemaField message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.SchemaField.verify|verify} messages. + * @param message SchemaField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Schema.ISchemaField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SchemaField message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SchemaField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Schema.SchemaField; + + /** + * Decodes a SchemaField message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SchemaField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Schema.SchemaField; + + /** + * Verifies a SchemaField message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SchemaField message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SchemaField + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Schema.SchemaField; + + /** + * Creates a plain object from a SchemaField message. Also converts values to other types if specified. + * @param message SchemaField + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Schema.SchemaField, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SchemaField to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PartitionField. */ + interface IPartitionField { + + /** PartitionField name */ + name?: (string|null); + + /** PartitionField type */ + type?: (google.cloud.dataplex.v1.Schema.Type|keyof typeof google.cloud.dataplex.v1.Schema.Type|null); + } + + /** Represents a PartitionField. */ + class PartitionField implements IPartitionField { + + /** + * Constructs a new PartitionField. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Schema.IPartitionField); + + /** PartitionField name. */ + public name: string; + + /** PartitionField type. */ + public type: (google.cloud.dataplex.v1.Schema.Type|keyof typeof google.cloud.dataplex.v1.Schema.Type); + + /** + * Creates a new PartitionField instance using the specified properties. + * @param [properties] Properties to set + * @returns PartitionField instance + */ + public static create(properties?: google.cloud.dataplex.v1.Schema.IPartitionField): google.cloud.dataplex.v1.Schema.PartitionField; + + /** + * Encodes the specified PartitionField message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.PartitionField.verify|verify} messages. + * @param message PartitionField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Schema.IPartitionField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PartitionField message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.PartitionField.verify|verify} messages. + * @param message PartitionField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Schema.IPartitionField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PartitionField message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PartitionField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Schema.PartitionField; + + /** + * Decodes a PartitionField message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PartitionField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Schema.PartitionField; + + /** + * Verifies a PartitionField message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PartitionField message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PartitionField + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Schema.PartitionField; + + /** + * Creates a plain object from a PartitionField message. Also converts values to other types if specified. + * @param message PartitionField + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Schema.PartitionField, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PartitionField to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** PartitionStyle enum. */ + enum PartitionStyle { + PARTITION_STYLE_UNSPECIFIED = 0, + HIVE_COMPATIBLE = 1 + } + } + + /** Properties of a StorageFormat. */ + interface IStorageFormat { + + /** StorageFormat format */ + format?: (google.cloud.dataplex.v1.StorageFormat.Format|keyof typeof google.cloud.dataplex.v1.StorageFormat.Format|null); + + /** StorageFormat compressionFormat */ + compressionFormat?: (google.cloud.dataplex.v1.StorageFormat.CompressionFormat|keyof typeof google.cloud.dataplex.v1.StorageFormat.CompressionFormat|null); + + /** StorageFormat mimeType */ + mimeType?: (string|null); + + /** StorageFormat csv */ + csv?: (google.cloud.dataplex.v1.StorageFormat.ICsvOptions|null); + + /** StorageFormat json */ + json?: (google.cloud.dataplex.v1.StorageFormat.IJsonOptions|null); + } + + /** Represents a StorageFormat. */ + class StorageFormat implements IStorageFormat { + + /** + * Constructs a new StorageFormat. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IStorageFormat); + + /** StorageFormat format. */ + public format: (google.cloud.dataplex.v1.StorageFormat.Format|keyof typeof google.cloud.dataplex.v1.StorageFormat.Format); + + /** StorageFormat compressionFormat. */ + public compressionFormat: (google.cloud.dataplex.v1.StorageFormat.CompressionFormat|keyof typeof google.cloud.dataplex.v1.StorageFormat.CompressionFormat); + + /** StorageFormat mimeType. */ + public mimeType: string; + + /** StorageFormat csv. */ + public csv?: (google.cloud.dataplex.v1.StorageFormat.ICsvOptions|null); + + /** StorageFormat json. */ + public json?: (google.cloud.dataplex.v1.StorageFormat.IJsonOptions|null); + + /** StorageFormat options. */ + public options?: ("csv"|"json"); + + /** + * Creates a new StorageFormat instance using the specified properties. + * @param [properties] Properties to set + * @returns StorageFormat instance + */ + public static create(properties?: google.cloud.dataplex.v1.IStorageFormat): google.cloud.dataplex.v1.StorageFormat; + + /** + * Encodes the specified StorageFormat message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.verify|verify} messages. + * @param message StorageFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IStorageFormat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StorageFormat message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.verify|verify} messages. + * @param message StorageFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IStorageFormat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StorageFormat message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StorageFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.StorageFormat; + + /** + * Decodes a StorageFormat message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StorageFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.StorageFormat; + + /** + * Verifies a StorageFormat message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StorageFormat message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StorageFormat + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.StorageFormat; + + /** + * Creates a plain object from a StorageFormat message. Also converts values to other types if specified. + * @param message StorageFormat + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.StorageFormat, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StorageFormat to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace StorageFormat { + + /** Properties of a CsvOptions. */ + interface ICsvOptions { + + /** CsvOptions encoding */ + encoding?: (string|null); + + /** CsvOptions headerRows */ + headerRows?: (number|null); + + /** CsvOptions delimiter */ + delimiter?: (string|null); + + /** CsvOptions quote */ + quote?: (string|null); + } + + /** Represents a CsvOptions. */ + class CsvOptions implements ICsvOptions { + + /** + * Constructs a new CsvOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.StorageFormat.ICsvOptions); + + /** CsvOptions encoding. */ + public encoding: string; + + /** CsvOptions headerRows. */ + public headerRows: number; + + /** CsvOptions delimiter. */ + public delimiter: string; + + /** CsvOptions quote. */ + public quote: string; + + /** + * Creates a new CsvOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns CsvOptions instance + */ + public static create(properties?: google.cloud.dataplex.v1.StorageFormat.ICsvOptions): google.cloud.dataplex.v1.StorageFormat.CsvOptions; + + /** + * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify|verify} messages. + * @param message CsvOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.StorageFormat.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify|verify} messages. + * @param message CsvOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.StorageFormat.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CsvOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.StorageFormat.CsvOptions; + + /** + * Decodes a CsvOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.StorageFormat.CsvOptions; + + /** + * Verifies a CsvOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CsvOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.StorageFormat.CsvOptions; + + /** + * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. + * @param message CsvOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.StorageFormat.CsvOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CsvOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a JsonOptions. */ + interface IJsonOptions { + + /** JsonOptions encoding */ + encoding?: (string|null); + } + + /** Represents a JsonOptions. */ + class JsonOptions implements IJsonOptions { + + /** + * Constructs a new JsonOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.StorageFormat.IJsonOptions); + + /** JsonOptions encoding. */ + public encoding: string; + + /** + * Creates a new JsonOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns JsonOptions instance + */ + public static create(properties?: google.cloud.dataplex.v1.StorageFormat.IJsonOptions): google.cloud.dataplex.v1.StorageFormat.JsonOptions; + + /** + * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify|verify} messages. + * @param message JsonOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.StorageFormat.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify|verify} messages. + * @param message JsonOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.StorageFormat.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JsonOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.StorageFormat.JsonOptions; + + /** + * Decodes a JsonOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.StorageFormat.JsonOptions; + + /** + * Verifies a JsonOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JsonOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.StorageFormat.JsonOptions; + + /** + * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. + * @param message JsonOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.StorageFormat.JsonOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JsonOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Format enum. */ + enum Format { + FORMAT_UNSPECIFIED = 0, + PARQUET = 1, + AVRO = 2, + ORC = 3, + CSV = 100, + JSON = 101, + IMAGE = 200, + AUDIO = 201, + VIDEO = 202, + TEXT = 203, + TFRECORD = 204, + OTHER = 1000, + UNKNOWN = 1001 + } + + /** CompressionFormat enum. */ + enum CompressionFormat { + COMPRESSION_FORMAT_UNSPECIFIED = 0, + GZIP = 2, + BZIP2 = 3 + } + } + + /** StorageSystem enum. */ + enum StorageSystem { + STORAGE_SYSTEM_UNSPECIFIED = 0, + CLOUD_STORAGE = 1, + BIGQUERY = 2 + } + + /** Properties of a Lake. */ + interface ILake { + + /** Lake name */ + name?: (string|null); + + /** Lake displayName */ + displayName?: (string|null); + + /** Lake uid */ + uid?: (string|null); + + /** Lake createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Lake updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Lake labels */ + labels?: ({ [k: string]: string }|null); + + /** Lake description */ + description?: (string|null); + + /** Lake state */ + state?: (google.cloud.dataplex.v1.Lake.MetastoreStatus.State|keyof typeof google.cloud.dataplex.v1.Lake.MetastoreStatus.State|null); + + /** Lake serviceAccount */ + serviceAccount?: (string|null); + + /** Lake metastore */ + metastore?: (google.cloud.dataplex.v1.Lake.IMetastore|null); + + /** Lake assetStatus */ + assetStatus?: (google.cloud.dataplex.v1.IAssetStatus|null); + + /** Lake metastoreStatus */ + metastoreStatus?: (google.cloud.dataplex.v1.Lake.IMetastoreStatus|null); + } + + /** Represents a Lake. */ + class Lake implements ILake { + + /** + * Constructs a new Lake. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ILake); + + /** Lake name. */ + public name: string; + + /** Lake displayName. */ + public displayName: string; + + /** Lake uid. */ + public uid: string; + + /** Lake createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Lake updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Lake labels. */ + public labels: { [k: string]: string }; + + /** Lake description. */ + public description: string; + + /** Lake state. */ + public state: (google.cloud.dataplex.v1.Lake.MetastoreStatus.State|keyof typeof google.cloud.dataplex.v1.Lake.MetastoreStatus.State); + + /** Lake serviceAccount. */ + public serviceAccount: string; + + /** Lake metastore. */ + public metastore?: (google.cloud.dataplex.v1.Lake.IMetastore|null); + + /** Lake assetStatus. */ + public assetStatus?: (google.cloud.dataplex.v1.IAssetStatus|null); + + /** Lake metastoreStatus. */ + public metastoreStatus?: (google.cloud.dataplex.v1.Lake.IMetastoreStatus|null); + + /** + * Creates a new Lake instance using the specified properties. + * @param [properties] Properties to set + * @returns Lake instance + */ + public static create(properties?: google.cloud.dataplex.v1.ILake): google.cloud.dataplex.v1.Lake; + + /** + * Encodes the specified Lake message. Does not implicitly {@link google.cloud.dataplex.v1.Lake.verify|verify} messages. + * @param message Lake message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ILake, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Lake message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Lake.verify|verify} messages. + * @param message Lake message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ILake, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Lake message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Lake + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Lake; + + /** + * Decodes a Lake message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Lake + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Lake; + + /** + * Verifies a Lake message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Lake message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Lake + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Lake; + + /** + * Creates a plain object from a Lake message. Also converts values to other types if specified. + * @param message Lake + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Lake, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Lake to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Lake { + + /** Properties of a Metastore. */ + interface IMetastore { + + /** Metastore service */ + service?: (string|null); + } + + /** Represents a Metastore. */ + class Metastore implements IMetastore { + + /** + * Constructs a new Metastore. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Lake.IMetastore); + + /** Metastore service. */ + public service: string; + + /** + * Creates a new Metastore instance using the specified properties. + * @param [properties] Properties to set + * @returns Metastore instance + */ + public static create(properties?: google.cloud.dataplex.v1.Lake.IMetastore): google.cloud.dataplex.v1.Lake.Metastore; + + /** + * Encodes the specified Metastore message. Does not implicitly {@link google.cloud.dataplex.v1.Lake.Metastore.verify|verify} messages. + * @param message Metastore message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Lake.IMetastore, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Metastore message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Lake.Metastore.verify|verify} messages. + * @param message Metastore message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Lake.IMetastore, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Metastore message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Metastore + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Lake.Metastore; + + /** + * Decodes a Metastore message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Metastore + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Lake.Metastore; + + /** + * Verifies a Metastore message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Metastore message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Metastore + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Lake.Metastore; + + /** + * Creates a plain object from a Metastore message. Also converts values to other types if specified. + * @param message Metastore + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Lake.Metastore, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Metastore to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MetastoreStatus. */ + interface IMetastoreStatus { + + /** MetastoreStatus state */ + state?: (google.cloud.dataplex.v1.Lake.MetastoreStatus.State|keyof typeof google.cloud.dataplex.v1.Lake.MetastoreStatus.State|null); + + /** MetastoreStatus message */ + message?: (string|null); + + /** MetastoreStatus updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** MetastoreStatus endpoint */ + endpoint?: (string|null); + } + + /** Represents a MetastoreStatus. */ + class MetastoreStatus implements IMetastoreStatus { + + /** + * Constructs a new MetastoreStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Lake.IMetastoreStatus); + + /** MetastoreStatus state. */ + public state: (google.cloud.dataplex.v1.Lake.MetastoreStatus.State|keyof typeof google.cloud.dataplex.v1.Lake.MetastoreStatus.State); + + /** MetastoreStatus message. */ + public message: string; + + /** MetastoreStatus updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** MetastoreStatus endpoint. */ + public endpoint: string; + + /** + * Creates a new MetastoreStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns MetastoreStatus instance + */ + public static create(properties?: google.cloud.dataplex.v1.Lake.IMetastoreStatus): google.cloud.dataplex.v1.Lake.MetastoreStatus; + + /** + * Encodes the specified MetastoreStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Lake.MetastoreStatus.verify|verify} messages. + * @param message MetastoreStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Lake.IMetastoreStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetastoreStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Lake.MetastoreStatus.verify|verify} messages. + * @param message MetastoreStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Lake.IMetastoreStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetastoreStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetastoreStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Lake.MetastoreStatus; + + /** + * Decodes a MetastoreStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetastoreStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Lake.MetastoreStatus; + + /** + * Verifies a MetastoreStatus message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MetastoreStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetastoreStatus + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Lake.MetastoreStatus; + + /** + * Creates a plain object from a MetastoreStatus message. Also converts values to other types if specified. + * @param message MetastoreStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Lake.MetastoreStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetastoreStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace MetastoreStatus { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + NONE = 1, + READY = 2, + UPDATING = 3, + ERROR = 4 + } + } + } + + /** Properties of an AssetStatus. */ + interface IAssetStatus { + + /** AssetStatus updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** AssetStatus activeAssets */ + activeAssets?: (number|null); + + /** AssetStatus securityPolicyApplyingAssets */ + securityPolicyApplyingAssets?: (number|null); + } + + /** Represents an AssetStatus. */ + class AssetStatus implements IAssetStatus { + + /** + * Constructs a new AssetStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IAssetStatus); + + /** AssetStatus updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** AssetStatus activeAssets. */ + public activeAssets: number; + + /** AssetStatus securityPolicyApplyingAssets. */ + public securityPolicyApplyingAssets: number; + + /** + * Creates a new AssetStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns AssetStatus instance + */ + public static create(properties?: google.cloud.dataplex.v1.IAssetStatus): google.cloud.dataplex.v1.AssetStatus; + + /** + * Encodes the specified AssetStatus message. Does not implicitly {@link google.cloud.dataplex.v1.AssetStatus.verify|verify} messages. + * @param message AssetStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IAssetStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AssetStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AssetStatus.verify|verify} messages. + * @param message AssetStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IAssetStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AssetStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AssetStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.AssetStatus; + + /** + * Decodes an AssetStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AssetStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.AssetStatus; + + /** + * Verifies an AssetStatus message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AssetStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AssetStatus + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.AssetStatus; + + /** + * Creates a plain object from an AssetStatus message. Also converts values to other types if specified. + * @param message AssetStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.AssetStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AssetStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Zone. */ + interface IZone { + + /** Zone name */ + name?: (string|null); + + /** Zone displayName */ + displayName?: (string|null); + + /** Zone uid */ + uid?: (string|null); + + /** Zone createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Zone updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Zone labels */ + labels?: ({ [k: string]: string }|null); + + /** Zone description */ + description?: (string|null); + + /** Zone state */ + state?: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State|null); + + /** Zone type */ + type?: (google.cloud.dataplex.v1.Zone.Type|keyof typeof google.cloud.dataplex.v1.Zone.Type|null); + + /** Zone discoverySpec */ + discoverySpec?: (google.cloud.dataplex.v1.Zone.IDiscoverySpec|null); + + /** Zone resourceSpec */ + resourceSpec?: (google.cloud.dataplex.v1.Zone.IResourceSpec|null); + + /** Zone assetStatus */ + assetStatus?: (google.cloud.dataplex.v1.IAssetStatus|null); + } + + /** Represents a Zone. */ + class Zone implements IZone { + + /** + * Constructs a new Zone. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IZone); + + /** Zone name. */ + public name: string; + + /** Zone displayName. */ + public displayName: string; + + /** Zone uid. */ + public uid: string; + + /** Zone createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Zone updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Zone labels. */ + public labels: { [k: string]: string }; + + /** Zone description. */ + public description: string; + + /** Zone state. */ + public state: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State); + + /** Zone type. */ + public type: (google.cloud.dataplex.v1.Zone.Type|keyof typeof google.cloud.dataplex.v1.Zone.Type); + + /** Zone discoverySpec. */ + public discoverySpec?: (google.cloud.dataplex.v1.Zone.IDiscoverySpec|null); + + /** Zone resourceSpec. */ + public resourceSpec?: (google.cloud.dataplex.v1.Zone.IResourceSpec|null); + + /** Zone assetStatus. */ + public assetStatus?: (google.cloud.dataplex.v1.IAssetStatus|null); + + /** + * Creates a new Zone instance using the specified properties. + * @param [properties] Properties to set + * @returns Zone instance + */ + public static create(properties?: google.cloud.dataplex.v1.IZone): google.cloud.dataplex.v1.Zone; + + /** + * Encodes the specified Zone message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.verify|verify} messages. + * @param message Zone message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IZone, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Zone message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.verify|verify} messages. + * @param message Zone message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IZone, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Zone message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Zone + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Zone; + + /** + * Decodes a Zone message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Zone + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Zone; + + /** + * Verifies a Zone message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Zone message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Zone + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Zone; + + /** + * Creates a plain object from a Zone message. Also converts values to other types if specified. + * @param message Zone + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Zone, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Zone to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Zone { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + RAW = 1, + CURATED = 2 + } + + /** Properties of a ResourceSpec. */ + interface IResourceSpec { + + /** ResourceSpec locationType */ + locationType?: (google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType|keyof typeof google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType|null); + } + + /** Represents a ResourceSpec. */ + class ResourceSpec implements IResourceSpec { + + /** + * Constructs a new ResourceSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Zone.IResourceSpec); + + /** ResourceSpec locationType. */ + public locationType: (google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType|keyof typeof google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType); + + /** + * Creates a new ResourceSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceSpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.Zone.IResourceSpec): google.cloud.dataplex.v1.Zone.ResourceSpec; + + /** + * Encodes the specified ResourceSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.ResourceSpec.verify|verify} messages. + * @param message ResourceSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Zone.IResourceSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.ResourceSpec.verify|verify} messages. + * @param message ResourceSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Zone.IResourceSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Zone.ResourceSpec; + + /** + * Decodes a ResourceSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Zone.ResourceSpec; + + /** + * Verifies a ResourceSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Zone.ResourceSpec; + + /** + * Creates a plain object from a ResourceSpec message. Also converts values to other types if specified. + * @param message ResourceSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Zone.ResourceSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ResourceSpec { + + /** LocationType enum. */ + enum LocationType { + LOCATION_TYPE_UNSPECIFIED = 0, + SINGLE_REGION = 1, + MULTI_REGION = 2 + } + } + + /** Properties of a DiscoverySpec. */ + interface IDiscoverySpec { + + /** DiscoverySpec enabled */ + enabled?: (boolean|null); + + /** DiscoverySpec includePatterns */ + includePatterns?: (string[]|null); + + /** DiscoverySpec excludePatterns */ + excludePatterns?: (string[]|null); + + /** DiscoverySpec csvOptions */ + csvOptions?: (google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions|null); + + /** DiscoverySpec jsonOptions */ + jsonOptions?: (google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions|null); + + /** DiscoverySpec schedule */ + schedule?: (string|null); + } + + /** Represents a DiscoverySpec. */ + class DiscoverySpec implements IDiscoverySpec { + + /** + * Constructs a new DiscoverySpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Zone.IDiscoverySpec); + + /** DiscoverySpec enabled. */ + public enabled: boolean; + + /** DiscoverySpec includePatterns. */ + public includePatterns: string[]; + + /** DiscoverySpec excludePatterns. */ + public excludePatterns: string[]; + + /** DiscoverySpec csvOptions. */ + public csvOptions?: (google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions|null); + + /** DiscoverySpec jsonOptions. */ + public jsonOptions?: (google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions|null); + + /** DiscoverySpec schedule. */ + public schedule?: (string|null); + + /** DiscoverySpec trigger. */ + public trigger?: "schedule"; + + /** + * Creates a new DiscoverySpec instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoverySpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.Zone.IDiscoverySpec): google.cloud.dataplex.v1.Zone.DiscoverySpec; + + /** + * Encodes the specified DiscoverySpec message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.verify|verify} messages. + * @param message DiscoverySpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Zone.IDiscoverySpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoverySpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.verify|verify} messages. + * @param message DiscoverySpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Zone.IDiscoverySpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoverySpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoverySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Zone.DiscoverySpec; + + /** + * Decodes a DiscoverySpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoverySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Zone.DiscoverySpec; + + /** + * Verifies a DiscoverySpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiscoverySpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoverySpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Zone.DiscoverySpec; + + /** + * Creates a plain object from a DiscoverySpec message. Also converts values to other types if specified. + * @param message DiscoverySpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Zone.DiscoverySpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoverySpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DiscoverySpec { + + /** Properties of a CsvOptions. */ + interface ICsvOptions { + + /** CsvOptions headerRows */ + headerRows?: (number|null); + + /** CsvOptions delimiter */ + delimiter?: (string|null); + + /** CsvOptions encoding */ + encoding?: (string|null); + + /** CsvOptions disableTypeInference */ + disableTypeInference?: (boolean|null); + } + + /** Represents a CsvOptions. */ + class CsvOptions implements ICsvOptions { + + /** + * Constructs a new CsvOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions); + + /** CsvOptions headerRows. */ + public headerRows: number; + + /** CsvOptions delimiter. */ + public delimiter: string; + + /** CsvOptions encoding. */ + public encoding: string; + + /** CsvOptions disableTypeInference. */ + public disableTypeInference: boolean; + + /** + * Creates a new CsvOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns CsvOptions instance + */ + public static create(properties?: google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions): google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions; + + /** + * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.verify|verify} messages. + * @param message CsvOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.verify|verify} messages. + * @param message CsvOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CsvOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions; + + /** + * Decodes a CsvOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions; + + /** + * Verifies a CsvOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CsvOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions; + + /** + * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. + * @param message CsvOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CsvOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a JsonOptions. */ + interface IJsonOptions { + + /** JsonOptions encoding */ + encoding?: (string|null); + + /** JsonOptions disableTypeInference */ + disableTypeInference?: (boolean|null); + } + + /** Represents a JsonOptions. */ + class JsonOptions implements IJsonOptions { + + /** + * Constructs a new JsonOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions); + + /** JsonOptions encoding. */ + public encoding: string; + + /** JsonOptions disableTypeInference. */ + public disableTypeInference: boolean; + + /** + * Creates a new JsonOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns JsonOptions instance + */ + public static create(properties?: google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions): google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions; + + /** + * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.verify|verify} messages. + * @param message JsonOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.verify|verify} messages. + * @param message JsonOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JsonOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions; + + /** + * Decodes a JsonOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions; + + /** + * Verifies a JsonOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JsonOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions; + + /** + * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. + * @param message JsonOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JsonOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** Properties of an Action. */ + interface IAction { + + /** Action category */ + category?: (google.cloud.dataplex.v1.Action.Category|keyof typeof google.cloud.dataplex.v1.Action.Category|null); + + /** Action issue */ + issue?: (string|null); + + /** Action detectTime */ + detectTime?: (google.protobuf.ITimestamp|null); + + /** Action name */ + name?: (string|null); + + /** Action lake */ + lake?: (string|null); + + /** Action zone */ + zone?: (string|null); + + /** Action asset */ + asset?: (string|null); + + /** Action dataLocations */ + dataLocations?: (string[]|null); + + /** Action invalidDataFormat */ + invalidDataFormat?: (google.cloud.dataplex.v1.Action.IInvalidDataFormat|null); + + /** Action incompatibleDataSchema */ + incompatibleDataSchema?: (google.cloud.dataplex.v1.Action.IIncompatibleDataSchema|null); + + /** Action invalidDataPartition */ + invalidDataPartition?: (google.cloud.dataplex.v1.Action.IInvalidDataPartition|null); + + /** Action missingData */ + missingData?: (google.cloud.dataplex.v1.Action.IMissingData|null); + + /** Action missingResource */ + missingResource?: (google.cloud.dataplex.v1.Action.IMissingResource|null); + + /** Action unauthorizedResource */ + unauthorizedResource?: (google.cloud.dataplex.v1.Action.IUnauthorizedResource|null); + + /** Action failedSecurityPolicyApply */ + failedSecurityPolicyApply?: (google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply|null); + + /** Action invalidDataOrganization */ + invalidDataOrganization?: (google.cloud.dataplex.v1.Action.IInvalidDataOrganization|null); + } + + /** Represents an Action. */ + class Action implements IAction { + + /** + * Constructs a new Action. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IAction); + + /** Action category. */ + public category: (google.cloud.dataplex.v1.Action.Category|keyof typeof google.cloud.dataplex.v1.Action.Category); + + /** Action issue. */ + public issue: string; + + /** Action detectTime. */ + public detectTime?: (google.protobuf.ITimestamp|null); + + /** Action name. */ + public name: string; + + /** Action lake. */ + public lake: string; + + /** Action zone. */ + public zone: string; + + /** Action asset. */ + public asset: string; + + /** Action dataLocations. */ + public dataLocations: string[]; + + /** Action invalidDataFormat. */ + public invalidDataFormat?: (google.cloud.dataplex.v1.Action.IInvalidDataFormat|null); + + /** Action incompatibleDataSchema. */ + public incompatibleDataSchema?: (google.cloud.dataplex.v1.Action.IIncompatibleDataSchema|null); + + /** Action invalidDataPartition. */ + public invalidDataPartition?: (google.cloud.dataplex.v1.Action.IInvalidDataPartition|null); + + /** Action missingData. */ + public missingData?: (google.cloud.dataplex.v1.Action.IMissingData|null); + + /** Action missingResource. */ + public missingResource?: (google.cloud.dataplex.v1.Action.IMissingResource|null); + + /** Action unauthorizedResource. */ + public unauthorizedResource?: (google.cloud.dataplex.v1.Action.IUnauthorizedResource|null); + + /** Action failedSecurityPolicyApply. */ + public failedSecurityPolicyApply?: (google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply|null); + + /** Action invalidDataOrganization. */ + public invalidDataOrganization?: (google.cloud.dataplex.v1.Action.IInvalidDataOrganization|null); + + /** Action details. */ + public details?: ("invalidDataFormat"|"incompatibleDataSchema"|"invalidDataPartition"|"missingData"|"missingResource"|"unauthorizedResource"|"failedSecurityPolicyApply"|"invalidDataOrganization"); + + /** + * Creates a new Action instance using the specified properties. + * @param [properties] Properties to set + * @returns Action instance + */ + public static create(properties?: google.cloud.dataplex.v1.IAction): google.cloud.dataplex.v1.Action; + + /** + * Encodes the specified Action message. Does not implicitly {@link google.cloud.dataplex.v1.Action.verify|verify} messages. + * @param message Action message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Action message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.verify|verify} messages. + * @param message Action message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Action message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Action + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action; + + /** + * Decodes an Action message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Action + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action; + + /** + * Verifies an Action message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Action message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Action + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action; + + /** + * Creates a plain object from an Action message. Also converts values to other types if specified. + * @param message Action + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Action, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Action to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Action { + + /** Category enum. */ + enum Category { + CATEGORY_UNSPECIFIED = 0, + RESOURCE_MANAGEMENT = 1, + SECURITY_POLICY = 2, + DATA_DISCOVERY = 3 + } + + /** Properties of a MissingResource. */ + interface IMissingResource { + } + + /** Represents a MissingResource. */ + class MissingResource implements IMissingResource { + + /** + * Constructs a new MissingResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Action.IMissingResource); + + /** + * Creates a new MissingResource instance using the specified properties. + * @param [properties] Properties to set + * @returns MissingResource instance + */ + public static create(properties?: google.cloud.dataplex.v1.Action.IMissingResource): google.cloud.dataplex.v1.Action.MissingResource; + + /** + * Encodes the specified MissingResource message. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingResource.verify|verify} messages. + * @param message MissingResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Action.IMissingResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MissingResource message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingResource.verify|verify} messages. + * @param message MissingResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IMissingResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MissingResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MissingResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.MissingResource; + + /** + * Decodes a MissingResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MissingResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.MissingResource; + + /** + * Verifies a MissingResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MissingResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MissingResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.MissingResource; + + /** + * Creates a plain object from a MissingResource message. Also converts values to other types if specified. + * @param message MissingResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Action.MissingResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MissingResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UnauthorizedResource. */ + interface IUnauthorizedResource { + } + + /** Represents an UnauthorizedResource. */ + class UnauthorizedResource implements IUnauthorizedResource { + + /** + * Constructs a new UnauthorizedResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Action.IUnauthorizedResource); + + /** + * Creates a new UnauthorizedResource instance using the specified properties. + * @param [properties] Properties to set + * @returns UnauthorizedResource instance + */ + public static create(properties?: google.cloud.dataplex.v1.Action.IUnauthorizedResource): google.cloud.dataplex.v1.Action.UnauthorizedResource; + + /** + * Encodes the specified UnauthorizedResource message. Does not implicitly {@link google.cloud.dataplex.v1.Action.UnauthorizedResource.verify|verify} messages. + * @param message UnauthorizedResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Action.IUnauthorizedResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UnauthorizedResource message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.UnauthorizedResource.verify|verify} messages. + * @param message UnauthorizedResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IUnauthorizedResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UnauthorizedResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UnauthorizedResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.UnauthorizedResource; + + /** + * Decodes an UnauthorizedResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UnauthorizedResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.UnauthorizedResource; + + /** + * Verifies an UnauthorizedResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UnauthorizedResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UnauthorizedResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.UnauthorizedResource; + + /** + * Creates a plain object from an UnauthorizedResource message. Also converts values to other types if specified. + * @param message UnauthorizedResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Action.UnauthorizedResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UnauthorizedResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FailedSecurityPolicyApply. */ + interface IFailedSecurityPolicyApply { + + /** FailedSecurityPolicyApply asset */ + asset?: (string|null); + } + + /** Represents a FailedSecurityPolicyApply. */ + class FailedSecurityPolicyApply implements IFailedSecurityPolicyApply { + + /** + * Constructs a new FailedSecurityPolicyApply. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply); + + /** FailedSecurityPolicyApply asset. */ + public asset: string; + + /** + * Creates a new FailedSecurityPolicyApply instance using the specified properties. + * @param [properties] Properties to set + * @returns FailedSecurityPolicyApply instance + */ + public static create(properties?: google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply): google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply; + + /** + * Encodes the specified FailedSecurityPolicyApply message. Does not implicitly {@link google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.verify|verify} messages. + * @param message FailedSecurityPolicyApply message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FailedSecurityPolicyApply message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.verify|verify} messages. + * @param message FailedSecurityPolicyApply message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FailedSecurityPolicyApply message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FailedSecurityPolicyApply + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply; + + /** + * Decodes a FailedSecurityPolicyApply message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FailedSecurityPolicyApply + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply; + + /** + * Verifies a FailedSecurityPolicyApply message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FailedSecurityPolicyApply message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FailedSecurityPolicyApply + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply; + + /** + * Creates a plain object from a FailedSecurityPolicyApply message. Also converts values to other types if specified. + * @param message FailedSecurityPolicyApply + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FailedSecurityPolicyApply to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an InvalidDataFormat. */ + interface IInvalidDataFormat { + + /** InvalidDataFormat sampledDataLocations */ + sampledDataLocations?: (string[]|null); + + /** InvalidDataFormat expectedFormat */ + expectedFormat?: (string|null); + + /** InvalidDataFormat newFormat */ + newFormat?: (string|null); + } + + /** Represents an InvalidDataFormat. */ + class InvalidDataFormat implements IInvalidDataFormat { + + /** + * Constructs a new InvalidDataFormat. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Action.IInvalidDataFormat); + + /** InvalidDataFormat sampledDataLocations. */ + public sampledDataLocations: string[]; + + /** InvalidDataFormat expectedFormat. */ + public expectedFormat: string; + + /** InvalidDataFormat newFormat. */ + public newFormat: string; + + /** + * Creates a new InvalidDataFormat instance using the specified properties. + * @param [properties] Properties to set + * @returns InvalidDataFormat instance + */ + public static create(properties?: google.cloud.dataplex.v1.Action.IInvalidDataFormat): google.cloud.dataplex.v1.Action.InvalidDataFormat; + + /** + * Encodes the specified InvalidDataFormat message. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataFormat.verify|verify} messages. + * @param message InvalidDataFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Action.IInvalidDataFormat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InvalidDataFormat message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataFormat.verify|verify} messages. + * @param message InvalidDataFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IInvalidDataFormat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InvalidDataFormat message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InvalidDataFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.InvalidDataFormat; + + /** + * Decodes an InvalidDataFormat message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InvalidDataFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.InvalidDataFormat; + + /** + * Verifies an InvalidDataFormat message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InvalidDataFormat message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InvalidDataFormat + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.InvalidDataFormat; + + /** + * Creates a plain object from an InvalidDataFormat message. Also converts values to other types if specified. + * @param message InvalidDataFormat + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Action.InvalidDataFormat, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InvalidDataFormat to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an IncompatibleDataSchema. */ + interface IIncompatibleDataSchema { + + /** IncompatibleDataSchema table */ + table?: (string|null); + + /** IncompatibleDataSchema existingSchema */ + existingSchema?: (string|null); + + /** IncompatibleDataSchema newSchema */ + newSchema?: (string|null); + + /** IncompatibleDataSchema sampledDataLocations */ + sampledDataLocations?: (string[]|null); + + /** IncompatibleDataSchema schemaChange */ + schemaChange?: (google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange|keyof typeof google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange|null); + } + + /** Represents an IncompatibleDataSchema. */ + class IncompatibleDataSchema implements IIncompatibleDataSchema { + + /** + * Constructs a new IncompatibleDataSchema. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Action.IIncompatibleDataSchema); + + /** IncompatibleDataSchema table. */ + public table: string; + + /** IncompatibleDataSchema existingSchema. */ + public existingSchema: string; + + /** IncompatibleDataSchema newSchema. */ + public newSchema: string; + + /** IncompatibleDataSchema sampledDataLocations. */ + public sampledDataLocations: string[]; + + /** IncompatibleDataSchema schemaChange. */ + public schemaChange: (google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange|keyof typeof google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange); + + /** + * Creates a new IncompatibleDataSchema instance using the specified properties. + * @param [properties] Properties to set + * @returns IncompatibleDataSchema instance + */ + public static create(properties?: google.cloud.dataplex.v1.Action.IIncompatibleDataSchema): google.cloud.dataplex.v1.Action.IncompatibleDataSchema; + + /** + * Encodes the specified IncompatibleDataSchema message. Does not implicitly {@link google.cloud.dataplex.v1.Action.IncompatibleDataSchema.verify|verify} messages. + * @param message IncompatibleDataSchema message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Action.IIncompatibleDataSchema, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IncompatibleDataSchema message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.IncompatibleDataSchema.verify|verify} messages. + * @param message IncompatibleDataSchema message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IIncompatibleDataSchema, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IncompatibleDataSchema message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IncompatibleDataSchema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.IncompatibleDataSchema; + + /** + * Decodes an IncompatibleDataSchema message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IncompatibleDataSchema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.IncompatibleDataSchema; + + /** + * Verifies an IncompatibleDataSchema message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an IncompatibleDataSchema message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IncompatibleDataSchema + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.IncompatibleDataSchema; + + /** + * Creates a plain object from an IncompatibleDataSchema message. Also converts values to other types if specified. + * @param message IncompatibleDataSchema + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Action.IncompatibleDataSchema, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IncompatibleDataSchema to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace IncompatibleDataSchema { + + /** SchemaChange enum. */ + enum SchemaChange { + SCHEMA_CHANGE_UNSPECIFIED = 0, + INCOMPATIBLE = 1, + MODIFIED = 2 + } + } + + /** Properties of an InvalidDataPartition. */ + interface IInvalidDataPartition { + + /** InvalidDataPartition expectedStructure */ + expectedStructure?: (google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure|keyof typeof google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure|null); + } + + /** Represents an InvalidDataPartition. */ + class InvalidDataPartition implements IInvalidDataPartition { + + /** + * Constructs a new InvalidDataPartition. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Action.IInvalidDataPartition); + + /** InvalidDataPartition expectedStructure. */ + public expectedStructure: (google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure|keyof typeof google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure); + + /** + * Creates a new InvalidDataPartition instance using the specified properties. + * @param [properties] Properties to set + * @returns InvalidDataPartition instance + */ + public static create(properties?: google.cloud.dataplex.v1.Action.IInvalidDataPartition): google.cloud.dataplex.v1.Action.InvalidDataPartition; + + /** + * Encodes the specified InvalidDataPartition message. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataPartition.verify|verify} messages. + * @param message InvalidDataPartition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Action.IInvalidDataPartition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InvalidDataPartition message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataPartition.verify|verify} messages. + * @param message InvalidDataPartition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IInvalidDataPartition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InvalidDataPartition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InvalidDataPartition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.InvalidDataPartition; + + /** + * Decodes an InvalidDataPartition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InvalidDataPartition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.InvalidDataPartition; + + /** + * Verifies an InvalidDataPartition message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InvalidDataPartition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InvalidDataPartition + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.InvalidDataPartition; + + /** + * Creates a plain object from an InvalidDataPartition message. Also converts values to other types if specified. + * @param message InvalidDataPartition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Action.InvalidDataPartition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InvalidDataPartition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace InvalidDataPartition { + + /** PartitionStructure enum. */ + enum PartitionStructure { + PARTITION_STRUCTURE_UNSPECIFIED = 0, + CONSISTENT_KEYS = 1, + HIVE_STYLE_KEYS = 2 + } + } + + /** Properties of a MissingData. */ + interface IMissingData { + } + + /** Represents a MissingData. */ + class MissingData implements IMissingData { + + /** + * Constructs a new MissingData. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Action.IMissingData); + + /** + * Creates a new MissingData instance using the specified properties. + * @param [properties] Properties to set + * @returns MissingData instance + */ + public static create(properties?: google.cloud.dataplex.v1.Action.IMissingData): google.cloud.dataplex.v1.Action.MissingData; + + /** + * Encodes the specified MissingData message. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingData.verify|verify} messages. + * @param message MissingData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Action.IMissingData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MissingData message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingData.verify|verify} messages. + * @param message MissingData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IMissingData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MissingData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MissingData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.MissingData; + + /** + * Decodes a MissingData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MissingData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.MissingData; + + /** + * Verifies a MissingData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MissingData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MissingData + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.MissingData; + + /** + * Creates a plain object from a MissingData message. Also converts values to other types if specified. + * @param message MissingData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Action.MissingData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MissingData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an InvalidDataOrganization. */ + interface IInvalidDataOrganization { + } + + /** Represents an InvalidDataOrganization. */ + class InvalidDataOrganization implements IInvalidDataOrganization { + + /** + * Constructs a new InvalidDataOrganization. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Action.IInvalidDataOrganization); + + /** + * Creates a new InvalidDataOrganization instance using the specified properties. + * @param [properties] Properties to set + * @returns InvalidDataOrganization instance + */ + public static create(properties?: google.cloud.dataplex.v1.Action.IInvalidDataOrganization): google.cloud.dataplex.v1.Action.InvalidDataOrganization; + + /** + * Encodes the specified InvalidDataOrganization message. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataOrganization.verify|verify} messages. + * @param message InvalidDataOrganization message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Action.IInvalidDataOrganization, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InvalidDataOrganization message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataOrganization.verify|verify} messages. + * @param message InvalidDataOrganization message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IInvalidDataOrganization, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InvalidDataOrganization message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InvalidDataOrganization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.InvalidDataOrganization; + + /** + * Decodes an InvalidDataOrganization message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InvalidDataOrganization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.InvalidDataOrganization; + + /** + * Verifies an InvalidDataOrganization message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InvalidDataOrganization message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InvalidDataOrganization + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.InvalidDataOrganization; + + /** + * Creates a plain object from an InvalidDataOrganization message. Also converts values to other types if specified. + * @param message InvalidDataOrganization + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Action.InvalidDataOrganization, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InvalidDataOrganization to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an Asset. */ + interface IAsset { + + /** Asset name */ + name?: (string|null); + + /** Asset displayName */ + displayName?: (string|null); + + /** Asset uid */ + uid?: (string|null); + + /** Asset createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Asset updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Asset labels */ + labels?: ({ [k: string]: string }|null); + + /** Asset description */ + description?: (string|null); + + /** Asset state */ + state?: (google.cloud.dataplex.v1.Asset.SecurityStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.SecurityStatus.State|null); + + /** Asset resourceSpec */ + resourceSpec?: (google.cloud.dataplex.v1.Asset.IResourceSpec|null); + + /** Asset resourceStatus */ + resourceStatus?: (google.cloud.dataplex.v1.Asset.IResourceStatus|null); + + /** Asset securityStatus */ + securityStatus?: (google.cloud.dataplex.v1.Asset.ISecurityStatus|null); + + /** Asset discoverySpec */ + discoverySpec?: (google.cloud.dataplex.v1.Asset.IDiscoverySpec|null); + + /** Asset discoveryStatus */ + discoveryStatus?: (google.cloud.dataplex.v1.Asset.IDiscoveryStatus|null); + } + + /** Represents an Asset. */ + class Asset implements IAsset { + + /** + * Constructs a new Asset. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IAsset); + + /** Asset name. */ + public name: string; + + /** Asset displayName. */ + public displayName: string; + + /** Asset uid. */ + public uid: string; + + /** Asset createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Asset updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Asset labels. */ + public labels: { [k: string]: string }; + + /** Asset description. */ + public description: string; + + /** Asset state. */ + public state: (google.cloud.dataplex.v1.Asset.SecurityStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.SecurityStatus.State); + + /** Asset resourceSpec. */ + public resourceSpec?: (google.cloud.dataplex.v1.Asset.IResourceSpec|null); + + /** Asset resourceStatus. */ + public resourceStatus?: (google.cloud.dataplex.v1.Asset.IResourceStatus|null); + + /** Asset securityStatus. */ + public securityStatus?: (google.cloud.dataplex.v1.Asset.ISecurityStatus|null); + + /** Asset discoverySpec. */ + public discoverySpec?: (google.cloud.dataplex.v1.Asset.IDiscoverySpec|null); + + /** Asset discoveryStatus. */ + public discoveryStatus?: (google.cloud.dataplex.v1.Asset.IDiscoveryStatus|null); + + /** + * Creates a new Asset instance using the specified properties. + * @param [properties] Properties to set + * @returns Asset instance + */ + public static create(properties?: google.cloud.dataplex.v1.IAsset): google.cloud.dataplex.v1.Asset; + + /** + * Encodes the specified Asset message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.verify|verify} messages. + * @param message Asset message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IAsset, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Asset message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.verify|verify} messages. + * @param message Asset message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IAsset, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Asset message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Asset + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset; + + /** + * Decodes an Asset message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Asset + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset; + + /** + * Verifies an Asset message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Asset message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Asset + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset; + + /** + * Creates a plain object from an Asset message. Also converts values to other types if specified. + * @param message Asset + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Asset, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Asset to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Asset { + + /** Properties of a SecurityStatus. */ + interface ISecurityStatus { + + /** SecurityStatus state */ + state?: (google.cloud.dataplex.v1.Asset.SecurityStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.SecurityStatus.State|null); + + /** SecurityStatus message */ + message?: (string|null); + + /** SecurityStatus updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a SecurityStatus. */ + class SecurityStatus implements ISecurityStatus { + + /** + * Constructs a new SecurityStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Asset.ISecurityStatus); + + /** SecurityStatus state. */ + public state: (google.cloud.dataplex.v1.Asset.SecurityStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.SecurityStatus.State); + + /** SecurityStatus message. */ + public message: string; + + /** SecurityStatus updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new SecurityStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns SecurityStatus instance + */ + public static create(properties?: google.cloud.dataplex.v1.Asset.ISecurityStatus): google.cloud.dataplex.v1.Asset.SecurityStatus; + + /** + * Encodes the specified SecurityStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.SecurityStatus.verify|verify} messages. + * @param message SecurityStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Asset.ISecurityStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SecurityStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.SecurityStatus.verify|verify} messages. + * @param message SecurityStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.ISecurityStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SecurityStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SecurityStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.SecurityStatus; + + /** + * Decodes a SecurityStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SecurityStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.SecurityStatus; + + /** + * Verifies a SecurityStatus message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SecurityStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SecurityStatus + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.SecurityStatus; + + /** + * Creates a plain object from a SecurityStatus message. Also converts values to other types if specified. + * @param message SecurityStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Asset.SecurityStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SecurityStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace SecurityStatus { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + READY = 1, + APPLYING = 2, + ERROR = 3 + } + } + + /** Properties of a DiscoverySpec. */ + interface IDiscoverySpec { + + /** DiscoverySpec enabled */ + enabled?: (boolean|null); + + /** DiscoverySpec includePatterns */ + includePatterns?: (string[]|null); + + /** DiscoverySpec excludePatterns */ + excludePatterns?: (string[]|null); + + /** DiscoverySpec csvOptions */ + csvOptions?: (google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions|null); + + /** DiscoverySpec jsonOptions */ + jsonOptions?: (google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions|null); + + /** DiscoverySpec schedule */ + schedule?: (string|null); + } + + /** Represents a DiscoverySpec. */ + class DiscoverySpec implements IDiscoverySpec { + + /** + * Constructs a new DiscoverySpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Asset.IDiscoverySpec); + + /** DiscoverySpec enabled. */ + public enabled: boolean; + + /** DiscoverySpec includePatterns. */ + public includePatterns: string[]; + + /** DiscoverySpec excludePatterns. */ + public excludePatterns: string[]; + + /** DiscoverySpec csvOptions. */ + public csvOptions?: (google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions|null); + + /** DiscoverySpec jsonOptions. */ + public jsonOptions?: (google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions|null); + + /** DiscoverySpec schedule. */ + public schedule?: (string|null); + + /** DiscoverySpec trigger. */ + public trigger?: "schedule"; + + /** + * Creates a new DiscoverySpec instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoverySpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.Asset.IDiscoverySpec): google.cloud.dataplex.v1.Asset.DiscoverySpec; + + /** + * Encodes the specified DiscoverySpec message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.verify|verify} messages. + * @param message DiscoverySpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Asset.IDiscoverySpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoverySpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.verify|verify} messages. + * @param message DiscoverySpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.IDiscoverySpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoverySpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoverySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.DiscoverySpec; + + /** + * Decodes a DiscoverySpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoverySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.DiscoverySpec; + + /** + * Verifies a DiscoverySpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiscoverySpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoverySpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.DiscoverySpec; + + /** + * Creates a plain object from a DiscoverySpec message. Also converts values to other types if specified. + * @param message DiscoverySpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Asset.DiscoverySpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoverySpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DiscoverySpec { + + /** Properties of a CsvOptions. */ + interface ICsvOptions { + + /** CsvOptions headerRows */ + headerRows?: (number|null); + + /** CsvOptions delimiter */ + delimiter?: (string|null); + + /** CsvOptions encoding */ + encoding?: (string|null); + + /** CsvOptions disableTypeInference */ + disableTypeInference?: (boolean|null); + } + + /** Represents a CsvOptions. */ + class CsvOptions implements ICsvOptions { + + /** + * Constructs a new CsvOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions); + + /** CsvOptions headerRows. */ + public headerRows: number; + + /** CsvOptions delimiter. */ + public delimiter: string; + + /** CsvOptions encoding. */ + public encoding: string; + + /** CsvOptions disableTypeInference. */ + public disableTypeInference: boolean; + + /** + * Creates a new CsvOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns CsvOptions instance + */ + public static create(properties?: google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions): google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions; + + /** + * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.verify|verify} messages. + * @param message CsvOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.verify|verify} messages. + * @param message CsvOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CsvOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions; + + /** + * Decodes a CsvOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions; + + /** + * Verifies a CsvOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CsvOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions; + + /** + * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. + * @param message CsvOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CsvOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a JsonOptions. */ + interface IJsonOptions { + + /** JsonOptions encoding */ + encoding?: (string|null); + + /** JsonOptions disableTypeInference */ + disableTypeInference?: (boolean|null); + } + + /** Represents a JsonOptions. */ + class JsonOptions implements IJsonOptions { + + /** + * Constructs a new JsonOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions); + + /** JsonOptions encoding. */ + public encoding: string; + + /** JsonOptions disableTypeInference. */ + public disableTypeInference: boolean; + + /** + * Creates a new JsonOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns JsonOptions instance + */ + public static create(properties?: google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions): google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions; + + /** + * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.verify|verify} messages. + * @param message JsonOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.verify|verify} messages. + * @param message JsonOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JsonOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions; + + /** + * Decodes a JsonOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions; + + /** + * Verifies a JsonOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JsonOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions; + + /** + * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. + * @param message JsonOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JsonOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a ResourceSpec. */ + interface IResourceSpec { + + /** ResourceSpec name */ + name?: (string|null); + + /** ResourceSpec type */ + type?: (google.cloud.dataplex.v1.Asset.ResourceSpec.Type|keyof typeof google.cloud.dataplex.v1.Asset.ResourceSpec.Type|null); + } + + /** Represents a ResourceSpec. */ + class ResourceSpec implements IResourceSpec { + + /** + * Constructs a new ResourceSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Asset.IResourceSpec); + + /** ResourceSpec name. */ + public name: string; + + /** ResourceSpec type. */ + public type: (google.cloud.dataplex.v1.Asset.ResourceSpec.Type|keyof typeof google.cloud.dataplex.v1.Asset.ResourceSpec.Type); + + /** + * Creates a new ResourceSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceSpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.Asset.IResourceSpec): google.cloud.dataplex.v1.Asset.ResourceSpec; + + /** + * Encodes the specified ResourceSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceSpec.verify|verify} messages. + * @param message ResourceSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Asset.IResourceSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceSpec.verify|verify} messages. + * @param message ResourceSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.IResourceSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.ResourceSpec; + + /** + * Decodes a ResourceSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.ResourceSpec; + + /** + * Verifies a ResourceSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.ResourceSpec; + + /** + * Creates a plain object from a ResourceSpec message. Also converts values to other types if specified. + * @param message ResourceSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Asset.ResourceSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ResourceSpec { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + STORAGE_BUCKET = 1, + BIGQUERY_DATASET = 2 + } + } + + /** Properties of a ResourceStatus. */ + interface IResourceStatus { + + /** ResourceStatus state */ + state?: (google.cloud.dataplex.v1.Asset.ResourceStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.ResourceStatus.State|null); + + /** ResourceStatus message */ + message?: (string|null); + + /** ResourceStatus updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a ResourceStatus. */ + class ResourceStatus implements IResourceStatus { + + /** + * Constructs a new ResourceStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Asset.IResourceStatus); + + /** ResourceStatus state. */ + public state: (google.cloud.dataplex.v1.Asset.ResourceStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.ResourceStatus.State); + + /** ResourceStatus message. */ + public message: string; + + /** ResourceStatus updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new ResourceStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceStatus instance + */ + public static create(properties?: google.cloud.dataplex.v1.Asset.IResourceStatus): google.cloud.dataplex.v1.Asset.ResourceStatus; + + /** + * Encodes the specified ResourceStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceStatus.verify|verify} messages. + * @param message ResourceStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Asset.IResourceStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceStatus.verify|verify} messages. + * @param message ResourceStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.IResourceStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.ResourceStatus; + + /** + * Decodes a ResourceStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.ResourceStatus; + + /** + * Verifies a ResourceStatus message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceStatus + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.ResourceStatus; + + /** + * Creates a plain object from a ResourceStatus message. Also converts values to other types if specified. + * @param message ResourceStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Asset.ResourceStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ResourceStatus { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + READY = 1, + ERROR = 2 + } + } + + /** Properties of a DiscoveryStatus. */ + interface IDiscoveryStatus { + + /** DiscoveryStatus state */ + state?: (google.cloud.dataplex.v1.Asset.DiscoveryStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.DiscoveryStatus.State|null); + + /** DiscoveryStatus message */ + message?: (string|null); + + /** DiscoveryStatus updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** DiscoveryStatus lastRunTime */ + lastRunTime?: (google.protobuf.ITimestamp|null); + + /** DiscoveryStatus stats */ + stats?: (google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats|null); + + /** DiscoveryStatus lastRunDuration */ + lastRunDuration?: (google.protobuf.IDuration|null); + } + + /** Represents a DiscoveryStatus. */ + class DiscoveryStatus implements IDiscoveryStatus { + + /** + * Constructs a new DiscoveryStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Asset.IDiscoveryStatus); + + /** DiscoveryStatus state. */ + public state: (google.cloud.dataplex.v1.Asset.DiscoveryStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.DiscoveryStatus.State); + + /** DiscoveryStatus message. */ + public message: string; + + /** DiscoveryStatus updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** DiscoveryStatus lastRunTime. */ + public lastRunTime?: (google.protobuf.ITimestamp|null); + + /** DiscoveryStatus stats. */ + public stats?: (google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats|null); + + /** DiscoveryStatus lastRunDuration. */ + public lastRunDuration?: (google.protobuf.IDuration|null); + + /** + * Creates a new DiscoveryStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoveryStatus instance + */ + public static create(properties?: google.cloud.dataplex.v1.Asset.IDiscoveryStatus): google.cloud.dataplex.v1.Asset.DiscoveryStatus; + + /** + * Encodes the specified DiscoveryStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.verify|verify} messages. + * @param message DiscoveryStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Asset.IDiscoveryStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoveryStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.verify|verify} messages. + * @param message DiscoveryStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.IDiscoveryStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoveryStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoveryStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.DiscoveryStatus; + + /** + * Decodes a DiscoveryStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoveryStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.DiscoveryStatus; + + /** + * Verifies a DiscoveryStatus message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiscoveryStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoveryStatus + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.DiscoveryStatus; + + /** + * Creates a plain object from a DiscoveryStatus message. Also converts values to other types if specified. + * @param message DiscoveryStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Asset.DiscoveryStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoveryStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DiscoveryStatus { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + SCHEDULED = 1, + IN_PROGRESS = 2, + PAUSED = 3, + DISABLED = 5 + } + + /** Properties of a Stats. */ + interface IStats { + + /** Stats dataItems */ + dataItems?: (number|Long|string|null); + + /** Stats dataSize */ + dataSize?: (number|Long|string|null); + + /** Stats tables */ + tables?: (number|Long|string|null); + + /** Stats filesets */ + filesets?: (number|Long|string|null); + } + + /** Represents a Stats. */ + class Stats implements IStats { + + /** + * Constructs a new Stats. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats); + + /** Stats dataItems. */ + public dataItems: (number|Long|string); + + /** Stats dataSize. */ + public dataSize: (number|Long|string); + + /** Stats tables. */ + public tables: (number|Long|string); + + /** Stats filesets. */ + public filesets: (number|Long|string); + + /** + * Creates a new Stats instance using the specified properties. + * @param [properties] Properties to set + * @returns Stats instance + */ + public static create(properties?: google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats): google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats; + + /** + * Encodes the specified Stats message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.verify|verify} messages. + * @param message Stats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Stats message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.verify|verify} messages. + * @param message Stats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Stats message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Stats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats; + + /** + * Decodes a Stats message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Stats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats; + + /** + * Verifies a Stats message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Stats message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Stats + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats; + + /** + * Creates a plain object from a Stats message. Also converts values to other types if specified. + * @param message Stats + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Stats to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + ACTIVE = 1, + CREATING = 2, + DELETING = 3, + ACTION_REQUIRED = 4 + } + + /** Represents a DataplexService */ + class DataplexService extends $protobuf.rpc.Service { + + /** + * Constructs a new DataplexService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new DataplexService service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): DataplexService; + + /** + * Calls CreateLake. + * @param request CreateLakeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createLake(request: google.cloud.dataplex.v1.ICreateLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateLakeCallback): void; + + /** + * Calls CreateLake. + * @param request CreateLakeRequest message or plain object + * @returns Promise + */ + public createLake(request: google.cloud.dataplex.v1.ICreateLakeRequest): Promise; + + /** + * Calls UpdateLake. + * @param request UpdateLakeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateLake(request: google.cloud.dataplex.v1.IUpdateLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateLakeCallback): void; + + /** + * Calls UpdateLake. + * @param request UpdateLakeRequest message or plain object + * @returns Promise + */ + public updateLake(request: google.cloud.dataplex.v1.IUpdateLakeRequest): Promise; + + /** + * Calls DeleteLake. + * @param request DeleteLakeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteLake(request: google.cloud.dataplex.v1.IDeleteLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteLakeCallback): void; + + /** + * Calls DeleteLake. + * @param request DeleteLakeRequest message or plain object + * @returns Promise + */ + public deleteLake(request: google.cloud.dataplex.v1.IDeleteLakeRequest): Promise; + + /** + * Calls ListLakes. + * @param request ListLakesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListLakesResponse + */ + public listLakes(request: google.cloud.dataplex.v1.IListLakesRequest, callback: google.cloud.dataplex.v1.DataplexService.ListLakesCallback): void; + + /** + * Calls ListLakes. + * @param request ListLakesRequest message or plain object + * @returns Promise + */ + public listLakes(request: google.cloud.dataplex.v1.IListLakesRequest): Promise; + + /** + * Calls GetLake. + * @param request GetLakeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Lake + */ + public getLake(request: google.cloud.dataplex.v1.IGetLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.GetLakeCallback): void; + + /** + * Calls GetLake. + * @param request GetLakeRequest message or plain object + * @returns Promise + */ + public getLake(request: google.cloud.dataplex.v1.IGetLakeRequest): Promise; + + /** + * Calls ListLakeActions. + * @param request ListLakeActionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListActionsResponse + */ + public listLakeActions(request: google.cloud.dataplex.v1.IListLakeActionsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListLakeActionsCallback): void; + + /** + * Calls ListLakeActions. + * @param request ListLakeActionsRequest message or plain object + * @returns Promise + */ + public listLakeActions(request: google.cloud.dataplex.v1.IListLakeActionsRequest): Promise; + + /** + * Calls CreateZone. + * @param request CreateZoneRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createZone(request: google.cloud.dataplex.v1.ICreateZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateZoneCallback): void; + + /** + * Calls CreateZone. + * @param request CreateZoneRequest message or plain object + * @returns Promise + */ + public createZone(request: google.cloud.dataplex.v1.ICreateZoneRequest): Promise; + + /** + * Calls UpdateZone. + * @param request UpdateZoneRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateZone(request: google.cloud.dataplex.v1.IUpdateZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateZoneCallback): void; + + /** + * Calls UpdateZone. + * @param request UpdateZoneRequest message or plain object + * @returns Promise + */ + public updateZone(request: google.cloud.dataplex.v1.IUpdateZoneRequest): Promise; + + /** + * Calls DeleteZone. + * @param request DeleteZoneRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteZone(request: google.cloud.dataplex.v1.IDeleteZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteZoneCallback): void; + + /** + * Calls DeleteZone. + * @param request DeleteZoneRequest message or plain object + * @returns Promise + */ + public deleteZone(request: google.cloud.dataplex.v1.IDeleteZoneRequest): Promise; + + /** + * Calls ListZones. + * @param request ListZonesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListZonesResponse + */ + public listZones(request: google.cloud.dataplex.v1.IListZonesRequest, callback: google.cloud.dataplex.v1.DataplexService.ListZonesCallback): void; + + /** + * Calls ListZones. + * @param request ListZonesRequest message or plain object + * @returns Promise + */ + public listZones(request: google.cloud.dataplex.v1.IListZonesRequest): Promise; + + /** + * Calls GetZone. + * @param request GetZoneRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Zone + */ + public getZone(request: google.cloud.dataplex.v1.IGetZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.GetZoneCallback): void; + + /** + * Calls GetZone. + * @param request GetZoneRequest message or plain object + * @returns Promise + */ + public getZone(request: google.cloud.dataplex.v1.IGetZoneRequest): Promise; + + /** + * Calls ListZoneActions. + * @param request ListZoneActionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListActionsResponse + */ + public listZoneActions(request: google.cloud.dataplex.v1.IListZoneActionsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListZoneActionsCallback): void; + + /** + * Calls ListZoneActions. + * @param request ListZoneActionsRequest message or plain object + * @returns Promise + */ + public listZoneActions(request: google.cloud.dataplex.v1.IListZoneActionsRequest): Promise; + + /** + * Calls CreateAsset. + * @param request CreateAssetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createAsset(request: google.cloud.dataplex.v1.ICreateAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateAssetCallback): void; + + /** + * Calls CreateAsset. + * @param request CreateAssetRequest message or plain object + * @returns Promise + */ + public createAsset(request: google.cloud.dataplex.v1.ICreateAssetRequest): Promise; + + /** + * Calls UpdateAsset. + * @param request UpdateAssetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateAsset(request: google.cloud.dataplex.v1.IUpdateAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateAssetCallback): void; + + /** + * Calls UpdateAsset. + * @param request UpdateAssetRequest message or plain object + * @returns Promise + */ + public updateAsset(request: google.cloud.dataplex.v1.IUpdateAssetRequest): Promise; + + /** + * Calls DeleteAsset. + * @param request DeleteAssetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteAsset(request: google.cloud.dataplex.v1.IDeleteAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteAssetCallback): void; + + /** + * Calls DeleteAsset. + * @param request DeleteAssetRequest message or plain object + * @returns Promise + */ + public deleteAsset(request: google.cloud.dataplex.v1.IDeleteAssetRequest): Promise; + + /** + * Calls ListAssets. + * @param request ListAssetsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAssetsResponse + */ + public listAssets(request: google.cloud.dataplex.v1.IListAssetsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListAssetsCallback): void; + + /** + * Calls ListAssets. + * @param request ListAssetsRequest message or plain object + * @returns Promise + */ + public listAssets(request: google.cloud.dataplex.v1.IListAssetsRequest): Promise; + + /** + * Calls GetAsset. + * @param request GetAssetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Asset + */ + public getAsset(request: google.cloud.dataplex.v1.IGetAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.GetAssetCallback): void; + + /** + * Calls GetAsset. + * @param request GetAssetRequest message or plain object + * @returns Promise + */ + public getAsset(request: google.cloud.dataplex.v1.IGetAssetRequest): Promise; + + /** + * Calls ListAssetActions. + * @param request ListAssetActionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListActionsResponse + */ + public listAssetActions(request: google.cloud.dataplex.v1.IListAssetActionsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListAssetActionsCallback): void; + + /** + * Calls ListAssetActions. + * @param request ListAssetActionsRequest message or plain object + * @returns Promise + */ + public listAssetActions(request: google.cloud.dataplex.v1.IListAssetActionsRequest): Promise; + + /** + * Calls CreateTask. + * @param request CreateTaskRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createTask(request: google.cloud.dataplex.v1.ICreateTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateTaskCallback): void; + + /** + * Calls CreateTask. + * @param request CreateTaskRequest message or plain object + * @returns Promise + */ + public createTask(request: google.cloud.dataplex.v1.ICreateTaskRequest): Promise; + + /** + * Calls UpdateTask. + * @param request UpdateTaskRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateTask(request: google.cloud.dataplex.v1.IUpdateTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateTaskCallback): void; + + /** + * Calls UpdateTask. + * @param request UpdateTaskRequest message or plain object + * @returns Promise + */ + public updateTask(request: google.cloud.dataplex.v1.IUpdateTaskRequest): Promise; + + /** + * Calls DeleteTask. + * @param request DeleteTaskRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteTask(request: google.cloud.dataplex.v1.IDeleteTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteTaskCallback): void; + + /** + * Calls DeleteTask. + * @param request DeleteTaskRequest message or plain object + * @returns Promise + */ + public deleteTask(request: google.cloud.dataplex.v1.IDeleteTaskRequest): Promise; + + /** + * Calls ListTasks. + * @param request ListTasksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListTasksResponse + */ + public listTasks(request: google.cloud.dataplex.v1.IListTasksRequest, callback: google.cloud.dataplex.v1.DataplexService.ListTasksCallback): void; + + /** + * Calls ListTasks. + * @param request ListTasksRequest message or plain object + * @returns Promise + */ + public listTasks(request: google.cloud.dataplex.v1.IListTasksRequest): Promise; + + /** + * Calls GetTask. + * @param request GetTaskRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Task + */ + public getTask(request: google.cloud.dataplex.v1.IGetTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.GetTaskCallback): void; + + /** + * Calls GetTask. + * @param request GetTaskRequest message or plain object + * @returns Promise + */ + public getTask(request: google.cloud.dataplex.v1.IGetTaskRequest): Promise; + + /** + * Calls ListJobs. + * @param request ListJobsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListJobsResponse + */ + public listJobs(request: google.cloud.dataplex.v1.IListJobsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListJobsCallback): void; + + /** + * Calls ListJobs. + * @param request ListJobsRequest message or plain object + * @returns Promise + */ + public listJobs(request: google.cloud.dataplex.v1.IListJobsRequest): Promise; + + /** + * Calls GetJob. + * @param request GetJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Job + */ + public getJob(request: google.cloud.dataplex.v1.IGetJobRequest, callback: google.cloud.dataplex.v1.DataplexService.GetJobCallback): void; + + /** + * Calls GetJob. + * @param request GetJobRequest message or plain object + * @returns Promise + */ + public getJob(request: google.cloud.dataplex.v1.IGetJobRequest): Promise; + + /** + * Calls CancelJob. + * @param request CancelJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public cancelJob(request: google.cloud.dataplex.v1.ICancelJobRequest, callback: google.cloud.dataplex.v1.DataplexService.CancelJobCallback): void; + + /** + * Calls CancelJob. + * @param request CancelJobRequest message or plain object + * @returns Promise + */ + public cancelJob(request: google.cloud.dataplex.v1.ICancelJobRequest): Promise; + } + + namespace DataplexService { + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createLake}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateLakeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateLake}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateLakeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteLake}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteLakeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listLakes}. + * @param error Error, if any + * @param [response] ListLakesResponse + */ + type ListLakesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListLakesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getLake}. + * @param error Error, if any + * @param [response] Lake + */ + type GetLakeCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Lake) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listLakeActions}. + * @param error Error, if any + * @param [response] ListActionsResponse + */ + type ListLakeActionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListActionsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createZone}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateZoneCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateZone}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateZoneCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteZone}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteZoneCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listZones}. + * @param error Error, if any + * @param [response] ListZonesResponse + */ + type ListZonesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListZonesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getZone}. + * @param error Error, if any + * @param [response] Zone + */ + type GetZoneCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Zone) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listZoneActions}. + * @param error Error, if any + * @param [response] ListActionsResponse + */ + type ListZoneActionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListActionsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createAsset}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateAssetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateAsset}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateAssetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteAsset}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteAssetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listAssets}. + * @param error Error, if any + * @param [response] ListAssetsResponse + */ + type ListAssetsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListAssetsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getAsset}. + * @param error Error, if any + * @param [response] Asset + */ + type GetAssetCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Asset) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listAssetActions}. + * @param error Error, if any + * @param [response] ListActionsResponse + */ + type ListAssetActionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListActionsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createTask}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateTaskCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateTask}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateTaskCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteTask}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteTaskCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listTasks}. + * @param error Error, if any + * @param [response] ListTasksResponse + */ + type ListTasksCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListTasksResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getTask}. + * @param error Error, if any + * @param [response] Task + */ + type GetTaskCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Task) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listJobs}. + * @param error Error, if any + * @param [response] ListJobsResponse + */ + type ListJobsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListJobsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getJob}. + * @param error Error, if any + * @param [response] Job + */ + type GetJobCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Job) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#cancelJob}. + * @param error Error, if any + * @param [response] Empty + */ + type CancelJobCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + } + + /** Properties of a CreateLakeRequest. */ + interface ICreateLakeRequest { + + /** CreateLakeRequest parent */ + parent?: (string|null); + + /** CreateLakeRequest lakeId */ + lakeId?: (string|null); + + /** CreateLakeRequest lake */ + lake?: (google.cloud.dataplex.v1.ILake|null); + + /** CreateLakeRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateLakeRequest. */ + class CreateLakeRequest implements ICreateLakeRequest { + + /** + * Constructs a new CreateLakeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ICreateLakeRequest); + + /** CreateLakeRequest parent. */ + public parent: string; + + /** CreateLakeRequest lakeId. */ + public lakeId: string; + + /** CreateLakeRequest lake. */ + public lake?: (google.cloud.dataplex.v1.ILake|null); + + /** CreateLakeRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateLakeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateLakeRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.ICreateLakeRequest): google.cloud.dataplex.v1.CreateLakeRequest; + + /** + * Encodes the specified CreateLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateLakeRequest.verify|verify} messages. + * @param message CreateLakeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ICreateLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateLakeRequest.verify|verify} messages. + * @param message CreateLakeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateLakeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateLakeRequest; + + /** + * Decodes a CreateLakeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateLakeRequest; + + /** + * Verifies a CreateLakeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateLakeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateLakeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateLakeRequest; + + /** + * Creates a plain object from a CreateLakeRequest message. Also converts values to other types if specified. + * @param message CreateLakeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.CreateLakeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateLakeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateLakeRequest. */ + interface IUpdateLakeRequest { + + /** UpdateLakeRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateLakeRequest lake */ + lake?: (google.cloud.dataplex.v1.ILake|null); + + /** UpdateLakeRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents an UpdateLakeRequest. */ + class UpdateLakeRequest implements IUpdateLakeRequest { + + /** + * Constructs a new UpdateLakeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IUpdateLakeRequest); + + /** UpdateLakeRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateLakeRequest lake. */ + public lake?: (google.cloud.dataplex.v1.ILake|null); + + /** UpdateLakeRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new UpdateLakeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateLakeRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IUpdateLakeRequest): google.cloud.dataplex.v1.UpdateLakeRequest; + + /** + * Encodes the specified UpdateLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateLakeRequest.verify|verify} messages. + * @param message UpdateLakeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IUpdateLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateLakeRequest.verify|verify} messages. + * @param message UpdateLakeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateLakeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateLakeRequest; + + /** + * Decodes an UpdateLakeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateLakeRequest; + + /** + * Verifies an UpdateLakeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateLakeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateLakeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateLakeRequest; + + /** + * Creates a plain object from an UpdateLakeRequest message. Also converts values to other types if specified. + * @param message UpdateLakeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.UpdateLakeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateLakeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteLakeRequest. */ + interface IDeleteLakeRequest { + + /** DeleteLakeRequest name */ + name?: (string|null); + } + + /** Represents a DeleteLakeRequest. */ + class DeleteLakeRequest implements IDeleteLakeRequest { + + /** + * Constructs a new DeleteLakeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDeleteLakeRequest); + + /** DeleteLakeRequest name. */ + public name: string; + + /** + * Creates a new DeleteLakeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteLakeRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDeleteLakeRequest): google.cloud.dataplex.v1.DeleteLakeRequest; + + /** + * Encodes the specified DeleteLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteLakeRequest.verify|verify} messages. + * @param message DeleteLakeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDeleteLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteLakeRequest.verify|verify} messages. + * @param message DeleteLakeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteLakeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteLakeRequest; + + /** + * Decodes a DeleteLakeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteLakeRequest; + + /** + * Verifies a DeleteLakeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteLakeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteLakeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteLakeRequest; + + /** + * Creates a plain object from a DeleteLakeRequest message. Also converts values to other types if specified. + * @param message DeleteLakeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DeleteLakeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteLakeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListLakesRequest. */ + interface IListLakesRequest { + + /** ListLakesRequest parent */ + parent?: (string|null); + + /** ListLakesRequest pageSize */ + pageSize?: (number|null); + + /** ListLakesRequest pageToken */ + pageToken?: (string|null); + + /** ListLakesRequest filter */ + filter?: (string|null); + + /** ListLakesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListLakesRequest. */ + class ListLakesRequest implements IListLakesRequest { + + /** + * Constructs a new ListLakesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListLakesRequest); + + /** ListLakesRequest parent. */ + public parent: string; + + /** ListLakesRequest pageSize. */ + public pageSize: number; + + /** ListLakesRequest pageToken. */ + public pageToken: string; + + /** ListLakesRequest filter. */ + public filter: string; + + /** ListLakesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListLakesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLakesRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListLakesRequest): google.cloud.dataplex.v1.ListLakesRequest; + + /** + * Encodes the specified ListLakesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesRequest.verify|verify} messages. + * @param message ListLakesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListLakesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListLakesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesRequest.verify|verify} messages. + * @param message ListLakesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListLakesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListLakesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLakesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListLakesRequest; + + /** + * Decodes a ListLakesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLakesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListLakesRequest; + + /** + * Verifies a ListLakesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListLakesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLakesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListLakesRequest; + + /** + * Creates a plain object from a ListLakesRequest message. Also converts values to other types if specified. + * @param message ListLakesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListLakesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListLakesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListLakesResponse. */ + interface IListLakesResponse { + + /** ListLakesResponse lakes */ + lakes?: (google.cloud.dataplex.v1.ILake[]|null); + + /** ListLakesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListLakesResponse unreachableLocations */ + unreachableLocations?: (string[]|null); + } + + /** Represents a ListLakesResponse. */ + class ListLakesResponse implements IListLakesResponse { + + /** + * Constructs a new ListLakesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListLakesResponse); + + /** ListLakesResponse lakes. */ + public lakes: google.cloud.dataplex.v1.ILake[]; + + /** ListLakesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListLakesResponse unreachableLocations. */ + public unreachableLocations: string[]; + + /** + * Creates a new ListLakesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLakesResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListLakesResponse): google.cloud.dataplex.v1.ListLakesResponse; + + /** + * Encodes the specified ListLakesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesResponse.verify|verify} messages. + * @param message ListLakesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListLakesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListLakesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesResponse.verify|verify} messages. + * @param message ListLakesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListLakesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListLakesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLakesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListLakesResponse; + + /** + * Decodes a ListLakesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLakesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListLakesResponse; + + /** + * Verifies a ListLakesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListLakesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLakesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListLakesResponse; + + /** + * Creates a plain object from a ListLakesResponse message. Also converts values to other types if specified. + * @param message ListLakesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListLakesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListLakesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListLakeActionsRequest. */ + interface IListLakeActionsRequest { + + /** ListLakeActionsRequest parent */ + parent?: (string|null); + + /** ListLakeActionsRequest pageSize */ + pageSize?: (number|null); + + /** ListLakeActionsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListLakeActionsRequest. */ + class ListLakeActionsRequest implements IListLakeActionsRequest { + + /** + * Constructs a new ListLakeActionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListLakeActionsRequest); + + /** ListLakeActionsRequest parent. */ + public parent: string; + + /** ListLakeActionsRequest pageSize. */ + public pageSize: number; + + /** ListLakeActionsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListLakeActionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLakeActionsRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListLakeActionsRequest): google.cloud.dataplex.v1.ListLakeActionsRequest; + + /** + * Encodes the specified ListLakeActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakeActionsRequest.verify|verify} messages. + * @param message ListLakeActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListLakeActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListLakeActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakeActionsRequest.verify|verify} messages. + * @param message ListLakeActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListLakeActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListLakeActionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLakeActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListLakeActionsRequest; + + /** + * Decodes a ListLakeActionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLakeActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListLakeActionsRequest; + + /** + * Verifies a ListLakeActionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListLakeActionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLakeActionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListLakeActionsRequest; + + /** + * Creates a plain object from a ListLakeActionsRequest message. Also converts values to other types if specified. + * @param message ListLakeActionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListLakeActionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListLakeActionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListActionsResponse. */ + interface IListActionsResponse { + + /** ListActionsResponse actions */ + actions?: (google.cloud.dataplex.v1.IAction[]|null); + + /** ListActionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListActionsResponse. */ + class ListActionsResponse implements IListActionsResponse { + + /** + * Constructs a new ListActionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListActionsResponse); + + /** ListActionsResponse actions. */ + public actions: google.cloud.dataplex.v1.IAction[]; + + /** ListActionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListActionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListActionsResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListActionsResponse): google.cloud.dataplex.v1.ListActionsResponse; + + /** + * Encodes the specified ListActionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListActionsResponse.verify|verify} messages. + * @param message ListActionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListActionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListActionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListActionsResponse.verify|verify} messages. + * @param message ListActionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListActionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListActionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListActionsResponse; + + /** + * Decodes a ListActionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListActionsResponse; + + /** + * Verifies a ListActionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListActionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListActionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListActionsResponse; + + /** + * Creates a plain object from a ListActionsResponse message. Also converts values to other types if specified. + * @param message ListActionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListActionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListActionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetLakeRequest. */ + interface IGetLakeRequest { + + /** GetLakeRequest name */ + name?: (string|null); + } + + /** Represents a GetLakeRequest. */ + class GetLakeRequest implements IGetLakeRequest { + + /** + * Constructs a new GetLakeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGetLakeRequest); + + /** GetLakeRequest name. */ + public name: string; + + /** + * Creates a new GetLakeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetLakeRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGetLakeRequest): google.cloud.dataplex.v1.GetLakeRequest; + + /** + * Encodes the specified GetLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetLakeRequest.verify|verify} messages. + * @param message GetLakeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IGetLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetLakeRequest.verify|verify} messages. + * @param message GetLakeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetLakeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetLakeRequest; + + /** + * Decodes a GetLakeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetLakeRequest; + + /** + * Verifies a GetLakeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetLakeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetLakeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetLakeRequest; + + /** + * Creates a plain object from a GetLakeRequest message. Also converts values to other types if specified. + * @param message GetLakeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GetLakeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetLakeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateZoneRequest. */ + interface ICreateZoneRequest { + + /** CreateZoneRequest parent */ + parent?: (string|null); + + /** CreateZoneRequest zoneId */ + zoneId?: (string|null); + + /** CreateZoneRequest zone */ + zone?: (google.cloud.dataplex.v1.IZone|null); + + /** CreateZoneRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateZoneRequest. */ + class CreateZoneRequest implements ICreateZoneRequest { + + /** + * Constructs a new CreateZoneRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ICreateZoneRequest); + + /** CreateZoneRequest parent. */ + public parent: string; + + /** CreateZoneRequest zoneId. */ + public zoneId: string; + + /** CreateZoneRequest zone. */ + public zone?: (google.cloud.dataplex.v1.IZone|null); + + /** CreateZoneRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateZoneRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateZoneRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.ICreateZoneRequest): google.cloud.dataplex.v1.CreateZoneRequest; + + /** + * Encodes the specified CreateZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateZoneRequest.verify|verify} messages. + * @param message CreateZoneRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ICreateZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateZoneRequest.verify|verify} messages. + * @param message CreateZoneRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateZoneRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateZoneRequest; + + /** + * Decodes a CreateZoneRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateZoneRequest; + + /** + * Verifies a CreateZoneRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateZoneRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateZoneRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateZoneRequest; + + /** + * Creates a plain object from a CreateZoneRequest message. Also converts values to other types if specified. + * @param message CreateZoneRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.CreateZoneRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateZoneRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateZoneRequest. */ + interface IUpdateZoneRequest { + + /** UpdateZoneRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateZoneRequest zone */ + zone?: (google.cloud.dataplex.v1.IZone|null); + + /** UpdateZoneRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents an UpdateZoneRequest. */ + class UpdateZoneRequest implements IUpdateZoneRequest { + + /** + * Constructs a new UpdateZoneRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IUpdateZoneRequest); + + /** UpdateZoneRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateZoneRequest zone. */ + public zone?: (google.cloud.dataplex.v1.IZone|null); + + /** UpdateZoneRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new UpdateZoneRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateZoneRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IUpdateZoneRequest): google.cloud.dataplex.v1.UpdateZoneRequest; + + /** + * Encodes the specified UpdateZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateZoneRequest.verify|verify} messages. + * @param message UpdateZoneRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IUpdateZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateZoneRequest.verify|verify} messages. + * @param message UpdateZoneRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateZoneRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateZoneRequest; + + /** + * Decodes an UpdateZoneRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateZoneRequest; + + /** + * Verifies an UpdateZoneRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateZoneRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateZoneRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateZoneRequest; + + /** + * Creates a plain object from an UpdateZoneRequest message. Also converts values to other types if specified. + * @param message UpdateZoneRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.UpdateZoneRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateZoneRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteZoneRequest. */ + interface IDeleteZoneRequest { + + /** DeleteZoneRequest name */ + name?: (string|null); + } + + /** Represents a DeleteZoneRequest. */ + class DeleteZoneRequest implements IDeleteZoneRequest { + + /** + * Constructs a new DeleteZoneRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDeleteZoneRequest); + + /** DeleteZoneRequest name. */ + public name: string; + + /** + * Creates a new DeleteZoneRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteZoneRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDeleteZoneRequest): google.cloud.dataplex.v1.DeleteZoneRequest; + + /** + * Encodes the specified DeleteZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteZoneRequest.verify|verify} messages. + * @param message DeleteZoneRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDeleteZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteZoneRequest.verify|verify} messages. + * @param message DeleteZoneRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteZoneRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteZoneRequest; + + /** + * Decodes a DeleteZoneRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteZoneRequest; + + /** + * Verifies a DeleteZoneRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteZoneRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteZoneRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteZoneRequest; + + /** + * Creates a plain object from a DeleteZoneRequest message. Also converts values to other types if specified. + * @param message DeleteZoneRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DeleteZoneRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteZoneRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListZonesRequest. */ + interface IListZonesRequest { + + /** ListZonesRequest parent */ + parent?: (string|null); + + /** ListZonesRequest pageSize */ + pageSize?: (number|null); + + /** ListZonesRequest pageToken */ + pageToken?: (string|null); + + /** ListZonesRequest filter */ + filter?: (string|null); + + /** ListZonesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListZonesRequest. */ + class ListZonesRequest implements IListZonesRequest { + + /** + * Constructs a new ListZonesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListZonesRequest); + + /** ListZonesRequest parent. */ + public parent: string; + + /** ListZonesRequest pageSize. */ + public pageSize: number; + + /** ListZonesRequest pageToken. */ + public pageToken: string; + + /** ListZonesRequest filter. */ + public filter: string; + + /** ListZonesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListZonesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListZonesRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListZonesRequest): google.cloud.dataplex.v1.ListZonesRequest; + + /** + * Encodes the specified ListZonesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesRequest.verify|verify} messages. + * @param message ListZonesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListZonesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListZonesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesRequest.verify|verify} messages. + * @param message ListZonesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListZonesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListZonesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListZonesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListZonesRequest; + + /** + * Decodes a ListZonesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListZonesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListZonesRequest; + + /** + * Verifies a ListZonesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListZonesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListZonesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListZonesRequest; + + /** + * Creates a plain object from a ListZonesRequest message. Also converts values to other types if specified. + * @param message ListZonesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListZonesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListZonesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListZonesResponse. */ + interface IListZonesResponse { + + /** ListZonesResponse zones */ + zones?: (google.cloud.dataplex.v1.IZone[]|null); + + /** ListZonesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListZonesResponse. */ + class ListZonesResponse implements IListZonesResponse { + + /** + * Constructs a new ListZonesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListZonesResponse); + + /** ListZonesResponse zones. */ + public zones: google.cloud.dataplex.v1.IZone[]; + + /** ListZonesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListZonesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListZonesResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListZonesResponse): google.cloud.dataplex.v1.ListZonesResponse; + + /** + * Encodes the specified ListZonesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesResponse.verify|verify} messages. + * @param message ListZonesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListZonesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListZonesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesResponse.verify|verify} messages. + * @param message ListZonesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListZonesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListZonesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListZonesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListZonesResponse; + + /** + * Decodes a ListZonesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListZonesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListZonesResponse; + + /** + * Verifies a ListZonesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListZonesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListZonesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListZonesResponse; + + /** + * Creates a plain object from a ListZonesResponse message. Also converts values to other types if specified. + * @param message ListZonesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListZonesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListZonesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListZoneActionsRequest. */ + interface IListZoneActionsRequest { + + /** ListZoneActionsRequest parent */ + parent?: (string|null); + + /** ListZoneActionsRequest pageSize */ + pageSize?: (number|null); + + /** ListZoneActionsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListZoneActionsRequest. */ + class ListZoneActionsRequest implements IListZoneActionsRequest { + + /** + * Constructs a new ListZoneActionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListZoneActionsRequest); + + /** ListZoneActionsRequest parent. */ + public parent: string; + + /** ListZoneActionsRequest pageSize. */ + public pageSize: number; + + /** ListZoneActionsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListZoneActionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListZoneActionsRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListZoneActionsRequest): google.cloud.dataplex.v1.ListZoneActionsRequest; + + /** + * Encodes the specified ListZoneActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListZoneActionsRequest.verify|verify} messages. + * @param message ListZoneActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListZoneActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListZoneActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZoneActionsRequest.verify|verify} messages. + * @param message ListZoneActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListZoneActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListZoneActionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListZoneActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListZoneActionsRequest; + + /** + * Decodes a ListZoneActionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListZoneActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListZoneActionsRequest; + + /** + * Verifies a ListZoneActionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListZoneActionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListZoneActionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListZoneActionsRequest; + + /** + * Creates a plain object from a ListZoneActionsRequest message. Also converts values to other types if specified. + * @param message ListZoneActionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListZoneActionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListZoneActionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetZoneRequest. */ + interface IGetZoneRequest { + + /** GetZoneRequest name */ + name?: (string|null); + } + + /** Represents a GetZoneRequest. */ + class GetZoneRequest implements IGetZoneRequest { + + /** + * Constructs a new GetZoneRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGetZoneRequest); + + /** GetZoneRequest name. */ + public name: string; + + /** + * Creates a new GetZoneRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetZoneRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGetZoneRequest): google.cloud.dataplex.v1.GetZoneRequest; + + /** + * Encodes the specified GetZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetZoneRequest.verify|verify} messages. + * @param message GetZoneRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IGetZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetZoneRequest.verify|verify} messages. + * @param message GetZoneRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetZoneRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetZoneRequest; + + /** + * Decodes a GetZoneRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetZoneRequest; + + /** + * Verifies a GetZoneRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetZoneRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetZoneRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetZoneRequest; + + /** + * Creates a plain object from a GetZoneRequest message. Also converts values to other types if specified. + * @param message GetZoneRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GetZoneRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetZoneRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateAssetRequest. */ + interface ICreateAssetRequest { + + /** CreateAssetRequest parent */ + parent?: (string|null); + + /** CreateAssetRequest assetId */ + assetId?: (string|null); + + /** CreateAssetRequest asset */ + asset?: (google.cloud.dataplex.v1.IAsset|null); + + /** CreateAssetRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateAssetRequest. */ + class CreateAssetRequest implements ICreateAssetRequest { + + /** + * Constructs a new CreateAssetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ICreateAssetRequest); + + /** CreateAssetRequest parent. */ + public parent: string; + + /** CreateAssetRequest assetId. */ + public assetId: string; + + /** CreateAssetRequest asset. */ + public asset?: (google.cloud.dataplex.v1.IAsset|null); + + /** CreateAssetRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateAssetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateAssetRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.ICreateAssetRequest): google.cloud.dataplex.v1.CreateAssetRequest; + + /** + * Encodes the specified CreateAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateAssetRequest.verify|verify} messages. + * @param message CreateAssetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ICreateAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateAssetRequest.verify|verify} messages. + * @param message CreateAssetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateAssetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateAssetRequest; + + /** + * Decodes a CreateAssetRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateAssetRequest; + + /** + * Verifies a CreateAssetRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateAssetRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateAssetRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateAssetRequest; + + /** + * Creates a plain object from a CreateAssetRequest message. Also converts values to other types if specified. + * @param message CreateAssetRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.CreateAssetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateAssetRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateAssetRequest. */ + interface IUpdateAssetRequest { + + /** UpdateAssetRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateAssetRequest asset */ + asset?: (google.cloud.dataplex.v1.IAsset|null); + + /** UpdateAssetRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents an UpdateAssetRequest. */ + class UpdateAssetRequest implements IUpdateAssetRequest { + + /** + * Constructs a new UpdateAssetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IUpdateAssetRequest); + + /** UpdateAssetRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateAssetRequest asset. */ + public asset?: (google.cloud.dataplex.v1.IAsset|null); + + /** UpdateAssetRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new UpdateAssetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateAssetRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IUpdateAssetRequest): google.cloud.dataplex.v1.UpdateAssetRequest; + + /** + * Encodes the specified UpdateAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAssetRequest.verify|verify} messages. + * @param message UpdateAssetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IUpdateAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAssetRequest.verify|verify} messages. + * @param message UpdateAssetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateAssetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateAssetRequest; + + /** + * Decodes an UpdateAssetRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateAssetRequest; + + /** + * Verifies an UpdateAssetRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateAssetRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateAssetRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateAssetRequest; + + /** + * Creates a plain object from an UpdateAssetRequest message. Also converts values to other types if specified. + * @param message UpdateAssetRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.UpdateAssetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateAssetRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteAssetRequest. */ + interface IDeleteAssetRequest { + + /** DeleteAssetRequest name */ + name?: (string|null); + } + + /** Represents a DeleteAssetRequest. */ + class DeleteAssetRequest implements IDeleteAssetRequest { + + /** + * Constructs a new DeleteAssetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDeleteAssetRequest); + + /** DeleteAssetRequest name. */ + public name: string; + + /** + * Creates a new DeleteAssetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteAssetRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDeleteAssetRequest): google.cloud.dataplex.v1.DeleteAssetRequest; + + /** + * Encodes the specified DeleteAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAssetRequest.verify|verify} messages. + * @param message DeleteAssetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDeleteAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAssetRequest.verify|verify} messages. + * @param message DeleteAssetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteAssetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteAssetRequest; + + /** + * Decodes a DeleteAssetRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteAssetRequest; + + /** + * Verifies a DeleteAssetRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteAssetRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteAssetRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteAssetRequest; + + /** + * Creates a plain object from a DeleteAssetRequest message. Also converts values to other types if specified. + * @param message DeleteAssetRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DeleteAssetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteAssetRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListAssetsRequest. */ + interface IListAssetsRequest { + + /** ListAssetsRequest parent */ + parent?: (string|null); + + /** ListAssetsRequest pageSize */ + pageSize?: (number|null); + + /** ListAssetsRequest pageToken */ + pageToken?: (string|null); + + /** ListAssetsRequest filter */ + filter?: (string|null); + + /** ListAssetsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListAssetsRequest. */ + class ListAssetsRequest implements IListAssetsRequest { + + /** + * Constructs a new ListAssetsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListAssetsRequest); + + /** ListAssetsRequest parent. */ + public parent: string; + + /** ListAssetsRequest pageSize. */ + public pageSize: number; + + /** ListAssetsRequest pageToken. */ + public pageToken: string; + + /** ListAssetsRequest filter. */ + public filter: string; + + /** ListAssetsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListAssetsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAssetsRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListAssetsRequest): google.cloud.dataplex.v1.ListAssetsRequest; + + /** + * Encodes the specified ListAssetsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsRequest.verify|verify} messages. + * @param message ListAssetsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsRequest.verify|verify} messages. + * @param message ListAssetsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAssetsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAssetsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListAssetsRequest; + + /** + * Decodes a ListAssetsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAssetsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListAssetsRequest; + + /** + * Verifies a ListAssetsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAssetsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAssetsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListAssetsRequest; + + /** + * Creates a plain object from a ListAssetsRequest message. Also converts values to other types if specified. + * @param message ListAssetsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListAssetsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAssetsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListAssetsResponse. */ + interface IListAssetsResponse { + + /** ListAssetsResponse assets */ + assets?: (google.cloud.dataplex.v1.IAsset[]|null); + + /** ListAssetsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListAssetsResponse. */ + class ListAssetsResponse implements IListAssetsResponse { + + /** + * Constructs a new ListAssetsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListAssetsResponse); + + /** ListAssetsResponse assets. */ + public assets: google.cloud.dataplex.v1.IAsset[]; + + /** ListAssetsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListAssetsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAssetsResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListAssetsResponse): google.cloud.dataplex.v1.ListAssetsResponse; + + /** + * Encodes the specified ListAssetsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsResponse.verify|verify} messages. + * @param message ListAssetsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsResponse.verify|verify} messages. + * @param message ListAssetsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAssetsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAssetsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListAssetsResponse; + + /** + * Decodes a ListAssetsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAssetsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListAssetsResponse; + + /** + * Verifies a ListAssetsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAssetsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAssetsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListAssetsResponse; + + /** + * Creates a plain object from a ListAssetsResponse message. Also converts values to other types if specified. + * @param message ListAssetsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListAssetsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAssetsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListAssetActionsRequest. */ + interface IListAssetActionsRequest { + + /** ListAssetActionsRequest parent */ + parent?: (string|null); + + /** ListAssetActionsRequest pageSize */ + pageSize?: (number|null); + + /** ListAssetActionsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListAssetActionsRequest. */ + class ListAssetActionsRequest implements IListAssetActionsRequest { + + /** + * Constructs a new ListAssetActionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListAssetActionsRequest); + + /** ListAssetActionsRequest parent. */ + public parent: string; + + /** ListAssetActionsRequest pageSize. */ + public pageSize: number; + + /** ListAssetActionsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListAssetActionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAssetActionsRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListAssetActionsRequest): google.cloud.dataplex.v1.ListAssetActionsRequest; + + /** + * Encodes the specified ListAssetActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetActionsRequest.verify|verify} messages. + * @param message ListAssetActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListAssetActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAssetActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetActionsRequest.verify|verify} messages. + * @param message ListAssetActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListAssetActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAssetActionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAssetActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListAssetActionsRequest; + + /** + * Decodes a ListAssetActionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAssetActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListAssetActionsRequest; + + /** + * Verifies a ListAssetActionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAssetActionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAssetActionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListAssetActionsRequest; + + /** + * Creates a plain object from a ListAssetActionsRequest message. Also converts values to other types if specified. + * @param message ListAssetActionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListAssetActionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAssetActionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetAssetRequest. */ + interface IGetAssetRequest { + + /** GetAssetRequest name */ + name?: (string|null); + } + + /** Represents a GetAssetRequest. */ + class GetAssetRequest implements IGetAssetRequest { + + /** + * Constructs a new GetAssetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGetAssetRequest); + + /** GetAssetRequest name. */ + public name: string; + + /** + * Creates a new GetAssetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetAssetRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGetAssetRequest): google.cloud.dataplex.v1.GetAssetRequest; + + /** + * Encodes the specified GetAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetAssetRequest.verify|verify} messages. + * @param message GetAssetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IGetAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetAssetRequest.verify|verify} messages. + * @param message GetAssetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetAssetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetAssetRequest; + + /** + * Decodes a GetAssetRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetAssetRequest; + + /** + * Verifies a GetAssetRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetAssetRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetAssetRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetAssetRequest; + + /** + * Creates a plain object from a GetAssetRequest message. Also converts values to other types if specified. + * @param message GetAssetRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GetAssetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetAssetRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an OperationMetadata. */ + interface IOperationMetadata { + + /** OperationMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata target */ + target?: (string|null); + + /** OperationMetadata verb */ + verb?: (string|null); + + /** OperationMetadata statusMessage */ + statusMessage?: (string|null); + + /** OperationMetadata requestedCancellation */ + requestedCancellation?: (boolean|null); + + /** OperationMetadata apiVersion */ + apiVersion?: (string|null); + } + + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { + + /** + * Constructs a new OperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IOperationMetadata); + + /** OperationMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata target. */ + public target: string; + + /** OperationMetadata verb. */ + public verb: string; + + /** OperationMetadata statusMessage. */ + public statusMessage: string; + + /** OperationMetadata requestedCancellation. */ + public requestedCancellation: boolean; + + /** OperationMetadata apiVersion. */ + public apiVersion: string; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationMetadata instance + */ + public static create(properties?: google.cloud.dataplex.v1.IOperationMetadata): google.cloud.dataplex.v1.OperationMetadata; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.dataplex.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.OperationMetadata; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.OperationMetadata; + + /** + * Verifies an OperationMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.OperationMetadata; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @param message OperationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateTaskRequest. */ + interface ICreateTaskRequest { + + /** CreateTaskRequest parent */ + parent?: (string|null); + + /** CreateTaskRequest taskId */ + taskId?: (string|null); + + /** CreateTaskRequest task */ + task?: (google.cloud.dataplex.v1.ITask|null); + + /** CreateTaskRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateTaskRequest. */ + class CreateTaskRequest implements ICreateTaskRequest { + + /** + * Constructs a new CreateTaskRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ICreateTaskRequest); + + /** CreateTaskRequest parent. */ + public parent: string; + + /** CreateTaskRequest taskId. */ + public taskId: string; + + /** CreateTaskRequest task. */ + public task?: (google.cloud.dataplex.v1.ITask|null); + + /** CreateTaskRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateTaskRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateTaskRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.ICreateTaskRequest): google.cloud.dataplex.v1.CreateTaskRequest; + + /** + * Encodes the specified CreateTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateTaskRequest.verify|verify} messages. + * @param message CreateTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ICreateTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateTaskRequest.verify|verify} messages. + * @param message CreateTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateTaskRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateTaskRequest; + + /** + * Decodes a CreateTaskRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateTaskRequest; + + /** + * Verifies a CreateTaskRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateTaskRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateTaskRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateTaskRequest; + + /** + * Creates a plain object from a CreateTaskRequest message. Also converts values to other types if specified. + * @param message CreateTaskRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.CreateTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateTaskRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateTaskRequest. */ + interface IUpdateTaskRequest { + + /** UpdateTaskRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateTaskRequest task */ + task?: (google.cloud.dataplex.v1.ITask|null); + + /** UpdateTaskRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents an UpdateTaskRequest. */ + class UpdateTaskRequest implements IUpdateTaskRequest { + + /** + * Constructs a new UpdateTaskRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IUpdateTaskRequest); + + /** UpdateTaskRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateTaskRequest task. */ + public task?: (google.cloud.dataplex.v1.ITask|null); + + /** UpdateTaskRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new UpdateTaskRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateTaskRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IUpdateTaskRequest): google.cloud.dataplex.v1.UpdateTaskRequest; + + /** + * Encodes the specified UpdateTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateTaskRequest.verify|verify} messages. + * @param message UpdateTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IUpdateTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateTaskRequest.verify|verify} messages. + * @param message UpdateTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateTaskRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateTaskRequest; + + /** + * Decodes an UpdateTaskRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateTaskRequest; + + /** + * Verifies an UpdateTaskRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateTaskRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateTaskRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateTaskRequest; + + /** + * Creates a plain object from an UpdateTaskRequest message. Also converts values to other types if specified. + * @param message UpdateTaskRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.UpdateTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateTaskRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteTaskRequest. */ + interface IDeleteTaskRequest { + + /** DeleteTaskRequest name */ + name?: (string|null); + } + + /** Represents a DeleteTaskRequest. */ + class DeleteTaskRequest implements IDeleteTaskRequest { + + /** + * Constructs a new DeleteTaskRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDeleteTaskRequest); + + /** DeleteTaskRequest name. */ + public name: string; + + /** + * Creates a new DeleteTaskRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteTaskRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDeleteTaskRequest): google.cloud.dataplex.v1.DeleteTaskRequest; + + /** + * Encodes the specified DeleteTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteTaskRequest.verify|verify} messages. + * @param message DeleteTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDeleteTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteTaskRequest.verify|verify} messages. + * @param message DeleteTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteTaskRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteTaskRequest; + + /** + * Decodes a DeleteTaskRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteTaskRequest; + + /** + * Verifies a DeleteTaskRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteTaskRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteTaskRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteTaskRequest; + + /** + * Creates a plain object from a DeleteTaskRequest message. Also converts values to other types if specified. + * @param message DeleteTaskRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DeleteTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteTaskRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListTasksRequest. */ + interface IListTasksRequest { + + /** ListTasksRequest parent */ + parent?: (string|null); + + /** ListTasksRequest pageSize */ + pageSize?: (number|null); + + /** ListTasksRequest pageToken */ + pageToken?: (string|null); + + /** ListTasksRequest filter */ + filter?: (string|null); + + /** ListTasksRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListTasksRequest. */ + class ListTasksRequest implements IListTasksRequest { + + /** + * Constructs a new ListTasksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListTasksRequest); + + /** ListTasksRequest parent. */ + public parent: string; + + /** ListTasksRequest pageSize. */ + public pageSize: number; + + /** ListTasksRequest pageToken. */ + public pageToken: string; + + /** ListTasksRequest filter. */ + public filter: string; + + /** ListTasksRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListTasksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTasksRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListTasksRequest): google.cloud.dataplex.v1.ListTasksRequest; + + /** + * Encodes the specified ListTasksRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksRequest.verify|verify} messages. + * @param message ListTasksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListTasksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListTasksRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksRequest.verify|verify} messages. + * @param message ListTasksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListTasksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListTasksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTasksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListTasksRequest; + + /** + * Decodes a ListTasksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTasksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListTasksRequest; + + /** + * Verifies a ListTasksRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListTasksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTasksRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListTasksRequest; + + /** + * Creates a plain object from a ListTasksRequest message. Also converts values to other types if specified. + * @param message ListTasksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListTasksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTasksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListTasksResponse. */ + interface IListTasksResponse { + + /** ListTasksResponse tasks */ + tasks?: (google.cloud.dataplex.v1.ITask[]|null); + + /** ListTasksResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListTasksResponse unreachableLocations */ + unreachableLocations?: (string[]|null); + } + + /** Represents a ListTasksResponse. */ + class ListTasksResponse implements IListTasksResponse { + + /** + * Constructs a new ListTasksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListTasksResponse); + + /** ListTasksResponse tasks. */ + public tasks: google.cloud.dataplex.v1.ITask[]; + + /** ListTasksResponse nextPageToken. */ + public nextPageToken: string; + + /** ListTasksResponse unreachableLocations. */ + public unreachableLocations: string[]; + + /** + * Creates a new ListTasksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTasksResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListTasksResponse): google.cloud.dataplex.v1.ListTasksResponse; + + /** + * Encodes the specified ListTasksResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksResponse.verify|verify} messages. + * @param message ListTasksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListTasksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListTasksResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksResponse.verify|verify} messages. + * @param message ListTasksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListTasksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListTasksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTasksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListTasksResponse; + + /** + * Decodes a ListTasksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTasksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListTasksResponse; + + /** + * Verifies a ListTasksResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListTasksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTasksResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListTasksResponse; + + /** + * Creates a plain object from a ListTasksResponse message. Also converts values to other types if specified. + * @param message ListTasksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListTasksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTasksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetTaskRequest. */ + interface IGetTaskRequest { + + /** GetTaskRequest name */ + name?: (string|null); + } + + /** Represents a GetTaskRequest. */ + class GetTaskRequest implements IGetTaskRequest { + + /** + * Constructs a new GetTaskRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGetTaskRequest); + + /** GetTaskRequest name. */ + public name: string; + + /** + * Creates a new GetTaskRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetTaskRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGetTaskRequest): google.cloud.dataplex.v1.GetTaskRequest; + + /** + * Encodes the specified GetTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetTaskRequest.verify|verify} messages. + * @param message GetTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IGetTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetTaskRequest.verify|verify} messages. + * @param message GetTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetTaskRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetTaskRequest; + + /** + * Decodes a GetTaskRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetTaskRequest; + + /** + * Verifies a GetTaskRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetTaskRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetTaskRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetTaskRequest; + + /** + * Creates a plain object from a GetTaskRequest message. Also converts values to other types if specified. + * @param message GetTaskRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GetTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetTaskRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetJobRequest. */ + interface IGetJobRequest { + + /** GetJobRequest name */ + name?: (string|null); + } + + /** Represents a GetJobRequest. */ + class GetJobRequest implements IGetJobRequest { + + /** + * Constructs a new GetJobRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGetJobRequest); + + /** GetJobRequest name. */ + public name: string; + + /** + * Creates a new GetJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetJobRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGetJobRequest): google.cloud.dataplex.v1.GetJobRequest; + + /** + * Encodes the specified GetJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetJobRequest.verify|verify} messages. + * @param message GetJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IGetJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetJobRequest.verify|verify} messages. + * @param message GetJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetJobRequest; + + /** + * Decodes a GetJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetJobRequest; + + /** + * Verifies a GetJobRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetJobRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetJobRequest; + + /** + * Creates a plain object from a GetJobRequest message. Also converts values to other types if specified. + * @param message GetJobRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GetJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetJobRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListJobsRequest. */ + interface IListJobsRequest { + + /** ListJobsRequest parent */ + parent?: (string|null); + + /** ListJobsRequest pageSize */ + pageSize?: (number|null); + + /** ListJobsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListJobsRequest. */ + class ListJobsRequest implements IListJobsRequest { + + /** + * Constructs a new ListJobsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListJobsRequest); + + /** ListJobsRequest parent. */ + public parent: string; + + /** ListJobsRequest pageSize. */ + public pageSize: number; + + /** ListJobsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListJobsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListJobsRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListJobsRequest): google.cloud.dataplex.v1.ListJobsRequest; + + /** + * Encodes the specified ListJobsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsRequest.verify|verify} messages. + * @param message ListJobsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListJobsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsRequest.verify|verify} messages. + * @param message ListJobsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListJobsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListJobsRequest; + + /** + * Decodes a ListJobsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListJobsRequest; + + /** + * Verifies a ListJobsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListJobsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListJobsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListJobsRequest; + + /** + * Creates a plain object from a ListJobsRequest message. Also converts values to other types if specified. + * @param message ListJobsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListJobsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListJobsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListJobsResponse. */ + interface IListJobsResponse { + + /** ListJobsResponse jobs */ + jobs?: (google.cloud.dataplex.v1.IJob[]|null); + + /** ListJobsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListJobsResponse. */ + class ListJobsResponse implements IListJobsResponse { + + /** + * Constructs a new ListJobsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListJobsResponse); + + /** ListJobsResponse jobs. */ + public jobs: google.cloud.dataplex.v1.IJob[]; + + /** ListJobsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListJobsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListJobsResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListJobsResponse): google.cloud.dataplex.v1.ListJobsResponse; + + /** + * Encodes the specified ListJobsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsResponse.verify|verify} messages. + * @param message ListJobsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListJobsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsResponse.verify|verify} messages. + * @param message ListJobsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListJobsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListJobsResponse; + + /** + * Decodes a ListJobsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListJobsResponse; + + /** + * Verifies a ListJobsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListJobsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListJobsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListJobsResponse; + + /** + * Creates a plain object from a ListJobsResponse message. Also converts values to other types if specified. + * @param message ListJobsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListJobsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListJobsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CancelJobRequest. */ + interface ICancelJobRequest { + + /** CancelJobRequest name */ + name?: (string|null); + } + + /** Represents a CancelJobRequest. */ + class CancelJobRequest implements ICancelJobRequest { + + /** + * Constructs a new CancelJobRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ICancelJobRequest); + + /** CancelJobRequest name. */ + public name: string; + + /** + * Creates a new CancelJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelJobRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.ICancelJobRequest): google.cloud.dataplex.v1.CancelJobRequest; + + /** + * Encodes the specified CancelJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CancelJobRequest.verify|verify} messages. + * @param message CancelJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ICancelJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CancelJobRequest.verify|verify} messages. + * @param message CancelJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ICancelJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CancelJobRequest; + + /** + * Decodes a CancelJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CancelJobRequest; + + /** + * Verifies a CancelJobRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CancelJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelJobRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CancelJobRequest; + + /** + * Creates a plain object from a CancelJobRequest message. Also converts values to other types if specified. + * @param message CancelJobRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.CancelJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelJobRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Task. */ + interface ITask { + + /** Task name */ + name?: (string|null); + + /** Task uid */ + uid?: (string|null); + + /** Task createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Task updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Task description */ + description?: (string|null); + + /** Task displayName */ + displayName?: (string|null); + + /** Task state */ + state?: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State|null); + + /** Task labels */ + labels?: ({ [k: string]: string }|null); + + /** Task triggerSpec */ + triggerSpec?: (google.cloud.dataplex.v1.Task.ITriggerSpec|null); + + /** Task executionSpec */ + executionSpec?: (google.cloud.dataplex.v1.Task.IExecutionSpec|null); + + /** Task spark */ + spark?: (google.cloud.dataplex.v1.Task.ISparkTaskConfig|null); + } + + /** Represents a Task. */ + class Task implements ITask { + + /** + * Constructs a new Task. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ITask); + + /** Task name. */ + public name: string; + + /** Task uid. */ + public uid: string; + + /** Task createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Task updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Task description. */ + public description: string; + + /** Task displayName. */ + public displayName: string; + + /** Task state. */ + public state: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State); + + /** Task labels. */ + public labels: { [k: string]: string }; + + /** Task triggerSpec. */ + public triggerSpec?: (google.cloud.dataplex.v1.Task.ITriggerSpec|null); + + /** Task executionSpec. */ + public executionSpec?: (google.cloud.dataplex.v1.Task.IExecutionSpec|null); + + /** Task spark. */ + public spark?: (google.cloud.dataplex.v1.Task.ISparkTaskConfig|null); + + /** Task config. */ + public config?: "spark"; + + /** + * Creates a new Task instance using the specified properties. + * @param [properties] Properties to set + * @returns Task instance + */ + public static create(properties?: google.cloud.dataplex.v1.ITask): google.cloud.dataplex.v1.Task; + + /** + * Encodes the specified Task message. Does not implicitly {@link google.cloud.dataplex.v1.Task.verify|verify} messages. + * @param message Task message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ITask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Task message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.verify|verify} messages. + * @param message Task message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ITask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Task message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Task + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Task; + + /** + * Decodes a Task message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Task + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Task; + + /** + * Verifies a Task message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Task message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Task + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task; + + /** + * Creates a plain object from a Task message. Also converts values to other types if specified. + * @param message Task + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Task, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Task to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Task { + + /** Properties of an InfrastructureSpec. */ + interface IInfrastructureSpec { + + /** InfrastructureSpec batch */ + batch?: (google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources|null); + + /** InfrastructureSpec containerImage */ + containerImage?: (google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime|null); + + /** InfrastructureSpec vpcNetwork */ + vpcNetwork?: (google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork|null); + } + + /** Represents an InfrastructureSpec. */ + class InfrastructureSpec implements IInfrastructureSpec { + + /** + * Constructs a new InfrastructureSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Task.IInfrastructureSpec); + + /** InfrastructureSpec batch. */ + public batch?: (google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources|null); + + /** InfrastructureSpec containerImage. */ + public containerImage?: (google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime|null); + + /** InfrastructureSpec vpcNetwork. */ + public vpcNetwork?: (google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork|null); + + /** InfrastructureSpec resources. */ + public resources?: "batch"; + + /** InfrastructureSpec runtime. */ + public runtime?: "containerImage"; + + /** InfrastructureSpec network. */ + public network?: "vpcNetwork"; + + /** + * Creates a new InfrastructureSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns InfrastructureSpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.Task.IInfrastructureSpec): google.cloud.dataplex.v1.Task.InfrastructureSpec; + + /** + * Encodes the specified InfrastructureSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.verify|verify} messages. + * @param message InfrastructureSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Task.IInfrastructureSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InfrastructureSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.verify|verify} messages. + * @param message InfrastructureSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Task.IInfrastructureSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InfrastructureSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InfrastructureSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Task.InfrastructureSpec; + + /** + * Decodes an InfrastructureSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InfrastructureSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Task.InfrastructureSpec; + + /** + * Verifies an InfrastructureSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InfrastructureSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InfrastructureSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.InfrastructureSpec; + + /** + * Creates a plain object from an InfrastructureSpec message. Also converts values to other types if specified. + * @param message InfrastructureSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Task.InfrastructureSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InfrastructureSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace InfrastructureSpec { + + /** Properties of a BatchComputeResources. */ + interface IBatchComputeResources { + + /** BatchComputeResources executorsCount */ + executorsCount?: (number|null); + + /** BatchComputeResources maxExecutorsCount */ + maxExecutorsCount?: (number|null); + } + + /** Represents a BatchComputeResources. */ + class BatchComputeResources implements IBatchComputeResources { + + /** + * Constructs a new BatchComputeResources. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources); + + /** BatchComputeResources executorsCount. */ + public executorsCount: number; + + /** BatchComputeResources maxExecutorsCount. */ + public maxExecutorsCount: number; + + /** + * Creates a new BatchComputeResources instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchComputeResources instance + */ + public static create(properties?: google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources): google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources; + + /** + * Encodes the specified BatchComputeResources message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.verify|verify} messages. + * @param message BatchComputeResources message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchComputeResources message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.verify|verify} messages. + * @param message BatchComputeResources message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchComputeResources message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchComputeResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources; + + /** + * Decodes a BatchComputeResources message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchComputeResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources; + + /** + * Verifies a BatchComputeResources message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BatchComputeResources message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchComputeResources + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources; + + /** + * Creates a plain object from a BatchComputeResources message. Also converts values to other types if specified. + * @param message BatchComputeResources + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchComputeResources to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ContainerImageRuntime. */ + interface IContainerImageRuntime { + + /** ContainerImageRuntime javaJars */ + javaJars?: (string[]|null); + + /** ContainerImageRuntime pythonPackages */ + pythonPackages?: (string[]|null); + + /** ContainerImageRuntime properties */ + properties?: ({ [k: string]: string }|null); + } + + /** Represents a ContainerImageRuntime. */ + class ContainerImageRuntime implements IContainerImageRuntime { + + /** + * Constructs a new ContainerImageRuntime. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime); + + /** ContainerImageRuntime javaJars. */ + public javaJars: string[]; + + /** ContainerImageRuntime pythonPackages. */ + public pythonPackages: string[]; + + /** ContainerImageRuntime properties. */ + public properties: { [k: string]: string }; + + /** + * Creates a new ContainerImageRuntime instance using the specified properties. + * @param [properties] Properties to set + * @returns ContainerImageRuntime instance + */ + public static create(properties?: google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime): google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime; + + /** + * Encodes the specified ContainerImageRuntime message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.verify|verify} messages. + * @param message ContainerImageRuntime message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ContainerImageRuntime message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.verify|verify} messages. + * @param message ContainerImageRuntime message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ContainerImageRuntime message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ContainerImageRuntime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime; + + /** + * Decodes a ContainerImageRuntime message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ContainerImageRuntime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime; + + /** + * Verifies a ContainerImageRuntime message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ContainerImageRuntime message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ContainerImageRuntime + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime; + + /** + * Creates a plain object from a ContainerImageRuntime message. Also converts values to other types if specified. + * @param message ContainerImageRuntime + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ContainerImageRuntime to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a VpcNetwork. */ + interface IVpcNetwork { + + /** VpcNetwork network */ + network?: (string|null); + + /** VpcNetwork subNetwork */ + subNetwork?: (string|null); + + /** VpcNetwork networkTags */ + networkTags?: (string[]|null); + } + + /** Represents a VpcNetwork. */ + class VpcNetwork implements IVpcNetwork { + + /** + * Constructs a new VpcNetwork. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork); + + /** VpcNetwork network. */ + public network?: (string|null); + + /** VpcNetwork subNetwork. */ + public subNetwork?: (string|null); + + /** VpcNetwork networkTags. */ + public networkTags: string[]; + + /** VpcNetwork networkName. */ + public networkName?: ("network"|"subNetwork"); + + /** + * Creates a new VpcNetwork instance using the specified properties. + * @param [properties] Properties to set + * @returns VpcNetwork instance + */ + public static create(properties?: google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork): google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork; + + /** + * Encodes the specified VpcNetwork message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.verify|verify} messages. + * @param message VpcNetwork message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VpcNetwork message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.verify|verify} messages. + * @param message VpcNetwork message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VpcNetwork message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VpcNetwork + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork; + + /** + * Decodes a VpcNetwork message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VpcNetwork + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork; + + /** + * Verifies a VpcNetwork message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VpcNetwork message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VpcNetwork + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork; + + /** + * Creates a plain object from a VpcNetwork message. Also converts values to other types if specified. + * @param message VpcNetwork + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VpcNetwork to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a TriggerSpec. */ + interface ITriggerSpec { + + /** TriggerSpec type */ + type?: (google.cloud.dataplex.v1.Task.TriggerSpec.Type|keyof typeof google.cloud.dataplex.v1.Task.TriggerSpec.Type|null); + + /** TriggerSpec startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** TriggerSpec disabled */ + disabled?: (boolean|null); + + /** TriggerSpec maxRetries */ + maxRetries?: (number|null); + + /** TriggerSpec schedule */ + schedule?: (string|null); + } + + /** Represents a TriggerSpec. */ + class TriggerSpec implements ITriggerSpec { + + /** + * Constructs a new TriggerSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Task.ITriggerSpec); + + /** TriggerSpec type. */ + public type: (google.cloud.dataplex.v1.Task.TriggerSpec.Type|keyof typeof google.cloud.dataplex.v1.Task.TriggerSpec.Type); + + /** TriggerSpec startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** TriggerSpec disabled. */ + public disabled: boolean; + + /** TriggerSpec maxRetries. */ + public maxRetries: number; + + /** TriggerSpec schedule. */ + public schedule?: (string|null); + + /** TriggerSpec trigger. */ + public trigger?: "schedule"; + + /** + * Creates a new TriggerSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns TriggerSpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.Task.ITriggerSpec): google.cloud.dataplex.v1.Task.TriggerSpec; + + /** + * Encodes the specified TriggerSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.TriggerSpec.verify|verify} messages. + * @param message TriggerSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Task.ITriggerSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TriggerSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.TriggerSpec.verify|verify} messages. + * @param message TriggerSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Task.ITriggerSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TriggerSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TriggerSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Task.TriggerSpec; + + /** + * Decodes a TriggerSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TriggerSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Task.TriggerSpec; + + /** + * Verifies a TriggerSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TriggerSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TriggerSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.TriggerSpec; + + /** + * Creates a plain object from a TriggerSpec message. Also converts values to other types if specified. + * @param message TriggerSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Task.TriggerSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TriggerSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace TriggerSpec { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + ON_DEMAND = 1, + RECURRING = 2 + } + } + + /** Properties of an ExecutionSpec. */ + interface IExecutionSpec { + + /** ExecutionSpec args */ + args?: ({ [k: string]: string }|null); + + /** ExecutionSpec serviceAccount */ + serviceAccount?: (string|null); + + /** ExecutionSpec maxJobExecutionLifetime */ + maxJobExecutionLifetime?: (google.protobuf.IDuration|null); + } + + /** Represents an ExecutionSpec. */ + class ExecutionSpec implements IExecutionSpec { + + /** + * Constructs a new ExecutionSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Task.IExecutionSpec); + + /** ExecutionSpec args. */ + public args: { [k: string]: string }; + + /** ExecutionSpec serviceAccount. */ + public serviceAccount: string; + + /** ExecutionSpec maxJobExecutionLifetime. */ + public maxJobExecutionLifetime?: (google.protobuf.IDuration|null); + + /** + * Creates a new ExecutionSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecutionSpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.Task.IExecutionSpec): google.cloud.dataplex.v1.Task.ExecutionSpec; + + /** + * Encodes the specified ExecutionSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionSpec.verify|verify} messages. + * @param message ExecutionSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Task.IExecutionSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecutionSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionSpec.verify|verify} messages. + * @param message ExecutionSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Task.IExecutionSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecutionSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecutionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Task.ExecutionSpec; + + /** + * Decodes an ExecutionSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecutionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Task.ExecutionSpec; + + /** + * Verifies an ExecutionSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExecutionSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecutionSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.ExecutionSpec; + + /** + * Creates a plain object from an ExecutionSpec message. Also converts values to other types if specified. + * @param message ExecutionSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Task.ExecutionSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecutionSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SparkTaskConfig. */ + interface ISparkTaskConfig { + + /** SparkTaskConfig mainJarFileUri */ + mainJarFileUri?: (string|null); + + /** SparkTaskConfig mainClass */ + mainClass?: (string|null); + + /** SparkTaskConfig pythonScriptFile */ + pythonScriptFile?: (string|null); + + /** SparkTaskConfig sqlScriptFile */ + sqlScriptFile?: (string|null); + + /** SparkTaskConfig sqlScript */ + sqlScript?: (string|null); + + /** SparkTaskConfig fileUris */ + fileUris?: (string[]|null); + + /** SparkTaskConfig archiveUris */ + archiveUris?: (string[]|null); + + /** SparkTaskConfig infrastructureSpec */ + infrastructureSpec?: (google.cloud.dataplex.v1.Task.IInfrastructureSpec|null); + } + + /** Represents a SparkTaskConfig. */ + class SparkTaskConfig implements ISparkTaskConfig { + + /** + * Constructs a new SparkTaskConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Task.ISparkTaskConfig); + + /** SparkTaskConfig mainJarFileUri. */ + public mainJarFileUri?: (string|null); + + /** SparkTaskConfig mainClass. */ + public mainClass?: (string|null); + + /** SparkTaskConfig pythonScriptFile. */ + public pythonScriptFile?: (string|null); + + /** SparkTaskConfig sqlScriptFile. */ + public sqlScriptFile?: (string|null); + + /** SparkTaskConfig sqlScript. */ + public sqlScript?: (string|null); + + /** SparkTaskConfig fileUris. */ + public fileUris: string[]; + + /** SparkTaskConfig archiveUris. */ + public archiveUris: string[]; + + /** SparkTaskConfig infrastructureSpec. */ + public infrastructureSpec?: (google.cloud.dataplex.v1.Task.IInfrastructureSpec|null); + + /** SparkTaskConfig driver. */ + public driver?: ("mainJarFileUri"|"mainClass"|"pythonScriptFile"|"sqlScriptFile"|"sqlScript"); + + /** + * Creates a new SparkTaskConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SparkTaskConfig instance + */ + public static create(properties?: google.cloud.dataplex.v1.Task.ISparkTaskConfig): google.cloud.dataplex.v1.Task.SparkTaskConfig; + + /** + * Encodes the specified SparkTaskConfig message. Does not implicitly {@link google.cloud.dataplex.v1.Task.SparkTaskConfig.verify|verify} messages. + * @param message SparkTaskConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Task.ISparkTaskConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SparkTaskConfig message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.SparkTaskConfig.verify|verify} messages. + * @param message SparkTaskConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Task.ISparkTaskConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SparkTaskConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SparkTaskConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Task.SparkTaskConfig; + + /** + * Decodes a SparkTaskConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SparkTaskConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Task.SparkTaskConfig; + + /** + * Verifies a SparkTaskConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SparkTaskConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SparkTaskConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.SparkTaskConfig; + + /** + * Creates a plain object from a SparkTaskConfig message. Also converts values to other types if specified. + * @param message SparkTaskConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Task.SparkTaskConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SparkTaskConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a Job. */ + interface IJob { + + /** Job name */ + name?: (string|null); + + /** Job uid */ + uid?: (string|null); + + /** Job startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** Job endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** Job state */ + state?: (google.cloud.dataplex.v1.Job.State|keyof typeof google.cloud.dataplex.v1.Job.State|null); + + /** Job retryCount */ + retryCount?: (number|null); + + /** Job service */ + service?: (google.cloud.dataplex.v1.Job.Service|keyof typeof google.cloud.dataplex.v1.Job.Service|null); + + /** Job serviceJob */ + serviceJob?: (string|null); + + /** Job message */ + message?: (string|null); + } + + /** Represents a Job. */ + class Job implements IJob { + + /** + * Constructs a new Job. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IJob); + + /** Job name. */ + public name: string; + + /** Job uid. */ + public uid: string; + + /** Job startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** Job endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** Job state. */ + public state: (google.cloud.dataplex.v1.Job.State|keyof typeof google.cloud.dataplex.v1.Job.State); + + /** Job retryCount. */ + public retryCount: number; + + /** Job service. */ + public service: (google.cloud.dataplex.v1.Job.Service|keyof typeof google.cloud.dataplex.v1.Job.Service); + + /** Job serviceJob. */ + public serviceJob: string; + + /** Job message. */ + public message: string; + + /** + * Creates a new Job instance using the specified properties. + * @param [properties] Properties to set + * @returns Job instance + */ + public static create(properties?: google.cloud.dataplex.v1.IJob): google.cloud.dataplex.v1.Job; + + /** + * Encodes the specified Job message. Does not implicitly {@link google.cloud.dataplex.v1.Job.verify|verify} messages. + * @param message Job message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Job message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Job.verify|verify} messages. + * @param message Job message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Job message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Job + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Job; + + /** + * Decodes a Job message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Job + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Job; + + /** + * Verifies a Job message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Job message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Job + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Job; + + /** + * Creates a plain object from a Job message. Also converts values to other types if specified. + * @param message Job + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Job, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Job to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Job { + + /** Service enum. */ + enum Service { + SERVICE_UNSPECIFIED = 0, + DATAPROC = 1 + } + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + RUNNING = 1, + CANCELLING = 2, + CANCELLED = 3, + SUCCEEDED = 4, + FAILED = 5, + ABORTED = 6 + } + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + + /** + * Verifies a Http message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get?: (string|null); + + /** HttpRule put. */ + public put?: (string|null); + + /** HttpRule post. */ + public post?: (string|null); + + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7 + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions phpGenericServices */ + phpGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions phpGenericServices. */ + public phpGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + + /** MethodOptions .google.longrunning.operationInfo */ + ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|string|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long|string); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + + /** + * Verifies a Timestamp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + + /** + * Verifies an Empty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldMask. */ + interface IFieldMask { + + /** FieldMask paths */ + paths?: (string[]|null); + } + + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { + + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); + + /** FieldMask paths. */ + public paths: string[]; + + /** + * Creates a new FieldMask instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldMask instance + */ + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + + /** + * Verifies a FieldMask message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldMask + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldMask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|string|null); + } + + /** Represents an Any. */ + class Any implements IAny { + + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: (Uint8Array|string); + + /** + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Any message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; + + /** + * Verifies an Any message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Any + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace longrunning. */ + namespace longrunning { + + /** Represents an Operations */ + class Operations extends $protobuf.rpc.Service { + + /** + * Constructs a new Operations service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Operations service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Operations; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOperationsResponse + */ + public listOperations(request: google.longrunning.IListOperationsRequest, callback: google.longrunning.Operations.ListOperationsCallback): void; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @returns Promise + */ + public listOperations(request: google.longrunning.IListOperationsRequest): Promise; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public getOperation(request: google.longrunning.IGetOperationRequest, callback: google.longrunning.Operations.GetOperationCallback): void; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @returns Promise + */ + public getOperation(request: google.longrunning.IGetOperationRequest): Promise; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest, callback: google.longrunning.Operations.DeleteOperationCallback): void; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @returns Promise + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest): Promise; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest, callback: google.longrunning.Operations.CancelOperationCallback): void; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @returns Promise + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest): Promise; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest, callback: google.longrunning.Operations.WaitOperationCallback): void; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @returns Promise + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest): Promise; + } + + namespace Operations { + + /** + * Callback as used by {@link google.longrunning.Operations#listOperations}. + * @param error Error, if any + * @param [response] ListOperationsResponse + */ + type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#getOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#deleteOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#cancelOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#waitOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type WaitOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of an Operation. */ + interface IOperation { + + /** Operation name */ + name?: (string|null); + + /** Operation metadata */ + metadata?: (google.protobuf.IAny|null); + + /** Operation done */ + done?: (boolean|null); + + /** Operation error */ + error?: (google.rpc.IStatus|null); + + /** Operation response */ + response?: (google.protobuf.IAny|null); + } + + /** Represents an Operation. */ + class Operation implements IOperation { + + /** + * Constructs a new Operation. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperation); + + /** Operation name. */ + public name: string; + + /** Operation metadata. */ + public metadata?: (google.protobuf.IAny|null); + + /** Operation done. */ + public done: boolean; + + /** Operation error. */ + public error?: (google.rpc.IStatus|null); + + /** Operation response. */ + public response?: (google.protobuf.IAny|null); + + /** Operation result. */ + public result?: ("error"|"response"); + + /** + * Creates a new Operation instance using the specified properties. + * @param [properties] Properties to set + * @returns Operation instance + */ + public static create(properties?: google.longrunning.IOperation): google.longrunning.Operation; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.Operation; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.Operation; + + /** + * Verifies an Operation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Operation + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.Operation; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @param message Operation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.Operation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Operation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetOperationRequest. */ + interface IGetOperationRequest { + + /** GetOperationRequest name */ + name?: (string|null); + } + + /** Represents a GetOperationRequest. */ + class GetOperationRequest implements IGetOperationRequest { + + /** + * Constructs a new GetOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IGetOperationRequest); + + /** GetOperationRequest name. */ + public name: string; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOperationRequest instance + */ + public static create(properties?: google.longrunning.IGetOperationRequest): google.longrunning.GetOperationRequest; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.GetOperationRequest; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.GetOperationRequest; + + /** + * Verifies a GetOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.GetOperationRequest; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @param message GetOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListOperationsRequest. */ + interface IListOperationsRequest { + + /** ListOperationsRequest name */ + name?: (string|null); + + /** ListOperationsRequest filter */ + filter?: (string|null); + + /** ListOperationsRequest pageSize */ + pageSize?: (number|null); + + /** ListOperationsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListOperationsRequest. */ + class ListOperationsRequest implements IListOperationsRequest { + + /** + * Constructs a new ListOperationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsRequest); + + /** ListOperationsRequest name. */ + public name: string; + + /** ListOperationsRequest filter. */ + public filter: string; + + /** ListOperationsRequest pageSize. */ + public pageSize: number; + + /** ListOperationsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsRequest instance + */ + public static create(properties?: google.longrunning.IListOperationsRequest): google.longrunning.ListOperationsRequest; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsRequest; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsRequest; + + /** + * Verifies a ListOperationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsRequest; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @param message ListOperationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListOperationsResponse. */ + interface IListOperationsResponse { + + /** ListOperationsResponse operations */ + operations?: (google.longrunning.IOperation[]|null); + + /** ListOperationsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListOperationsResponse. */ + class ListOperationsResponse implements IListOperationsResponse { + + /** + * Constructs a new ListOperationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsResponse); + + /** ListOperationsResponse operations. */ + public operations: google.longrunning.IOperation[]; + + /** ListOperationsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsResponse instance + */ + public static create(properties?: google.longrunning.IListOperationsResponse): google.longrunning.ListOperationsResponse; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsResponse; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsResponse; + + /** + * Verifies a ListOperationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsResponse; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @param message ListOperationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CancelOperationRequest. */ + interface ICancelOperationRequest { + + /** CancelOperationRequest name */ + name?: (string|null); + } + + /** Represents a CancelOperationRequest. */ + class CancelOperationRequest implements ICancelOperationRequest { + + /** + * Constructs a new CancelOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.ICancelOperationRequest); + + /** CancelOperationRequest name. */ + public name: string; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelOperationRequest instance + */ + public static create(properties?: google.longrunning.ICancelOperationRequest): google.longrunning.CancelOperationRequest; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.CancelOperationRequest; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.CancelOperationRequest; + + /** + * Verifies a CancelOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.CancelOperationRequest; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @param message CancelOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteOperationRequest. */ + interface IDeleteOperationRequest { + + /** DeleteOperationRequest name */ + name?: (string|null); + } + + /** Represents a DeleteOperationRequest. */ + class DeleteOperationRequest implements IDeleteOperationRequest { + + /** + * Constructs a new DeleteOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IDeleteOperationRequest); + + /** DeleteOperationRequest name. */ + public name: string; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteOperationRequest instance + */ + public static create(properties?: google.longrunning.IDeleteOperationRequest): google.longrunning.DeleteOperationRequest; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.DeleteOperationRequest; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.DeleteOperationRequest; + + /** + * Verifies a DeleteOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.DeleteOperationRequest; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @param message DeleteOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.DeleteOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WaitOperationRequest. */ + interface IWaitOperationRequest { + + /** WaitOperationRequest name */ + name?: (string|null); + + /** WaitOperationRequest timeout */ + timeout?: (google.protobuf.IDuration|null); + } + + /** Represents a WaitOperationRequest. */ + class WaitOperationRequest implements IWaitOperationRequest { + + /** + * Constructs a new WaitOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IWaitOperationRequest); + + /** WaitOperationRequest name. */ + public name: string; + + /** WaitOperationRequest timeout. */ + public timeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns WaitOperationRequest instance + */ + public static create(properties?: google.longrunning.IWaitOperationRequest): google.longrunning.WaitOperationRequest; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.WaitOperationRequest; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.WaitOperationRequest; + + /** + * Verifies a WaitOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WaitOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.WaitOperationRequest; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @param message WaitOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.WaitOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WaitOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an OperationInfo. */ + interface IOperationInfo { + + /** OperationInfo responseType */ + responseType?: (string|null); + + /** OperationInfo metadataType */ + metadataType?: (string|null); + } + + /** Represents an OperationInfo. */ + class OperationInfo implements IOperationInfo { + + /** + * Constructs a new OperationInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperationInfo); + + /** OperationInfo responseType. */ + public responseType: string; + + /** OperationInfo metadataType. */ + public metadataType: string; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationInfo instance + */ + public static create(properties?: google.longrunning.IOperationInfo): google.longrunning.OperationInfo; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.OperationInfo; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.OperationInfo; + + /** + * Verifies an OperationInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationInfo + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.OperationInfo; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @param message OperationInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.OperationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace rpc. */ + namespace rpc { + + /** Properties of a Status. */ + interface IStatus { + + /** Status code */ + code?: (number|null); + + /** Status message */ + message?: (string|null); + + /** Status details */ + details?: (google.protobuf.IAny[]|null); + } + + /** Represents a Status. */ + class Status implements IStatus { + + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IStatus); + + /** Status code. */ + public code: number; + + /** Status message. */ + public message: string; + + /** Status details. */ + public details: google.protobuf.IAny[]; + + /** + * Creates a new Status instance using the specified properties. + * @param [properties] Properties to set + * @returns Status instance + */ + public static create(properties?: google.rpc.IStatus): google.rpc.Status; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Status message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; + + /** + * Verifies a Status message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Status + */ + public static fromObject(object: { [k: string]: any }): google.rpc.Status; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @param message Status + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Status to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } +} diff --git a/packages/google-cloud-dataplex/protos/protos.js b/packages/google-cloud-dataplex/protos/protos.js new file mode 100644 index 00000000000..6be7684d7b4 --- /dev/null +++ b/packages/google-cloud-dataplex/protos/protos.js @@ -0,0 +1,40911 @@ +// Copyright 2022 Google LLC +// +// 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. + +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("google-gax").protobufMinimal); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots._google_cloud_dataplex_protos || ($protobuf.roots._google_cloud_dataplex_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.dataplex = (function() { + + /** + * Namespace dataplex. + * @memberof google.cloud + * @namespace + */ + var dataplex = {}; + + dataplex.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.cloud.dataplex + * @namespace + */ + var v1 = {}; + + v1.DiscoveryEvent = (function() { + + /** + * Properties of a DiscoveryEvent. + * @memberof google.cloud.dataplex.v1 + * @interface IDiscoveryEvent + * @property {string|null} [message] DiscoveryEvent message + * @property {string|null} [lakeId] DiscoveryEvent lakeId + * @property {string|null} [zoneId] DiscoveryEvent zoneId + * @property {string|null} [assetId] DiscoveryEvent assetId + * @property {string|null} [dataLocation] DiscoveryEvent dataLocation + * @property {google.cloud.dataplex.v1.DiscoveryEvent.EventType|null} [type] DiscoveryEvent type + * @property {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null} [config] DiscoveryEvent config + * @property {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null} [entity] DiscoveryEvent entity + * @property {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null} [partition] DiscoveryEvent partition + * @property {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null} [action] DiscoveryEvent action + */ + + /** + * Constructs a new DiscoveryEvent. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DiscoveryEvent. + * @implements IDiscoveryEvent + * @constructor + * @param {google.cloud.dataplex.v1.IDiscoveryEvent=} [properties] Properties to set + */ + function DiscoveryEvent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DiscoveryEvent message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.message = ""; + + /** + * DiscoveryEvent lakeId. + * @member {string} lakeId + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.lakeId = ""; + + /** + * DiscoveryEvent zoneId. + * @member {string} zoneId + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.zoneId = ""; + + /** + * DiscoveryEvent assetId. + * @member {string} assetId + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.assetId = ""; + + /** + * DiscoveryEvent dataLocation. + * @member {string} dataLocation + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.dataLocation = ""; + + /** + * DiscoveryEvent type. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.EventType} type + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.type = 0; + + /** + * DiscoveryEvent config. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null|undefined} config + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.config = null; + + /** + * DiscoveryEvent entity. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null|undefined} entity + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.entity = null; + + /** + * DiscoveryEvent partition. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null|undefined} partition + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.partition = null; + + /** + * DiscoveryEvent action. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null|undefined} action + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.action = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DiscoveryEvent details. + * @member {"config"|"entity"|"partition"|"action"|undefined} details + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + Object.defineProperty(DiscoveryEvent.prototype, "details", { + get: $util.oneOfGetter($oneOfFields = ["config", "entity", "partition", "action"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DiscoveryEvent instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {google.cloud.dataplex.v1.IDiscoveryEvent=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent instance + */ + DiscoveryEvent.create = function create(properties) { + return new DiscoveryEvent(properties); + }; + + /** + * Encodes the specified DiscoveryEvent message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {google.cloud.dataplex.v1.IDiscoveryEvent} message DiscoveryEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + if (message.lakeId != null && Object.hasOwnProperty.call(message, "lakeId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.lakeId); + if (message.zoneId != null && Object.hasOwnProperty.call(message, "zoneId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.zoneId); + if (message.assetId != null && Object.hasOwnProperty.call(message, "assetId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.assetId); + if (message.dataLocation != null && Object.hasOwnProperty.call(message, "dataLocation")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.dataLocation); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.type); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.encode(message.config, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) + $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.encode(message.entity, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) + $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.encode(message.partition, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.encode(message.action, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DiscoveryEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {google.cloud.dataplex.v1.IDiscoveryEvent} message DiscoveryEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoveryEvent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.message = reader.string(); + break; + case 2: + message.lakeId = reader.string(); + break; + case 3: + message.zoneId = reader.string(); + break; + case 4: + message.assetId = reader.string(); + break; + case 5: + message.dataLocation = reader.string(); + break; + case 10: + message.type = reader.int32(); + break; + case 20: + message.config = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.decode(reader, reader.uint32()); + break; + case 21: + message.entity = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.decode(reader, reader.uint32()); + break; + case 22: + message.partition = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.decode(reader, reader.uint32()); + break; + case 23: + message.action = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DiscoveryEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoveryEvent message. + * @function verify + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoveryEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.lakeId != null && message.hasOwnProperty("lakeId")) + if (!$util.isString(message.lakeId)) + return "lakeId: string expected"; + if (message.zoneId != null && message.hasOwnProperty("zoneId")) + if (!$util.isString(message.zoneId)) + return "zoneId: string expected"; + if (message.assetId != null && message.hasOwnProperty("assetId")) + if (!$util.isString(message.assetId)) + return "assetId: string expected"; + if (message.dataLocation != null && message.hasOwnProperty("dataLocation")) + if (!$util.isString(message.dataLocation)) + return "dataLocation: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.config != null && message.hasOwnProperty("config")) { + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify(message.config); + if (error) + return "config." + error; + } + } + if (message.entity != null && message.hasOwnProperty("entity")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify(message.entity); + if (error) + return "entity." + error; + } + } + if (message.partition != null && message.hasOwnProperty("partition")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify(message.partition); + if (error) + return "partition." + error; + } + } + if (message.action != null && message.hasOwnProperty("action")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify(message.action); + if (error) + return "action." + error; + } + } + return null; + }; + + /** + * Creates a DiscoveryEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent + */ + DiscoveryEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent) + return object; + var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent(); + if (object.message != null) + message.message = String(object.message); + if (object.lakeId != null) + message.lakeId = String(object.lakeId); + if (object.zoneId != null) + message.zoneId = String(object.zoneId); + if (object.assetId != null) + message.assetId = String(object.assetId); + if (object.dataLocation != null) + message.dataLocation = String(object.dataLocation); + switch (object.type) { + case "EVENT_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "CONFIG": + case 1: + message.type = 1; + break; + case "ENTITY_CREATED": + case 2: + message.type = 2; + break; + case "ENTITY_UPDATED": + case 3: + message.type = 3; + break; + case "ENTITY_DELETED": + case 4: + message.type = 4; + break; + case "PARTITION_CREATED": + case 5: + message.type = 5; + break; + case "PARTITION_UPDATED": + case 6: + message.type = 6; + break; + case "PARTITION_DELETED": + case 7: + message.type = 7; + break; + } + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.config: object expected"); + message.config = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.fromObject(object.config); + } + if (object.entity != null) { + if (typeof object.entity !== "object") + throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.entity: object expected"); + message.entity = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.fromObject(object.entity); + } + if (object.partition != null) { + if (typeof object.partition !== "object") + throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.partition: object expected"); + message.partition = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.fromObject(object.partition); + } + if (object.action != null) { + if (typeof object.action !== "object") + throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.action: object expected"); + message.action = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.fromObject(object.action); + } + return message; + }; + + /** + * Creates a plain object from a DiscoveryEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent} message DiscoveryEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoveryEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.message = ""; + object.lakeId = ""; + object.zoneId = ""; + object.assetId = ""; + object.dataLocation = ""; + object.type = options.enums === String ? "EVENT_TYPE_UNSPECIFIED" : 0; + } + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.lakeId != null && message.hasOwnProperty("lakeId")) + object.lakeId = message.lakeId; + if (message.zoneId != null && message.hasOwnProperty("zoneId")) + object.zoneId = message.zoneId; + if (message.assetId != null && message.hasOwnProperty("assetId")) + object.assetId = message.assetId; + if (message.dataLocation != null && message.hasOwnProperty("dataLocation")) + object.dataLocation = message.dataLocation; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DiscoveryEvent.EventType[message.type] : message.type; + if (message.config != null && message.hasOwnProperty("config")) { + object.config = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.toObject(message.config, options); + if (options.oneofs) + object.details = "config"; + } + if (message.entity != null && message.hasOwnProperty("entity")) { + object.entity = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.toObject(message.entity, options); + if (options.oneofs) + object.details = "entity"; + } + if (message.partition != null && message.hasOwnProperty("partition")) { + object.partition = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.toObject(message.partition, options); + if (options.oneofs) + object.details = "partition"; + } + if (message.action != null && message.hasOwnProperty("action")) { + object.action = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.toObject(message.action, options); + if (options.oneofs) + object.details = "action"; + } + return object; + }; + + /** + * Converts this DiscoveryEvent to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + * @returns {Object.} JSON object + */ + DiscoveryEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * EventType enum. + * @name google.cloud.dataplex.v1.DiscoveryEvent.EventType + * @enum {number} + * @property {number} EVENT_TYPE_UNSPECIFIED=0 EVENT_TYPE_UNSPECIFIED value + * @property {number} CONFIG=1 CONFIG value + * @property {number} ENTITY_CREATED=2 ENTITY_CREATED value + * @property {number} ENTITY_UPDATED=3 ENTITY_UPDATED value + * @property {number} ENTITY_DELETED=4 ENTITY_DELETED value + * @property {number} PARTITION_CREATED=5 PARTITION_CREATED value + * @property {number} PARTITION_UPDATED=6 PARTITION_UPDATED value + * @property {number} PARTITION_DELETED=7 PARTITION_DELETED value + */ + DiscoveryEvent.EventType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EVENT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CONFIG"] = 1; + values[valuesById[2] = "ENTITY_CREATED"] = 2; + values[valuesById[3] = "ENTITY_UPDATED"] = 3; + values[valuesById[4] = "ENTITY_DELETED"] = 4; + values[valuesById[5] = "PARTITION_CREATED"] = 5; + values[valuesById[6] = "PARTITION_UPDATED"] = 6; + values[valuesById[7] = "PARTITION_DELETED"] = 7; + return values; + })(); + + /** + * EntityType enum. + * @name google.cloud.dataplex.v1.DiscoveryEvent.EntityType + * @enum {number} + * @property {number} ENTITY_TYPE_UNSPECIFIED=0 ENTITY_TYPE_UNSPECIFIED value + * @property {number} TABLE=1 TABLE value + * @property {number} FILESET=2 FILESET value + */ + DiscoveryEvent.EntityType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENTITY_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TABLE"] = 1; + values[valuesById[2] = "FILESET"] = 2; + return values; + })(); + + DiscoveryEvent.ConfigDetails = (function() { + + /** + * Properties of a ConfigDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @interface IConfigDetails + * @property {Object.|null} [parameters] ConfigDetails parameters + */ + + /** + * Constructs a new ConfigDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @classdesc Represents a ConfigDetails. + * @implements IConfigDetails + * @constructor + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails=} [properties] Properties to set + */ + function ConfigDetails(properties) { + this.parameters = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConfigDetails parameters. + * @member {Object.} parameters + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @instance + */ + ConfigDetails.prototype.parameters = $util.emptyObject; + + /** + * Creates a new ConfigDetails instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails instance + */ + ConfigDetails.create = function create(properties) { + return new ConfigDetails(properties); + }; + + /** + * Encodes the specified ConfigDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails} message ConfigDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfigDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) + for (var keys = Object.keys(message.parameters), i = 0; i < keys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.parameters[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified ConfigDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails} message ConfigDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfigDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConfigDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfigDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (message.parameters === $util.emptyObject) + message.parameters = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.parameters[key] = value; + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConfigDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfigDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConfigDetails message. + * @function verify + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConfigDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parameters != null && message.hasOwnProperty("parameters")) { + if (!$util.isObject(message.parameters)) + return "parameters: object expected"; + var key = Object.keys(message.parameters); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.parameters[key[i]])) + return "parameters: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a ConfigDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails + */ + ConfigDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails) + return object; + var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails(); + if (object.parameters) { + if (typeof object.parameters !== "object") + throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.parameters: object expected"); + message.parameters = {}; + for (var keys = Object.keys(object.parameters), i = 0; i < keys.length; ++i) + message.parameters[keys[i]] = String(object.parameters[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a ConfigDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} message ConfigDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConfigDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.parameters = {}; + var keys2; + if (message.parameters && (keys2 = Object.keys(message.parameters)).length) { + object.parameters = {}; + for (var j = 0; j < keys2.length; ++j) + object.parameters[keys2[j]] = message.parameters[keys2[j]]; + } + return object; + }; + + /** + * Converts this ConfigDetails to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @instance + * @returns {Object.} JSON object + */ + ConfigDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ConfigDetails; + })(); + + DiscoveryEvent.EntityDetails = (function() { + + /** + * Properties of an EntityDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @interface IEntityDetails + * @property {string|null} [entity] EntityDetails entity + * @property {google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null} [type] EntityDetails type + */ + + /** + * Constructs a new EntityDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @classdesc Represents an EntityDetails. + * @implements IEntityDetails + * @constructor + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails=} [properties] Properties to set + */ + function EntityDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EntityDetails entity. + * @member {string} entity + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @instance + */ + EntityDetails.prototype.entity = ""; + + /** + * EntityDetails type. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.EntityType} type + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @instance + */ + EntityDetails.prototype.type = 0; + + /** + * Creates a new EntityDetails instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails instance + */ + EntityDetails.create = function create(properties) { + return new EntityDetails(properties); + }; + + /** + * Encodes the specified EntityDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails} message EntityDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntityDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.entity); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + return writer; + }; + + /** + * Encodes the specified EntityDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails} message EntityDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntityDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EntityDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntityDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.entity = reader.string(); + break; + case 2: + message.type = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EntityDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntityDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EntityDetails message. + * @function verify + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EntityDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.entity != null && message.hasOwnProperty("entity")) + if (!$util.isString(message.entity)) + return "entity: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an EntityDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails + */ + EntityDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails) + return object; + var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails(); + if (object.entity != null) + message.entity = String(object.entity); + switch (object.type) { + case "ENTITY_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "TABLE": + case 1: + message.type = 1; + break; + case "FILESET": + case 2: + message.type = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an EntityDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} message EntityDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EntityDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.entity = ""; + object.type = options.enums === String ? "ENTITY_TYPE_UNSPECIFIED" : 0; + } + if (message.entity != null && message.hasOwnProperty("entity")) + object.entity = message.entity; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityType[message.type] : message.type; + return object; + }; + + /** + * Converts this EntityDetails to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @instance + * @returns {Object.} JSON object + */ + EntityDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EntityDetails; + })(); + + DiscoveryEvent.PartitionDetails = (function() { + + /** + * Properties of a PartitionDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @interface IPartitionDetails + * @property {string|null} [partition] PartitionDetails partition + * @property {string|null} [entity] PartitionDetails entity + * @property {google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null} [type] PartitionDetails type + */ + + /** + * Constructs a new PartitionDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @classdesc Represents a PartitionDetails. + * @implements IPartitionDetails + * @constructor + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails=} [properties] Properties to set + */ + function PartitionDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PartitionDetails partition. + * @member {string} partition + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @instance + */ + PartitionDetails.prototype.partition = ""; + + /** + * PartitionDetails entity. + * @member {string} entity + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @instance + */ + PartitionDetails.prototype.entity = ""; + + /** + * PartitionDetails type. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.EntityType} type + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @instance + */ + PartitionDetails.prototype.type = 0; + + /** + * Creates a new PartitionDetails instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails instance + */ + PartitionDetails.create = function create(properties) { + return new PartitionDetails(properties); + }; + + /** + * Encodes the specified PartitionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails} message PartitionDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartitionDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.partition); + if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.entity); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type); + return writer; + }; + + /** + * Encodes the specified PartitionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails} message PartitionDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartitionDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PartitionDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartitionDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.partition = reader.string(); + break; + case 2: + message.entity = reader.string(); + break; + case 3: + message.type = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PartitionDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartitionDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PartitionDetails message. + * @function verify + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PartitionDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.partition != null && message.hasOwnProperty("partition")) + if (!$util.isString(message.partition)) + return "partition: string expected"; + if (message.entity != null && message.hasOwnProperty("entity")) + if (!$util.isString(message.entity)) + return "entity: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a PartitionDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails + */ + PartitionDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails) + return object; + var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails(); + if (object.partition != null) + message.partition = String(object.partition); + if (object.entity != null) + message.entity = String(object.entity); + switch (object.type) { + case "ENTITY_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "TABLE": + case 1: + message.type = 1; + break; + case "FILESET": + case 2: + message.type = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a PartitionDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} message PartitionDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PartitionDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.partition = ""; + object.entity = ""; + object.type = options.enums === String ? "ENTITY_TYPE_UNSPECIFIED" : 0; + } + if (message.partition != null && message.hasOwnProperty("partition")) + object.partition = message.partition; + if (message.entity != null && message.hasOwnProperty("entity")) + object.entity = message.entity; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityType[message.type] : message.type; + return object; + }; + + /** + * Converts this PartitionDetails to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @instance + * @returns {Object.} JSON object + */ + PartitionDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PartitionDetails; + })(); + + DiscoveryEvent.ActionDetails = (function() { + + /** + * Properties of an ActionDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @interface IActionDetails + * @property {string|null} [type] ActionDetails type + */ + + /** + * Constructs a new ActionDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @classdesc Represents an ActionDetails. + * @implements IActionDetails + * @constructor + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails=} [properties] Properties to set + */ + function ActionDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ActionDetails type. + * @member {string} type + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @instance + */ + ActionDetails.prototype.type = ""; + + /** + * Creates a new ActionDetails instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails instance + */ + ActionDetails.create = function create(properties) { + return new ActionDetails(properties); + }; + + /** + * Encodes the specified ActionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails} message ActionDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActionDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + return writer; + }; + + /** + * Encodes the specified ActionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails} message ActionDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActionDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ActionDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActionDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ActionDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActionDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ActionDetails message. + * @function verify + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ActionDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + return null; + }; + + /** + * Creates an ActionDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails + */ + ActionDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails) + return object; + var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails(); + if (object.type != null) + message.type = String(object.type); + return message; + }; + + /** + * Creates a plain object from an ActionDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} message ActionDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ActionDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.type = ""; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + return object; + }; + + /** + * Converts this ActionDetails to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @instance + * @returns {Object.} JSON object + */ + ActionDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ActionDetails; + })(); + + return DiscoveryEvent; + })(); + + v1.JobEvent = (function() { + + /** + * Properties of a JobEvent. + * @memberof google.cloud.dataplex.v1 + * @interface IJobEvent + * @property {string|null} [message] JobEvent message + * @property {string|null} [jobId] JobEvent jobId + * @property {google.protobuf.ITimestamp|null} [startTime] JobEvent startTime + * @property {google.protobuf.ITimestamp|null} [endTime] JobEvent endTime + * @property {google.cloud.dataplex.v1.JobEvent.State|null} [state] JobEvent state + * @property {number|null} [retries] JobEvent retries + * @property {google.cloud.dataplex.v1.JobEvent.Type|null} [type] JobEvent type + * @property {google.cloud.dataplex.v1.JobEvent.Service|null} [service] JobEvent service + * @property {string|null} [serviceJob] JobEvent serviceJob + */ + + /** + * Constructs a new JobEvent. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a JobEvent. + * @implements IJobEvent + * @constructor + * @param {google.cloud.dataplex.v1.IJobEvent=} [properties] Properties to set + */ + function JobEvent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JobEvent message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.message = ""; + + /** + * JobEvent jobId. + * @member {string} jobId + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.jobId = ""; + + /** + * JobEvent startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.startTime = null; + + /** + * JobEvent endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.endTime = null; + + /** + * JobEvent state. + * @member {google.cloud.dataplex.v1.JobEvent.State} state + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.state = 0; + + /** + * JobEvent retries. + * @member {number} retries + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.retries = 0; + + /** + * JobEvent type. + * @member {google.cloud.dataplex.v1.JobEvent.Type} type + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.type = 0; + + /** + * JobEvent service. + * @member {google.cloud.dataplex.v1.JobEvent.Service} service + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.service = 0; + + /** + * JobEvent serviceJob. + * @member {string} serviceJob + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.serviceJob = ""; + + /** + * Creates a new JobEvent instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {google.cloud.dataplex.v1.IJobEvent=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent instance + */ + JobEvent.create = function create(properties) { + return new JobEvent(properties); + }; + + /** + * Encodes the specified JobEvent message. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {google.cloud.dataplex.v1.IJobEvent} message JobEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JobEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.jobId); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); + if (message.retries != null && Object.hasOwnProperty.call(message, "retries")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.retries); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.type); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.service); + if (message.serviceJob != null && Object.hasOwnProperty.call(message, "serviceJob")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.serviceJob); + return writer; + }; + + /** + * Encodes the specified JobEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {google.cloud.dataplex.v1.IJobEvent} message JobEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JobEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JobEvent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JobEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.JobEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.message = reader.string(); + break; + case 2: + message.jobId = reader.string(); + break; + case 3: + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.state = reader.int32(); + break; + case 6: + message.retries = reader.int32(); + break; + case 7: + message.type = reader.int32(); + break; + case 8: + message.service = reader.int32(); + break; + case 9: + message.serviceJob = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JobEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JobEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JobEvent message. + * @function verify + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JobEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.jobId != null && message.hasOwnProperty("jobId")) + if (!$util.isString(message.jobId)) + return "jobId: string expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.retries != null && message.hasOwnProperty("retries")) + if (!$util.isInteger(message.retries)) + return "retries: integer expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.service != null && message.hasOwnProperty("service")) + switch (message.service) { + default: + return "service: enum value expected"; + case 0: + case 1: + break; + } + if (message.serviceJob != null && message.hasOwnProperty("serviceJob")) + if (!$util.isString(message.serviceJob)) + return "serviceJob: string expected"; + return null; + }; + + /** + * Creates a JobEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent + */ + JobEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.JobEvent) + return object; + var message = new $root.google.cloud.dataplex.v1.JobEvent(); + if (object.message != null) + message.message = String(object.message); + if (object.jobId != null) + message.jobId = String(object.jobId); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.JobEvent.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.JobEvent.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "SUCCEEDED": + case 1: + message.state = 1; + break; + case "FAILED": + case 2: + message.state = 2; + break; + case "CANCELLED": + case 3: + message.state = 3; + break; + case "ABORTED": + case 4: + message.state = 4; + break; + } + if (object.retries != null) + message.retries = object.retries | 0; + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "SPARK": + case 1: + message.type = 1; + break; + case "NOTEBOOK": + case 2: + message.type = 2; + break; + } + switch (object.service) { + case "SERVICE_UNSPECIFIED": + case 0: + message.service = 0; + break; + case "DATAPROC": + case 1: + message.service = 1; + break; + } + if (object.serviceJob != null) + message.serviceJob = String(object.serviceJob); + return message; + }; + + /** + * Creates a plain object from a JobEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {google.cloud.dataplex.v1.JobEvent} message JobEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JobEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.message = ""; + object.jobId = ""; + object.startTime = null; + object.endTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.retries = 0; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.service = options.enums === String ? "SERVICE_UNSPECIFIED" : 0; + object.serviceJob = ""; + } + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.jobId != null && message.hasOwnProperty("jobId")) + object.jobId = message.jobId; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.JobEvent.State[message.state] : message.state; + if (message.retries != null && message.hasOwnProperty("retries")) + object.retries = message.retries; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.JobEvent.Type[message.type] : message.type; + if (message.service != null && message.hasOwnProperty("service")) + object.service = options.enums === String ? $root.google.cloud.dataplex.v1.JobEvent.Service[message.service] : message.service; + if (message.serviceJob != null && message.hasOwnProperty("serviceJob")) + object.serviceJob = message.serviceJob; + return object; + }; + + /** + * Converts this JobEvent to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + * @returns {Object.} JSON object + */ + JobEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.cloud.dataplex.v1.JobEvent.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} SPARK=1 SPARK value + * @property {number} NOTEBOOK=2 NOTEBOOK value + */ + JobEvent.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SPARK"] = 1; + values[valuesById[2] = "NOTEBOOK"] = 2; + return values; + })(); + + /** + * State enum. + * @name google.cloud.dataplex.v1.JobEvent.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} SUCCEEDED=1 SUCCEEDED value + * @property {number} FAILED=2 FAILED value + * @property {number} CANCELLED=3 CANCELLED value + * @property {number} ABORTED=4 ABORTED value + */ + JobEvent.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SUCCEEDED"] = 1; + values[valuesById[2] = "FAILED"] = 2; + values[valuesById[3] = "CANCELLED"] = 3; + values[valuesById[4] = "ABORTED"] = 4; + return values; + })(); + + /** + * Service enum. + * @name google.cloud.dataplex.v1.JobEvent.Service + * @enum {number} + * @property {number} SERVICE_UNSPECIFIED=0 SERVICE_UNSPECIFIED value + * @property {number} DATAPROC=1 DATAPROC value + */ + JobEvent.Service = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SERVICE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DATAPROC"] = 1; + return values; + })(); + + return JobEvent; + })(); + + v1.SessionEvent = (function() { + + /** + * Properties of a SessionEvent. + * @memberof google.cloud.dataplex.v1 + * @interface ISessionEvent + * @property {string|null} [message] SessionEvent message + * @property {string|null} [userId] SessionEvent userId + * @property {string|null} [sessionId] SessionEvent sessionId + * @property {google.cloud.dataplex.v1.SessionEvent.EventType|null} [type] SessionEvent type + * @property {google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null} [query] SessionEvent query + */ + + /** + * Constructs a new SessionEvent. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a SessionEvent. + * @implements ISessionEvent + * @constructor + * @param {google.cloud.dataplex.v1.ISessionEvent=} [properties] Properties to set + */ + function SessionEvent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SessionEvent message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + SessionEvent.prototype.message = ""; + + /** + * SessionEvent userId. + * @member {string} userId + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + SessionEvent.prototype.userId = ""; + + /** + * SessionEvent sessionId. + * @member {string} sessionId + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + SessionEvent.prototype.sessionId = ""; + + /** + * SessionEvent type. + * @member {google.cloud.dataplex.v1.SessionEvent.EventType} type + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + SessionEvent.prototype.type = 0; + + /** + * SessionEvent query. + * @member {google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null|undefined} query + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + SessionEvent.prototype.query = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SessionEvent detail. + * @member {"query"|undefined} detail + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + Object.defineProperty(SessionEvent.prototype, "detail", { + get: $util.oneOfGetter($oneOfFields = ["query"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SessionEvent instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {google.cloud.dataplex.v1.ISessionEvent=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent instance + */ + SessionEvent.create = function create(properties) { + return new SessionEvent(properties); + }; + + /** + * Encodes the specified SessionEvent message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {google.cloud.dataplex.v1.ISessionEvent} message SessionEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.userId); + if (message.sessionId != null && Object.hasOwnProperty.call(message, "sessionId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.sessionId); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.type); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.encode(message.query, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SessionEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {google.cloud.dataplex.v1.ISessionEvent} message SessionEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SessionEvent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.SessionEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.message = reader.string(); + break; + case 2: + message.userId = reader.string(); + break; + case 3: + message.sessionId = reader.string(); + break; + case 4: + message.type = reader.int32(); + break; + case 5: + message.query = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SessionEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SessionEvent message. + * @function verify + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SessionEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isString(message.userId)) + return "userId: string expected"; + if (message.sessionId != null && message.hasOwnProperty("sessionId")) + if (!$util.isString(message.sessionId)) + return "sessionId: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.query != null && message.hasOwnProperty("query")) { + properties.detail = 1; + { + var error = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify(message.query); + if (error) + return "query." + error; + } + } + return null; + }; + + /** + * Creates a SessionEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent + */ + SessionEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.SessionEvent) + return object; + var message = new $root.google.cloud.dataplex.v1.SessionEvent(); + if (object.message != null) + message.message = String(object.message); + if (object.userId != null) + message.userId = String(object.userId); + if (object.sessionId != null) + message.sessionId = String(object.sessionId); + switch (object.type) { + case "EVENT_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "START": + case 1: + message.type = 1; + break; + case "STOP": + case 2: + message.type = 2; + break; + case "QUERY": + case 3: + message.type = 3; + break; + } + if (object.query != null) { + if (typeof object.query !== "object") + throw TypeError(".google.cloud.dataplex.v1.SessionEvent.query: object expected"); + message.query = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.fromObject(object.query); + } + return message; + }; + + /** + * Creates a plain object from a SessionEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {google.cloud.dataplex.v1.SessionEvent} message SessionEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SessionEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.message = ""; + object.userId = ""; + object.sessionId = ""; + object.type = options.enums === String ? "EVENT_TYPE_UNSPECIFIED" : 0; + } + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.sessionId != null && message.hasOwnProperty("sessionId")) + object.sessionId = message.sessionId; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.SessionEvent.EventType[message.type] : message.type; + if (message.query != null && message.hasOwnProperty("query")) { + object.query = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.toObject(message.query, options); + if (options.oneofs) + object.detail = "query"; + } + return object; + }; + + /** + * Converts this SessionEvent to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + * @returns {Object.} JSON object + */ + SessionEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * EventType enum. + * @name google.cloud.dataplex.v1.SessionEvent.EventType + * @enum {number} + * @property {number} EVENT_TYPE_UNSPECIFIED=0 EVENT_TYPE_UNSPECIFIED value + * @property {number} START=1 START value + * @property {number} STOP=2 STOP value + * @property {number} QUERY=3 QUERY value + */ + SessionEvent.EventType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EVENT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "START"] = 1; + values[valuesById[2] = "STOP"] = 2; + values[valuesById[3] = "QUERY"] = 3; + return values; + })(); + + SessionEvent.QueryDetail = (function() { + + /** + * Properties of a QueryDetail. + * @memberof google.cloud.dataplex.v1.SessionEvent + * @interface IQueryDetail + * @property {string|null} [queryId] QueryDetail queryId + * @property {string|null} [queryText] QueryDetail queryText + * @property {google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|null} [engine] QueryDetail engine + * @property {google.protobuf.IDuration|null} [duration] QueryDetail duration + * @property {number|Long|null} [resultSizeBytes] QueryDetail resultSizeBytes + * @property {number|Long|null} [dataProcessedBytes] QueryDetail dataProcessedBytes + */ + + /** + * Constructs a new QueryDetail. + * @memberof google.cloud.dataplex.v1.SessionEvent + * @classdesc Represents a QueryDetail. + * @implements IQueryDetail + * @constructor + * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail=} [properties] Properties to set + */ + function QueryDetail(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDetail queryId. + * @member {string} queryId + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + */ + QueryDetail.prototype.queryId = ""; + + /** + * QueryDetail queryText. + * @member {string} queryText + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + */ + QueryDetail.prototype.queryText = ""; + + /** + * QueryDetail engine. + * @member {google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine} engine + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + */ + QueryDetail.prototype.engine = 0; + + /** + * QueryDetail duration. + * @member {google.protobuf.IDuration|null|undefined} duration + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + */ + QueryDetail.prototype.duration = null; + + /** + * QueryDetail resultSizeBytes. + * @member {number|Long} resultSizeBytes + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + */ + QueryDetail.prototype.resultSizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * QueryDetail dataProcessedBytes. + * @member {number|Long} dataProcessedBytes + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + */ + QueryDetail.prototype.dataProcessedBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new QueryDetail instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail instance + */ + QueryDetail.create = function create(properties) { + return new QueryDetail(properties); + }; + + /** + * Encodes the specified QueryDetail message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail} message QueryDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDetail.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.queryId != null && Object.hasOwnProperty.call(message, "queryId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.queryId); + if (message.queryText != null && Object.hasOwnProperty.call(message, "queryText")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.queryText); + if (message.engine != null && Object.hasOwnProperty.call(message, "engine")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.engine); + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.resultSizeBytes != null && Object.hasOwnProperty.call(message, "resultSizeBytes")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.resultSizeBytes); + if (message.dataProcessedBytes != null && Object.hasOwnProperty.call(message, "dataProcessedBytes")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.dataProcessedBytes); + return writer; + }; + + /** + * Encodes the specified QueryDetail message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail} message QueryDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDetail.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDetail message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDetail.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.queryId = reader.string(); + break; + case 2: + message.queryText = reader.string(); + break; + case 3: + message.engine = reader.int32(); + break; + case 4: + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 5: + message.resultSizeBytes = reader.int64(); + break; + case 6: + message.dataProcessedBytes = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDetail message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDetail.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDetail message. + * @function verify + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDetail.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.queryId != null && message.hasOwnProperty("queryId")) + if (!$util.isString(message.queryId)) + return "queryId: string expected"; + if (message.queryText != null && message.hasOwnProperty("queryText")) + if (!$util.isString(message.queryText)) + return "queryText: string expected"; + if (message.engine != null && message.hasOwnProperty("engine")) + switch (message.engine) { + default: + return "engine: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.duration != null && message.hasOwnProperty("duration")) { + var error = $root.google.protobuf.Duration.verify(message.duration); + if (error) + return "duration." + error; + } + if (message.resultSizeBytes != null && message.hasOwnProperty("resultSizeBytes")) + if (!$util.isInteger(message.resultSizeBytes) && !(message.resultSizeBytes && $util.isInteger(message.resultSizeBytes.low) && $util.isInteger(message.resultSizeBytes.high))) + return "resultSizeBytes: integer|Long expected"; + if (message.dataProcessedBytes != null && message.hasOwnProperty("dataProcessedBytes")) + if (!$util.isInteger(message.dataProcessedBytes) && !(message.dataProcessedBytes && $util.isInteger(message.dataProcessedBytes.low) && $util.isInteger(message.dataProcessedBytes.high))) + return "dataProcessedBytes: integer|Long expected"; + return null; + }; + + /** + * Creates a QueryDetail message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail + */ + QueryDetail.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail) + return object; + var message = new $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail(); + if (object.queryId != null) + message.queryId = String(object.queryId); + if (object.queryText != null) + message.queryText = String(object.queryText); + switch (object.engine) { + case "ENGINE_UNSPECIFIED": + case 0: + message.engine = 0; + break; + case "SPARK_SQL": + case 1: + message.engine = 1; + break; + case "BIGQUERY": + case 2: + message.engine = 2; + break; + } + if (object.duration != null) { + if (typeof object.duration !== "object") + throw TypeError(".google.cloud.dataplex.v1.SessionEvent.QueryDetail.duration: object expected"); + message.duration = $root.google.protobuf.Duration.fromObject(object.duration); + } + if (object.resultSizeBytes != null) + if ($util.Long) + (message.resultSizeBytes = $util.Long.fromValue(object.resultSizeBytes)).unsigned = false; + else if (typeof object.resultSizeBytes === "string") + message.resultSizeBytes = parseInt(object.resultSizeBytes, 10); + else if (typeof object.resultSizeBytes === "number") + message.resultSizeBytes = object.resultSizeBytes; + else if (typeof object.resultSizeBytes === "object") + message.resultSizeBytes = new $util.LongBits(object.resultSizeBytes.low >>> 0, object.resultSizeBytes.high >>> 0).toNumber(); + if (object.dataProcessedBytes != null) + if ($util.Long) + (message.dataProcessedBytes = $util.Long.fromValue(object.dataProcessedBytes)).unsigned = false; + else if (typeof object.dataProcessedBytes === "string") + message.dataProcessedBytes = parseInt(object.dataProcessedBytes, 10); + else if (typeof object.dataProcessedBytes === "number") + message.dataProcessedBytes = object.dataProcessedBytes; + else if (typeof object.dataProcessedBytes === "object") + message.dataProcessedBytes = new $util.LongBits(object.dataProcessedBytes.low >>> 0, object.dataProcessedBytes.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a QueryDetail message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {google.cloud.dataplex.v1.SessionEvent.QueryDetail} message QueryDetail + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDetail.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.queryId = ""; + object.queryText = ""; + object.engine = options.enums === String ? "ENGINE_UNSPECIFIED" : 0; + object.duration = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.resultSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.resultSizeBytes = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.dataProcessedBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.dataProcessedBytes = options.longs === String ? "0" : 0; + } + if (message.queryId != null && message.hasOwnProperty("queryId")) + object.queryId = message.queryId; + if (message.queryText != null && message.hasOwnProperty("queryText")) + object.queryText = message.queryText; + if (message.engine != null && message.hasOwnProperty("engine")) + object.engine = options.enums === String ? $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine[message.engine] : message.engine; + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); + if (message.resultSizeBytes != null && message.hasOwnProperty("resultSizeBytes")) + if (typeof message.resultSizeBytes === "number") + object.resultSizeBytes = options.longs === String ? String(message.resultSizeBytes) : message.resultSizeBytes; + else + object.resultSizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.resultSizeBytes) : options.longs === Number ? new $util.LongBits(message.resultSizeBytes.low >>> 0, message.resultSizeBytes.high >>> 0).toNumber() : message.resultSizeBytes; + if (message.dataProcessedBytes != null && message.hasOwnProperty("dataProcessedBytes")) + if (typeof message.dataProcessedBytes === "number") + object.dataProcessedBytes = options.longs === String ? String(message.dataProcessedBytes) : message.dataProcessedBytes; + else + object.dataProcessedBytes = options.longs === String ? $util.Long.prototype.toString.call(message.dataProcessedBytes) : options.longs === Number ? new $util.LongBits(message.dataProcessedBytes.low >>> 0, message.dataProcessedBytes.high >>> 0).toNumber() : message.dataProcessedBytes; + return object; + }; + + /** + * Converts this QueryDetail to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + * @returns {Object.} JSON object + */ + QueryDetail.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Engine enum. + * @name google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine + * @enum {number} + * @property {number} ENGINE_UNSPECIFIED=0 ENGINE_UNSPECIFIED value + * @property {number} SPARK_SQL=1 SPARK_SQL value + * @property {number} BIGQUERY=2 BIGQUERY value + */ + QueryDetail.Engine = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENGINE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SPARK_SQL"] = 1; + values[valuesById[2] = "BIGQUERY"] = 2; + return values; + })(); + + return QueryDetail; + })(); + + return SessionEvent; + })(); + + v1.MetadataService = (function() { + + /** + * Constructs a new MetadataService service. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a MetadataService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function MetadataService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (MetadataService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MetadataService; + + /** + * Creates new MetadataService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dataplex.v1.MetadataService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {MetadataService} RPC service. Useful where requests and/or responses are streamed. + */ + MetadataService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#getEntity}. + * @memberof google.cloud.dataplex.v1.MetadataService + * @typedef GetEntityCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Entity} [response] Entity + */ + + /** + * Calls GetEntity. + * @function getEntity + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IGetEntityRequest} request GetEntityRequest message or plain object + * @param {google.cloud.dataplex.v1.MetadataService.GetEntityCallback} callback Node-style callback called with the error, if any, and Entity + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetadataService.prototype.getEntity = function getEntity(request, callback) { + return this.rpcCall(getEntity, $root.google.cloud.dataplex.v1.GetEntityRequest, $root.google.cloud.dataplex.v1.Entity, request, callback); + }, "name", { value: "GetEntity" }); + + /** + * Calls GetEntity. + * @function getEntity + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IGetEntityRequest} request GetEntityRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#listEntities}. + * @memberof google.cloud.dataplex.v1.MetadataService + * @typedef ListEntitiesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListEntitiesResponse} [response] ListEntitiesResponse + */ + + /** + * Calls ListEntities. + * @function listEntities + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IListEntitiesRequest} request ListEntitiesRequest message or plain object + * @param {google.cloud.dataplex.v1.MetadataService.ListEntitiesCallback} callback Node-style callback called with the error, if any, and ListEntitiesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetadataService.prototype.listEntities = function listEntities(request, callback) { + return this.rpcCall(listEntities, $root.google.cloud.dataplex.v1.ListEntitiesRequest, $root.google.cloud.dataplex.v1.ListEntitiesResponse, request, callback); + }, "name", { value: "ListEntities" }); + + /** + * Calls ListEntities. + * @function listEntities + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IListEntitiesRequest} request ListEntitiesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#getPartition}. + * @memberof google.cloud.dataplex.v1.MetadataService + * @typedef GetPartitionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Partition} [response] Partition + */ + + /** + * Calls GetPartition. + * @function getPartition + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IGetPartitionRequest} request GetPartitionRequest message or plain object + * @param {google.cloud.dataplex.v1.MetadataService.GetPartitionCallback} callback Node-style callback called with the error, if any, and Partition + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetadataService.prototype.getPartition = function getPartition(request, callback) { + return this.rpcCall(getPartition, $root.google.cloud.dataplex.v1.GetPartitionRequest, $root.google.cloud.dataplex.v1.Partition, request, callback); + }, "name", { value: "GetPartition" }); + + /** + * Calls GetPartition. + * @function getPartition + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IGetPartitionRequest} request GetPartitionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#listPartitions}. + * @memberof google.cloud.dataplex.v1.MetadataService + * @typedef ListPartitionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListPartitionsResponse} [response] ListPartitionsResponse + */ + + /** + * Calls ListPartitions. + * @function listPartitions + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IListPartitionsRequest} request ListPartitionsRequest message or plain object + * @param {google.cloud.dataplex.v1.MetadataService.ListPartitionsCallback} callback Node-style callback called with the error, if any, and ListPartitionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetadataService.prototype.listPartitions = function listPartitions(request, callback) { + return this.rpcCall(listPartitions, $root.google.cloud.dataplex.v1.ListPartitionsRequest, $root.google.cloud.dataplex.v1.ListPartitionsResponse, request, callback); + }, "name", { value: "ListPartitions" }); + + /** + * Calls ListPartitions. + * @function listPartitions + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IListPartitionsRequest} request ListPartitionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return MetadataService; + })(); + + v1.ListEntitiesRequest = (function() { + + /** + * Properties of a ListEntitiesRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListEntitiesRequest + * @property {string|null} [parent] ListEntitiesRequest parent + * @property {google.cloud.dataplex.v1.ListEntitiesRequest.EntityView|null} [view] ListEntitiesRequest view + * @property {number|null} [pageSize] ListEntitiesRequest pageSize + * @property {string|null} [pageToken] ListEntitiesRequest pageToken + * @property {string|null} [filter] ListEntitiesRequest filter + */ + + /** + * Constructs a new ListEntitiesRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListEntitiesRequest. + * @implements IListEntitiesRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListEntitiesRequest=} [properties] Properties to set + */ + function ListEntitiesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListEntitiesRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @instance + */ + ListEntitiesRequest.prototype.parent = ""; + + /** + * ListEntitiesRequest view. + * @member {google.cloud.dataplex.v1.ListEntitiesRequest.EntityView} view + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @instance + */ + ListEntitiesRequest.prototype.view = 0; + + /** + * ListEntitiesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @instance + */ + ListEntitiesRequest.prototype.pageSize = 0; + + /** + * ListEntitiesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @instance + */ + ListEntitiesRequest.prototype.pageToken = ""; + + /** + * ListEntitiesRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @instance + */ + ListEntitiesRequest.prototype.filter = ""; + + /** + * Creates a new ListEntitiesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @static + * @param {google.cloud.dataplex.v1.IListEntitiesRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListEntitiesRequest} ListEntitiesRequest instance + */ + ListEntitiesRequest.create = function create(properties) { + return new ListEntitiesRequest(properties); + }; + + /** + * Encodes the specified ListEntitiesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @static + * @param {google.cloud.dataplex.v1.IListEntitiesRequest} message ListEntitiesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEntitiesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListEntitiesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @static + * @param {google.cloud.dataplex.v1.IListEntitiesRequest} message ListEntitiesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEntitiesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListEntitiesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListEntitiesRequest} ListEntitiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEntitiesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListEntitiesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.view = reader.int32(); + break; + case 3: + message.pageSize = reader.int32(); + break; + case 4: + message.pageToken = reader.string(); + break; + case 5: + message.filter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListEntitiesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListEntitiesRequest} ListEntitiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEntitiesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListEntitiesRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListEntitiesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListEntitiesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListEntitiesRequest} ListEntitiesRequest + */ + ListEntitiesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListEntitiesRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListEntitiesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + switch (object.view) { + case "ENTITY_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "TABLES": + case 1: + message.view = 1; + break; + case "FILESETS": + case 2: + message.view = 2; + break; + } + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListEntitiesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @static + * @param {google.cloud.dataplex.v1.ListEntitiesRequest} message ListEntitiesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListEntitiesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.view = options.enums === String ? "ENTITY_VIEW_UNSPECIFIED" : 0; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.dataplex.v1.ListEntitiesRequest.EntityView[message.view] : message.view; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListEntitiesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @instance + * @returns {Object.} JSON object + */ + ListEntitiesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * EntityView enum. + * @name google.cloud.dataplex.v1.ListEntitiesRequest.EntityView + * @enum {number} + * @property {number} ENTITY_VIEW_UNSPECIFIED=0 ENTITY_VIEW_UNSPECIFIED value + * @property {number} TABLES=1 TABLES value + * @property {number} FILESETS=2 FILESETS value + */ + ListEntitiesRequest.EntityView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENTITY_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "TABLES"] = 1; + values[valuesById[2] = "FILESETS"] = 2; + return values; + })(); + + return ListEntitiesRequest; + })(); + + v1.ListEntitiesResponse = (function() { + + /** + * Properties of a ListEntitiesResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListEntitiesResponse + * @property {Array.|null} [entities] ListEntitiesResponse entities + * @property {string|null} [nextPageToken] ListEntitiesResponse nextPageToken + */ + + /** + * Constructs a new ListEntitiesResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListEntitiesResponse. + * @implements IListEntitiesResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListEntitiesResponse=} [properties] Properties to set + */ + function ListEntitiesResponse(properties) { + this.entities = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListEntitiesResponse entities. + * @member {Array.} entities + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @instance + */ + ListEntitiesResponse.prototype.entities = $util.emptyArray; + + /** + * ListEntitiesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @instance + */ + ListEntitiesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListEntitiesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @static + * @param {google.cloud.dataplex.v1.IListEntitiesResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListEntitiesResponse} ListEntitiesResponse instance + */ + ListEntitiesResponse.create = function create(properties) { + return new ListEntitiesResponse(properties); + }; + + /** + * Encodes the specified ListEntitiesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @static + * @param {google.cloud.dataplex.v1.IListEntitiesResponse} message ListEntitiesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEntitiesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entities != null && message.entities.length) + for (var i = 0; i < message.entities.length; ++i) + $root.google.cloud.dataplex.v1.Entity.encode(message.entities[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListEntitiesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @static + * @param {google.cloud.dataplex.v1.IListEntitiesResponse} message ListEntitiesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEntitiesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListEntitiesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListEntitiesResponse} ListEntitiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEntitiesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListEntitiesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.entities && message.entities.length)) + message.entities = []; + message.entities.push($root.google.cloud.dataplex.v1.Entity.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListEntitiesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListEntitiesResponse} ListEntitiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEntitiesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListEntitiesResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListEntitiesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.entities != null && message.hasOwnProperty("entities")) { + if (!Array.isArray(message.entities)) + return "entities: array expected"; + for (var i = 0; i < message.entities.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Entity.verify(message.entities[i]); + if (error) + return "entities." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListEntitiesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListEntitiesResponse} ListEntitiesResponse + */ + ListEntitiesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListEntitiesResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListEntitiesResponse(); + if (object.entities) { + if (!Array.isArray(object.entities)) + throw TypeError(".google.cloud.dataplex.v1.ListEntitiesResponse.entities: array expected"); + message.entities = []; + for (var i = 0; i < object.entities.length; ++i) { + if (typeof object.entities[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListEntitiesResponse.entities: object expected"); + message.entities[i] = $root.google.cloud.dataplex.v1.Entity.fromObject(object.entities[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListEntitiesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @static + * @param {google.cloud.dataplex.v1.ListEntitiesResponse} message ListEntitiesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListEntitiesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.entities = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.entities && message.entities.length) { + object.entities = []; + for (var j = 0; j < message.entities.length; ++j) + object.entities[j] = $root.google.cloud.dataplex.v1.Entity.toObject(message.entities[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListEntitiesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @instance + * @returns {Object.} JSON object + */ + ListEntitiesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListEntitiesResponse; + })(); + + v1.GetEntityRequest = (function() { + + /** + * Properties of a GetEntityRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetEntityRequest + * @property {string|null} [name] GetEntityRequest name + * @property {google.cloud.dataplex.v1.GetEntityRequest.EntityView|null} [view] GetEntityRequest view + */ + + /** + * Constructs a new GetEntityRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetEntityRequest. + * @implements IGetEntityRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetEntityRequest=} [properties] Properties to set + */ + function GetEntityRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetEntityRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @instance + */ + GetEntityRequest.prototype.name = ""; + + /** + * GetEntityRequest view. + * @member {google.cloud.dataplex.v1.GetEntityRequest.EntityView} view + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @instance + */ + GetEntityRequest.prototype.view = 0; + + /** + * Creates a new GetEntityRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @static + * @param {google.cloud.dataplex.v1.IGetEntityRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetEntityRequest} GetEntityRequest instance + */ + GetEntityRequest.create = function create(properties) { + return new GetEntityRequest(properties); + }; + + /** + * Encodes the specified GetEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetEntityRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @static + * @param {google.cloud.dataplex.v1.IGetEntityRequest} message GetEntityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEntityRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + return writer; + }; + + /** + * Encodes the specified GetEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetEntityRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @static + * @param {google.cloud.dataplex.v1.IGetEntityRequest} message GetEntityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEntityRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetEntityRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetEntityRequest} GetEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEntityRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetEntityRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.view = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetEntityRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetEntityRequest} GetEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEntityRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetEntityRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetEntityRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + case 4: + break; + } + return null; + }; + + /** + * Creates a GetEntityRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetEntityRequest} GetEntityRequest + */ + GetEntityRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetEntityRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetEntityRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.view) { + case "ENTITY_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BASIC": + case 1: + message.view = 1; + break; + case "SCHEMA": + case 2: + message.view = 2; + break; + case "FULL": + case 4: + message.view = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a GetEntityRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @static + * @param {google.cloud.dataplex.v1.GetEntityRequest} message GetEntityRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetEntityRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.view = options.enums === String ? "ENTITY_VIEW_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.dataplex.v1.GetEntityRequest.EntityView[message.view] : message.view; + return object; + }; + + /** + * Converts this GetEntityRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @instance + * @returns {Object.} JSON object + */ + GetEntityRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * EntityView enum. + * @name google.cloud.dataplex.v1.GetEntityRequest.EntityView + * @enum {number} + * @property {number} ENTITY_VIEW_UNSPECIFIED=0 ENTITY_VIEW_UNSPECIFIED value + * @property {number} BASIC=1 BASIC value + * @property {number} SCHEMA=2 SCHEMA value + * @property {number} FULL=4 FULL value + */ + GetEntityRequest.EntityView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENTITY_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "BASIC"] = 1; + values[valuesById[2] = "SCHEMA"] = 2; + values[valuesById[4] = "FULL"] = 4; + return values; + })(); + + return GetEntityRequest; + })(); + + v1.ListPartitionsRequest = (function() { + + /** + * Properties of a ListPartitionsRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListPartitionsRequest + * @property {string|null} [parent] ListPartitionsRequest parent + * @property {number|null} [pageSize] ListPartitionsRequest pageSize + * @property {string|null} [pageToken] ListPartitionsRequest pageToken + * @property {string|null} [filter] ListPartitionsRequest filter + */ + + /** + * Constructs a new ListPartitionsRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListPartitionsRequest. + * @implements IListPartitionsRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListPartitionsRequest=} [properties] Properties to set + */ + function ListPartitionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListPartitionsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @instance + */ + ListPartitionsRequest.prototype.parent = ""; + + /** + * ListPartitionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @instance + */ + ListPartitionsRequest.prototype.pageSize = 0; + + /** + * ListPartitionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @instance + */ + ListPartitionsRequest.prototype.pageToken = ""; + + /** + * ListPartitionsRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @instance + */ + ListPartitionsRequest.prototype.filter = ""; + + /** + * Creates a new ListPartitionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListPartitionsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListPartitionsRequest} ListPartitionsRequest instance + */ + ListPartitionsRequest.create = function create(properties) { + return new ListPartitionsRequest(properties); + }; + + /** + * Encodes the specified ListPartitionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListPartitionsRequest} message ListPartitionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPartitionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListPartitionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListPartitionsRequest} message ListPartitionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPartitionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPartitionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListPartitionsRequest} ListPartitionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPartitionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListPartitionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 4: + message.filter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPartitionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListPartitionsRequest} ListPartitionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPartitionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPartitionsRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPartitionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListPartitionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListPartitionsRequest} ListPartitionsRequest + */ + ListPartitionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListPartitionsRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListPartitionsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListPartitionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @static + * @param {google.cloud.dataplex.v1.ListPartitionsRequest} message ListPartitionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPartitionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListPartitionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListPartitionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListPartitionsRequest; + })(); + + v1.ListPartitionsResponse = (function() { + + /** + * Properties of a ListPartitionsResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListPartitionsResponse + * @property {Array.|null} [partitions] ListPartitionsResponse partitions + * @property {string|null} [nextPageToken] ListPartitionsResponse nextPageToken + */ + + /** + * Constructs a new ListPartitionsResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListPartitionsResponse. + * @implements IListPartitionsResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListPartitionsResponse=} [properties] Properties to set + */ + function ListPartitionsResponse(properties) { + this.partitions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListPartitionsResponse partitions. + * @member {Array.} partitions + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @instance + */ + ListPartitionsResponse.prototype.partitions = $util.emptyArray; + + /** + * ListPartitionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @instance + */ + ListPartitionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListPartitionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @static + * @param {google.cloud.dataplex.v1.IListPartitionsResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListPartitionsResponse} ListPartitionsResponse instance + */ + ListPartitionsResponse.create = function create(properties) { + return new ListPartitionsResponse(properties); + }; + + /** + * Encodes the specified ListPartitionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @static + * @param {google.cloud.dataplex.v1.IListPartitionsResponse} message ListPartitionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPartitionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.partitions != null && message.partitions.length) + for (var i = 0; i < message.partitions.length; ++i) + $root.google.cloud.dataplex.v1.Partition.encode(message.partitions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListPartitionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @static + * @param {google.cloud.dataplex.v1.IListPartitionsResponse} message ListPartitionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPartitionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPartitionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListPartitionsResponse} ListPartitionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPartitionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListPartitionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.partitions && message.partitions.length)) + message.partitions = []; + message.partitions.push($root.google.cloud.dataplex.v1.Partition.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPartitionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListPartitionsResponse} ListPartitionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPartitionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPartitionsResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPartitionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.partitions != null && message.hasOwnProperty("partitions")) { + if (!Array.isArray(message.partitions)) + return "partitions: array expected"; + for (var i = 0; i < message.partitions.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Partition.verify(message.partitions[i]); + if (error) + return "partitions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListPartitionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListPartitionsResponse} ListPartitionsResponse + */ + ListPartitionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListPartitionsResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListPartitionsResponse(); + if (object.partitions) { + if (!Array.isArray(object.partitions)) + throw TypeError(".google.cloud.dataplex.v1.ListPartitionsResponse.partitions: array expected"); + message.partitions = []; + for (var i = 0; i < object.partitions.length; ++i) { + if (typeof object.partitions[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListPartitionsResponse.partitions: object expected"); + message.partitions[i] = $root.google.cloud.dataplex.v1.Partition.fromObject(object.partitions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListPartitionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @static + * @param {google.cloud.dataplex.v1.ListPartitionsResponse} message ListPartitionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPartitionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.partitions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.partitions && message.partitions.length) { + object.partitions = []; + for (var j = 0; j < message.partitions.length; ++j) + object.partitions[j] = $root.google.cloud.dataplex.v1.Partition.toObject(message.partitions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListPartitionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListPartitionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListPartitionsResponse; + })(); + + v1.GetPartitionRequest = (function() { + + /** + * Properties of a GetPartitionRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetPartitionRequest + * @property {string|null} [name] GetPartitionRequest name + */ + + /** + * Constructs a new GetPartitionRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetPartitionRequest. + * @implements IGetPartitionRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetPartitionRequest=} [properties] Properties to set + */ + function GetPartitionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetPartitionRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @instance + */ + GetPartitionRequest.prototype.name = ""; + + /** + * Creates a new GetPartitionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @static + * @param {google.cloud.dataplex.v1.IGetPartitionRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetPartitionRequest} GetPartitionRequest instance + */ + GetPartitionRequest.create = function create(properties) { + return new GetPartitionRequest(properties); + }; + + /** + * Encodes the specified GetPartitionRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetPartitionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @static + * @param {google.cloud.dataplex.v1.IGetPartitionRequest} message GetPartitionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPartitionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetPartitionRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetPartitionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @static + * @param {google.cloud.dataplex.v1.IGetPartitionRequest} message GetPartitionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPartitionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetPartitionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetPartitionRequest} GetPartitionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPartitionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetPartitionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetPartitionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetPartitionRequest} GetPartitionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPartitionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetPartitionRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPartitionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetPartitionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetPartitionRequest} GetPartitionRequest + */ + GetPartitionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetPartitionRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetPartitionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetPartitionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @static + * @param {google.cloud.dataplex.v1.GetPartitionRequest} message GetPartitionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPartitionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetPartitionRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @instance + * @returns {Object.} JSON object + */ + GetPartitionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetPartitionRequest; + })(); + + v1.Entity = (function() { + + /** + * Properties of an Entity. + * @memberof google.cloud.dataplex.v1 + * @interface IEntity + * @property {string|null} [name] Entity name + * @property {string|null} [displayName] Entity displayName + * @property {string|null} [description] Entity description + * @property {google.protobuf.ITimestamp|null} [createTime] Entity createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Entity updateTime + * @property {string|null} [id] Entity id + * @property {string|null} [etag] Entity etag + * @property {google.cloud.dataplex.v1.Entity.Type|null} [type] Entity type + * @property {string|null} [asset] Entity asset + * @property {string|null} [dataPath] Entity dataPath + * @property {string|null} [dataPathPattern] Entity dataPathPattern + * @property {string|null} [catalogEntry] Entity catalogEntry + * @property {google.cloud.dataplex.v1.StorageSystem|null} [system] Entity system + * @property {google.cloud.dataplex.v1.IStorageFormat|null} [format] Entity format + * @property {google.cloud.dataplex.v1.Entity.ICompatibilityStatus|null} [compatibility] Entity compatibility + * @property {google.cloud.dataplex.v1.ISchema|null} [schema] Entity schema + */ + + /** + * Constructs a new Entity. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an Entity. + * @implements IEntity + * @constructor + * @param {google.cloud.dataplex.v1.IEntity=} [properties] Properties to set + */ + function Entity(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Entity name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.name = ""; + + /** + * Entity displayName. + * @member {string} displayName + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.displayName = ""; + + /** + * Entity description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.description = ""; + + /** + * Entity createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.createTime = null; + + /** + * Entity updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.updateTime = null; + + /** + * Entity id. + * @member {string} id + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.id = ""; + + /** + * Entity etag. + * @member {string} etag + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.etag = ""; + + /** + * Entity type. + * @member {google.cloud.dataplex.v1.Entity.Type} type + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.type = 0; + + /** + * Entity asset. + * @member {string} asset + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.asset = ""; + + /** + * Entity dataPath. + * @member {string} dataPath + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.dataPath = ""; + + /** + * Entity dataPathPattern. + * @member {string} dataPathPattern + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.dataPathPattern = ""; + + /** + * Entity catalogEntry. + * @member {string} catalogEntry + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.catalogEntry = ""; + + /** + * Entity system. + * @member {google.cloud.dataplex.v1.StorageSystem} system + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.system = 0; + + /** + * Entity format. + * @member {google.cloud.dataplex.v1.IStorageFormat|null|undefined} format + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.format = null; + + /** + * Entity compatibility. + * @member {google.cloud.dataplex.v1.Entity.ICompatibilityStatus|null|undefined} compatibility + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.compatibility = null; + + /** + * Entity schema. + * @member {google.cloud.dataplex.v1.ISchema|null|undefined} schema + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.schema = null; + + /** + * Creates a new Entity instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Entity + * @static + * @param {google.cloud.dataplex.v1.IEntity=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Entity} Entity instance + */ + Entity.create = function create(properties) { + return new Entity(properties); + }; + + /** + * Encodes the specified Entity message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Entity + * @static + * @param {google.cloud.dataplex.v1.IEntity} message Entity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.id); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.etag); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.type); + if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.asset); + if (message.dataPath != null && Object.hasOwnProperty.call(message, "dataPath")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.dataPath); + if (message.dataPathPattern != null && Object.hasOwnProperty.call(message, "dataPathPattern")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.dataPathPattern); + if (message.catalogEntry != null && Object.hasOwnProperty.call(message, "catalogEntry")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.catalogEntry); + if (message.system != null && Object.hasOwnProperty.call(message, "system")) + writer.uint32(/* id 15, wireType 0 =*/120).int32(message.system); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + $root.google.cloud.dataplex.v1.StorageFormat.encode(message.format, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.compatibility != null && Object.hasOwnProperty.call(message, "compatibility")) + $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.encode(message.compatibility, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + $root.google.cloud.dataplex.v1.Schema.encode(message.schema, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Entity + * @static + * @param {google.cloud.dataplex.v1.IEntity} message Entity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Entity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Entity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Entity} Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Entity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.displayName = reader.string(); + break; + case 3: + message.description = reader.string(); + break; + case 5: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 7: + message.id = reader.string(); + break; + case 8: + message.etag = reader.string(); + break; + case 10: + message.type = reader.int32(); + break; + case 11: + message.asset = reader.string(); + break; + case 12: + message.dataPath = reader.string(); + break; + case 13: + message.dataPathPattern = reader.string(); + break; + case 14: + message.catalogEntry = reader.string(); + break; + case 15: + message.system = reader.int32(); + break; + case 16: + message.format = $root.google.cloud.dataplex.v1.StorageFormat.decode(reader, reader.uint32()); + break; + case 19: + message.compatibility = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.decode(reader, reader.uint32()); + break; + case 50: + message.schema = $root.google.cloud.dataplex.v1.Schema.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Entity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Entity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Entity} Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Entity message. + * @function verify + * @memberof google.cloud.dataplex.v1.Entity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Entity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.asset != null && message.hasOwnProperty("asset")) + if (!$util.isString(message.asset)) + return "asset: string expected"; + if (message.dataPath != null && message.hasOwnProperty("dataPath")) + if (!$util.isString(message.dataPath)) + return "dataPath: string expected"; + if (message.dataPathPattern != null && message.hasOwnProperty("dataPathPattern")) + if (!$util.isString(message.dataPathPattern)) + return "dataPathPattern: string expected"; + if (message.catalogEntry != null && message.hasOwnProperty("catalogEntry")) + if (!$util.isString(message.catalogEntry)) + return "catalogEntry: string expected"; + if (message.system != null && message.hasOwnProperty("system")) + switch (message.system) { + default: + return "system: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.format != null && message.hasOwnProperty("format")) { + var error = $root.google.cloud.dataplex.v1.StorageFormat.verify(message.format); + if (error) + return "format." + error; + } + if (message.compatibility != null && message.hasOwnProperty("compatibility")) { + var error = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify(message.compatibility); + if (error) + return "compatibility." + error; + } + if (message.schema != null && message.hasOwnProperty("schema")) { + var error = $root.google.cloud.dataplex.v1.Schema.verify(message.schema); + if (error) + return "schema." + error; + } + return null; + }; + + /** + * Creates an Entity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Entity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Entity} Entity + */ + Entity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Entity) + return object; + var message = new $root.google.cloud.dataplex.v1.Entity(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Entity.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Entity.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.id != null) + message.id = String(object.id); + if (object.etag != null) + message.etag = String(object.etag); + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "TABLE": + case 1: + message.type = 1; + break; + case "FILESET": + case 2: + message.type = 2; + break; + } + if (object.asset != null) + message.asset = String(object.asset); + if (object.dataPath != null) + message.dataPath = String(object.dataPath); + if (object.dataPathPattern != null) + message.dataPathPattern = String(object.dataPathPattern); + if (object.catalogEntry != null) + message.catalogEntry = String(object.catalogEntry); + switch (object.system) { + case "STORAGE_SYSTEM_UNSPECIFIED": + case 0: + message.system = 0; + break; + case "CLOUD_STORAGE": + case 1: + message.system = 1; + break; + case "BIGQUERY": + case 2: + message.system = 2; + break; + } + if (object.format != null) { + if (typeof object.format !== "object") + throw TypeError(".google.cloud.dataplex.v1.Entity.format: object expected"); + message.format = $root.google.cloud.dataplex.v1.StorageFormat.fromObject(object.format); + } + if (object.compatibility != null) { + if (typeof object.compatibility !== "object") + throw TypeError(".google.cloud.dataplex.v1.Entity.compatibility: object expected"); + message.compatibility = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.fromObject(object.compatibility); + } + if (object.schema != null) { + if (typeof object.schema !== "object") + throw TypeError(".google.cloud.dataplex.v1.Entity.schema: object expected"); + message.schema = $root.google.cloud.dataplex.v1.Schema.fromObject(object.schema); + } + return message; + }; + + /** + * Creates a plain object from an Entity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Entity + * @static + * @param {google.cloud.dataplex.v1.Entity} message Entity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Entity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.description = ""; + object.createTime = null; + object.updateTime = null; + object.id = ""; + object.etag = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.asset = ""; + object.dataPath = ""; + object.dataPathPattern = ""; + object.catalogEntry = ""; + object.system = options.enums === String ? "STORAGE_SYSTEM_UNSPECIFIED" : 0; + object.format = null; + object.compatibility = null; + object.schema = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Entity.Type[message.type] : message.type; + if (message.asset != null && message.hasOwnProperty("asset")) + object.asset = message.asset; + if (message.dataPath != null && message.hasOwnProperty("dataPath")) + object.dataPath = message.dataPath; + if (message.dataPathPattern != null && message.hasOwnProperty("dataPathPattern")) + object.dataPathPattern = message.dataPathPattern; + if (message.catalogEntry != null && message.hasOwnProperty("catalogEntry")) + object.catalogEntry = message.catalogEntry; + if (message.system != null && message.hasOwnProperty("system")) + object.system = options.enums === String ? $root.google.cloud.dataplex.v1.StorageSystem[message.system] : message.system; + if (message.format != null && message.hasOwnProperty("format")) + object.format = $root.google.cloud.dataplex.v1.StorageFormat.toObject(message.format, options); + if (message.compatibility != null && message.hasOwnProperty("compatibility")) + object.compatibility = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.toObject(message.compatibility, options); + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = $root.google.cloud.dataplex.v1.Schema.toObject(message.schema, options); + return object; + }; + + /** + * Converts this Entity to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Entity + * @instance + * @returns {Object.} JSON object + */ + Entity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.cloud.dataplex.v1.Entity.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} TABLE=1 TABLE value + * @property {number} FILESET=2 FILESET value + */ + Entity.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TABLE"] = 1; + values[valuesById[2] = "FILESET"] = 2; + return values; + })(); + + Entity.CompatibilityStatus = (function() { + + /** + * Properties of a CompatibilityStatus. + * @memberof google.cloud.dataplex.v1.Entity + * @interface ICompatibilityStatus + * @property {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null} [hiveMetastore] CompatibilityStatus hiveMetastore + * @property {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null} [bigquery] CompatibilityStatus bigquery + */ + + /** + * Constructs a new CompatibilityStatus. + * @memberof google.cloud.dataplex.v1.Entity + * @classdesc Represents a CompatibilityStatus. + * @implements ICompatibilityStatus + * @constructor + * @param {google.cloud.dataplex.v1.Entity.ICompatibilityStatus=} [properties] Properties to set + */ + function CompatibilityStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompatibilityStatus hiveMetastore. + * @member {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null|undefined} hiveMetastore + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @instance + */ + CompatibilityStatus.prototype.hiveMetastore = null; + + /** + * CompatibilityStatus bigquery. + * @member {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null|undefined} bigquery + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @instance + */ + CompatibilityStatus.prototype.bigquery = null; + + /** + * Creates a new CompatibilityStatus instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {google.cloud.dataplex.v1.Entity.ICompatibilityStatus=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus} CompatibilityStatus instance + */ + CompatibilityStatus.create = function create(properties) { + return new CompatibilityStatus(properties); + }; + + /** + * Encodes the specified CompatibilityStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {google.cloud.dataplex.v1.Entity.ICompatibilityStatus} message CompatibilityStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompatibilityStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hiveMetastore != null && Object.hasOwnProperty.call(message, "hiveMetastore")) + $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.encode(message.hiveMetastore, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.bigquery != null && Object.hasOwnProperty.call(message, "bigquery")) + $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.encode(message.bigquery, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CompatibilityStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {google.cloud.dataplex.v1.Entity.ICompatibilityStatus} message CompatibilityStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompatibilityStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompatibilityStatus message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus} CompatibilityStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompatibilityStatus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.hiveMetastore = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.decode(reader, reader.uint32()); + break; + case 2: + message.bigquery = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompatibilityStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus} CompatibilityStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompatibilityStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompatibilityStatus message. + * @function verify + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompatibilityStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hiveMetastore != null && message.hasOwnProperty("hiveMetastore")) { + var error = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify(message.hiveMetastore); + if (error) + return "hiveMetastore." + error; + } + if (message.bigquery != null && message.hasOwnProperty("bigquery")) { + var error = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify(message.bigquery); + if (error) + return "bigquery." + error; + } + return null; + }; + + /** + * Creates a CompatibilityStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus} CompatibilityStatus + */ + CompatibilityStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus) + return object; + var message = new $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus(); + if (object.hiveMetastore != null) { + if (typeof object.hiveMetastore !== "object") + throw TypeError(".google.cloud.dataplex.v1.Entity.CompatibilityStatus.hiveMetastore: object expected"); + message.hiveMetastore = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.fromObject(object.hiveMetastore); + } + if (object.bigquery != null) { + if (typeof object.bigquery !== "object") + throw TypeError(".google.cloud.dataplex.v1.Entity.CompatibilityStatus.bigquery: object expected"); + message.bigquery = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.fromObject(object.bigquery); + } + return message; + }; + + /** + * Creates a plain object from a CompatibilityStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus} message CompatibilityStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompatibilityStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.hiveMetastore = null; + object.bigquery = null; + } + if (message.hiveMetastore != null && message.hasOwnProperty("hiveMetastore")) + object.hiveMetastore = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.toObject(message.hiveMetastore, options); + if (message.bigquery != null && message.hasOwnProperty("bigquery")) + object.bigquery = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.toObject(message.bigquery, options); + return object; + }; + + /** + * Converts this CompatibilityStatus to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @instance + * @returns {Object.} JSON object + */ + CompatibilityStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + CompatibilityStatus.Compatibility = (function() { + + /** + * Properties of a Compatibility. + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @interface ICompatibility + * @property {boolean|null} [compatible] Compatibility compatible + * @property {string|null} [reason] Compatibility reason + */ + + /** + * Constructs a new Compatibility. + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @classdesc Represents a Compatibility. + * @implements ICompatibility + * @constructor + * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility=} [properties] Properties to set + */ + function Compatibility(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Compatibility compatible. + * @member {boolean} compatible + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @instance + */ + Compatibility.prototype.compatible = false; + + /** + * Compatibility reason. + * @member {string} reason + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @instance + */ + Compatibility.prototype.reason = ""; + + /** + * Creates a new Compatibility instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @static + * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} Compatibility instance + */ + Compatibility.create = function create(properties) { + return new Compatibility(properties); + }; + + /** + * Encodes the specified Compatibility message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @static + * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility} message Compatibility message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Compatibility.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.compatible != null && Object.hasOwnProperty.call(message, "compatible")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.compatible); + if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.reason); + return writer; + }; + + /** + * Encodes the specified Compatibility message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @static + * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility} message Compatibility message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Compatibility.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Compatibility message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} Compatibility + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Compatibility.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.compatible = reader.bool(); + break; + case 2: + message.reason = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Compatibility message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} Compatibility + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Compatibility.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Compatibility message. + * @function verify + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Compatibility.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.compatible != null && message.hasOwnProperty("compatible")) + if (typeof message.compatible !== "boolean") + return "compatible: boolean expected"; + if (message.reason != null && message.hasOwnProperty("reason")) + if (!$util.isString(message.reason)) + return "reason: string expected"; + return null; + }; + + /** + * Creates a Compatibility message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} Compatibility + */ + Compatibility.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility) + return object; + var message = new $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility(); + if (object.compatible != null) + message.compatible = Boolean(object.compatible); + if (object.reason != null) + message.reason = String(object.reason); + return message; + }; + + /** + * Creates a plain object from a Compatibility message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @static + * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} message Compatibility + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Compatibility.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.compatible = false; + object.reason = ""; + } + if (message.compatible != null && message.hasOwnProperty("compatible")) + object.compatible = message.compatible; + if (message.reason != null && message.hasOwnProperty("reason")) + object.reason = message.reason; + return object; + }; + + /** + * Converts this Compatibility to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @instance + * @returns {Object.} JSON object + */ + Compatibility.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Compatibility; + })(); + + return CompatibilityStatus; + })(); + + return Entity; + })(); + + v1.Partition = (function() { + + /** + * Properties of a Partition. + * @memberof google.cloud.dataplex.v1 + * @interface IPartition + * @property {string|null} [name] Partition name + * @property {Array.|null} [values] Partition values + * @property {string|null} [location] Partition location + * @property {string|null} [etag] Partition etag + */ + + /** + * Constructs a new Partition. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a Partition. + * @implements IPartition + * @constructor + * @param {google.cloud.dataplex.v1.IPartition=} [properties] Properties to set + */ + function Partition(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Partition name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Partition + * @instance + */ + Partition.prototype.name = ""; + + /** + * Partition values. + * @member {Array.} values + * @memberof google.cloud.dataplex.v1.Partition + * @instance + */ + Partition.prototype.values = $util.emptyArray; + + /** + * Partition location. + * @member {string} location + * @memberof google.cloud.dataplex.v1.Partition + * @instance + */ + Partition.prototype.location = ""; + + /** + * Partition etag. + * @member {string} etag + * @memberof google.cloud.dataplex.v1.Partition + * @instance + */ + Partition.prototype.etag = ""; + + /** + * Creates a new Partition instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {google.cloud.dataplex.v1.IPartition=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Partition} Partition instance + */ + Partition.create = function create(properties) { + return new Partition(properties); + }; + + /** + * Encodes the specified Partition message. Does not implicitly {@link google.cloud.dataplex.v1.Partition.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {google.cloud.dataplex.v1.IPartition} message Partition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Partition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.values[i]); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.location); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.etag); + return writer; + }; + + /** + * Encodes the specified Partition message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Partition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {google.cloud.dataplex.v1.IPartition} message Partition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Partition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Partition message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Partition} Partition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Partition.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Partition(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.values && message.values.length)) + message.values = []; + message.values.push(reader.string()); + break; + case 3: + message.location = reader.string(); + break; + case 4: + message.etag = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Partition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Partition} Partition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Partition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Partition message. + * @function verify + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Partition.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) + if (!$util.isString(message.values[i])) + return "values: string[] expected"; + } + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; + + /** + * Creates a Partition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Partition} Partition + */ + Partition.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Partition) + return object; + var message = new $root.google.cloud.dataplex.v1.Partition(); + if (object.name != null) + message.name = String(object.name); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.cloud.dataplex.v1.Partition.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = String(object.values[i]); + } + if (object.location != null) + message.location = String(object.location); + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; + + /** + * Creates a plain object from a Partition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {google.cloud.dataplex.v1.Partition} message Partition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Partition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (options.defaults) { + object.name = ""; + object.location = ""; + object.etag = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = message.values[j]; + } + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + return object; + }; + + /** + * Converts this Partition to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Partition + * @instance + * @returns {Object.} JSON object + */ + Partition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Partition; + })(); + + v1.Schema = (function() { + + /** + * Properties of a Schema. + * @memberof google.cloud.dataplex.v1 + * @interface ISchema + * @property {boolean|null} [userManaged] Schema userManaged + * @property {Array.|null} [fields] Schema fields + * @property {Array.|null} [partitionFields] Schema partitionFields + * @property {google.cloud.dataplex.v1.Schema.PartitionStyle|null} [partitionStyle] Schema partitionStyle + */ + + /** + * Constructs a new Schema. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a Schema. + * @implements ISchema + * @constructor + * @param {google.cloud.dataplex.v1.ISchema=} [properties] Properties to set + */ + function Schema(properties) { + this.fields = []; + this.partitionFields = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Schema userManaged. + * @member {boolean} userManaged + * @memberof google.cloud.dataplex.v1.Schema + * @instance + */ + Schema.prototype.userManaged = false; + + /** + * Schema fields. + * @member {Array.} fields + * @memberof google.cloud.dataplex.v1.Schema + * @instance + */ + Schema.prototype.fields = $util.emptyArray; + + /** + * Schema partitionFields. + * @member {Array.} partitionFields + * @memberof google.cloud.dataplex.v1.Schema + * @instance + */ + Schema.prototype.partitionFields = $util.emptyArray; + + /** + * Schema partitionStyle. + * @member {google.cloud.dataplex.v1.Schema.PartitionStyle} partitionStyle + * @memberof google.cloud.dataplex.v1.Schema + * @instance + */ + Schema.prototype.partitionStyle = 0; + + /** + * Creates a new Schema instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Schema + * @static + * @param {google.cloud.dataplex.v1.ISchema=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Schema} Schema instance + */ + Schema.create = function create(properties) { + return new Schema(properties); + }; + + /** + * Encodes the specified Schema message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Schema + * @static + * @param {google.cloud.dataplex.v1.ISchema} message Schema message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Schema.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userManaged != null && Object.hasOwnProperty.call(message, "userManaged")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.userManaged); + if (message.fields != null && message.fields.length) + for (var i = 0; i < message.fields.length; ++i) + $root.google.cloud.dataplex.v1.Schema.SchemaField.encode(message.fields[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.partitionFields != null && message.partitionFields.length) + for (var i = 0; i < message.partitionFields.length; ++i) + $root.google.cloud.dataplex.v1.Schema.PartitionField.encode(message.partitionFields[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.partitionStyle != null && Object.hasOwnProperty.call(message, "partitionStyle")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.partitionStyle); + return writer; + }; + + /** + * Encodes the specified Schema message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Schema + * @static + * @param {google.cloud.dataplex.v1.ISchema} message Schema message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Schema.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Schema message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Schema + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Schema} Schema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Schema.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Schema(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.userManaged = reader.bool(); + break; + case 2: + if (!(message.fields && message.fields.length)) + message.fields = []; + message.fields.push($root.google.cloud.dataplex.v1.Schema.SchemaField.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.partitionFields && message.partitionFields.length)) + message.partitionFields = []; + message.partitionFields.push($root.google.cloud.dataplex.v1.Schema.PartitionField.decode(reader, reader.uint32())); + break; + case 4: + message.partitionStyle = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Schema message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Schema + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Schema} Schema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Schema.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Schema message. + * @function verify + * @memberof google.cloud.dataplex.v1.Schema + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Schema.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userManaged != null && message.hasOwnProperty("userManaged")) + if (typeof message.userManaged !== "boolean") + return "userManaged: boolean expected"; + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!Array.isArray(message.fields)) + return "fields: array expected"; + for (var i = 0; i < message.fields.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Schema.SchemaField.verify(message.fields[i]); + if (error) + return "fields." + error; + } + } + if (message.partitionFields != null && message.hasOwnProperty("partitionFields")) { + if (!Array.isArray(message.partitionFields)) + return "partitionFields: array expected"; + for (var i = 0; i < message.partitionFields.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Schema.PartitionField.verify(message.partitionFields[i]); + if (error) + return "partitionFields." + error; + } + } + if (message.partitionStyle != null && message.hasOwnProperty("partitionStyle")) + switch (message.partitionStyle) { + default: + return "partitionStyle: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates a Schema message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Schema + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Schema} Schema + */ + Schema.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Schema) + return object; + var message = new $root.google.cloud.dataplex.v1.Schema(); + if (object.userManaged != null) + message.userManaged = Boolean(object.userManaged); + if (object.fields) { + if (!Array.isArray(object.fields)) + throw TypeError(".google.cloud.dataplex.v1.Schema.fields: array expected"); + message.fields = []; + for (var i = 0; i < object.fields.length; ++i) { + if (typeof object.fields[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.Schema.fields: object expected"); + message.fields[i] = $root.google.cloud.dataplex.v1.Schema.SchemaField.fromObject(object.fields[i]); + } + } + if (object.partitionFields) { + if (!Array.isArray(object.partitionFields)) + throw TypeError(".google.cloud.dataplex.v1.Schema.partitionFields: array expected"); + message.partitionFields = []; + for (var i = 0; i < object.partitionFields.length; ++i) { + if (typeof object.partitionFields[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.Schema.partitionFields: object expected"); + message.partitionFields[i] = $root.google.cloud.dataplex.v1.Schema.PartitionField.fromObject(object.partitionFields[i]); + } + } + switch (object.partitionStyle) { + case "PARTITION_STYLE_UNSPECIFIED": + case 0: + message.partitionStyle = 0; + break; + case "HIVE_COMPATIBLE": + case 1: + message.partitionStyle = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a Schema message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Schema + * @static + * @param {google.cloud.dataplex.v1.Schema} message Schema + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Schema.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.fields = []; + object.partitionFields = []; + } + if (options.defaults) { + object.userManaged = false; + object.partitionStyle = options.enums === String ? "PARTITION_STYLE_UNSPECIFIED" : 0; + } + if (message.userManaged != null && message.hasOwnProperty("userManaged")) + object.userManaged = message.userManaged; + if (message.fields && message.fields.length) { + object.fields = []; + for (var j = 0; j < message.fields.length; ++j) + object.fields[j] = $root.google.cloud.dataplex.v1.Schema.SchemaField.toObject(message.fields[j], options); + } + if (message.partitionFields && message.partitionFields.length) { + object.partitionFields = []; + for (var j = 0; j < message.partitionFields.length; ++j) + object.partitionFields[j] = $root.google.cloud.dataplex.v1.Schema.PartitionField.toObject(message.partitionFields[j], options); + } + if (message.partitionStyle != null && message.hasOwnProperty("partitionStyle")) + object.partitionStyle = options.enums === String ? $root.google.cloud.dataplex.v1.Schema.PartitionStyle[message.partitionStyle] : message.partitionStyle; + return object; + }; + + /** + * Converts this Schema to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Schema + * @instance + * @returns {Object.} JSON object + */ + Schema.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.cloud.dataplex.v1.Schema.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} BOOLEAN=1 BOOLEAN value + * @property {number} BYTE=2 BYTE value + * @property {number} INT16=3 INT16 value + * @property {number} INT32=4 INT32 value + * @property {number} INT64=5 INT64 value + * @property {number} FLOAT=6 FLOAT value + * @property {number} DOUBLE=7 DOUBLE value + * @property {number} DECIMAL=8 DECIMAL value + * @property {number} STRING=9 STRING value + * @property {number} BINARY=10 BINARY value + * @property {number} TIMESTAMP=11 TIMESTAMP value + * @property {number} DATE=12 DATE value + * @property {number} TIME=13 TIME value + * @property {number} RECORD=14 RECORD value + * @property {number} NULL=100 NULL value + */ + Schema.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BOOLEAN"] = 1; + values[valuesById[2] = "BYTE"] = 2; + values[valuesById[3] = "INT16"] = 3; + values[valuesById[4] = "INT32"] = 4; + values[valuesById[5] = "INT64"] = 5; + values[valuesById[6] = "FLOAT"] = 6; + values[valuesById[7] = "DOUBLE"] = 7; + values[valuesById[8] = "DECIMAL"] = 8; + values[valuesById[9] = "STRING"] = 9; + values[valuesById[10] = "BINARY"] = 10; + values[valuesById[11] = "TIMESTAMP"] = 11; + values[valuesById[12] = "DATE"] = 12; + values[valuesById[13] = "TIME"] = 13; + values[valuesById[14] = "RECORD"] = 14; + values[valuesById[100] = "NULL"] = 100; + return values; + })(); + + /** + * Mode enum. + * @name google.cloud.dataplex.v1.Schema.Mode + * @enum {number} + * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value + * @property {number} REQUIRED=1 REQUIRED value + * @property {number} NULLABLE=2 NULLABLE value + * @property {number} REPEATED=3 REPEATED value + */ + Schema.Mode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "REQUIRED"] = 1; + values[valuesById[2] = "NULLABLE"] = 2; + values[valuesById[3] = "REPEATED"] = 3; + return values; + })(); + + Schema.SchemaField = (function() { + + /** + * Properties of a SchemaField. + * @memberof google.cloud.dataplex.v1.Schema + * @interface ISchemaField + * @property {string|null} [name] SchemaField name + * @property {string|null} [description] SchemaField description + * @property {google.cloud.dataplex.v1.Schema.Type|null} [type] SchemaField type + * @property {google.cloud.dataplex.v1.Schema.Mode|null} [mode] SchemaField mode + * @property {Array.|null} [fields] SchemaField fields + */ + + /** + * Constructs a new SchemaField. + * @memberof google.cloud.dataplex.v1.Schema + * @classdesc Represents a SchemaField. + * @implements ISchemaField + * @constructor + * @param {google.cloud.dataplex.v1.Schema.ISchemaField=} [properties] Properties to set + */ + function SchemaField(properties) { + this.fields = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SchemaField name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @instance + */ + SchemaField.prototype.name = ""; + + /** + * SchemaField description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @instance + */ + SchemaField.prototype.description = ""; + + /** + * SchemaField type. + * @member {google.cloud.dataplex.v1.Schema.Type} type + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @instance + */ + SchemaField.prototype.type = 0; + + /** + * SchemaField mode. + * @member {google.cloud.dataplex.v1.Schema.Mode} mode + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @instance + */ + SchemaField.prototype.mode = 0; + + /** + * SchemaField fields. + * @member {Array.} fields + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @instance + */ + SchemaField.prototype.fields = $util.emptyArray; + + /** + * Creates a new SchemaField instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @static + * @param {google.cloud.dataplex.v1.Schema.ISchemaField=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Schema.SchemaField} SchemaField instance + */ + SchemaField.create = function create(properties) { + return new SchemaField(properties); + }; + + /** + * Encodes the specified SchemaField message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.SchemaField.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @static + * @param {google.cloud.dataplex.v1.Schema.ISchemaField} message SchemaField message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaField.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.mode); + if (message.fields != null && message.fields.length) + for (var i = 0; i < message.fields.length; ++i) + $root.google.cloud.dataplex.v1.Schema.SchemaField.encode(message.fields[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SchemaField message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.SchemaField.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @static + * @param {google.cloud.dataplex.v1.Schema.ISchemaField} message SchemaField message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaField.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SchemaField message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Schema.SchemaField} SchemaField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaField.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Schema.SchemaField(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.type = reader.int32(); + break; + case 4: + message.mode = reader.int32(); + break; + case 10: + if (!(message.fields && message.fields.length)) + message.fields = []; + message.fields.push($root.google.cloud.dataplex.v1.Schema.SchemaField.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SchemaField message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Schema.SchemaField} SchemaField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaField.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SchemaField message. + * @function verify + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SchemaField.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 100: + break; + } + if (message.mode != null && message.hasOwnProperty("mode")) + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!Array.isArray(message.fields)) + return "fields: array expected"; + for (var i = 0; i < message.fields.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Schema.SchemaField.verify(message.fields[i]); + if (error) + return "fields." + error; + } + } + return null; + }; + + /** + * Creates a SchemaField message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Schema.SchemaField} SchemaField + */ + SchemaField.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Schema.SchemaField) + return object; + var message = new $root.google.cloud.dataplex.v1.Schema.SchemaField(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "BOOLEAN": + case 1: + message.type = 1; + break; + case "BYTE": + case 2: + message.type = 2; + break; + case "INT16": + case 3: + message.type = 3; + break; + case "INT32": + case 4: + message.type = 4; + break; + case "INT64": + case 5: + message.type = 5; + break; + case "FLOAT": + case 6: + message.type = 6; + break; + case "DOUBLE": + case 7: + message.type = 7; + break; + case "DECIMAL": + case 8: + message.type = 8; + break; + case "STRING": + case 9: + message.type = 9; + break; + case "BINARY": + case 10: + message.type = 10; + break; + case "TIMESTAMP": + case 11: + message.type = 11; + break; + case "DATE": + case 12: + message.type = 12; + break; + case "TIME": + case 13: + message.type = 13; + break; + case "RECORD": + case 14: + message.type = 14; + break; + case "NULL": + case 100: + message.type = 100; + break; + } + switch (object.mode) { + case "MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "REQUIRED": + case 1: + message.mode = 1; + break; + case "NULLABLE": + case 2: + message.mode = 2; + break; + case "REPEATED": + case 3: + message.mode = 3; + break; + } + if (object.fields) { + if (!Array.isArray(object.fields)) + throw TypeError(".google.cloud.dataplex.v1.Schema.SchemaField.fields: array expected"); + message.fields = []; + for (var i = 0; i < object.fields.length; ++i) { + if (typeof object.fields[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.Schema.SchemaField.fields: object expected"); + message.fields[i] = $root.google.cloud.dataplex.v1.Schema.SchemaField.fromObject(object.fields[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SchemaField message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @static + * @param {google.cloud.dataplex.v1.Schema.SchemaField} message SchemaField + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SchemaField.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.fields = []; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Schema.Type[message.type] : message.type; + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = options.enums === String ? $root.google.cloud.dataplex.v1.Schema.Mode[message.mode] : message.mode; + if (message.fields && message.fields.length) { + object.fields = []; + for (var j = 0; j < message.fields.length; ++j) + object.fields[j] = $root.google.cloud.dataplex.v1.Schema.SchemaField.toObject(message.fields[j], options); + } + return object; + }; + + /** + * Converts this SchemaField to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @instance + * @returns {Object.} JSON object + */ + SchemaField.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SchemaField; + })(); + + Schema.PartitionField = (function() { + + /** + * Properties of a PartitionField. + * @memberof google.cloud.dataplex.v1.Schema + * @interface IPartitionField + * @property {string|null} [name] PartitionField name + * @property {google.cloud.dataplex.v1.Schema.Type|null} [type] PartitionField type + */ + + /** + * Constructs a new PartitionField. + * @memberof google.cloud.dataplex.v1.Schema + * @classdesc Represents a PartitionField. + * @implements IPartitionField + * @constructor + * @param {google.cloud.dataplex.v1.Schema.IPartitionField=} [properties] Properties to set + */ + function PartitionField(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PartitionField name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @instance + */ + PartitionField.prototype.name = ""; + + /** + * PartitionField type. + * @member {google.cloud.dataplex.v1.Schema.Type} type + * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @instance + */ + PartitionField.prototype.type = 0; + + /** + * Creates a new PartitionField instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @static + * @param {google.cloud.dataplex.v1.Schema.IPartitionField=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Schema.PartitionField} PartitionField instance + */ + PartitionField.create = function create(properties) { + return new PartitionField(properties); + }; + + /** + * Encodes the specified PartitionField message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.PartitionField.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @static + * @param {google.cloud.dataplex.v1.Schema.IPartitionField} message PartitionField message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartitionField.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + return writer; + }; + + /** + * Encodes the specified PartitionField message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.PartitionField.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @static + * @param {google.cloud.dataplex.v1.Schema.IPartitionField} message PartitionField message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartitionField.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PartitionField message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Schema.PartitionField} PartitionField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartitionField.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Schema.PartitionField(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.type = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PartitionField message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Schema.PartitionField} PartitionField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartitionField.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PartitionField message. + * @function verify + * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PartitionField.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 100: + break; + } + return null; + }; + + /** + * Creates a PartitionField message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Schema.PartitionField} PartitionField + */ + PartitionField.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Schema.PartitionField) + return object; + var message = new $root.google.cloud.dataplex.v1.Schema.PartitionField(); + if (object.name != null) + message.name = String(object.name); + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "BOOLEAN": + case 1: + message.type = 1; + break; + case "BYTE": + case 2: + message.type = 2; + break; + case "INT16": + case 3: + message.type = 3; + break; + case "INT32": + case 4: + message.type = 4; + break; + case "INT64": + case 5: + message.type = 5; + break; + case "FLOAT": + case 6: + message.type = 6; + break; + case "DOUBLE": + case 7: + message.type = 7; + break; + case "DECIMAL": + case 8: + message.type = 8; + break; + case "STRING": + case 9: + message.type = 9; + break; + case "BINARY": + case 10: + message.type = 10; + break; + case "TIMESTAMP": + case 11: + message.type = 11; + break; + case "DATE": + case 12: + message.type = 12; + break; + case "TIME": + case 13: + message.type = 13; + break; + case "RECORD": + case 14: + message.type = 14; + break; + case "NULL": + case 100: + message.type = 100; + break; + } + return message; + }; + + /** + * Creates a plain object from a PartitionField message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @static + * @param {google.cloud.dataplex.v1.Schema.PartitionField} message PartitionField + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PartitionField.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Schema.Type[message.type] : message.type; + return object; + }; + + /** + * Converts this PartitionField to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @instance + * @returns {Object.} JSON object + */ + PartitionField.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PartitionField; + })(); + + /** + * PartitionStyle enum. + * @name google.cloud.dataplex.v1.Schema.PartitionStyle + * @enum {number} + * @property {number} PARTITION_STYLE_UNSPECIFIED=0 PARTITION_STYLE_UNSPECIFIED value + * @property {number} HIVE_COMPATIBLE=1 HIVE_COMPATIBLE value + */ + Schema.PartitionStyle = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PARTITION_STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "HIVE_COMPATIBLE"] = 1; + return values; + })(); + + return Schema; + })(); + + v1.StorageFormat = (function() { + + /** + * Properties of a StorageFormat. + * @memberof google.cloud.dataplex.v1 + * @interface IStorageFormat + * @property {google.cloud.dataplex.v1.StorageFormat.Format|null} [format] StorageFormat format + * @property {google.cloud.dataplex.v1.StorageFormat.CompressionFormat|null} [compressionFormat] StorageFormat compressionFormat + * @property {string|null} [mimeType] StorageFormat mimeType + * @property {google.cloud.dataplex.v1.StorageFormat.ICsvOptions|null} [csv] StorageFormat csv + * @property {google.cloud.dataplex.v1.StorageFormat.IJsonOptions|null} [json] StorageFormat json + */ + + /** + * Constructs a new StorageFormat. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a StorageFormat. + * @implements IStorageFormat + * @constructor + * @param {google.cloud.dataplex.v1.IStorageFormat=} [properties] Properties to set + */ + function StorageFormat(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StorageFormat format. + * @member {google.cloud.dataplex.v1.StorageFormat.Format} format + * @memberof google.cloud.dataplex.v1.StorageFormat + * @instance + */ + StorageFormat.prototype.format = 0; + + /** + * StorageFormat compressionFormat. + * @member {google.cloud.dataplex.v1.StorageFormat.CompressionFormat} compressionFormat + * @memberof google.cloud.dataplex.v1.StorageFormat + * @instance + */ + StorageFormat.prototype.compressionFormat = 0; + + /** + * StorageFormat mimeType. + * @member {string} mimeType + * @memberof google.cloud.dataplex.v1.StorageFormat + * @instance + */ + StorageFormat.prototype.mimeType = ""; + + /** + * StorageFormat csv. + * @member {google.cloud.dataplex.v1.StorageFormat.ICsvOptions|null|undefined} csv + * @memberof google.cloud.dataplex.v1.StorageFormat + * @instance + */ + StorageFormat.prototype.csv = null; + + /** + * StorageFormat json. + * @member {google.cloud.dataplex.v1.StorageFormat.IJsonOptions|null|undefined} json + * @memberof google.cloud.dataplex.v1.StorageFormat + * @instance + */ + StorageFormat.prototype.json = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * StorageFormat options. + * @member {"csv"|"json"|undefined} options + * @memberof google.cloud.dataplex.v1.StorageFormat + * @instance + */ + Object.defineProperty(StorageFormat.prototype, "options", { + get: $util.oneOfGetter($oneOfFields = ["csv", "json"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new StorageFormat instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.StorageFormat + * @static + * @param {google.cloud.dataplex.v1.IStorageFormat=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.StorageFormat} StorageFormat instance + */ + StorageFormat.create = function create(properties) { + return new StorageFormat(properties); + }; + + /** + * Encodes the specified StorageFormat message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.StorageFormat + * @static + * @param {google.cloud.dataplex.v1.IStorageFormat} message StorageFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StorageFormat.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); + if (message.compressionFormat != null && Object.hasOwnProperty.call(message, "compressionFormat")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.compressionFormat); + if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.mimeType); + if (message.csv != null && Object.hasOwnProperty.call(message, "csv")) + $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.encode(message.csv, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.json != null && Object.hasOwnProperty.call(message, "json")) + $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.encode(message.json, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified StorageFormat message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.StorageFormat + * @static + * @param {google.cloud.dataplex.v1.IStorageFormat} message StorageFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StorageFormat.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StorageFormat message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.StorageFormat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.StorageFormat} StorageFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StorageFormat.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.StorageFormat(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.format = reader.int32(); + break; + case 2: + message.compressionFormat = reader.int32(); + break; + case 3: + message.mimeType = reader.string(); + break; + case 10: + message.csv = $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.decode(reader, reader.uint32()); + break; + case 11: + message.json = $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StorageFormat message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.StorageFormat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.StorageFormat} StorageFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StorageFormat.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StorageFormat message. + * @function verify + * @memberof google.cloud.dataplex.v1.StorageFormat + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StorageFormat.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.format != null && message.hasOwnProperty("format")) + switch (message.format) { + default: + return "format: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 100: + case 101: + case 200: + case 201: + case 202: + case 203: + case 204: + case 1000: + case 1001: + break; + } + if (message.compressionFormat != null && message.hasOwnProperty("compressionFormat")) + switch (message.compressionFormat) { + default: + return "compressionFormat: enum value expected"; + case 0: + case 2: + case 3: + break; + } + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + if (!$util.isString(message.mimeType)) + return "mimeType: string expected"; + if (message.csv != null && message.hasOwnProperty("csv")) { + properties.options = 1; + { + var error = $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify(message.csv); + if (error) + return "csv." + error; + } + } + if (message.json != null && message.hasOwnProperty("json")) { + if (properties.options === 1) + return "options: multiple values"; + properties.options = 1; + { + var error = $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify(message.json); + if (error) + return "json." + error; + } + } + return null; + }; + + /** + * Creates a StorageFormat message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.StorageFormat + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.StorageFormat} StorageFormat + */ + StorageFormat.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.StorageFormat) + return object; + var message = new $root.google.cloud.dataplex.v1.StorageFormat(); + switch (object.format) { + case "FORMAT_UNSPECIFIED": + case 0: + message.format = 0; + break; + case "PARQUET": + case 1: + message.format = 1; + break; + case "AVRO": + case 2: + message.format = 2; + break; + case "ORC": + case 3: + message.format = 3; + break; + case "CSV": + case 100: + message.format = 100; + break; + case "JSON": + case 101: + message.format = 101; + break; + case "IMAGE": + case 200: + message.format = 200; + break; + case "AUDIO": + case 201: + message.format = 201; + break; + case "VIDEO": + case 202: + message.format = 202; + break; + case "TEXT": + case 203: + message.format = 203; + break; + case "TFRECORD": + case 204: + message.format = 204; + break; + case "OTHER": + case 1000: + message.format = 1000; + break; + case "UNKNOWN": + case 1001: + message.format = 1001; + break; + } + switch (object.compressionFormat) { + case "COMPRESSION_FORMAT_UNSPECIFIED": + case 0: + message.compressionFormat = 0; + break; + case "GZIP": + case 2: + message.compressionFormat = 2; + break; + case "BZIP2": + case 3: + message.compressionFormat = 3; + break; + } + if (object.mimeType != null) + message.mimeType = String(object.mimeType); + if (object.csv != null) { + if (typeof object.csv !== "object") + throw TypeError(".google.cloud.dataplex.v1.StorageFormat.csv: object expected"); + message.csv = $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.fromObject(object.csv); + } + if (object.json != null) { + if (typeof object.json !== "object") + throw TypeError(".google.cloud.dataplex.v1.StorageFormat.json: object expected"); + message.json = $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.fromObject(object.json); + } + return message; + }; + + /** + * Creates a plain object from a StorageFormat message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.StorageFormat + * @static + * @param {google.cloud.dataplex.v1.StorageFormat} message StorageFormat + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StorageFormat.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; + object.compressionFormat = options.enums === String ? "COMPRESSION_FORMAT_UNSPECIFIED" : 0; + object.mimeType = ""; + } + if (message.format != null && message.hasOwnProperty("format")) + object.format = options.enums === String ? $root.google.cloud.dataplex.v1.StorageFormat.Format[message.format] : message.format; + if (message.compressionFormat != null && message.hasOwnProperty("compressionFormat")) + object.compressionFormat = options.enums === String ? $root.google.cloud.dataplex.v1.StorageFormat.CompressionFormat[message.compressionFormat] : message.compressionFormat; + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + object.mimeType = message.mimeType; + if (message.csv != null && message.hasOwnProperty("csv")) { + object.csv = $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.toObject(message.csv, options); + if (options.oneofs) + object.options = "csv"; + } + if (message.json != null && message.hasOwnProperty("json")) { + object.json = $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.toObject(message.json, options); + if (options.oneofs) + object.options = "json"; + } + return object; + }; + + /** + * Converts this StorageFormat to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.StorageFormat + * @instance + * @returns {Object.} JSON object + */ + StorageFormat.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + StorageFormat.CsvOptions = (function() { + + /** + * Properties of a CsvOptions. + * @memberof google.cloud.dataplex.v1.StorageFormat + * @interface ICsvOptions + * @property {string|null} [encoding] CsvOptions encoding + * @property {number|null} [headerRows] CsvOptions headerRows + * @property {string|null} [delimiter] CsvOptions delimiter + * @property {string|null} [quote] CsvOptions quote + */ + + /** + * Constructs a new CsvOptions. + * @memberof google.cloud.dataplex.v1.StorageFormat + * @classdesc Represents a CsvOptions. + * @implements ICsvOptions + * @constructor + * @param {google.cloud.dataplex.v1.StorageFormat.ICsvOptions=} [properties] Properties to set + */ + function CsvOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CsvOptions encoding. + * @member {string} encoding + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @instance + */ + CsvOptions.prototype.encoding = ""; + + /** + * CsvOptions headerRows. + * @member {number} headerRows + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @instance + */ + CsvOptions.prototype.headerRows = 0; + + /** + * CsvOptions delimiter. + * @member {string} delimiter + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @instance + */ + CsvOptions.prototype.delimiter = ""; + + /** + * CsvOptions quote. + * @member {string} quote + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @instance + */ + CsvOptions.prototype.quote = ""; + + /** + * Creates a new CsvOptions instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.StorageFormat.ICsvOptions=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.StorageFormat.CsvOptions} CsvOptions instance + */ + CsvOptions.create = function create(properties) { + return new CsvOptions(properties); + }; + + /** + * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.StorageFormat.ICsvOptions} message CsvOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CsvOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.encoding); + if (message.headerRows != null && Object.hasOwnProperty.call(message, "headerRows")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.headerRows); + if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.delimiter); + if (message.quote != null && Object.hasOwnProperty.call(message, "quote")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.quote); + return writer; + }; + + /** + * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.StorageFormat.ICsvOptions} message CsvOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CsvOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CsvOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.StorageFormat.CsvOptions} CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CsvOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.encoding = reader.string(); + break; + case 2: + message.headerRows = reader.int32(); + break; + case 3: + message.delimiter = reader.string(); + break; + case 4: + message.quote = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CsvOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.StorageFormat.CsvOptions} CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CsvOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CsvOptions message. + * @function verify + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CsvOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) + if (!$util.isString(message.encoding)) + return "encoding: string expected"; + if (message.headerRows != null && message.hasOwnProperty("headerRows")) + if (!$util.isInteger(message.headerRows)) + return "headerRows: integer expected"; + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + if (!$util.isString(message.delimiter)) + return "delimiter: string expected"; + if (message.quote != null && message.hasOwnProperty("quote")) + if (!$util.isString(message.quote)) + return "quote: string expected"; + return null; + }; + + /** + * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.StorageFormat.CsvOptions} CsvOptions + */ + CsvOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions) + return object; + var message = new $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions(); + if (object.encoding != null) + message.encoding = String(object.encoding); + if (object.headerRows != null) + message.headerRows = object.headerRows | 0; + if (object.delimiter != null) + message.delimiter = String(object.delimiter); + if (object.quote != null) + message.quote = String(object.quote); + return message; + }; + + /** + * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.StorageFormat.CsvOptions} message CsvOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CsvOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.encoding = ""; + object.headerRows = 0; + object.delimiter = ""; + object.quote = ""; + } + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = message.encoding; + if (message.headerRows != null && message.hasOwnProperty("headerRows")) + object.headerRows = message.headerRows; + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + object.delimiter = message.delimiter; + if (message.quote != null && message.hasOwnProperty("quote")) + object.quote = message.quote; + return object; + }; + + /** + * Converts this CsvOptions to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @instance + * @returns {Object.} JSON object + */ + CsvOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CsvOptions; + })(); + + StorageFormat.JsonOptions = (function() { + + /** + * Properties of a JsonOptions. + * @memberof google.cloud.dataplex.v1.StorageFormat + * @interface IJsonOptions + * @property {string|null} [encoding] JsonOptions encoding + */ + + /** + * Constructs a new JsonOptions. + * @memberof google.cloud.dataplex.v1.StorageFormat + * @classdesc Represents a JsonOptions. + * @implements IJsonOptions + * @constructor + * @param {google.cloud.dataplex.v1.StorageFormat.IJsonOptions=} [properties] Properties to set + */ + function JsonOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JsonOptions encoding. + * @member {string} encoding + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @instance + */ + JsonOptions.prototype.encoding = ""; + + /** + * Creates a new JsonOptions instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.StorageFormat.IJsonOptions=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.StorageFormat.JsonOptions} JsonOptions instance + */ + JsonOptions.create = function create(properties) { + return new JsonOptions(properties); + }; + + /** + * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.StorageFormat.IJsonOptions} message JsonOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JsonOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.encoding); + return writer; + }; + + /** + * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.StorageFormat.IJsonOptions} message JsonOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JsonOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JsonOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.StorageFormat.JsonOptions} JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JsonOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.encoding = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JsonOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.StorageFormat.JsonOptions} JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JsonOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JsonOptions message. + * @function verify + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JsonOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) + if (!$util.isString(message.encoding)) + return "encoding: string expected"; + return null; + }; + + /** + * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.StorageFormat.JsonOptions} JsonOptions + */ + JsonOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions) + return object; + var message = new $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions(); + if (object.encoding != null) + message.encoding = String(object.encoding); + return message; + }; + + /** + * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.StorageFormat.JsonOptions} message JsonOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JsonOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.encoding = ""; + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = message.encoding; + return object; + }; + + /** + * Converts this JsonOptions to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @instance + * @returns {Object.} JSON object + */ + JsonOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return JsonOptions; + })(); + + /** + * Format enum. + * @name google.cloud.dataplex.v1.StorageFormat.Format + * @enum {number} + * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value + * @property {number} PARQUET=1 PARQUET value + * @property {number} AVRO=2 AVRO value + * @property {number} ORC=3 ORC value + * @property {number} CSV=100 CSV value + * @property {number} JSON=101 JSON value + * @property {number} IMAGE=200 IMAGE value + * @property {number} AUDIO=201 AUDIO value + * @property {number} VIDEO=202 VIDEO value + * @property {number} TEXT=203 TEXT value + * @property {number} TFRECORD=204 TFRECORD value + * @property {number} OTHER=1000 OTHER value + * @property {number} UNKNOWN=1001 UNKNOWN value + */ + StorageFormat.Format = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "PARQUET"] = 1; + values[valuesById[2] = "AVRO"] = 2; + values[valuesById[3] = "ORC"] = 3; + values[valuesById[100] = "CSV"] = 100; + values[valuesById[101] = "JSON"] = 101; + values[valuesById[200] = "IMAGE"] = 200; + values[valuesById[201] = "AUDIO"] = 201; + values[valuesById[202] = "VIDEO"] = 202; + values[valuesById[203] = "TEXT"] = 203; + values[valuesById[204] = "TFRECORD"] = 204; + values[valuesById[1000] = "OTHER"] = 1000; + values[valuesById[1001] = "UNKNOWN"] = 1001; + return values; + })(); + + /** + * CompressionFormat enum. + * @name google.cloud.dataplex.v1.StorageFormat.CompressionFormat + * @enum {number} + * @property {number} COMPRESSION_FORMAT_UNSPECIFIED=0 COMPRESSION_FORMAT_UNSPECIFIED value + * @property {number} GZIP=2 GZIP value + * @property {number} BZIP2=3 BZIP2 value + */ + StorageFormat.CompressionFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COMPRESSION_FORMAT_UNSPECIFIED"] = 0; + values[valuesById[2] = "GZIP"] = 2; + values[valuesById[3] = "BZIP2"] = 3; + return values; + })(); + + return StorageFormat; + })(); + + /** + * StorageSystem enum. + * @name google.cloud.dataplex.v1.StorageSystem + * @enum {number} + * @property {number} STORAGE_SYSTEM_UNSPECIFIED=0 STORAGE_SYSTEM_UNSPECIFIED value + * @property {number} CLOUD_STORAGE=1 CLOUD_STORAGE value + * @property {number} BIGQUERY=2 BIGQUERY value + */ + v1.StorageSystem = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STORAGE_SYSTEM_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD_STORAGE"] = 1; + values[valuesById[2] = "BIGQUERY"] = 2; + return values; + })(); + + v1.Lake = (function() { + + /** + * Properties of a Lake. + * @memberof google.cloud.dataplex.v1 + * @interface ILake + * @property {string|null} [name] Lake name + * @property {string|null} [displayName] Lake displayName + * @property {string|null} [uid] Lake uid + * @property {google.protobuf.ITimestamp|null} [createTime] Lake createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Lake updateTime + * @property {Object.|null} [labels] Lake labels + * @property {string|null} [description] Lake description + * @property {google.cloud.dataplex.v1.Lake.MetastoreStatus.State|null} [state] Lake state + * @property {string|null} [serviceAccount] Lake serviceAccount + * @property {google.cloud.dataplex.v1.Lake.IMetastore|null} [metastore] Lake metastore + * @property {google.cloud.dataplex.v1.IAssetStatus|null} [assetStatus] Lake assetStatus + * @property {google.cloud.dataplex.v1.Lake.IMetastoreStatus|null} [metastoreStatus] Lake metastoreStatus + */ + + /** + * Constructs a new Lake. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a Lake. + * @implements ILake + * @constructor + * @param {google.cloud.dataplex.v1.ILake=} [properties] Properties to set + */ + function Lake(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Lake name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.name = ""; + + /** + * Lake displayName. + * @member {string} displayName + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.displayName = ""; + + /** + * Lake uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.uid = ""; + + /** + * Lake createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.createTime = null; + + /** + * Lake updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.updateTime = null; + + /** + * Lake labels. + * @member {Object.} labels + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.labels = $util.emptyObject; + + /** + * Lake description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.description = ""; + + /** + * Lake state. + * @member {google.cloud.dataplex.v1.Lake.MetastoreStatus.State} state + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.state = 0; + + /** + * Lake serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.serviceAccount = ""; + + /** + * Lake metastore. + * @member {google.cloud.dataplex.v1.Lake.IMetastore|null|undefined} metastore + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.metastore = null; + + /** + * Lake assetStatus. + * @member {google.cloud.dataplex.v1.IAssetStatus|null|undefined} assetStatus + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.assetStatus = null; + + /** + * Lake metastoreStatus. + * @member {google.cloud.dataplex.v1.Lake.IMetastoreStatus|null|undefined} metastoreStatus + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.metastoreStatus = null; + + /** + * Creates a new Lake instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Lake + * @static + * @param {google.cloud.dataplex.v1.ILake=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Lake} Lake instance + */ + Lake.create = function create(properties) { + return new Lake(properties); + }; + + /** + * Encodes the specified Lake message. Does not implicitly {@link google.cloud.dataplex.v1.Lake.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Lake + * @static + * @param {google.cloud.dataplex.v1.ILake} message Lake message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Lake.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.uid); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.description); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.serviceAccount); + if (message.metastore != null && Object.hasOwnProperty.call(message, "metastore")) + $root.google.cloud.dataplex.v1.Lake.Metastore.encode(message.metastore, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); + if (message.assetStatus != null && Object.hasOwnProperty.call(message, "assetStatus")) + $root.google.cloud.dataplex.v1.AssetStatus.encode(message.assetStatus, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); + if (message.metastoreStatus != null && Object.hasOwnProperty.call(message, "metastoreStatus")) + $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.encode(message.metastoreStatus, writer.uint32(/* id 104, wireType 2 =*/834).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Lake message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Lake.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Lake + * @static + * @param {google.cloud.dataplex.v1.ILake} message Lake message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Lake.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Lake message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Lake + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Lake} Lake + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Lake.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Lake(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.displayName = reader.string(); + break; + case 3: + message.uid = reader.string(); + break; + case 4: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + case 7: + message.description = reader.string(); + break; + case 8: + message.state = reader.int32(); + break; + case 9: + message.serviceAccount = reader.string(); + break; + case 102: + message.metastore = $root.google.cloud.dataplex.v1.Lake.Metastore.decode(reader, reader.uint32()); + break; + case 103: + message.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.decode(reader, reader.uint32()); + break; + case 104: + message.metastoreStatus = $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Lake message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Lake + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Lake} Lake + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Lake.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Lake message. + * @function verify + * @memberof google.cloud.dataplex.v1.Lake + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Lake.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.metastore != null && message.hasOwnProperty("metastore")) { + var error = $root.google.cloud.dataplex.v1.Lake.Metastore.verify(message.metastore); + if (error) + return "metastore." + error; + } + if (message.assetStatus != null && message.hasOwnProperty("assetStatus")) { + var error = $root.google.cloud.dataplex.v1.AssetStatus.verify(message.assetStatus); + if (error) + return "assetStatus." + error; + } + if (message.metastoreStatus != null && message.hasOwnProperty("metastoreStatus")) { + var error = $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.verify(message.metastoreStatus); + if (error) + return "metastoreStatus." + error; + } + return null; + }; + + /** + * Creates a Lake message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Lake + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Lake} Lake + */ + Lake.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Lake) + return object; + var message = new $root.google.cloud.dataplex.v1.Lake(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uid != null) + message.uid = String(object.uid); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Lake.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Lake.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.dataplex.v1.Lake.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.description != null) + message.description = String(object.description); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "NONE": + case 1: + message.state = 1; + break; + case "READY": + case 2: + message.state = 2; + break; + case "UPDATING": + case 3: + message.state = 3; + break; + case "ERROR": + case 4: + message.state = 4; + break; + } + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.metastore != null) { + if (typeof object.metastore !== "object") + throw TypeError(".google.cloud.dataplex.v1.Lake.metastore: object expected"); + message.metastore = $root.google.cloud.dataplex.v1.Lake.Metastore.fromObject(object.metastore); + } + if (object.assetStatus != null) { + if (typeof object.assetStatus !== "object") + throw TypeError(".google.cloud.dataplex.v1.Lake.assetStatus: object expected"); + message.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.fromObject(object.assetStatus); + } + if (object.metastoreStatus != null) { + if (typeof object.metastoreStatus !== "object") + throw TypeError(".google.cloud.dataplex.v1.Lake.metastoreStatus: object expected"); + message.metastoreStatus = $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.fromObject(object.metastoreStatus); + } + return message; + }; + + /** + * Creates a plain object from a Lake message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Lake + * @static + * @param {google.cloud.dataplex.v1.Lake} message Lake + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Lake.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.uid = ""; + object.createTime = null; + object.updateTime = null; + object.description = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.serviceAccount = ""; + object.metastore = null; + object.assetStatus = null; + object.metastoreStatus = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.State[message.state] : message.state; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.metastore != null && message.hasOwnProperty("metastore")) + object.metastore = $root.google.cloud.dataplex.v1.Lake.Metastore.toObject(message.metastore, options); + if (message.assetStatus != null && message.hasOwnProperty("assetStatus")) + object.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.toObject(message.assetStatus, options); + if (message.metastoreStatus != null && message.hasOwnProperty("metastoreStatus")) + object.metastoreStatus = $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.toObject(message.metastoreStatus, options); + return object; + }; + + /** + * Converts this Lake to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Lake + * @instance + * @returns {Object.} JSON object + */ + Lake.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Lake.Metastore = (function() { + + /** + * Properties of a Metastore. + * @memberof google.cloud.dataplex.v1.Lake + * @interface IMetastore + * @property {string|null} [service] Metastore service + */ + + /** + * Constructs a new Metastore. + * @memberof google.cloud.dataplex.v1.Lake + * @classdesc Represents a Metastore. + * @implements IMetastore + * @constructor + * @param {google.cloud.dataplex.v1.Lake.IMetastore=} [properties] Properties to set + */ + function Metastore(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Metastore service. + * @member {string} service + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @instance + */ + Metastore.prototype.service = ""; + + /** + * Creates a new Metastore instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @static + * @param {google.cloud.dataplex.v1.Lake.IMetastore=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Lake.Metastore} Metastore instance + */ + Metastore.create = function create(properties) { + return new Metastore(properties); + }; + + /** + * Encodes the specified Metastore message. Does not implicitly {@link google.cloud.dataplex.v1.Lake.Metastore.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @static + * @param {google.cloud.dataplex.v1.Lake.IMetastore} message Metastore message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metastore.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); + return writer; + }; + + /** + * Encodes the specified Metastore message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Lake.Metastore.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @static + * @param {google.cloud.dataplex.v1.Lake.IMetastore} message Metastore message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metastore.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Metastore message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Lake.Metastore} Metastore + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metastore.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Lake.Metastore(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.service = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Metastore message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Lake.Metastore} Metastore + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metastore.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Metastore message. + * @function verify + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metastore.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + return null; + }; + + /** + * Creates a Metastore message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Lake.Metastore} Metastore + */ + Metastore.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Lake.Metastore) + return object; + var message = new $root.google.cloud.dataplex.v1.Lake.Metastore(); + if (object.service != null) + message.service = String(object.service); + return message; + }; + + /** + * Creates a plain object from a Metastore message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @static + * @param {google.cloud.dataplex.v1.Lake.Metastore} message Metastore + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metastore.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.service = ""; + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + return object; + }; + + /** + * Converts this Metastore to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @instance + * @returns {Object.} JSON object + */ + Metastore.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Metastore; + })(); + + Lake.MetastoreStatus = (function() { + + /** + * Properties of a MetastoreStatus. + * @memberof google.cloud.dataplex.v1.Lake + * @interface IMetastoreStatus + * @property {google.cloud.dataplex.v1.Lake.MetastoreStatus.State|null} [state] MetastoreStatus state + * @property {string|null} [message] MetastoreStatus message + * @property {google.protobuf.ITimestamp|null} [updateTime] MetastoreStatus updateTime + * @property {string|null} [endpoint] MetastoreStatus endpoint + */ + + /** + * Constructs a new MetastoreStatus. + * @memberof google.cloud.dataplex.v1.Lake + * @classdesc Represents a MetastoreStatus. + * @implements IMetastoreStatus + * @constructor + * @param {google.cloud.dataplex.v1.Lake.IMetastoreStatus=} [properties] Properties to set + */ + function MetastoreStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MetastoreStatus state. + * @member {google.cloud.dataplex.v1.Lake.MetastoreStatus.State} state + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @instance + */ + MetastoreStatus.prototype.state = 0; + + /** + * MetastoreStatus message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @instance + */ + MetastoreStatus.prototype.message = ""; + + /** + * MetastoreStatus updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @instance + */ + MetastoreStatus.prototype.updateTime = null; + + /** + * MetastoreStatus endpoint. + * @member {string} endpoint + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @instance + */ + MetastoreStatus.prototype.endpoint = ""; + + /** + * Creates a new MetastoreStatus instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @static + * @param {google.cloud.dataplex.v1.Lake.IMetastoreStatus=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Lake.MetastoreStatus} MetastoreStatus instance + */ + MetastoreStatus.create = function create(properties) { + return new MetastoreStatus(properties); + }; + + /** + * Encodes the specified MetastoreStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Lake.MetastoreStatus.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @static + * @param {google.cloud.dataplex.v1.Lake.IMetastoreStatus} message MetastoreStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetastoreStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.endpoint); + return writer; + }; + + /** + * Encodes the specified MetastoreStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Lake.MetastoreStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @static + * @param {google.cloud.dataplex.v1.Lake.IMetastoreStatus} message MetastoreStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetastoreStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetastoreStatus message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Lake.MetastoreStatus} MetastoreStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetastoreStatus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Lake.MetastoreStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.state = reader.int32(); + break; + case 2: + message.message = reader.string(); + break; + case 3: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.endpoint = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetastoreStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Lake.MetastoreStatus} MetastoreStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetastoreStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetastoreStatus message. + * @function verify + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetastoreStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.endpoint != null && message.hasOwnProperty("endpoint")) + if (!$util.isString(message.endpoint)) + return "endpoint: string expected"; + return null; + }; + + /** + * Creates a MetastoreStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Lake.MetastoreStatus} MetastoreStatus + */ + MetastoreStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Lake.MetastoreStatus) + return object; + var message = new $root.google.cloud.dataplex.v1.Lake.MetastoreStatus(); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "NONE": + case 1: + message.state = 1; + break; + case "READY": + case 2: + message.state = 2; + break; + case "UPDATING": + case 3: + message.state = 3; + break; + case "ERROR": + case 4: + message.state = 4; + break; + } + if (object.message != null) + message.message = String(object.message); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Lake.MetastoreStatus.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.endpoint != null) + message.endpoint = String(object.endpoint); + return message; + }; + + /** + * Creates a plain object from a MetastoreStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @static + * @param {google.cloud.dataplex.v1.Lake.MetastoreStatus} message MetastoreStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetastoreStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.message = ""; + object.updateTime = null; + object.endpoint = ""; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.State[message.state] : message.state; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.endpoint != null && message.hasOwnProperty("endpoint")) + object.endpoint = message.endpoint; + return object; + }; + + /** + * Converts this MetastoreStatus to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @instance + * @returns {Object.} JSON object + */ + MetastoreStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * State enum. + * @name google.cloud.dataplex.v1.Lake.MetastoreStatus.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} NONE=1 NONE value + * @property {number} READY=2 READY value + * @property {number} UPDATING=3 UPDATING value + * @property {number} ERROR=4 ERROR value + */ + MetastoreStatus.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NONE"] = 1; + values[valuesById[2] = "READY"] = 2; + values[valuesById[3] = "UPDATING"] = 3; + values[valuesById[4] = "ERROR"] = 4; + return values; + })(); + + return MetastoreStatus; + })(); + + return Lake; + })(); + + v1.AssetStatus = (function() { + + /** + * Properties of an AssetStatus. + * @memberof google.cloud.dataplex.v1 + * @interface IAssetStatus + * @property {google.protobuf.ITimestamp|null} [updateTime] AssetStatus updateTime + * @property {number|null} [activeAssets] AssetStatus activeAssets + * @property {number|null} [securityPolicyApplyingAssets] AssetStatus securityPolicyApplyingAssets + */ + + /** + * Constructs a new AssetStatus. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an AssetStatus. + * @implements IAssetStatus + * @constructor + * @param {google.cloud.dataplex.v1.IAssetStatus=} [properties] Properties to set + */ + function AssetStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AssetStatus updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.AssetStatus + * @instance + */ + AssetStatus.prototype.updateTime = null; + + /** + * AssetStatus activeAssets. + * @member {number} activeAssets + * @memberof google.cloud.dataplex.v1.AssetStatus + * @instance + */ + AssetStatus.prototype.activeAssets = 0; + + /** + * AssetStatus securityPolicyApplyingAssets. + * @member {number} securityPolicyApplyingAssets + * @memberof google.cloud.dataplex.v1.AssetStatus + * @instance + */ + AssetStatus.prototype.securityPolicyApplyingAssets = 0; + + /** + * Creates a new AssetStatus instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.AssetStatus + * @static + * @param {google.cloud.dataplex.v1.IAssetStatus=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.AssetStatus} AssetStatus instance + */ + AssetStatus.create = function create(properties) { + return new AssetStatus(properties); + }; + + /** + * Encodes the specified AssetStatus message. Does not implicitly {@link google.cloud.dataplex.v1.AssetStatus.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.AssetStatus + * @static + * @param {google.cloud.dataplex.v1.IAssetStatus} message AssetStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AssetStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.activeAssets != null && Object.hasOwnProperty.call(message, "activeAssets")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.activeAssets); + if (message.securityPolicyApplyingAssets != null && Object.hasOwnProperty.call(message, "securityPolicyApplyingAssets")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.securityPolicyApplyingAssets); + return writer; + }; + + /** + * Encodes the specified AssetStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AssetStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.AssetStatus + * @static + * @param {google.cloud.dataplex.v1.IAssetStatus} message AssetStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AssetStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AssetStatus message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.AssetStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.AssetStatus} AssetStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AssetStatus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.AssetStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 2: + message.activeAssets = reader.int32(); + break; + case 3: + message.securityPolicyApplyingAssets = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AssetStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.AssetStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.AssetStatus} AssetStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AssetStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AssetStatus message. + * @function verify + * @memberof google.cloud.dataplex.v1.AssetStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AssetStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.activeAssets != null && message.hasOwnProperty("activeAssets")) + if (!$util.isInteger(message.activeAssets)) + return "activeAssets: integer expected"; + if (message.securityPolicyApplyingAssets != null && message.hasOwnProperty("securityPolicyApplyingAssets")) + if (!$util.isInteger(message.securityPolicyApplyingAssets)) + return "securityPolicyApplyingAssets: integer expected"; + return null; + }; + + /** + * Creates an AssetStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.AssetStatus + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.AssetStatus} AssetStatus + */ + AssetStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.AssetStatus) + return object; + var message = new $root.google.cloud.dataplex.v1.AssetStatus(); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.AssetStatus.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.activeAssets != null) + message.activeAssets = object.activeAssets | 0; + if (object.securityPolicyApplyingAssets != null) + message.securityPolicyApplyingAssets = object.securityPolicyApplyingAssets | 0; + return message; + }; + + /** + * Creates a plain object from an AssetStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.AssetStatus + * @static + * @param {google.cloud.dataplex.v1.AssetStatus} message AssetStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AssetStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateTime = null; + object.activeAssets = 0; + object.securityPolicyApplyingAssets = 0; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.activeAssets != null && message.hasOwnProperty("activeAssets")) + object.activeAssets = message.activeAssets; + if (message.securityPolicyApplyingAssets != null && message.hasOwnProperty("securityPolicyApplyingAssets")) + object.securityPolicyApplyingAssets = message.securityPolicyApplyingAssets; + return object; + }; + + /** + * Converts this AssetStatus to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.AssetStatus + * @instance + * @returns {Object.} JSON object + */ + AssetStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AssetStatus; + })(); + + v1.Zone = (function() { + + /** + * Properties of a Zone. + * @memberof google.cloud.dataplex.v1 + * @interface IZone + * @property {string|null} [name] Zone name + * @property {string|null} [displayName] Zone displayName + * @property {string|null} [uid] Zone uid + * @property {google.protobuf.ITimestamp|null} [createTime] Zone createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Zone updateTime + * @property {Object.|null} [labels] Zone labels + * @property {string|null} [description] Zone description + * @property {google.cloud.dataplex.v1.State|null} [state] Zone state + * @property {google.cloud.dataplex.v1.Zone.Type|null} [type] Zone type + * @property {google.cloud.dataplex.v1.Zone.IDiscoverySpec|null} [discoverySpec] Zone discoverySpec + * @property {google.cloud.dataplex.v1.Zone.IResourceSpec|null} [resourceSpec] Zone resourceSpec + * @property {google.cloud.dataplex.v1.IAssetStatus|null} [assetStatus] Zone assetStatus + */ + + /** + * Constructs a new Zone. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a Zone. + * @implements IZone + * @constructor + * @param {google.cloud.dataplex.v1.IZone=} [properties] Properties to set + */ + function Zone(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Zone name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.name = ""; + + /** + * Zone displayName. + * @member {string} displayName + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.displayName = ""; + + /** + * Zone uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.uid = ""; + + /** + * Zone createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.createTime = null; + + /** + * Zone updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.updateTime = null; + + /** + * Zone labels. + * @member {Object.} labels + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.labels = $util.emptyObject; + + /** + * Zone description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.description = ""; + + /** + * Zone state. + * @member {google.cloud.dataplex.v1.State} state + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.state = 0; + + /** + * Zone type. + * @member {google.cloud.dataplex.v1.Zone.Type} type + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.type = 0; + + /** + * Zone discoverySpec. + * @member {google.cloud.dataplex.v1.Zone.IDiscoverySpec|null|undefined} discoverySpec + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.discoverySpec = null; + + /** + * Zone resourceSpec. + * @member {google.cloud.dataplex.v1.Zone.IResourceSpec|null|undefined} resourceSpec + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.resourceSpec = null; + + /** + * Zone assetStatus. + * @member {google.cloud.dataplex.v1.IAssetStatus|null|undefined} assetStatus + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.assetStatus = null; + + /** + * Creates a new Zone instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Zone + * @static + * @param {google.cloud.dataplex.v1.IZone=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Zone} Zone instance + */ + Zone.create = function create(properties) { + return new Zone(properties); + }; + + /** + * Encodes the specified Zone message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Zone + * @static + * @param {google.cloud.dataplex.v1.IZone} message Zone message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Zone.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.uid); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.description); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.type); + if (message.discoverySpec != null && Object.hasOwnProperty.call(message, "discoverySpec")) + $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.encode(message.discoverySpec, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); + if (message.resourceSpec != null && Object.hasOwnProperty.call(message, "resourceSpec")) + $root.google.cloud.dataplex.v1.Zone.ResourceSpec.encode(message.resourceSpec, writer.uint32(/* id 104, wireType 2 =*/834).fork()).ldelim(); + if (message.assetStatus != null && Object.hasOwnProperty.call(message, "assetStatus")) + $root.google.cloud.dataplex.v1.AssetStatus.encode(message.assetStatus, writer.uint32(/* id 105, wireType 2 =*/842).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Zone message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Zone + * @static + * @param {google.cloud.dataplex.v1.IZone} message Zone message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Zone.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Zone message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Zone + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Zone} Zone + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Zone.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Zone(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.displayName = reader.string(); + break; + case 3: + message.uid = reader.string(); + break; + case 4: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + case 7: + message.description = reader.string(); + break; + case 8: + message.state = reader.int32(); + break; + case 9: + message.type = reader.int32(); + break; + case 103: + message.discoverySpec = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.decode(reader, reader.uint32()); + break; + case 104: + message.resourceSpec = $root.google.cloud.dataplex.v1.Zone.ResourceSpec.decode(reader, reader.uint32()); + break; + case 105: + message.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Zone message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Zone + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Zone} Zone + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Zone.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Zone message. + * @function verify + * @memberof google.cloud.dataplex.v1.Zone + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Zone.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.discoverySpec != null && message.hasOwnProperty("discoverySpec")) { + var error = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.verify(message.discoverySpec); + if (error) + return "discoverySpec." + error; + } + if (message.resourceSpec != null && message.hasOwnProperty("resourceSpec")) { + var error = $root.google.cloud.dataplex.v1.Zone.ResourceSpec.verify(message.resourceSpec); + if (error) + return "resourceSpec." + error; + } + if (message.assetStatus != null && message.hasOwnProperty("assetStatus")) { + var error = $root.google.cloud.dataplex.v1.AssetStatus.verify(message.assetStatus); + if (error) + return "assetStatus." + error; + } + return null; + }; + + /** + * Creates a Zone message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Zone + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Zone} Zone + */ + Zone.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Zone) + return object; + var message = new $root.google.cloud.dataplex.v1.Zone(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uid != null) + message.uid = String(object.uid); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Zone.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Zone.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.dataplex.v1.Zone.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.description != null) + message.description = String(object.description); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ACTIVE": + case 1: + message.state = 1; + break; + case "CREATING": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "ACTION_REQUIRED": + case 4: + message.state = 4; + break; + } + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "RAW": + case 1: + message.type = 1; + break; + case "CURATED": + case 2: + message.type = 2; + break; + } + if (object.discoverySpec != null) { + if (typeof object.discoverySpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Zone.discoverySpec: object expected"); + message.discoverySpec = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.fromObject(object.discoverySpec); + } + if (object.resourceSpec != null) { + if (typeof object.resourceSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Zone.resourceSpec: object expected"); + message.resourceSpec = $root.google.cloud.dataplex.v1.Zone.ResourceSpec.fromObject(object.resourceSpec); + } + if (object.assetStatus != null) { + if (typeof object.assetStatus !== "object") + throw TypeError(".google.cloud.dataplex.v1.Zone.assetStatus: object expected"); + message.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.fromObject(object.assetStatus); + } + return message; + }; + + /** + * Creates a plain object from a Zone message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Zone + * @static + * @param {google.cloud.dataplex.v1.Zone} message Zone + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Zone.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.uid = ""; + object.createTime = null; + object.updateTime = null; + object.description = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.discoverySpec = null; + object.resourceSpec = null; + object.assetStatus = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.State[message.state] : message.state; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Zone.Type[message.type] : message.type; + if (message.discoverySpec != null && message.hasOwnProperty("discoverySpec")) + object.discoverySpec = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.toObject(message.discoverySpec, options); + if (message.resourceSpec != null && message.hasOwnProperty("resourceSpec")) + object.resourceSpec = $root.google.cloud.dataplex.v1.Zone.ResourceSpec.toObject(message.resourceSpec, options); + if (message.assetStatus != null && message.hasOwnProperty("assetStatus")) + object.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.toObject(message.assetStatus, options); + return object; + }; + + /** + * Converts this Zone to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Zone + * @instance + * @returns {Object.} JSON object + */ + Zone.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.cloud.dataplex.v1.Zone.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} RAW=1 RAW value + * @property {number} CURATED=2 CURATED value + */ + Zone.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RAW"] = 1; + values[valuesById[2] = "CURATED"] = 2; + return values; + })(); + + Zone.ResourceSpec = (function() { + + /** + * Properties of a ResourceSpec. + * @memberof google.cloud.dataplex.v1.Zone + * @interface IResourceSpec + * @property {google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType|null} [locationType] ResourceSpec locationType + */ + + /** + * Constructs a new ResourceSpec. + * @memberof google.cloud.dataplex.v1.Zone + * @classdesc Represents a ResourceSpec. + * @implements IResourceSpec + * @constructor + * @param {google.cloud.dataplex.v1.Zone.IResourceSpec=} [properties] Properties to set + */ + function ResourceSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceSpec locationType. + * @member {google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType} locationType + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @instance + */ + ResourceSpec.prototype.locationType = 0; + + /** + * Creates a new ResourceSpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @static + * @param {google.cloud.dataplex.v1.Zone.IResourceSpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Zone.ResourceSpec} ResourceSpec instance + */ + ResourceSpec.create = function create(properties) { + return new ResourceSpec(properties); + }; + + /** + * Encodes the specified ResourceSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.ResourceSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @static + * @param {google.cloud.dataplex.v1.Zone.IResourceSpec} message ResourceSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.locationType != null && Object.hasOwnProperty.call(message, "locationType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.locationType); + return writer; + }; + + /** + * Encodes the specified ResourceSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.ResourceSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @static + * @param {google.cloud.dataplex.v1.Zone.IResourceSpec} message ResourceSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Zone.ResourceSpec} ResourceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Zone.ResourceSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.locationType = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Zone.ResourceSpec} ResourceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceSpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.locationType != null && message.hasOwnProperty("locationType")) + switch (message.locationType) { + default: + return "locationType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a ResourceSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Zone.ResourceSpec} ResourceSpec + */ + ResourceSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Zone.ResourceSpec) + return object; + var message = new $root.google.cloud.dataplex.v1.Zone.ResourceSpec(); + switch (object.locationType) { + case "LOCATION_TYPE_UNSPECIFIED": + case 0: + message.locationType = 0; + break; + case "SINGLE_REGION": + case 1: + message.locationType = 1; + break; + case "MULTI_REGION": + case 2: + message.locationType = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a ResourceSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @static + * @param {google.cloud.dataplex.v1.Zone.ResourceSpec} message ResourceSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.locationType = options.enums === String ? "LOCATION_TYPE_UNSPECIFIED" : 0; + if (message.locationType != null && message.hasOwnProperty("locationType")) + object.locationType = options.enums === String ? $root.google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType[message.locationType] : message.locationType; + return object; + }; + + /** + * Converts this ResourceSpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @instance + * @returns {Object.} JSON object + */ + ResourceSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * LocationType enum. + * @name google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType + * @enum {number} + * @property {number} LOCATION_TYPE_UNSPECIFIED=0 LOCATION_TYPE_UNSPECIFIED value + * @property {number} SINGLE_REGION=1 SINGLE_REGION value + * @property {number} MULTI_REGION=2 MULTI_REGION value + */ + ResourceSpec.LocationType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOCATION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SINGLE_REGION"] = 1; + values[valuesById[2] = "MULTI_REGION"] = 2; + return values; + })(); + + return ResourceSpec; + })(); + + Zone.DiscoverySpec = (function() { + + /** + * Properties of a DiscoverySpec. + * @memberof google.cloud.dataplex.v1.Zone + * @interface IDiscoverySpec + * @property {boolean|null} [enabled] DiscoverySpec enabled + * @property {Array.|null} [includePatterns] DiscoverySpec includePatterns + * @property {Array.|null} [excludePatterns] DiscoverySpec excludePatterns + * @property {google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions|null} [csvOptions] DiscoverySpec csvOptions + * @property {google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions|null} [jsonOptions] DiscoverySpec jsonOptions + * @property {string|null} [schedule] DiscoverySpec schedule + */ + + /** + * Constructs a new DiscoverySpec. + * @memberof google.cloud.dataplex.v1.Zone + * @classdesc Represents a DiscoverySpec. + * @implements IDiscoverySpec + * @constructor + * @param {google.cloud.dataplex.v1.Zone.IDiscoverySpec=} [properties] Properties to set + */ + function DiscoverySpec(properties) { + this.includePatterns = []; + this.excludePatterns = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DiscoverySpec enabled. + * @member {boolean} enabled + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.enabled = false; + + /** + * DiscoverySpec includePatterns. + * @member {Array.} includePatterns + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.includePatterns = $util.emptyArray; + + /** + * DiscoverySpec excludePatterns. + * @member {Array.} excludePatterns + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.excludePatterns = $util.emptyArray; + + /** + * DiscoverySpec csvOptions. + * @member {google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions|null|undefined} csvOptions + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.csvOptions = null; + + /** + * DiscoverySpec jsonOptions. + * @member {google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions|null|undefined} jsonOptions + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.jsonOptions = null; + + /** + * DiscoverySpec schedule. + * @member {string|null|undefined} schedule + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.schedule = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DiscoverySpec trigger. + * @member {"schedule"|undefined} trigger + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @instance + */ + Object.defineProperty(DiscoverySpec.prototype, "trigger", { + get: $util.oneOfGetter($oneOfFields = ["schedule"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DiscoverySpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @static + * @param {google.cloud.dataplex.v1.Zone.IDiscoverySpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec} DiscoverySpec instance + */ + DiscoverySpec.create = function create(properties) { + return new DiscoverySpec(properties); + }; + + /** + * Encodes the specified DiscoverySpec message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @static + * @param {google.cloud.dataplex.v1.Zone.IDiscoverySpec} message DiscoverySpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoverySpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + if (message.includePatterns != null && message.includePatterns.length) + for (var i = 0; i < message.includePatterns.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.includePatterns[i]); + if (message.excludePatterns != null && message.excludePatterns.length) + for (var i = 0; i < message.excludePatterns.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.excludePatterns[i]); + if (message.csvOptions != null && Object.hasOwnProperty.call(message, "csvOptions")) + $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.encode(message.csvOptions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.jsonOptions != null && Object.hasOwnProperty.call(message, "jsonOptions")) + $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.encode(message.jsonOptions, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.schedule != null && Object.hasOwnProperty.call(message, "schedule")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.schedule); + return writer; + }; + + /** + * Encodes the specified DiscoverySpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @static + * @param {google.cloud.dataplex.v1.Zone.IDiscoverySpec} message DiscoverySpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoverySpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoverySpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec} DiscoverySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoverySpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Zone.DiscoverySpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.enabled = reader.bool(); + break; + case 2: + if (!(message.includePatterns && message.includePatterns.length)) + message.includePatterns = []; + message.includePatterns.push(reader.string()); + break; + case 3: + if (!(message.excludePatterns && message.excludePatterns.length)) + message.excludePatterns = []; + message.excludePatterns.push(reader.string()); + break; + case 4: + message.csvOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.decode(reader, reader.uint32()); + break; + case 5: + message.jsonOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.decode(reader, reader.uint32()); + break; + case 10: + message.schedule = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DiscoverySpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec} DiscoverySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoverySpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoverySpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoverySpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + if (message.includePatterns != null && message.hasOwnProperty("includePatterns")) { + if (!Array.isArray(message.includePatterns)) + return "includePatterns: array expected"; + for (var i = 0; i < message.includePatterns.length; ++i) + if (!$util.isString(message.includePatterns[i])) + return "includePatterns: string[] expected"; + } + if (message.excludePatterns != null && message.hasOwnProperty("excludePatterns")) { + if (!Array.isArray(message.excludePatterns)) + return "excludePatterns: array expected"; + for (var i = 0; i < message.excludePatterns.length; ++i) + if (!$util.isString(message.excludePatterns[i])) + return "excludePatterns: string[] expected"; + } + if (message.csvOptions != null && message.hasOwnProperty("csvOptions")) { + var error = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.verify(message.csvOptions); + if (error) + return "csvOptions." + error; + } + if (message.jsonOptions != null && message.hasOwnProperty("jsonOptions")) { + var error = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.verify(message.jsonOptions); + if (error) + return "jsonOptions." + error; + } + if (message.schedule != null && message.hasOwnProperty("schedule")) { + properties.trigger = 1; + if (!$util.isString(message.schedule)) + return "schedule: string expected"; + } + return null; + }; + + /** + * Creates a DiscoverySpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec} DiscoverySpec + */ + DiscoverySpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Zone.DiscoverySpec) + return object; + var message = new $root.google.cloud.dataplex.v1.Zone.DiscoverySpec(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.includePatterns) { + if (!Array.isArray(object.includePatterns)) + throw TypeError(".google.cloud.dataplex.v1.Zone.DiscoverySpec.includePatterns: array expected"); + message.includePatterns = []; + for (var i = 0; i < object.includePatterns.length; ++i) + message.includePatterns[i] = String(object.includePatterns[i]); + } + if (object.excludePatterns) { + if (!Array.isArray(object.excludePatterns)) + throw TypeError(".google.cloud.dataplex.v1.Zone.DiscoverySpec.excludePatterns: array expected"); + message.excludePatterns = []; + for (var i = 0; i < object.excludePatterns.length; ++i) + message.excludePatterns[i] = String(object.excludePatterns[i]); + } + if (object.csvOptions != null) { + if (typeof object.csvOptions !== "object") + throw TypeError(".google.cloud.dataplex.v1.Zone.DiscoverySpec.csvOptions: object expected"); + message.csvOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.fromObject(object.csvOptions); + } + if (object.jsonOptions != null) { + if (typeof object.jsonOptions !== "object") + throw TypeError(".google.cloud.dataplex.v1.Zone.DiscoverySpec.jsonOptions: object expected"); + message.jsonOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.fromObject(object.jsonOptions); + } + if (object.schedule != null) + message.schedule = String(object.schedule); + return message; + }; + + /** + * Creates a plain object from a DiscoverySpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @static + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec} message DiscoverySpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoverySpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.includePatterns = []; + object.excludePatterns = []; + } + if (options.defaults) { + object.enabled = false; + object.csvOptions = null; + object.jsonOptions = null; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.includePatterns && message.includePatterns.length) { + object.includePatterns = []; + for (var j = 0; j < message.includePatterns.length; ++j) + object.includePatterns[j] = message.includePatterns[j]; + } + if (message.excludePatterns && message.excludePatterns.length) { + object.excludePatterns = []; + for (var j = 0; j < message.excludePatterns.length; ++j) + object.excludePatterns[j] = message.excludePatterns[j]; + } + if (message.csvOptions != null && message.hasOwnProperty("csvOptions")) + object.csvOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.toObject(message.csvOptions, options); + if (message.jsonOptions != null && message.hasOwnProperty("jsonOptions")) + object.jsonOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.toObject(message.jsonOptions, options); + if (message.schedule != null && message.hasOwnProperty("schedule")) { + object.schedule = message.schedule; + if (options.oneofs) + object.trigger = "schedule"; + } + return object; + }; + + /** + * Converts this DiscoverySpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @instance + * @returns {Object.} JSON object + */ + DiscoverySpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + DiscoverySpec.CsvOptions = (function() { + + /** + * Properties of a CsvOptions. + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @interface ICsvOptions + * @property {number|null} [headerRows] CsvOptions headerRows + * @property {string|null} [delimiter] CsvOptions delimiter + * @property {string|null} [encoding] CsvOptions encoding + * @property {boolean|null} [disableTypeInference] CsvOptions disableTypeInference + */ + + /** + * Constructs a new CsvOptions. + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @classdesc Represents a CsvOptions. + * @implements ICsvOptions + * @constructor + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions=} [properties] Properties to set + */ + function CsvOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CsvOptions headerRows. + * @member {number} headerRows + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @instance + */ + CsvOptions.prototype.headerRows = 0; + + /** + * CsvOptions delimiter. + * @member {string} delimiter + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @instance + */ + CsvOptions.prototype.delimiter = ""; + + /** + * CsvOptions encoding. + * @member {string} encoding + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @instance + */ + CsvOptions.prototype.encoding = ""; + + /** + * CsvOptions disableTypeInference. + * @member {boolean} disableTypeInference + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @instance + */ + CsvOptions.prototype.disableTypeInference = false; + + /** + * Creates a new CsvOptions instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions} CsvOptions instance + */ + CsvOptions.create = function create(properties) { + return new CsvOptions(properties); + }; + + /** + * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions} message CsvOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CsvOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.headerRows != null && Object.hasOwnProperty.call(message, "headerRows")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.headerRows); + if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.delimiter); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.encoding); + if (message.disableTypeInference != null && Object.hasOwnProperty.call(message, "disableTypeInference")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disableTypeInference); + return writer; + }; + + /** + * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions} message CsvOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CsvOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CsvOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions} CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CsvOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.headerRows = reader.int32(); + break; + case 2: + message.delimiter = reader.string(); + break; + case 3: + message.encoding = reader.string(); + break; + case 4: + message.disableTypeInference = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CsvOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions} CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CsvOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CsvOptions message. + * @function verify + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CsvOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.headerRows != null && message.hasOwnProperty("headerRows")) + if (!$util.isInteger(message.headerRows)) + return "headerRows: integer expected"; + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + if (!$util.isString(message.delimiter)) + return "delimiter: string expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) + if (!$util.isString(message.encoding)) + return "encoding: string expected"; + if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) + if (typeof message.disableTypeInference !== "boolean") + return "disableTypeInference: boolean expected"; + return null; + }; + + /** + * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions} CsvOptions + */ + CsvOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions) + return object; + var message = new $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions(); + if (object.headerRows != null) + message.headerRows = object.headerRows | 0; + if (object.delimiter != null) + message.delimiter = String(object.delimiter); + if (object.encoding != null) + message.encoding = String(object.encoding); + if (object.disableTypeInference != null) + message.disableTypeInference = Boolean(object.disableTypeInference); + return message; + }; + + /** + * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions} message CsvOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CsvOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.headerRows = 0; + object.delimiter = ""; + object.encoding = ""; + object.disableTypeInference = false; + } + if (message.headerRows != null && message.hasOwnProperty("headerRows")) + object.headerRows = message.headerRows; + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + object.delimiter = message.delimiter; + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = message.encoding; + if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) + object.disableTypeInference = message.disableTypeInference; + return object; + }; + + /** + * Converts this CsvOptions to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @instance + * @returns {Object.} JSON object + */ + CsvOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CsvOptions; + })(); + + DiscoverySpec.JsonOptions = (function() { + + /** + * Properties of a JsonOptions. + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @interface IJsonOptions + * @property {string|null} [encoding] JsonOptions encoding + * @property {boolean|null} [disableTypeInference] JsonOptions disableTypeInference + */ + + /** + * Constructs a new JsonOptions. + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @classdesc Represents a JsonOptions. + * @implements IJsonOptions + * @constructor + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions=} [properties] Properties to set + */ + function JsonOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JsonOptions encoding. + * @member {string} encoding + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @instance + */ + JsonOptions.prototype.encoding = ""; + + /** + * JsonOptions disableTypeInference. + * @member {boolean} disableTypeInference + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @instance + */ + JsonOptions.prototype.disableTypeInference = false; + + /** + * Creates a new JsonOptions instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions} JsonOptions instance + */ + JsonOptions.create = function create(properties) { + return new JsonOptions(properties); + }; + + /** + * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions} message JsonOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JsonOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.encoding); + if (message.disableTypeInference != null && Object.hasOwnProperty.call(message, "disableTypeInference")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.disableTypeInference); + return writer; + }; + + /** + * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions} message JsonOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JsonOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JsonOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions} JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JsonOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.encoding = reader.string(); + break; + case 2: + message.disableTypeInference = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JsonOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions} JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JsonOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JsonOptions message. + * @function verify + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JsonOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) + if (!$util.isString(message.encoding)) + return "encoding: string expected"; + if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) + if (typeof message.disableTypeInference !== "boolean") + return "disableTypeInference: boolean expected"; + return null; + }; + + /** + * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions} JsonOptions + */ + JsonOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions) + return object; + var message = new $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions(); + if (object.encoding != null) + message.encoding = String(object.encoding); + if (object.disableTypeInference != null) + message.disableTypeInference = Boolean(object.disableTypeInference); + return message; + }; + + /** + * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions} message JsonOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JsonOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.encoding = ""; + object.disableTypeInference = false; + } + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = message.encoding; + if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) + object.disableTypeInference = message.disableTypeInference; + return object; + }; + + /** + * Converts this JsonOptions to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @instance + * @returns {Object.} JSON object + */ + JsonOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return JsonOptions; + })(); + + return DiscoverySpec; + })(); + + return Zone; + })(); + + v1.Action = (function() { + + /** + * Properties of an Action. + * @memberof google.cloud.dataplex.v1 + * @interface IAction + * @property {google.cloud.dataplex.v1.Action.Category|null} [category] Action category + * @property {string|null} [issue] Action issue + * @property {google.protobuf.ITimestamp|null} [detectTime] Action detectTime + * @property {string|null} [name] Action name + * @property {string|null} [lake] Action lake + * @property {string|null} [zone] Action zone + * @property {string|null} [asset] Action asset + * @property {Array.|null} [dataLocations] Action dataLocations + * @property {google.cloud.dataplex.v1.Action.IInvalidDataFormat|null} [invalidDataFormat] Action invalidDataFormat + * @property {google.cloud.dataplex.v1.Action.IIncompatibleDataSchema|null} [incompatibleDataSchema] Action incompatibleDataSchema + * @property {google.cloud.dataplex.v1.Action.IInvalidDataPartition|null} [invalidDataPartition] Action invalidDataPartition + * @property {google.cloud.dataplex.v1.Action.IMissingData|null} [missingData] Action missingData + * @property {google.cloud.dataplex.v1.Action.IMissingResource|null} [missingResource] Action missingResource + * @property {google.cloud.dataplex.v1.Action.IUnauthorizedResource|null} [unauthorizedResource] Action unauthorizedResource + * @property {google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply|null} [failedSecurityPolicyApply] Action failedSecurityPolicyApply + * @property {google.cloud.dataplex.v1.Action.IInvalidDataOrganization|null} [invalidDataOrganization] Action invalidDataOrganization + */ + + /** + * Constructs a new Action. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an Action. + * @implements IAction + * @constructor + * @param {google.cloud.dataplex.v1.IAction=} [properties] Properties to set + */ + function Action(properties) { + this.dataLocations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Action category. + * @member {google.cloud.dataplex.v1.Action.Category} category + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.category = 0; + + /** + * Action issue. + * @member {string} issue + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.issue = ""; + + /** + * Action detectTime. + * @member {google.protobuf.ITimestamp|null|undefined} detectTime + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.detectTime = null; + + /** + * Action name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.name = ""; + + /** + * Action lake. + * @member {string} lake + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.lake = ""; + + /** + * Action zone. + * @member {string} zone + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.zone = ""; + + /** + * Action asset. + * @member {string} asset + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.asset = ""; + + /** + * Action dataLocations. + * @member {Array.} dataLocations + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.dataLocations = $util.emptyArray; + + /** + * Action invalidDataFormat. + * @member {google.cloud.dataplex.v1.Action.IInvalidDataFormat|null|undefined} invalidDataFormat + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.invalidDataFormat = null; + + /** + * Action incompatibleDataSchema. + * @member {google.cloud.dataplex.v1.Action.IIncompatibleDataSchema|null|undefined} incompatibleDataSchema + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.incompatibleDataSchema = null; + + /** + * Action invalidDataPartition. + * @member {google.cloud.dataplex.v1.Action.IInvalidDataPartition|null|undefined} invalidDataPartition + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.invalidDataPartition = null; + + /** + * Action missingData. + * @member {google.cloud.dataplex.v1.Action.IMissingData|null|undefined} missingData + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.missingData = null; + + /** + * Action missingResource. + * @member {google.cloud.dataplex.v1.Action.IMissingResource|null|undefined} missingResource + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.missingResource = null; + + /** + * Action unauthorizedResource. + * @member {google.cloud.dataplex.v1.Action.IUnauthorizedResource|null|undefined} unauthorizedResource + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.unauthorizedResource = null; + + /** + * Action failedSecurityPolicyApply. + * @member {google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply|null|undefined} failedSecurityPolicyApply + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.failedSecurityPolicyApply = null; + + /** + * Action invalidDataOrganization. + * @member {google.cloud.dataplex.v1.Action.IInvalidDataOrganization|null|undefined} invalidDataOrganization + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.invalidDataOrganization = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Action details. + * @member {"invalidDataFormat"|"incompatibleDataSchema"|"invalidDataPartition"|"missingData"|"missingResource"|"unauthorizedResource"|"failedSecurityPolicyApply"|"invalidDataOrganization"|undefined} details + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Object.defineProperty(Action.prototype, "details", { + get: $util.oneOfGetter($oneOfFields = ["invalidDataFormat", "incompatibleDataSchema", "invalidDataPartition", "missingData", "missingResource", "unauthorizedResource", "failedSecurityPolicyApply", "invalidDataOrganization"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Action instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Action + * @static + * @param {google.cloud.dataplex.v1.IAction=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Action} Action instance + */ + Action.create = function create(properties) { + return new Action(properties); + }; + + /** + * Encodes the specified Action message. Does not implicitly {@link google.cloud.dataplex.v1.Action.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Action + * @static + * @param {google.cloud.dataplex.v1.IAction} message Action message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Action.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.category != null && Object.hasOwnProperty.call(message, "category")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.category); + if (message.issue != null && Object.hasOwnProperty.call(message, "issue")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.issue); + if (message.detectTime != null && Object.hasOwnProperty.call(message, "detectTime")) + $root.google.protobuf.Timestamp.encode(message.detectTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); + if (message.lake != null && Object.hasOwnProperty.call(message, "lake")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.lake); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.zone); + if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.asset); + if (message.dataLocations != null && message.dataLocations.length) + for (var i = 0; i < message.dataLocations.length; ++i) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.dataLocations[i]); + if (message.invalidDataFormat != null && Object.hasOwnProperty.call(message, "invalidDataFormat")) + $root.google.cloud.dataplex.v1.Action.InvalidDataFormat.encode(message.invalidDataFormat, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.incompatibleDataSchema != null && Object.hasOwnProperty.call(message, "incompatibleDataSchema")) + $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.encode(message.incompatibleDataSchema, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.invalidDataPartition != null && Object.hasOwnProperty.call(message, "invalidDataPartition")) + $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.encode(message.invalidDataPartition, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.missingData != null && Object.hasOwnProperty.call(message, "missingData")) + $root.google.cloud.dataplex.v1.Action.MissingData.encode(message.missingData, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.missingResource != null && Object.hasOwnProperty.call(message, "missingResource")) + $root.google.cloud.dataplex.v1.Action.MissingResource.encode(message.missingResource, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.unauthorizedResource != null && Object.hasOwnProperty.call(message, "unauthorizedResource")) + $root.google.cloud.dataplex.v1.Action.UnauthorizedResource.encode(message.unauthorizedResource, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.failedSecurityPolicyApply != null && Object.hasOwnProperty.call(message, "failedSecurityPolicyApply")) + $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.encode(message.failedSecurityPolicyApply, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.invalidDataOrganization != null && Object.hasOwnProperty.call(message, "invalidDataOrganization")) + $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization.encode(message.invalidDataOrganization, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Action message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Action + * @static + * @param {google.cloud.dataplex.v1.IAction} message Action message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Action.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Action message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Action + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Action} Action + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Action.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.category = reader.int32(); + break; + case 2: + message.issue = reader.string(); + break; + case 4: + message.detectTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.name = reader.string(); + break; + case 6: + message.lake = reader.string(); + break; + case 7: + message.zone = reader.string(); + break; + case 8: + message.asset = reader.string(); + break; + case 9: + if (!(message.dataLocations && message.dataLocations.length)) + message.dataLocations = []; + message.dataLocations.push(reader.string()); + break; + case 10: + message.invalidDataFormat = $root.google.cloud.dataplex.v1.Action.InvalidDataFormat.decode(reader, reader.uint32()); + break; + case 11: + message.incompatibleDataSchema = $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.decode(reader, reader.uint32()); + break; + case 12: + message.invalidDataPartition = $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.decode(reader, reader.uint32()); + break; + case 13: + message.missingData = $root.google.cloud.dataplex.v1.Action.MissingData.decode(reader, reader.uint32()); + break; + case 14: + message.missingResource = $root.google.cloud.dataplex.v1.Action.MissingResource.decode(reader, reader.uint32()); + break; + case 15: + message.unauthorizedResource = $root.google.cloud.dataplex.v1.Action.UnauthorizedResource.decode(reader, reader.uint32()); + break; + case 21: + message.failedSecurityPolicyApply = $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.decode(reader, reader.uint32()); + break; + case 22: + message.invalidDataOrganization = $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Action message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Action + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Action} Action + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Action.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Action message. + * @function verify + * @memberof google.cloud.dataplex.v1.Action + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Action.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.category != null && message.hasOwnProperty("category")) + switch (message.category) { + default: + return "category: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.issue != null && message.hasOwnProperty("issue")) + if (!$util.isString(message.issue)) + return "issue: string expected"; + if (message.detectTime != null && message.hasOwnProperty("detectTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.detectTime); + if (error) + return "detectTime." + error; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.lake != null && message.hasOwnProperty("lake")) + if (!$util.isString(message.lake)) + return "lake: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.asset != null && message.hasOwnProperty("asset")) + if (!$util.isString(message.asset)) + return "asset: string expected"; + if (message.dataLocations != null && message.hasOwnProperty("dataLocations")) { + if (!Array.isArray(message.dataLocations)) + return "dataLocations: array expected"; + for (var i = 0; i < message.dataLocations.length; ++i) + if (!$util.isString(message.dataLocations[i])) + return "dataLocations: string[] expected"; + } + if (message.invalidDataFormat != null && message.hasOwnProperty("invalidDataFormat")) { + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.Action.InvalidDataFormat.verify(message.invalidDataFormat); + if (error) + return "invalidDataFormat." + error; + } + } + if (message.incompatibleDataSchema != null && message.hasOwnProperty("incompatibleDataSchema")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.verify(message.incompatibleDataSchema); + if (error) + return "incompatibleDataSchema." + error; + } + } + if (message.invalidDataPartition != null && message.hasOwnProperty("invalidDataPartition")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.verify(message.invalidDataPartition); + if (error) + return "invalidDataPartition." + error; + } + } + if (message.missingData != null && message.hasOwnProperty("missingData")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.Action.MissingData.verify(message.missingData); + if (error) + return "missingData." + error; + } + } + if (message.missingResource != null && message.hasOwnProperty("missingResource")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.Action.MissingResource.verify(message.missingResource); + if (error) + return "missingResource." + error; + } + } + if (message.unauthorizedResource != null && message.hasOwnProperty("unauthorizedResource")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.Action.UnauthorizedResource.verify(message.unauthorizedResource); + if (error) + return "unauthorizedResource." + error; + } + } + if (message.failedSecurityPolicyApply != null && message.hasOwnProperty("failedSecurityPolicyApply")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.verify(message.failedSecurityPolicyApply); + if (error) + return "failedSecurityPolicyApply." + error; + } + } + if (message.invalidDataOrganization != null && message.hasOwnProperty("invalidDataOrganization")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization.verify(message.invalidDataOrganization); + if (error) + return "invalidDataOrganization." + error; + } + } + return null; + }; + + /** + * Creates an Action message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Action + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Action} Action + */ + Action.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Action) + return object; + var message = new $root.google.cloud.dataplex.v1.Action(); + switch (object.category) { + case "CATEGORY_UNSPECIFIED": + case 0: + message.category = 0; + break; + case "RESOURCE_MANAGEMENT": + case 1: + message.category = 1; + break; + case "SECURITY_POLICY": + case 2: + message.category = 2; + break; + case "DATA_DISCOVERY": + case 3: + message.category = 3; + break; + } + if (object.issue != null) + message.issue = String(object.issue); + if (object.detectTime != null) { + if (typeof object.detectTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Action.detectTime: object expected"); + message.detectTime = $root.google.protobuf.Timestamp.fromObject(object.detectTime); + } + if (object.name != null) + message.name = String(object.name); + if (object.lake != null) + message.lake = String(object.lake); + if (object.zone != null) + message.zone = String(object.zone); + if (object.asset != null) + message.asset = String(object.asset); + if (object.dataLocations) { + if (!Array.isArray(object.dataLocations)) + throw TypeError(".google.cloud.dataplex.v1.Action.dataLocations: array expected"); + message.dataLocations = []; + for (var i = 0; i < object.dataLocations.length; ++i) + message.dataLocations[i] = String(object.dataLocations[i]); + } + if (object.invalidDataFormat != null) { + if (typeof object.invalidDataFormat !== "object") + throw TypeError(".google.cloud.dataplex.v1.Action.invalidDataFormat: object expected"); + message.invalidDataFormat = $root.google.cloud.dataplex.v1.Action.InvalidDataFormat.fromObject(object.invalidDataFormat); + } + if (object.incompatibleDataSchema != null) { + if (typeof object.incompatibleDataSchema !== "object") + throw TypeError(".google.cloud.dataplex.v1.Action.incompatibleDataSchema: object expected"); + message.incompatibleDataSchema = $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.fromObject(object.incompatibleDataSchema); + } + if (object.invalidDataPartition != null) { + if (typeof object.invalidDataPartition !== "object") + throw TypeError(".google.cloud.dataplex.v1.Action.invalidDataPartition: object expected"); + message.invalidDataPartition = $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.fromObject(object.invalidDataPartition); + } + if (object.missingData != null) { + if (typeof object.missingData !== "object") + throw TypeError(".google.cloud.dataplex.v1.Action.missingData: object expected"); + message.missingData = $root.google.cloud.dataplex.v1.Action.MissingData.fromObject(object.missingData); + } + if (object.missingResource != null) { + if (typeof object.missingResource !== "object") + throw TypeError(".google.cloud.dataplex.v1.Action.missingResource: object expected"); + message.missingResource = $root.google.cloud.dataplex.v1.Action.MissingResource.fromObject(object.missingResource); + } + if (object.unauthorizedResource != null) { + if (typeof object.unauthorizedResource !== "object") + throw TypeError(".google.cloud.dataplex.v1.Action.unauthorizedResource: object expected"); + message.unauthorizedResource = $root.google.cloud.dataplex.v1.Action.UnauthorizedResource.fromObject(object.unauthorizedResource); + } + if (object.failedSecurityPolicyApply != null) { + if (typeof object.failedSecurityPolicyApply !== "object") + throw TypeError(".google.cloud.dataplex.v1.Action.failedSecurityPolicyApply: object expected"); + message.failedSecurityPolicyApply = $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.fromObject(object.failedSecurityPolicyApply); + } + if (object.invalidDataOrganization != null) { + if (typeof object.invalidDataOrganization !== "object") + throw TypeError(".google.cloud.dataplex.v1.Action.invalidDataOrganization: object expected"); + message.invalidDataOrganization = $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization.fromObject(object.invalidDataOrganization); + } + return message; + }; + + /** + * Creates a plain object from an Action message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Action + * @static + * @param {google.cloud.dataplex.v1.Action} message Action + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Action.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dataLocations = []; + if (options.defaults) { + object.category = options.enums === String ? "CATEGORY_UNSPECIFIED" : 0; + object.issue = ""; + object.detectTime = null; + object.name = ""; + object.lake = ""; + object.zone = ""; + object.asset = ""; + } + if (message.category != null && message.hasOwnProperty("category")) + object.category = options.enums === String ? $root.google.cloud.dataplex.v1.Action.Category[message.category] : message.category; + if (message.issue != null && message.hasOwnProperty("issue")) + object.issue = message.issue; + if (message.detectTime != null && message.hasOwnProperty("detectTime")) + object.detectTime = $root.google.protobuf.Timestamp.toObject(message.detectTime, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.lake != null && message.hasOwnProperty("lake")) + object.lake = message.lake; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.asset != null && message.hasOwnProperty("asset")) + object.asset = message.asset; + if (message.dataLocations && message.dataLocations.length) { + object.dataLocations = []; + for (var j = 0; j < message.dataLocations.length; ++j) + object.dataLocations[j] = message.dataLocations[j]; + } + if (message.invalidDataFormat != null && message.hasOwnProperty("invalidDataFormat")) { + object.invalidDataFormat = $root.google.cloud.dataplex.v1.Action.InvalidDataFormat.toObject(message.invalidDataFormat, options); + if (options.oneofs) + object.details = "invalidDataFormat"; + } + if (message.incompatibleDataSchema != null && message.hasOwnProperty("incompatibleDataSchema")) { + object.incompatibleDataSchema = $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.toObject(message.incompatibleDataSchema, options); + if (options.oneofs) + object.details = "incompatibleDataSchema"; + } + if (message.invalidDataPartition != null && message.hasOwnProperty("invalidDataPartition")) { + object.invalidDataPartition = $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.toObject(message.invalidDataPartition, options); + if (options.oneofs) + object.details = "invalidDataPartition"; + } + if (message.missingData != null && message.hasOwnProperty("missingData")) { + object.missingData = $root.google.cloud.dataplex.v1.Action.MissingData.toObject(message.missingData, options); + if (options.oneofs) + object.details = "missingData"; + } + if (message.missingResource != null && message.hasOwnProperty("missingResource")) { + object.missingResource = $root.google.cloud.dataplex.v1.Action.MissingResource.toObject(message.missingResource, options); + if (options.oneofs) + object.details = "missingResource"; + } + if (message.unauthorizedResource != null && message.hasOwnProperty("unauthorizedResource")) { + object.unauthorizedResource = $root.google.cloud.dataplex.v1.Action.UnauthorizedResource.toObject(message.unauthorizedResource, options); + if (options.oneofs) + object.details = "unauthorizedResource"; + } + if (message.failedSecurityPolicyApply != null && message.hasOwnProperty("failedSecurityPolicyApply")) { + object.failedSecurityPolicyApply = $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.toObject(message.failedSecurityPolicyApply, options); + if (options.oneofs) + object.details = "failedSecurityPolicyApply"; + } + if (message.invalidDataOrganization != null && message.hasOwnProperty("invalidDataOrganization")) { + object.invalidDataOrganization = $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization.toObject(message.invalidDataOrganization, options); + if (options.oneofs) + object.details = "invalidDataOrganization"; + } + return object; + }; + + /** + * Converts this Action to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Action + * @instance + * @returns {Object.} JSON object + */ + Action.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Category enum. + * @name google.cloud.dataplex.v1.Action.Category + * @enum {number} + * @property {number} CATEGORY_UNSPECIFIED=0 CATEGORY_UNSPECIFIED value + * @property {number} RESOURCE_MANAGEMENT=1 RESOURCE_MANAGEMENT value + * @property {number} SECURITY_POLICY=2 SECURITY_POLICY value + * @property {number} DATA_DISCOVERY=3 DATA_DISCOVERY value + */ + Action.Category = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CATEGORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "RESOURCE_MANAGEMENT"] = 1; + values[valuesById[2] = "SECURITY_POLICY"] = 2; + values[valuesById[3] = "DATA_DISCOVERY"] = 3; + return values; + })(); + + Action.MissingResource = (function() { + + /** + * Properties of a MissingResource. + * @memberof google.cloud.dataplex.v1.Action + * @interface IMissingResource + */ + + /** + * Constructs a new MissingResource. + * @memberof google.cloud.dataplex.v1.Action + * @classdesc Represents a MissingResource. + * @implements IMissingResource + * @constructor + * @param {google.cloud.dataplex.v1.Action.IMissingResource=} [properties] Properties to set + */ + function MissingResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MissingResource instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Action.MissingResource + * @static + * @param {google.cloud.dataplex.v1.Action.IMissingResource=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Action.MissingResource} MissingResource instance + */ + MissingResource.create = function create(properties) { + return new MissingResource(properties); + }; + + /** + * Encodes the specified MissingResource message. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Action.MissingResource + * @static + * @param {google.cloud.dataplex.v1.Action.IMissingResource} message MissingResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MissingResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MissingResource message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Action.MissingResource + * @static + * @param {google.cloud.dataplex.v1.Action.IMissingResource} message MissingResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MissingResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MissingResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Action.MissingResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Action.MissingResource} MissingResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MissingResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.MissingResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MissingResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Action.MissingResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Action.MissingResource} MissingResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MissingResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MissingResource message. + * @function verify + * @memberof google.cloud.dataplex.v1.Action.MissingResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MissingResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MissingResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Action.MissingResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Action.MissingResource} MissingResource + */ + MissingResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Action.MissingResource) + return object; + return new $root.google.cloud.dataplex.v1.Action.MissingResource(); + }; + + /** + * Creates a plain object from a MissingResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Action.MissingResource + * @static + * @param {google.cloud.dataplex.v1.Action.MissingResource} message MissingResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MissingResource.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MissingResource to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Action.MissingResource + * @instance + * @returns {Object.} JSON object + */ + MissingResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MissingResource; + })(); + + Action.UnauthorizedResource = (function() { + + /** + * Properties of an UnauthorizedResource. + * @memberof google.cloud.dataplex.v1.Action + * @interface IUnauthorizedResource + */ + + /** + * Constructs a new UnauthorizedResource. + * @memberof google.cloud.dataplex.v1.Action + * @classdesc Represents an UnauthorizedResource. + * @implements IUnauthorizedResource + * @constructor + * @param {google.cloud.dataplex.v1.Action.IUnauthorizedResource=} [properties] Properties to set + */ + function UnauthorizedResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new UnauthorizedResource instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource + * @static + * @param {google.cloud.dataplex.v1.Action.IUnauthorizedResource=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Action.UnauthorizedResource} UnauthorizedResource instance + */ + UnauthorizedResource.create = function create(properties) { + return new UnauthorizedResource(properties); + }; + + /** + * Encodes the specified UnauthorizedResource message. Does not implicitly {@link google.cloud.dataplex.v1.Action.UnauthorizedResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource + * @static + * @param {google.cloud.dataplex.v1.Action.IUnauthorizedResource} message UnauthorizedResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnauthorizedResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified UnauthorizedResource message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.UnauthorizedResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource + * @static + * @param {google.cloud.dataplex.v1.Action.IUnauthorizedResource} message UnauthorizedResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnauthorizedResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UnauthorizedResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Action.UnauthorizedResource} UnauthorizedResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnauthorizedResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.UnauthorizedResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UnauthorizedResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Action.UnauthorizedResource} UnauthorizedResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnauthorizedResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UnauthorizedResource message. + * @function verify + * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UnauthorizedResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an UnauthorizedResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Action.UnauthorizedResource} UnauthorizedResource + */ + UnauthorizedResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Action.UnauthorizedResource) + return object; + return new $root.google.cloud.dataplex.v1.Action.UnauthorizedResource(); + }; + + /** + * Creates a plain object from an UnauthorizedResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource + * @static + * @param {google.cloud.dataplex.v1.Action.UnauthorizedResource} message UnauthorizedResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UnauthorizedResource.toObject = function toObject() { + return {}; + }; + + /** + * Converts this UnauthorizedResource to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource + * @instance + * @returns {Object.} JSON object + */ + UnauthorizedResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UnauthorizedResource; + })(); + + Action.FailedSecurityPolicyApply = (function() { + + /** + * Properties of a FailedSecurityPolicyApply. + * @memberof google.cloud.dataplex.v1.Action + * @interface IFailedSecurityPolicyApply + * @property {string|null} [asset] FailedSecurityPolicyApply asset + */ + + /** + * Constructs a new FailedSecurityPolicyApply. + * @memberof google.cloud.dataplex.v1.Action + * @classdesc Represents a FailedSecurityPolicyApply. + * @implements IFailedSecurityPolicyApply + * @constructor + * @param {google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply=} [properties] Properties to set + */ + function FailedSecurityPolicyApply(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FailedSecurityPolicyApply asset. + * @member {string} asset + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply + * @instance + */ + FailedSecurityPolicyApply.prototype.asset = ""; + + /** + * Creates a new FailedSecurityPolicyApply instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply + * @static + * @param {google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply} FailedSecurityPolicyApply instance + */ + FailedSecurityPolicyApply.create = function create(properties) { + return new FailedSecurityPolicyApply(properties); + }; + + /** + * Encodes the specified FailedSecurityPolicyApply message. Does not implicitly {@link google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply + * @static + * @param {google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply} message FailedSecurityPolicyApply message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FailedSecurityPolicyApply.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.asset); + return writer; + }; + + /** + * Encodes the specified FailedSecurityPolicyApply message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply + * @static + * @param {google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply} message FailedSecurityPolicyApply message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FailedSecurityPolicyApply.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FailedSecurityPolicyApply message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply} FailedSecurityPolicyApply + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FailedSecurityPolicyApply.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.asset = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FailedSecurityPolicyApply message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply} FailedSecurityPolicyApply + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FailedSecurityPolicyApply.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FailedSecurityPolicyApply message. + * @function verify + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FailedSecurityPolicyApply.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.asset != null && message.hasOwnProperty("asset")) + if (!$util.isString(message.asset)) + return "asset: string expected"; + return null; + }; + + /** + * Creates a FailedSecurityPolicyApply message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply} FailedSecurityPolicyApply + */ + FailedSecurityPolicyApply.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply) + return object; + var message = new $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply(); + if (object.asset != null) + message.asset = String(object.asset); + return message; + }; + + /** + * Creates a plain object from a FailedSecurityPolicyApply message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply + * @static + * @param {google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply} message FailedSecurityPolicyApply + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FailedSecurityPolicyApply.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.asset = ""; + if (message.asset != null && message.hasOwnProperty("asset")) + object.asset = message.asset; + return object; + }; + + /** + * Converts this FailedSecurityPolicyApply to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply + * @instance + * @returns {Object.} JSON object + */ + FailedSecurityPolicyApply.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FailedSecurityPolicyApply; + })(); + + Action.InvalidDataFormat = (function() { + + /** + * Properties of an InvalidDataFormat. + * @memberof google.cloud.dataplex.v1.Action + * @interface IInvalidDataFormat + * @property {Array.|null} [sampledDataLocations] InvalidDataFormat sampledDataLocations + * @property {string|null} [expectedFormat] InvalidDataFormat expectedFormat + * @property {string|null} [newFormat] InvalidDataFormat newFormat + */ + + /** + * Constructs a new InvalidDataFormat. + * @memberof google.cloud.dataplex.v1.Action + * @classdesc Represents an InvalidDataFormat. + * @implements IInvalidDataFormat + * @constructor + * @param {google.cloud.dataplex.v1.Action.IInvalidDataFormat=} [properties] Properties to set + */ + function InvalidDataFormat(properties) { + this.sampledDataLocations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InvalidDataFormat sampledDataLocations. + * @member {Array.} sampledDataLocations + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @instance + */ + InvalidDataFormat.prototype.sampledDataLocations = $util.emptyArray; + + /** + * InvalidDataFormat expectedFormat. + * @member {string} expectedFormat + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @instance + */ + InvalidDataFormat.prototype.expectedFormat = ""; + + /** + * InvalidDataFormat newFormat. + * @member {string} newFormat + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @instance + */ + InvalidDataFormat.prototype.newFormat = ""; + + /** + * Creates a new InvalidDataFormat instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @static + * @param {google.cloud.dataplex.v1.Action.IInvalidDataFormat=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Action.InvalidDataFormat} InvalidDataFormat instance + */ + InvalidDataFormat.create = function create(properties) { + return new InvalidDataFormat(properties); + }; + + /** + * Encodes the specified InvalidDataFormat message. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataFormat.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @static + * @param {google.cloud.dataplex.v1.Action.IInvalidDataFormat} message InvalidDataFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InvalidDataFormat.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sampledDataLocations != null && message.sampledDataLocations.length) + for (var i = 0; i < message.sampledDataLocations.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sampledDataLocations[i]); + if (message.expectedFormat != null && Object.hasOwnProperty.call(message, "expectedFormat")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.expectedFormat); + if (message.newFormat != null && Object.hasOwnProperty.call(message, "newFormat")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.newFormat); + return writer; + }; + + /** + * Encodes the specified InvalidDataFormat message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataFormat.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @static + * @param {google.cloud.dataplex.v1.Action.IInvalidDataFormat} message InvalidDataFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InvalidDataFormat.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InvalidDataFormat message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Action.InvalidDataFormat} InvalidDataFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InvalidDataFormat.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.InvalidDataFormat(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.sampledDataLocations && message.sampledDataLocations.length)) + message.sampledDataLocations = []; + message.sampledDataLocations.push(reader.string()); + break; + case 2: + message.expectedFormat = reader.string(); + break; + case 3: + message.newFormat = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InvalidDataFormat message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Action.InvalidDataFormat} InvalidDataFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InvalidDataFormat.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InvalidDataFormat message. + * @function verify + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InvalidDataFormat.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sampledDataLocations != null && message.hasOwnProperty("sampledDataLocations")) { + if (!Array.isArray(message.sampledDataLocations)) + return "sampledDataLocations: array expected"; + for (var i = 0; i < message.sampledDataLocations.length; ++i) + if (!$util.isString(message.sampledDataLocations[i])) + return "sampledDataLocations: string[] expected"; + } + if (message.expectedFormat != null && message.hasOwnProperty("expectedFormat")) + if (!$util.isString(message.expectedFormat)) + return "expectedFormat: string expected"; + if (message.newFormat != null && message.hasOwnProperty("newFormat")) + if (!$util.isString(message.newFormat)) + return "newFormat: string expected"; + return null; + }; + + /** + * Creates an InvalidDataFormat message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Action.InvalidDataFormat} InvalidDataFormat + */ + InvalidDataFormat.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Action.InvalidDataFormat) + return object; + var message = new $root.google.cloud.dataplex.v1.Action.InvalidDataFormat(); + if (object.sampledDataLocations) { + if (!Array.isArray(object.sampledDataLocations)) + throw TypeError(".google.cloud.dataplex.v1.Action.InvalidDataFormat.sampledDataLocations: array expected"); + message.sampledDataLocations = []; + for (var i = 0; i < object.sampledDataLocations.length; ++i) + message.sampledDataLocations[i] = String(object.sampledDataLocations[i]); + } + if (object.expectedFormat != null) + message.expectedFormat = String(object.expectedFormat); + if (object.newFormat != null) + message.newFormat = String(object.newFormat); + return message; + }; + + /** + * Creates a plain object from an InvalidDataFormat message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @static + * @param {google.cloud.dataplex.v1.Action.InvalidDataFormat} message InvalidDataFormat + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InvalidDataFormat.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.sampledDataLocations = []; + if (options.defaults) { + object.expectedFormat = ""; + object.newFormat = ""; + } + if (message.sampledDataLocations && message.sampledDataLocations.length) { + object.sampledDataLocations = []; + for (var j = 0; j < message.sampledDataLocations.length; ++j) + object.sampledDataLocations[j] = message.sampledDataLocations[j]; + } + if (message.expectedFormat != null && message.hasOwnProperty("expectedFormat")) + object.expectedFormat = message.expectedFormat; + if (message.newFormat != null && message.hasOwnProperty("newFormat")) + object.newFormat = message.newFormat; + return object; + }; + + /** + * Converts this InvalidDataFormat to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @instance + * @returns {Object.} JSON object + */ + InvalidDataFormat.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return InvalidDataFormat; + })(); + + Action.IncompatibleDataSchema = (function() { + + /** + * Properties of an IncompatibleDataSchema. + * @memberof google.cloud.dataplex.v1.Action + * @interface IIncompatibleDataSchema + * @property {string|null} [table] IncompatibleDataSchema table + * @property {string|null} [existingSchema] IncompatibleDataSchema existingSchema + * @property {string|null} [newSchema] IncompatibleDataSchema newSchema + * @property {Array.|null} [sampledDataLocations] IncompatibleDataSchema sampledDataLocations + * @property {google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange|null} [schemaChange] IncompatibleDataSchema schemaChange + */ + + /** + * Constructs a new IncompatibleDataSchema. + * @memberof google.cloud.dataplex.v1.Action + * @classdesc Represents an IncompatibleDataSchema. + * @implements IIncompatibleDataSchema + * @constructor + * @param {google.cloud.dataplex.v1.Action.IIncompatibleDataSchema=} [properties] Properties to set + */ + function IncompatibleDataSchema(properties) { + this.sampledDataLocations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IncompatibleDataSchema table. + * @member {string} table + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @instance + */ + IncompatibleDataSchema.prototype.table = ""; + + /** + * IncompatibleDataSchema existingSchema. + * @member {string} existingSchema + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @instance + */ + IncompatibleDataSchema.prototype.existingSchema = ""; + + /** + * IncompatibleDataSchema newSchema. + * @member {string} newSchema + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @instance + */ + IncompatibleDataSchema.prototype.newSchema = ""; + + /** + * IncompatibleDataSchema sampledDataLocations. + * @member {Array.} sampledDataLocations + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @instance + */ + IncompatibleDataSchema.prototype.sampledDataLocations = $util.emptyArray; + + /** + * IncompatibleDataSchema schemaChange. + * @member {google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange} schemaChange + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @instance + */ + IncompatibleDataSchema.prototype.schemaChange = 0; + + /** + * Creates a new IncompatibleDataSchema instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @static + * @param {google.cloud.dataplex.v1.Action.IIncompatibleDataSchema=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Action.IncompatibleDataSchema} IncompatibleDataSchema instance + */ + IncompatibleDataSchema.create = function create(properties) { + return new IncompatibleDataSchema(properties); + }; + + /** + * Encodes the specified IncompatibleDataSchema message. Does not implicitly {@link google.cloud.dataplex.v1.Action.IncompatibleDataSchema.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @static + * @param {google.cloud.dataplex.v1.Action.IIncompatibleDataSchema} message IncompatibleDataSchema message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IncompatibleDataSchema.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.table != null && Object.hasOwnProperty.call(message, "table")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.table); + if (message.existingSchema != null && Object.hasOwnProperty.call(message, "existingSchema")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.existingSchema); + if (message.newSchema != null && Object.hasOwnProperty.call(message, "newSchema")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.newSchema); + if (message.sampledDataLocations != null && message.sampledDataLocations.length) + for (var i = 0; i < message.sampledDataLocations.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.sampledDataLocations[i]); + if (message.schemaChange != null && Object.hasOwnProperty.call(message, "schemaChange")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.schemaChange); + return writer; + }; + + /** + * Encodes the specified IncompatibleDataSchema message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.IncompatibleDataSchema.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @static + * @param {google.cloud.dataplex.v1.Action.IIncompatibleDataSchema} message IncompatibleDataSchema message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IncompatibleDataSchema.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IncompatibleDataSchema message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Action.IncompatibleDataSchema} IncompatibleDataSchema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IncompatibleDataSchema.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.table = reader.string(); + break; + case 2: + message.existingSchema = reader.string(); + break; + case 3: + message.newSchema = reader.string(); + break; + case 4: + if (!(message.sampledDataLocations && message.sampledDataLocations.length)) + message.sampledDataLocations = []; + message.sampledDataLocations.push(reader.string()); + break; + case 5: + message.schemaChange = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IncompatibleDataSchema message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Action.IncompatibleDataSchema} IncompatibleDataSchema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IncompatibleDataSchema.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IncompatibleDataSchema message. + * @function verify + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IncompatibleDataSchema.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.table != null && message.hasOwnProperty("table")) + if (!$util.isString(message.table)) + return "table: string expected"; + if (message.existingSchema != null && message.hasOwnProperty("existingSchema")) + if (!$util.isString(message.existingSchema)) + return "existingSchema: string expected"; + if (message.newSchema != null && message.hasOwnProperty("newSchema")) + if (!$util.isString(message.newSchema)) + return "newSchema: string expected"; + if (message.sampledDataLocations != null && message.hasOwnProperty("sampledDataLocations")) { + if (!Array.isArray(message.sampledDataLocations)) + return "sampledDataLocations: array expected"; + for (var i = 0; i < message.sampledDataLocations.length; ++i) + if (!$util.isString(message.sampledDataLocations[i])) + return "sampledDataLocations: string[] expected"; + } + if (message.schemaChange != null && message.hasOwnProperty("schemaChange")) + switch (message.schemaChange) { + default: + return "schemaChange: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an IncompatibleDataSchema message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Action.IncompatibleDataSchema} IncompatibleDataSchema + */ + IncompatibleDataSchema.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema) + return object; + var message = new $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema(); + if (object.table != null) + message.table = String(object.table); + if (object.existingSchema != null) + message.existingSchema = String(object.existingSchema); + if (object.newSchema != null) + message.newSchema = String(object.newSchema); + if (object.sampledDataLocations) { + if (!Array.isArray(object.sampledDataLocations)) + throw TypeError(".google.cloud.dataplex.v1.Action.IncompatibleDataSchema.sampledDataLocations: array expected"); + message.sampledDataLocations = []; + for (var i = 0; i < object.sampledDataLocations.length; ++i) + message.sampledDataLocations[i] = String(object.sampledDataLocations[i]); + } + switch (object.schemaChange) { + case "SCHEMA_CHANGE_UNSPECIFIED": + case 0: + message.schemaChange = 0; + break; + case "INCOMPATIBLE": + case 1: + message.schemaChange = 1; + break; + case "MODIFIED": + case 2: + message.schemaChange = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an IncompatibleDataSchema message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @static + * @param {google.cloud.dataplex.v1.Action.IncompatibleDataSchema} message IncompatibleDataSchema + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IncompatibleDataSchema.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.sampledDataLocations = []; + if (options.defaults) { + object.table = ""; + object.existingSchema = ""; + object.newSchema = ""; + object.schemaChange = options.enums === String ? "SCHEMA_CHANGE_UNSPECIFIED" : 0; + } + if (message.table != null && message.hasOwnProperty("table")) + object.table = message.table; + if (message.existingSchema != null && message.hasOwnProperty("existingSchema")) + object.existingSchema = message.existingSchema; + if (message.newSchema != null && message.hasOwnProperty("newSchema")) + object.newSchema = message.newSchema; + if (message.sampledDataLocations && message.sampledDataLocations.length) { + object.sampledDataLocations = []; + for (var j = 0; j < message.sampledDataLocations.length; ++j) + object.sampledDataLocations[j] = message.sampledDataLocations[j]; + } + if (message.schemaChange != null && message.hasOwnProperty("schemaChange")) + object.schemaChange = options.enums === String ? $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange[message.schemaChange] : message.schemaChange; + return object; + }; + + /** + * Converts this IncompatibleDataSchema to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @instance + * @returns {Object.} JSON object + */ + IncompatibleDataSchema.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * SchemaChange enum. + * @name google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange + * @enum {number} + * @property {number} SCHEMA_CHANGE_UNSPECIFIED=0 SCHEMA_CHANGE_UNSPECIFIED value + * @property {number} INCOMPATIBLE=1 INCOMPATIBLE value + * @property {number} MODIFIED=2 MODIFIED value + */ + IncompatibleDataSchema.SchemaChange = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SCHEMA_CHANGE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INCOMPATIBLE"] = 1; + values[valuesById[2] = "MODIFIED"] = 2; + return values; + })(); + + return IncompatibleDataSchema; + })(); + + Action.InvalidDataPartition = (function() { + + /** + * Properties of an InvalidDataPartition. + * @memberof google.cloud.dataplex.v1.Action + * @interface IInvalidDataPartition + * @property {google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure|null} [expectedStructure] InvalidDataPartition expectedStructure + */ + + /** + * Constructs a new InvalidDataPartition. + * @memberof google.cloud.dataplex.v1.Action + * @classdesc Represents an InvalidDataPartition. + * @implements IInvalidDataPartition + * @constructor + * @param {google.cloud.dataplex.v1.Action.IInvalidDataPartition=} [properties] Properties to set + */ + function InvalidDataPartition(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InvalidDataPartition expectedStructure. + * @member {google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure} expectedStructure + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition + * @instance + */ + InvalidDataPartition.prototype.expectedStructure = 0; + + /** + * Creates a new InvalidDataPartition instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition + * @static + * @param {google.cloud.dataplex.v1.Action.IInvalidDataPartition=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Action.InvalidDataPartition} InvalidDataPartition instance + */ + InvalidDataPartition.create = function create(properties) { + return new InvalidDataPartition(properties); + }; + + /** + * Encodes the specified InvalidDataPartition message. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataPartition.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition + * @static + * @param {google.cloud.dataplex.v1.Action.IInvalidDataPartition} message InvalidDataPartition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InvalidDataPartition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.expectedStructure != null && Object.hasOwnProperty.call(message, "expectedStructure")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.expectedStructure); + return writer; + }; + + /** + * Encodes the specified InvalidDataPartition message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataPartition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition + * @static + * @param {google.cloud.dataplex.v1.Action.IInvalidDataPartition} message InvalidDataPartition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InvalidDataPartition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InvalidDataPartition message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Action.InvalidDataPartition} InvalidDataPartition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InvalidDataPartition.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.InvalidDataPartition(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.expectedStructure = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InvalidDataPartition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Action.InvalidDataPartition} InvalidDataPartition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InvalidDataPartition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InvalidDataPartition message. + * @function verify + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InvalidDataPartition.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.expectedStructure != null && message.hasOwnProperty("expectedStructure")) + switch (message.expectedStructure) { + default: + return "expectedStructure: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an InvalidDataPartition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Action.InvalidDataPartition} InvalidDataPartition + */ + InvalidDataPartition.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Action.InvalidDataPartition) + return object; + var message = new $root.google.cloud.dataplex.v1.Action.InvalidDataPartition(); + switch (object.expectedStructure) { + case "PARTITION_STRUCTURE_UNSPECIFIED": + case 0: + message.expectedStructure = 0; + break; + case "CONSISTENT_KEYS": + case 1: + message.expectedStructure = 1; + break; + case "HIVE_STYLE_KEYS": + case 2: + message.expectedStructure = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an InvalidDataPartition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition + * @static + * @param {google.cloud.dataplex.v1.Action.InvalidDataPartition} message InvalidDataPartition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InvalidDataPartition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.expectedStructure = options.enums === String ? "PARTITION_STRUCTURE_UNSPECIFIED" : 0; + if (message.expectedStructure != null && message.hasOwnProperty("expectedStructure")) + object.expectedStructure = options.enums === String ? $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure[message.expectedStructure] : message.expectedStructure; + return object; + }; + + /** + * Converts this InvalidDataPartition to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition + * @instance + * @returns {Object.} JSON object + */ + InvalidDataPartition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * PartitionStructure enum. + * @name google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure + * @enum {number} + * @property {number} PARTITION_STRUCTURE_UNSPECIFIED=0 PARTITION_STRUCTURE_UNSPECIFIED value + * @property {number} CONSISTENT_KEYS=1 CONSISTENT_KEYS value + * @property {number} HIVE_STYLE_KEYS=2 HIVE_STYLE_KEYS value + */ + InvalidDataPartition.PartitionStructure = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PARTITION_STRUCTURE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CONSISTENT_KEYS"] = 1; + values[valuesById[2] = "HIVE_STYLE_KEYS"] = 2; + return values; + })(); + + return InvalidDataPartition; + })(); + + Action.MissingData = (function() { + + /** + * Properties of a MissingData. + * @memberof google.cloud.dataplex.v1.Action + * @interface IMissingData + */ + + /** + * Constructs a new MissingData. + * @memberof google.cloud.dataplex.v1.Action + * @classdesc Represents a MissingData. + * @implements IMissingData + * @constructor + * @param {google.cloud.dataplex.v1.Action.IMissingData=} [properties] Properties to set + */ + function MissingData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MissingData instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Action.MissingData + * @static + * @param {google.cloud.dataplex.v1.Action.IMissingData=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Action.MissingData} MissingData instance + */ + MissingData.create = function create(properties) { + return new MissingData(properties); + }; + + /** + * Encodes the specified MissingData message. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingData.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Action.MissingData + * @static + * @param {google.cloud.dataplex.v1.Action.IMissingData} message MissingData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MissingData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MissingData message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Action.MissingData + * @static + * @param {google.cloud.dataplex.v1.Action.IMissingData} message MissingData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MissingData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MissingData message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Action.MissingData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Action.MissingData} MissingData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MissingData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.MissingData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MissingData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Action.MissingData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Action.MissingData} MissingData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MissingData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MissingData message. + * @function verify + * @memberof google.cloud.dataplex.v1.Action.MissingData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MissingData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MissingData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Action.MissingData + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Action.MissingData} MissingData + */ + MissingData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Action.MissingData) + return object; + return new $root.google.cloud.dataplex.v1.Action.MissingData(); + }; + + /** + * Creates a plain object from a MissingData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Action.MissingData + * @static + * @param {google.cloud.dataplex.v1.Action.MissingData} message MissingData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MissingData.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MissingData to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Action.MissingData + * @instance + * @returns {Object.} JSON object + */ + MissingData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MissingData; + })(); + + Action.InvalidDataOrganization = (function() { + + /** + * Properties of an InvalidDataOrganization. + * @memberof google.cloud.dataplex.v1.Action + * @interface IInvalidDataOrganization + */ + + /** + * Constructs a new InvalidDataOrganization. + * @memberof google.cloud.dataplex.v1.Action + * @classdesc Represents an InvalidDataOrganization. + * @implements IInvalidDataOrganization + * @constructor + * @param {google.cloud.dataplex.v1.Action.IInvalidDataOrganization=} [properties] Properties to set + */ + function InvalidDataOrganization(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new InvalidDataOrganization instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @static + * @param {google.cloud.dataplex.v1.Action.IInvalidDataOrganization=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Action.InvalidDataOrganization} InvalidDataOrganization instance + */ + InvalidDataOrganization.create = function create(properties) { + return new InvalidDataOrganization(properties); + }; + + /** + * Encodes the specified InvalidDataOrganization message. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataOrganization.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @static + * @param {google.cloud.dataplex.v1.Action.IInvalidDataOrganization} message InvalidDataOrganization message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InvalidDataOrganization.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified InvalidDataOrganization message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataOrganization.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @static + * @param {google.cloud.dataplex.v1.Action.IInvalidDataOrganization} message InvalidDataOrganization message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InvalidDataOrganization.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InvalidDataOrganization message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Action.InvalidDataOrganization} InvalidDataOrganization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InvalidDataOrganization.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InvalidDataOrganization message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Action.InvalidDataOrganization} InvalidDataOrganization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InvalidDataOrganization.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InvalidDataOrganization message. + * @function verify + * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InvalidDataOrganization.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an InvalidDataOrganization message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Action.InvalidDataOrganization} InvalidDataOrganization + */ + InvalidDataOrganization.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization) + return object; + return new $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization(); + }; + + /** + * Creates a plain object from an InvalidDataOrganization message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @static + * @param {google.cloud.dataplex.v1.Action.InvalidDataOrganization} message InvalidDataOrganization + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InvalidDataOrganization.toObject = function toObject() { + return {}; + }; + + /** + * Converts this InvalidDataOrganization to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @instance + * @returns {Object.} JSON object + */ + InvalidDataOrganization.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return InvalidDataOrganization; + })(); + + return Action; + })(); + + v1.Asset = (function() { + + /** + * Properties of an Asset. + * @memberof google.cloud.dataplex.v1 + * @interface IAsset + * @property {string|null} [name] Asset name + * @property {string|null} [displayName] Asset displayName + * @property {string|null} [uid] Asset uid + * @property {google.protobuf.ITimestamp|null} [createTime] Asset createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Asset updateTime + * @property {Object.|null} [labels] Asset labels + * @property {string|null} [description] Asset description + * @property {google.cloud.dataplex.v1.Asset.SecurityStatus.State|null} [state] Asset state + * @property {google.cloud.dataplex.v1.Asset.IResourceSpec|null} [resourceSpec] Asset resourceSpec + * @property {google.cloud.dataplex.v1.Asset.IResourceStatus|null} [resourceStatus] Asset resourceStatus + * @property {google.cloud.dataplex.v1.Asset.ISecurityStatus|null} [securityStatus] Asset securityStatus + * @property {google.cloud.dataplex.v1.Asset.IDiscoverySpec|null} [discoverySpec] Asset discoverySpec + * @property {google.cloud.dataplex.v1.Asset.IDiscoveryStatus|null} [discoveryStatus] Asset discoveryStatus + */ + + /** + * Constructs a new Asset. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an Asset. + * @implements IAsset + * @constructor + * @param {google.cloud.dataplex.v1.IAsset=} [properties] Properties to set + */ + function Asset(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Asset name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.name = ""; + + /** + * Asset displayName. + * @member {string} displayName + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.displayName = ""; + + /** + * Asset uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.uid = ""; + + /** + * Asset createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.createTime = null; + + /** + * Asset updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.updateTime = null; + + /** + * Asset labels. + * @member {Object.} labels + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.labels = $util.emptyObject; + + /** + * Asset description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.description = ""; + + /** + * Asset state. + * @member {google.cloud.dataplex.v1.Asset.SecurityStatus.State} state + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.state = 0; + + /** + * Asset resourceSpec. + * @member {google.cloud.dataplex.v1.Asset.IResourceSpec|null|undefined} resourceSpec + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.resourceSpec = null; + + /** + * Asset resourceStatus. + * @member {google.cloud.dataplex.v1.Asset.IResourceStatus|null|undefined} resourceStatus + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.resourceStatus = null; + + /** + * Asset securityStatus. + * @member {google.cloud.dataplex.v1.Asset.ISecurityStatus|null|undefined} securityStatus + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.securityStatus = null; + + /** + * Asset discoverySpec. + * @member {google.cloud.dataplex.v1.Asset.IDiscoverySpec|null|undefined} discoverySpec + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.discoverySpec = null; + + /** + * Asset discoveryStatus. + * @member {google.cloud.dataplex.v1.Asset.IDiscoveryStatus|null|undefined} discoveryStatus + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.discoveryStatus = null; + + /** + * Creates a new Asset instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Asset + * @static + * @param {google.cloud.dataplex.v1.IAsset=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Asset} Asset instance + */ + Asset.create = function create(properties) { + return new Asset(properties); + }; + + /** + * Encodes the specified Asset message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Asset + * @static + * @param {google.cloud.dataplex.v1.IAsset} message Asset message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Asset.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.uid); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.description); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); + if (message.resourceSpec != null && Object.hasOwnProperty.call(message, "resourceSpec")) + $root.google.cloud.dataplex.v1.Asset.ResourceSpec.encode(message.resourceSpec, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + if (message.resourceStatus != null && Object.hasOwnProperty.call(message, "resourceStatus")) + $root.google.cloud.dataplex.v1.Asset.ResourceStatus.encode(message.resourceStatus, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.securityStatus != null && Object.hasOwnProperty.call(message, "securityStatus")) + $root.google.cloud.dataplex.v1.Asset.SecurityStatus.encode(message.securityStatus, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); + if (message.discoverySpec != null && Object.hasOwnProperty.call(message, "discoverySpec")) + $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.encode(message.discoverySpec, writer.uint32(/* id 106, wireType 2 =*/850).fork()).ldelim(); + if (message.discoveryStatus != null && Object.hasOwnProperty.call(message, "discoveryStatus")) + $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.encode(message.discoveryStatus, writer.uint32(/* id 107, wireType 2 =*/858).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Asset message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Asset + * @static + * @param {google.cloud.dataplex.v1.IAsset} message Asset message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Asset.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Asset message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Asset + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Asset} Asset + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Asset.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.displayName = reader.string(); + break; + case 3: + message.uid = reader.string(); + break; + case 4: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + case 7: + message.description = reader.string(); + break; + case 8: + message.state = reader.int32(); + break; + case 100: + message.resourceSpec = $root.google.cloud.dataplex.v1.Asset.ResourceSpec.decode(reader, reader.uint32()); + break; + case 101: + message.resourceStatus = $root.google.cloud.dataplex.v1.Asset.ResourceStatus.decode(reader, reader.uint32()); + break; + case 103: + message.securityStatus = $root.google.cloud.dataplex.v1.Asset.SecurityStatus.decode(reader, reader.uint32()); + break; + case 106: + message.discoverySpec = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.decode(reader, reader.uint32()); + break; + case 107: + message.discoveryStatus = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Asset message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Asset + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Asset} Asset + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Asset.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Asset message. + * @function verify + * @memberof google.cloud.dataplex.v1.Asset + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Asset.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.resourceSpec != null && message.hasOwnProperty("resourceSpec")) { + var error = $root.google.cloud.dataplex.v1.Asset.ResourceSpec.verify(message.resourceSpec); + if (error) + return "resourceSpec." + error; + } + if (message.resourceStatus != null && message.hasOwnProperty("resourceStatus")) { + var error = $root.google.cloud.dataplex.v1.Asset.ResourceStatus.verify(message.resourceStatus); + if (error) + return "resourceStatus." + error; + } + if (message.securityStatus != null && message.hasOwnProperty("securityStatus")) { + var error = $root.google.cloud.dataplex.v1.Asset.SecurityStatus.verify(message.securityStatus); + if (error) + return "securityStatus." + error; + } + if (message.discoverySpec != null && message.hasOwnProperty("discoverySpec")) { + var error = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.verify(message.discoverySpec); + if (error) + return "discoverySpec." + error; + } + if (message.discoveryStatus != null && message.hasOwnProperty("discoveryStatus")) { + var error = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.verify(message.discoveryStatus); + if (error) + return "discoveryStatus." + error; + } + return null; + }; + + /** + * Creates an Asset message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Asset + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Asset} Asset + */ + Asset.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Asset) + return object; + var message = new $root.google.cloud.dataplex.v1.Asset(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uid != null) + message.uid = String(object.uid); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.description != null) + message.description = String(object.description); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "READY": + case 1: + message.state = 1; + break; + case "APPLYING": + case 2: + message.state = 2; + break; + case "ERROR": + case 3: + message.state = 3; + break; + } + if (object.resourceSpec != null) { + if (typeof object.resourceSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.resourceSpec: object expected"); + message.resourceSpec = $root.google.cloud.dataplex.v1.Asset.ResourceSpec.fromObject(object.resourceSpec); + } + if (object.resourceStatus != null) { + if (typeof object.resourceStatus !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.resourceStatus: object expected"); + message.resourceStatus = $root.google.cloud.dataplex.v1.Asset.ResourceStatus.fromObject(object.resourceStatus); + } + if (object.securityStatus != null) { + if (typeof object.securityStatus !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.securityStatus: object expected"); + message.securityStatus = $root.google.cloud.dataplex.v1.Asset.SecurityStatus.fromObject(object.securityStatus); + } + if (object.discoverySpec != null) { + if (typeof object.discoverySpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.discoverySpec: object expected"); + message.discoverySpec = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.fromObject(object.discoverySpec); + } + if (object.discoveryStatus != null) { + if (typeof object.discoveryStatus !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.discoveryStatus: object expected"); + message.discoveryStatus = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.fromObject(object.discoveryStatus); + } + return message; + }; + + /** + * Creates a plain object from an Asset message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Asset + * @static + * @param {google.cloud.dataplex.v1.Asset} message Asset + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Asset.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.uid = ""; + object.createTime = null; + object.updateTime = null; + object.description = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.resourceSpec = null; + object.resourceStatus = null; + object.securityStatus = null; + object.discoverySpec = null; + object.discoveryStatus = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Asset.SecurityStatus.State[message.state] : message.state; + if (message.resourceSpec != null && message.hasOwnProperty("resourceSpec")) + object.resourceSpec = $root.google.cloud.dataplex.v1.Asset.ResourceSpec.toObject(message.resourceSpec, options); + if (message.resourceStatus != null && message.hasOwnProperty("resourceStatus")) + object.resourceStatus = $root.google.cloud.dataplex.v1.Asset.ResourceStatus.toObject(message.resourceStatus, options); + if (message.securityStatus != null && message.hasOwnProperty("securityStatus")) + object.securityStatus = $root.google.cloud.dataplex.v1.Asset.SecurityStatus.toObject(message.securityStatus, options); + if (message.discoverySpec != null && message.hasOwnProperty("discoverySpec")) + object.discoverySpec = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.toObject(message.discoverySpec, options); + if (message.discoveryStatus != null && message.hasOwnProperty("discoveryStatus")) + object.discoveryStatus = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.toObject(message.discoveryStatus, options); + return object; + }; + + /** + * Converts this Asset to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Asset + * @instance + * @returns {Object.} JSON object + */ + Asset.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Asset.SecurityStatus = (function() { + + /** + * Properties of a SecurityStatus. + * @memberof google.cloud.dataplex.v1.Asset + * @interface ISecurityStatus + * @property {google.cloud.dataplex.v1.Asset.SecurityStatus.State|null} [state] SecurityStatus state + * @property {string|null} [message] SecurityStatus message + * @property {google.protobuf.ITimestamp|null} [updateTime] SecurityStatus updateTime + */ + + /** + * Constructs a new SecurityStatus. + * @memberof google.cloud.dataplex.v1.Asset + * @classdesc Represents a SecurityStatus. + * @implements ISecurityStatus + * @constructor + * @param {google.cloud.dataplex.v1.Asset.ISecurityStatus=} [properties] Properties to set + */ + function SecurityStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SecurityStatus state. + * @member {google.cloud.dataplex.v1.Asset.SecurityStatus.State} state + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @instance + */ + SecurityStatus.prototype.state = 0; + + /** + * SecurityStatus message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @instance + */ + SecurityStatus.prototype.message = ""; + + /** + * SecurityStatus updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @instance + */ + SecurityStatus.prototype.updateTime = null; + + /** + * Creates a new SecurityStatus instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @static + * @param {google.cloud.dataplex.v1.Asset.ISecurityStatus=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Asset.SecurityStatus} SecurityStatus instance + */ + SecurityStatus.create = function create(properties) { + return new SecurityStatus(properties); + }; + + /** + * Encodes the specified SecurityStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.SecurityStatus.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @static + * @param {google.cloud.dataplex.v1.Asset.ISecurityStatus} message SecurityStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecurityStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SecurityStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.SecurityStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @static + * @param {google.cloud.dataplex.v1.Asset.ISecurityStatus} message SecurityStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecurityStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SecurityStatus message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Asset.SecurityStatus} SecurityStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecurityStatus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.SecurityStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.state = reader.int32(); + break; + case 2: + message.message = reader.string(); + break; + case 3: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SecurityStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Asset.SecurityStatus} SecurityStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecurityStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SecurityStatus message. + * @function verify + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SecurityStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + return null; + }; + + /** + * Creates a SecurityStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Asset.SecurityStatus} SecurityStatus + */ + SecurityStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Asset.SecurityStatus) + return object; + var message = new $root.google.cloud.dataplex.v1.Asset.SecurityStatus(); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "READY": + case 1: + message.state = 1; + break; + case "APPLYING": + case 2: + message.state = 2; + break; + case "ERROR": + case 3: + message.state = 3; + break; + } + if (object.message != null) + message.message = String(object.message); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.SecurityStatus.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a SecurityStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @static + * @param {google.cloud.dataplex.v1.Asset.SecurityStatus} message SecurityStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SecurityStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.message = ""; + object.updateTime = null; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Asset.SecurityStatus.State[message.state] : message.state; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + return object; + }; + + /** + * Converts this SecurityStatus to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @instance + * @returns {Object.} JSON object + */ + SecurityStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * State enum. + * @name google.cloud.dataplex.v1.Asset.SecurityStatus.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} READY=1 READY value + * @property {number} APPLYING=2 APPLYING value + * @property {number} ERROR=3 ERROR value + */ + SecurityStatus.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "READY"] = 1; + values[valuesById[2] = "APPLYING"] = 2; + values[valuesById[3] = "ERROR"] = 3; + return values; + })(); + + return SecurityStatus; + })(); + + Asset.DiscoverySpec = (function() { + + /** + * Properties of a DiscoverySpec. + * @memberof google.cloud.dataplex.v1.Asset + * @interface IDiscoverySpec + * @property {boolean|null} [enabled] DiscoverySpec enabled + * @property {Array.|null} [includePatterns] DiscoverySpec includePatterns + * @property {Array.|null} [excludePatterns] DiscoverySpec excludePatterns + * @property {google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions|null} [csvOptions] DiscoverySpec csvOptions + * @property {google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions|null} [jsonOptions] DiscoverySpec jsonOptions + * @property {string|null} [schedule] DiscoverySpec schedule + */ + + /** + * Constructs a new DiscoverySpec. + * @memberof google.cloud.dataplex.v1.Asset + * @classdesc Represents a DiscoverySpec. + * @implements IDiscoverySpec + * @constructor + * @param {google.cloud.dataplex.v1.Asset.IDiscoverySpec=} [properties] Properties to set + */ + function DiscoverySpec(properties) { + this.includePatterns = []; + this.excludePatterns = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DiscoverySpec enabled. + * @member {boolean} enabled + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.enabled = false; + + /** + * DiscoverySpec includePatterns. + * @member {Array.} includePatterns + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.includePatterns = $util.emptyArray; + + /** + * DiscoverySpec excludePatterns. + * @member {Array.} excludePatterns + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.excludePatterns = $util.emptyArray; + + /** + * DiscoverySpec csvOptions. + * @member {google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions|null|undefined} csvOptions + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.csvOptions = null; + + /** + * DiscoverySpec jsonOptions. + * @member {google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions|null|undefined} jsonOptions + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.jsonOptions = null; + + /** + * DiscoverySpec schedule. + * @member {string|null|undefined} schedule + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.schedule = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DiscoverySpec trigger. + * @member {"schedule"|undefined} trigger + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @instance + */ + Object.defineProperty(DiscoverySpec.prototype, "trigger", { + get: $util.oneOfGetter($oneOfFields = ["schedule"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DiscoverySpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @static + * @param {google.cloud.dataplex.v1.Asset.IDiscoverySpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec} DiscoverySpec instance + */ + DiscoverySpec.create = function create(properties) { + return new DiscoverySpec(properties); + }; + + /** + * Encodes the specified DiscoverySpec message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @static + * @param {google.cloud.dataplex.v1.Asset.IDiscoverySpec} message DiscoverySpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoverySpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + if (message.includePatterns != null && message.includePatterns.length) + for (var i = 0; i < message.includePatterns.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.includePatterns[i]); + if (message.excludePatterns != null && message.excludePatterns.length) + for (var i = 0; i < message.excludePatterns.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.excludePatterns[i]); + if (message.csvOptions != null && Object.hasOwnProperty.call(message, "csvOptions")) + $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.encode(message.csvOptions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.jsonOptions != null && Object.hasOwnProperty.call(message, "jsonOptions")) + $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.encode(message.jsonOptions, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.schedule != null && Object.hasOwnProperty.call(message, "schedule")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.schedule); + return writer; + }; + + /** + * Encodes the specified DiscoverySpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @static + * @param {google.cloud.dataplex.v1.Asset.IDiscoverySpec} message DiscoverySpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoverySpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoverySpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec} DiscoverySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoverySpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.DiscoverySpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.enabled = reader.bool(); + break; + case 2: + if (!(message.includePatterns && message.includePatterns.length)) + message.includePatterns = []; + message.includePatterns.push(reader.string()); + break; + case 3: + if (!(message.excludePatterns && message.excludePatterns.length)) + message.excludePatterns = []; + message.excludePatterns.push(reader.string()); + break; + case 4: + message.csvOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.decode(reader, reader.uint32()); + break; + case 5: + message.jsonOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.decode(reader, reader.uint32()); + break; + case 10: + message.schedule = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DiscoverySpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec} DiscoverySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoverySpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoverySpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoverySpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + if (message.includePatterns != null && message.hasOwnProperty("includePatterns")) { + if (!Array.isArray(message.includePatterns)) + return "includePatterns: array expected"; + for (var i = 0; i < message.includePatterns.length; ++i) + if (!$util.isString(message.includePatterns[i])) + return "includePatterns: string[] expected"; + } + if (message.excludePatterns != null && message.hasOwnProperty("excludePatterns")) { + if (!Array.isArray(message.excludePatterns)) + return "excludePatterns: array expected"; + for (var i = 0; i < message.excludePatterns.length; ++i) + if (!$util.isString(message.excludePatterns[i])) + return "excludePatterns: string[] expected"; + } + if (message.csvOptions != null && message.hasOwnProperty("csvOptions")) { + var error = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.verify(message.csvOptions); + if (error) + return "csvOptions." + error; + } + if (message.jsonOptions != null && message.hasOwnProperty("jsonOptions")) { + var error = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.verify(message.jsonOptions); + if (error) + return "jsonOptions." + error; + } + if (message.schedule != null && message.hasOwnProperty("schedule")) { + properties.trigger = 1; + if (!$util.isString(message.schedule)) + return "schedule: string expected"; + } + return null; + }; + + /** + * Creates a DiscoverySpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec} DiscoverySpec + */ + DiscoverySpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Asset.DiscoverySpec) + return object; + var message = new $root.google.cloud.dataplex.v1.Asset.DiscoverySpec(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.includePatterns) { + if (!Array.isArray(object.includePatterns)) + throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoverySpec.includePatterns: array expected"); + message.includePatterns = []; + for (var i = 0; i < object.includePatterns.length; ++i) + message.includePatterns[i] = String(object.includePatterns[i]); + } + if (object.excludePatterns) { + if (!Array.isArray(object.excludePatterns)) + throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoverySpec.excludePatterns: array expected"); + message.excludePatterns = []; + for (var i = 0; i < object.excludePatterns.length; ++i) + message.excludePatterns[i] = String(object.excludePatterns[i]); + } + if (object.csvOptions != null) { + if (typeof object.csvOptions !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoverySpec.csvOptions: object expected"); + message.csvOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.fromObject(object.csvOptions); + } + if (object.jsonOptions != null) { + if (typeof object.jsonOptions !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoverySpec.jsonOptions: object expected"); + message.jsonOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.fromObject(object.jsonOptions); + } + if (object.schedule != null) + message.schedule = String(object.schedule); + return message; + }; + + /** + * Creates a plain object from a DiscoverySpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec} message DiscoverySpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoverySpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.includePatterns = []; + object.excludePatterns = []; + } + if (options.defaults) { + object.enabled = false; + object.csvOptions = null; + object.jsonOptions = null; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.includePatterns && message.includePatterns.length) { + object.includePatterns = []; + for (var j = 0; j < message.includePatterns.length; ++j) + object.includePatterns[j] = message.includePatterns[j]; + } + if (message.excludePatterns && message.excludePatterns.length) { + object.excludePatterns = []; + for (var j = 0; j < message.excludePatterns.length; ++j) + object.excludePatterns[j] = message.excludePatterns[j]; + } + if (message.csvOptions != null && message.hasOwnProperty("csvOptions")) + object.csvOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.toObject(message.csvOptions, options); + if (message.jsonOptions != null && message.hasOwnProperty("jsonOptions")) + object.jsonOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.toObject(message.jsonOptions, options); + if (message.schedule != null && message.hasOwnProperty("schedule")) { + object.schedule = message.schedule; + if (options.oneofs) + object.trigger = "schedule"; + } + return object; + }; + + /** + * Converts this DiscoverySpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @instance + * @returns {Object.} JSON object + */ + DiscoverySpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + DiscoverySpec.CsvOptions = (function() { + + /** + * Properties of a CsvOptions. + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @interface ICsvOptions + * @property {number|null} [headerRows] CsvOptions headerRows + * @property {string|null} [delimiter] CsvOptions delimiter + * @property {string|null} [encoding] CsvOptions encoding + * @property {boolean|null} [disableTypeInference] CsvOptions disableTypeInference + */ + + /** + * Constructs a new CsvOptions. + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @classdesc Represents a CsvOptions. + * @implements ICsvOptions + * @constructor + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions=} [properties] Properties to set + */ + function CsvOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CsvOptions headerRows. + * @member {number} headerRows + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @instance + */ + CsvOptions.prototype.headerRows = 0; + + /** + * CsvOptions delimiter. + * @member {string} delimiter + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @instance + */ + CsvOptions.prototype.delimiter = ""; + + /** + * CsvOptions encoding. + * @member {string} encoding + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @instance + */ + CsvOptions.prototype.encoding = ""; + + /** + * CsvOptions disableTypeInference. + * @member {boolean} disableTypeInference + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @instance + */ + CsvOptions.prototype.disableTypeInference = false; + + /** + * Creates a new CsvOptions instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions} CsvOptions instance + */ + CsvOptions.create = function create(properties) { + return new CsvOptions(properties); + }; + + /** + * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions} message CsvOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CsvOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.headerRows != null && Object.hasOwnProperty.call(message, "headerRows")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.headerRows); + if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.delimiter); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.encoding); + if (message.disableTypeInference != null && Object.hasOwnProperty.call(message, "disableTypeInference")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disableTypeInference); + return writer; + }; + + /** + * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions} message CsvOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CsvOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CsvOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions} CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CsvOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.headerRows = reader.int32(); + break; + case 2: + message.delimiter = reader.string(); + break; + case 3: + message.encoding = reader.string(); + break; + case 4: + message.disableTypeInference = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CsvOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions} CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CsvOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CsvOptions message. + * @function verify + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CsvOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.headerRows != null && message.hasOwnProperty("headerRows")) + if (!$util.isInteger(message.headerRows)) + return "headerRows: integer expected"; + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + if (!$util.isString(message.delimiter)) + return "delimiter: string expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) + if (!$util.isString(message.encoding)) + return "encoding: string expected"; + if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) + if (typeof message.disableTypeInference !== "boolean") + return "disableTypeInference: boolean expected"; + return null; + }; + + /** + * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions} CsvOptions + */ + CsvOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions) + return object; + var message = new $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions(); + if (object.headerRows != null) + message.headerRows = object.headerRows | 0; + if (object.delimiter != null) + message.delimiter = String(object.delimiter); + if (object.encoding != null) + message.encoding = String(object.encoding); + if (object.disableTypeInference != null) + message.disableTypeInference = Boolean(object.disableTypeInference); + return message; + }; + + /** + * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions} message CsvOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CsvOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.headerRows = 0; + object.delimiter = ""; + object.encoding = ""; + object.disableTypeInference = false; + } + if (message.headerRows != null && message.hasOwnProperty("headerRows")) + object.headerRows = message.headerRows; + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + object.delimiter = message.delimiter; + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = message.encoding; + if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) + object.disableTypeInference = message.disableTypeInference; + return object; + }; + + /** + * Converts this CsvOptions to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @instance + * @returns {Object.} JSON object + */ + CsvOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CsvOptions; + })(); + + DiscoverySpec.JsonOptions = (function() { + + /** + * Properties of a JsonOptions. + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @interface IJsonOptions + * @property {string|null} [encoding] JsonOptions encoding + * @property {boolean|null} [disableTypeInference] JsonOptions disableTypeInference + */ + + /** + * Constructs a new JsonOptions. + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @classdesc Represents a JsonOptions. + * @implements IJsonOptions + * @constructor + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions=} [properties] Properties to set + */ + function JsonOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JsonOptions encoding. + * @member {string} encoding + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @instance + */ + JsonOptions.prototype.encoding = ""; + + /** + * JsonOptions disableTypeInference. + * @member {boolean} disableTypeInference + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @instance + */ + JsonOptions.prototype.disableTypeInference = false; + + /** + * Creates a new JsonOptions instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions} JsonOptions instance + */ + JsonOptions.create = function create(properties) { + return new JsonOptions(properties); + }; + + /** + * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions} message JsonOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JsonOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.encoding); + if (message.disableTypeInference != null && Object.hasOwnProperty.call(message, "disableTypeInference")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.disableTypeInference); + return writer; + }; + + /** + * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions} message JsonOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JsonOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JsonOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions} JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JsonOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.encoding = reader.string(); + break; + case 2: + message.disableTypeInference = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JsonOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions} JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JsonOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JsonOptions message. + * @function verify + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JsonOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) + if (!$util.isString(message.encoding)) + return "encoding: string expected"; + if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) + if (typeof message.disableTypeInference !== "boolean") + return "disableTypeInference: boolean expected"; + return null; + }; + + /** + * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions} JsonOptions + */ + JsonOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions) + return object; + var message = new $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions(); + if (object.encoding != null) + message.encoding = String(object.encoding); + if (object.disableTypeInference != null) + message.disableTypeInference = Boolean(object.disableTypeInference); + return message; + }; + + /** + * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions} message JsonOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JsonOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.encoding = ""; + object.disableTypeInference = false; + } + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = message.encoding; + if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) + object.disableTypeInference = message.disableTypeInference; + return object; + }; + + /** + * Converts this JsonOptions to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @instance + * @returns {Object.} JSON object + */ + JsonOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return JsonOptions; + })(); + + return DiscoverySpec; + })(); + + Asset.ResourceSpec = (function() { + + /** + * Properties of a ResourceSpec. + * @memberof google.cloud.dataplex.v1.Asset + * @interface IResourceSpec + * @property {string|null} [name] ResourceSpec name + * @property {google.cloud.dataplex.v1.Asset.ResourceSpec.Type|null} [type] ResourceSpec type + */ + + /** + * Constructs a new ResourceSpec. + * @memberof google.cloud.dataplex.v1.Asset + * @classdesc Represents a ResourceSpec. + * @implements IResourceSpec + * @constructor + * @param {google.cloud.dataplex.v1.Asset.IResourceSpec=} [properties] Properties to set + */ + function ResourceSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceSpec name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @instance + */ + ResourceSpec.prototype.name = ""; + + /** + * ResourceSpec type. + * @member {google.cloud.dataplex.v1.Asset.ResourceSpec.Type} type + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @instance + */ + ResourceSpec.prototype.type = 0; + + /** + * Creates a new ResourceSpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @static + * @param {google.cloud.dataplex.v1.Asset.IResourceSpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Asset.ResourceSpec} ResourceSpec instance + */ + ResourceSpec.create = function create(properties) { + return new ResourceSpec(properties); + }; + + /** + * Encodes the specified ResourceSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @static + * @param {google.cloud.dataplex.v1.Asset.IResourceSpec} message ResourceSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + return writer; + }; + + /** + * Encodes the specified ResourceSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @static + * @param {google.cloud.dataplex.v1.Asset.IResourceSpec} message ResourceSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Asset.ResourceSpec} ResourceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.ResourceSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.type = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Asset.ResourceSpec} ResourceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceSpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a ResourceSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Asset.ResourceSpec} ResourceSpec + */ + ResourceSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Asset.ResourceSpec) + return object; + var message = new $root.google.cloud.dataplex.v1.Asset.ResourceSpec(); + if (object.name != null) + message.name = String(object.name); + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "STORAGE_BUCKET": + case 1: + message.type = 1; + break; + case "BIGQUERY_DATASET": + case 2: + message.type = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a ResourceSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @static + * @param {google.cloud.dataplex.v1.Asset.ResourceSpec} message ResourceSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Asset.ResourceSpec.Type[message.type] : message.type; + return object; + }; + + /** + * Converts this ResourceSpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @instance + * @returns {Object.} JSON object + */ + ResourceSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.cloud.dataplex.v1.Asset.ResourceSpec.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} STORAGE_BUCKET=1 STORAGE_BUCKET value + * @property {number} BIGQUERY_DATASET=2 BIGQUERY_DATASET value + */ + ResourceSpec.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "STORAGE_BUCKET"] = 1; + values[valuesById[2] = "BIGQUERY_DATASET"] = 2; + return values; + })(); + + return ResourceSpec; + })(); + + Asset.ResourceStatus = (function() { + + /** + * Properties of a ResourceStatus. + * @memberof google.cloud.dataplex.v1.Asset + * @interface IResourceStatus + * @property {google.cloud.dataplex.v1.Asset.ResourceStatus.State|null} [state] ResourceStatus state + * @property {string|null} [message] ResourceStatus message + * @property {google.protobuf.ITimestamp|null} [updateTime] ResourceStatus updateTime + */ + + /** + * Constructs a new ResourceStatus. + * @memberof google.cloud.dataplex.v1.Asset + * @classdesc Represents a ResourceStatus. + * @implements IResourceStatus + * @constructor + * @param {google.cloud.dataplex.v1.Asset.IResourceStatus=} [properties] Properties to set + */ + function ResourceStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceStatus state. + * @member {google.cloud.dataplex.v1.Asset.ResourceStatus.State} state + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @instance + */ + ResourceStatus.prototype.state = 0; + + /** + * ResourceStatus message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @instance + */ + ResourceStatus.prototype.message = ""; + + /** + * ResourceStatus updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @instance + */ + ResourceStatus.prototype.updateTime = null; + + /** + * Creates a new ResourceStatus instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @static + * @param {google.cloud.dataplex.v1.Asset.IResourceStatus=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Asset.ResourceStatus} ResourceStatus instance + */ + ResourceStatus.create = function create(properties) { + return new ResourceStatus(properties); + }; + + /** + * Encodes the specified ResourceStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceStatus.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @static + * @param {google.cloud.dataplex.v1.Asset.IResourceStatus} message ResourceStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResourceStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @static + * @param {google.cloud.dataplex.v1.Asset.IResourceStatus} message ResourceStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceStatus message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Asset.ResourceStatus} ResourceStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceStatus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.ResourceStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.state = reader.int32(); + break; + case 2: + message.message = reader.string(); + break; + case 3: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Asset.ResourceStatus} ResourceStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceStatus message. + * @function verify + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + return null; + }; + + /** + * Creates a ResourceStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Asset.ResourceStatus} ResourceStatus + */ + ResourceStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Asset.ResourceStatus) + return object; + var message = new $root.google.cloud.dataplex.v1.Asset.ResourceStatus(); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "READY": + case 1: + message.state = 1; + break; + case "ERROR": + case 2: + message.state = 2; + break; + } + if (object.message != null) + message.message = String(object.message); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.ResourceStatus.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a ResourceStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @static + * @param {google.cloud.dataplex.v1.Asset.ResourceStatus} message ResourceStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.message = ""; + object.updateTime = null; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Asset.ResourceStatus.State[message.state] : message.state; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + return object; + }; + + /** + * Converts this ResourceStatus to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @instance + * @returns {Object.} JSON object + */ + ResourceStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * State enum. + * @name google.cloud.dataplex.v1.Asset.ResourceStatus.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} READY=1 READY value + * @property {number} ERROR=2 ERROR value + */ + ResourceStatus.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "READY"] = 1; + values[valuesById[2] = "ERROR"] = 2; + return values; + })(); + + return ResourceStatus; + })(); + + Asset.DiscoveryStatus = (function() { + + /** + * Properties of a DiscoveryStatus. + * @memberof google.cloud.dataplex.v1.Asset + * @interface IDiscoveryStatus + * @property {google.cloud.dataplex.v1.Asset.DiscoveryStatus.State|null} [state] DiscoveryStatus state + * @property {string|null} [message] DiscoveryStatus message + * @property {google.protobuf.ITimestamp|null} [updateTime] DiscoveryStatus updateTime + * @property {google.protobuf.ITimestamp|null} [lastRunTime] DiscoveryStatus lastRunTime + * @property {google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats|null} [stats] DiscoveryStatus stats + * @property {google.protobuf.IDuration|null} [lastRunDuration] DiscoveryStatus lastRunDuration + */ + + /** + * Constructs a new DiscoveryStatus. + * @memberof google.cloud.dataplex.v1.Asset + * @classdesc Represents a DiscoveryStatus. + * @implements IDiscoveryStatus + * @constructor + * @param {google.cloud.dataplex.v1.Asset.IDiscoveryStatus=} [properties] Properties to set + */ + function DiscoveryStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DiscoveryStatus state. + * @member {google.cloud.dataplex.v1.Asset.DiscoveryStatus.State} state + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @instance + */ + DiscoveryStatus.prototype.state = 0; + + /** + * DiscoveryStatus message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @instance + */ + DiscoveryStatus.prototype.message = ""; + + /** + * DiscoveryStatus updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @instance + */ + DiscoveryStatus.prototype.updateTime = null; + + /** + * DiscoveryStatus lastRunTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastRunTime + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @instance + */ + DiscoveryStatus.prototype.lastRunTime = null; + + /** + * DiscoveryStatus stats. + * @member {google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats|null|undefined} stats + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @instance + */ + DiscoveryStatus.prototype.stats = null; + + /** + * DiscoveryStatus lastRunDuration. + * @member {google.protobuf.IDuration|null|undefined} lastRunDuration + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @instance + */ + DiscoveryStatus.prototype.lastRunDuration = null; + + /** + * Creates a new DiscoveryStatus instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @static + * @param {google.cloud.dataplex.v1.Asset.IDiscoveryStatus=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus} DiscoveryStatus instance + */ + DiscoveryStatus.create = function create(properties) { + return new DiscoveryStatus(properties); + }; + + /** + * Encodes the specified DiscoveryStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @static + * @param {google.cloud.dataplex.v1.Asset.IDiscoveryStatus} message DiscoveryStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.lastRunTime != null && Object.hasOwnProperty.call(message, "lastRunTime")) + $root.google.protobuf.Timestamp.encode(message.lastRunTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.stats != null && Object.hasOwnProperty.call(message, "stats")) + $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.encode(message.stats, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.lastRunDuration != null && Object.hasOwnProperty.call(message, "lastRunDuration")) + $root.google.protobuf.Duration.encode(message.lastRunDuration, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DiscoveryStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @static + * @param {google.cloud.dataplex.v1.Asset.IDiscoveryStatus} message DiscoveryStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoveryStatus message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus} DiscoveryStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryStatus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.state = reader.int32(); + break; + case 2: + message.message = reader.string(); + break; + case 3: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.lastRunTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + message.stats = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.decode(reader, reader.uint32()); + break; + case 7: + message.lastRunDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DiscoveryStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus} DiscoveryStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoveryStatus message. + * @function verify + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoveryStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 5: + break; + } + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.lastRunTime != null && message.hasOwnProperty("lastRunTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastRunTime); + if (error) + return "lastRunTime." + error; + } + if (message.stats != null && message.hasOwnProperty("stats")) { + var error = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.verify(message.stats); + if (error) + return "stats." + error; + } + if (message.lastRunDuration != null && message.hasOwnProperty("lastRunDuration")) { + var error = $root.google.protobuf.Duration.verify(message.lastRunDuration); + if (error) + return "lastRunDuration." + error; + } + return null; + }; + + /** + * Creates a DiscoveryStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus} DiscoveryStatus + */ + DiscoveryStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus) + return object; + var message = new $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus(); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "SCHEDULED": + case 1: + message.state = 1; + break; + case "IN_PROGRESS": + case 2: + message.state = 2; + break; + case "PAUSED": + case 3: + message.state = 3; + break; + case "DISABLED": + case 5: + message.state = 5; + break; + } + if (object.message != null) + message.message = String(object.message); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoveryStatus.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.lastRunTime != null) { + if (typeof object.lastRunTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoveryStatus.lastRunTime: object expected"); + message.lastRunTime = $root.google.protobuf.Timestamp.fromObject(object.lastRunTime); + } + if (object.stats != null) { + if (typeof object.stats !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoveryStatus.stats: object expected"); + message.stats = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.fromObject(object.stats); + } + if (object.lastRunDuration != null) { + if (typeof object.lastRunDuration !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoveryStatus.lastRunDuration: object expected"); + message.lastRunDuration = $root.google.protobuf.Duration.fromObject(object.lastRunDuration); + } + return message; + }; + + /** + * Creates a plain object from a DiscoveryStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoveryStatus} message DiscoveryStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoveryStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.message = ""; + object.updateTime = null; + object.lastRunTime = null; + object.stats = null; + object.lastRunDuration = null; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.State[message.state] : message.state; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.lastRunTime != null && message.hasOwnProperty("lastRunTime")) + object.lastRunTime = $root.google.protobuf.Timestamp.toObject(message.lastRunTime, options); + if (message.stats != null && message.hasOwnProperty("stats")) + object.stats = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.toObject(message.stats, options); + if (message.lastRunDuration != null && message.hasOwnProperty("lastRunDuration")) + object.lastRunDuration = $root.google.protobuf.Duration.toObject(message.lastRunDuration, options); + return object; + }; + + /** + * Converts this DiscoveryStatus to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @instance + * @returns {Object.} JSON object + */ + DiscoveryStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * State enum. + * @name google.cloud.dataplex.v1.Asset.DiscoveryStatus.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} SCHEDULED=1 SCHEDULED value + * @property {number} IN_PROGRESS=2 IN_PROGRESS value + * @property {number} PAUSED=3 PAUSED value + * @property {number} DISABLED=5 DISABLED value + */ + DiscoveryStatus.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SCHEDULED"] = 1; + values[valuesById[2] = "IN_PROGRESS"] = 2; + values[valuesById[3] = "PAUSED"] = 3; + values[valuesById[5] = "DISABLED"] = 5; + return values; + })(); + + DiscoveryStatus.Stats = (function() { + + /** + * Properties of a Stats. + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @interface IStats + * @property {number|Long|null} [dataItems] Stats dataItems + * @property {number|Long|null} [dataSize] Stats dataSize + * @property {number|Long|null} [tables] Stats tables + * @property {number|Long|null} [filesets] Stats filesets + */ + + /** + * Constructs a new Stats. + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @classdesc Represents a Stats. + * @implements IStats + * @constructor + * @param {google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats=} [properties] Properties to set + */ + function Stats(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Stats dataItems. + * @member {number|Long} dataItems + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @instance + */ + Stats.prototype.dataItems = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Stats dataSize. + * @member {number|Long} dataSize + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @instance + */ + Stats.prototype.dataSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Stats tables. + * @member {number|Long} tables + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @instance + */ + Stats.prototype.tables = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Stats filesets. + * @member {number|Long} filesets + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @instance + */ + Stats.prototype.filesets = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new Stats instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats} Stats instance + */ + Stats.create = function create(properties) { + return new Stats(properties); + }; + + /** + * Encodes the specified Stats message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats} message Stats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Stats.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataItems != null && Object.hasOwnProperty.call(message, "dataItems")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.dataItems); + if (message.dataSize != null && Object.hasOwnProperty.call(message, "dataSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.dataSize); + if (message.tables != null && Object.hasOwnProperty.call(message, "tables")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.tables); + if (message.filesets != null && Object.hasOwnProperty.call(message, "filesets")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.filesets); + return writer; + }; + + /** + * Encodes the specified Stats message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats} message Stats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Stats.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Stats message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats} Stats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Stats.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.dataItems = reader.int64(); + break; + case 2: + message.dataSize = reader.int64(); + break; + case 3: + message.tables = reader.int64(); + break; + case 4: + message.filesets = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Stats message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats} Stats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Stats.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Stats message. + * @function verify + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Stats.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataItems != null && message.hasOwnProperty("dataItems")) + if (!$util.isInteger(message.dataItems) && !(message.dataItems && $util.isInteger(message.dataItems.low) && $util.isInteger(message.dataItems.high))) + return "dataItems: integer|Long expected"; + if (message.dataSize != null && message.hasOwnProperty("dataSize")) + if (!$util.isInteger(message.dataSize) && !(message.dataSize && $util.isInteger(message.dataSize.low) && $util.isInteger(message.dataSize.high))) + return "dataSize: integer|Long expected"; + if (message.tables != null && message.hasOwnProperty("tables")) + if (!$util.isInteger(message.tables) && !(message.tables && $util.isInteger(message.tables.low) && $util.isInteger(message.tables.high))) + return "tables: integer|Long expected"; + if (message.filesets != null && message.hasOwnProperty("filesets")) + if (!$util.isInteger(message.filesets) && !(message.filesets && $util.isInteger(message.filesets.low) && $util.isInteger(message.filesets.high))) + return "filesets: integer|Long expected"; + return null; + }; + + /** + * Creates a Stats message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats} Stats + */ + Stats.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats) + return object; + var message = new $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats(); + if (object.dataItems != null) + if ($util.Long) + (message.dataItems = $util.Long.fromValue(object.dataItems)).unsigned = false; + else if (typeof object.dataItems === "string") + message.dataItems = parseInt(object.dataItems, 10); + else if (typeof object.dataItems === "number") + message.dataItems = object.dataItems; + else if (typeof object.dataItems === "object") + message.dataItems = new $util.LongBits(object.dataItems.low >>> 0, object.dataItems.high >>> 0).toNumber(); + if (object.dataSize != null) + if ($util.Long) + (message.dataSize = $util.Long.fromValue(object.dataSize)).unsigned = false; + else if (typeof object.dataSize === "string") + message.dataSize = parseInt(object.dataSize, 10); + else if (typeof object.dataSize === "number") + message.dataSize = object.dataSize; + else if (typeof object.dataSize === "object") + message.dataSize = new $util.LongBits(object.dataSize.low >>> 0, object.dataSize.high >>> 0).toNumber(); + if (object.tables != null) + if ($util.Long) + (message.tables = $util.Long.fromValue(object.tables)).unsigned = false; + else if (typeof object.tables === "string") + message.tables = parseInt(object.tables, 10); + else if (typeof object.tables === "number") + message.tables = object.tables; + else if (typeof object.tables === "object") + message.tables = new $util.LongBits(object.tables.low >>> 0, object.tables.high >>> 0).toNumber(); + if (object.filesets != null) + if ($util.Long) + (message.filesets = $util.Long.fromValue(object.filesets)).unsigned = false; + else if (typeof object.filesets === "string") + message.filesets = parseInt(object.filesets, 10); + else if (typeof object.filesets === "number") + message.filesets = object.filesets; + else if (typeof object.filesets === "object") + message.filesets = new $util.LongBits(object.filesets.low >>> 0, object.filesets.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a Stats message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats} message Stats + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Stats.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.dataItems = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.dataItems = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.dataSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.dataSize = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.tables = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.tables = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.filesets = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.filesets = options.longs === String ? "0" : 0; + } + if (message.dataItems != null && message.hasOwnProperty("dataItems")) + if (typeof message.dataItems === "number") + object.dataItems = options.longs === String ? String(message.dataItems) : message.dataItems; + else + object.dataItems = options.longs === String ? $util.Long.prototype.toString.call(message.dataItems) : options.longs === Number ? new $util.LongBits(message.dataItems.low >>> 0, message.dataItems.high >>> 0).toNumber() : message.dataItems; + if (message.dataSize != null && message.hasOwnProperty("dataSize")) + if (typeof message.dataSize === "number") + object.dataSize = options.longs === String ? String(message.dataSize) : message.dataSize; + else + object.dataSize = options.longs === String ? $util.Long.prototype.toString.call(message.dataSize) : options.longs === Number ? new $util.LongBits(message.dataSize.low >>> 0, message.dataSize.high >>> 0).toNumber() : message.dataSize; + if (message.tables != null && message.hasOwnProperty("tables")) + if (typeof message.tables === "number") + object.tables = options.longs === String ? String(message.tables) : message.tables; + else + object.tables = options.longs === String ? $util.Long.prototype.toString.call(message.tables) : options.longs === Number ? new $util.LongBits(message.tables.low >>> 0, message.tables.high >>> 0).toNumber() : message.tables; + if (message.filesets != null && message.hasOwnProperty("filesets")) + if (typeof message.filesets === "number") + object.filesets = options.longs === String ? String(message.filesets) : message.filesets; + else + object.filesets = options.longs === String ? $util.Long.prototype.toString.call(message.filesets) : options.longs === Number ? new $util.LongBits(message.filesets.low >>> 0, message.filesets.high >>> 0).toNumber() : message.filesets; + return object; + }; + + /** + * Converts this Stats to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @instance + * @returns {Object.} JSON object + */ + Stats.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Stats; + })(); + + return DiscoveryStatus; + })(); + + return Asset; + })(); + + /** + * State enum. + * @name google.cloud.dataplex.v1.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} CREATING=2 CREATING value + * @property {number} DELETING=3 DELETING value + * @property {number} ACTION_REQUIRED=4 ACTION_REQUIRED value + */ + v1.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "CREATING"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "ACTION_REQUIRED"] = 4; + return values; + })(); + + v1.DataplexService = (function() { + + /** + * Constructs a new DataplexService service. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DataplexService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function DataplexService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (DataplexService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DataplexService; + + /** + * Creates new DataplexService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dataplex.v1.DataplexService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {DataplexService} RPC service. Useful where requests and/or responses are streamed. + */ + DataplexService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createLake}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef CreateLakeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateLake. + * @function createLake + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateLakeRequest} request CreateLakeRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.CreateLakeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.createLake = function createLake(request, callback) { + return this.rpcCall(createLake, $root.google.cloud.dataplex.v1.CreateLakeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateLake" }); + + /** + * Calls CreateLake. + * @function createLake + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateLakeRequest} request CreateLakeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateLake}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef UpdateLakeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateLake. + * @function updateLake + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} request UpdateLakeRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.UpdateLakeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.updateLake = function updateLake(request, callback) { + return this.rpcCall(updateLake, $root.google.cloud.dataplex.v1.UpdateLakeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateLake" }); + + /** + * Calls UpdateLake. + * @function updateLake + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} request UpdateLakeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteLake}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef DeleteLakeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteLake. + * @function deleteLake + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} request DeleteLakeRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.DeleteLakeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.deleteLake = function deleteLake(request, callback) { + return this.rpcCall(deleteLake, $root.google.cloud.dataplex.v1.DeleteLakeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteLake" }); + + /** + * Calls DeleteLake. + * @function deleteLake + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} request DeleteLakeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listLakes}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListLakesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListLakesResponse} [response] ListLakesResponse + */ + + /** + * Calls ListLakes. + * @function listLakes + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListLakesRequest} request ListLakesRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListLakesCallback} callback Node-style callback called with the error, if any, and ListLakesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listLakes = function listLakes(request, callback) { + return this.rpcCall(listLakes, $root.google.cloud.dataplex.v1.ListLakesRequest, $root.google.cloud.dataplex.v1.ListLakesResponse, request, callback); + }, "name", { value: "ListLakes" }); + + /** + * Calls ListLakes. + * @function listLakes + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListLakesRequest} request ListLakesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getLake}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef GetLakeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Lake} [response] Lake + */ + + /** + * Calls GetLake. + * @function getLake + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetLakeRequest} request GetLakeRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.GetLakeCallback} callback Node-style callback called with the error, if any, and Lake + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.getLake = function getLake(request, callback) { + return this.rpcCall(getLake, $root.google.cloud.dataplex.v1.GetLakeRequest, $root.google.cloud.dataplex.v1.Lake, request, callback); + }, "name", { value: "GetLake" }); + + /** + * Calls GetLake. + * @function getLake + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetLakeRequest} request GetLakeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listLakeActions}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListLakeActionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListActionsResponse} [response] ListActionsResponse + */ + + /** + * Calls ListLakeActions. + * @function listLakeActions + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} request ListLakeActionsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListLakeActionsCallback} callback Node-style callback called with the error, if any, and ListActionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listLakeActions = function listLakeActions(request, callback) { + return this.rpcCall(listLakeActions, $root.google.cloud.dataplex.v1.ListLakeActionsRequest, $root.google.cloud.dataplex.v1.ListActionsResponse, request, callback); + }, "name", { value: "ListLakeActions" }); + + /** + * Calls ListLakeActions. + * @function listLakeActions + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} request ListLakeActionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createZone}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef CreateZoneCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateZone. + * @function createZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateZoneRequest} request CreateZoneRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.CreateZoneCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.createZone = function createZone(request, callback) { + return this.rpcCall(createZone, $root.google.cloud.dataplex.v1.CreateZoneRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateZone" }); + + /** + * Calls CreateZone. + * @function createZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateZoneRequest} request CreateZoneRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateZone}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef UpdateZoneCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateZone. + * @function updateZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} request UpdateZoneRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.UpdateZoneCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.updateZone = function updateZone(request, callback) { + return this.rpcCall(updateZone, $root.google.cloud.dataplex.v1.UpdateZoneRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateZone" }); + + /** + * Calls UpdateZone. + * @function updateZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} request UpdateZoneRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteZone}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef DeleteZoneCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteZone. + * @function deleteZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} request DeleteZoneRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.DeleteZoneCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.deleteZone = function deleteZone(request, callback) { + return this.rpcCall(deleteZone, $root.google.cloud.dataplex.v1.DeleteZoneRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteZone" }); + + /** + * Calls DeleteZone. + * @function deleteZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} request DeleteZoneRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listZones}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListZonesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListZonesResponse} [response] ListZonesResponse + */ + + /** + * Calls ListZones. + * @function listZones + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListZonesRequest} request ListZonesRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListZonesCallback} callback Node-style callback called with the error, if any, and ListZonesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listZones = function listZones(request, callback) { + return this.rpcCall(listZones, $root.google.cloud.dataplex.v1.ListZonesRequest, $root.google.cloud.dataplex.v1.ListZonesResponse, request, callback); + }, "name", { value: "ListZones" }); + + /** + * Calls ListZones. + * @function listZones + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListZonesRequest} request ListZonesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getZone}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef GetZoneCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Zone} [response] Zone + */ + + /** + * Calls GetZone. + * @function getZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetZoneRequest} request GetZoneRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.GetZoneCallback} callback Node-style callback called with the error, if any, and Zone + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.getZone = function getZone(request, callback) { + return this.rpcCall(getZone, $root.google.cloud.dataplex.v1.GetZoneRequest, $root.google.cloud.dataplex.v1.Zone, request, callback); + }, "name", { value: "GetZone" }); + + /** + * Calls GetZone. + * @function getZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetZoneRequest} request GetZoneRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listZoneActions}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListZoneActionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListActionsResponse} [response] ListActionsResponse + */ + + /** + * Calls ListZoneActions. + * @function listZoneActions + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} request ListZoneActionsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListZoneActionsCallback} callback Node-style callback called with the error, if any, and ListActionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listZoneActions = function listZoneActions(request, callback) { + return this.rpcCall(listZoneActions, $root.google.cloud.dataplex.v1.ListZoneActionsRequest, $root.google.cloud.dataplex.v1.ListActionsResponse, request, callback); + }, "name", { value: "ListZoneActions" }); + + /** + * Calls ListZoneActions. + * @function listZoneActions + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} request ListZoneActionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createAsset}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef CreateAssetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateAsset. + * @function createAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateAssetRequest} request CreateAssetRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.CreateAssetCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.createAsset = function createAsset(request, callback) { + return this.rpcCall(createAsset, $root.google.cloud.dataplex.v1.CreateAssetRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateAsset" }); + + /** + * Calls CreateAsset. + * @function createAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateAssetRequest} request CreateAssetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateAsset}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef UpdateAssetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateAsset. + * @function updateAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} request UpdateAssetRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.UpdateAssetCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.updateAsset = function updateAsset(request, callback) { + return this.rpcCall(updateAsset, $root.google.cloud.dataplex.v1.UpdateAssetRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateAsset" }); + + /** + * Calls UpdateAsset. + * @function updateAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} request UpdateAssetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteAsset}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef DeleteAssetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteAsset. + * @function deleteAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} request DeleteAssetRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.DeleteAssetCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.deleteAsset = function deleteAsset(request, callback) { + return this.rpcCall(deleteAsset, $root.google.cloud.dataplex.v1.DeleteAssetRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteAsset" }); + + /** + * Calls DeleteAsset. + * @function deleteAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} request DeleteAssetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listAssets}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListAssetsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListAssetsResponse} [response] ListAssetsResponse + */ + + /** + * Calls ListAssets. + * @function listAssets + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListAssetsRequest} request ListAssetsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListAssetsCallback} callback Node-style callback called with the error, if any, and ListAssetsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listAssets = function listAssets(request, callback) { + return this.rpcCall(listAssets, $root.google.cloud.dataplex.v1.ListAssetsRequest, $root.google.cloud.dataplex.v1.ListAssetsResponse, request, callback); + }, "name", { value: "ListAssets" }); + + /** + * Calls ListAssets. + * @function listAssets + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListAssetsRequest} request ListAssetsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getAsset}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef GetAssetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Asset} [response] Asset + */ + + /** + * Calls GetAsset. + * @function getAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetAssetRequest} request GetAssetRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.GetAssetCallback} callback Node-style callback called with the error, if any, and Asset + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.getAsset = function getAsset(request, callback) { + return this.rpcCall(getAsset, $root.google.cloud.dataplex.v1.GetAssetRequest, $root.google.cloud.dataplex.v1.Asset, request, callback); + }, "name", { value: "GetAsset" }); + + /** + * Calls GetAsset. + * @function getAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetAssetRequest} request GetAssetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listAssetActions}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListAssetActionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListActionsResponse} [response] ListActionsResponse + */ + + /** + * Calls ListAssetActions. + * @function listAssetActions + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} request ListAssetActionsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListAssetActionsCallback} callback Node-style callback called with the error, if any, and ListActionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listAssetActions = function listAssetActions(request, callback) { + return this.rpcCall(listAssetActions, $root.google.cloud.dataplex.v1.ListAssetActionsRequest, $root.google.cloud.dataplex.v1.ListActionsResponse, request, callback); + }, "name", { value: "ListAssetActions" }); + + /** + * Calls ListAssetActions. + * @function listAssetActions + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} request ListAssetActionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createTask}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef CreateTaskCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateTask. + * @function createTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateTaskRequest} request CreateTaskRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.CreateTaskCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.createTask = function createTask(request, callback) { + return this.rpcCall(createTask, $root.google.cloud.dataplex.v1.CreateTaskRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateTask" }); + + /** + * Calls CreateTask. + * @function createTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateTaskRequest} request CreateTaskRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateTask}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef UpdateTaskCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateTask. + * @function updateTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} request UpdateTaskRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.UpdateTaskCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.updateTask = function updateTask(request, callback) { + return this.rpcCall(updateTask, $root.google.cloud.dataplex.v1.UpdateTaskRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateTask" }); + + /** + * Calls UpdateTask. + * @function updateTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} request UpdateTaskRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteTask}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef DeleteTaskCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteTask. + * @function deleteTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} request DeleteTaskRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.DeleteTaskCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.deleteTask = function deleteTask(request, callback) { + return this.rpcCall(deleteTask, $root.google.cloud.dataplex.v1.DeleteTaskRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteTask" }); + + /** + * Calls DeleteTask. + * @function deleteTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} request DeleteTaskRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listTasks}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListTasksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListTasksResponse} [response] ListTasksResponse + */ + + /** + * Calls ListTasks. + * @function listTasks + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListTasksRequest} request ListTasksRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListTasksCallback} callback Node-style callback called with the error, if any, and ListTasksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listTasks = function listTasks(request, callback) { + return this.rpcCall(listTasks, $root.google.cloud.dataplex.v1.ListTasksRequest, $root.google.cloud.dataplex.v1.ListTasksResponse, request, callback); + }, "name", { value: "ListTasks" }); + + /** + * Calls ListTasks. + * @function listTasks + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListTasksRequest} request ListTasksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getTask}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef GetTaskCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Task} [response] Task + */ + + /** + * Calls GetTask. + * @function getTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetTaskRequest} request GetTaskRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.GetTaskCallback} callback Node-style callback called with the error, if any, and Task + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.getTask = function getTask(request, callback) { + return this.rpcCall(getTask, $root.google.cloud.dataplex.v1.GetTaskRequest, $root.google.cloud.dataplex.v1.Task, request, callback); + }, "name", { value: "GetTask" }); + + /** + * Calls GetTask. + * @function getTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetTaskRequest} request GetTaskRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listJobs}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListJobsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListJobsResponse} [response] ListJobsResponse + */ + + /** + * Calls ListJobs. + * @function listJobs + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListJobsRequest} request ListJobsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListJobsCallback} callback Node-style callback called with the error, if any, and ListJobsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listJobs = function listJobs(request, callback) { + return this.rpcCall(listJobs, $root.google.cloud.dataplex.v1.ListJobsRequest, $root.google.cloud.dataplex.v1.ListJobsResponse, request, callback); + }, "name", { value: "ListJobs" }); + + /** + * Calls ListJobs. + * @function listJobs + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListJobsRequest} request ListJobsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getJob}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef GetJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Job} [response] Job + */ + + /** + * Calls GetJob. + * @function getJob + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetJobRequest} request GetJobRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.GetJobCallback} callback Node-style callback called with the error, if any, and Job + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.getJob = function getJob(request, callback) { + return this.rpcCall(getJob, $root.google.cloud.dataplex.v1.GetJobRequest, $root.google.cloud.dataplex.v1.Job, request, callback); + }, "name", { value: "GetJob" }); + + /** + * Calls GetJob. + * @function getJob + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetJobRequest} request GetJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#cancelJob}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef CancelJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CancelJob. + * @function cancelJob + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICancelJobRequest} request CancelJobRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.CancelJobCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.cancelJob = function cancelJob(request, callback) { + return this.rpcCall(cancelJob, $root.google.cloud.dataplex.v1.CancelJobRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelJob" }); + + /** + * Calls CancelJob. + * @function cancelJob + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICancelJobRequest} request CancelJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return DataplexService; + })(); + + v1.CreateLakeRequest = (function() { + + /** + * Properties of a CreateLakeRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICreateLakeRequest + * @property {string|null} [parent] CreateLakeRequest parent + * @property {string|null} [lakeId] CreateLakeRequest lakeId + * @property {google.cloud.dataplex.v1.ILake|null} [lake] CreateLakeRequest lake + * @property {boolean|null} [validateOnly] CreateLakeRequest validateOnly + */ + + /** + * Constructs a new CreateLakeRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CreateLakeRequest. + * @implements ICreateLakeRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICreateLakeRequest=} [properties] Properties to set + */ + function CreateLakeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateLakeRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @instance + */ + CreateLakeRequest.prototype.parent = ""; + + /** + * CreateLakeRequest lakeId. + * @member {string} lakeId + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @instance + */ + CreateLakeRequest.prototype.lakeId = ""; + + /** + * CreateLakeRequest lake. + * @member {google.cloud.dataplex.v1.ILake|null|undefined} lake + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @instance + */ + CreateLakeRequest.prototype.lake = null; + + /** + * CreateLakeRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @instance + */ + CreateLakeRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateLakeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateLakeRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest instance + */ + CreateLakeRequest.create = function create(properties) { + return new CreateLakeRequest(properties); + }; + + /** + * Encodes the specified CreateLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateLakeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateLakeRequest} message CreateLakeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateLakeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.lakeId != null && Object.hasOwnProperty.call(message, "lakeId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.lakeId); + if (message.lake != null && Object.hasOwnProperty.call(message, "lake")) + $root.google.cloud.dataplex.v1.Lake.encode(message.lake, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreateLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateLakeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateLakeRequest} message CreateLakeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateLakeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateLakeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateLakeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.lakeId = reader.string(); + break; + case 3: + message.lake = $root.google.cloud.dataplex.v1.Lake.decode(reader, reader.uint32()); + break; + case 4: + message.validateOnly = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateLakeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateLakeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateLakeRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateLakeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.lakeId != null && message.hasOwnProperty("lakeId")) + if (!$util.isString(message.lakeId)) + return "lakeId: string expected"; + if (message.lake != null && message.hasOwnProperty("lake")) { + var error = $root.google.cloud.dataplex.v1.Lake.verify(message.lake); + if (error) + return "lake." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateLakeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest + */ + CreateLakeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateLakeRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.CreateLakeRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.lakeId != null) + message.lakeId = String(object.lakeId); + if (object.lake != null) { + if (typeof object.lake !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateLakeRequest.lake: object expected"); + message.lake = $root.google.cloud.dataplex.v1.Lake.fromObject(object.lake); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateLakeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @static + * @param {google.cloud.dataplex.v1.CreateLakeRequest} message CreateLakeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateLakeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.lakeId = ""; + object.lake = null; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.lakeId != null && message.hasOwnProperty("lakeId")) + object.lakeId = message.lakeId; + if (message.lake != null && message.hasOwnProperty("lake")) + object.lake = $root.google.cloud.dataplex.v1.Lake.toObject(message.lake, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateLakeRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @instance + * @returns {Object.} JSON object + */ + CreateLakeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateLakeRequest; + })(); + + v1.UpdateLakeRequest = (function() { + + /** + * Properties of an UpdateLakeRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IUpdateLakeRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateLakeRequest updateMask + * @property {google.cloud.dataplex.v1.ILake|null} [lake] UpdateLakeRequest lake + * @property {boolean|null} [validateOnly] UpdateLakeRequest validateOnly + */ + + /** + * Constructs a new UpdateLakeRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an UpdateLakeRequest. + * @implements IUpdateLakeRequest + * @constructor + * @param {google.cloud.dataplex.v1.IUpdateLakeRequest=} [properties] Properties to set + */ + function UpdateLakeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateLakeRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @instance + */ + UpdateLakeRequest.prototype.updateMask = null; + + /** + * UpdateLakeRequest lake. + * @member {google.cloud.dataplex.v1.ILake|null|undefined} lake + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @instance + */ + UpdateLakeRequest.prototype.lake = null; + + /** + * UpdateLakeRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @instance + */ + UpdateLakeRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateLakeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateLakeRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest instance + */ + UpdateLakeRequest.create = function create(properties) { + return new UpdateLakeRequest(properties); + }; + + /** + * Encodes the specified UpdateLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateLakeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} message UpdateLakeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateLakeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.lake != null && Object.hasOwnProperty.call(message, "lake")) + $root.google.cloud.dataplex.v1.Lake.encode(message.lake, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified UpdateLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateLakeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} message UpdateLakeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateLakeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateLakeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateLakeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 2: + message.lake = $root.google.cloud.dataplex.v1.Lake.decode(reader, reader.uint32()); + break; + case 3: + message.validateOnly = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateLakeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateLakeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateLakeRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateLakeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.lake != null && message.hasOwnProperty("lake")) { + var error = $root.google.cloud.dataplex.v1.Lake.verify(message.lake); + if (error) + return "lake." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates an UpdateLakeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest + */ + UpdateLakeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateLakeRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.UpdateLakeRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateLakeRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.lake != null) { + if (typeof object.lake !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateLakeRequest.lake: object expected"); + message.lake = $root.google.cloud.dataplex.v1.Lake.fromObject(object.lake); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from an UpdateLakeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @static + * @param {google.cloud.dataplex.v1.UpdateLakeRequest} message UpdateLakeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateLakeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.lake = null; + object.validateOnly = false; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.lake != null && message.hasOwnProperty("lake")) + object.lake = $root.google.cloud.dataplex.v1.Lake.toObject(message.lake, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this UpdateLakeRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateLakeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateLakeRequest; + })(); + + v1.DeleteLakeRequest = (function() { + + /** + * Properties of a DeleteLakeRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IDeleteLakeRequest + * @property {string|null} [name] DeleteLakeRequest name + */ + + /** + * Constructs a new DeleteLakeRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DeleteLakeRequest. + * @implements IDeleteLakeRequest + * @constructor + * @param {google.cloud.dataplex.v1.IDeleteLakeRequest=} [properties] Properties to set + */ + function DeleteLakeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteLakeRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @instance + */ + DeleteLakeRequest.prototype.name = ""; + + /** + * Creates a new DeleteLakeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteLakeRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest instance + */ + DeleteLakeRequest.create = function create(properties) { + return new DeleteLakeRequest(properties); + }; + + /** + * Encodes the specified DeleteLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteLakeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} message DeleteLakeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteLakeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteLakeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} message DeleteLakeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteLakeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteLakeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteLakeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteLakeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteLakeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteLakeRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteLakeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteLakeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest + */ + DeleteLakeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteLakeRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.DeleteLakeRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteLakeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {google.cloud.dataplex.v1.DeleteLakeRequest} message DeleteLakeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteLakeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteLakeRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteLakeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteLakeRequest; + })(); + + v1.ListLakesRequest = (function() { + + /** + * Properties of a ListLakesRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListLakesRequest + * @property {string|null} [parent] ListLakesRequest parent + * @property {number|null} [pageSize] ListLakesRequest pageSize + * @property {string|null} [pageToken] ListLakesRequest pageToken + * @property {string|null} [filter] ListLakesRequest filter + * @property {string|null} [orderBy] ListLakesRequest orderBy + */ + + /** + * Constructs a new ListLakesRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListLakesRequest. + * @implements IListLakesRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListLakesRequest=} [properties] Properties to set + */ + function ListLakesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListLakesRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @instance + */ + ListLakesRequest.prototype.parent = ""; + + /** + * ListLakesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @instance + */ + ListLakesRequest.prototype.pageSize = 0; + + /** + * ListLakesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @instance + */ + ListLakesRequest.prototype.pageToken = ""; + + /** + * ListLakesRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @instance + */ + ListLakesRequest.prototype.filter = ""; + + /** + * ListLakesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @instance + */ + ListLakesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListLakesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @static + * @param {google.cloud.dataplex.v1.IListLakesRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest instance + */ + ListLakesRequest.create = function create(properties) { + return new ListLakesRequest(properties); + }; + + /** + * Encodes the specified ListLakesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @static + * @param {google.cloud.dataplex.v1.IListLakesRequest} message ListLakesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLakesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListLakesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @static + * @param {google.cloud.dataplex.v1.IListLakesRequest} message ListLakesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLakesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListLakesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLakesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListLakesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 4: + message.filter = reader.string(); + break; + case 5: + message.orderBy = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListLakesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLakesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListLakesRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListLakesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListLakesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest + */ + ListLakesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListLakesRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListLakesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListLakesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @static + * @param {google.cloud.dataplex.v1.ListLakesRequest} message ListLakesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListLakesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListLakesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @instance + * @returns {Object.} JSON object + */ + ListLakesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListLakesRequest; + })(); + + v1.ListLakesResponse = (function() { + + /** + * Properties of a ListLakesResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListLakesResponse + * @property {Array.|null} [lakes] ListLakesResponse lakes + * @property {string|null} [nextPageToken] ListLakesResponse nextPageToken + * @property {Array.|null} [unreachableLocations] ListLakesResponse unreachableLocations + */ + + /** + * Constructs a new ListLakesResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListLakesResponse. + * @implements IListLakesResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListLakesResponse=} [properties] Properties to set + */ + function ListLakesResponse(properties) { + this.lakes = []; + this.unreachableLocations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListLakesResponse lakes. + * @member {Array.} lakes + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @instance + */ + ListLakesResponse.prototype.lakes = $util.emptyArray; + + /** + * ListLakesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @instance + */ + ListLakesResponse.prototype.nextPageToken = ""; + + /** + * ListLakesResponse unreachableLocations. + * @member {Array.} unreachableLocations + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @instance + */ + ListLakesResponse.prototype.unreachableLocations = $util.emptyArray; + + /** + * Creates a new ListLakesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {google.cloud.dataplex.v1.IListLakesResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse instance + */ + ListLakesResponse.create = function create(properties) { + return new ListLakesResponse(properties); + }; + + /** + * Encodes the specified ListLakesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {google.cloud.dataplex.v1.IListLakesResponse} message ListLakesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLakesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lakes != null && message.lakes.length) + for (var i = 0; i < message.lakes.length; ++i) + $root.google.cloud.dataplex.v1.Lake.encode(message.lakes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachableLocations != null && message.unreachableLocations.length) + for (var i = 0; i < message.unreachableLocations.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachableLocations[i]); + return writer; + }; + + /** + * Encodes the specified ListLakesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {google.cloud.dataplex.v1.IListLakesResponse} message ListLakesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLakesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListLakesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLakesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListLakesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.lakes && message.lakes.length)) + message.lakes = []; + message.lakes.push($root.google.cloud.dataplex.v1.Lake.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + case 3: + if (!(message.unreachableLocations && message.unreachableLocations.length)) + message.unreachableLocations = []; + message.unreachableLocations.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListLakesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLakesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListLakesResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListLakesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.lakes != null && message.hasOwnProperty("lakes")) { + if (!Array.isArray(message.lakes)) + return "lakes: array expected"; + for (var i = 0; i < message.lakes.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Lake.verify(message.lakes[i]); + if (error) + return "lakes." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachableLocations != null && message.hasOwnProperty("unreachableLocations")) { + if (!Array.isArray(message.unreachableLocations)) + return "unreachableLocations: array expected"; + for (var i = 0; i < message.unreachableLocations.length; ++i) + if (!$util.isString(message.unreachableLocations[i])) + return "unreachableLocations: string[] expected"; + } + return null; + }; + + /** + * Creates a ListLakesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse + */ + ListLakesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListLakesResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListLakesResponse(); + if (object.lakes) { + if (!Array.isArray(object.lakes)) + throw TypeError(".google.cloud.dataplex.v1.ListLakesResponse.lakes: array expected"); + message.lakes = []; + for (var i = 0; i < object.lakes.length; ++i) { + if (typeof object.lakes[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListLakesResponse.lakes: object expected"); + message.lakes[i] = $root.google.cloud.dataplex.v1.Lake.fromObject(object.lakes[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachableLocations) { + if (!Array.isArray(object.unreachableLocations)) + throw TypeError(".google.cloud.dataplex.v1.ListLakesResponse.unreachableLocations: array expected"); + message.unreachableLocations = []; + for (var i = 0; i < object.unreachableLocations.length; ++i) + message.unreachableLocations[i] = String(object.unreachableLocations[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListLakesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {google.cloud.dataplex.v1.ListLakesResponse} message ListLakesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListLakesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.lakes = []; + object.unreachableLocations = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.lakes && message.lakes.length) { + object.lakes = []; + for (var j = 0; j < message.lakes.length; ++j) + object.lakes[j] = $root.google.cloud.dataplex.v1.Lake.toObject(message.lakes[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachableLocations && message.unreachableLocations.length) { + object.unreachableLocations = []; + for (var j = 0; j < message.unreachableLocations.length; ++j) + object.unreachableLocations[j] = message.unreachableLocations[j]; + } + return object; + }; + + /** + * Converts this ListLakesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @instance + * @returns {Object.} JSON object + */ + ListLakesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListLakesResponse; + })(); + + v1.ListLakeActionsRequest = (function() { + + /** + * Properties of a ListLakeActionsRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListLakeActionsRequest + * @property {string|null} [parent] ListLakeActionsRequest parent + * @property {number|null} [pageSize] ListLakeActionsRequest pageSize + * @property {string|null} [pageToken] ListLakeActionsRequest pageToken + */ + + /** + * Constructs a new ListLakeActionsRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListLakeActionsRequest. + * @implements IListLakeActionsRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListLakeActionsRequest=} [properties] Properties to set + */ + function ListLakeActionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListLakeActionsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @instance + */ + ListLakeActionsRequest.prototype.parent = ""; + + /** + * ListLakeActionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @instance + */ + ListLakeActionsRequest.prototype.pageSize = 0; + + /** + * ListLakeActionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @instance + */ + ListLakeActionsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListLakeActionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListLakeActionsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest instance + */ + ListLakeActionsRequest.create = function create(properties) { + return new ListLakeActionsRequest(properties); + }; + + /** + * Encodes the specified ListLakeActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakeActionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} message ListLakeActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLakeActionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListLakeActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakeActionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} message ListLakeActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLakeActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListLakeActionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLakeActionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListLakeActionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListLakeActionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLakeActionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListLakeActionsRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListLakeActionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListLakeActionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest + */ + ListLakeActionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListLakeActionsRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListLakeActionsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListLakeActionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {google.cloud.dataplex.v1.ListLakeActionsRequest} message ListLakeActionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListLakeActionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListLakeActionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListLakeActionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListLakeActionsRequest; + })(); + + v1.ListActionsResponse = (function() { + + /** + * Properties of a ListActionsResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListActionsResponse + * @property {Array.|null} [actions] ListActionsResponse actions + * @property {string|null} [nextPageToken] ListActionsResponse nextPageToken + */ + + /** + * Constructs a new ListActionsResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListActionsResponse. + * @implements IListActionsResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListActionsResponse=} [properties] Properties to set + */ + function ListActionsResponse(properties) { + this.actions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListActionsResponse actions. + * @member {Array.} actions + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @instance + */ + ListActionsResponse.prototype.actions = $util.emptyArray; + + /** + * ListActionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @instance + */ + ListActionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListActionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @static + * @param {google.cloud.dataplex.v1.IListActionsResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse instance + */ + ListActionsResponse.create = function create(properties) { + return new ListActionsResponse(properties); + }; + + /** + * Encodes the specified ListActionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListActionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @static + * @param {google.cloud.dataplex.v1.IListActionsResponse} message ListActionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListActionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.actions != null && message.actions.length) + for (var i = 0; i < message.actions.length; ++i) + $root.google.cloud.dataplex.v1.Action.encode(message.actions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListActionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListActionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @static + * @param {google.cloud.dataplex.v1.IListActionsResponse} message ListActionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListActionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListActionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListActionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListActionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.actions && message.actions.length)) + message.actions = []; + message.actions.push($root.google.cloud.dataplex.v1.Action.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListActionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListActionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListActionsResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListActionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.actions != null && message.hasOwnProperty("actions")) { + if (!Array.isArray(message.actions)) + return "actions: array expected"; + for (var i = 0; i < message.actions.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Action.verify(message.actions[i]); + if (error) + return "actions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListActionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse + */ + ListActionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListActionsResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListActionsResponse(); + if (object.actions) { + if (!Array.isArray(object.actions)) + throw TypeError(".google.cloud.dataplex.v1.ListActionsResponse.actions: array expected"); + message.actions = []; + for (var i = 0; i < object.actions.length; ++i) { + if (typeof object.actions[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListActionsResponse.actions: object expected"); + message.actions[i] = $root.google.cloud.dataplex.v1.Action.fromObject(object.actions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListActionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @static + * @param {google.cloud.dataplex.v1.ListActionsResponse} message ListActionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListActionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.actions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.actions && message.actions.length) { + object.actions = []; + for (var j = 0; j < message.actions.length; ++j) + object.actions[j] = $root.google.cloud.dataplex.v1.Action.toObject(message.actions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListActionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListActionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListActionsResponse; + })(); + + v1.GetLakeRequest = (function() { + + /** + * Properties of a GetLakeRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetLakeRequest + * @property {string|null} [name] GetLakeRequest name + */ + + /** + * Constructs a new GetLakeRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetLakeRequest. + * @implements IGetLakeRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetLakeRequest=} [properties] Properties to set + */ + function GetLakeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetLakeRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @instance + */ + GetLakeRequest.prototype.name = ""; + + /** + * Creates a new GetLakeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @static + * @param {google.cloud.dataplex.v1.IGetLakeRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest instance + */ + GetLakeRequest.create = function create(properties) { + return new GetLakeRequest(properties); + }; + + /** + * Encodes the specified GetLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetLakeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @static + * @param {google.cloud.dataplex.v1.IGetLakeRequest} message GetLakeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetLakeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetLakeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @static + * @param {google.cloud.dataplex.v1.IGetLakeRequest} message GetLakeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetLakeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetLakeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetLakeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetLakeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetLakeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetLakeRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetLakeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetLakeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest + */ + GetLakeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetLakeRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetLakeRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetLakeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @static + * @param {google.cloud.dataplex.v1.GetLakeRequest} message GetLakeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetLakeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetLakeRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @instance + * @returns {Object.} JSON object + */ + GetLakeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetLakeRequest; + })(); + + v1.CreateZoneRequest = (function() { + + /** + * Properties of a CreateZoneRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICreateZoneRequest + * @property {string|null} [parent] CreateZoneRequest parent + * @property {string|null} [zoneId] CreateZoneRequest zoneId + * @property {google.cloud.dataplex.v1.IZone|null} [zone] CreateZoneRequest zone + * @property {boolean|null} [validateOnly] CreateZoneRequest validateOnly + */ + + /** + * Constructs a new CreateZoneRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CreateZoneRequest. + * @implements ICreateZoneRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICreateZoneRequest=} [properties] Properties to set + */ + function CreateZoneRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateZoneRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @instance + */ + CreateZoneRequest.prototype.parent = ""; + + /** + * CreateZoneRequest zoneId. + * @member {string} zoneId + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @instance + */ + CreateZoneRequest.prototype.zoneId = ""; + + /** + * CreateZoneRequest zone. + * @member {google.cloud.dataplex.v1.IZone|null|undefined} zone + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @instance + */ + CreateZoneRequest.prototype.zone = null; + + /** + * CreateZoneRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @instance + */ + CreateZoneRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateZoneRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateZoneRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest instance + */ + CreateZoneRequest.create = function create(properties) { + return new CreateZoneRequest(properties); + }; + + /** + * Encodes the specified CreateZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateZoneRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateZoneRequest} message CreateZoneRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateZoneRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.zoneId != null && Object.hasOwnProperty.call(message, "zoneId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zoneId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + $root.google.cloud.dataplex.v1.Zone.encode(message.zone, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreateZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateZoneRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateZoneRequest} message CreateZoneRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateZoneRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateZoneRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateZoneRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.zoneId = reader.string(); + break; + case 3: + message.zone = $root.google.cloud.dataplex.v1.Zone.decode(reader, reader.uint32()); + break; + case 4: + message.validateOnly = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateZoneRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateZoneRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateZoneRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateZoneRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.zoneId != null && message.hasOwnProperty("zoneId")) + if (!$util.isString(message.zoneId)) + return "zoneId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) { + var error = $root.google.cloud.dataplex.v1.Zone.verify(message.zone); + if (error) + return "zone." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateZoneRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest + */ + CreateZoneRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateZoneRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.CreateZoneRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.zoneId != null) + message.zoneId = String(object.zoneId); + if (object.zone != null) { + if (typeof object.zone !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateZoneRequest.zone: object expected"); + message.zone = $root.google.cloud.dataplex.v1.Zone.fromObject(object.zone); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateZoneRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @static + * @param {google.cloud.dataplex.v1.CreateZoneRequest} message CreateZoneRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateZoneRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.zoneId = ""; + object.zone = null; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.zoneId != null && message.hasOwnProperty("zoneId")) + object.zoneId = message.zoneId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = $root.google.cloud.dataplex.v1.Zone.toObject(message.zone, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateZoneRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @instance + * @returns {Object.} JSON object + */ + CreateZoneRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateZoneRequest; + })(); + + v1.UpdateZoneRequest = (function() { + + /** + * Properties of an UpdateZoneRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IUpdateZoneRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateZoneRequest updateMask + * @property {google.cloud.dataplex.v1.IZone|null} [zone] UpdateZoneRequest zone + * @property {boolean|null} [validateOnly] UpdateZoneRequest validateOnly + */ + + /** + * Constructs a new UpdateZoneRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an UpdateZoneRequest. + * @implements IUpdateZoneRequest + * @constructor + * @param {google.cloud.dataplex.v1.IUpdateZoneRequest=} [properties] Properties to set + */ + function UpdateZoneRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateZoneRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @instance + */ + UpdateZoneRequest.prototype.updateMask = null; + + /** + * UpdateZoneRequest zone. + * @member {google.cloud.dataplex.v1.IZone|null|undefined} zone + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @instance + */ + UpdateZoneRequest.prototype.zone = null; + + /** + * UpdateZoneRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @instance + */ + UpdateZoneRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateZoneRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateZoneRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest instance + */ + UpdateZoneRequest.create = function create(properties) { + return new UpdateZoneRequest(properties); + }; + + /** + * Encodes the specified UpdateZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateZoneRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} message UpdateZoneRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateZoneRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + $root.google.cloud.dataplex.v1.Zone.encode(message.zone, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified UpdateZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateZoneRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} message UpdateZoneRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateZoneRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateZoneRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateZoneRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 2: + message.zone = $root.google.cloud.dataplex.v1.Zone.decode(reader, reader.uint32()); + break; + case 3: + message.validateOnly = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateZoneRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateZoneRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateZoneRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateZoneRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.zone != null && message.hasOwnProperty("zone")) { + var error = $root.google.cloud.dataplex.v1.Zone.verify(message.zone); + if (error) + return "zone." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates an UpdateZoneRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest + */ + UpdateZoneRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateZoneRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.UpdateZoneRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateZoneRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.zone != null) { + if (typeof object.zone !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateZoneRequest.zone: object expected"); + message.zone = $root.google.cloud.dataplex.v1.Zone.fromObject(object.zone); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from an UpdateZoneRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @static + * @param {google.cloud.dataplex.v1.UpdateZoneRequest} message UpdateZoneRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateZoneRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.zone = null; + object.validateOnly = false; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = $root.google.cloud.dataplex.v1.Zone.toObject(message.zone, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this UpdateZoneRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateZoneRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateZoneRequest; + })(); + + v1.DeleteZoneRequest = (function() { + + /** + * Properties of a DeleteZoneRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IDeleteZoneRequest + * @property {string|null} [name] DeleteZoneRequest name + */ + + /** + * Constructs a new DeleteZoneRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DeleteZoneRequest. + * @implements IDeleteZoneRequest + * @constructor + * @param {google.cloud.dataplex.v1.IDeleteZoneRequest=} [properties] Properties to set + */ + function DeleteZoneRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteZoneRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @instance + */ + DeleteZoneRequest.prototype.name = ""; + + /** + * Creates a new DeleteZoneRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteZoneRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest instance + */ + DeleteZoneRequest.create = function create(properties) { + return new DeleteZoneRequest(properties); + }; + + /** + * Encodes the specified DeleteZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteZoneRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} message DeleteZoneRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteZoneRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteZoneRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} message DeleteZoneRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteZoneRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteZoneRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteZoneRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteZoneRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteZoneRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteZoneRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteZoneRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteZoneRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest + */ + DeleteZoneRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteZoneRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.DeleteZoneRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteZoneRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @static + * @param {google.cloud.dataplex.v1.DeleteZoneRequest} message DeleteZoneRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteZoneRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteZoneRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteZoneRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteZoneRequest; + })(); + + v1.ListZonesRequest = (function() { + + /** + * Properties of a ListZonesRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListZonesRequest + * @property {string|null} [parent] ListZonesRequest parent + * @property {number|null} [pageSize] ListZonesRequest pageSize + * @property {string|null} [pageToken] ListZonesRequest pageToken + * @property {string|null} [filter] ListZonesRequest filter + * @property {string|null} [orderBy] ListZonesRequest orderBy + */ + + /** + * Constructs a new ListZonesRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListZonesRequest. + * @implements IListZonesRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListZonesRequest=} [properties] Properties to set + */ + function ListZonesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListZonesRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @instance + */ + ListZonesRequest.prototype.parent = ""; + + /** + * ListZonesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @instance + */ + ListZonesRequest.prototype.pageSize = 0; + + /** + * ListZonesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @instance + */ + ListZonesRequest.prototype.pageToken = ""; + + /** + * ListZonesRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @instance + */ + ListZonesRequest.prototype.filter = ""; + + /** + * ListZonesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @instance + */ + ListZonesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListZonesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @static + * @param {google.cloud.dataplex.v1.IListZonesRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest instance + */ + ListZonesRequest.create = function create(properties) { + return new ListZonesRequest(properties); + }; + + /** + * Encodes the specified ListZonesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @static + * @param {google.cloud.dataplex.v1.IListZonesRequest} message ListZonesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListZonesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListZonesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @static + * @param {google.cloud.dataplex.v1.IListZonesRequest} message ListZonesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListZonesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListZonesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListZonesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListZonesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 4: + message.filter = reader.string(); + break; + case 5: + message.orderBy = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListZonesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListZonesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListZonesRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListZonesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListZonesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest + */ + ListZonesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListZonesRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListZonesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListZonesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @static + * @param {google.cloud.dataplex.v1.ListZonesRequest} message ListZonesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListZonesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListZonesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @instance + * @returns {Object.} JSON object + */ + ListZonesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListZonesRequest; + })(); + + v1.ListZonesResponse = (function() { + + /** + * Properties of a ListZonesResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListZonesResponse + * @property {Array.|null} [zones] ListZonesResponse zones + * @property {string|null} [nextPageToken] ListZonesResponse nextPageToken + */ + + /** + * Constructs a new ListZonesResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListZonesResponse. + * @implements IListZonesResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListZonesResponse=} [properties] Properties to set + */ + function ListZonesResponse(properties) { + this.zones = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListZonesResponse zones. + * @member {Array.} zones + * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @instance + */ + ListZonesResponse.prototype.zones = $util.emptyArray; + + /** + * ListZonesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @instance + */ + ListZonesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListZonesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @static + * @param {google.cloud.dataplex.v1.IListZonesResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse instance + */ + ListZonesResponse.create = function create(properties) { + return new ListZonesResponse(properties); + }; + + /** + * Encodes the specified ListZonesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @static + * @param {google.cloud.dataplex.v1.IListZonesResponse} message ListZonesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListZonesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.zones != null && message.zones.length) + for (var i = 0; i < message.zones.length; ++i) + $root.google.cloud.dataplex.v1.Zone.encode(message.zones[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListZonesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @static + * @param {google.cloud.dataplex.v1.IListZonesResponse} message ListZonesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListZonesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListZonesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListZonesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListZonesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.zones && message.zones.length)) + message.zones = []; + message.zones.push($root.google.cloud.dataplex.v1.Zone.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListZonesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListZonesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListZonesResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListZonesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.zones != null && message.hasOwnProperty("zones")) { + if (!Array.isArray(message.zones)) + return "zones: array expected"; + for (var i = 0; i < message.zones.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Zone.verify(message.zones[i]); + if (error) + return "zones." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListZonesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse + */ + ListZonesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListZonesResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListZonesResponse(); + if (object.zones) { + if (!Array.isArray(object.zones)) + throw TypeError(".google.cloud.dataplex.v1.ListZonesResponse.zones: array expected"); + message.zones = []; + for (var i = 0; i < object.zones.length; ++i) { + if (typeof object.zones[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListZonesResponse.zones: object expected"); + message.zones[i] = $root.google.cloud.dataplex.v1.Zone.fromObject(object.zones[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListZonesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @static + * @param {google.cloud.dataplex.v1.ListZonesResponse} message ListZonesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListZonesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.zones = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.zones && message.zones.length) { + object.zones = []; + for (var j = 0; j < message.zones.length; ++j) + object.zones[j] = $root.google.cloud.dataplex.v1.Zone.toObject(message.zones[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListZonesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @instance + * @returns {Object.} JSON object + */ + ListZonesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListZonesResponse; + })(); + + v1.ListZoneActionsRequest = (function() { + + /** + * Properties of a ListZoneActionsRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListZoneActionsRequest + * @property {string|null} [parent] ListZoneActionsRequest parent + * @property {number|null} [pageSize] ListZoneActionsRequest pageSize + * @property {string|null} [pageToken] ListZoneActionsRequest pageToken + */ + + /** + * Constructs a new ListZoneActionsRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListZoneActionsRequest. + * @implements IListZoneActionsRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListZoneActionsRequest=} [properties] Properties to set + */ + function ListZoneActionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListZoneActionsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @instance + */ + ListZoneActionsRequest.prototype.parent = ""; + + /** + * ListZoneActionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @instance + */ + ListZoneActionsRequest.prototype.pageSize = 0; + + /** + * ListZoneActionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @instance + */ + ListZoneActionsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListZoneActionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListZoneActionsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest instance + */ + ListZoneActionsRequest.create = function create(properties) { + return new ListZoneActionsRequest(properties); + }; + + /** + * Encodes the specified ListZoneActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListZoneActionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} message ListZoneActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListZoneActionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListZoneActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZoneActionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} message ListZoneActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListZoneActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListZoneActionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListZoneActionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListZoneActionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListZoneActionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListZoneActionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListZoneActionsRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListZoneActionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListZoneActionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest + */ + ListZoneActionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListZoneActionsRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListZoneActionsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListZoneActionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @static + * @param {google.cloud.dataplex.v1.ListZoneActionsRequest} message ListZoneActionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListZoneActionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListZoneActionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListZoneActionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListZoneActionsRequest; + })(); + + v1.GetZoneRequest = (function() { + + /** + * Properties of a GetZoneRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetZoneRequest + * @property {string|null} [name] GetZoneRequest name + */ + + /** + * Constructs a new GetZoneRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetZoneRequest. + * @implements IGetZoneRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetZoneRequest=} [properties] Properties to set + */ + function GetZoneRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetZoneRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @instance + */ + GetZoneRequest.prototype.name = ""; + + /** + * Creates a new GetZoneRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @static + * @param {google.cloud.dataplex.v1.IGetZoneRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest instance + */ + GetZoneRequest.create = function create(properties) { + return new GetZoneRequest(properties); + }; + + /** + * Encodes the specified GetZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetZoneRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @static + * @param {google.cloud.dataplex.v1.IGetZoneRequest} message GetZoneRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetZoneRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetZoneRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @static + * @param {google.cloud.dataplex.v1.IGetZoneRequest} message GetZoneRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetZoneRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetZoneRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetZoneRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetZoneRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetZoneRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetZoneRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetZoneRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetZoneRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest + */ + GetZoneRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetZoneRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetZoneRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetZoneRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @static + * @param {google.cloud.dataplex.v1.GetZoneRequest} message GetZoneRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetZoneRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetZoneRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @instance + * @returns {Object.} JSON object + */ + GetZoneRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetZoneRequest; + })(); + + v1.CreateAssetRequest = (function() { + + /** + * Properties of a CreateAssetRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICreateAssetRequest + * @property {string|null} [parent] CreateAssetRequest parent + * @property {string|null} [assetId] CreateAssetRequest assetId + * @property {google.cloud.dataplex.v1.IAsset|null} [asset] CreateAssetRequest asset + * @property {boolean|null} [validateOnly] CreateAssetRequest validateOnly + */ + + /** + * Constructs a new CreateAssetRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CreateAssetRequest. + * @implements ICreateAssetRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICreateAssetRequest=} [properties] Properties to set + */ + function CreateAssetRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateAssetRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @instance + */ + CreateAssetRequest.prototype.parent = ""; + + /** + * CreateAssetRequest assetId. + * @member {string} assetId + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @instance + */ + CreateAssetRequest.prototype.assetId = ""; + + /** + * CreateAssetRequest asset. + * @member {google.cloud.dataplex.v1.IAsset|null|undefined} asset + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @instance + */ + CreateAssetRequest.prototype.asset = null; + + /** + * CreateAssetRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @instance + */ + CreateAssetRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateAssetRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateAssetRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest instance + */ + CreateAssetRequest.create = function create(properties) { + return new CreateAssetRequest(properties); + }; + + /** + * Encodes the specified CreateAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateAssetRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateAssetRequest} message CreateAssetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAssetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.assetId != null && Object.hasOwnProperty.call(message, "assetId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.assetId); + if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) + $root.google.cloud.dataplex.v1.Asset.encode(message.asset, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreateAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateAssetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateAssetRequest} message CreateAssetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateAssetRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAssetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateAssetRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.assetId = reader.string(); + break; + case 3: + message.asset = $root.google.cloud.dataplex.v1.Asset.decode(reader, reader.uint32()); + break; + case 4: + message.validateOnly = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateAssetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAssetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateAssetRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateAssetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.assetId != null && message.hasOwnProperty("assetId")) + if (!$util.isString(message.assetId)) + return "assetId: string expected"; + if (message.asset != null && message.hasOwnProperty("asset")) { + var error = $root.google.cloud.dataplex.v1.Asset.verify(message.asset); + if (error) + return "asset." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateAssetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest + */ + CreateAssetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateAssetRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.CreateAssetRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.assetId != null) + message.assetId = String(object.assetId); + if (object.asset != null) { + if (typeof object.asset !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateAssetRequest.asset: object expected"); + message.asset = $root.google.cloud.dataplex.v1.Asset.fromObject(object.asset); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateAssetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @static + * @param {google.cloud.dataplex.v1.CreateAssetRequest} message CreateAssetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateAssetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.assetId = ""; + object.asset = null; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.assetId != null && message.hasOwnProperty("assetId")) + object.assetId = message.assetId; + if (message.asset != null && message.hasOwnProperty("asset")) + object.asset = $root.google.cloud.dataplex.v1.Asset.toObject(message.asset, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateAssetRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @instance + * @returns {Object.} JSON object + */ + CreateAssetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateAssetRequest; + })(); + + v1.UpdateAssetRequest = (function() { + + /** + * Properties of an UpdateAssetRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IUpdateAssetRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAssetRequest updateMask + * @property {google.cloud.dataplex.v1.IAsset|null} [asset] UpdateAssetRequest asset + * @property {boolean|null} [validateOnly] UpdateAssetRequest validateOnly + */ + + /** + * Constructs a new UpdateAssetRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an UpdateAssetRequest. + * @implements IUpdateAssetRequest + * @constructor + * @param {google.cloud.dataplex.v1.IUpdateAssetRequest=} [properties] Properties to set + */ + function UpdateAssetRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateAssetRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @instance + */ + UpdateAssetRequest.prototype.updateMask = null; + + /** + * UpdateAssetRequest asset. + * @member {google.cloud.dataplex.v1.IAsset|null|undefined} asset + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @instance + */ + UpdateAssetRequest.prototype.asset = null; + + /** + * UpdateAssetRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @instance + */ + UpdateAssetRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateAssetRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateAssetRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest instance + */ + UpdateAssetRequest.create = function create(properties) { + return new UpdateAssetRequest(properties); + }; + + /** + * Encodes the specified UpdateAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAssetRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} message UpdateAssetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAssetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) + $root.google.cloud.dataplex.v1.Asset.encode(message.asset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified UpdateAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAssetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} message UpdateAssetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateAssetRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAssetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateAssetRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 2: + message.asset = $root.google.cloud.dataplex.v1.Asset.decode(reader, reader.uint32()); + break; + case 3: + message.validateOnly = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateAssetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAssetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateAssetRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateAssetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.asset != null && message.hasOwnProperty("asset")) { + var error = $root.google.cloud.dataplex.v1.Asset.verify(message.asset); + if (error) + return "asset." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates an UpdateAssetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest + */ + UpdateAssetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateAssetRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.UpdateAssetRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateAssetRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.asset != null) { + if (typeof object.asset !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateAssetRequest.asset: object expected"); + message.asset = $root.google.cloud.dataplex.v1.Asset.fromObject(object.asset); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from an UpdateAssetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @static + * @param {google.cloud.dataplex.v1.UpdateAssetRequest} message UpdateAssetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateAssetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.asset = null; + object.validateOnly = false; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.asset != null && message.hasOwnProperty("asset")) + object.asset = $root.google.cloud.dataplex.v1.Asset.toObject(message.asset, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this UpdateAssetRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateAssetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateAssetRequest; + })(); + + v1.DeleteAssetRequest = (function() { + + /** + * Properties of a DeleteAssetRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IDeleteAssetRequest + * @property {string|null} [name] DeleteAssetRequest name + */ + + /** + * Constructs a new DeleteAssetRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DeleteAssetRequest. + * @implements IDeleteAssetRequest + * @constructor + * @param {google.cloud.dataplex.v1.IDeleteAssetRequest=} [properties] Properties to set + */ + function DeleteAssetRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteAssetRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @instance + */ + DeleteAssetRequest.prototype.name = ""; + + /** + * Creates a new DeleteAssetRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteAssetRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest instance + */ + DeleteAssetRequest.create = function create(properties) { + return new DeleteAssetRequest(properties); + }; + + /** + * Encodes the specified DeleteAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAssetRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} message DeleteAssetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteAssetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAssetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} message DeleteAssetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteAssetRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteAssetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteAssetRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteAssetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteAssetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteAssetRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteAssetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteAssetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest + */ + DeleteAssetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteAssetRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.DeleteAssetRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteAssetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @static + * @param {google.cloud.dataplex.v1.DeleteAssetRequest} message DeleteAssetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteAssetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteAssetRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteAssetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteAssetRequest; + })(); + + v1.ListAssetsRequest = (function() { + + /** + * Properties of a ListAssetsRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListAssetsRequest + * @property {string|null} [parent] ListAssetsRequest parent + * @property {number|null} [pageSize] ListAssetsRequest pageSize + * @property {string|null} [pageToken] ListAssetsRequest pageToken + * @property {string|null} [filter] ListAssetsRequest filter + * @property {string|null} [orderBy] ListAssetsRequest orderBy + */ + + /** + * Constructs a new ListAssetsRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListAssetsRequest. + * @implements IListAssetsRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListAssetsRequest=} [properties] Properties to set + */ + function ListAssetsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAssetsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.parent = ""; + + /** + * ListAssetsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.pageSize = 0; + + /** + * ListAssetsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.pageToken = ""; + + /** + * ListAssetsRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.filter = ""; + + /** + * ListAssetsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListAssetsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @static + * @param {google.cloud.dataplex.v1.IListAssetsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest instance + */ + ListAssetsRequest.create = function create(properties) { + return new ListAssetsRequest(properties); + }; + + /** + * Encodes the specified ListAssetsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @static + * @param {google.cloud.dataplex.v1.IListAssetsRequest} message ListAssetsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAssetsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @static + * @param {google.cloud.dataplex.v1.IListAssetsRequest} message ListAssetsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAssetsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAssetsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAssetsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListAssetsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 4: + message.filter = reader.string(); + break; + case 5: + message.orderBy = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAssetsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAssetsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAssetsRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAssetsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListAssetsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest + */ + ListAssetsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListAssetsRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListAssetsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListAssetsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @static + * @param {google.cloud.dataplex.v1.ListAssetsRequest} message ListAssetsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAssetsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListAssetsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @instance + * @returns {Object.} JSON object + */ + ListAssetsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListAssetsRequest; + })(); + + v1.ListAssetsResponse = (function() { + + /** + * Properties of a ListAssetsResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListAssetsResponse + * @property {Array.|null} [assets] ListAssetsResponse assets + * @property {string|null} [nextPageToken] ListAssetsResponse nextPageToken + */ + + /** + * Constructs a new ListAssetsResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListAssetsResponse. + * @implements IListAssetsResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListAssetsResponse=} [properties] Properties to set + */ + function ListAssetsResponse(properties) { + this.assets = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAssetsResponse assets. + * @member {Array.} assets + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @instance + */ + ListAssetsResponse.prototype.assets = $util.emptyArray; + + /** + * ListAssetsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @instance + */ + ListAssetsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListAssetsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @static + * @param {google.cloud.dataplex.v1.IListAssetsResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse instance + */ + ListAssetsResponse.create = function create(properties) { + return new ListAssetsResponse(properties); + }; + + /** + * Encodes the specified ListAssetsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @static + * @param {google.cloud.dataplex.v1.IListAssetsResponse} message ListAssetsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAssetsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.assets != null && message.assets.length) + for (var i = 0; i < message.assets.length; ++i) + $root.google.cloud.dataplex.v1.Asset.encode(message.assets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @static + * @param {google.cloud.dataplex.v1.IListAssetsResponse} message ListAssetsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAssetsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAssetsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAssetsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListAssetsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.assets && message.assets.length)) + message.assets = []; + message.assets.push($root.google.cloud.dataplex.v1.Asset.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAssetsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAssetsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAssetsResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAssetsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.assets != null && message.hasOwnProperty("assets")) { + if (!Array.isArray(message.assets)) + return "assets: array expected"; + for (var i = 0; i < message.assets.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Asset.verify(message.assets[i]); + if (error) + return "assets." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListAssetsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse + */ + ListAssetsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListAssetsResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListAssetsResponse(); + if (object.assets) { + if (!Array.isArray(object.assets)) + throw TypeError(".google.cloud.dataplex.v1.ListAssetsResponse.assets: array expected"); + message.assets = []; + for (var i = 0; i < object.assets.length; ++i) { + if (typeof object.assets[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListAssetsResponse.assets: object expected"); + message.assets[i] = $root.google.cloud.dataplex.v1.Asset.fromObject(object.assets[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListAssetsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @static + * @param {google.cloud.dataplex.v1.ListAssetsResponse} message ListAssetsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAssetsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.assets = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.assets && message.assets.length) { + object.assets = []; + for (var j = 0; j < message.assets.length; ++j) + object.assets[j] = $root.google.cloud.dataplex.v1.Asset.toObject(message.assets[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListAssetsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @instance + * @returns {Object.} JSON object + */ + ListAssetsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListAssetsResponse; + })(); + + v1.ListAssetActionsRequest = (function() { + + /** + * Properties of a ListAssetActionsRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListAssetActionsRequest + * @property {string|null} [parent] ListAssetActionsRequest parent + * @property {number|null} [pageSize] ListAssetActionsRequest pageSize + * @property {string|null} [pageToken] ListAssetActionsRequest pageToken + */ + + /** + * Constructs a new ListAssetActionsRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListAssetActionsRequest. + * @implements IListAssetActionsRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListAssetActionsRequest=} [properties] Properties to set + */ + function ListAssetActionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAssetActionsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @instance + */ + ListAssetActionsRequest.prototype.parent = ""; + + /** + * ListAssetActionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @instance + */ + ListAssetActionsRequest.prototype.pageSize = 0; + + /** + * ListAssetActionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @instance + */ + ListAssetActionsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListAssetActionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListAssetActionsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest instance + */ + ListAssetActionsRequest.create = function create(properties) { + return new ListAssetActionsRequest(properties); + }; + + /** + * Encodes the specified ListAssetActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetActionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} message ListAssetActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAssetActionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListAssetActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetActionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} message ListAssetActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAssetActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAssetActionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAssetActionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListAssetActionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAssetActionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAssetActionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAssetActionsRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAssetActionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListAssetActionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest + */ + ListAssetActionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListAssetActionsRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListAssetActionsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListAssetActionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @static + * @param {google.cloud.dataplex.v1.ListAssetActionsRequest} message ListAssetActionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAssetActionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListAssetActionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListAssetActionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListAssetActionsRequest; + })(); + + v1.GetAssetRequest = (function() { + + /** + * Properties of a GetAssetRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetAssetRequest + * @property {string|null} [name] GetAssetRequest name + */ + + /** + * Constructs a new GetAssetRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetAssetRequest. + * @implements IGetAssetRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetAssetRequest=} [properties] Properties to set + */ + function GetAssetRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetAssetRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @instance + */ + GetAssetRequest.prototype.name = ""; + + /** + * Creates a new GetAssetRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @static + * @param {google.cloud.dataplex.v1.IGetAssetRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest instance + */ + GetAssetRequest.create = function create(properties) { + return new GetAssetRequest(properties); + }; + + /** + * Encodes the specified GetAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetAssetRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @static + * @param {google.cloud.dataplex.v1.IGetAssetRequest} message GetAssetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAssetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetAssetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @static + * @param {google.cloud.dataplex.v1.IGetAssetRequest} message GetAssetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetAssetRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAssetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetAssetRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetAssetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAssetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetAssetRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetAssetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetAssetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest + */ + GetAssetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetAssetRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetAssetRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetAssetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @static + * @param {google.cloud.dataplex.v1.GetAssetRequest} message GetAssetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetAssetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetAssetRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @instance + * @returns {Object.} JSON object + */ + GetAssetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetAssetRequest; + })(); + + v1.OperationMetadata = (function() { + + /** + * Properties of an OperationMetadata. + * @memberof google.cloud.dataplex.v1 + * @interface IOperationMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime + * @property {string|null} [target] OperationMetadata target + * @property {string|null} [verb] OperationMetadata verb + * @property {string|null} [statusMessage] OperationMetadata statusMessage + * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation + * @property {string|null} [apiVersion] OperationMetadata apiVersion + */ + + /** + * Constructs a new OperationMetadata. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata + * @constructor + * @param {google.cloud.dataplex.v1.IOperationMetadata=} [properties] Properties to set + */ + function OperationMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.createTime = null; + + /** + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.endTime = null; + + /** + * OperationMetadata target. + * @member {string} target + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.target = ""; + + /** + * OperationMetadata verb. + * @member {string} verb + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.verb = ""; + + /** + * OperationMetadata statusMessage. + * @member {string} statusMessage + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.statusMessage = ""; + + /** + * OperationMetadata requestedCancellation. + * @member {boolean} requestedCancellation + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.requestedCancellation = false; + + /** + * OperationMetadata apiVersion. + * @member {string} apiVersion + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.apiVersion = ""; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @static + * @param {google.cloud.dataplex.v1.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.OperationMetadata} OperationMetadata instance + */ + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); + }; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.dataplex.v1.OperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @static + * @param {google.cloud.dataplex.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); + if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); + if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); + if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.requestedCancellation); + if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); + return writer; + }; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.OperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @static + * @param {google.cloud.dataplex.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.OperationMetadata} OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.OperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 2: + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.target = reader.string(); + break; + case 4: + message.verb = reader.string(); + break; + case 5: + message.statusMessage = reader.string(); + break; + case 6: + message.requestedCancellation = reader.bool(); + break; + case 7: + message.apiVersion = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.OperationMetadata} OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationMetadata message. + * @function verify + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.target != null && message.hasOwnProperty("target")) + if (!$util.isString(message.target)) + return "target: string expected"; + if (message.verb != null && message.hasOwnProperty("verb")) + if (!$util.isString(message.verb)) + return "verb: string expected"; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + if (!$util.isString(message.statusMessage)) + return "statusMessage: string expected"; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + if (typeof message.requestedCancellation !== "boolean") + return "requestedCancellation: boolean expected"; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + if (!$util.isString(message.apiVersion)) + return "apiVersion: string expected"; + return null; + }; + + /** + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.OperationMetadata} OperationMetadata + */ + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.OperationMetadata) + return object; + var message = new $root.google.cloud.dataplex.v1.OperationMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.OperationMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.OperationMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.target != null) + message.target = String(object.target); + if (object.verb != null) + message.verb = String(object.verb); + if (object.statusMessage != null) + message.statusMessage = String(object.statusMessage); + if (object.requestedCancellation != null) + message.requestedCancellation = Boolean(object.requestedCancellation); + if (object.apiVersion != null) + message.apiVersion = String(object.apiVersion); + return message; + }; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @static + * @param {google.cloud.dataplex.v1.OperationMetadata} message OperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.target = ""; + object.verb = ""; + object.statusMessage = ""; + object.requestedCancellation = false; + object.apiVersion = ""; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = message.target; + if (message.verb != null && message.hasOwnProperty("verb")) + object.verb = message.verb; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + object.statusMessage = message.statusMessage; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + object.requestedCancellation = message.requestedCancellation; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + object.apiVersion = message.apiVersion; + return object; + }; + + /** + * Converts this OperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @instance + * @returns {Object.} JSON object + */ + OperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OperationMetadata; + })(); + + v1.CreateTaskRequest = (function() { + + /** + * Properties of a CreateTaskRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICreateTaskRequest + * @property {string|null} [parent] CreateTaskRequest parent + * @property {string|null} [taskId] CreateTaskRequest taskId + * @property {google.cloud.dataplex.v1.ITask|null} [task] CreateTaskRequest task + * @property {boolean|null} [validateOnly] CreateTaskRequest validateOnly + */ + + /** + * Constructs a new CreateTaskRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CreateTaskRequest. + * @implements ICreateTaskRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICreateTaskRequest=} [properties] Properties to set + */ + function CreateTaskRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateTaskRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @instance + */ + CreateTaskRequest.prototype.parent = ""; + + /** + * CreateTaskRequest taskId. + * @member {string} taskId + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @instance + */ + CreateTaskRequest.prototype.taskId = ""; + + /** + * CreateTaskRequest task. + * @member {google.cloud.dataplex.v1.ITask|null|undefined} task + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @instance + */ + CreateTaskRequest.prototype.task = null; + + /** + * CreateTaskRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @instance + */ + CreateTaskRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateTaskRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateTaskRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest instance + */ + CreateTaskRequest.create = function create(properties) { + return new CreateTaskRequest(properties); + }; + + /** + * Encodes the specified CreateTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateTaskRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateTaskRequest} message CreateTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTaskRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.taskId != null && Object.hasOwnProperty.call(message, "taskId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.taskId); + if (message.task != null && Object.hasOwnProperty.call(message, "task")) + $root.google.cloud.dataplex.v1.Task.encode(message.task, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreateTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateTaskRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateTaskRequest} message CreateTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateTaskRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTaskRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateTaskRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.taskId = reader.string(); + break; + case 3: + message.task = $root.google.cloud.dataplex.v1.Task.decode(reader, reader.uint32()); + break; + case 4: + message.validateOnly = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateTaskRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTaskRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateTaskRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateTaskRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.taskId != null && message.hasOwnProperty("taskId")) + if (!$util.isString(message.taskId)) + return "taskId: string expected"; + if (message.task != null && message.hasOwnProperty("task")) { + var error = $root.google.cloud.dataplex.v1.Task.verify(message.task); + if (error) + return "task." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateTaskRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest + */ + CreateTaskRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateTaskRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.CreateTaskRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.taskId != null) + message.taskId = String(object.taskId); + if (object.task != null) { + if (typeof object.task !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateTaskRequest.task: object expected"); + message.task = $root.google.cloud.dataplex.v1.Task.fromObject(object.task); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateTaskRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @static + * @param {google.cloud.dataplex.v1.CreateTaskRequest} message CreateTaskRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateTaskRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.taskId = ""; + object.task = null; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.taskId != null && message.hasOwnProperty("taskId")) + object.taskId = message.taskId; + if (message.task != null && message.hasOwnProperty("task")) + object.task = $root.google.cloud.dataplex.v1.Task.toObject(message.task, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateTaskRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @instance + * @returns {Object.} JSON object + */ + CreateTaskRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateTaskRequest; + })(); + + v1.UpdateTaskRequest = (function() { + + /** + * Properties of an UpdateTaskRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IUpdateTaskRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTaskRequest updateMask + * @property {google.cloud.dataplex.v1.ITask|null} [task] UpdateTaskRequest task + * @property {boolean|null} [validateOnly] UpdateTaskRequest validateOnly + */ + + /** + * Constructs a new UpdateTaskRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an UpdateTaskRequest. + * @implements IUpdateTaskRequest + * @constructor + * @param {google.cloud.dataplex.v1.IUpdateTaskRequest=} [properties] Properties to set + */ + function UpdateTaskRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateTaskRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @instance + */ + UpdateTaskRequest.prototype.updateMask = null; + + /** + * UpdateTaskRequest task. + * @member {google.cloud.dataplex.v1.ITask|null|undefined} task + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @instance + */ + UpdateTaskRequest.prototype.task = null; + + /** + * UpdateTaskRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @instance + */ + UpdateTaskRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateTaskRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateTaskRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest instance + */ + UpdateTaskRequest.create = function create(properties) { + return new UpdateTaskRequest(properties); + }; + + /** + * Encodes the specified UpdateTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateTaskRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} message UpdateTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateTaskRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.task != null && Object.hasOwnProperty.call(message, "task")) + $root.google.cloud.dataplex.v1.Task.encode(message.task, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified UpdateTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateTaskRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} message UpdateTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateTaskRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateTaskRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateTaskRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 2: + message.task = $root.google.cloud.dataplex.v1.Task.decode(reader, reader.uint32()); + break; + case 3: + message.validateOnly = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateTaskRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateTaskRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateTaskRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateTaskRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.task != null && message.hasOwnProperty("task")) { + var error = $root.google.cloud.dataplex.v1.Task.verify(message.task); + if (error) + return "task." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates an UpdateTaskRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest + */ + UpdateTaskRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateTaskRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.UpdateTaskRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateTaskRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.task != null) { + if (typeof object.task !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateTaskRequest.task: object expected"); + message.task = $root.google.cloud.dataplex.v1.Task.fromObject(object.task); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from an UpdateTaskRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @static + * @param {google.cloud.dataplex.v1.UpdateTaskRequest} message UpdateTaskRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateTaskRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.task = null; + object.validateOnly = false; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.task != null && message.hasOwnProperty("task")) + object.task = $root.google.cloud.dataplex.v1.Task.toObject(message.task, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this UpdateTaskRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateTaskRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateTaskRequest; + })(); + + v1.DeleteTaskRequest = (function() { + + /** + * Properties of a DeleteTaskRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IDeleteTaskRequest + * @property {string|null} [name] DeleteTaskRequest name + */ + + /** + * Constructs a new DeleteTaskRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DeleteTaskRequest. + * @implements IDeleteTaskRequest + * @constructor + * @param {google.cloud.dataplex.v1.IDeleteTaskRequest=} [properties] Properties to set + */ + function DeleteTaskRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteTaskRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @instance + */ + DeleteTaskRequest.prototype.name = ""; + + /** + * Creates a new DeleteTaskRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteTaskRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest instance + */ + DeleteTaskRequest.create = function create(properties) { + return new DeleteTaskRequest(properties); + }; + + /** + * Encodes the specified DeleteTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteTaskRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} message DeleteTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteTaskRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteTaskRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} message DeleteTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteTaskRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteTaskRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteTaskRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteTaskRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteTaskRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteTaskRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteTaskRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteTaskRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest + */ + DeleteTaskRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteTaskRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.DeleteTaskRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteTaskRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @static + * @param {google.cloud.dataplex.v1.DeleteTaskRequest} message DeleteTaskRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteTaskRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteTaskRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteTaskRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteTaskRequest; + })(); + + v1.ListTasksRequest = (function() { + + /** + * Properties of a ListTasksRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListTasksRequest + * @property {string|null} [parent] ListTasksRequest parent + * @property {number|null} [pageSize] ListTasksRequest pageSize + * @property {string|null} [pageToken] ListTasksRequest pageToken + * @property {string|null} [filter] ListTasksRequest filter + * @property {string|null} [orderBy] ListTasksRequest orderBy + */ + + /** + * Constructs a new ListTasksRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListTasksRequest. + * @implements IListTasksRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListTasksRequest=} [properties] Properties to set + */ + function ListTasksRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListTasksRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @instance + */ + ListTasksRequest.prototype.parent = ""; + + /** + * ListTasksRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @instance + */ + ListTasksRequest.prototype.pageSize = 0; + + /** + * ListTasksRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @instance + */ + ListTasksRequest.prototype.pageToken = ""; + + /** + * ListTasksRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @instance + */ + ListTasksRequest.prototype.filter = ""; + + /** + * ListTasksRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @instance + */ + ListTasksRequest.prototype.orderBy = ""; + + /** + * Creates a new ListTasksRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @static + * @param {google.cloud.dataplex.v1.IListTasksRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest instance + */ + ListTasksRequest.create = function create(properties) { + return new ListTasksRequest(properties); + }; + + /** + * Encodes the specified ListTasksRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @static + * @param {google.cloud.dataplex.v1.IListTasksRequest} message ListTasksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTasksRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListTasksRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @static + * @param {google.cloud.dataplex.v1.IListTasksRequest} message ListTasksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTasksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListTasksRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTasksRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListTasksRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 4: + message.filter = reader.string(); + break; + case 5: + message.orderBy = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListTasksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTasksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListTasksRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListTasksRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListTasksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest + */ + ListTasksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListTasksRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListTasksRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListTasksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @static + * @param {google.cloud.dataplex.v1.ListTasksRequest} message ListTasksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListTasksRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListTasksRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @instance + * @returns {Object.} JSON object + */ + ListTasksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListTasksRequest; + })(); + + v1.ListTasksResponse = (function() { + + /** + * Properties of a ListTasksResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListTasksResponse + * @property {Array.|null} [tasks] ListTasksResponse tasks + * @property {string|null} [nextPageToken] ListTasksResponse nextPageToken + * @property {Array.|null} [unreachableLocations] ListTasksResponse unreachableLocations + */ + + /** + * Constructs a new ListTasksResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListTasksResponse. + * @implements IListTasksResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListTasksResponse=} [properties] Properties to set + */ + function ListTasksResponse(properties) { + this.tasks = []; + this.unreachableLocations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListTasksResponse tasks. + * @member {Array.} tasks + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @instance + */ + ListTasksResponse.prototype.tasks = $util.emptyArray; + + /** + * ListTasksResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @instance + */ + ListTasksResponse.prototype.nextPageToken = ""; + + /** + * ListTasksResponse unreachableLocations. + * @member {Array.} unreachableLocations + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @instance + */ + ListTasksResponse.prototype.unreachableLocations = $util.emptyArray; + + /** + * Creates a new ListTasksResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @static + * @param {google.cloud.dataplex.v1.IListTasksResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse instance + */ + ListTasksResponse.create = function create(properties) { + return new ListTasksResponse(properties); + }; + + /** + * Encodes the specified ListTasksResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @static + * @param {google.cloud.dataplex.v1.IListTasksResponse} message ListTasksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTasksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tasks != null && message.tasks.length) + for (var i = 0; i < message.tasks.length; ++i) + $root.google.cloud.dataplex.v1.Task.encode(message.tasks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachableLocations != null && message.unreachableLocations.length) + for (var i = 0; i < message.unreachableLocations.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachableLocations[i]); + return writer; + }; + + /** + * Encodes the specified ListTasksResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @static + * @param {google.cloud.dataplex.v1.IListTasksResponse} message ListTasksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTasksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListTasksResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTasksResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListTasksResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.tasks && message.tasks.length)) + message.tasks = []; + message.tasks.push($root.google.cloud.dataplex.v1.Task.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + case 3: + if (!(message.unreachableLocations && message.unreachableLocations.length)) + message.unreachableLocations = []; + message.unreachableLocations.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListTasksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTasksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListTasksResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListTasksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tasks != null && message.hasOwnProperty("tasks")) { + if (!Array.isArray(message.tasks)) + return "tasks: array expected"; + for (var i = 0; i < message.tasks.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Task.verify(message.tasks[i]); + if (error) + return "tasks." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachableLocations != null && message.hasOwnProperty("unreachableLocations")) { + if (!Array.isArray(message.unreachableLocations)) + return "unreachableLocations: array expected"; + for (var i = 0; i < message.unreachableLocations.length; ++i) + if (!$util.isString(message.unreachableLocations[i])) + return "unreachableLocations: string[] expected"; + } + return null; + }; + + /** + * Creates a ListTasksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse + */ + ListTasksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListTasksResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListTasksResponse(); + if (object.tasks) { + if (!Array.isArray(object.tasks)) + throw TypeError(".google.cloud.dataplex.v1.ListTasksResponse.tasks: array expected"); + message.tasks = []; + for (var i = 0; i < object.tasks.length; ++i) { + if (typeof object.tasks[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListTasksResponse.tasks: object expected"); + message.tasks[i] = $root.google.cloud.dataplex.v1.Task.fromObject(object.tasks[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachableLocations) { + if (!Array.isArray(object.unreachableLocations)) + throw TypeError(".google.cloud.dataplex.v1.ListTasksResponse.unreachableLocations: array expected"); + message.unreachableLocations = []; + for (var i = 0; i < object.unreachableLocations.length; ++i) + message.unreachableLocations[i] = String(object.unreachableLocations[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListTasksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @static + * @param {google.cloud.dataplex.v1.ListTasksResponse} message ListTasksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListTasksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.tasks = []; + object.unreachableLocations = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.tasks && message.tasks.length) { + object.tasks = []; + for (var j = 0; j < message.tasks.length; ++j) + object.tasks[j] = $root.google.cloud.dataplex.v1.Task.toObject(message.tasks[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachableLocations && message.unreachableLocations.length) { + object.unreachableLocations = []; + for (var j = 0; j < message.unreachableLocations.length; ++j) + object.unreachableLocations[j] = message.unreachableLocations[j]; + } + return object; + }; + + /** + * Converts this ListTasksResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @instance + * @returns {Object.} JSON object + */ + ListTasksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListTasksResponse; + })(); + + v1.GetTaskRequest = (function() { + + /** + * Properties of a GetTaskRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetTaskRequest + * @property {string|null} [name] GetTaskRequest name + */ + + /** + * Constructs a new GetTaskRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetTaskRequest. + * @implements IGetTaskRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetTaskRequest=} [properties] Properties to set + */ + function GetTaskRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetTaskRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @instance + */ + GetTaskRequest.prototype.name = ""; + + /** + * Creates a new GetTaskRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @static + * @param {google.cloud.dataplex.v1.IGetTaskRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest instance + */ + GetTaskRequest.create = function create(properties) { + return new GetTaskRequest(properties); + }; + + /** + * Encodes the specified GetTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetTaskRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @static + * @param {google.cloud.dataplex.v1.IGetTaskRequest} message GetTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTaskRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetTaskRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @static + * @param {google.cloud.dataplex.v1.IGetTaskRequest} message GetTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetTaskRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTaskRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetTaskRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetTaskRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTaskRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetTaskRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetTaskRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetTaskRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest + */ + GetTaskRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetTaskRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetTaskRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetTaskRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @static + * @param {google.cloud.dataplex.v1.GetTaskRequest} message GetTaskRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetTaskRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetTaskRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @instance + * @returns {Object.} JSON object + */ + GetTaskRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetTaskRequest; + })(); + + v1.GetJobRequest = (function() { + + /** + * Properties of a GetJobRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetJobRequest + * @property {string|null} [name] GetJobRequest name + */ + + /** + * Constructs a new GetJobRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetJobRequest. + * @implements IGetJobRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetJobRequest=} [properties] Properties to set + */ + function GetJobRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetJobRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @instance + */ + GetJobRequest.prototype.name = ""; + + /** + * Creates a new GetJobRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @static + * @param {google.cloud.dataplex.v1.IGetJobRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest instance + */ + GetJobRequest.create = function create(properties) { + return new GetJobRequest(properties); + }; + + /** + * Encodes the specified GetJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetJobRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @static + * @param {google.cloud.dataplex.v1.IGetJobRequest} message GetJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetJobRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetJobRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @static + * @param {google.cloud.dataplex.v1.IGetJobRequest} message GetJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetJobRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetJobRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetJobRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetJobRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetJobRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetJobRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest + */ + GetJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetJobRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetJobRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetJobRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @static + * @param {google.cloud.dataplex.v1.GetJobRequest} message GetJobRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetJobRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetJobRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @instance + * @returns {Object.} JSON object + */ + GetJobRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetJobRequest; + })(); + + v1.ListJobsRequest = (function() { + + /** + * Properties of a ListJobsRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListJobsRequest + * @property {string|null} [parent] ListJobsRequest parent + * @property {number|null} [pageSize] ListJobsRequest pageSize + * @property {string|null} [pageToken] ListJobsRequest pageToken + */ + + /** + * Constructs a new ListJobsRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListJobsRequest. + * @implements IListJobsRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListJobsRequest=} [properties] Properties to set + */ + function ListJobsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListJobsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @instance + */ + ListJobsRequest.prototype.parent = ""; + + /** + * ListJobsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @instance + */ + ListJobsRequest.prototype.pageSize = 0; + + /** + * ListJobsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @instance + */ + ListJobsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListJobsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {google.cloud.dataplex.v1.IListJobsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest instance + */ + ListJobsRequest.create = function create(properties) { + return new ListJobsRequest(properties); + }; + + /** + * Encodes the specified ListJobsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {google.cloud.dataplex.v1.IListJobsRequest} message ListJobsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListJobsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListJobsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {google.cloud.dataplex.v1.IListJobsRequest} message ListJobsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListJobsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListJobsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListJobsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListJobsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListJobsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListJobsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListJobsRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListJobsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListJobsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest + */ + ListJobsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListJobsRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListJobsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListJobsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {google.cloud.dataplex.v1.ListJobsRequest} message ListJobsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListJobsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListJobsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @instance + * @returns {Object.} JSON object + */ + ListJobsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListJobsRequest; + })(); + + v1.ListJobsResponse = (function() { + + /** + * Properties of a ListJobsResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListJobsResponse + * @property {Array.|null} [jobs] ListJobsResponse jobs + * @property {string|null} [nextPageToken] ListJobsResponse nextPageToken + */ + + /** + * Constructs a new ListJobsResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListJobsResponse. + * @implements IListJobsResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListJobsResponse=} [properties] Properties to set + */ + function ListJobsResponse(properties) { + this.jobs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListJobsResponse jobs. + * @member {Array.} jobs + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @instance + */ + ListJobsResponse.prototype.jobs = $util.emptyArray; + + /** + * ListJobsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @instance + */ + ListJobsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListJobsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @static + * @param {google.cloud.dataplex.v1.IListJobsResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse instance + */ + ListJobsResponse.create = function create(properties) { + return new ListJobsResponse(properties); + }; + + /** + * Encodes the specified ListJobsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @static + * @param {google.cloud.dataplex.v1.IListJobsResponse} message ListJobsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListJobsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.jobs != null && message.jobs.length) + for (var i = 0; i < message.jobs.length; ++i) + $root.google.cloud.dataplex.v1.Job.encode(message.jobs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListJobsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @static + * @param {google.cloud.dataplex.v1.IListJobsResponse} message ListJobsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListJobsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListJobsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListJobsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListJobsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.jobs && message.jobs.length)) + message.jobs = []; + message.jobs.push($root.google.cloud.dataplex.v1.Job.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListJobsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListJobsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListJobsResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListJobsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.jobs != null && message.hasOwnProperty("jobs")) { + if (!Array.isArray(message.jobs)) + return "jobs: array expected"; + for (var i = 0; i < message.jobs.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Job.verify(message.jobs[i]); + if (error) + return "jobs." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListJobsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse + */ + ListJobsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListJobsResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListJobsResponse(); + if (object.jobs) { + if (!Array.isArray(object.jobs)) + throw TypeError(".google.cloud.dataplex.v1.ListJobsResponse.jobs: array expected"); + message.jobs = []; + for (var i = 0; i < object.jobs.length; ++i) { + if (typeof object.jobs[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListJobsResponse.jobs: object expected"); + message.jobs[i] = $root.google.cloud.dataplex.v1.Job.fromObject(object.jobs[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListJobsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @static + * @param {google.cloud.dataplex.v1.ListJobsResponse} message ListJobsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListJobsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.jobs = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.jobs && message.jobs.length) { + object.jobs = []; + for (var j = 0; j < message.jobs.length; ++j) + object.jobs[j] = $root.google.cloud.dataplex.v1.Job.toObject(message.jobs[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListJobsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @instance + * @returns {Object.} JSON object + */ + ListJobsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListJobsResponse; + })(); + + v1.CancelJobRequest = (function() { + + /** + * Properties of a CancelJobRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICancelJobRequest + * @property {string|null} [name] CancelJobRequest name + */ + + /** + * Constructs a new CancelJobRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CancelJobRequest. + * @implements ICancelJobRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICancelJobRequest=} [properties] Properties to set + */ + function CancelJobRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelJobRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @instance + */ + CancelJobRequest.prototype.name = ""; + + /** + * Creates a new CancelJobRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {google.cloud.dataplex.v1.ICancelJobRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest instance + */ + CancelJobRequest.create = function create(properties) { + return new CancelJobRequest(properties); + }; + + /** + * Encodes the specified CancelJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CancelJobRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {google.cloud.dataplex.v1.ICancelJobRequest} message CancelJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelJobRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified CancelJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CancelJobRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {google.cloud.dataplex.v1.ICancelJobRequest} message CancelJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelJobRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelJobRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CancelJobRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CancelJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelJobRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelJobRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a CancelJobRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest + */ + CancelJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CancelJobRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.CancelJobRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelJobRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {google.cloud.dataplex.v1.CancelJobRequest} message CancelJobRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelJobRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this CancelJobRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @instance + * @returns {Object.} JSON object + */ + CancelJobRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CancelJobRequest; + })(); + + v1.Task = (function() { + + /** + * Properties of a Task. + * @memberof google.cloud.dataplex.v1 + * @interface ITask + * @property {string|null} [name] Task name + * @property {string|null} [uid] Task uid + * @property {google.protobuf.ITimestamp|null} [createTime] Task createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Task updateTime + * @property {string|null} [description] Task description + * @property {string|null} [displayName] Task displayName + * @property {google.cloud.dataplex.v1.State|null} [state] Task state + * @property {Object.|null} [labels] Task labels + * @property {google.cloud.dataplex.v1.Task.ITriggerSpec|null} [triggerSpec] Task triggerSpec + * @property {google.cloud.dataplex.v1.Task.IExecutionSpec|null} [executionSpec] Task executionSpec + * @property {google.cloud.dataplex.v1.Task.ISparkTaskConfig|null} [spark] Task spark + */ + + /** + * Constructs a new Task. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a Task. + * @implements ITask + * @constructor + * @param {google.cloud.dataplex.v1.ITask=} [properties] Properties to set + */ + function Task(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Task name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.name = ""; + + /** + * Task uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.uid = ""; + + /** + * Task createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.createTime = null; + + /** + * Task updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.updateTime = null; + + /** + * Task description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.description = ""; + + /** + * Task displayName. + * @member {string} displayName + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.displayName = ""; + + /** + * Task state. + * @member {google.cloud.dataplex.v1.State} state + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.state = 0; + + /** + * Task labels. + * @member {Object.} labels + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.labels = $util.emptyObject; + + /** + * Task triggerSpec. + * @member {google.cloud.dataplex.v1.Task.ITriggerSpec|null|undefined} triggerSpec + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.triggerSpec = null; + + /** + * Task executionSpec. + * @member {google.cloud.dataplex.v1.Task.IExecutionSpec|null|undefined} executionSpec + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.executionSpec = null; + + /** + * Task spark. + * @member {google.cloud.dataplex.v1.Task.ISparkTaskConfig|null|undefined} spark + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.spark = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Task config. + * @member {"spark"|undefined} config + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Object.defineProperty(Task.prototype, "config", { + get: $util.oneOfGetter($oneOfFields = ["spark"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Task instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task + * @static + * @param {google.cloud.dataplex.v1.ITask=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task} Task instance + */ + Task.create = function create(properties) { + return new Task(properties); + }; + + /** + * Encodes the specified Task message. Does not implicitly {@link google.cloud.dataplex.v1.Task.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task + * @static + * @param {google.cloud.dataplex.v1.ITask} message Task message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Task.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.triggerSpec != null && Object.hasOwnProperty.call(message, "triggerSpec")) + $root.google.cloud.dataplex.v1.Task.TriggerSpec.encode(message.triggerSpec, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + if (message.executionSpec != null && Object.hasOwnProperty.call(message, "executionSpec")) + $root.google.cloud.dataplex.v1.Task.ExecutionSpec.encode(message.executionSpec, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.spark != null && Object.hasOwnProperty.call(message, "spark")) + $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.encode(message.spark, writer.uint32(/* id 300, wireType 2 =*/2402).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Task message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task + * @static + * @param {google.cloud.dataplex.v1.ITask} message Task message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Task.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Task message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task} Task + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Task.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.uid = reader.string(); + break; + case 3: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.description = reader.string(); + break; + case 6: + message.displayName = reader.string(); + break; + case 7: + message.state = reader.int32(); + break; + case 8: + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + case 100: + message.triggerSpec = $root.google.cloud.dataplex.v1.Task.TriggerSpec.decode(reader, reader.uint32()); + break; + case 101: + message.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.decode(reader, reader.uint32()); + break; + case 300: + message.spark = $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Task message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task} Task + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Task.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Task message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Task.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.triggerSpec != null && message.hasOwnProperty("triggerSpec")) { + var error = $root.google.cloud.dataplex.v1.Task.TriggerSpec.verify(message.triggerSpec); + if (error) + return "triggerSpec." + error; + } + if (message.executionSpec != null && message.hasOwnProperty("executionSpec")) { + var error = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.verify(message.executionSpec); + if (error) + return "executionSpec." + error; + } + if (message.spark != null && message.hasOwnProperty("spark")) { + properties.config = 1; + { + var error = $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.verify(message.spark); + if (error) + return "spark." + error; + } + } + return null; + }; + + /** + * Creates a Task message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task} Task + */ + Task.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task) + return object; + var message = new $root.google.cloud.dataplex.v1.Task(); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.description != null) + message.description = String(object.description); + if (object.displayName != null) + message.displayName = String(object.displayName); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ACTIVE": + case 1: + message.state = 1; + break; + case "CREATING": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "ACTION_REQUIRED": + case 4: + message.state = 4; + break; + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.triggerSpec != null) { + if (typeof object.triggerSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.triggerSpec: object expected"); + message.triggerSpec = $root.google.cloud.dataplex.v1.Task.TriggerSpec.fromObject(object.triggerSpec); + } + if (object.executionSpec != null) { + if (typeof object.executionSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.executionSpec: object expected"); + message.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.fromObject(object.executionSpec); + } + if (object.spark != null) { + if (typeof object.spark !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.spark: object expected"); + message.spark = $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.fromObject(object.spark); + } + return message; + }; + + /** + * Creates a plain object from a Task message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task + * @static + * @param {google.cloud.dataplex.v1.Task} message Task + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Task.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.uid = ""; + object.createTime = null; + object.updateTime = null; + object.description = ""; + object.displayName = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.triggerSpec = null; + object.executionSpec = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.State[message.state] : message.state; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.triggerSpec != null && message.hasOwnProperty("triggerSpec")) + object.triggerSpec = $root.google.cloud.dataplex.v1.Task.TriggerSpec.toObject(message.triggerSpec, options); + if (message.executionSpec != null && message.hasOwnProperty("executionSpec")) + object.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.toObject(message.executionSpec, options); + if (message.spark != null && message.hasOwnProperty("spark")) { + object.spark = $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.toObject(message.spark, options); + if (options.oneofs) + object.config = "spark"; + } + return object; + }; + + /** + * Converts this Task to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task + * @instance + * @returns {Object.} JSON object + */ + Task.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Task.InfrastructureSpec = (function() { + + /** + * Properties of an InfrastructureSpec. + * @memberof google.cloud.dataplex.v1.Task + * @interface IInfrastructureSpec + * @property {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources|null} [batch] InfrastructureSpec batch + * @property {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime|null} [containerImage] InfrastructureSpec containerImage + * @property {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork|null} [vpcNetwork] InfrastructureSpec vpcNetwork + */ + + /** + * Constructs a new InfrastructureSpec. + * @memberof google.cloud.dataplex.v1.Task + * @classdesc Represents an InfrastructureSpec. + * @implements IInfrastructureSpec + * @constructor + * @param {google.cloud.dataplex.v1.Task.IInfrastructureSpec=} [properties] Properties to set + */ + function InfrastructureSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InfrastructureSpec batch. + * @member {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources|null|undefined} batch + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @instance + */ + InfrastructureSpec.prototype.batch = null; + + /** + * InfrastructureSpec containerImage. + * @member {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime|null|undefined} containerImage + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @instance + */ + InfrastructureSpec.prototype.containerImage = null; + + /** + * InfrastructureSpec vpcNetwork. + * @member {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork|null|undefined} vpcNetwork + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @instance + */ + InfrastructureSpec.prototype.vpcNetwork = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * InfrastructureSpec resources. + * @member {"batch"|undefined} resources + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @instance + */ + Object.defineProperty(InfrastructureSpec.prototype, "resources", { + get: $util.oneOfGetter($oneOfFields = ["batch"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * InfrastructureSpec runtime. + * @member {"containerImage"|undefined} runtime + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @instance + */ + Object.defineProperty(InfrastructureSpec.prototype, "runtime", { + get: $util.oneOfGetter($oneOfFields = ["containerImage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * InfrastructureSpec network. + * @member {"vpcNetwork"|undefined} network + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @instance + */ + Object.defineProperty(InfrastructureSpec.prototype, "network", { + get: $util.oneOfGetter($oneOfFields = ["vpcNetwork"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new InfrastructureSpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {google.cloud.dataplex.v1.Task.IInfrastructureSpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec} InfrastructureSpec instance + */ + InfrastructureSpec.create = function create(properties) { + return new InfrastructureSpec(properties); + }; + + /** + * Encodes the specified InfrastructureSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {google.cloud.dataplex.v1.Task.IInfrastructureSpec} message InfrastructureSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InfrastructureSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.batch != null && Object.hasOwnProperty.call(message, "batch")) + $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.encode(message.batch, writer.uint32(/* id 52, wireType 2 =*/418).fork()).ldelim(); + if (message.containerImage != null && Object.hasOwnProperty.call(message, "containerImage")) + $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.encode(message.containerImage, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.vpcNetwork != null && Object.hasOwnProperty.call(message, "vpcNetwork")) + $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.encode(message.vpcNetwork, writer.uint32(/* id 150, wireType 2 =*/1202).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified InfrastructureSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {google.cloud.dataplex.v1.Task.IInfrastructureSpec} message InfrastructureSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InfrastructureSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InfrastructureSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec} InfrastructureSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InfrastructureSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 52: + message.batch = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.decode(reader, reader.uint32()); + break; + case 101: + message.containerImage = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.decode(reader, reader.uint32()); + break; + case 150: + message.vpcNetwork = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InfrastructureSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec} InfrastructureSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InfrastructureSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InfrastructureSpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InfrastructureSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.batch != null && message.hasOwnProperty("batch")) { + properties.resources = 1; + { + var error = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.verify(message.batch); + if (error) + return "batch." + error; + } + } + if (message.containerImage != null && message.hasOwnProperty("containerImage")) { + properties.runtime = 1; + { + var error = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.verify(message.containerImage); + if (error) + return "containerImage." + error; + } + } + if (message.vpcNetwork != null && message.hasOwnProperty("vpcNetwork")) { + properties.network = 1; + { + var error = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.verify(message.vpcNetwork); + if (error) + return "vpcNetwork." + error; + } + } + return null; + }; + + /** + * Creates an InfrastructureSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec} InfrastructureSpec + */ + InfrastructureSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.InfrastructureSpec) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec(); + if (object.batch != null) { + if (typeof object.batch !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.batch: object expected"); + message.batch = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.fromObject(object.batch); + } + if (object.containerImage != null) { + if (typeof object.containerImage !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.containerImage: object expected"); + message.containerImage = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.fromObject(object.containerImage); + } + if (object.vpcNetwork != null) { + if (typeof object.vpcNetwork !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.vpcNetwork: object expected"); + message.vpcNetwork = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.fromObject(object.vpcNetwork); + } + return message; + }; + + /** + * Creates a plain object from an InfrastructureSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec} message InfrastructureSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InfrastructureSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.batch != null && message.hasOwnProperty("batch")) { + object.batch = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.toObject(message.batch, options); + if (options.oneofs) + object.resources = "batch"; + } + if (message.containerImage != null && message.hasOwnProperty("containerImage")) { + object.containerImage = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.toObject(message.containerImage, options); + if (options.oneofs) + object.runtime = "containerImage"; + } + if (message.vpcNetwork != null && message.hasOwnProperty("vpcNetwork")) { + object.vpcNetwork = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.toObject(message.vpcNetwork, options); + if (options.oneofs) + object.network = "vpcNetwork"; + } + return object; + }; + + /** + * Converts this InfrastructureSpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @instance + * @returns {Object.} JSON object + */ + InfrastructureSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + InfrastructureSpec.BatchComputeResources = (function() { + + /** + * Properties of a BatchComputeResources. + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @interface IBatchComputeResources + * @property {number|null} [executorsCount] BatchComputeResources executorsCount + * @property {number|null} [maxExecutorsCount] BatchComputeResources maxExecutorsCount + */ + + /** + * Constructs a new BatchComputeResources. + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @classdesc Represents a BatchComputeResources. + * @implements IBatchComputeResources + * @constructor + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources=} [properties] Properties to set + */ + function BatchComputeResources(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BatchComputeResources executorsCount. + * @member {number} executorsCount + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @instance + */ + BatchComputeResources.prototype.executorsCount = 0; + + /** + * BatchComputeResources maxExecutorsCount. + * @member {number} maxExecutorsCount + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @instance + */ + BatchComputeResources.prototype.maxExecutorsCount = 0; + + /** + * Creates a new BatchComputeResources instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} BatchComputeResources instance + */ + BatchComputeResources.create = function create(properties) { + return new BatchComputeResources(properties); + }; + + /** + * Encodes the specified BatchComputeResources message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources} message BatchComputeResources message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchComputeResources.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.executorsCount != null && Object.hasOwnProperty.call(message, "executorsCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.executorsCount); + if (message.maxExecutorsCount != null && Object.hasOwnProperty.call(message, "maxExecutorsCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxExecutorsCount); + return writer; + }; + + /** + * Encodes the specified BatchComputeResources message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources} message BatchComputeResources message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchComputeResources.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchComputeResources message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} BatchComputeResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchComputeResources.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.executorsCount = reader.int32(); + break; + case 2: + message.maxExecutorsCount = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BatchComputeResources message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} BatchComputeResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchComputeResources.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchComputeResources message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchComputeResources.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.executorsCount != null && message.hasOwnProperty("executorsCount")) + if (!$util.isInteger(message.executorsCount)) + return "executorsCount: integer expected"; + if (message.maxExecutorsCount != null && message.hasOwnProperty("maxExecutorsCount")) + if (!$util.isInteger(message.maxExecutorsCount)) + return "maxExecutorsCount: integer expected"; + return null; + }; + + /** + * Creates a BatchComputeResources message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} BatchComputeResources + */ + BatchComputeResources.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources(); + if (object.executorsCount != null) + message.executorsCount = object.executorsCount | 0; + if (object.maxExecutorsCount != null) + message.maxExecutorsCount = object.maxExecutorsCount | 0; + return message; + }; + + /** + * Creates a plain object from a BatchComputeResources message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} message BatchComputeResources + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchComputeResources.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.executorsCount = 0; + object.maxExecutorsCount = 0; + } + if (message.executorsCount != null && message.hasOwnProperty("executorsCount")) + object.executorsCount = message.executorsCount; + if (message.maxExecutorsCount != null && message.hasOwnProperty("maxExecutorsCount")) + object.maxExecutorsCount = message.maxExecutorsCount; + return object; + }; + + /** + * Converts this BatchComputeResources to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @instance + * @returns {Object.} JSON object + */ + BatchComputeResources.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BatchComputeResources; + })(); + + InfrastructureSpec.ContainerImageRuntime = (function() { + + /** + * Properties of a ContainerImageRuntime. + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @interface IContainerImageRuntime + * @property {Array.|null} [javaJars] ContainerImageRuntime javaJars + * @property {Array.|null} [pythonPackages] ContainerImageRuntime pythonPackages + * @property {Object.|null} [properties] ContainerImageRuntime properties + */ + + /** + * Constructs a new ContainerImageRuntime. + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @classdesc Represents a ContainerImageRuntime. + * @implements IContainerImageRuntime + * @constructor + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime=} [properties] Properties to set + */ + function ContainerImageRuntime(properties) { + this.javaJars = []; + this.pythonPackages = []; + this.properties = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ContainerImageRuntime javaJars. + * @member {Array.} javaJars + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @instance + */ + ContainerImageRuntime.prototype.javaJars = $util.emptyArray; + + /** + * ContainerImageRuntime pythonPackages. + * @member {Array.} pythonPackages + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @instance + */ + ContainerImageRuntime.prototype.pythonPackages = $util.emptyArray; + + /** + * ContainerImageRuntime properties. + * @member {Object.} properties + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @instance + */ + ContainerImageRuntime.prototype.properties = $util.emptyObject; + + /** + * Creates a new ContainerImageRuntime instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} ContainerImageRuntime instance + */ + ContainerImageRuntime.create = function create(properties) { + return new ContainerImageRuntime(properties); + }; + + /** + * Encodes the specified ContainerImageRuntime message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime} message ContainerImageRuntime message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContainerImageRuntime.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaJars != null && message.javaJars.length) + for (var i = 0; i < message.javaJars.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.javaJars[i]); + if (message.pythonPackages != null && message.pythonPackages.length) + for (var i = 0; i < message.pythonPackages.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pythonPackages[i]); + if (message.properties != null && Object.hasOwnProperty.call(message, "properties")) + for (var keys = Object.keys(message.properties), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.properties[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified ContainerImageRuntime message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime} message ContainerImageRuntime message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContainerImageRuntime.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ContainerImageRuntime message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} ContainerImageRuntime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContainerImageRuntime.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + if (!(message.javaJars && message.javaJars.length)) + message.javaJars = []; + message.javaJars.push(reader.string()); + break; + case 3: + if (!(message.pythonPackages && message.pythonPackages.length)) + message.pythonPackages = []; + message.pythonPackages.push(reader.string()); + break; + case 4: + if (message.properties === $util.emptyObject) + message.properties = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.properties[key] = value; + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ContainerImageRuntime message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} ContainerImageRuntime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContainerImageRuntime.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ContainerImageRuntime message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ContainerImageRuntime.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaJars != null && message.hasOwnProperty("javaJars")) { + if (!Array.isArray(message.javaJars)) + return "javaJars: array expected"; + for (var i = 0; i < message.javaJars.length; ++i) + if (!$util.isString(message.javaJars[i])) + return "javaJars: string[] expected"; + } + if (message.pythonPackages != null && message.hasOwnProperty("pythonPackages")) { + if (!Array.isArray(message.pythonPackages)) + return "pythonPackages: array expected"; + for (var i = 0; i < message.pythonPackages.length; ++i) + if (!$util.isString(message.pythonPackages[i])) + return "pythonPackages: string[] expected"; + } + if (message.properties != null && message.hasOwnProperty("properties")) { + if (!$util.isObject(message.properties)) + return "properties: object expected"; + var key = Object.keys(message.properties); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.properties[key[i]])) + return "properties: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a ContainerImageRuntime message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} ContainerImageRuntime + */ + ContainerImageRuntime.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime(); + if (object.javaJars) { + if (!Array.isArray(object.javaJars)) + throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.javaJars: array expected"); + message.javaJars = []; + for (var i = 0; i < object.javaJars.length; ++i) + message.javaJars[i] = String(object.javaJars[i]); + } + if (object.pythonPackages) { + if (!Array.isArray(object.pythonPackages)) + throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.pythonPackages: array expected"); + message.pythonPackages = []; + for (var i = 0; i < object.pythonPackages.length; ++i) + message.pythonPackages[i] = String(object.pythonPackages[i]); + } + if (object.properties) { + if (typeof object.properties !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.properties: object expected"); + message.properties = {}; + for (var keys = Object.keys(object.properties), i = 0; i < keys.length; ++i) + message.properties[keys[i]] = String(object.properties[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a ContainerImageRuntime message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} message ContainerImageRuntime + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ContainerImageRuntime.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.javaJars = []; + object.pythonPackages = []; + } + if (options.objects || options.defaults) + object.properties = {}; + if (message.javaJars && message.javaJars.length) { + object.javaJars = []; + for (var j = 0; j < message.javaJars.length; ++j) + object.javaJars[j] = message.javaJars[j]; + } + if (message.pythonPackages && message.pythonPackages.length) { + object.pythonPackages = []; + for (var j = 0; j < message.pythonPackages.length; ++j) + object.pythonPackages[j] = message.pythonPackages[j]; + } + var keys2; + if (message.properties && (keys2 = Object.keys(message.properties)).length) { + object.properties = {}; + for (var j = 0; j < keys2.length; ++j) + object.properties[keys2[j]] = message.properties[keys2[j]]; + } + return object; + }; + + /** + * Converts this ContainerImageRuntime to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @instance + * @returns {Object.} JSON object + */ + ContainerImageRuntime.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ContainerImageRuntime; + })(); + + InfrastructureSpec.VpcNetwork = (function() { + + /** + * Properties of a VpcNetwork. + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @interface IVpcNetwork + * @property {string|null} [network] VpcNetwork network + * @property {string|null} [subNetwork] VpcNetwork subNetwork + * @property {Array.|null} [networkTags] VpcNetwork networkTags + */ + + /** + * Constructs a new VpcNetwork. + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @classdesc Represents a VpcNetwork. + * @implements IVpcNetwork + * @constructor + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork=} [properties] Properties to set + */ + function VpcNetwork(properties) { + this.networkTags = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VpcNetwork network. + * @member {string|null|undefined} network + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @instance + */ + VpcNetwork.prototype.network = null; + + /** + * VpcNetwork subNetwork. + * @member {string|null|undefined} subNetwork + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @instance + */ + VpcNetwork.prototype.subNetwork = null; + + /** + * VpcNetwork networkTags. + * @member {Array.} networkTags + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @instance + */ + VpcNetwork.prototype.networkTags = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * VpcNetwork networkName. + * @member {"network"|"subNetwork"|undefined} networkName + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @instance + */ + Object.defineProperty(VpcNetwork.prototype, "networkName", { + get: $util.oneOfGetter($oneOfFields = ["network", "subNetwork"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new VpcNetwork instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} VpcNetwork instance + */ + VpcNetwork.create = function create(properties) { + return new VpcNetwork(properties); + }; + + /** + * Encodes the specified VpcNetwork message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork} message VpcNetwork message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpcNetwork.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.network); + if (message.subNetwork != null && Object.hasOwnProperty.call(message, "subNetwork")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subNetwork); + if (message.networkTags != null && message.networkTags.length) + for (var i = 0; i < message.networkTags.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkTags[i]); + return writer; + }; + + /** + * Encodes the specified VpcNetwork message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork} message VpcNetwork message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpcNetwork.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VpcNetwork message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} VpcNetwork + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpcNetwork.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.network = reader.string(); + break; + case 2: + message.subNetwork = reader.string(); + break; + case 3: + if (!(message.networkTags && message.networkTags.length)) + message.networkTags = []; + message.networkTags.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VpcNetwork message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} VpcNetwork + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpcNetwork.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VpcNetwork message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VpcNetwork.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.network != null && message.hasOwnProperty("network")) { + properties.networkName = 1; + if (!$util.isString(message.network)) + return "network: string expected"; + } + if (message.subNetwork != null && message.hasOwnProperty("subNetwork")) { + if (properties.networkName === 1) + return "networkName: multiple values"; + properties.networkName = 1; + if (!$util.isString(message.subNetwork)) + return "subNetwork: string expected"; + } + if (message.networkTags != null && message.hasOwnProperty("networkTags")) { + if (!Array.isArray(message.networkTags)) + return "networkTags: array expected"; + for (var i = 0; i < message.networkTags.length; ++i) + if (!$util.isString(message.networkTags[i])) + return "networkTags: string[] expected"; + } + return null; + }; + + /** + * Creates a VpcNetwork message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} VpcNetwork + */ + VpcNetwork.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork(); + if (object.network != null) + message.network = String(object.network); + if (object.subNetwork != null) + message.subNetwork = String(object.subNetwork); + if (object.networkTags) { + if (!Array.isArray(object.networkTags)) + throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.networkTags: array expected"); + message.networkTags = []; + for (var i = 0; i < object.networkTags.length; ++i) + message.networkTags[i] = String(object.networkTags[i]); + } + return message; + }; + + /** + * Creates a plain object from a VpcNetwork message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} message VpcNetwork + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VpcNetwork.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.networkTags = []; + if (message.network != null && message.hasOwnProperty("network")) { + object.network = message.network; + if (options.oneofs) + object.networkName = "network"; + } + if (message.subNetwork != null && message.hasOwnProperty("subNetwork")) { + object.subNetwork = message.subNetwork; + if (options.oneofs) + object.networkName = "subNetwork"; + } + if (message.networkTags && message.networkTags.length) { + object.networkTags = []; + for (var j = 0; j < message.networkTags.length; ++j) + object.networkTags[j] = message.networkTags[j]; + } + return object; + }; + + /** + * Converts this VpcNetwork to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @instance + * @returns {Object.} JSON object + */ + VpcNetwork.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return VpcNetwork; + })(); + + return InfrastructureSpec; + })(); + + Task.TriggerSpec = (function() { + + /** + * Properties of a TriggerSpec. + * @memberof google.cloud.dataplex.v1.Task + * @interface ITriggerSpec + * @property {google.cloud.dataplex.v1.Task.TriggerSpec.Type|null} [type] TriggerSpec type + * @property {google.protobuf.ITimestamp|null} [startTime] TriggerSpec startTime + * @property {boolean|null} [disabled] TriggerSpec disabled + * @property {number|null} [maxRetries] TriggerSpec maxRetries + * @property {string|null} [schedule] TriggerSpec schedule + */ + + /** + * Constructs a new TriggerSpec. + * @memberof google.cloud.dataplex.v1.Task + * @classdesc Represents a TriggerSpec. + * @implements ITriggerSpec + * @constructor + * @param {google.cloud.dataplex.v1.Task.ITriggerSpec=} [properties] Properties to set + */ + function TriggerSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TriggerSpec type. + * @member {google.cloud.dataplex.v1.Task.TriggerSpec.Type} type + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @instance + */ + TriggerSpec.prototype.type = 0; + + /** + * TriggerSpec startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @instance + */ + TriggerSpec.prototype.startTime = null; + + /** + * TriggerSpec disabled. + * @member {boolean} disabled + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @instance + */ + TriggerSpec.prototype.disabled = false; + + /** + * TriggerSpec maxRetries. + * @member {number} maxRetries + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @instance + */ + TriggerSpec.prototype.maxRetries = 0; + + /** + * TriggerSpec schedule. + * @member {string|null|undefined} schedule + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @instance + */ + TriggerSpec.prototype.schedule = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TriggerSpec trigger. + * @member {"schedule"|undefined} trigger + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @instance + */ + Object.defineProperty(TriggerSpec.prototype, "trigger", { + get: $util.oneOfGetter($oneOfFields = ["schedule"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TriggerSpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {google.cloud.dataplex.v1.Task.ITriggerSpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.TriggerSpec} TriggerSpec instance + */ + TriggerSpec.create = function create(properties) { + return new TriggerSpec(properties); + }; + + /** + * Encodes the specified TriggerSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.TriggerSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {google.cloud.dataplex.v1.Task.ITriggerSpec} message TriggerSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TriggerSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disabled); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.maxRetries != null && Object.hasOwnProperty.call(message, "maxRetries")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.maxRetries); + if (message.schedule != null && Object.hasOwnProperty.call(message, "schedule")) + writer.uint32(/* id 100, wireType 2 =*/802).string(message.schedule); + return writer; + }; + + /** + * Encodes the specified TriggerSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.TriggerSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {google.cloud.dataplex.v1.Task.ITriggerSpec} message TriggerSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TriggerSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TriggerSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.TriggerSpec} TriggerSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TriggerSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.TriggerSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 5: + message.type = reader.int32(); + break; + case 6: + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.disabled = reader.bool(); + break; + case 7: + message.maxRetries = reader.int32(); + break; + case 100: + message.schedule = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TriggerSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.TriggerSpec} TriggerSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TriggerSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TriggerSpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TriggerSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + if (message.maxRetries != null && message.hasOwnProperty("maxRetries")) + if (!$util.isInteger(message.maxRetries)) + return "maxRetries: integer expected"; + if (message.schedule != null && message.hasOwnProperty("schedule")) { + properties.trigger = 1; + if (!$util.isString(message.schedule)) + return "schedule: string expected"; + } + return null; + }; + + /** + * Creates a TriggerSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.TriggerSpec} TriggerSpec + */ + TriggerSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.TriggerSpec) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.TriggerSpec(); + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "ON_DEMAND": + case 1: + message.type = 1; + break; + case "RECURRING": + case 2: + message.type = 2; + break; + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.TriggerSpec.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + if (object.maxRetries != null) + message.maxRetries = object.maxRetries | 0; + if (object.schedule != null) + message.schedule = String(object.schedule); + return message; + }; + + /** + * Creates a plain object from a TriggerSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {google.cloud.dataplex.v1.Task.TriggerSpec} message TriggerSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TriggerSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.disabled = false; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.startTime = null; + object.maxRetries = 0; + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Task.TriggerSpec.Type[message.type] : message.type; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.maxRetries != null && message.hasOwnProperty("maxRetries")) + object.maxRetries = message.maxRetries; + if (message.schedule != null && message.hasOwnProperty("schedule")) { + object.schedule = message.schedule; + if (options.oneofs) + object.trigger = "schedule"; + } + return object; + }; + + /** + * Converts this TriggerSpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @instance + * @returns {Object.} JSON object + */ + TriggerSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.cloud.dataplex.v1.Task.TriggerSpec.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} ON_DEMAND=1 ON_DEMAND value + * @property {number} RECURRING=2 RECURRING value + */ + TriggerSpec.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ON_DEMAND"] = 1; + values[valuesById[2] = "RECURRING"] = 2; + return values; + })(); + + return TriggerSpec; + })(); + + Task.ExecutionSpec = (function() { + + /** + * Properties of an ExecutionSpec. + * @memberof google.cloud.dataplex.v1.Task + * @interface IExecutionSpec + * @property {Object.|null} [args] ExecutionSpec args + * @property {string|null} [serviceAccount] ExecutionSpec serviceAccount + * @property {google.protobuf.IDuration|null} [maxJobExecutionLifetime] ExecutionSpec maxJobExecutionLifetime + */ + + /** + * Constructs a new ExecutionSpec. + * @memberof google.cloud.dataplex.v1.Task + * @classdesc Represents an ExecutionSpec. + * @implements IExecutionSpec + * @constructor + * @param {google.cloud.dataplex.v1.Task.IExecutionSpec=} [properties] Properties to set + */ + function ExecutionSpec(properties) { + this.args = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExecutionSpec args. + * @member {Object.} args + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @instance + */ + ExecutionSpec.prototype.args = $util.emptyObject; + + /** + * ExecutionSpec serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @instance + */ + ExecutionSpec.prototype.serviceAccount = ""; + + /** + * ExecutionSpec maxJobExecutionLifetime. + * @member {google.protobuf.IDuration|null|undefined} maxJobExecutionLifetime + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @instance + */ + ExecutionSpec.prototype.maxJobExecutionLifetime = null; + + /** + * Creates a new ExecutionSpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {google.cloud.dataplex.v1.Task.IExecutionSpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.ExecutionSpec} ExecutionSpec instance + */ + ExecutionSpec.create = function create(properties) { + return new ExecutionSpec(properties); + }; + + /** + * Encodes the specified ExecutionSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {google.cloud.dataplex.v1.Task.IExecutionSpec} message ExecutionSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecutionSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.args != null && Object.hasOwnProperty.call(message, "args")) + for (var keys = Object.keys(message.args), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.args[keys[i]]).ldelim(); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.serviceAccount); + if (message.maxJobExecutionLifetime != null && Object.hasOwnProperty.call(message, "maxJobExecutionLifetime")) + $root.google.protobuf.Duration.encode(message.maxJobExecutionLifetime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExecutionSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {google.cloud.dataplex.v1.Task.IExecutionSpec} message ExecutionSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecutionSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExecutionSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.ExecutionSpec} ExecutionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecutionSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.ExecutionSpec(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: + if (message.args === $util.emptyObject) + message.args = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.args[key] = value; + break; + case 5: + message.serviceAccount = reader.string(); + break; + case 8: + message.maxJobExecutionLifetime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExecutionSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.ExecutionSpec} ExecutionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecutionSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExecutionSpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecutionSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.args != null && message.hasOwnProperty("args")) { + if (!$util.isObject(message.args)) + return "args: object expected"; + var key = Object.keys(message.args); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.args[key[i]])) + return "args: string{k:string} expected"; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.maxJobExecutionLifetime != null && message.hasOwnProperty("maxJobExecutionLifetime")) { + var error = $root.google.protobuf.Duration.verify(message.maxJobExecutionLifetime); + if (error) + return "maxJobExecutionLifetime." + error; + } + return null; + }; + + /** + * Creates an ExecutionSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.ExecutionSpec} ExecutionSpec + */ + ExecutionSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.ExecutionSpec) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.ExecutionSpec(); + if (object.args) { + if (typeof object.args !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.ExecutionSpec.args: object expected"); + message.args = {}; + for (var keys = Object.keys(object.args), i = 0; i < keys.length; ++i) + message.args[keys[i]] = String(object.args[keys[i]]); + } + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.maxJobExecutionLifetime != null) { + if (typeof object.maxJobExecutionLifetime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.ExecutionSpec.maxJobExecutionLifetime: object expected"); + message.maxJobExecutionLifetime = $root.google.protobuf.Duration.fromObject(object.maxJobExecutionLifetime); + } + return message; + }; + + /** + * Creates a plain object from an ExecutionSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {google.cloud.dataplex.v1.Task.ExecutionSpec} message ExecutionSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecutionSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.args = {}; + if (options.defaults) { + object.serviceAccount = ""; + object.maxJobExecutionLifetime = null; + } + var keys2; + if (message.args && (keys2 = Object.keys(message.args)).length) { + object.args = {}; + for (var j = 0; j < keys2.length; ++j) + object.args[keys2[j]] = message.args[keys2[j]]; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.maxJobExecutionLifetime != null && message.hasOwnProperty("maxJobExecutionLifetime")) + object.maxJobExecutionLifetime = $root.google.protobuf.Duration.toObject(message.maxJobExecutionLifetime, options); + return object; + }; + + /** + * Converts this ExecutionSpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @instance + * @returns {Object.} JSON object + */ + ExecutionSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExecutionSpec; + })(); + + Task.SparkTaskConfig = (function() { + + /** + * Properties of a SparkTaskConfig. + * @memberof google.cloud.dataplex.v1.Task + * @interface ISparkTaskConfig + * @property {string|null} [mainJarFileUri] SparkTaskConfig mainJarFileUri + * @property {string|null} [mainClass] SparkTaskConfig mainClass + * @property {string|null} [pythonScriptFile] SparkTaskConfig pythonScriptFile + * @property {string|null} [sqlScriptFile] SparkTaskConfig sqlScriptFile + * @property {string|null} [sqlScript] SparkTaskConfig sqlScript + * @property {Array.|null} [fileUris] SparkTaskConfig fileUris + * @property {Array.|null} [archiveUris] SparkTaskConfig archiveUris + * @property {google.cloud.dataplex.v1.Task.IInfrastructureSpec|null} [infrastructureSpec] SparkTaskConfig infrastructureSpec + */ + + /** + * Constructs a new SparkTaskConfig. + * @memberof google.cloud.dataplex.v1.Task + * @classdesc Represents a SparkTaskConfig. + * @implements ISparkTaskConfig + * @constructor + * @param {google.cloud.dataplex.v1.Task.ISparkTaskConfig=} [properties] Properties to set + */ + function SparkTaskConfig(properties) { + this.fileUris = []; + this.archiveUris = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SparkTaskConfig mainJarFileUri. + * @member {string|null|undefined} mainJarFileUri + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.mainJarFileUri = null; + + /** + * SparkTaskConfig mainClass. + * @member {string|null|undefined} mainClass + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.mainClass = null; + + /** + * SparkTaskConfig pythonScriptFile. + * @member {string|null|undefined} pythonScriptFile + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.pythonScriptFile = null; + + /** + * SparkTaskConfig sqlScriptFile. + * @member {string|null|undefined} sqlScriptFile + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.sqlScriptFile = null; + + /** + * SparkTaskConfig sqlScript. + * @member {string|null|undefined} sqlScript + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.sqlScript = null; + + /** + * SparkTaskConfig fileUris. + * @member {Array.} fileUris + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.fileUris = $util.emptyArray; + + /** + * SparkTaskConfig archiveUris. + * @member {Array.} archiveUris + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.archiveUris = $util.emptyArray; + + /** + * SparkTaskConfig infrastructureSpec. + * @member {google.cloud.dataplex.v1.Task.IInfrastructureSpec|null|undefined} infrastructureSpec + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.infrastructureSpec = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SparkTaskConfig driver. + * @member {"mainJarFileUri"|"mainClass"|"pythonScriptFile"|"sqlScriptFile"|"sqlScript"|undefined} driver + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + Object.defineProperty(SparkTaskConfig.prototype, "driver", { + get: $util.oneOfGetter($oneOfFields = ["mainJarFileUri", "mainClass", "pythonScriptFile", "sqlScriptFile", "sqlScript"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SparkTaskConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {google.cloud.dataplex.v1.Task.ISparkTaskConfig=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.SparkTaskConfig} SparkTaskConfig instance + */ + SparkTaskConfig.create = function create(properties) { + return new SparkTaskConfig(properties); + }; + + /** + * Encodes the specified SparkTaskConfig message. Does not implicitly {@link google.cloud.dataplex.v1.Task.SparkTaskConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {google.cloud.dataplex.v1.Task.ISparkTaskConfig} message SparkTaskConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SparkTaskConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fileUris != null && message.fileUris.length) + for (var i = 0; i < message.fileUris.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.fileUris[i]); + if (message.archiveUris != null && message.archiveUris.length) + for (var i = 0; i < message.archiveUris.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.archiveUris[i]); + if (message.infrastructureSpec != null && Object.hasOwnProperty.call(message, "infrastructureSpec")) + $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.encode(message.infrastructureSpec, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.mainJarFileUri != null && Object.hasOwnProperty.call(message, "mainJarFileUri")) + writer.uint32(/* id 100, wireType 2 =*/802).string(message.mainJarFileUri); + if (message.mainClass != null && Object.hasOwnProperty.call(message, "mainClass")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.mainClass); + if (message.pythonScriptFile != null && Object.hasOwnProperty.call(message, "pythonScriptFile")) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.pythonScriptFile); + if (message.sqlScriptFile != null && Object.hasOwnProperty.call(message, "sqlScriptFile")) + writer.uint32(/* id 104, wireType 2 =*/834).string(message.sqlScriptFile); + if (message.sqlScript != null && Object.hasOwnProperty.call(message, "sqlScript")) + writer.uint32(/* id 105, wireType 2 =*/842).string(message.sqlScript); + return writer; + }; + + /** + * Encodes the specified SparkTaskConfig message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.SparkTaskConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {google.cloud.dataplex.v1.Task.ISparkTaskConfig} message SparkTaskConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SparkTaskConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SparkTaskConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.SparkTaskConfig} SparkTaskConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SparkTaskConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.SparkTaskConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 100: + message.mainJarFileUri = reader.string(); + break; + case 101: + message.mainClass = reader.string(); + break; + case 102: + message.pythonScriptFile = reader.string(); + break; + case 104: + message.sqlScriptFile = reader.string(); + break; + case 105: + message.sqlScript = reader.string(); + break; + case 3: + if (!(message.fileUris && message.fileUris.length)) + message.fileUris = []; + message.fileUris.push(reader.string()); + break; + case 4: + if (!(message.archiveUris && message.archiveUris.length)) + message.archiveUris = []; + message.archiveUris.push(reader.string()); + break; + case 6: + message.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SparkTaskConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.SparkTaskConfig} SparkTaskConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SparkTaskConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SparkTaskConfig message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SparkTaskConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.mainJarFileUri != null && message.hasOwnProperty("mainJarFileUri")) { + properties.driver = 1; + if (!$util.isString(message.mainJarFileUri)) + return "mainJarFileUri: string expected"; + } + if (message.mainClass != null && message.hasOwnProperty("mainClass")) { + if (properties.driver === 1) + return "driver: multiple values"; + properties.driver = 1; + if (!$util.isString(message.mainClass)) + return "mainClass: string expected"; + } + if (message.pythonScriptFile != null && message.hasOwnProperty("pythonScriptFile")) { + if (properties.driver === 1) + return "driver: multiple values"; + properties.driver = 1; + if (!$util.isString(message.pythonScriptFile)) + return "pythonScriptFile: string expected"; + } + if (message.sqlScriptFile != null && message.hasOwnProperty("sqlScriptFile")) { + if (properties.driver === 1) + return "driver: multiple values"; + properties.driver = 1; + if (!$util.isString(message.sqlScriptFile)) + return "sqlScriptFile: string expected"; + } + if (message.sqlScript != null && message.hasOwnProperty("sqlScript")) { + if (properties.driver === 1) + return "driver: multiple values"; + properties.driver = 1; + if (!$util.isString(message.sqlScript)) + return "sqlScript: string expected"; + } + if (message.fileUris != null && message.hasOwnProperty("fileUris")) { + if (!Array.isArray(message.fileUris)) + return "fileUris: array expected"; + for (var i = 0; i < message.fileUris.length; ++i) + if (!$util.isString(message.fileUris[i])) + return "fileUris: string[] expected"; + } + if (message.archiveUris != null && message.hasOwnProperty("archiveUris")) { + if (!Array.isArray(message.archiveUris)) + return "archiveUris: array expected"; + for (var i = 0; i < message.archiveUris.length; ++i) + if (!$util.isString(message.archiveUris[i])) + return "archiveUris: string[] expected"; + } + if (message.infrastructureSpec != null && message.hasOwnProperty("infrastructureSpec")) { + var error = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.verify(message.infrastructureSpec); + if (error) + return "infrastructureSpec." + error; + } + return null; + }; + + /** + * Creates a SparkTaskConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.SparkTaskConfig} SparkTaskConfig + */ + SparkTaskConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.SparkTaskConfig) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.SparkTaskConfig(); + if (object.mainJarFileUri != null) + message.mainJarFileUri = String(object.mainJarFileUri); + if (object.mainClass != null) + message.mainClass = String(object.mainClass); + if (object.pythonScriptFile != null) + message.pythonScriptFile = String(object.pythonScriptFile); + if (object.sqlScriptFile != null) + message.sqlScriptFile = String(object.sqlScriptFile); + if (object.sqlScript != null) + message.sqlScript = String(object.sqlScript); + if (object.fileUris) { + if (!Array.isArray(object.fileUris)) + throw TypeError(".google.cloud.dataplex.v1.Task.SparkTaskConfig.fileUris: array expected"); + message.fileUris = []; + for (var i = 0; i < object.fileUris.length; ++i) + message.fileUris[i] = String(object.fileUris[i]); + } + if (object.archiveUris) { + if (!Array.isArray(object.archiveUris)) + throw TypeError(".google.cloud.dataplex.v1.Task.SparkTaskConfig.archiveUris: array expected"); + message.archiveUris = []; + for (var i = 0; i < object.archiveUris.length; ++i) + message.archiveUris[i] = String(object.archiveUris[i]); + } + if (object.infrastructureSpec != null) { + if (typeof object.infrastructureSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.SparkTaskConfig.infrastructureSpec: object expected"); + message.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.fromObject(object.infrastructureSpec); + } + return message; + }; + + /** + * Creates a plain object from a SparkTaskConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {google.cloud.dataplex.v1.Task.SparkTaskConfig} message SparkTaskConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SparkTaskConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.fileUris = []; + object.archiveUris = []; + } + if (options.defaults) + object.infrastructureSpec = null; + if (message.fileUris && message.fileUris.length) { + object.fileUris = []; + for (var j = 0; j < message.fileUris.length; ++j) + object.fileUris[j] = message.fileUris[j]; + } + if (message.archiveUris && message.archiveUris.length) { + object.archiveUris = []; + for (var j = 0; j < message.archiveUris.length; ++j) + object.archiveUris[j] = message.archiveUris[j]; + } + if (message.infrastructureSpec != null && message.hasOwnProperty("infrastructureSpec")) + object.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.toObject(message.infrastructureSpec, options); + if (message.mainJarFileUri != null && message.hasOwnProperty("mainJarFileUri")) { + object.mainJarFileUri = message.mainJarFileUri; + if (options.oneofs) + object.driver = "mainJarFileUri"; + } + if (message.mainClass != null && message.hasOwnProperty("mainClass")) { + object.mainClass = message.mainClass; + if (options.oneofs) + object.driver = "mainClass"; + } + if (message.pythonScriptFile != null && message.hasOwnProperty("pythonScriptFile")) { + object.pythonScriptFile = message.pythonScriptFile; + if (options.oneofs) + object.driver = "pythonScriptFile"; + } + if (message.sqlScriptFile != null && message.hasOwnProperty("sqlScriptFile")) { + object.sqlScriptFile = message.sqlScriptFile; + if (options.oneofs) + object.driver = "sqlScriptFile"; + } + if (message.sqlScript != null && message.hasOwnProperty("sqlScript")) { + object.sqlScript = message.sqlScript; + if (options.oneofs) + object.driver = "sqlScript"; + } + return object; + }; + + /** + * Converts this SparkTaskConfig to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + * @returns {Object.} JSON object + */ + SparkTaskConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SparkTaskConfig; + })(); + + return Task; + })(); + + v1.Job = (function() { + + /** + * Properties of a Job. + * @memberof google.cloud.dataplex.v1 + * @interface IJob + * @property {string|null} [name] Job name + * @property {string|null} [uid] Job uid + * @property {google.protobuf.ITimestamp|null} [startTime] Job startTime + * @property {google.protobuf.ITimestamp|null} [endTime] Job endTime + * @property {google.cloud.dataplex.v1.Job.State|null} [state] Job state + * @property {number|null} [retryCount] Job retryCount + * @property {google.cloud.dataplex.v1.Job.Service|null} [service] Job service + * @property {string|null} [serviceJob] Job serviceJob + * @property {string|null} [message] Job message + */ + + /** + * Constructs a new Job. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a Job. + * @implements IJob + * @constructor + * @param {google.cloud.dataplex.v1.IJob=} [properties] Properties to set + */ + function Job(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Job name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.name = ""; + + /** + * Job uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.uid = ""; + + /** + * Job startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.startTime = null; + + /** + * Job endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.endTime = null; + + /** + * Job state. + * @member {google.cloud.dataplex.v1.Job.State} state + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.state = 0; + + /** + * Job retryCount. + * @member {number} retryCount + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.retryCount = 0; + + /** + * Job service. + * @member {google.cloud.dataplex.v1.Job.Service} service + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.service = 0; + + /** + * Job serviceJob. + * @member {string} serviceJob + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.serviceJob = ""; + + /** + * Job message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.message = ""; + + /** + * Creates a new Job instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Job + * @static + * @param {google.cloud.dataplex.v1.IJob=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Job} Job instance + */ + Job.create = function create(properties) { + return new Job(properties); + }; + + /** + * Encodes the specified Job message. Does not implicitly {@link google.cloud.dataplex.v1.Job.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Job + * @static + * @param {google.cloud.dataplex.v1.IJob} message Job message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Job.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); + if (message.retryCount != null && Object.hasOwnProperty.call(message, "retryCount")) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.retryCount); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.service); + if (message.serviceJob != null && Object.hasOwnProperty.call(message, "serviceJob")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.serviceJob); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.message); + return writer; + }; + + /** + * Encodes the specified Job message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Job.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Job + * @static + * @param {google.cloud.dataplex.v1.IJob} message Job message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Job.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Job message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Job + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Job} Job + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Job.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Job(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.uid = reader.string(); + break; + case 3: + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.state = reader.int32(); + break; + case 6: + message.retryCount = reader.uint32(); + break; + case 7: + message.service = reader.int32(); + break; + case 8: + message.serviceJob = reader.string(); + break; + case 9: + message.message = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Job message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Job + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Job} Job + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Job.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Job message. + * @function verify + * @memberof google.cloud.dataplex.v1.Job + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Job.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.retryCount != null && message.hasOwnProperty("retryCount")) + if (!$util.isInteger(message.retryCount)) + return "retryCount: integer expected"; + if (message.service != null && message.hasOwnProperty("service")) + switch (message.service) { + default: + return "service: enum value expected"; + case 0: + case 1: + break; + } + if (message.serviceJob != null && message.hasOwnProperty("serviceJob")) + if (!$util.isString(message.serviceJob)) + return "serviceJob: string expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + return null; + }; + + /** + * Creates a Job message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Job + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Job} Job + */ + Job.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Job) + return object; + var message = new $root.google.cloud.dataplex.v1.Job(); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Job.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Job.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "RUNNING": + case 1: + message.state = 1; + break; + case "CANCELLING": + case 2: + message.state = 2; + break; + case "CANCELLED": + case 3: + message.state = 3; + break; + case "SUCCEEDED": + case 4: + message.state = 4; + break; + case "FAILED": + case 5: + message.state = 5; + break; + case "ABORTED": + case 6: + message.state = 6; + break; + } + if (object.retryCount != null) + message.retryCount = object.retryCount >>> 0; + switch (object.service) { + case "SERVICE_UNSPECIFIED": + case 0: + message.service = 0; + break; + case "DATAPROC": + case 1: + message.service = 1; + break; + } + if (object.serviceJob != null) + message.serviceJob = String(object.serviceJob); + if (object.message != null) + message.message = String(object.message); + return message; + }; + + /** + * Creates a plain object from a Job message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Job + * @static + * @param {google.cloud.dataplex.v1.Job} message Job + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Job.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.uid = ""; + object.startTime = null; + object.endTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.retryCount = 0; + object.service = options.enums === String ? "SERVICE_UNSPECIFIED" : 0; + object.serviceJob = ""; + object.message = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Job.State[message.state] : message.state; + if (message.retryCount != null && message.hasOwnProperty("retryCount")) + object.retryCount = message.retryCount; + if (message.service != null && message.hasOwnProperty("service")) + object.service = options.enums === String ? $root.google.cloud.dataplex.v1.Job.Service[message.service] : message.service; + if (message.serviceJob != null && message.hasOwnProperty("serviceJob")) + object.serviceJob = message.serviceJob; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + return object; + }; + + /** + * Converts this Job to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Job + * @instance + * @returns {Object.} JSON object + */ + Job.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Service enum. + * @name google.cloud.dataplex.v1.Job.Service + * @enum {number} + * @property {number} SERVICE_UNSPECIFIED=0 SERVICE_UNSPECIFIED value + * @property {number} DATAPROC=1 DATAPROC value + */ + Job.Service = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SERVICE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DATAPROC"] = 1; + return values; + })(); + + /** + * State enum. + * @name google.cloud.dataplex.v1.Job.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} RUNNING=1 RUNNING value + * @property {number} CANCELLING=2 CANCELLING value + * @property {number} CANCELLED=3 CANCELLED value + * @property {number} SUCCEEDED=4 SUCCEEDED value + * @property {number} FAILED=5 FAILED value + * @property {number} ABORTED=6 ABORTED value + */ + Job.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RUNNING"] = 1; + values[valuesById[2] = "CANCELLING"] = 2; + values[valuesById[3] = "CANCELLED"] = 3; + values[valuesById[4] = "SUCCEEDED"] = 4; + values[valuesById[5] = "FAILED"] = 5; + values[valuesById[6] = "ABORTED"] = 6; + return values; + })(); + + return Job; + })(); + + return v1; + })(); + + return dataplex; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + case 2: + message.fullyDecodeReservedExpansion = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.selector = reader.string(); + break; + case 2: + message.get = reader.string(); + break; + case 3: + message.put = reader.string(); + break; + case 4: + message.post = reader.string(); + break; + case 5: + message["delete"] = reader.string(); + break; + case 6: + message.patch = reader.string(); + break; + case 8: + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + case 7: + message.body = reader.string(); + break; + case 12: + message.responseBody = reader.string(); + break; + case 11: + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.kind = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CustomHttpPattern; + })(); + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + return values; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + case 3: + message.nameField = reader.string(); + break; + case 4: + message.history = reader.int32(); + break; + case 5: + message.plural = reader.string(); + break; + case 6: + message.singular = reader.string(); + break; + case 10: + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + message.childType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResourceReference; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FileDescriptorSet; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message["package"] = reader.string(); + break; + case 3: + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + case 10: + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + case 11: + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + case 4: + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + case 7: + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 8: + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + case 9: + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + case 12: + message.syntax = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + case 8: + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + case 7: + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + case 9: + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + case 10: + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + case 3: + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 3: + message.number = reader.int32(); + break; + case 4: + message.label = reader.int32(); + break; + case 5: + message.type = reader.int32(); + break; + case 6: + message.typeName = reader.string(); + break; + case 2: + message.extendee = reader.string(); + break; + case 7: + message.defaultValue = reader.string(); + break; + case 9: + message.oneofIndex = reader.int32(); + break; + case 10: + message.jsonName = reader.string(); + break; + case 8: + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + case 17: + message.proto3Optional = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + } + switch (object.type) { + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.number = reader.int32(); + break; + case 3: + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.inputType = reader.string(); + break; + case 3: + message.outputType = reader.string(); + break; + case 4: + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + case 5: + message.clientStreaming = reader.bool(); + break; + case 6: + message.serverStreaming = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions phpGenericServices. + * @member {boolean} phpGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices")) + writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.javaPackage = reader.string(); + break; + case 8: + message.javaOuterClassname = reader.string(); + break; + case 10: + message.javaMultipleFiles = reader.bool(); + break; + case 20: + message.javaGenerateEqualsAndHash = reader.bool(); + break; + case 27: + message.javaStringCheckUtf8 = reader.bool(); + break; + case 9: + message.optimizeFor = reader.int32(); + break; + case 11: + message.goPackage = reader.string(); + break; + case 16: + message.ccGenericServices = reader.bool(); + break; + case 17: + message.javaGenericServices = reader.bool(); + break; + case 18: + message.pyGenericServices = reader.bool(); + break; + case 42: + message.phpGenericServices = reader.bool(); + break; + case 23: + message.deprecated = reader.bool(); + break; + case 31: + message.ccEnableArenas = reader.bool(); + break; + case 36: + message.objcClassPrefix = reader.string(); + break; + case 37: + message.csharpNamespace = reader.string(); + break; + case 39: + message.swiftPrefix = reader.string(); + break; + case 40: + message.phpClassPrefix = reader.string(); + break; + case 41: + message.phpNamespace = reader.string(); + break; + case 44: + message.phpMetadataNamespace = reader.string(); + break; + case 45: + message.rubyPackage = reader.string(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1053: + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + if (typeof message.phpGenericServices !== "boolean") + return "phpGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.phpGenericServices != null) + message.phpGenericServices = Boolean(object.phpGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpGenericServices = false; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + object.phpGenericServices = message.phpGenericServices; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.messageSetWireFormat = reader.bool(); + break; + case 2: + message.noStandardDescriptorAccessor = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 7: + message.mapEntry = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1053: + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) { + writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.int32(message[".google.api.fieldBehavior"][i]); + writer.ldelim(); + } + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.ctype = reader.int32(); + break; + case 2: + message.packed = reader.bool(); + break; + case 6: + message.jstype = reader.int32(); + break; + case 5: + message.lazy = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 10: + message.weak = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1052: + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + case 1055: + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object[".google.api.resourceReference"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.allowAlias = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.deprecated = false; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1049: + message[".google.api.defaultHost"] = reader.string(); + break; + case 1050: + message[".google.api.oauthScopes"] = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * MethodOptions .google.longrunning.operationInfo. + * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.longrunning.operationInfo"] = null; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) + $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 34: + message.idempotencyLevel = reader.int32(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 72295728: + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + case 1051: + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + case 1049: + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { + var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); + if (error) + return ".google.longrunning.operationInfo." + error; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + if (object[".google.longrunning.operationInfo"] != null) { + if (typeof object[".google.longrunning.operationInfo"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.longrunning.operationInfo"] = null; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) + object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + case 3: + message.identifierValue = reader.string(); + break; + case 4: + message.positiveIntValue = reader.uint64(); + break; + case 5: + message.negativeIntValue = reader.int64(); + break; + case 6: + message.doubleValue = reader.double(); + break; + case 7: + message.stringValue = reader.bytes(); + break; + case 8: + message.aggregateValue = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.namePart = reader.string(); + break; + case 2: + message.isExtension = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + case 2: + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + case 3: + message.leadingComments = reader.string(); + break; + case 4: + message.trailingComments = reader.string(); + break; + case 6: + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + case 2: + message.sourceFile = reader.string(); + break; + case 3: + message.begin = reader.int32(); + break; + case 4: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Duration; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Timestamp; + })(); + + protobuf.Empty = (function() { + + /** + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty + */ + + /** + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set + */ + function Empty(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Empty instance using the specified properties. + * @function create + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + Empty.create = function create(properties) { + return new Empty(properties); + }; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @memberof google.protobuf.Empty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Empty; + })(); + + protobuf.FieldMask = (function() { + + /** + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ + + /** + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask + * @constructor + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + */ + function FieldMask(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @instance + */ + FieldMask.prototype.paths = $util.emptyArray; + + /** + * Creates a new FieldMask instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance + */ + FieldMask.create = function create(properties) { + return new FieldMask(properties); + }; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + return writer; + }; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldMask message. + * @function verify + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldMask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldMask} FieldMask + */ + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) + return object; + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.FieldMask} message FieldMask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; + + /** + * Converts this FieldMask to JSON. + * @function toJSON + * @memberof google.protobuf.FieldMask + * @instance + * @returns {Object.} JSON object + */ + FieldMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FieldMask; + })(); + + protobuf.Any = (function() { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type_url = reader.string(); + break; + case 2: + message.value = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) + return object; + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Any; + })(); + + return protobuf; + })(); + + google.longrunning = (function() { + + /** + * Namespace longrunning. + * @memberof google + * @namespace + */ + var longrunning = {}; + + longrunning.Operations = (function() { + + /** + * Constructs a new Operations service. + * @memberof google.longrunning + * @classdesc Represents an Operations + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Operations(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; + + /** + * Creates new Operations service using the specified rpc implementation. + * @function create + * @memberof google.longrunning.Operations + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Operations} RPC service. Useful where requests and/or responses are streamed. + */ + Operations.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.longrunning.Operations#listOperations}. + * @memberof google.longrunning.Operations + * @typedef ListOperationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.ListOperationsResponse} [response] ListOperationsResponse + */ + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @param {google.longrunning.Operations.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) { + return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); + }, "name", { value: "ListOperations" }); + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations#getOperation}. + * @memberof google.longrunning.Operations + * @typedef GetOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { + return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "GetOperation" }); + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations#deleteOperation}. + * @memberof google.longrunning.Operations + * @typedef DeleteOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { + return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteOperation" }); + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations#cancelOperation}. + * @memberof google.longrunning.Operations + * @typedef CancelOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @param {google.longrunning.Operations.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) { + return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelOperation" }); + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations#waitOperation}. + * @memberof google.longrunning.Operations + * @typedef WaitOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @param {google.longrunning.Operations.WaitOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) { + return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "WaitOperation" }); + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Operations; + })(); + + longrunning.Operation = (function() { + + /** + * Properties of an Operation. + * @memberof google.longrunning + * @interface IOperation + * @property {string|null} [name] Operation name + * @property {google.protobuf.IAny|null} [metadata] Operation metadata + * @property {boolean|null} [done] Operation done + * @property {google.rpc.IStatus|null} [error] Operation error + * @property {google.protobuf.IAny|null} [response] Operation response + */ + + /** + * Constructs a new Operation. + * @memberof google.longrunning + * @classdesc Represents an Operation. + * @implements IOperation + * @constructor + * @param {google.longrunning.IOperation=} [properties] Properties to set + */ + function Operation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Operation name. + * @member {string} name + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.name = ""; + + /** + * Operation metadata. + * @member {google.protobuf.IAny|null|undefined} metadata + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.metadata = null; + + /** + * Operation done. + * @member {boolean} done + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.done = false; + + /** + * Operation error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.error = null; + + /** + * Operation response. + * @member {google.protobuf.IAny|null|undefined} response + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.response = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Operation result. + * @member {"error"|"response"|undefined} result + * @memberof google.longrunning.Operation + * @instance + */ + Object.defineProperty(Operation.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["error", "response"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Operation instance using the specified properties. + * @function create + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation=} [properties] Properties to set + * @returns {google.longrunning.Operation} Operation instance + */ + Operation.create = function create(properties) { + return new Operation(properties); + }; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encode + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.done != null && Object.hasOwnProperty.call(message, "done")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.response != null && Object.hasOwnProperty.call(message, "response")) + $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 3: + message.done = reader.bool(); + break; + case 4: + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + case 5: + message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Operation message. + * @function verify + * @memberof google.longrunning.Operation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Operation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.protobuf.Any.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.done != null && message.hasOwnProperty("done")) + if (typeof message.done !== "boolean") + return "done: boolean expected"; + if (message.error != null && message.hasOwnProperty("error")) { + properties.result = 1; + { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + } + if (message.response != null && message.hasOwnProperty("response")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.protobuf.Any.verify(message.response); + if (error) + return "response." + error; + } + } + return null; + }; + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.Operation + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.Operation} Operation + */ + Operation.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.Operation) + return object; + var message = new $root.google.longrunning.Operation(); + if (object.name != null) + message.name = String(object.name); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.longrunning.Operation.metadata: object expected"); + message.metadata = $root.google.protobuf.Any.fromObject(object.metadata); + } + if (object.done != null) + message.done = Boolean(object.done); + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.longrunning.Operation.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + if (object.response != null) { + if (typeof object.response !== "object") + throw TypeError(".google.longrunning.Operation.response: object expected"); + message.response = $root.google.protobuf.Any.fromObject(object.response); + } + return message; + }; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.Operation} message Operation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Operation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.metadata = null; + object.done = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options); + if (message.done != null && message.hasOwnProperty("done")) + object.done = message.done; + if (message.error != null && message.hasOwnProperty("error")) { + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (options.oneofs) + object.result = "error"; + } + if (message.response != null && message.hasOwnProperty("response")) { + object.response = $root.google.protobuf.Any.toObject(message.response, options); + if (options.oneofs) + object.result = "response"; + } + return object; + }; + + /** + * Converts this Operation to JSON. + * @function toJSON + * @memberof google.longrunning.Operation + * @instance + * @returns {Object.} JSON object + */ + Operation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Operation; + })(); + + longrunning.GetOperationRequest = (function() { + + /** + * Properties of a GetOperationRequest. + * @memberof google.longrunning + * @interface IGetOperationRequest + * @property {string|null} [name] GetOperationRequest name + */ + + /** + * Constructs a new GetOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a GetOperationRequest. + * @implements IGetOperationRequest + * @constructor + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + */ + function GetOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetOperationRequest name. + * @member {string} name + * @memberof google.longrunning.GetOperationRequest + * @instance + */ + GetOperationRequest.prototype.name = ""; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance + */ + GetOperationRequest.create = function create(properties) { + return new GetOperationRequest(properties); + }; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOperationRequest message. + * @function verify + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + */ + GetOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.GetOperationRequest) + return object; + var message = new $root.google.longrunning.GetOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.GetOperationRequest} message GetOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.GetOperationRequest + * @instance + * @returns {Object.} JSON object + */ + GetOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetOperationRequest; + })(); + + longrunning.ListOperationsRequest = (function() { + + /** + * Properties of a ListOperationsRequest. + * @memberof google.longrunning + * @interface IListOperationsRequest + * @property {string|null} [name] ListOperationsRequest name + * @property {string|null} [filter] ListOperationsRequest filter + * @property {number|null} [pageSize] ListOperationsRequest pageSize + * @property {string|null} [pageToken] ListOperationsRequest pageToken + */ + + /** + * Constructs a new ListOperationsRequest. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsRequest. + * @implements IListOperationsRequest + * @constructor + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + */ + function ListOperationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsRequest name. + * @member {string} name + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.name = ""; + + /** + * ListOperationsRequest filter. + * @member {string} filter + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.filter = ""; + + /** + * ListOperationsRequest pageSize. + * @member {number} pageSize + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageSize = 0; + + /** + * ListOperationsRequest pageToken. + * @member {string} pageToken + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest instance + */ + ListOperationsRequest.create = function create(properties) { + return new ListOperationsRequest(properties); + }; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + return writer; + }; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: + message.name = reader.string(); + break; + case 1: + message.filter = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsRequest message. + * @function verify + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + */ + ListOperationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsRequest) + return object; + var message = new $root.google.longrunning.ListOperationsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.ListOperationsRequest} message ListOperationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + object.name = ""; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this ListOperationsRequest to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListOperationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListOperationsRequest; + })(); + + longrunning.ListOperationsResponse = (function() { + + /** + * Properties of a ListOperationsResponse. + * @memberof google.longrunning + * @interface IListOperationsResponse + * @property {Array.|null} [operations] ListOperationsResponse operations + * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken + */ + + /** + * Constructs a new ListOperationsResponse. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsResponse. + * @implements IListOperationsResponse + * @constructor + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + */ + function ListOperationsResponse(properties) { + this.operations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsResponse operations. + * @member {Array.} operations + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.operations = $util.emptyArray; + + /** + * ListOperationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance + */ + ListOperationsResponse.create = function create(properties) { + return new ListOperationsResponse(properties); + }; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operations != null && message.operations.length) + for (var i = 0; i < message.operations.length; ++i) + $root.google.longrunning.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsResponse message. + * @function verify + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operations != null && message.hasOwnProperty("operations")) { + if (!Array.isArray(message.operations)) + return "operations: array expected"; + for (var i = 0; i < message.operations.length; ++i) { + var error = $root.google.longrunning.Operation.verify(message.operations[i]); + if (error) + return "operations." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + */ + ListOperationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsResponse) + return object; + var message = new $root.google.longrunning.ListOperationsResponse(); + if (object.operations) { + if (!Array.isArray(object.operations)) + throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected"); + message.operations = []; + for (var i = 0; i < object.operations.length; ++i) { + if (typeof object.operations[i] !== "object") + throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected"); + message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.operations = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.operations && message.operations.length) { + object.operations = []; + for (var j = 0; j < message.operations.length; ++j) + object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListOperationsResponse to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListOperationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListOperationsResponse; + })(); + + longrunning.CancelOperationRequest = (function() { + + /** + * Properties of a CancelOperationRequest. + * @memberof google.longrunning + * @interface ICancelOperationRequest + * @property {string|null} [name] CancelOperationRequest name + */ + + /** + * Constructs a new CancelOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a CancelOperationRequest. + * @implements ICancelOperationRequest + * @constructor + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + */ + function CancelOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelOperationRequest name. + * @member {string} name + * @memberof google.longrunning.CancelOperationRequest + * @instance + */ + CancelOperationRequest.prototype.name = ""; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance + */ + CancelOperationRequest.create = function create(properties) { + return new CancelOperationRequest(properties); + }; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelOperationRequest message. + * @function verify + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + */ + CancelOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.CancelOperationRequest) + return object; + var message = new $root.google.longrunning.CancelOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this CancelOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.CancelOperationRequest + * @instance + * @returns {Object.} JSON object + */ + CancelOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CancelOperationRequest; + })(); + + longrunning.DeleteOperationRequest = (function() { + + /** + * Properties of a DeleteOperationRequest. + * @memberof google.longrunning + * @interface IDeleteOperationRequest + * @property {string|null} [name] DeleteOperationRequest name + */ + + /** + * Constructs a new DeleteOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a DeleteOperationRequest. + * @implements IDeleteOperationRequest + * @constructor + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + */ + function DeleteOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteOperationRequest name. + * @member {string} name + * @memberof google.longrunning.DeleteOperationRequest + * @instance + */ + DeleteOperationRequest.prototype.name = ""; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance + */ + DeleteOperationRequest.create = function create(properties) { + return new DeleteOperationRequest(properties); + }; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteOperationRequest message. + * @function verify + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + */ + DeleteOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.DeleteOperationRequest) + return object; + var message = new $root.google.longrunning.DeleteOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.DeleteOperationRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteOperationRequest; + })(); + + longrunning.WaitOperationRequest = (function() { + + /** + * Properties of a WaitOperationRequest. + * @memberof google.longrunning + * @interface IWaitOperationRequest + * @property {string|null} [name] WaitOperationRequest name + * @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout + */ + + /** + * Constructs a new WaitOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a WaitOperationRequest. + * @implements IWaitOperationRequest + * @constructor + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + */ + function WaitOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WaitOperationRequest name. + * @member {string} name + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.name = ""; + + /** + * WaitOperationRequest timeout. + * @member {google.protobuf.IDuration|null|undefined} timeout + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.timeout = null; + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance + */ + WaitOperationRequest.create = function create(properties) { + return new WaitOperationRequest(properties); + }; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) + $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WaitOperationRequest message. + * @function verify + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WaitOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.timeout != null && message.hasOwnProperty("timeout")) { + var error = $root.google.protobuf.Duration.verify(message.timeout); + if (error) + return "timeout." + error; + } + return null; + }; + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + */ + WaitOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.WaitOperationRequest) + return object; + var message = new $root.google.longrunning.WaitOperationRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.timeout != null) { + if (typeof object.timeout !== "object") + throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected"); + message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); + } + return message; + }; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WaitOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.timeout = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.timeout != null && message.hasOwnProperty("timeout")) + object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); + return object; + }; + + /** + * Converts this WaitOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.WaitOperationRequest + * @instance + * @returns {Object.} JSON object + */ + WaitOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WaitOperationRequest; + })(); + + longrunning.OperationInfo = (function() { + + /** + * Properties of an OperationInfo. + * @memberof google.longrunning + * @interface IOperationInfo + * @property {string|null} [responseType] OperationInfo responseType + * @property {string|null} [metadataType] OperationInfo metadataType + */ + + /** + * Constructs a new OperationInfo. + * @memberof google.longrunning + * @classdesc Represents an OperationInfo. + * @implements IOperationInfo + * @constructor + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + */ + function OperationInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationInfo responseType. + * @member {string} responseType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.responseType = ""; + + /** + * OperationInfo metadataType. + * @member {string} metadataType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.metadataType = ""; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @function create + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + * @returns {google.longrunning.OperationInfo} OperationInfo instance + */ + OperationInfo.create = function create(properties) { + return new OperationInfo(properties); + }; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encode + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType); + if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType); + return writer; + }; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.responseType = reader.string(); + break; + case 2: + message.metadataType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationInfo message. + * @function verify + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.responseType != null && message.hasOwnProperty("responseType")) + if (!$util.isString(message.responseType)) + return "responseType: string expected"; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + if (!$util.isString(message.metadataType)) + return "metadataType: string expected"; + return null; + }; + + /** + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.OperationInfo} OperationInfo + */ + OperationInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.OperationInfo) + return object; + var message = new $root.google.longrunning.OperationInfo(); + if (object.responseType != null) + message.responseType = String(object.responseType); + if (object.metadataType != null) + message.metadataType = String(object.metadataType); + return message; + }; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.OperationInfo} message OperationInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.responseType = ""; + object.metadataType = ""; + } + if (message.responseType != null && message.hasOwnProperty("responseType")) + object.responseType = message.responseType; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + object.metadataType = message.metadataType; + return object; + }; + + /** + * Converts this OperationInfo to JSON. + * @function toJSON + * @memberof google.longrunning.OperationInfo + * @instance + * @returns {Object.} JSON object + */ + OperationInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OperationInfo; + })(); + + return longrunning; + })(); + + google.rpc = (function() { + + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; + + rpc.Status = (function() { + + /** + * Properties of a Status. + * @memberof google.rpc + * @interface IStatus + * @property {number|null} [code] Status code + * @property {string|null} [message] Status message + * @property {Array.|null} [details] Status details + */ + + /** + * Constructs a new Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus + * @constructor + * @param {google.rpc.IStatus=} [properties] Properties to set + */ + function Status(properties) { + this.details = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Status code. + * @member {number} code + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.code = 0; + + /** + * Status message. + * @member {string} message + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.message = ""; + + /** + * Status details. + * @member {Array.} details + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.details = $util.emptyArray; + + /** + * Creates a new Status instance using the specified properties. + * @function create + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus=} [properties] Properties to set + * @returns {google.rpc.Status} Status instance + */ + Status.create = function create(properties) { + return new Status(properties); + }; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encode + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.details != null && message.details.length) + for (var i = 0; i < message.details.length; ++i) + $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Status message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.code = reader.int32(); + break; + case 2: + message.message = reader.string(); + break; + case 3: + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Status message. + * @function verify + * @memberof google.rpc.Status + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Status.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.details != null && message.hasOwnProperty("details")) { + if (!Array.isArray(message.details)) + return "details: array expected"; + for (var i = 0; i < message.details.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.details[i]); + if (error) + return "details." + error; + } + } + return null; + }; + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.Status + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.Status} Status + */ + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) + return object; + var message = new $root.google.rpc.Status(); + if (object.code != null) + message.code = object.code | 0; + if (object.message != null) + message.message = String(object.message); + if (object.details) { + if (!Array.isArray(object.details)) + throw TypeError(".google.rpc.Status.details: array expected"); + message.details = []; + for (var i = 0; i < object.details.length; ++i) { + if (typeof object.details[i] !== "object") + throw TypeError(".google.rpc.Status.details: object expected"); + message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.Status + * @static + * @param {google.rpc.Status} message Status + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Status.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.details = []; + if (options.defaults) { + object.code = 0; + object.message = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.details && message.details.length) { + object.details = []; + for (var j = 0; j < message.details.length; ++j) + object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); + } + return object; + }; + + /** + * Converts this Status to JSON. + * @function toJSON + * @memberof google.rpc.Status + * @instance + * @returns {Object.} JSON object + */ + Status.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Status; + })(); + + return rpc; + })(); + + return google; + })(); + + return $root; +}); diff --git a/packages/google-cloud-dataplex/protos/protos.json b/packages/google-cloud-dataplex/protos/protos.json new file mode 100644 index 00000000000..341f4fedee7 --- /dev/null +++ b/packages/google-cloud-dataplex/protos/protos.json @@ -0,0 +1,5112 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "dataplex": { + "nested": { + "v1": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/cloud/dataplex/v1;dataplex", + "java_multiple_files": true, + "java_outer_classname": "TasksProto", + "java_package": "com.google.cloud.dataplex.v1" + }, + "nested": { + "DiscoveryEvent": { + "oneofs": { + "details": { + "oneof": [ + "config", + "entity", + "partition", + "action" + ] + } + }, + "fields": { + "message": { + "type": "string", + "id": 1 + }, + "lakeId": { + "type": "string", + "id": 2 + }, + "zoneId": { + "type": "string", + "id": 3 + }, + "assetId": { + "type": "string", + "id": 4 + }, + "dataLocation": { + "type": "string", + "id": 5 + }, + "type": { + "type": "EventType", + "id": 10 + }, + "config": { + "type": "ConfigDetails", + "id": 20 + }, + "entity": { + "type": "EntityDetails", + "id": 21 + }, + "partition": { + "type": "PartitionDetails", + "id": 22 + }, + "action": { + "type": "ActionDetails", + "id": 23 + } + }, + "nested": { + "EventType": { + "values": { + "EVENT_TYPE_UNSPECIFIED": 0, + "CONFIG": 1, + "ENTITY_CREATED": 2, + "ENTITY_UPDATED": 3, + "ENTITY_DELETED": 4, + "PARTITION_CREATED": 5, + "PARTITION_UPDATED": 6, + "PARTITION_DELETED": 7 + } + }, + "EntityType": { + "values": { + "ENTITY_TYPE_UNSPECIFIED": 0, + "TABLE": 1, + "FILESET": 2 + } + }, + "ConfigDetails": { + "fields": { + "parameters": { + "keyType": "string", + "type": "string", + "id": 1 + } + } + }, + "EntityDetails": { + "fields": { + "entity": { + "type": "string", + "id": 1 + }, + "type": { + "type": "EntityType", + "id": 2 + } + } + }, + "PartitionDetails": { + "fields": { + "partition": { + "type": "string", + "id": 1 + }, + "entity": { + "type": "string", + "id": 2 + }, + "type": { + "type": "EntityType", + "id": 3 + } + } + }, + "ActionDetails": { + "fields": { + "type": { + "type": "string", + "id": 1 + } + } + } + } + }, + "JobEvent": { + "fields": { + "message": { + "type": "string", + "id": 1 + }, + "jobId": { + "type": "string", + "id": 2 + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + }, + "state": { + "type": "State", + "id": 5 + }, + "retries": { + "type": "int32", + "id": 6 + }, + "type": { + "type": "Type", + "id": 7 + }, + "service": { + "type": "Service", + "id": 8 + }, + "serviceJob": { + "type": "string", + "id": 9 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "SPARK": 1, + "NOTEBOOK": 2 + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "SUCCEEDED": 1, + "FAILED": 2, + "CANCELLED": 3, + "ABORTED": 4 + } + }, + "Service": { + "values": { + "SERVICE_UNSPECIFIED": 0, + "DATAPROC": 1 + } + } + } + }, + "SessionEvent": { + "oneofs": { + "detail": { + "oneof": [ + "query" + ] + } + }, + "fields": { + "message": { + "type": "string", + "id": 1 + }, + "userId": { + "type": "string", + "id": 2 + }, + "sessionId": { + "type": "string", + "id": 3 + }, + "type": { + "type": "EventType", + "id": 4 + }, + "query": { + "type": "QueryDetail", + "id": 5 + } + }, + "nested": { + "EventType": { + "values": { + "EVENT_TYPE_UNSPECIFIED": 0, + "START": 1, + "STOP": 2, + "QUERY": 3 + } + }, + "QueryDetail": { + "fields": { + "queryId": { + "type": "string", + "id": 1 + }, + "queryText": { + "type": "string", + "id": 2 + }, + "engine": { + "type": "Engine", + "id": 3 + }, + "duration": { + "type": "google.protobuf.Duration", + "id": 4 + }, + "resultSizeBytes": { + "type": "int64", + "id": 5 + }, + "dataProcessedBytes": { + "type": "int64", + "id": 6 + } + }, + "nested": { + "Engine": { + "values": { + "ENGINE_UNSPECIFIED": 0, + "SPARK_SQL": 1, + "BIGQUERY": 2 + } + } + } + } + } + }, + "MetadataService": { + "options": { + "(google.api.default_host)": "dataplex.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "GetEntity": { + "requestType": "GetEntityRequest", + "responseType": "Entity", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListEntities": { + "requestType": "ListEntitiesRequest", + "responseType": "ListEntitiesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/entities", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/entities" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetPartition": { + "requestType": "GetPartitionRequest", + "responseType": "Partition", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*/partitions/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*/partitions/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListPartitions": { + "requestType": "ListPartitionsRequest", + "responseType": "ListPartitionsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/entities/*}/partitions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/entities/*}/partitions" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "ListEntitiesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" + } + }, + "view": { + "type": "EntityView", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "pageSize": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "EntityView": { + "values": { + "ENTITY_VIEW_UNSPECIFIED": 0, + "TABLES": 1, + "FILESETS": 2 + } + } + } + }, + "ListEntitiesResponse": { + "fields": { + "entities": { + "rule": "repeated", + "type": "Entity", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetEntityRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" + } + }, + "view": { + "type": "EntityView", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "EntityView": { + "values": { + "ENTITY_VIEW_UNSPECIFIED": 0, + "BASIC": 1, + "SCHEMA": 2, + "FULL": 4 + } + } + } + }, + "ListPartitionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListPartitionsResponse": { + "fields": { + "partitions": { + "rule": "repeated", + "type": "Partition", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetPartitionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Partition" + } + } + } + }, + "Entity": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/Entity", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" + } + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "description": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "id": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "etag": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "type": { + "type": "Type", + "id": 10, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "asset": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "dataPath": { + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "dataPathPattern": { + "type": "string", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "catalogEntry": { + "type": "string", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "system": { + "type": "StorageSystem", + "id": 15, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "format": { + "type": "StorageFormat", + "id": 16, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "compatibility": { + "type": "CompatibilityStatus", + "id": 19, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "schema": { + "type": "Schema", + "id": 50, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "TABLE": 1, + "FILESET": 2 + } + }, + "CompatibilityStatus": { + "fields": { + "hiveMetastore": { + "type": "Compatibility", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "bigquery": { + "type": "Compatibility", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "Compatibility": { + "fields": { + "compatible": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "reason": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + } + } + } + } + }, + "Partition": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/Partition", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Partition" + } + }, + "values": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "location": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "etag": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Schema": { + "fields": { + "userManaged": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "fields": { + "rule": "repeated", + "type": "SchemaField", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "partitionFields": { + "rule": "repeated", + "type": "PartitionField", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "partitionStyle": { + "type": "PartitionStyle", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "BOOLEAN": 1, + "BYTE": 2, + "INT16": 3, + "INT32": 4, + "INT64": 5, + "FLOAT": 6, + "DOUBLE": 7, + "DECIMAL": 8, + "STRING": 9, + "BINARY": 10, + "TIMESTAMP": 11, + "DATE": 12, + "TIME": 13, + "RECORD": 14, + "NULL": 100 + } + }, + "Mode": { + "values": { + "MODE_UNSPECIFIED": 0, + "REQUIRED": 1, + "NULLABLE": 2, + "REPEATED": 3 + } + }, + "SchemaField": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "description": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "type": { + "type": "Type", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "mode": { + "type": "Mode", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "fields": { + "rule": "repeated", + "type": "SchemaField", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "PartitionField": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "type": { + "type": "Type", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "PartitionStyle": { + "values": { + "PARTITION_STYLE_UNSPECIFIED": 0, + "HIVE_COMPATIBLE": 1 + } + } + } + }, + "StorageFormat": { + "oneofs": { + "options": { + "oneof": [ + "csv", + "json" + ] + } + }, + "fields": { + "format": { + "type": "Format", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "compressionFormat": { + "type": "CompressionFormat", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "mimeType": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "csv": { + "type": "CsvOptions", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "json": { + "type": "JsonOptions", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "CsvOptions": { + "fields": { + "encoding": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "headerRows": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "delimiter": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "quote": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "JsonOptions": { + "fields": { + "encoding": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Format": { + "values": { + "FORMAT_UNSPECIFIED": 0, + "PARQUET": 1, + "AVRO": 2, + "ORC": 3, + "CSV": 100, + "JSON": 101, + "IMAGE": 200, + "AUDIO": 201, + "VIDEO": 202, + "TEXT": 203, + "TFRECORD": 204, + "OTHER": 1000, + "UNKNOWN": 1001 + } + }, + "CompressionFormat": { + "values": { + "COMPRESSION_FORMAT_UNSPECIFIED": 0, + "GZIP": 2, + "BZIP2": 3 + } + } + } + }, + "StorageSystem": { + "values": { + "STORAGE_SYSTEM_UNSPECIFIED": 0, + "CLOUD_STORAGE": 1, + "BIGQUERY": 2 + } + }, + "Lake": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/Lake", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "uid": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "description": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "state": { + "type": "State", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "serviceAccount": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "metastore": { + "type": "Metastore", + "id": 102, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "assetStatus": { + "type": "AssetStatus", + "id": 103, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "metastoreStatus": { + "type": "MetastoreStatus", + "id": 104, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "Metastore": { + "fields": { + "service": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "MetastoreStatus": { + "fields": { + "state": { + "type": "State", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "endpoint": { + "type": "string", + "id": 4 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "NONE": 1, + "READY": 2, + "UPDATING": 3, + "ERROR": 4 + } + } + } + } + } + }, + "AssetStatus": { + "fields": { + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "activeAssets": { + "type": "int32", + "id": 2 + }, + "securityPolicyApplyingAssets": { + "type": "int32", + "id": 3 + } + } + }, + "Zone": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/Zone", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" + } + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "uid": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "description": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "state": { + "type": "State", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "type": { + "type": "Type", + "id": 9, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "discoverySpec": { + "type": "DiscoverySpec", + "id": 103, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "resourceSpec": { + "type": "ResourceSpec", + "id": 104, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "assetStatus": { + "type": "AssetStatus", + "id": 105, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "RAW": 1, + "CURATED": 2 + } + }, + "ResourceSpec": { + "fields": { + "locationType": { + "type": "LocationType", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + }, + "nested": { + "LocationType": { + "values": { + "LOCATION_TYPE_UNSPECIFIED": 0, + "SINGLE_REGION": 1, + "MULTI_REGION": 2 + } + } + } + }, + "DiscoverySpec": { + "oneofs": { + "trigger": { + "oneof": [ + "schedule" + ] + } + }, + "fields": { + "enabled": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "includePatterns": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "excludePatterns": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "csvOptions": { + "type": "CsvOptions", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "jsonOptions": { + "type": "JsonOptions", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "schedule": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "CsvOptions": { + "fields": { + "headerRows": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "delimiter": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "encoding": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "disableTypeInference": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "JsonOptions": { + "fields": { + "encoding": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "disableTypeInference": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + } + } + }, + "Action": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/Action", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}" + }, + "oneofs": { + "details": { + "oneof": [ + "invalidDataFormat", + "incompatibleDataSchema", + "invalidDataPartition", + "missingData", + "missingResource", + "unauthorizedResource", + "failedSecurityPolicyApply", + "invalidDataOrganization" + ] + } + }, + "fields": { + "category": { + "type": "Category", + "id": 1 + }, + "issue": { + "type": "string", + "id": 2 + }, + "detectTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + }, + "name": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Action" + } + }, + "lake": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } + }, + "zone": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" + } + }, + "asset": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Asset" + } + }, + "dataLocations": { + "rule": "repeated", + "type": "string", + "id": 9 + }, + "invalidDataFormat": { + "type": "InvalidDataFormat", + "id": 10 + }, + "incompatibleDataSchema": { + "type": "IncompatibleDataSchema", + "id": 11 + }, + "invalidDataPartition": { + "type": "InvalidDataPartition", + "id": 12 + }, + "missingData": { + "type": "MissingData", + "id": 13 + }, + "missingResource": { + "type": "MissingResource", + "id": 14 + }, + "unauthorizedResource": { + "type": "UnauthorizedResource", + "id": 15 + }, + "failedSecurityPolicyApply": { + "type": "FailedSecurityPolicyApply", + "id": 21 + }, + "invalidDataOrganization": { + "type": "InvalidDataOrganization", + "id": 22 + } + }, + "nested": { + "Category": { + "values": { + "CATEGORY_UNSPECIFIED": 0, + "RESOURCE_MANAGEMENT": 1, + "SECURITY_POLICY": 2, + "DATA_DISCOVERY": 3 + } + }, + "MissingResource": { + "fields": {} + }, + "UnauthorizedResource": { + "fields": {} + }, + "FailedSecurityPolicyApply": { + "fields": { + "asset": { + "type": "string", + "id": 1 + } + } + }, + "InvalidDataFormat": { + "fields": { + "sampledDataLocations": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "expectedFormat": { + "type": "string", + "id": 2 + }, + "newFormat": { + "type": "string", + "id": 3 + } + } + }, + "IncompatibleDataSchema": { + "fields": { + "table": { + "type": "string", + "id": 1 + }, + "existingSchema": { + "type": "string", + "id": 2 + }, + "newSchema": { + "type": "string", + "id": 3 + }, + "sampledDataLocations": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "schemaChange": { + "type": "SchemaChange", + "id": 5 + } + }, + "nested": { + "SchemaChange": { + "values": { + "SCHEMA_CHANGE_UNSPECIFIED": 0, + "INCOMPATIBLE": 1, + "MODIFIED": 2 + } + } + } + }, + "InvalidDataPartition": { + "fields": { + "expectedStructure": { + "type": "PartitionStructure", + "id": 1 + } + }, + "nested": { + "PartitionStructure": { + "values": { + "PARTITION_STRUCTURE_UNSPECIFIED": 0, + "CONSISTENT_KEYS": 1, + "HIVE_STYLE_KEYS": 2 + } + } + } + }, + "MissingData": { + "fields": {} + }, + "InvalidDataOrganization": { + "fields": {} + } + } + }, + "Asset": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/Asset", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Asset" + } + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "uid": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "description": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "state": { + "type": "State", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "resourceSpec": { + "type": "ResourceSpec", + "id": 100, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "resourceStatus": { + "type": "ResourceStatus", + "id": 101, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "securityStatus": { + "type": "SecurityStatus", + "id": 103, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "discoverySpec": { + "type": "DiscoverySpec", + "id": 106, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "discoveryStatus": { + "type": "DiscoveryStatus", + "id": 107, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "SecurityStatus": { + "fields": { + "state": { + "type": "State", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "READY": 1, + "APPLYING": 2, + "ERROR": 3 + } + } + } + }, + "DiscoverySpec": { + "oneofs": { + "trigger": { + "oneof": [ + "schedule" + ] + } + }, + "fields": { + "enabled": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "includePatterns": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "excludePatterns": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "csvOptions": { + "type": "CsvOptions", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "jsonOptions": { + "type": "JsonOptions", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "schedule": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "CsvOptions": { + "fields": { + "headerRows": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "delimiter": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "encoding": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "disableTypeInference": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "JsonOptions": { + "fields": { + "encoding": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "disableTypeInference": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "ResourceSpec": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "type": { + "type": "Type", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "STORAGE_BUCKET": 1, + "BIGQUERY_DATASET": 2 + } + } + } + }, + "ResourceStatus": { + "fields": { + "state": { + "type": "State", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "READY": 1, + "ERROR": 2 + } + } + } + }, + "DiscoveryStatus": { + "fields": { + "state": { + "type": "State", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "lastRunTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + }, + "stats": { + "type": "Stats", + "id": 6 + }, + "lastRunDuration": { + "type": "google.protobuf.Duration", + "id": 7 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "SCHEDULED": 1, + "IN_PROGRESS": 2, + "PAUSED": 3, + "DISABLED": 5 + } + }, + "Stats": { + "fields": { + "dataItems": { + "type": "int64", + "id": 1 + }, + "dataSize": { + "type": "int64", + "id": 2 + }, + "tables": { + "type": "int64", + "id": 3 + }, + "filesets": { + "type": "int64", + "id": 4 + } + } + } + } + } + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "ACTIVE": 1, + "CREATING": 2, + "DELETING": 3, + "ACTION_REQUIRED": 4 + } + }, + "DataplexService": { + "options": { + "(google.api.default_host)": "dataplex.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreateLake": { + "requestType": "CreateLakeRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/lakes", + "(google.api.http).body": "lake", + "(google.api.method_signature)": "parent,lake,lake_id", + "(google.longrunning.operation_info).response_type": "Lake", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/lakes", + "body": "lake" + } + }, + { + "(google.api.method_signature)": "parent,lake,lake_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Lake", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateLake": { + "requestType": "UpdateLakeRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{lake.name=projects/*/locations/*/lakes/*}", + "(google.api.http).body": "lake", + "(google.api.method_signature)": "lake,update_mask", + "(google.longrunning.operation_info).response_type": "Lake", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{lake.name=projects/*/locations/*/lakes/*}", + "body": "lake" + } + }, + { + "(google.api.method_signature)": "lake,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Lake", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteLake": { + "requestType": "DeleteLakeRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/lakes/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListLakes": { + "requestType": "ListLakesRequest", + "responseType": "ListLakesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/lakes", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/lakes" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetLake": { + "requestType": "GetLakeRequest", + "responseType": "Lake", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/lakes/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListLakeActions": { + "requestType": "ListLakeActionsRequest", + "responseType": "ListActionsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*}/actions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*}/actions" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateZone": { + "requestType": "CreateZoneRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/lakes/*}/zones", + "(google.api.http).body": "zone", + "(google.api.method_signature)": "parent,zone,zone_id", + "(google.longrunning.operation_info).response_type": "Zone", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/lakes/*}/zones", + "body": "zone" + } + }, + { + "(google.api.method_signature)": "parent,zone,zone_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Zone", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateZone": { + "requestType": "UpdateZoneRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{zone.name=projects/*/locations/*/lakes/*/zones/*}", + "(google.api.http).body": "zone", + "(google.api.method_signature)": "zone,update_mask", + "(google.longrunning.operation_info).response_type": "Zone", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{zone.name=projects/*/locations/*/lakes/*/zones/*}", + "body": "zone" + } + }, + { + "(google.api.method_signature)": "zone,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Zone", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteZone": { + "requestType": "DeleteZoneRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListZones": { + "requestType": "ListZonesRequest", + "responseType": "ListZonesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*}/zones", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*}/zones" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetZone": { + "requestType": "GetZoneRequest", + "responseType": "Zone", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListZoneActions": { + "requestType": "ListZoneActionsRequest", + "responseType": "ListActionsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/actions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/actions" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateAsset": { + "requestType": "CreateAssetRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets", + "(google.api.http).body": "asset", + "(google.api.method_signature)": "parent,asset,asset_id", + "(google.longrunning.operation_info).response_type": "Asset", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets", + "body": "asset" + } + }, + { + "(google.api.method_signature)": "parent,asset,asset_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Asset", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateAsset": { + "requestType": "UpdateAssetRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{asset.name=projects/*/locations/*/lakes/*/zones/*/assets/*}", + "(google.api.http).body": "asset", + "(google.api.method_signature)": "asset,update_mask", + "(google.longrunning.operation_info).response_type": "Asset", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{asset.name=projects/*/locations/*/lakes/*/zones/*/assets/*}", + "body": "asset" + } + }, + { + "(google.api.method_signature)": "asset,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Asset", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteAsset": { + "requestType": "DeleteAssetRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListAssets": { + "requestType": "ListAssetsRequest", + "responseType": "ListAssetsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetAsset": { + "requestType": "GetAssetRequest", + "responseType": "Asset", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListAssetActions": { + "requestType": "ListAssetActionsRequest", + "responseType": "ListActionsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/assets/*}/actions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/assets/*}/actions" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateTask": { + "requestType": "CreateTaskRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/lakes/*}/tasks", + "(google.api.http).body": "task", + "(google.api.method_signature)": "parent,task,task_id", + "(google.longrunning.operation_info).response_type": "Task", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/lakes/*}/tasks", + "body": "task" + } + }, + { + "(google.api.method_signature)": "parent,task,task_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Task", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateTask": { + "requestType": "UpdateTaskRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{task.name=projects/*/locations/*/lakes/*/tasks/*}", + "(google.api.http).body": "task", + "(google.api.method_signature)": "task,update_mask", + "(google.longrunning.operation_info).response_type": "Task", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{task.name=projects/*/locations/*/lakes/*/tasks/*}", + "body": "task" + } + }, + { + "(google.api.method_signature)": "task,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Task", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteTask": { + "requestType": "DeleteTaskRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListTasks": { + "requestType": "ListTasksRequest", + "responseType": "ListTasksResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*}/tasks", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*}/tasks" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetTask": { + "requestType": "GetTaskRequest", + "responseType": "Task", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListJobs": { + "requestType": "ListJobsRequest", + "responseType": "ListJobsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/tasks/*}/jobs", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*/tasks/*}/jobs" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetJob": { + "requestType": "GetJobRequest", + "responseType": "Job", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CancelJob": { + "requestType": "CancelJobRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}:cancel", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}:cancel", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + } + } + }, + "CreateLakeRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "lakeId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "lake": { + "type": "Lake", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateLakeRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "lake": { + "type": "Lake", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteLakeRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } + } + } + }, + "ListLakesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListLakesResponse": { + "fields": { + "lakes": { + "rule": "repeated", + "type": "Lake", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachableLocations": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "ListLakeActionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListActionsResponse": { + "fields": { + "actions": { + "rule": "repeated", + "type": "Action", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetLakeRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } + } + } + }, + "CreateZoneRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } + }, + "zoneId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "Zone", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateZoneRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "Zone", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteZoneRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" + } + } + } + }, + "ListZonesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListZonesResponse": { + "fields": { + "zones": { + "rule": "repeated", + "type": "Zone", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "ListZoneActionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GetZoneRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" + } + } + } + }, + "CreateAssetRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" + } + }, + "assetId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "asset": { + "type": "Asset", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateAssetRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "asset": { + "type": "Asset", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteAssetRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Asset" + } + } + } + }, + "ListAssetsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListAssetsResponse": { + "fields": { + "assets": { + "rule": "repeated", + "type": "Asset", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "ListAssetActionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Asset" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GetAssetRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Asset" + } + } + } + }, + "OperationMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "target": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "verb": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "statusMessage": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "requestedCancellation": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "apiVersion": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "CreateTaskRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } + }, + "taskId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "task": { + "type": "Task", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateTaskRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "task": { + "type": "Task", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteTaskRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Task" + } + } + } + }, + "ListTasksRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListTasksResponse": { + "fields": { + "tasks": { + "rule": "repeated", + "type": "Task", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachableLocations": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetTaskRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Task" + } + } + } + }, + "GetJobRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Job" + } + } + } + }, + "ListJobsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Task" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListJobsResponse": { + "fields": { + "jobs": { + "rule": "repeated", + "type": "Job", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CancelJobRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Job" + } + } + } + }, + "Task": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/Task", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}" + }, + "oneofs": { + "config": { + "oneof": [ + "spark" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Task" + } + }, + "uid": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "displayName": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "state": { + "type": "State", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "triggerSpec": { + "type": "TriggerSpec", + "id": 100, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "executionSpec": { + "type": "ExecutionSpec", + "id": 101, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "spark": { + "type": "SparkTaskConfig", + "id": 300 + } + }, + "nested": { + "InfrastructureSpec": { + "oneofs": { + "resources": { + "oneof": [ + "batch" + ] + }, + "runtime": { + "oneof": [ + "containerImage" + ] + }, + "network": { + "oneof": [ + "vpcNetwork" + ] + } + }, + "fields": { + "batch": { + "type": "BatchComputeResources", + "id": 52 + }, + "containerImage": { + "type": "ContainerImageRuntime", + "id": 101 + }, + "vpcNetwork": { + "type": "VpcNetwork", + "id": 150 + } + }, + "nested": { + "BatchComputeResources": { + "fields": { + "executorsCount": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "maxExecutorsCount": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ContainerImageRuntime": { + "fields": { + "javaJars": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pythonPackages": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "properties": { + "keyType": "string", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "VpcNetwork": { + "oneofs": { + "networkName": { + "oneof": [ + "network", + "subNetwork" + ] + } + }, + "fields": { + "network": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "subNetwork": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "networkTags": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "TriggerSpec": { + "oneofs": { + "trigger": { + "oneof": [ + "schedule" + ] + } + }, + "fields": { + "type": { + "type": "Type", + "id": 5, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "disabled": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "maxRetries": { + "type": "int32", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "schedule": { + "type": "string", + "id": 100, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "ON_DEMAND": 1, + "RECURRING": 2 + } + } + } + }, + "ExecutionSpec": { + "fields": { + "args": { + "keyType": "string", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "serviceAccount": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "maxJobExecutionLifetime": { + "type": "google.protobuf.Duration", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SparkTaskConfig": { + "oneofs": { + "driver": { + "oneof": [ + "mainJarFileUri", + "mainClass", + "pythonScriptFile", + "sqlScriptFile", + "sqlScript" + ] + } + }, + "fields": { + "mainJarFileUri": { + "type": "string", + "id": 100 + }, + "mainClass": { + "type": "string", + "id": 101 + }, + "pythonScriptFile": { + "type": "string", + "id": 102 + }, + "sqlScriptFile": { + "type": "string", + "id": 104 + }, + "sqlScript": { + "type": "string", + "id": 105 + }, + "fileUris": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "archiveUris": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "infrastructureSpec": { + "type": "InfrastructureSpec", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "Job": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/Job", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Job" + } + }, + "uid": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "retryCount": { + "type": "uint32", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "service": { + "type": "Service", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "serviceJob": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "message": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "Service": { + "values": { + "SERVICE_UNSPECIFIED": 0, + "DATAPROC": 1 + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "RUNNING": 1, + "CANCELLING": 2, + "CANCELLED": 3, + "SUCCEEDED": 4, + "FAILED": 5, + "ABORTED": 6 + } + } + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "ResourceProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "FileDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + } + } + }, + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "FieldDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REQUIRED": 2, + "LABEL_REPEATED": 3 + } + } + } + }, + "OneofDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "phpGenericServices": { + "type": "bool", + "id": 42, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + } + } + }, + "OneofOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + } + } + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + } + } + }, + "longrunning": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.LongRunning", + "go_package": "google.golang.org/genproto/googleapis/longrunning;longrunning", + "java_multiple_files": true, + "java_outer_classname": "OperationsProto", + "java_package": "com.google.longrunning", + "php_namespace": "Google\\LongRunning" + }, + "nested": { + "operationInfo": { + "type": "google.longrunning.OperationInfo", + "id": 1049, + "extend": "google.protobuf.MethodOptions" + }, + "Operations": { + "options": { + "(google.api.default_host)": "longrunning.googleapis.com" + }, + "methods": { + "ListOperations": { + "requestType": "ListOperationsRequest", + "responseType": "ListOperationsResponse", + "options": { + "(google.api.http).get": "/v1/{name=operations}", + "(google.api.method_signature)": "name,filter" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations}" + } + }, + { + "(google.api.method_signature)": "name,filter" + } + ] + }, + "GetOperation": { + "requestType": "GetOperationRequest", + "responseType": "Operation", + "options": { + "(google.api.http).get": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteOperation": { + "requestType": "DeleteOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CancelOperation": { + "requestType": "CancelOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1/{name=operations/**}:cancel", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=operations/**}:cancel", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "WaitOperation": { + "requestType": "WaitOperationRequest", + "responseType": "Operation" + } + } + }, + "Operation": { + "oneofs": { + "result": { + "oneof": [ + "error", + "response" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "metadata": { + "type": "google.protobuf.Any", + "id": 2 + }, + "done": { + "type": "bool", + "id": 3 + }, + "error": { + "type": "google.rpc.Status", + "id": 4 + }, + "response": { + "type": "google.protobuf.Any", + "id": 5 + } + } + }, + "GetOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "ListOperationsRequest": { + "fields": { + "name": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListOperationsResponse": { + "fields": { + "operations": { + "rule": "repeated", + "type": "Operation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CancelOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "DeleteOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "WaitOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "timeout": { + "type": "google.protobuf.Duration", + "id": 2 + } + } + }, + "OperationInfo": { + "fields": { + "responseType": { + "type": "string", + "id": 1 + }, + "metadataType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "rpc": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", + "java_multiple_files": true, + "java_outer_classname": "StatusProto", + "java_package": "com.google.rpc", + "objc_class_prefix": "RPC" + }, + "nested": { + "Status": { + "fields": { + "code": { + "type": "int32", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "details": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.cancel_job.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.cancel_job.js new file mode 100644 index 00000000000..571a9e7d004 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.cancel_job.js @@ -0,0 +1,54 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataplexService_CancelJob_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the job: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callCancelJob() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.cancelJob(request); + console.log(response); + } + + callCancelJob(); + // [END dataplex_v1_generated_DataplexService_CancelJob_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_asset.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_asset.js new file mode 100644 index 00000000000..9f6b6fe17dc --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_asset.js @@ -0,0 +1,77 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(parent, assetId, asset) { + // [START dataplex_v1_generated_DataplexService_CreateAsset_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}` + */ + // const parent = 'abc123' + /** + * Required. Asset identifier. + * This ID will be used to generate names such as table names when publishing + * metadata to Hive Metastore and BigQuery. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique within the zone. + */ + // const assetId = 'abc123' + /** + * Required. Asset resource. + */ + // const asset = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callCreateAsset() { + // Construct request + const request = { + parent, + assetId, + asset, + }; + + // Run request + const [operation] = await dataplexClient.createAsset(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateAsset(); + // [END dataplex_v1_generated_DataplexService_CreateAsset_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_lake.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_lake.js new file mode 100644 index 00000000000..277557d813a --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_lake.js @@ -0,0 +1,78 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(parent, lakeId, lake) { + // [START dataplex_v1_generated_DataplexService_CreateLake_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the lake location, of the form: + * `projects/{project_number}/locations/{location_id}` + * where `location_id` refers to a GCP region. + */ + // const parent = 'abc123' + /** + * Required. Lake identifier. + * This ID will be used to generate names such as database and dataset names + * when publishing metadata to Hive Metastore and BigQuery. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique within the customer project / location. + */ + // const lakeId = 'abc123' + /** + * Required. Lake resource + */ + // const lake = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callCreateLake() { + // Construct request + const request = { + parent, + lakeId, + lake, + }; + + // Run request + const [operation] = await dataplexClient.createLake(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateLake(); + // [END dataplex_v1_generated_DataplexService_CreateLake_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_task.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_task.js new file mode 100644 index 00000000000..3a1d0f39baf --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_task.js @@ -0,0 +1,70 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(parent, taskId, task) { + // [START dataplex_v1_generated_DataplexService_CreateTask_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + */ + // const parent = 'abc123' + /** + * Required. Task identifier. + */ + // const taskId = 'abc123' + /** + * Required. Task resource. + */ + // const task = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callCreateTask() { + // Construct request + const request = { + parent, + taskId, + task, + }; + + // Run request + const [operation] = await dataplexClient.createTask(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateTask(); + // [END dataplex_v1_generated_DataplexService_CreateTask_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_zone.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_zone.js new file mode 100644 index 00000000000..fa5a28f442c --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_zone.js @@ -0,0 +1,78 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(parent, zoneId, zone) { + // [START dataplex_v1_generated_DataplexService_CreateZone_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + */ + // const parent = 'abc123' + /** + * Required. Zone identifier. + * This ID will be used to generate names such as database and dataset names + * when publishing metadata to Hive Metastore and BigQuery. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique across all lakes from all locations in a project. + * * Must not be one of the reserved IDs (i.e. "default", "global-temp") + */ + // const zoneId = 'abc123' + /** + * Required. Zone resource. + */ + // const zone = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callCreateZone() { + // Construct request + const request = { + parent, + zoneId, + zone, + }; + + // Run request + const [operation] = await dataplexClient.createZone(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateZone(); + // [END dataplex_v1_generated_DataplexService_CreateZone_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_asset.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_asset.js new file mode 100644 index 00000000000..34d11856550 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_asset.js @@ -0,0 +1,55 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataplexService_DeleteAsset_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callDeleteAsset() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await dataplexClient.deleteAsset(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteAsset(); + // [END dataplex_v1_generated_DataplexService_DeleteAsset_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_lake.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_lake.js new file mode 100644 index 00000000000..108970521fe --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_lake.js @@ -0,0 +1,55 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataplexService_DeleteLake_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}` + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callDeleteLake() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await dataplexClient.deleteLake(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteLake(); + // [END dataplex_v1_generated_DataplexService_DeleteLake_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_task.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_task.js new file mode 100644 index 00000000000..c50e0e9f176 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_task.js @@ -0,0 +1,55 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataplexService_DeleteTask_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the task: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callDeleteTask() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await dataplexClient.deleteTask(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteTask(); + // [END dataplex_v1_generated_DataplexService_DeleteTask_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_zone.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_zone.js new file mode 100644 index 00000000000..b82b3de916f --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_zone.js @@ -0,0 +1,55 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataplexService_DeleteZone_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callDeleteZone() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await dataplexClient.deleteZone(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteZone(); + // [END dataplex_v1_generated_DataplexService_DeleteZone_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_asset.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_asset.js new file mode 100644 index 00000000000..ee6bc13b0e4 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_asset.js @@ -0,0 +1,54 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataplexService_GetAsset_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callGetAsset() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.getAsset(request); + console.log(response); + } + + callGetAsset(); + // [END dataplex_v1_generated_DataplexService_GetAsset_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_job.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_job.js new file mode 100644 index 00000000000..92512f727cc --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_job.js @@ -0,0 +1,54 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataplexService_GetJob_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the job: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callGetJob() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.getJob(request); + console.log(response); + } + + callGetJob(); + // [END dataplex_v1_generated_DataplexService_GetJob_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_lake.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_lake.js new file mode 100644 index 00000000000..dca3aad3666 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_lake.js @@ -0,0 +1,54 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataplexService_GetLake_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callGetLake() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.getLake(request); + console.log(response); + } + + callGetLake(); + // [END dataplex_v1_generated_DataplexService_GetLake_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_task.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_task.js new file mode 100644 index 00000000000..2ec07de5925 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_task.js @@ -0,0 +1,54 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataplexService_GetTask_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the task: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}` + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callGetTask() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.getTask(request); + console.log(response); + } + + callGetTask(); + // [END dataplex_v1_generated_DataplexService_GetTask_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_zone.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_zone.js new file mode 100644 index 00000000000..79cb650b73a --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_zone.js @@ -0,0 +1,54 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataplexService_GetZone_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callGetZone() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.getZone(request); + console.log(response); + } + + callGetZone(); + // [END dataplex_v1_generated_DataplexService_GetZone_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_asset_actions.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_asset_actions.js new file mode 100644 index 00000000000..db2dd765c8a --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_asset_actions.js @@ -0,0 +1,69 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_DataplexService_ListAssetActions_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of actions to return. The service may return fewer than this + * value. If unspecified, at most 10 actions will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListAssetActions` call. Provide this + * to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListAssetActions` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callListAssetActions() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataplexClient.listAssetActionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAssetActions(); + // [END dataplex_v1_generated_DataplexService_ListAssetActions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_assets.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_assets.js new file mode 100644 index 00000000000..c6622647c4c --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_assets.js @@ -0,0 +1,77 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_DataplexService_ListAssets_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of asset to return. The service may return fewer than + * this value. If unspecified, at most 10 assets will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListAssets` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListAssets` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter request. + */ + // const filter = 'abc123' + /** + * Optional. Order by fields for the result. + */ + // const orderBy = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callListAssets() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataplexClient.listAssetsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAssets(); + // [END dataplex_v1_generated_DataplexService_ListAssets_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_jobs.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_jobs.js new file mode 100644 index 00000000000..edef9580927 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_jobs.js @@ -0,0 +1,69 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_DataplexService_ListJobs_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent environment: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of jobs to return. The service may return fewer than + * this value. If unspecified, at most 10 jobs will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListJobs` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListJobs` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callListJobs() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataplexClient.listJobsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListJobs(); + // [END dataplex_v1_generated_DataplexService_ListJobs_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lake_actions.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lake_actions.js new file mode 100644 index 00000000000..ebf6bcd4aaf --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lake_actions.js @@ -0,0 +1,69 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_DataplexService_ListLakeActions_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}` + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of actions to return. The service may return fewer than this + * value. If unspecified, at most 10 actions will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListLakeActions` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListLakeActions` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callListLakeActions() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataplexClient.listLakeActionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListLakeActions(); + // [END dataplex_v1_generated_DataplexService_ListLakeActions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lakes.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lakes.js new file mode 100644 index 00000000000..0c9b5b51d3d --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lakes.js @@ -0,0 +1,77 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_DataplexService_ListLakes_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the lake location, of the form: + * `projects/{project_number}/locations/{location_id}` + * where `location_id` refers to a GCP region. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of Lakes to return. The service may return fewer than this + * value. If unspecified, at most 10 lakes will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListLakes` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListLakes` must match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter request. + */ + // const filter = 'abc123' + /** + * Optional. Order by fields for the result. + */ + // const orderBy = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callListLakes() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataplexClient.listLakesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListLakes(); + // [END dataplex_v1_generated_DataplexService_ListLakes_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_tasks.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_tasks.js new file mode 100644 index 00000000000..a52d7c8d820 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_tasks.js @@ -0,0 +1,76 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_DataplexService_ListTasks_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of tasks to return. The service may return fewer than this + * value. If unspecified, at most 10 tasks will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListZones` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZones` must match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter request. + */ + // const filter = 'abc123' + /** + * Optional. Order by fields for the result. + */ + // const orderBy = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callListTasks() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataplexClient.listTasksAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListTasks(); + // [END dataplex_v1_generated_DataplexService_ListTasks_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zone_actions.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zone_actions.js new file mode 100644 index 00000000000..f1eb3d166e7 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zone_actions.js @@ -0,0 +1,69 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_DataplexService_ListZoneActions_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of actions to return. The service may return fewer than this + * value. If unspecified, at most 10 actions will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListZoneActions` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZoneActions` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callListZoneActions() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataplexClient.listZoneActionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListZoneActions(); + // [END dataplex_v1_generated_DataplexService_ListZoneActions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zones.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zones.js new file mode 100644 index 00000000000..7d439497c8f --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zones.js @@ -0,0 +1,76 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_DataplexService_ListZones_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of zones to return. The service may return fewer than this + * value. If unspecified, at most 10 zones will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListZones` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZones` must match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter request. + */ + // const filter = 'abc123' + /** + * Optional. Order by fields for the result. + */ + // const orderBy = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callListZones() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataplexClient.listZonesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListZones(); + // [END dataplex_v1_generated_DataplexService_ListZones_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_asset.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_asset.js new file mode 100644 index 00000000000..88a58559c22 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_asset.js @@ -0,0 +1,65 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(updateMask, asset) { + // [START dataplex_v1_generated_DataplexService_UpdateAsset_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Mask of fields to update. + */ + // const updateMask = {} + /** + * Required. Update description. + * Only fields specified in `update_mask` are updated. + */ + // const asset = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callUpdateAsset() { + // Construct request + const request = { + updateMask, + asset, + }; + + // Run request + const [operation] = await dataplexClient.updateAsset(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateAsset(); + // [END dataplex_v1_generated_DataplexService_UpdateAsset_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_lake.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_lake.js new file mode 100644 index 00000000000..d4fb25c6bfe --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_lake.js @@ -0,0 +1,65 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(updateMask, lake) { + // [START dataplex_v1_generated_DataplexService_UpdateLake_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Mask of fields to update. + */ + // const updateMask = {} + /** + * Required. Update description. + * Only fields specified in `update_mask` are updated. + */ + // const lake = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callUpdateLake() { + // Construct request + const request = { + updateMask, + lake, + }; + + // Run request + const [operation] = await dataplexClient.updateLake(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateLake(); + // [END dataplex_v1_generated_DataplexService_UpdateLake_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_task.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_task.js new file mode 100644 index 00000000000..e6de0b6d2d2 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_task.js @@ -0,0 +1,65 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(updateMask, task) { + // [START dataplex_v1_generated_DataplexService_UpdateTask_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Mask of fields to update. + */ + // const updateMask = {} + /** + * Required. Update description. + * Only fields specified in `update_mask` are updated. + */ + // const task = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callUpdateTask() { + // Construct request + const request = { + updateMask, + task, + }; + + // Run request + const [operation] = await dataplexClient.updateTask(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateTask(); + // [END dataplex_v1_generated_DataplexService_UpdateTask_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_zone.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_zone.js new file mode 100644 index 00000000000..6243dd9f770 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_zone.js @@ -0,0 +1,65 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(updateMask, zone) { + // [START dataplex_v1_generated_DataplexService_UpdateZone_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Mask of fields to update. + */ + // const updateMask = {} + /** + * Required. Update description. + * Only fields specified in `update_mask` are updated. + */ + // const zone = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callUpdateZone() { + // Construct request + const request = { + updateMask, + zone, + }; + + // Run request + const [operation] = await dataplexClient.updateZone(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateZone(); + // [END dataplex_v1_generated_DataplexService_UpdateZone_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_entity.js b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_entity.js new file mode 100644 index 00000000000..1dcf6ebecfc --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_entity.js @@ -0,0 +1,59 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_MetadataService_GetEntity_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` + */ + // const name = 'abc123' + /** + * Optional. Used to select the subset of entity information to return. + * Defaults to `BASIC`. + */ + // const view = {} + + // Imports the Dataplex library + const {MetadataServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new MetadataServiceClient(); + + async function callGetEntity() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.getEntity(request); + console.log(response); + } + + callGetEntity(); + // [END dataplex_v1_generated_MetadataService_GetEntity_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_partition.js b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_partition.js new file mode 100644 index 00000000000..955eaa0b85d --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_partition.js @@ -0,0 +1,54 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_MetadataService_GetPartition_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the partition: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_id}`. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {MetadataServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new MetadataServiceClient(); + + async function callGetPartition() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.getPartition(request); + console.log(response); + } + + callGetPartition(); + // [END dataplex_v1_generated_MetadataService_GetPartition_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_entities.js b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_entities.js new file mode 100644 index 00000000000..7c2f5211b1b --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_entities.js @@ -0,0 +1,78 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(parent, view) { + // [START dataplex_v1_generated_MetadataService_ListEntities_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + */ + // const parent = 'abc123' + /** + * Required. Specify the entity view to make a partial list request. + */ + // const view = {} + /** + * Optional. Maximum number of entities to return. The service may return fewer than + * this value. If unspecified, at most 10 entities will be returned. The + * maximum value is 1000; values above 1000 are set to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListEntities` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListEntities` must match the call that provided the + * page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter request by name prefix. + */ + // const filter = 'abc123' + + // Imports the Dataplex library + const {MetadataServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new MetadataServiceClient(); + + async function callListEntities() { + // Construct request + const request = { + parent, + view, + }; + + // Run request + const iterable = await dataplexClient.listEntitiesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListEntities(); + // [END dataplex_v1_generated_MetadataService_ListEntities_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_partitions.js b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_partitions.js new file mode 100644 index 00000000000..233476471a8 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_partitions.js @@ -0,0 +1,73 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_MetadataService_ListPartitions_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of partitions to return. The service may return fewer than + * this value. If unspecified, at most 10 partitions will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListPartitions` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListPartitions` must match the call that provided the + * page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter request. + */ + // const filter = 'abc123' + + // Imports the Dataplex library + const {MetadataServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new MetadataServiceClient(); + + async function callListPartitions() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataplexClient.listPartitionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListPartitions(); + // [END dataplex_v1_generated_MetadataService_ListPartitions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/src/index.ts b/packages/google-cloud-dataplex/src/index.ts new file mode 100644 index 00000000000..b43c86f4bc8 --- /dev/null +++ b/packages/google-cloud-dataplex/src/index.ts @@ -0,0 +1,29 @@ +// Copyright 2020 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by synthtool. ** +// ** https://github.com/googleapis/synthtool ** +// ** All changes to this file may be overwritten. ** + +import * as v1 from './v1'; + +const DataplexServiceClient = v1.DataplexServiceClient; +type DataplexServiceClient = v1.DataplexServiceClient; +const MetadataServiceClient = v1.MetadataServiceClient; +type MetadataServiceClient = v1.MetadataServiceClient; + +export {v1, DataplexServiceClient, MetadataServiceClient}; +export default {v1, DataplexServiceClient, MetadataServiceClient}; +import * as protos from '../protos/protos'; +export {protos}; diff --git a/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts b/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts new file mode 100644 index 00000000000..792f44008ad --- /dev/null +++ b/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts @@ -0,0 +1,5318 @@ +// Copyright 2022 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import * as gax from 'google-gax'; +import { + Callback, + CallOptions, + Descriptors, + ClientOptions, + LROperation, + PaginationCallback, + GaxCall, +} from 'google-gax'; + +import {Transform} from 'stream'; +import {RequestType} from 'google-gax/build/src/apitypes'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1/dataplex_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './dataplex_service_client_config.json'; +import {operationsProtos} from 'google-gax'; +const version = require('../../../package.json').version; + +/** + * Dataplex service provides data lakes as a service. The primary resources + * offered by this service are Lakes, Zones and Assets which collectively allow + * a data adminstrator to organize, manage, secure and catalog data across their + * organization located across cloud projects in a variety of storage systems + * including Cloud Storage and BigQuery. + * @class + * @memberof v1 + */ +export class DataplexServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + dataplexServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of DataplexServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. + * In fallback mode, a special browser-compatible transport implementation is used + * instead of gRPC transport. In browser context (if the `window` object is defined) + * the fallback mode is enabled automatically; set `options.fallback` to `false` + * if you need to override this behavior. + */ + constructor(opts?: ClientOptions) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof DataplexServiceClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gax.fallback : gax; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + assetPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}' + ), + entityPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}' + ), + jobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}' + ), + lakePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + partitionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}' + ), + projectLocationLakeActionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/actions/{action}' + ), + projectLocationLakeZoneActionPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}' + ), + projectLocationLakeZoneAssetActionPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}' + ), + taskPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}' + ), + zonePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listLakes: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'lakes' + ), + listLakeActions: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'actions' + ), + listZones: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'zones' + ), + listZoneActions: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'actions' + ), + listAssets: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'assets' + ), + listAssetActions: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'actions' + ), + listTasks: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'tasks' + ), + listJobs: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'jobs' + ), + }; + + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); + + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + + this.operationsClient = this._gaxModule + .lro({ + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }) + .operationsClient(opts); + const createLakeResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.Lake' + ) as gax.protobuf.Type; + const createLakeMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updateLakeResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.Lake' + ) as gax.protobuf.Type; + const updateLakeMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteLakeResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteLakeMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata' + ) as gax.protobuf.Type; + const createZoneResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.Zone' + ) as gax.protobuf.Type; + const createZoneMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updateZoneResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.Zone' + ) as gax.protobuf.Type; + const updateZoneMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteZoneResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteZoneMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata' + ) as gax.protobuf.Type; + const createAssetResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.Asset' + ) as gax.protobuf.Type; + const createAssetMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updateAssetResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.Asset' + ) as gax.protobuf.Type; + const updateAssetMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteAssetResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteAssetMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata' + ) as gax.protobuf.Type; + const createTaskResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.Task' + ) as gax.protobuf.Type; + const createTaskMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updateTaskResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.Task' + ) as gax.protobuf.Type; + const updateTaskMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteTaskResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteTaskMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata' + ) as gax.protobuf.Type; + + this.descriptors.longrunning = { + createLake: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createLakeResponse.decode.bind(createLakeResponse), + createLakeMetadata.decode.bind(createLakeMetadata) + ), + updateLake: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateLakeResponse.decode.bind(updateLakeResponse), + updateLakeMetadata.decode.bind(updateLakeMetadata) + ), + deleteLake: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteLakeResponse.decode.bind(deleteLakeResponse), + deleteLakeMetadata.decode.bind(deleteLakeMetadata) + ), + createZone: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createZoneResponse.decode.bind(createZoneResponse), + createZoneMetadata.decode.bind(createZoneMetadata) + ), + updateZone: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateZoneResponse.decode.bind(updateZoneResponse), + updateZoneMetadata.decode.bind(updateZoneMetadata) + ), + deleteZone: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteZoneResponse.decode.bind(deleteZoneResponse), + deleteZoneMetadata.decode.bind(deleteZoneMetadata) + ), + createAsset: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createAssetResponse.decode.bind(createAssetResponse), + createAssetMetadata.decode.bind(createAssetMetadata) + ), + updateAsset: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateAssetResponse.decode.bind(updateAssetResponse), + updateAssetMetadata.decode.bind(updateAssetMetadata) + ), + deleteAsset: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteAssetResponse.decode.bind(deleteAssetResponse), + deleteAssetMetadata.decode.bind(deleteAssetMetadata) + ), + createTask: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createTaskResponse.decode.bind(createTaskResponse), + createTaskMetadata.decode.bind(createTaskMetadata) + ), + updateTask: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateTaskResponse.decode.bind(updateTaskResponse), + updateTaskMetadata.decode.bind(updateTaskMetadata) + ), + deleteTask: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteTaskResponse.decode.bind(deleteTaskResponse), + deleteTaskMetadata.decode.bind(deleteTaskMetadata) + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.dataplex.v1.DataplexService', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = gax.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.dataplexServiceStub) { + return this.dataplexServiceStub; + } + + // Put together the "service stub" for + // google.cloud.dataplex.v1.DataplexService. + this.dataplexServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.dataplex.v1.DataplexService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.dataplex.v1.DataplexService, + this._opts, + this._providedCustomServicePath + ) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const dataplexServiceStubMethods = [ + 'createLake', + 'updateLake', + 'deleteLake', + 'listLakes', + 'getLake', + 'listLakeActions', + 'createZone', + 'updateZone', + 'deleteZone', + 'listZones', + 'getZone', + 'listZoneActions', + 'createAsset', + 'updateAsset', + 'deleteAsset', + 'listAssets', + 'getAsset', + 'listAssetActions', + 'createTask', + 'updateTask', + 'deleteTask', + 'listTasks', + 'getTask', + 'listJobs', + 'getJob', + 'cancelJob', + ]; + for (const methodName of dataplexServiceStubMethods) { + const callPromise = this.dataplexServiceStub.then( + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.dataplexServiceStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'dataplex.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'dataplex.googleapis.com'; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return ['https://www.googleapis.com/auth/cloud-platform']; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + /** + * Retrieves a lake resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Lake]{@link google.cloud.dataplex.v1.Lake}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.get_lake.js + * region_tag:dataplex_v1_generated_DataplexService_GetLake_async + */ + getLake( + request?: protos.google.cloud.dataplex.v1.IGetLakeRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IGetLakeRequest | undefined, + {} | undefined + ] + >; + getLake( + request: protos.google.cloud.dataplex.v1.IGetLakeRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IGetLakeRequest | null | undefined, + {} | null | undefined + > + ): void; + getLake( + request: protos.google.cloud.dataplex.v1.IGetLakeRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IGetLakeRequest | null | undefined, + {} | null | undefined + > + ): void; + getLake( + request?: protos.google.cloud.dataplex.v1.IGetLakeRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IGetLakeRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IGetLakeRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IGetLakeRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getLake(request, options, callback); + } + /** + * Retrieves a zone resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Zone]{@link google.cloud.dataplex.v1.Zone}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.get_zone.js + * region_tag:dataplex_v1_generated_DataplexService_GetZone_async + */ + getZone( + request?: protos.google.cloud.dataplex.v1.IGetZoneRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IGetZoneRequest | undefined, + {} | undefined + ] + >; + getZone( + request: protos.google.cloud.dataplex.v1.IGetZoneRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IGetZoneRequest | null | undefined, + {} | null | undefined + > + ): void; + getZone( + request: protos.google.cloud.dataplex.v1.IGetZoneRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IGetZoneRequest | null | undefined, + {} | null | undefined + > + ): void; + getZone( + request?: protos.google.cloud.dataplex.v1.IGetZoneRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IGetZoneRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IGetZoneRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IGetZoneRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getZone(request, options, callback); + } + /** + * Retrieves an asset resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Asset]{@link google.cloud.dataplex.v1.Asset}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.get_asset.js + * region_tag:dataplex_v1_generated_DataplexService_GetAsset_async + */ + getAsset( + request?: protos.google.cloud.dataplex.v1.IGetAssetRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IGetAssetRequest | undefined, + {} | undefined + ] + >; + getAsset( + request: protos.google.cloud.dataplex.v1.IGetAssetRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IGetAssetRequest | null | undefined, + {} | null | undefined + > + ): void; + getAsset( + request: protos.google.cloud.dataplex.v1.IGetAssetRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IGetAssetRequest | null | undefined, + {} | null | undefined + > + ): void; + getAsset( + request?: protos.google.cloud.dataplex.v1.IGetAssetRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IGetAssetRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IGetAssetRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IGetAssetRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getAsset(request, options, callback); + } + /** + * Get task resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the task: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Task]{@link google.cloud.dataplex.v1.Task}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.get_task.js + * region_tag:dataplex_v1_generated_DataplexService_GetTask_async + */ + getTask( + request?: protos.google.cloud.dataplex.v1.IGetTaskRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IGetTaskRequest | undefined, + {} | undefined + ] + >; + getTask( + request: protos.google.cloud.dataplex.v1.IGetTaskRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IGetTaskRequest | null | undefined, + {} | null | undefined + > + ): void; + getTask( + request: protos.google.cloud.dataplex.v1.IGetTaskRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IGetTaskRequest | null | undefined, + {} | null | undefined + > + ): void; + getTask( + request?: protos.google.cloud.dataplex.v1.IGetTaskRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IGetTaskRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IGetTaskRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IGetTaskRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getTask(request, options, callback); + } + /** + * Get job resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the job: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Job]{@link google.cloud.dataplex.v1.Job}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.get_job.js + * region_tag:dataplex_v1_generated_DataplexService_GetJob_async + */ + getJob( + request?: protos.google.cloud.dataplex.v1.IGetJobRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IJob, + protos.google.cloud.dataplex.v1.IGetJobRequest | undefined, + {} | undefined + ] + >; + getJob( + request: protos.google.cloud.dataplex.v1.IGetJobRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IJob, + protos.google.cloud.dataplex.v1.IGetJobRequest | null | undefined, + {} | null | undefined + > + ): void; + getJob( + request: protos.google.cloud.dataplex.v1.IGetJobRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IJob, + protos.google.cloud.dataplex.v1.IGetJobRequest | null | undefined, + {} | null | undefined + > + ): void; + getJob( + request?: protos.google.cloud.dataplex.v1.IGetJobRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataplex.v1.IJob, + protos.google.cloud.dataplex.v1.IGetJobRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataplex.v1.IJob, + protos.google.cloud.dataplex.v1.IGetJobRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IJob, + protos.google.cloud.dataplex.v1.IGetJobRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getJob(request, options, callback); + } + /** + * Cancel jobs running for the task resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the job: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.cancel_job.js + * region_tag:dataplex_v1_generated_DataplexService_CancelJob_async + */ + cancelJob( + request?: protos.google.cloud.dataplex.v1.ICancelJobRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.ICancelJobRequest | undefined, + {} | undefined + ] + >; + cancelJob( + request: protos.google.cloud.dataplex.v1.ICancelJobRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.ICancelJobRequest | null | undefined, + {} | null | undefined + > + ): void; + cancelJob( + request: protos.google.cloud.dataplex.v1.ICancelJobRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.ICancelJobRequest | null | undefined, + {} | null | undefined + > + ): void; + cancelJob( + request?: protos.google.cloud.dataplex.v1.ICancelJobRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.ICancelJobRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.ICancelJobRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.ICancelJobRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.cancelJob(request, options, callback); + } + + /** + * Creates a lake resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the lake location, of the form: + * `projects/{project_number}/locations/{location_id}` + * where `location_id` refers to a GCP region. + * @param {string} request.lakeId + * Required. Lake identifier. + * This ID will be used to generate names such as database and dataset names + * when publishing metadata to Hive Metastore and BigQuery. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique within the customer project / location. + * @param {google.cloud.dataplex.v1.Lake} request.lake + * Required. Lake resource + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.create_lake.js + * region_tag:dataplex_v1_generated_DataplexService_CreateLake_async + */ + createLake( + request?: protos.google.cloud.dataplex.v1.ICreateLakeRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createLake( + request: protos.google.cloud.dataplex.v1.ICreateLakeRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createLake( + request: protos.google.cloud.dataplex.v1.ICreateLakeRequest, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createLake( + request?: protos.google.cloud.dataplex.v1.ICreateLakeRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createLake(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createLake()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.create_lake.js + * region_tag:dataplex_v1_generated_DataplexService_CreateLake_async + */ + async checkCreateLakeProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.dataplex.v1.Lake, + protos.google.cloud.dataplex.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.createLake, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.dataplex.v1.Lake, + protos.google.cloud.dataplex.v1.OperationMetadata + >; + } + /** + * Updates a lake resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. + * @param {google.cloud.dataplex.v1.Lake} request.lake + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.update_lake.js + * region_tag:dataplex_v1_generated_DataplexService_UpdateLake_async + */ + updateLake( + request?: protos.google.cloud.dataplex.v1.IUpdateLakeRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateLake( + request: protos.google.cloud.dataplex.v1.IUpdateLakeRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateLake( + request: protos.google.cloud.dataplex.v1.IUpdateLakeRequest, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateLake( + request?: protos.google.cloud.dataplex.v1.IUpdateLakeRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'lake.name': request.lake!.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateLake(request, options, callback); + } + /** + * Check the status of the long running operation returned by `updateLake()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.update_lake.js + * region_tag:dataplex_v1_generated_DataplexService_UpdateLake_async + */ + async checkUpdateLakeProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.dataplex.v1.Lake, + protos.google.cloud.dataplex.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.updateLake, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.dataplex.v1.Lake, + protos.google.cloud.dataplex.v1.OperationMetadata + >; + } + /** + * Deletes a lake resource. All zones within the lake must be deleted before + * the lake can be deleted. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.delete_lake.js + * region_tag:dataplex_v1_generated_DataplexService_DeleteLake_async + */ + deleteLake( + request?: protos.google.cloud.dataplex.v1.IDeleteLakeRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteLake( + request: protos.google.cloud.dataplex.v1.IDeleteLakeRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteLake( + request: protos.google.cloud.dataplex.v1.IDeleteLakeRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteLake( + request?: protos.google.cloud.dataplex.v1.IDeleteLakeRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deleteLake(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteLake()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.delete_lake.js + * region_tag:dataplex_v1_generated_DataplexService_DeleteLake_async + */ + async checkDeleteLakeProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.dataplex.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.deleteLake, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.dataplex.v1.OperationMetadata + >; + } + /** + * Creates a zone resource within a lake. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @param {string} request.zoneId + * Required. Zone identifier. + * This ID will be used to generate names such as database and dataset names + * when publishing metadata to Hive Metastore and BigQuery. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique across all lakes from all locations in a project. + * * Must not be one of the reserved IDs (i.e. "default", "global-temp") + * @param {google.cloud.dataplex.v1.Zone} request.zone + * Required. Zone resource. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.create_zone.js + * region_tag:dataplex_v1_generated_DataplexService_CreateZone_async + */ + createZone( + request?: protos.google.cloud.dataplex.v1.ICreateZoneRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createZone( + request: protos.google.cloud.dataplex.v1.ICreateZoneRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createZone( + request: protos.google.cloud.dataplex.v1.ICreateZoneRequest, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createZone( + request?: protos.google.cloud.dataplex.v1.ICreateZoneRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createZone(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createZone()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.create_zone.js + * region_tag:dataplex_v1_generated_DataplexService_CreateZone_async + */ + async checkCreateZoneProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.dataplex.v1.Zone, + protos.google.cloud.dataplex.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.createZone, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.dataplex.v1.Zone, + protos.google.cloud.dataplex.v1.OperationMetadata + >; + } + /** + * Updates a zone resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. + * @param {google.cloud.dataplex.v1.Zone} request.zone + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.update_zone.js + * region_tag:dataplex_v1_generated_DataplexService_UpdateZone_async + */ + updateZone( + request?: protos.google.cloud.dataplex.v1.IUpdateZoneRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateZone( + request: protos.google.cloud.dataplex.v1.IUpdateZoneRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateZone( + request: protos.google.cloud.dataplex.v1.IUpdateZoneRequest, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateZone( + request?: protos.google.cloud.dataplex.v1.IUpdateZoneRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'zone.name': request.zone!.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateZone(request, options, callback); + } + /** + * Check the status of the long running operation returned by `updateZone()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.update_zone.js + * region_tag:dataplex_v1_generated_DataplexService_UpdateZone_async + */ + async checkUpdateZoneProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.dataplex.v1.Zone, + protos.google.cloud.dataplex.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.updateZone, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.dataplex.v1.Zone, + protos.google.cloud.dataplex.v1.OperationMetadata + >; + } + /** + * Deletes a zone resource. All assets within a zone must be deleted before + * the zone can be deleted. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.delete_zone.js + * region_tag:dataplex_v1_generated_DataplexService_DeleteZone_async + */ + deleteZone( + request?: protos.google.cloud.dataplex.v1.IDeleteZoneRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteZone( + request: protos.google.cloud.dataplex.v1.IDeleteZoneRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteZone( + request: protos.google.cloud.dataplex.v1.IDeleteZoneRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteZone( + request?: protos.google.cloud.dataplex.v1.IDeleteZoneRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deleteZone(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteZone()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.delete_zone.js + * region_tag:dataplex_v1_generated_DataplexService_DeleteZone_async + */ + async checkDeleteZoneProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.dataplex.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.deleteZone, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.dataplex.v1.OperationMetadata + >; + } + /** + * Creates an asset resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}` + * @param {string} request.assetId + * Required. Asset identifier. + * This ID will be used to generate names such as table names when publishing + * metadata to Hive Metastore and BigQuery. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique within the zone. + * @param {google.cloud.dataplex.v1.Asset} request.asset + * Required. Asset resource. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.create_asset.js + * region_tag:dataplex_v1_generated_DataplexService_CreateAsset_async + */ + createAsset( + request?: protos.google.cloud.dataplex.v1.ICreateAssetRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createAsset( + request: protos.google.cloud.dataplex.v1.ICreateAssetRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createAsset( + request: protos.google.cloud.dataplex.v1.ICreateAssetRequest, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createAsset( + request?: protos.google.cloud.dataplex.v1.ICreateAssetRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createAsset(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createAsset()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.create_asset.js + * region_tag:dataplex_v1_generated_DataplexService_CreateAsset_async + */ + async checkCreateAssetProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.dataplex.v1.Asset, + protos.google.cloud.dataplex.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.createAsset, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.dataplex.v1.Asset, + protos.google.cloud.dataplex.v1.OperationMetadata + >; + } + /** + * Updates an asset resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. + * @param {google.cloud.dataplex.v1.Asset} request.asset + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.update_asset.js + * region_tag:dataplex_v1_generated_DataplexService_UpdateAsset_async + */ + updateAsset( + request?: protos.google.cloud.dataplex.v1.IUpdateAssetRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateAsset( + request: protos.google.cloud.dataplex.v1.IUpdateAssetRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateAsset( + request: protos.google.cloud.dataplex.v1.IUpdateAssetRequest, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateAsset( + request?: protos.google.cloud.dataplex.v1.IUpdateAssetRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'asset.name': request.asset!.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateAsset(request, options, callback); + } + /** + * Check the status of the long running operation returned by `updateAsset()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.update_asset.js + * region_tag:dataplex_v1_generated_DataplexService_UpdateAsset_async + */ + async checkUpdateAssetProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.dataplex.v1.Asset, + protos.google.cloud.dataplex.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.updateAsset, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.dataplex.v1.Asset, + protos.google.cloud.dataplex.v1.OperationMetadata + >; + } + /** + * Deletes an asset resource. The referenced storage resource is detached + * (default) or deleted based on the associated Lifecycle policy. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.delete_asset.js + * region_tag:dataplex_v1_generated_DataplexService_DeleteAsset_async + */ + deleteAsset( + request?: protos.google.cloud.dataplex.v1.IDeleteAssetRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteAsset( + request: protos.google.cloud.dataplex.v1.IDeleteAssetRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteAsset( + request: protos.google.cloud.dataplex.v1.IDeleteAssetRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteAsset( + request?: protos.google.cloud.dataplex.v1.IDeleteAssetRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deleteAsset(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteAsset()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.delete_asset.js + * region_tag:dataplex_v1_generated_DataplexService_DeleteAsset_async + */ + async checkDeleteAssetProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.dataplex.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.deleteAsset, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.dataplex.v1.OperationMetadata + >; + } + /** + * Creates a task resource within a lake. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @param {string} request.taskId + * Required. Task identifier. + * @param {google.cloud.dataplex.v1.Task} request.task + * Required. Task resource. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.create_task.js + * region_tag:dataplex_v1_generated_DataplexService_CreateTask_async + */ + createTask( + request?: protos.google.cloud.dataplex.v1.ICreateTaskRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createTask( + request: protos.google.cloud.dataplex.v1.ICreateTaskRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createTask( + request: protos.google.cloud.dataplex.v1.ICreateTaskRequest, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createTask( + request?: protos.google.cloud.dataplex.v1.ICreateTaskRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createTask(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createTask()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.create_task.js + * region_tag:dataplex_v1_generated_DataplexService_CreateTask_async + */ + async checkCreateTaskProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.dataplex.v1.Task, + protos.google.cloud.dataplex.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.createTask, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.dataplex.v1.Task, + protos.google.cloud.dataplex.v1.OperationMetadata + >; + } + /** + * Update the task resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. + * @param {google.cloud.dataplex.v1.Task} request.task + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.update_task.js + * region_tag:dataplex_v1_generated_DataplexService_UpdateTask_async + */ + updateTask( + request?: protos.google.cloud.dataplex.v1.IUpdateTaskRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateTask( + request: protos.google.cloud.dataplex.v1.IUpdateTaskRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateTask( + request: protos.google.cloud.dataplex.v1.IUpdateTaskRequest, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateTask( + request?: protos.google.cloud.dataplex.v1.IUpdateTaskRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'task.name': request.task!.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateTask(request, options, callback); + } + /** + * Check the status of the long running operation returned by `updateTask()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.update_task.js + * region_tag:dataplex_v1_generated_DataplexService_UpdateTask_async + */ + async checkUpdateTaskProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.dataplex.v1.Task, + protos.google.cloud.dataplex.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.updateTask, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.dataplex.v1.Task, + protos.google.cloud.dataplex.v1.OperationMetadata + >; + } + /** + * Delete the task resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the task: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.delete_task.js + * region_tag:dataplex_v1_generated_DataplexService_DeleteTask_async + */ + deleteTask( + request?: protos.google.cloud.dataplex.v1.IDeleteTaskRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteTask( + request: protos.google.cloud.dataplex.v1.IDeleteTaskRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteTask( + request: protos.google.cloud.dataplex.v1.IDeleteTaskRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteTask( + request?: protos.google.cloud.dataplex.v1.IDeleteTaskRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deleteTask(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteTask()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.delete_task.js + * region_tag:dataplex_v1_generated_DataplexService_DeleteTask_async + */ + async checkDeleteTaskProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.dataplex.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.deleteTask, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.dataplex.v1.OperationMetadata + >; + } + /** + * Lists lake resources in a project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the lake location, of the form: + * `projects/{project_number}/locations/{location_id}` + * where `location_id` refers to a GCP region. + * @param {number} [request.pageSize] + * Optional. Maximum number of Lakes to return. The service may return fewer than this + * value. If unspecified, at most 10 lakes will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListLakes` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListLakes` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Lake]{@link google.cloud.dataplex.v1.Lake}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listLakesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listLakes( + request?: protos.google.cloud.dataplex.v1.IListLakesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.ILake[], + protos.google.cloud.dataplex.v1.IListLakesRequest | null, + protos.google.cloud.dataplex.v1.IListLakesResponse + ] + >; + listLakes( + request: protos.google.cloud.dataplex.v1.IListLakesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListLakesRequest, + protos.google.cloud.dataplex.v1.IListLakesResponse | null | undefined, + protos.google.cloud.dataplex.v1.ILake + > + ): void; + listLakes( + request: protos.google.cloud.dataplex.v1.IListLakesRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListLakesRequest, + protos.google.cloud.dataplex.v1.IListLakesResponse | null | undefined, + protos.google.cloud.dataplex.v1.ILake + > + ): void; + listLakes( + request?: protos.google.cloud.dataplex.v1.IListLakesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataplex.v1.IListLakesRequest, + protos.google.cloud.dataplex.v1.IListLakesResponse | null | undefined, + protos.google.cloud.dataplex.v1.ILake + >, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListLakesRequest, + protos.google.cloud.dataplex.v1.IListLakesResponse | null | undefined, + protos.google.cloud.dataplex.v1.ILake + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.ILake[], + protos.google.cloud.dataplex.v1.IListLakesRequest | null, + protos.google.cloud.dataplex.v1.IListLakesResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listLakes(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the lake location, of the form: + * `projects/{project_number}/locations/{location_id}` + * where `location_id` refers to a GCP region. + * @param {number} [request.pageSize] + * Optional. Maximum number of Lakes to return. The service may return fewer than this + * value. If unspecified, at most 10 lakes will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListLakes` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListLakes` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [Lake]{@link google.cloud.dataplex.v1.Lake} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listLakesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listLakesStream( + request?: protos.google.cloud.dataplex.v1.IListLakesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listLakes']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listLakes.createStream( + this.innerApiCalls.listLakes as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listLakes`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the lake location, of the form: + * `projects/{project_number}/locations/{location_id}` + * where `location_id` refers to a GCP region. + * @param {number} [request.pageSize] + * Optional. Maximum number of Lakes to return. The service may return fewer than this + * value. If unspecified, at most 10 lakes will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListLakes` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListLakes` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Lake]{@link google.cloud.dataplex.v1.Lake}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.list_lakes.js + * region_tag:dataplex_v1_generated_DataplexService_ListLakes_async + */ + listLakesAsync( + request?: protos.google.cloud.dataplex.v1.IListLakesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listLakes']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listLakes.asyncIterate( + this.innerApiCalls['listLakes'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Lists action resources in a lake. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}` + * @param {number} [request.pageSize] + * Optional. Maximum number of actions to return. The service may return fewer than this + * value. If unspecified, at most 10 actions will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListLakeActions` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListLakeActions` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Action]{@link google.cloud.dataplex.v1.Action}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listLakeActionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listLakeActions( + request?: protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IAction[], + protos.google.cloud.dataplex.v1.IListLakeActionsRequest | null, + protos.google.cloud.dataplex.v1.IListActionsResponse + ] + >; + listLakeActions( + request: protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + protos.google.cloud.dataplex.v1.IListActionsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IAction + > + ): void; + listLakeActions( + request: protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + protos.google.cloud.dataplex.v1.IListActionsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IAction + > + ): void; + listLakeActions( + request?: protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + | protos.google.cloud.dataplex.v1.IListActionsResponse + | null + | undefined, + protos.google.cloud.dataplex.v1.IAction + >, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + protos.google.cloud.dataplex.v1.IListActionsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IAction + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IAction[], + protos.google.cloud.dataplex.v1.IListLakeActionsRequest | null, + protos.google.cloud.dataplex.v1.IListActionsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listLakeActions(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}` + * @param {number} [request.pageSize] + * Optional. Maximum number of actions to return. The service may return fewer than this + * value. If unspecified, at most 10 actions will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListLakeActions` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListLakeActions` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [Action]{@link google.cloud.dataplex.v1.Action} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listLakeActionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listLakeActionsStream( + request?: protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listLakeActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listLakeActions.createStream( + this.innerApiCalls.listLakeActions as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listLakeActions`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}` + * @param {number} [request.pageSize] + * Optional. Maximum number of actions to return. The service may return fewer than this + * value. If unspecified, at most 10 actions will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListLakeActions` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListLakeActions` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Action]{@link google.cloud.dataplex.v1.Action}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.list_lake_actions.js + * region_tag:dataplex_v1_generated_DataplexService_ListLakeActions_async + */ + listLakeActionsAsync( + request?: protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listLakeActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listLakeActions.asyncIterate( + this.innerApiCalls['listLakeActions'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Lists zone resources in a lake. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of zones to return. The service may return fewer than this + * value. If unspecified, at most 10 zones will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListZones` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZones` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Zone]{@link google.cloud.dataplex.v1.Zone}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listZonesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listZones( + request?: protos.google.cloud.dataplex.v1.IListZonesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IZone[], + protos.google.cloud.dataplex.v1.IListZonesRequest | null, + protos.google.cloud.dataplex.v1.IListZonesResponse + ] + >; + listZones( + request: protos.google.cloud.dataplex.v1.IListZonesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListZonesRequest, + protos.google.cloud.dataplex.v1.IListZonesResponse | null | undefined, + protos.google.cloud.dataplex.v1.IZone + > + ): void; + listZones( + request: protos.google.cloud.dataplex.v1.IListZonesRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListZonesRequest, + protos.google.cloud.dataplex.v1.IListZonesResponse | null | undefined, + protos.google.cloud.dataplex.v1.IZone + > + ): void; + listZones( + request?: protos.google.cloud.dataplex.v1.IListZonesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataplex.v1.IListZonesRequest, + protos.google.cloud.dataplex.v1.IListZonesResponse | null | undefined, + protos.google.cloud.dataplex.v1.IZone + >, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListZonesRequest, + protos.google.cloud.dataplex.v1.IListZonesResponse | null | undefined, + protos.google.cloud.dataplex.v1.IZone + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IZone[], + protos.google.cloud.dataplex.v1.IListZonesRequest | null, + protos.google.cloud.dataplex.v1.IListZonesResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listZones(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of zones to return. The service may return fewer than this + * value. If unspecified, at most 10 zones will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListZones` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZones` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [Zone]{@link google.cloud.dataplex.v1.Zone} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listZonesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listZonesStream( + request?: protos.google.cloud.dataplex.v1.IListZonesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listZones']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listZones.createStream( + this.innerApiCalls.listZones as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listZones`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of zones to return. The service may return fewer than this + * value. If unspecified, at most 10 zones will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListZones` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZones` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Zone]{@link google.cloud.dataplex.v1.Zone}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.list_zones.js + * region_tag:dataplex_v1_generated_DataplexService_ListZones_async + */ + listZonesAsync( + request?: protos.google.cloud.dataplex.v1.IListZonesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listZones']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listZones.asyncIterate( + this.innerApiCalls['listZones'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Lists action resources in a zone. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of actions to return. The service may return fewer than this + * value. If unspecified, at most 10 actions will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListZoneActions` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZoneActions` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Action]{@link google.cloud.dataplex.v1.Action}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listZoneActionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listZoneActions( + request?: protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IAction[], + protos.google.cloud.dataplex.v1.IListZoneActionsRequest | null, + protos.google.cloud.dataplex.v1.IListActionsResponse + ] + >; + listZoneActions( + request: protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + protos.google.cloud.dataplex.v1.IListActionsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IAction + > + ): void; + listZoneActions( + request: protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + protos.google.cloud.dataplex.v1.IListActionsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IAction + > + ): void; + listZoneActions( + request?: protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + | protos.google.cloud.dataplex.v1.IListActionsResponse + | null + | undefined, + protos.google.cloud.dataplex.v1.IAction + >, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + protos.google.cloud.dataplex.v1.IListActionsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IAction + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IAction[], + protos.google.cloud.dataplex.v1.IListZoneActionsRequest | null, + protos.google.cloud.dataplex.v1.IListActionsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listZoneActions(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of actions to return. The service may return fewer than this + * value. If unspecified, at most 10 actions will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListZoneActions` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZoneActions` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [Action]{@link google.cloud.dataplex.v1.Action} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listZoneActionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listZoneActionsStream( + request?: protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listZoneActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listZoneActions.createStream( + this.innerApiCalls.listZoneActions as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listZoneActions`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of actions to return. The service may return fewer than this + * value. If unspecified, at most 10 actions will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListZoneActions` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZoneActions` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Action]{@link google.cloud.dataplex.v1.Action}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.list_zone_actions.js + * region_tag:dataplex_v1_generated_DataplexService_ListZoneActions_async + */ + listZoneActionsAsync( + request?: protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listZoneActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listZoneActions.asyncIterate( + this.innerApiCalls['listZoneActions'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Lists asset resources in a zone. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of asset to return. The service may return fewer than + * this value. If unspecified, at most 10 assets will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListAssets` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListAssets` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Asset]{@link google.cloud.dataplex.v1.Asset}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listAssetsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAssets( + request?: protos.google.cloud.dataplex.v1.IListAssetsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IAsset[], + protos.google.cloud.dataplex.v1.IListAssetsRequest | null, + protos.google.cloud.dataplex.v1.IListAssetsResponse + ] + >; + listAssets( + request: protos.google.cloud.dataplex.v1.IListAssetsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListAssetsRequest, + protos.google.cloud.dataplex.v1.IListAssetsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IAsset + > + ): void; + listAssets( + request: protos.google.cloud.dataplex.v1.IListAssetsRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListAssetsRequest, + protos.google.cloud.dataplex.v1.IListAssetsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IAsset + > + ): void; + listAssets( + request?: protos.google.cloud.dataplex.v1.IListAssetsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataplex.v1.IListAssetsRequest, + | protos.google.cloud.dataplex.v1.IListAssetsResponse + | null + | undefined, + protos.google.cloud.dataplex.v1.IAsset + >, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListAssetsRequest, + protos.google.cloud.dataplex.v1.IListAssetsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IAsset + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IAsset[], + protos.google.cloud.dataplex.v1.IListAssetsRequest | null, + protos.google.cloud.dataplex.v1.IListAssetsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listAssets(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of asset to return. The service may return fewer than + * this value. If unspecified, at most 10 assets will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListAssets` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListAssets` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [Asset]{@link google.cloud.dataplex.v1.Asset} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listAssetsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAssetsStream( + request?: protos.google.cloud.dataplex.v1.IListAssetsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listAssets']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAssets.createStream( + this.innerApiCalls.listAssets as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listAssets`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of asset to return. The service may return fewer than + * this value. If unspecified, at most 10 assets will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListAssets` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListAssets` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Asset]{@link google.cloud.dataplex.v1.Asset}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.list_assets.js + * region_tag:dataplex_v1_generated_DataplexService_ListAssets_async + */ + listAssetsAsync( + request?: protos.google.cloud.dataplex.v1.IListAssetsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listAssets']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAssets.asyncIterate( + this.innerApiCalls['listAssets'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Lists action resources in an asset. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of actions to return. The service may return fewer than this + * value. If unspecified, at most 10 actions will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListAssetActions` call. Provide this + * to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListAssetActions` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Action]{@link google.cloud.dataplex.v1.Action}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listAssetActionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAssetActions( + request?: protos.google.cloud.dataplex.v1.IListAssetActionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IAction[], + protos.google.cloud.dataplex.v1.IListAssetActionsRequest | null, + protos.google.cloud.dataplex.v1.IListActionsResponse + ] + >; + listAssetActions( + request: protos.google.cloud.dataplex.v1.IListAssetActionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListAssetActionsRequest, + protos.google.cloud.dataplex.v1.IListActionsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IAction + > + ): void; + listAssetActions( + request: protos.google.cloud.dataplex.v1.IListAssetActionsRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListAssetActionsRequest, + protos.google.cloud.dataplex.v1.IListActionsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IAction + > + ): void; + listAssetActions( + request?: protos.google.cloud.dataplex.v1.IListAssetActionsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataplex.v1.IListAssetActionsRequest, + | protos.google.cloud.dataplex.v1.IListActionsResponse + | null + | undefined, + protos.google.cloud.dataplex.v1.IAction + >, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListAssetActionsRequest, + protos.google.cloud.dataplex.v1.IListActionsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IAction + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IAction[], + protos.google.cloud.dataplex.v1.IListAssetActionsRequest | null, + protos.google.cloud.dataplex.v1.IListActionsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listAssetActions(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of actions to return. The service may return fewer than this + * value. If unspecified, at most 10 actions will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListAssetActions` call. Provide this + * to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListAssetActions` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [Action]{@link google.cloud.dataplex.v1.Action} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listAssetActionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAssetActionsStream( + request?: protos.google.cloud.dataplex.v1.IListAssetActionsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listAssetActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAssetActions.createStream( + this.innerApiCalls.listAssetActions as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listAssetActions`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of actions to return. The service may return fewer than this + * value. If unspecified, at most 10 actions will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListAssetActions` call. Provide this + * to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListAssetActions` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Action]{@link google.cloud.dataplex.v1.Action}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.list_asset_actions.js + * region_tag:dataplex_v1_generated_DataplexService_ListAssetActions_async + */ + listAssetActionsAsync( + request?: protos.google.cloud.dataplex.v1.IListAssetActionsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listAssetActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAssetActions.asyncIterate( + this.innerApiCalls['listAssetActions'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Lists tasks under the given lake. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of tasks to return. The service may return fewer than this + * value. If unspecified, at most 10 tasks will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListZones` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZones` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Task]{@link google.cloud.dataplex.v1.Task}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listTasksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listTasks( + request?: protos.google.cloud.dataplex.v1.IListTasksRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.ITask[], + protos.google.cloud.dataplex.v1.IListTasksRequest | null, + protos.google.cloud.dataplex.v1.IListTasksResponse + ] + >; + listTasks( + request: protos.google.cloud.dataplex.v1.IListTasksRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListTasksRequest, + protos.google.cloud.dataplex.v1.IListTasksResponse | null | undefined, + protos.google.cloud.dataplex.v1.ITask + > + ): void; + listTasks( + request: protos.google.cloud.dataplex.v1.IListTasksRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListTasksRequest, + protos.google.cloud.dataplex.v1.IListTasksResponse | null | undefined, + protos.google.cloud.dataplex.v1.ITask + > + ): void; + listTasks( + request?: protos.google.cloud.dataplex.v1.IListTasksRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataplex.v1.IListTasksRequest, + protos.google.cloud.dataplex.v1.IListTasksResponse | null | undefined, + protos.google.cloud.dataplex.v1.ITask + >, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListTasksRequest, + protos.google.cloud.dataplex.v1.IListTasksResponse | null | undefined, + protos.google.cloud.dataplex.v1.ITask + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.ITask[], + protos.google.cloud.dataplex.v1.IListTasksRequest | null, + protos.google.cloud.dataplex.v1.IListTasksResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listTasks(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of tasks to return. The service may return fewer than this + * value. If unspecified, at most 10 tasks will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListZones` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZones` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [Task]{@link google.cloud.dataplex.v1.Task} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listTasksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listTasksStream( + request?: protos.google.cloud.dataplex.v1.IListTasksRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listTasks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listTasks.createStream( + this.innerApiCalls.listTasks as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listTasks`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of tasks to return. The service may return fewer than this + * value. If unspecified, at most 10 tasks will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListZones` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZones` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Task]{@link google.cloud.dataplex.v1.Task}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.list_tasks.js + * region_tag:dataplex_v1_generated_DataplexService_ListTasks_async + */ + listTasksAsync( + request?: protos.google.cloud.dataplex.v1.IListTasksRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listTasks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listTasks.asyncIterate( + this.innerApiCalls['listTasks'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Lists Jobs under the given task. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent environment: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of jobs to return. The service may return fewer than + * this value. If unspecified, at most 10 jobs will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListJobs` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListJobs` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Job]{@link google.cloud.dataplex.v1.Job}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listJobsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listJobs( + request?: protos.google.cloud.dataplex.v1.IListJobsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IJob[], + protos.google.cloud.dataplex.v1.IListJobsRequest | null, + protos.google.cloud.dataplex.v1.IListJobsResponse + ] + >; + listJobs( + request: protos.google.cloud.dataplex.v1.IListJobsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListJobsRequest, + protos.google.cloud.dataplex.v1.IListJobsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IJob + > + ): void; + listJobs( + request: protos.google.cloud.dataplex.v1.IListJobsRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListJobsRequest, + protos.google.cloud.dataplex.v1.IListJobsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IJob + > + ): void; + listJobs( + request?: protos.google.cloud.dataplex.v1.IListJobsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataplex.v1.IListJobsRequest, + protos.google.cloud.dataplex.v1.IListJobsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IJob + >, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListJobsRequest, + protos.google.cloud.dataplex.v1.IListJobsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IJob + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IJob[], + protos.google.cloud.dataplex.v1.IListJobsRequest | null, + protos.google.cloud.dataplex.v1.IListJobsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listJobs(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent environment: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of jobs to return. The service may return fewer than + * this value. If unspecified, at most 10 jobs will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListJobs` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListJobs` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [Job]{@link google.cloud.dataplex.v1.Job} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listJobsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listJobsStream( + request?: protos.google.cloud.dataplex.v1.IListJobsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listJobs']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listJobs.createStream( + this.innerApiCalls.listJobs as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listJobs`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent environment: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of jobs to return. The service may return fewer than + * this value. If unspecified, at most 10 jobs will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListJobs` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListJobs` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Job]{@link google.cloud.dataplex.v1.Job}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.list_jobs.js + * region_tag:dataplex_v1_generated_DataplexService_ListJobs_async + */ + listJobsAsync( + request?: protos.google.cloud.dataplex.v1.IListJobsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listJobs']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listJobs.asyncIterate( + this.innerApiCalls['listJobs'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified asset resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} asset + * @returns {string} Resource name string. + */ + assetPath( + project: string, + location: string, + lake: string, + zone: string, + asset: string + ) { + return this.pathTemplates.assetPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + asset: asset, + }); + } + + /** + * Parse the project from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).project; + } + + /** + * Parse the location from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).location; + } + + /** + * Parse the lake from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).lake; + } + + /** + * Parse the zone from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).zone; + } + + /** + * Parse the asset from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the asset. + */ + matchAssetFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).asset; + } + + /** + * Return a fully-qualified entity resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} entity + * @returns {string} Resource name string. + */ + entityPath( + project: string, + location: string, + lake: string, + zone: string, + entity: string + ) { + return this.pathTemplates.entityPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + entity: entity, + }); + } + + /** + * Parse the project from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).project; + } + + /** + * Parse the location from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).location; + } + + /** + * Parse the lake from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).lake; + } + + /** + * Parse the zone from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).zone; + } + + /** + * Parse the entity from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the entity. + */ + matchEntityFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).entity; + } + + /** + * Return a fully-qualified job resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} task + * @param {string} job + * @returns {string} Resource name string. + */ + jobPath( + project: string, + location: string, + lake: string, + task: string, + job: string + ) { + return this.pathTemplates.jobPathTemplate.render({ + project: project, + location: location, + lake: lake, + task: task, + job: job, + }); + } + + /** + * Parse the project from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the project. + */ + matchProjectFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).project; + } + + /** + * Parse the location from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the location. + */ + matchLocationFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).location; + } + + /** + * Parse the lake from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).lake; + } + + /** + * Parse the task from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the task. + */ + matchTaskFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).task; + } + + /** + * Parse the job from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the job. + */ + matchJobFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).job; + } + + /** + * Return a fully-qualified lake resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @returns {string} Resource name string. + */ + lakePath(project: string, location: string, lake: string) { + return this.pathTemplates.lakePathTemplate.render({ + project: project, + location: location, + lake: lake, + }); + } + + /** + * Parse the project from Lake resource. + * + * @param {string} lakeName + * A fully-qualified path representing Lake resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLakeName(lakeName: string) { + return this.pathTemplates.lakePathTemplate.match(lakeName).project; + } + + /** + * Parse the location from Lake resource. + * + * @param {string} lakeName + * A fully-qualified path representing Lake resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLakeName(lakeName: string) { + return this.pathTemplates.lakePathTemplate.match(lakeName).location; + } + + /** + * Parse the lake from Lake resource. + * + * @param {string} lakeName + * A fully-qualified path representing Lake resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromLakeName(lakeName: string) { + return this.pathTemplates.lakePathTemplate.match(lakeName).lake; + } + + /** + * Return a fully-qualified location resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(project: string, location: string) { + return this.pathTemplates.locationPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).project; + } + + /** + * Parse the location from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).location; + } + + /** + * Return a fully-qualified partition resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} entity + * @param {string} partition + * @returns {string} Resource name string. + */ + partitionPath( + project: string, + location: string, + lake: string, + zone: string, + entity: string, + partition: string + ) { + return this.pathTemplates.partitionPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + entity: entity, + partition: partition, + }); + } + + /** + * Parse the project from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName) + .project; + } + + /** + * Parse the location from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName) + .location; + } + + /** + * Parse the lake from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).lake; + } + + /** + * Parse the zone from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).zone; + } + + /** + * Parse the entity from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the entity. + */ + matchEntityFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).entity; + } + + /** + * Parse the partition from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the partition. + */ + matchPartitionFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName) + .partition; + } + + /** + * Return a fully-qualified projectLocationLakeAction resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} action + * @returns {string} Resource name string. + */ + projectLocationLakeActionPath( + project: string, + location: string, + lake: string, + action: string + ) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.render({ + project: project, + location: location, + lake: lake, + action: action, + }); + } + + /** + * Parse the project from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationLakeActionName( + projectLocationLakeActionName: string + ) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match( + projectLocationLakeActionName + ).project; + } + + /** + * Parse the location from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationLakeActionName( + projectLocationLakeActionName: string + ) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match( + projectLocationLakeActionName + ).location; + } + + /** + * Parse the lake from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromProjectLocationLakeActionName( + projectLocationLakeActionName: string + ) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match( + projectLocationLakeActionName + ).lake; + } + + /** + * Parse the action from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the action. + */ + matchActionFromProjectLocationLakeActionName( + projectLocationLakeActionName: string + ) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match( + projectLocationLakeActionName + ).action; + } + + /** + * Return a fully-qualified projectLocationLakeZoneAction resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} action + * @returns {string} Resource name string. + */ + projectLocationLakeZoneActionPath( + project: string, + location: string, + lake: string, + zone: string, + action: string + ) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + action: action, + }); + } + + /** + * Parse the project from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationLakeZoneActionName( + projectLocationLakeZoneActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match( + projectLocationLakeZoneActionName + ).project; + } + + /** + * Parse the location from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationLakeZoneActionName( + projectLocationLakeZoneActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match( + projectLocationLakeZoneActionName + ).location; + } + + /** + * Parse the lake from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromProjectLocationLakeZoneActionName( + projectLocationLakeZoneActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match( + projectLocationLakeZoneActionName + ).lake; + } + + /** + * Parse the zone from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromProjectLocationLakeZoneActionName( + projectLocationLakeZoneActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match( + projectLocationLakeZoneActionName + ).zone; + } + + /** + * Parse the action from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the action. + */ + matchActionFromProjectLocationLakeZoneActionName( + projectLocationLakeZoneActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match( + projectLocationLakeZoneActionName + ).action; + } + + /** + * Return a fully-qualified projectLocationLakeZoneAssetAction resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} asset + * @param {string} action + * @returns {string} Resource name string. + */ + projectLocationLakeZoneAssetActionPath( + project: string, + location: string, + lake: string, + zone: string, + asset: string, + action: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render( + { + project: project, + location: location, + lake: lake, + zone: zone, + asset: asset, + action: action, + } + ); + } + + /** + * Parse the project from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationLakeZoneAssetActionName( + projectLocationLakeZoneAssetActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match( + projectLocationLakeZoneAssetActionName + ).project; + } + + /** + * Parse the location from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationLakeZoneAssetActionName( + projectLocationLakeZoneAssetActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match( + projectLocationLakeZoneAssetActionName + ).location; + } + + /** + * Parse the lake from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromProjectLocationLakeZoneAssetActionName( + projectLocationLakeZoneAssetActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match( + projectLocationLakeZoneAssetActionName + ).lake; + } + + /** + * Parse the zone from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromProjectLocationLakeZoneAssetActionName( + projectLocationLakeZoneAssetActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match( + projectLocationLakeZoneAssetActionName + ).zone; + } + + /** + * Parse the asset from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the asset. + */ + matchAssetFromProjectLocationLakeZoneAssetActionName( + projectLocationLakeZoneAssetActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match( + projectLocationLakeZoneAssetActionName + ).asset; + } + + /** + * Parse the action from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the action. + */ + matchActionFromProjectLocationLakeZoneAssetActionName( + projectLocationLakeZoneAssetActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match( + projectLocationLakeZoneAssetActionName + ).action; + } + + /** + * Return a fully-qualified task resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} task + * @returns {string} Resource name string. + */ + taskPath(project: string, location: string, lake: string, task: string) { + return this.pathTemplates.taskPathTemplate.render({ + project: project, + location: location, + lake: lake, + task: task, + }); + } + + /** + * Parse the project from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).project; + } + + /** + * Parse the location from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).location; + } + + /** + * Parse the lake from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).lake; + } + + /** + * Parse the task from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the task. + */ + matchTaskFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).task; + } + + /** + * Return a fully-qualified zone resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @returns {string} Resource name string. + */ + zonePath(project: string, location: string, lake: string, zone: string) { + return this.pathTemplates.zonePathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + }); + } + + /** + * Parse the project from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the project. + */ + matchProjectFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).project; + } + + /** + * Parse the location from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the location. + */ + matchLocationFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).location; + } + + /** + * Parse the lake from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).lake; + } + + /** + * Parse the zone from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).zone; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + this.initialize(); + if (!this._terminated) { + return this.dataplexServiceStub!.then(stub => { + this._terminated = true; + stub.close(); + this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-dataplex/src/v1/dataplex_service_client_config.json b/packages/google-cloud-dataplex/src/v1/dataplex_service_client_config.json new file mode 100644 index 00000000000..f28861f96c6 --- /dev/null +++ b/packages/google-cloud-dataplex/src/v1/dataplex_service_client_config.json @@ -0,0 +1,168 @@ +{ + "interfaces": { + "google.cloud.dataplex.v1.DataplexService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unavailable": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + }, + "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "CreateLake": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateLake": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteLake": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListLakes": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetLake": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListLakeActions": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateZone": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateZone": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteZone": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListZones": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetZone": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListZoneActions": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateAsset": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateAsset": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteAsset": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListAssets": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetAsset": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListAssetActions": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateTask": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateTask": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteTask": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListTasks": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetTask": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListJobs": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetJob": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CancelJob": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-dataplex/src/v1/dataplex_service_proto_list.json b/packages/google-cloud-dataplex/src/v1/dataplex_service_proto_list.json new file mode 100644 index 00000000000..2f2fea78052 --- /dev/null +++ b/packages/google-cloud-dataplex/src/v1/dataplex_service_proto_list.json @@ -0,0 +1,7 @@ +[ + "../../protos/google/cloud/dataplex/v1/logs.proto", + "../../protos/google/cloud/dataplex/v1/metadata.proto", + "../../protos/google/cloud/dataplex/v1/resources.proto", + "../../protos/google/cloud/dataplex/v1/service.proto", + "../../protos/google/cloud/dataplex/v1/tasks.proto" +] diff --git a/packages/google-cloud-dataplex/src/v1/gapic_metadata.json b/packages/google-cloud-dataplex/src/v1/gapic_metadata.json new file mode 100644 index 00000000000..2ae53e6b9be --- /dev/null +++ b/packages/google-cloud-dataplex/src/v1/gapic_metadata.json @@ -0,0 +1,377 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.dataplex.v1", + "libraryPackage": "@google-cloud/dataplex", + "services": { + "DataplexService": { + "clients": { + "grpc": { + "libraryClient": "DataplexServiceClient", + "rpcs": { + "GetLake": { + "methods": [ + "getLake" + ] + }, + "GetZone": { + "methods": [ + "getZone" + ] + }, + "GetAsset": { + "methods": [ + "getAsset" + ] + }, + "GetTask": { + "methods": [ + "getTask" + ] + }, + "GetJob": { + "methods": [ + "getJob" + ] + }, + "CancelJob": { + "methods": [ + "cancelJob" + ] + }, + "CreateLake": { + "methods": [ + "createLake" + ] + }, + "UpdateLake": { + "methods": [ + "updateLake" + ] + }, + "DeleteLake": { + "methods": [ + "deleteLake" + ] + }, + "CreateZone": { + "methods": [ + "createZone" + ] + }, + "UpdateZone": { + "methods": [ + "updateZone" + ] + }, + "DeleteZone": { + "methods": [ + "deleteZone" + ] + }, + "CreateAsset": { + "methods": [ + "createAsset" + ] + }, + "UpdateAsset": { + "methods": [ + "updateAsset" + ] + }, + "DeleteAsset": { + "methods": [ + "deleteAsset" + ] + }, + "CreateTask": { + "methods": [ + "createTask" + ] + }, + "UpdateTask": { + "methods": [ + "updateTask" + ] + }, + "DeleteTask": { + "methods": [ + "deleteTask" + ] + }, + "ListLakes": { + "methods": [ + "listLakes", + "listLakesStream", + "listLakesAsync" + ] + }, + "ListLakeActions": { + "methods": [ + "listLakeActions", + "listLakeActionsStream", + "listLakeActionsAsync" + ] + }, + "ListZones": { + "methods": [ + "listZones", + "listZonesStream", + "listZonesAsync" + ] + }, + "ListZoneActions": { + "methods": [ + "listZoneActions", + "listZoneActionsStream", + "listZoneActionsAsync" + ] + }, + "ListAssets": { + "methods": [ + "listAssets", + "listAssetsStream", + "listAssetsAsync" + ] + }, + "ListAssetActions": { + "methods": [ + "listAssetActions", + "listAssetActionsStream", + "listAssetActionsAsync" + ] + }, + "ListTasks": { + "methods": [ + "listTasks", + "listTasksStream", + "listTasksAsync" + ] + }, + "ListJobs": { + "methods": [ + "listJobs", + "listJobsStream", + "listJobsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "DataplexServiceClient", + "rpcs": { + "GetLake": { + "methods": [ + "getLake" + ] + }, + "GetZone": { + "methods": [ + "getZone" + ] + }, + "GetAsset": { + "methods": [ + "getAsset" + ] + }, + "GetTask": { + "methods": [ + "getTask" + ] + }, + "GetJob": { + "methods": [ + "getJob" + ] + }, + "CancelJob": { + "methods": [ + "cancelJob" + ] + }, + "CreateLake": { + "methods": [ + "createLake" + ] + }, + "UpdateLake": { + "methods": [ + "updateLake" + ] + }, + "DeleteLake": { + "methods": [ + "deleteLake" + ] + }, + "CreateZone": { + "methods": [ + "createZone" + ] + }, + "UpdateZone": { + "methods": [ + "updateZone" + ] + }, + "DeleteZone": { + "methods": [ + "deleteZone" + ] + }, + "CreateAsset": { + "methods": [ + "createAsset" + ] + }, + "UpdateAsset": { + "methods": [ + "updateAsset" + ] + }, + "DeleteAsset": { + "methods": [ + "deleteAsset" + ] + }, + "CreateTask": { + "methods": [ + "createTask" + ] + }, + "UpdateTask": { + "methods": [ + "updateTask" + ] + }, + "DeleteTask": { + "methods": [ + "deleteTask" + ] + }, + "ListLakes": { + "methods": [ + "listLakes", + "listLakesStream", + "listLakesAsync" + ] + }, + "ListLakeActions": { + "methods": [ + "listLakeActions", + "listLakeActionsStream", + "listLakeActionsAsync" + ] + }, + "ListZones": { + "methods": [ + "listZones", + "listZonesStream", + "listZonesAsync" + ] + }, + "ListZoneActions": { + "methods": [ + "listZoneActions", + "listZoneActionsStream", + "listZoneActionsAsync" + ] + }, + "ListAssets": { + "methods": [ + "listAssets", + "listAssetsStream", + "listAssetsAsync" + ] + }, + "ListAssetActions": { + "methods": [ + "listAssetActions", + "listAssetActionsStream", + "listAssetActionsAsync" + ] + }, + "ListTasks": { + "methods": [ + "listTasks", + "listTasksStream", + "listTasksAsync" + ] + }, + "ListJobs": { + "methods": [ + "listJobs", + "listJobsStream", + "listJobsAsync" + ] + } + } + } + } + }, + "MetadataService": { + "clients": { + "grpc": { + "libraryClient": "MetadataServiceClient", + "rpcs": { + "GetEntity": { + "methods": [ + "getEntity" + ] + }, + "GetPartition": { + "methods": [ + "getPartition" + ] + }, + "ListEntities": { + "methods": [ + "listEntities", + "listEntitiesStream", + "listEntitiesAsync" + ] + }, + "ListPartitions": { + "methods": [ + "listPartitions", + "listPartitionsStream", + "listPartitionsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "MetadataServiceClient", + "rpcs": { + "GetEntity": { + "methods": [ + "getEntity" + ] + }, + "GetPartition": { + "methods": [ + "getPartition" + ] + }, + "ListEntities": { + "methods": [ + "listEntities", + "listEntitiesStream", + "listEntitiesAsync" + ] + }, + "ListPartitions": { + "methods": [ + "listPartitions", + "listPartitionsStream", + "listPartitionsAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/google-cloud-dataplex/src/v1/index.ts b/packages/google-cloud-dataplex/src/v1/index.ts new file mode 100644 index 00000000000..9312f69f1fc --- /dev/null +++ b/packages/google-cloud-dataplex/src/v1/index.ts @@ -0,0 +1,20 @@ +// Copyright 2022 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +export {DataplexServiceClient} from './dataplex_service_client'; +export {MetadataServiceClient} from './metadata_service_client'; diff --git a/packages/google-cloud-dataplex/src/v1/metadata_service_client.ts b/packages/google-cloud-dataplex/src/v1/metadata_service_client.ts new file mode 100644 index 00000000000..603a2fa5283 --- /dev/null +++ b/packages/google-cloud-dataplex/src/v1/metadata_service_client.ts @@ -0,0 +1,1793 @@ +// Copyright 2022 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import * as gax from 'google-gax'; +import { + Callback, + CallOptions, + Descriptors, + ClientOptions, + PaginationCallback, + GaxCall, +} from 'google-gax'; + +import {Transform} from 'stream'; +import {RequestType} from 'google-gax/build/src/apitypes'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1/metadata_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './metadata_service_client_config.json'; + +const version = require('../../../package.json').version; + +/** + * Metadata service manages metadata resources such as tables, filesets and + * partitions. + * @class + * @memberof v1 + */ +export class MetadataServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + metadataServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of MetadataServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. + * In fallback mode, a special browser-compatible transport implementation is used + * instead of gRPC transport. In browser context (if the `window` object is defined) + * the fallback mode is enabled automatically; set `options.fallback` to `false` + * if you need to override this behavior. + */ + constructor(opts?: ClientOptions) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof MetadataServiceClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gax.fallback : gax; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + assetPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}' + ), + entityPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}' + ), + jobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}' + ), + lakePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}' + ), + partitionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}' + ), + projectLocationLakeActionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/actions/{action}' + ), + projectLocationLakeZoneActionPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}' + ), + projectLocationLakeZoneAssetActionPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}' + ), + taskPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}' + ), + zonePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listEntities: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'entities' + ), + listPartitions: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'partitions' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.dataplex.v1.MetadataService', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = gax.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.metadataServiceStub) { + return this.metadataServiceStub; + } + + // Put together the "service stub" for + // google.cloud.dataplex.v1.MetadataService. + this.metadataServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.dataplex.v1.MetadataService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.dataplex.v1.MetadataService, + this._opts, + this._providedCustomServicePath + ) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const metadataServiceStubMethods = [ + 'getEntity', + 'listEntities', + 'getPartition', + 'listPartitions', + ]; + for (const methodName of metadataServiceStubMethods) { + const callPromise = this.metadataServiceStub.then( + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const descriptor = this.descriptors.page[methodName] || undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.metadataServiceStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'dataplex.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'dataplex.googleapis.com'; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return ['https://www.googleapis.com/auth/cloud-platform']; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + /** + * Get a metadata entity. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` + * @param {google.cloud.dataplex.v1.GetEntityRequest.EntityView} [request.view] + * Optional. Used to select the subset of entity information to return. + * Defaults to `BASIC`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Entity]{@link google.cloud.dataplex.v1.Entity}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/metadata_service.get_entity.js + * region_tag:dataplex_v1_generated_MetadataService_GetEntity_async + */ + getEntity( + request?: protos.google.cloud.dataplex.v1.IGetEntityRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.IGetEntityRequest | undefined, + {} | undefined + ] + >; + getEntity( + request: protos.google.cloud.dataplex.v1.IGetEntityRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.IGetEntityRequest | null | undefined, + {} | null | undefined + > + ): void; + getEntity( + request: protos.google.cloud.dataplex.v1.IGetEntityRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.IGetEntityRequest | null | undefined, + {} | null | undefined + > + ): void; + getEntity( + request?: protos.google.cloud.dataplex.v1.IGetEntityRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.IGetEntityRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.IGetEntityRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.IGetEntityRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getEntity(request, options, callback); + } + /** + * Get a metadata partition of an entity. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the partition: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_id}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Partition]{@link google.cloud.dataplex.v1.Partition}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/metadata_service.get_partition.js + * region_tag:dataplex_v1_generated_MetadataService_GetPartition_async + */ + getPartition( + request?: protos.google.cloud.dataplex.v1.IGetPartitionRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IPartition, + protos.google.cloud.dataplex.v1.IGetPartitionRequest | undefined, + {} | undefined + ] + >; + getPartition( + request: protos.google.cloud.dataplex.v1.IGetPartitionRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IPartition, + protos.google.cloud.dataplex.v1.IGetPartitionRequest | null | undefined, + {} | null | undefined + > + ): void; + getPartition( + request: protos.google.cloud.dataplex.v1.IGetPartitionRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IPartition, + protos.google.cloud.dataplex.v1.IGetPartitionRequest | null | undefined, + {} | null | undefined + > + ): void; + getPartition( + request?: protos.google.cloud.dataplex.v1.IGetPartitionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataplex.v1.IPartition, + | protos.google.cloud.dataplex.v1.IGetPartitionRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataplex.v1.IPartition, + protos.google.cloud.dataplex.v1.IGetPartitionRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IPartition, + protos.google.cloud.dataplex.v1.IGetPartitionRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getPartition(request, options, callback); + } + + /** + * List metadata entities in a zone. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param {google.cloud.dataplex.v1.ListEntitiesRequest.EntityView} request.view + * Required. Specify the entity view to make a partial list request. + * @param {number} [request.pageSize] + * Optional. Maximum number of entities to return. The service may return fewer than + * this value. If unspecified, at most 10 entities will be returned. The + * maximum value is 1000; values above 1000 are set to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListEntities` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListEntities` must match the call that provided the + * page token. + * @param {string} [request.filter] + * Optional. Filter request by name prefix. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Entity]{@link google.cloud.dataplex.v1.Entity}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listEntitiesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listEntities( + request?: protos.google.cloud.dataplex.v1.IListEntitiesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IEntity[], + protos.google.cloud.dataplex.v1.IListEntitiesRequest | null, + protos.google.cloud.dataplex.v1.IListEntitiesResponse + ] + >; + listEntities( + request: protos.google.cloud.dataplex.v1.IListEntitiesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListEntitiesRequest, + protos.google.cloud.dataplex.v1.IListEntitiesResponse | null | undefined, + protos.google.cloud.dataplex.v1.IEntity + > + ): void; + listEntities( + request: protos.google.cloud.dataplex.v1.IListEntitiesRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListEntitiesRequest, + protos.google.cloud.dataplex.v1.IListEntitiesResponse | null | undefined, + protos.google.cloud.dataplex.v1.IEntity + > + ): void; + listEntities( + request?: protos.google.cloud.dataplex.v1.IListEntitiesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataplex.v1.IListEntitiesRequest, + | protos.google.cloud.dataplex.v1.IListEntitiesResponse + | null + | undefined, + protos.google.cloud.dataplex.v1.IEntity + >, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListEntitiesRequest, + protos.google.cloud.dataplex.v1.IListEntitiesResponse | null | undefined, + protos.google.cloud.dataplex.v1.IEntity + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IEntity[], + protos.google.cloud.dataplex.v1.IListEntitiesRequest | null, + protos.google.cloud.dataplex.v1.IListEntitiesResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listEntities(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param {google.cloud.dataplex.v1.ListEntitiesRequest.EntityView} request.view + * Required. Specify the entity view to make a partial list request. + * @param {number} [request.pageSize] + * Optional. Maximum number of entities to return. The service may return fewer than + * this value. If unspecified, at most 10 entities will be returned. The + * maximum value is 1000; values above 1000 are set to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListEntities` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListEntities` must match the call that provided the + * page token. + * @param {string} [request.filter] + * Optional. Filter request by name prefix. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [Entity]{@link google.cloud.dataplex.v1.Entity} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listEntitiesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listEntitiesStream( + request?: protos.google.cloud.dataplex.v1.IListEntitiesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listEntities']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listEntities.createStream( + this.innerApiCalls.listEntities as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listEntities`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param {google.cloud.dataplex.v1.ListEntitiesRequest.EntityView} request.view + * Required. Specify the entity view to make a partial list request. + * @param {number} [request.pageSize] + * Optional. Maximum number of entities to return. The service may return fewer than + * this value. If unspecified, at most 10 entities will be returned. The + * maximum value is 1000; values above 1000 are set to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListEntities` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListEntities` must match the call that provided the + * page token. + * @param {string} [request.filter] + * Optional. Filter request by name prefix. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Entity]{@link google.cloud.dataplex.v1.Entity}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/metadata_service.list_entities.js + * region_tag:dataplex_v1_generated_MetadataService_ListEntities_async + */ + listEntitiesAsync( + request?: protos.google.cloud.dataplex.v1.IListEntitiesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listEntities']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listEntities.asyncIterate( + this.innerApiCalls['listEntities'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * List metadata partitions of an entity. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of partitions to return. The service may return fewer than + * this value. If unspecified, at most 10 partitions will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListPartitions` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListPartitions` must match the call that provided the + * page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Partition]{@link google.cloud.dataplex.v1.Partition}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listPartitionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listPartitions( + request?: protos.google.cloud.dataplex.v1.IListPartitionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IPartition[], + protos.google.cloud.dataplex.v1.IListPartitionsRequest | null, + protos.google.cloud.dataplex.v1.IListPartitionsResponse + ] + >; + listPartitions( + request: protos.google.cloud.dataplex.v1.IListPartitionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListPartitionsRequest, + | protos.google.cloud.dataplex.v1.IListPartitionsResponse + | null + | undefined, + protos.google.cloud.dataplex.v1.IPartition + > + ): void; + listPartitions( + request: protos.google.cloud.dataplex.v1.IListPartitionsRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListPartitionsRequest, + | protos.google.cloud.dataplex.v1.IListPartitionsResponse + | null + | undefined, + protos.google.cloud.dataplex.v1.IPartition + > + ): void; + listPartitions( + request?: protos.google.cloud.dataplex.v1.IListPartitionsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataplex.v1.IListPartitionsRequest, + | protos.google.cloud.dataplex.v1.IListPartitionsResponse + | null + | undefined, + protos.google.cloud.dataplex.v1.IPartition + >, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListPartitionsRequest, + | protos.google.cloud.dataplex.v1.IListPartitionsResponse + | null + | undefined, + protos.google.cloud.dataplex.v1.IPartition + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IPartition[], + protos.google.cloud.dataplex.v1.IListPartitionsRequest | null, + protos.google.cloud.dataplex.v1.IListPartitionsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listPartitions(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of partitions to return. The service may return fewer than + * this value. If unspecified, at most 10 partitions will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListPartitions` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListPartitions` must match the call that provided the + * page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [Partition]{@link google.cloud.dataplex.v1.Partition} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listPartitionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listPartitionsStream( + request?: protos.google.cloud.dataplex.v1.IListPartitionsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listPartitions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listPartitions.createStream( + this.innerApiCalls.listPartitions as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listPartitions`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of partitions to return. The service may return fewer than + * this value. If unspecified, at most 10 partitions will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListPartitions` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListPartitions` must match the call that provided the + * page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Partition]{@link google.cloud.dataplex.v1.Partition}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/metadata_service.list_partitions.js + * region_tag:dataplex_v1_generated_MetadataService_ListPartitions_async + */ + listPartitionsAsync( + request?: protos.google.cloud.dataplex.v1.IListPartitionsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listPartitions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listPartitions.asyncIterate( + this.innerApiCalls['listPartitions'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified asset resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} asset + * @returns {string} Resource name string. + */ + assetPath( + project: string, + location: string, + lake: string, + zone: string, + asset: string + ) { + return this.pathTemplates.assetPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + asset: asset, + }); + } + + /** + * Parse the project from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).project; + } + + /** + * Parse the location from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).location; + } + + /** + * Parse the lake from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).lake; + } + + /** + * Parse the zone from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).zone; + } + + /** + * Parse the asset from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the asset. + */ + matchAssetFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).asset; + } + + /** + * Return a fully-qualified entity resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} entity + * @returns {string} Resource name string. + */ + entityPath( + project: string, + location: string, + lake: string, + zone: string, + entity: string + ) { + return this.pathTemplates.entityPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + entity: entity, + }); + } + + /** + * Parse the project from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).project; + } + + /** + * Parse the location from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).location; + } + + /** + * Parse the lake from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).lake; + } + + /** + * Parse the zone from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).zone; + } + + /** + * Parse the entity from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the entity. + */ + matchEntityFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).entity; + } + + /** + * Return a fully-qualified job resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} task + * @param {string} job + * @returns {string} Resource name string. + */ + jobPath( + project: string, + location: string, + lake: string, + task: string, + job: string + ) { + return this.pathTemplates.jobPathTemplate.render({ + project: project, + location: location, + lake: lake, + task: task, + job: job, + }); + } + + /** + * Parse the project from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the project. + */ + matchProjectFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).project; + } + + /** + * Parse the location from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the location. + */ + matchLocationFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).location; + } + + /** + * Parse the lake from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).lake; + } + + /** + * Parse the task from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the task. + */ + matchTaskFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).task; + } + + /** + * Parse the job from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the job. + */ + matchJobFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).job; + } + + /** + * Return a fully-qualified lake resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @returns {string} Resource name string. + */ + lakePath(project: string, location: string, lake: string) { + return this.pathTemplates.lakePathTemplate.render({ + project: project, + location: location, + lake: lake, + }); + } + + /** + * Parse the project from Lake resource. + * + * @param {string} lakeName + * A fully-qualified path representing Lake resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLakeName(lakeName: string) { + return this.pathTemplates.lakePathTemplate.match(lakeName).project; + } + + /** + * Parse the location from Lake resource. + * + * @param {string} lakeName + * A fully-qualified path representing Lake resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLakeName(lakeName: string) { + return this.pathTemplates.lakePathTemplate.match(lakeName).location; + } + + /** + * Parse the lake from Lake resource. + * + * @param {string} lakeName + * A fully-qualified path representing Lake resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromLakeName(lakeName: string) { + return this.pathTemplates.lakePathTemplate.match(lakeName).lake; + } + + /** + * Return a fully-qualified partition resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} entity + * @param {string} partition + * @returns {string} Resource name string. + */ + partitionPath( + project: string, + location: string, + lake: string, + zone: string, + entity: string, + partition: string + ) { + return this.pathTemplates.partitionPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + entity: entity, + partition: partition, + }); + } + + /** + * Parse the project from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName) + .project; + } + + /** + * Parse the location from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName) + .location; + } + + /** + * Parse the lake from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).lake; + } + + /** + * Parse the zone from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).zone; + } + + /** + * Parse the entity from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the entity. + */ + matchEntityFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).entity; + } + + /** + * Parse the partition from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the partition. + */ + matchPartitionFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName) + .partition; + } + + /** + * Return a fully-qualified projectLocationLakeAction resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} action + * @returns {string} Resource name string. + */ + projectLocationLakeActionPath( + project: string, + location: string, + lake: string, + action: string + ) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.render({ + project: project, + location: location, + lake: lake, + action: action, + }); + } + + /** + * Parse the project from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationLakeActionName( + projectLocationLakeActionName: string + ) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match( + projectLocationLakeActionName + ).project; + } + + /** + * Parse the location from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationLakeActionName( + projectLocationLakeActionName: string + ) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match( + projectLocationLakeActionName + ).location; + } + + /** + * Parse the lake from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromProjectLocationLakeActionName( + projectLocationLakeActionName: string + ) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match( + projectLocationLakeActionName + ).lake; + } + + /** + * Parse the action from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the action. + */ + matchActionFromProjectLocationLakeActionName( + projectLocationLakeActionName: string + ) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match( + projectLocationLakeActionName + ).action; + } + + /** + * Return a fully-qualified projectLocationLakeZoneAction resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} action + * @returns {string} Resource name string. + */ + projectLocationLakeZoneActionPath( + project: string, + location: string, + lake: string, + zone: string, + action: string + ) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + action: action, + }); + } + + /** + * Parse the project from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationLakeZoneActionName( + projectLocationLakeZoneActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match( + projectLocationLakeZoneActionName + ).project; + } + + /** + * Parse the location from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationLakeZoneActionName( + projectLocationLakeZoneActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match( + projectLocationLakeZoneActionName + ).location; + } + + /** + * Parse the lake from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromProjectLocationLakeZoneActionName( + projectLocationLakeZoneActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match( + projectLocationLakeZoneActionName + ).lake; + } + + /** + * Parse the zone from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromProjectLocationLakeZoneActionName( + projectLocationLakeZoneActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match( + projectLocationLakeZoneActionName + ).zone; + } + + /** + * Parse the action from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the action. + */ + matchActionFromProjectLocationLakeZoneActionName( + projectLocationLakeZoneActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match( + projectLocationLakeZoneActionName + ).action; + } + + /** + * Return a fully-qualified projectLocationLakeZoneAssetAction resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} asset + * @param {string} action + * @returns {string} Resource name string. + */ + projectLocationLakeZoneAssetActionPath( + project: string, + location: string, + lake: string, + zone: string, + asset: string, + action: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render( + { + project: project, + location: location, + lake: lake, + zone: zone, + asset: asset, + action: action, + } + ); + } + + /** + * Parse the project from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationLakeZoneAssetActionName( + projectLocationLakeZoneAssetActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match( + projectLocationLakeZoneAssetActionName + ).project; + } + + /** + * Parse the location from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationLakeZoneAssetActionName( + projectLocationLakeZoneAssetActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match( + projectLocationLakeZoneAssetActionName + ).location; + } + + /** + * Parse the lake from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromProjectLocationLakeZoneAssetActionName( + projectLocationLakeZoneAssetActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match( + projectLocationLakeZoneAssetActionName + ).lake; + } + + /** + * Parse the zone from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromProjectLocationLakeZoneAssetActionName( + projectLocationLakeZoneAssetActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match( + projectLocationLakeZoneAssetActionName + ).zone; + } + + /** + * Parse the asset from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the asset. + */ + matchAssetFromProjectLocationLakeZoneAssetActionName( + projectLocationLakeZoneAssetActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match( + projectLocationLakeZoneAssetActionName + ).asset; + } + + /** + * Parse the action from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the action. + */ + matchActionFromProjectLocationLakeZoneAssetActionName( + projectLocationLakeZoneAssetActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match( + projectLocationLakeZoneAssetActionName + ).action; + } + + /** + * Return a fully-qualified task resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} task + * @returns {string} Resource name string. + */ + taskPath(project: string, location: string, lake: string, task: string) { + return this.pathTemplates.taskPathTemplate.render({ + project: project, + location: location, + lake: lake, + task: task, + }); + } + + /** + * Parse the project from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).project; + } + + /** + * Parse the location from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).location; + } + + /** + * Parse the lake from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).lake; + } + + /** + * Parse the task from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the task. + */ + matchTaskFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).task; + } + + /** + * Return a fully-qualified zone resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @returns {string} Resource name string. + */ + zonePath(project: string, location: string, lake: string, zone: string) { + return this.pathTemplates.zonePathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + }); + } + + /** + * Parse the project from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the project. + */ + matchProjectFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).project; + } + + /** + * Parse the location from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the location. + */ + matchLocationFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).location; + } + + /** + * Parse the lake from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).lake; + } + + /** + * Parse the zone from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).zone; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + this.initialize(); + if (!this._terminated) { + return this.metadataServiceStub!.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-dataplex/src/v1/metadata_service_client_config.json b/packages/google-cloud-dataplex/src/v1/metadata_service_client_config.json new file mode 100644 index 00000000000..0afecc05d1f --- /dev/null +++ b/packages/google-cloud-dataplex/src/v1/metadata_service_client_config.json @@ -0,0 +1,58 @@ +{ + "interfaces": { + "google.cloud.dataplex.v1.MetadataService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unavailable": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + }, + "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetEntity": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListEntities": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetPartition": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListPartitions": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + } + } + } + } +} diff --git a/packages/google-cloud-dataplex/src/v1/metadata_service_proto_list.json b/packages/google-cloud-dataplex/src/v1/metadata_service_proto_list.json new file mode 100644 index 00000000000..2f2fea78052 --- /dev/null +++ b/packages/google-cloud-dataplex/src/v1/metadata_service_proto_list.json @@ -0,0 +1,7 @@ +[ + "../../protos/google/cloud/dataplex/v1/logs.proto", + "../../protos/google/cloud/dataplex/v1/metadata.proto", + "../../protos/google/cloud/dataplex/v1/resources.proto", + "../../protos/google/cloud/dataplex/v1/service.proto", + "../../protos/google/cloud/dataplex/v1/tasks.proto" +] diff --git a/packages/google-cloud-dataplex/system-test/fixtures/sample/src/index.js b/packages/google-cloud-dataplex/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..c6a9214b916 --- /dev/null +++ b/packages/google-cloud-dataplex/system-test/fixtures/sample/src/index.js @@ -0,0 +1,27 @@ +// Copyright 2022 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* eslint-disable node/no-missing-require, no-unused-vars */ +const dataplex = require('@google-cloud/dataplex'); + +function main() { + const dataplexServiceClient = new dataplex.DataplexServiceClient(); + const metadataServiceClient = new dataplex.MetadataServiceClient(); +} + +main(); diff --git a/packages/google-cloud-dataplex/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-dataplex/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..81f502bd559 --- /dev/null +++ b/packages/google-cloud-dataplex/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,41 @@ +// Copyright 2022 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import { + DataplexServiceClient, + MetadataServiceClient, +} from '@google-cloud/dataplex'; + +// check that the client class type name can be used +function doStuffWithDataplexServiceClient(client: DataplexServiceClient) { + client.close(); +} +function doStuffWithMetadataServiceClient(client: MetadataServiceClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const dataplexServiceClient = new DataplexServiceClient(); + doStuffWithDataplexServiceClient(dataplexServiceClient); + // check that the client instance can be created + const metadataServiceClient = new MetadataServiceClient(); + doStuffWithMetadataServiceClient(metadataServiceClient); +} + +main(); diff --git a/packages/google-cloud-dataplex/system-test/install.ts b/packages/google-cloud-dataplex/system-test/install.ts new file mode 100644 index 00000000000..6dd1eaadafa --- /dev/null +++ b/packages/google-cloud-dataplex/system-test/install.ts @@ -0,0 +1,51 @@ +// Copyright 2022 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; + +describe('📦 pack-n-play test', () => { + it('TypeScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync( + './system-test/fixtures/sample/src/index.ts' + ).toString(), + }, + }; + await packNTest(options); + }); + + it('JavaScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + ts: readFileSync( + './system-test/fixtures/sample/src/index.js' + ).toString(), + }, + }; + await packNTest(options); + }); +}); diff --git a/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts b/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts new file mode 100644 index 00000000000..a573dce9786 --- /dev/null +++ b/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts @@ -0,0 +1,6341 @@ +// Copyright 2022 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as dataplexserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LROperation, operationsProtos} from 'google-gax'; + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubLongRunningCall( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().rejects(callError) + : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().callsArgWith(2, callError) + : sinon.stub().callsArgWith(2, null, mockOperation); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.DataplexServiceClient', () => { + it('has servicePath', () => { + const servicePath = + dataplexserviceModule.v1.DataplexServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + dataplexserviceModule.v1.DataplexServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = dataplexserviceModule.v1.DataplexServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dataplexServiceStub, undefined); + await client.initialize(); + assert(client.dataplexServiceStub); + }); + + it('has close method', () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + + describe('getLake', () => { + it('invokes getLake without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetLakeRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Lake() + ); + client.innerApiCalls.getLake = stubSimpleCall(expectedResponse); + const [response] = await client.getLake(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getLake as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getLake without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetLakeRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Lake() + ); + client.innerApiCalls.getLake = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLake( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.ILake | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getLake as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getLake with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetLakeRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getLake = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getLake(request), expectedError); + assert( + (client.innerApiCalls.getLake as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getZone', () => { + it('invokes getZone without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetZoneRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Zone() + ); + client.innerApiCalls.getZone = stubSimpleCall(expectedResponse); + const [response] = await client.getZone(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getZone as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getZone without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetZoneRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Zone() + ); + client.innerApiCalls.getZone = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getZone( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IZone | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getZone as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getZone with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetZoneRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getZone = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getZone(request), expectedError); + assert( + (client.innerApiCalls.getZone as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getAsset', () => { + it('invokes getAsset without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetAssetRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Asset() + ); + client.innerApiCalls.getAsset = stubSimpleCall(expectedResponse); + const [response] = await client.getAsset(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getAsset as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getAsset without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetAssetRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Asset() + ); + client.innerApiCalls.getAsset = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAsset( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IAsset | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getAsset as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getAsset with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetAssetRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getAsset = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getAsset(request), expectedError); + assert( + (client.innerApiCalls.getAsset as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getTask', () => { + it('invokes getTask without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetTaskRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Task() + ); + client.innerApiCalls.getTask = stubSimpleCall(expectedResponse); + const [response] = await client.getTask(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getTask as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getTask without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetTaskRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Task() + ); + client.innerApiCalls.getTask = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getTask( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.ITask | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getTask as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getTask with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetTaskRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getTask = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getTask(request), expectedError); + assert( + (client.innerApiCalls.getTask as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getJob', () => { + it('invokes getJob without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Job() + ); + client.innerApiCalls.getJob = stubSimpleCall(expectedResponse); + const [response] = await client.getJob(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getJob as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getJob without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Job() + ); + client.innerApiCalls.getJob = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getJob( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IJob | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getJob as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getJob with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getJob = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getJob(request), expectedError); + assert( + (client.innerApiCalls.getJob as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('cancelJob', () => { + it('invokes cancelJob without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CancelJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.cancelJob = stubSimpleCall(expectedResponse); + const [response] = await client.cancelJob(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.cancelJob as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes cancelJob without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CancelJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.cancelJob = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.cancelJob( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.cancelJob as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes cancelJob with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CancelJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.cancelJob = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.cancelJob(request), expectedError); + assert( + (client.innerApiCalls.cancelJob as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('createLake', () => { + it('invokes createLake without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateLakeRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createLake = stubLongRunningCall(expectedResponse); + const [operation] = await client.createLake(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createLake as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createLake without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateLakeRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createLake = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createLake( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createLake as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createLake with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateLakeRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createLake = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createLake(request), expectedError); + assert( + (client.innerApiCalls.createLake as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createLake with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateLakeRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createLake = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createLake(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.createLake as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkCreateLakeProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateLakeProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateLakeProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.checkCreateLakeProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateLake', () => { + it('invokes updateLake without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateLakeRequest() + ); + request.lake = {}; + request.lake.name = ''; + const expectedHeaderRequestParams = 'lake.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateLake = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateLake(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateLake as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateLake without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateLakeRequest() + ); + request.lake = {}; + request.lake.name = ''; + const expectedHeaderRequestParams = 'lake.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateLake = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateLake( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateLake as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateLake with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateLakeRequest() + ); + request.lake = {}; + request.lake.name = ''; + const expectedHeaderRequestParams = 'lake.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateLake = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updateLake(request), expectedError); + assert( + (client.innerApiCalls.updateLake as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateLake with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateLakeRequest() + ); + request.lake = {}; + request.lake.name = ''; + const expectedHeaderRequestParams = 'lake.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateLake = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateLake(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.updateLake as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkUpdateLakeProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateLakeProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateLakeProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.checkUpdateLakeProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteLake', () => { + it('invokes deleteLake without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteLakeRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteLake = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteLake(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteLake as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteLake without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteLakeRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteLake = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteLake( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteLake as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteLake with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteLakeRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteLake = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteLake(request), expectedError); + assert( + (client.innerApiCalls.deleteLake as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteLake with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteLakeRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteLake = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteLake(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.deleteLake as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkDeleteLakeProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteLakeProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteLakeProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.checkDeleteLakeProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createZone', () => { + it('invokes createZone without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateZoneRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createZone = stubLongRunningCall(expectedResponse); + const [operation] = await client.createZone(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createZone as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createZone without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateZoneRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createZone = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createZone( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createZone as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createZone with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateZoneRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createZone = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createZone(request), expectedError); + assert( + (client.innerApiCalls.createZone as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createZone with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateZoneRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createZone = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createZone(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.createZone as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkCreateZoneProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateZoneProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateZoneProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.checkCreateZoneProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateZone', () => { + it('invokes updateZone without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateZoneRequest() + ); + request.zone = {}; + request.zone.name = ''; + const expectedHeaderRequestParams = 'zone.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateZone = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateZone(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateZone as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateZone without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateZoneRequest() + ); + request.zone = {}; + request.zone.name = ''; + const expectedHeaderRequestParams = 'zone.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateZone = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateZone( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateZone as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateZone with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateZoneRequest() + ); + request.zone = {}; + request.zone.name = ''; + const expectedHeaderRequestParams = 'zone.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateZone = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updateZone(request), expectedError); + assert( + (client.innerApiCalls.updateZone as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateZone with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateZoneRequest() + ); + request.zone = {}; + request.zone.name = ''; + const expectedHeaderRequestParams = 'zone.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateZone = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateZone(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.updateZone as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkUpdateZoneProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateZoneProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateZoneProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.checkUpdateZoneProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteZone', () => { + it('invokes deleteZone without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteZoneRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteZone = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteZone(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteZone as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteZone without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteZoneRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteZone = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteZone( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteZone as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteZone with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteZoneRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteZone = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteZone(request), expectedError); + assert( + (client.innerApiCalls.deleteZone as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteZone with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteZoneRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteZone = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteZone(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.deleteZone as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkDeleteZoneProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteZoneProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteZoneProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.checkDeleteZoneProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createAsset', () => { + it('invokes createAsset without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateAssetRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAsset = stubLongRunningCall(expectedResponse); + const [operation] = await client.createAsset(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createAsset as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createAsset without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateAssetRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAsset = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createAsset( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createAsset as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createAsset with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateAssetRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createAsset = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createAsset(request), expectedError); + assert( + (client.innerApiCalls.createAsset as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createAsset with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateAssetRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createAsset = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createAsset(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.createAsset as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkCreateAssetProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateAssetProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateAssetProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.checkCreateAssetProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateAsset', () => { + it('invokes updateAsset without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateAssetRequest() + ); + request.asset = {}; + request.asset.name = ''; + const expectedHeaderRequestParams = 'asset.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateAsset = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateAsset(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateAsset as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateAsset without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateAssetRequest() + ); + request.asset = {}; + request.asset.name = ''; + const expectedHeaderRequestParams = 'asset.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateAsset = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateAsset( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateAsset as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateAsset with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateAssetRequest() + ); + request.asset = {}; + request.asset.name = ''; + const expectedHeaderRequestParams = 'asset.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAsset = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updateAsset(request), expectedError); + assert( + (client.innerApiCalls.updateAsset as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateAsset with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateAssetRequest() + ); + request.asset = {}; + request.asset.name = ''; + const expectedHeaderRequestParams = 'asset.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAsset = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateAsset(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.updateAsset as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkUpdateAssetProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateAssetProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateAssetProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.checkUpdateAssetProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteAsset', () => { + it('invokes deleteAsset without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteAssetRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteAsset = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteAsset(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteAsset as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteAsset without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteAssetRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteAsset = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteAsset( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteAsset as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteAsset with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteAssetRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAsset = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteAsset(request), expectedError); + assert( + (client.innerApiCalls.deleteAsset as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteAsset with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteAssetRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAsset = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteAsset(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.deleteAsset as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkDeleteAssetProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteAssetProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteAssetProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.checkDeleteAssetProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createTask', () => { + it('invokes createTask without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateTaskRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createTask = stubLongRunningCall(expectedResponse); + const [operation] = await client.createTask(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createTask as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createTask without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateTaskRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createTask = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createTask( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createTask as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createTask with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateTaskRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createTask = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createTask(request), expectedError); + assert( + (client.innerApiCalls.createTask as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createTask with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateTaskRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createTask = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createTask(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.createTask as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkCreateTaskProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateTaskProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateTaskProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.checkCreateTaskProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateTask', () => { + it('invokes updateTask without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateTaskRequest() + ); + request.task = {}; + request.task.name = ''; + const expectedHeaderRequestParams = 'task.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateTask = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateTask(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateTask as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateTask without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateTaskRequest() + ); + request.task = {}; + request.task.name = ''; + const expectedHeaderRequestParams = 'task.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateTask = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateTask( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateTask as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateTask with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateTaskRequest() + ); + request.task = {}; + request.task.name = ''; + const expectedHeaderRequestParams = 'task.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateTask = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updateTask(request), expectedError); + assert( + (client.innerApiCalls.updateTask as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateTask with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateTaskRequest() + ); + request.task = {}; + request.task.name = ''; + const expectedHeaderRequestParams = 'task.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateTask = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateTask(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.updateTask as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkUpdateTaskProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateTaskProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateTaskProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.checkUpdateTaskProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteTask', () => { + it('invokes deleteTask without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteTaskRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteTask = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteTask(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteTask as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteTask without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteTaskRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteTask = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteTask( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteTask as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteTask with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteTaskRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteTask = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteTask(request), expectedError); + assert( + (client.innerApiCalls.deleteTask as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteTask with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteTaskRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteTask = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteTask(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.deleteTask as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkDeleteTaskProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteTaskProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteTaskProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.checkDeleteTaskProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listLakes', () => { + it('invokes listLakes without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + ]; + client.innerApiCalls.listLakes = stubSimpleCall(expectedResponse); + const [response] = await client.listLakes(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listLakes as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listLakes without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + ]; + client.innerApiCalls.listLakes = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listLakes( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.ILake[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listLakes as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listLakes with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listLakes = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listLakes(request), expectedError); + assert( + (client.innerApiCalls.listLakes as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listLakesStream without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + ]; + client.descriptors.page.listLakes.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listLakesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Lake[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Lake) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listLakes.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listLakes, request) + ); + assert.strictEqual( + (client.descriptors.page.listLakes.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listLakesStream with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listLakes.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listLakesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Lake[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Lake) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listLakes.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listLakes, request) + ); + assert.strictEqual( + (client.descriptors.page.listLakes.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listLakes without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + ]; + client.descriptors.page.listLakes.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.ILake[] = []; + const iterable = client.listLakesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listLakes.asyncIterate as SinonStub).getCall(0) + .args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listLakes.asyncIterate as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listLakes with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listLakes.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listLakesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.ILake[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listLakes.asyncIterate as SinonStub).getCall(0) + .args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listLakes.asyncIterate as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listLakeActions', () => { + it('invokes listLakeActions without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.innerApiCalls.listLakeActions = stubSimpleCall(expectedResponse); + const [response] = await client.listLakeActions(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listLakeActions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listLakeActions without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.innerApiCalls.listLakeActions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listLakeActions( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IAction[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listLakeActions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listLakeActions with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listLakeActions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listLakeActions(request), expectedError); + assert( + (client.innerApiCalls.listLakeActions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listLakeActionsStream without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.descriptors.page.listLakeActions.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listLakeActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Action[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataplex.v1.Action) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listLakeActions.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listLakeActions, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listLakeActions.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listLakeActionsStream with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listLakeActions.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listLakeActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Action[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataplex.v1.Action) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listLakeActions.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listLakeActions, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listLakeActions.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listLakeActions without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.descriptors.page.listLakeActions.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.IAction[] = []; + const iterable = client.listLakeActionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listLakeActions.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listLakeActions.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listLakeActions with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listLakeActions.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLakeActionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.IAction[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listLakeActions.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listLakeActions.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listZones', () => { + it('invokes listZones without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZonesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + ]; + client.innerApiCalls.listZones = stubSimpleCall(expectedResponse); + const [response] = await client.listZones(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listZones as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listZones without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZonesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + ]; + client.innerApiCalls.listZones = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listZones( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IZone[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listZones as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listZones with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZonesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listZones = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listZones(request), expectedError); + assert( + (client.innerApiCalls.listZones as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listZonesStream without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZonesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + ]; + client.descriptors.page.listZones.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listZonesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Zone[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Zone) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listZones.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listZones, request) + ); + assert.strictEqual( + (client.descriptors.page.listZones.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listZonesStream with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZonesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listZones.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listZonesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Zone[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Zone) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listZones.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listZones, request) + ); + assert.strictEqual( + (client.descriptors.page.listZones.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listZones without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZonesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + ]; + client.descriptors.page.listZones.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.IZone[] = []; + const iterable = client.listZonesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listZones.asyncIterate as SinonStub).getCall(0) + .args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listZones.asyncIterate as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listZones with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZonesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listZones.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listZonesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.IZone[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listZones.asyncIterate as SinonStub).getCall(0) + .args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listZones.asyncIterate as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listZoneActions', () => { + it('invokes listZoneActions without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.innerApiCalls.listZoneActions = stubSimpleCall(expectedResponse); + const [response] = await client.listZoneActions(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listZoneActions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listZoneActions without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.innerApiCalls.listZoneActions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listZoneActions( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IAction[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listZoneActions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listZoneActions with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listZoneActions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listZoneActions(request), expectedError); + assert( + (client.innerApiCalls.listZoneActions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listZoneActionsStream without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.descriptors.page.listZoneActions.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listZoneActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Action[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataplex.v1.Action) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listZoneActions.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listZoneActions, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listZoneActions.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listZoneActionsStream with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listZoneActions.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listZoneActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Action[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataplex.v1.Action) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listZoneActions.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listZoneActions, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listZoneActions.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listZoneActions without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.descriptors.page.listZoneActions.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.IAction[] = []; + const iterable = client.listZoneActionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listZoneActions.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listZoneActions.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listZoneActions with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listZoneActions.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listZoneActionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.IAction[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listZoneActions.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listZoneActions.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listAssets', () => { + it('invokes listAssets without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + ]; + client.innerApiCalls.listAssets = stubSimpleCall(expectedResponse); + const [response] = await client.listAssets(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listAssets as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listAssets without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + ]; + client.innerApiCalls.listAssets = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAssets( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IAsset[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listAssets as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listAssets with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listAssets = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listAssets(request), expectedError); + assert( + (client.innerApiCalls.listAssets as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listAssetsStream without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + ]; + client.descriptors.page.listAssets.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listAssetsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Asset[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Asset) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listAssets.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAssets, request) + ); + assert.strictEqual( + (client.descriptors.page.listAssets.createStream as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listAssetsStream with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listAssets.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listAssetsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Asset[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Asset) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listAssets.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAssets, request) + ); + assert.strictEqual( + (client.descriptors.page.listAssets.createStream as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listAssets without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + ]; + client.descriptors.page.listAssets.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.IAsset[] = []; + const iterable = client.listAssetsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listAssets.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listAssets.asyncIterate as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listAssets with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listAssets.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listAssetsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.IAsset[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listAssets.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listAssets.asyncIterate as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listAssetActions', () => { + it('invokes listAssetActions without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.innerApiCalls.listAssetActions = stubSimpleCall(expectedResponse); + const [response] = await client.listAssetActions(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listAssetActions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listAssetActions without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.innerApiCalls.listAssetActions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAssetActions( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IAction[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listAssetActions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listAssetActions with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listAssetActions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listAssetActions(request), expectedError); + assert( + (client.innerApiCalls.listAssetActions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listAssetActionsStream without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.descriptors.page.listAssetActions.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listAssetActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Action[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataplex.v1.Action) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listAssetActions.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAssetActions, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listAssetActions.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listAssetActionsStream with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listAssetActions.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listAssetActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Action[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataplex.v1.Action) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listAssetActions.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAssetActions, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listAssetActions.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listAssetActions without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.descriptors.page.listAssetActions.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.IAction[] = []; + const iterable = client.listAssetActionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listAssetActions.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listAssetActions.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listAssetActions with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listAssetActions.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAssetActionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.IAction[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listAssetActions.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listAssetActions.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listTasks', () => { + it('invokes listTasks without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListTasksRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + ]; + client.innerApiCalls.listTasks = stubSimpleCall(expectedResponse); + const [response] = await client.listTasks(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listTasks as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listTasks without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListTasksRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + ]; + client.innerApiCalls.listTasks = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listTasks( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.ITask[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listTasks as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listTasks with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListTasksRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listTasks = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listTasks(request), expectedError); + assert( + (client.innerApiCalls.listTasks as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listTasksStream without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListTasksRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + ]; + client.descriptors.page.listTasks.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listTasksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Task[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Task) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listTasks.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listTasks, request) + ); + assert.strictEqual( + (client.descriptors.page.listTasks.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listTasksStream with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListTasksRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listTasks.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listTasksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Task[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Task) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listTasks.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listTasks, request) + ); + assert.strictEqual( + (client.descriptors.page.listTasks.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listTasks without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListTasksRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + ]; + client.descriptors.page.listTasks.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.ITask[] = []; + const iterable = client.listTasksAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listTasks.asyncIterate as SinonStub).getCall(0) + .args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listTasks.asyncIterate as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listTasks with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListTasksRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listTasks.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listTasksAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.ITask[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listTasks.asyncIterate as SinonStub).getCall(0) + .args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listTasks.asyncIterate as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listJobs', () => { + it('invokes listJobs without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListJobsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + ]; + client.innerApiCalls.listJobs = stubSimpleCall(expectedResponse); + const [response] = await client.listJobs(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listJobs as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listJobs without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListJobsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + ]; + client.innerApiCalls.listJobs = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listJobs( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IJob[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listJobs as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listJobs with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListJobsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listJobs = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listJobs(request), expectedError); + assert( + (client.innerApiCalls.listJobs as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listJobsStream without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListJobsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + ]; + client.descriptors.page.listJobs.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listJobsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Job[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Job) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listJobs.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listJobs, request) + ); + assert.strictEqual( + (client.descriptors.page.listJobs.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listJobsStream with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListJobsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listJobs.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listJobsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Job[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Job) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listJobs.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listJobs, request) + ); + assert.strictEqual( + (client.descriptors.page.listJobs.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listJobs without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListJobsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + ]; + client.descriptors.page.listJobs.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.IJob[] = []; + const iterable = client.listJobsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listJobs.asyncIterate as SinonStub).getCall(0) + .args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listJobs.asyncIterate as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listJobs with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListJobsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listJobs.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listJobsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.IJob[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listJobs.asyncIterate as SinonStub).getCall(0) + .args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listJobs.asyncIterate as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('Path templates', () => { + describe('asset', () => { + const fakePath = '/rendered/path/asset'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + zone: 'zoneValue', + asset: 'assetValue', + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.assetPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.assetPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('assetPath', () => { + const result = client.assetPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'zoneValue', + 'assetValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.assetPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromAssetName', () => { + const result = client.matchProjectFromAssetName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromAssetName', () => { + const result = client.matchLocationFromAssetName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromAssetName', () => { + const result = client.matchLakeFromAssetName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchZoneFromAssetName', () => { + const result = client.matchZoneFromAssetName(fakePath); + assert.strictEqual(result, 'zoneValue'); + assert( + (client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAssetFromAssetName', () => { + const result = client.matchAssetFromAssetName(fakePath); + assert.strictEqual(result, 'assetValue'); + assert( + (client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('entity', () => { + const fakePath = '/rendered/path/entity'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + zone: 'zoneValue', + entity: 'entityValue', + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.entityPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.entityPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('entityPath', () => { + const result = client.entityPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'zoneValue', + 'entityValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.entityPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromEntityName', () => { + const result = client.matchProjectFromEntityName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromEntityName', () => { + const result = client.matchLocationFromEntityName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromEntityName', () => { + const result = client.matchLakeFromEntityName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchZoneFromEntityName', () => { + const result = client.matchZoneFromEntityName(fakePath); + assert.strictEqual(result, 'zoneValue'); + assert( + (client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEntityFromEntityName', () => { + const result = client.matchEntityFromEntityName(fakePath); + assert.strictEqual(result, 'entityValue'); + assert( + (client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('job', () => { + const fakePath = '/rendered/path/job'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + task: 'taskValue', + job: 'jobValue', + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.jobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.jobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('jobPath', () => { + const result = client.jobPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'taskValue', + 'jobValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.jobPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromJobName', () => { + const result = client.matchProjectFromJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromJobName', () => { + const result = client.matchLocationFromJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromJobName', () => { + const result = client.matchLakeFromJobName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTaskFromJobName', () => { + const result = client.matchTaskFromJobName(fakePath); + assert.strictEqual(result, 'taskValue'); + assert( + (client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchJobFromJobName', () => { + const result = client.matchJobFromJobName(fakePath); + assert.strictEqual(result, 'jobValue'); + assert( + (client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('lake', () => { + const fakePath = '/rendered/path/lake'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.lakePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.lakePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('lakePath', () => { + const result = client.lakePath( + 'projectValue', + 'locationValue', + 'lakeValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.lakePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromLakeName', () => { + const result = client.matchProjectFromLakeName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.lakePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromLakeName', () => { + const result = client.matchLocationFromLakeName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.lakePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromLakeName', () => { + const result = client.matchLakeFromLakeName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.lakePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('location', () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.locationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.locationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath('projectValue', 'locationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('partition', () => { + const fakePath = '/rendered/path/partition'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + zone: 'zoneValue', + entity: 'entityValue', + partition: 'partitionValue', + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.partitionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.partitionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('partitionPath', () => { + const result = client.partitionPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'zoneValue', + 'entityValue', + 'partitionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.partitionPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPartitionName', () => { + const result = client.matchProjectFromPartitionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromPartitionName', () => { + const result = client.matchLocationFromPartitionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromPartitionName', () => { + const result = client.matchLakeFromPartitionName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchZoneFromPartitionName', () => { + const result = client.matchZoneFromPartitionName(fakePath); + assert.strictEqual(result, 'zoneValue'); + assert( + (client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEntityFromPartitionName', () => { + const result = client.matchEntityFromPartitionName(fakePath); + assert.strictEqual(result, 'entityValue'); + assert( + (client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPartitionFromPartitionName', () => { + const result = client.matchPartitionFromPartitionName(fakePath); + assert.strictEqual(result, 'partitionValue'); + assert( + (client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationLakeAction', () => { + const fakePath = '/rendered/path/projectLocationLakeAction'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + action: 'actionValue', + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationLakeActionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationLakeActionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationLakeActionPath', () => { + const result = client.projectLocationLakeActionPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'actionValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationLakeActionPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationLakeActionName', () => { + const result = + client.matchProjectFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationLakeActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationLakeActionName', () => { + const result = + client.matchLocationFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationLakeActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromProjectLocationLakeActionName', () => { + const result = + client.matchLakeFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + ( + client.pathTemplates.projectLocationLakeActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchActionFromProjectLocationLakeActionName', () => { + const result = + client.matchActionFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, 'actionValue'); + assert( + ( + client.pathTemplates.projectLocationLakeActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationLakeZoneAction', () => { + const fakePath = '/rendered/path/projectLocationLakeZoneAction'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + zone: 'zoneValue', + action: 'actionValue', + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationLakeZoneActionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationLakeZoneActionPath', () => { + const result = client.projectLocationLakeZoneActionPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'zoneValue', + 'actionValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationLakeZoneActionPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationLakeZoneActionName', () => { + const result = + client.matchProjectFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationLakeZoneActionName', () => { + const result = + client.matchLocationFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromProjectLocationLakeZoneActionName', () => { + const result = + client.matchLakeFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchZoneFromProjectLocationLakeZoneActionName', () => { + const result = + client.matchZoneFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, 'zoneValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchActionFromProjectLocationLakeZoneActionName', () => { + const result = + client.matchActionFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, 'actionValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationLakeZoneAssetAction', () => { + const fakePath = '/rendered/path/projectLocationLakeZoneAssetAction'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + zone: 'zoneValue', + asset: 'assetValue', + action: 'actionValue', + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationLakeZoneAssetActionPath', () => { + const result = client.projectLocationLakeZoneAssetActionPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'zoneValue', + 'assetValue', + 'actionValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationLakeZoneAssetActionName', () => { + const result = + client.matchProjectFromProjectLocationLakeZoneAssetActionName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationLakeZoneAssetActionName', () => { + const result = + client.matchLocationFromProjectLocationLakeZoneAssetActionName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromProjectLocationLakeZoneAssetActionName', () => { + const result = + client.matchLakeFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchZoneFromProjectLocationLakeZoneAssetActionName', () => { + const result = + client.matchZoneFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, 'zoneValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAssetFromProjectLocationLakeZoneAssetActionName', () => { + const result = + client.matchAssetFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, 'assetValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchActionFromProjectLocationLakeZoneAssetActionName', () => { + const result = + client.matchActionFromProjectLocationLakeZoneAssetActionName( + fakePath + ); + assert.strictEqual(result, 'actionValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('task', () => { + const fakePath = '/rendered/path/task'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + task: 'taskValue', + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.taskPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.taskPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('taskPath', () => { + const result = client.taskPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'taskValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.taskPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromTaskName', () => { + const result = client.matchProjectFromTaskName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromTaskName', () => { + const result = client.matchLocationFromTaskName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromTaskName', () => { + const result = client.matchLakeFromTaskName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTaskFromTaskName', () => { + const result = client.matchTaskFromTaskName(fakePath); + assert.strictEqual(result, 'taskValue'); + assert( + (client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('zone', () => { + const fakePath = '/rendered/path/zone'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + zone: 'zoneValue', + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.zonePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.zonePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('zonePath', () => { + const result = client.zonePath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'zoneValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.zonePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromZoneName', () => { + const result = client.matchProjectFromZoneName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromZoneName', () => { + const result = client.matchLocationFromZoneName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromZoneName', () => { + const result = client.matchLakeFromZoneName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchZoneFromZoneName', () => { + const result = client.matchZoneFromZoneName(fakePath); + assert.strictEqual(result, 'zoneValue'); + assert( + (client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-dataplex/test/gapic_metadata_service_v1.ts b/packages/google-cloud-dataplex/test/gapic_metadata_service_v1.ts new file mode 100644 index 00000000000..56decc46b4c --- /dev/null +++ b/packages/google-cloud-dataplex/test/gapic_metadata_service_v1.ts @@ -0,0 +1,1897 @@ +// Copyright 2022 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as metadataserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf} from 'google-gax'; + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.MetadataServiceClient', () => { + it('has servicePath', () => { + const servicePath = + metadataserviceModule.v1.MetadataServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + metadataserviceModule.v1.MetadataServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = metadataserviceModule.v1.MetadataServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new metadataserviceModule.v1.MetadataServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.metadataServiceStub, undefined); + await client.initialize(); + assert(client.metadataServiceStub); + }); + + it('has close method', () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + + describe('getEntity', () => { + it('invokes getEntity without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetEntityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Entity() + ); + client.innerApiCalls.getEntity = stubSimpleCall(expectedResponse); + const [response] = await client.getEntity(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getEntity as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getEntity without error using callback', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetEntityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Entity() + ); + client.innerApiCalls.getEntity = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getEntity( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IEntity | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getEntity as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getEntity with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetEntityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getEntity = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getEntity(request), expectedError); + assert( + (client.innerApiCalls.getEntity as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getPartition', () => { + it('invokes getPartition without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetPartitionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Partition() + ); + client.innerApiCalls.getPartition = stubSimpleCall(expectedResponse); + const [response] = await client.getPartition(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getPartition as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getPartition without error using callback', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetPartitionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Partition() + ); + client.innerApiCalls.getPartition = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getPartition( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IPartition | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getPartition as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getPartition with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetPartitionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getPartition = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getPartition(request), expectedError); + assert( + (client.innerApiCalls.getPartition as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('listEntities', () => { + it('invokes listEntities without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntitiesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), + ]; + client.innerApiCalls.listEntities = stubSimpleCall(expectedResponse); + const [response] = await client.listEntities(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listEntities as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listEntities without error using callback', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntitiesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), + ]; + client.innerApiCalls.listEntities = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listEntities( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IEntity[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listEntities as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listEntities with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntitiesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listEntities = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listEntities(request), expectedError); + assert( + (client.innerApiCalls.listEntities as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listEntitiesStream without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntitiesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), + ]; + client.descriptors.page.listEntities.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listEntitiesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Entity[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataplex.v1.Entity) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listEntities.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listEntities, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listEntities.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listEntitiesStream with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntitiesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listEntities.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listEntitiesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Entity[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataplex.v1.Entity) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listEntities.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listEntities, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listEntities.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listEntities without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntitiesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), + ]; + client.descriptors.page.listEntities.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.IEntity[] = []; + const iterable = client.listEntitiesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listEntities.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listEntities.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listEntities with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntitiesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listEntities.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listEntitiesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.IEntity[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listEntities.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listEntities.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listPartitions', () => { + it('invokes listPartitions without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListPartitionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), + ]; + client.innerApiCalls.listPartitions = stubSimpleCall(expectedResponse); + const [response] = await client.listPartitions(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listPartitions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listPartitions without error using callback', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListPartitionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), + ]; + client.innerApiCalls.listPartitions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listPartitions( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IPartition[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listPartitions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listPartitions with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListPartitionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listPartitions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listPartitions(request), expectedError); + assert( + (client.innerApiCalls.listPartitions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listPartitionsStream without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListPartitionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), + ]; + client.descriptors.page.listPartitions.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listPartitionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Partition[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataplex.v1.Partition) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listPartitions.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listPartitions, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listPartitions.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listPartitionsStream with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListPartitionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listPartitions.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listPartitionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Partition[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataplex.v1.Partition) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listPartitions.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listPartitions, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listPartitions.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listPartitions without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListPartitionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), + ]; + client.descriptors.page.listPartitions.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.IPartition[] = []; + const iterable = client.listPartitionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listPartitions.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listPartitions.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listPartitions with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListPartitionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listPartitions.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listPartitionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.IPartition[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listPartitions.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listPartitions.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('Path templates', () => { + describe('asset', () => { + const fakePath = '/rendered/path/asset'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + zone: 'zoneValue', + asset: 'assetValue', + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.assetPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.assetPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('assetPath', () => { + const result = client.assetPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'zoneValue', + 'assetValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.assetPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromAssetName', () => { + const result = client.matchProjectFromAssetName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromAssetName', () => { + const result = client.matchLocationFromAssetName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromAssetName', () => { + const result = client.matchLakeFromAssetName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchZoneFromAssetName', () => { + const result = client.matchZoneFromAssetName(fakePath); + assert.strictEqual(result, 'zoneValue'); + assert( + (client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAssetFromAssetName', () => { + const result = client.matchAssetFromAssetName(fakePath); + assert.strictEqual(result, 'assetValue'); + assert( + (client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('entity', () => { + const fakePath = '/rendered/path/entity'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + zone: 'zoneValue', + entity: 'entityValue', + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.entityPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.entityPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('entityPath', () => { + const result = client.entityPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'zoneValue', + 'entityValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.entityPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromEntityName', () => { + const result = client.matchProjectFromEntityName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromEntityName', () => { + const result = client.matchLocationFromEntityName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromEntityName', () => { + const result = client.matchLakeFromEntityName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchZoneFromEntityName', () => { + const result = client.matchZoneFromEntityName(fakePath); + assert.strictEqual(result, 'zoneValue'); + assert( + (client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEntityFromEntityName', () => { + const result = client.matchEntityFromEntityName(fakePath); + assert.strictEqual(result, 'entityValue'); + assert( + (client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('job', () => { + const fakePath = '/rendered/path/job'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + task: 'taskValue', + job: 'jobValue', + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.jobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.jobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('jobPath', () => { + const result = client.jobPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'taskValue', + 'jobValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.jobPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromJobName', () => { + const result = client.matchProjectFromJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromJobName', () => { + const result = client.matchLocationFromJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromJobName', () => { + const result = client.matchLakeFromJobName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTaskFromJobName', () => { + const result = client.matchTaskFromJobName(fakePath); + assert.strictEqual(result, 'taskValue'); + assert( + (client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchJobFromJobName', () => { + const result = client.matchJobFromJobName(fakePath); + assert.strictEqual(result, 'jobValue'); + assert( + (client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('lake', () => { + const fakePath = '/rendered/path/lake'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.lakePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.lakePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('lakePath', () => { + const result = client.lakePath( + 'projectValue', + 'locationValue', + 'lakeValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.lakePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromLakeName', () => { + const result = client.matchProjectFromLakeName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.lakePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromLakeName', () => { + const result = client.matchLocationFromLakeName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.lakePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromLakeName', () => { + const result = client.matchLakeFromLakeName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.lakePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('partition', () => { + const fakePath = '/rendered/path/partition'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + zone: 'zoneValue', + entity: 'entityValue', + partition: 'partitionValue', + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.partitionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.partitionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('partitionPath', () => { + const result = client.partitionPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'zoneValue', + 'entityValue', + 'partitionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.partitionPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPartitionName', () => { + const result = client.matchProjectFromPartitionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromPartitionName', () => { + const result = client.matchLocationFromPartitionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromPartitionName', () => { + const result = client.matchLakeFromPartitionName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchZoneFromPartitionName', () => { + const result = client.matchZoneFromPartitionName(fakePath); + assert.strictEqual(result, 'zoneValue'); + assert( + (client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEntityFromPartitionName', () => { + const result = client.matchEntityFromPartitionName(fakePath); + assert.strictEqual(result, 'entityValue'); + assert( + (client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPartitionFromPartitionName', () => { + const result = client.matchPartitionFromPartitionName(fakePath); + assert.strictEqual(result, 'partitionValue'); + assert( + (client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationLakeAction', () => { + const fakePath = '/rendered/path/projectLocationLakeAction'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + action: 'actionValue', + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationLakeActionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationLakeActionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationLakeActionPath', () => { + const result = client.projectLocationLakeActionPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'actionValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationLakeActionPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationLakeActionName', () => { + const result = + client.matchProjectFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationLakeActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationLakeActionName', () => { + const result = + client.matchLocationFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationLakeActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromProjectLocationLakeActionName', () => { + const result = + client.matchLakeFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + ( + client.pathTemplates.projectLocationLakeActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchActionFromProjectLocationLakeActionName', () => { + const result = + client.matchActionFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, 'actionValue'); + assert( + ( + client.pathTemplates.projectLocationLakeActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationLakeZoneAction', () => { + const fakePath = '/rendered/path/projectLocationLakeZoneAction'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + zone: 'zoneValue', + action: 'actionValue', + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationLakeZoneActionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationLakeZoneActionPath', () => { + const result = client.projectLocationLakeZoneActionPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'zoneValue', + 'actionValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationLakeZoneActionPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationLakeZoneActionName', () => { + const result = + client.matchProjectFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationLakeZoneActionName', () => { + const result = + client.matchLocationFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromProjectLocationLakeZoneActionName', () => { + const result = + client.matchLakeFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchZoneFromProjectLocationLakeZoneActionName', () => { + const result = + client.matchZoneFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, 'zoneValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchActionFromProjectLocationLakeZoneActionName', () => { + const result = + client.matchActionFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, 'actionValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationLakeZoneAssetAction', () => { + const fakePath = '/rendered/path/projectLocationLakeZoneAssetAction'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + zone: 'zoneValue', + asset: 'assetValue', + action: 'actionValue', + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationLakeZoneAssetActionPath', () => { + const result = client.projectLocationLakeZoneAssetActionPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'zoneValue', + 'assetValue', + 'actionValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationLakeZoneAssetActionName', () => { + const result = + client.matchProjectFromProjectLocationLakeZoneAssetActionName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationLakeZoneAssetActionName', () => { + const result = + client.matchLocationFromProjectLocationLakeZoneAssetActionName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromProjectLocationLakeZoneAssetActionName', () => { + const result = + client.matchLakeFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchZoneFromProjectLocationLakeZoneAssetActionName', () => { + const result = + client.matchZoneFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, 'zoneValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAssetFromProjectLocationLakeZoneAssetActionName', () => { + const result = + client.matchAssetFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, 'assetValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchActionFromProjectLocationLakeZoneAssetActionName', () => { + const result = + client.matchActionFromProjectLocationLakeZoneAssetActionName( + fakePath + ); + assert.strictEqual(result, 'actionValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('task', () => { + const fakePath = '/rendered/path/task'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + task: 'taskValue', + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.taskPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.taskPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('taskPath', () => { + const result = client.taskPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'taskValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.taskPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromTaskName', () => { + const result = client.matchProjectFromTaskName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromTaskName', () => { + const result = client.matchLocationFromTaskName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromTaskName', () => { + const result = client.matchLakeFromTaskName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTaskFromTaskName', () => { + const result = client.matchTaskFromTaskName(fakePath); + assert.strictEqual(result, 'taskValue'); + assert( + (client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('zone', () => { + const fakePath = '/rendered/path/zone'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + zone: 'zoneValue', + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.zonePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.zonePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('zonePath', () => { + const result = client.zonePath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'zoneValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.zonePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromZoneName', () => { + const result = client.matchProjectFromZoneName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromZoneName', () => { + const result = client.matchLocationFromZoneName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromZoneName', () => { + const result = client.matchLakeFromZoneName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchZoneFromZoneName', () => { + const result = client.matchZoneFromZoneName(fakePath); + assert.strictEqual(result, 'zoneValue'); + assert( + (client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-dataplex/tsconfig.json b/packages/google-cloud-dataplex/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/packages/google-cloud-dataplex/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2018", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts" + ] +} diff --git a/packages/google-cloud-dataplex/webpack.config.js b/packages/google-cloud-dataplex/webpack.config.js new file mode 100644 index 00000000000..6967b216cde --- /dev/null +++ b/packages/google-cloud-dataplex/webpack.config.js @@ -0,0 +1,64 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// https://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. + +const path = require('path'); + +module.exports = { + entry: './src/index.ts', + output: { + library: 'DataplexService', + filename: './dataplex-service.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/, + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]gtoken/, + use: 'null-loader', + }, + ], + }, + mode: 'production', +}; From 9a83f94b877b23508f09cd330d300c593f291caf Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 2 Feb 2022 17:00:59 +0100 Subject: [PATCH 134/254] chore(deps): update dependency sinon to v13 (#65) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^12.0.0` -> `^13.0.0`](https://renovatebot.com/diffs/npm/sinon/12.0.0/13.0.1) | [![age](https://badges.renovateapi.com/packages/npm/sinon/13.0.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/13.0.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/13.0.1/compatibility-slim/12.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/13.0.1/confidence-slim/12.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v13.0.1`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1301) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v13.0.0...v13.0.1) - [`ec4223f9`](https://togithub.com/sinonjs/sinon/commit/ec4223f94076d809483e3c6a7536cfc1278dd3c9) Bump nise to fix [sinonjs/nise#​193](https://togithub.com/sinonjs/nise/issues/193) (Carl-Erik Kopseng) - [`f329a010`](https://togithub.com/sinonjs/sinon/commit/f329a01040bfa5a79e039419220b21eda56935d6) Add unimported to workflow ([#​2441](https://togithub.com/sinonjs/sinon/issues/2441)) (Morgan Roderick) - [`7f16cec9`](https://togithub.com/sinonjs/sinon/commit/7f16cec968c3c8d4e580267fb00195916d6f827d) Enable updates to same major version (Carl-Erik Kopseng) - [`f784d7ad`](https://togithub.com/sinonjs/sinon/commit/f784d7ad2c86be0fc65477d69f8bdafca846ef2c) Re-introduce new version.sh script to version hook (Joel Bradshaw) > This was inadvertently removed during merge conflicts, and is required > for any of the new release process stuff to work - [`51c508ab`](https://togithub.com/sinonjs/sinon/commit/51c508ab77cf0f9fb8c5305ff626f6a2eada178f) Add dry run mode to `npm version` ([#​2436](https://togithub.com/sinonjs/sinon/issues/2436)) (Joel Bradshaw) > - Add DRY_RUN flag to skip publish/push > > - Allow overriding branch names for testing - [`05341dcf`](https://togithub.com/sinonjs/sinon/commit/05341dcf92ddca4a1d4c90966b1fcdc7039cff18) Update npm version scripts to manage new releases branch (Joel Bradshaw) - [`fe658261`](https://togithub.com/sinonjs/sinon/commit/fe65826171db69ed2986a1060db77944dbc98a6d) Remove release archives from master (Joel Bradshaw) > These archives made it difficult to find things in the GitHub interface, > and take up a lot of space in a checked-out repo for something that is > not useful to most people checking out the repository. > > The main purpose of these archives is to make old versions and > documentation available on the Sinon website that is run out of this > repo. This can be supported by using a separate branch for website > releases, and to maintain the archives. > > Following this commit, the `npm version` scripts will be updated to > automatically handle archiving the releases in the new releases branch > and keeping it up to date with master. > > Also remove the directories we removed from .prettierignore, since they > don't exist any more. *Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2022-02-01.* ### [`v13.0.0`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1300) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v12.0.1...v13.0.0) - [`cf3d6c0c`](https://togithub.com/sinonjs/sinon/commit/cf3d6c0cd9689c0ee673b3daa8bf9abd70304392) Upgrade packages ([#​2431](https://togithub.com/sinonjs/sinon/issues/2431)) (Carl-Erik Kopseng) > - Update all @​sinonjs/ packages > > - Upgrade to fake-timers 9 > > - chore: ensure always using latest LTS release - [`41710467`](https://togithub.com/sinonjs/sinon/commit/417104670d575e96a1b645ea40ce763afa76fb1b) Adjust deploy scripts to archive old releases in a separate branch, move existing releases out of master ([#​2426](https://togithub.com/sinonjs/sinon/issues/2426)) (Joel Bradshaw) > Co-authored-by: Carl-Erik Kopseng - [`c80a7266`](https://togithub.com/sinonjs/sinon/commit/c80a72660e89d88b08275eff1028ecb9e26fd8e9) Bump node-fetch from 2.6.1 to 2.6.7 ([#​2430](https://togithub.com/sinonjs/sinon/issues/2430)) (dependabot\[bot]) > Co-authored-by: dependabot\[bot] <49699333+dependabot\[bot][@​users](https://togithub.com/users).noreply.github.com> - [`a00f14a9`](https://togithub.com/sinonjs/sinon/commit/a00f14a97dbe8c65afa89674e16ad73fc7d2fdc0) Add explicit export for `./*` ([#​2413](https://togithub.com/sinonjs/sinon/issues/2413)) (なつき) - [`b82ca7ad`](https://togithub.com/sinonjs/sinon/commit/b82ca7ad9b1add59007771f65a18ee34415de8ca) Bump cached-path-relative from 1.0.2 to 1.1.0 ([#​2428](https://togithub.com/sinonjs/sinon/issues/2428)) (dependabot\[bot]) - [`a9ea1427`](https://togithub.com/sinonjs/sinon/commit/a9ea142716c094ef3c432ecc4089f8207b8dd8b6) Add documentation for assert.calledOnceWithMatch ([#​2424](https://togithub.com/sinonjs/sinon/issues/2424)) (Mathias Schreck) - [`1d5ab86b`](https://togithub.com/sinonjs/sinon/commit/1d5ab86ba60e50dd69593ffed2bffd4b8faa0d38) Be more general in stripping off stack frames to fix Firefox tests ([#​2425](https://togithub.com/sinonjs/sinon/issues/2425)) (Joel Bradshaw) - [`56b06129`](https://togithub.com/sinonjs/sinon/commit/56b06129e223eae690265c37b1113067e2b31bdc) Check call count type ([#​2410](https://togithub.com/sinonjs/sinon/issues/2410)) (Joel Bradshaw) - [`7863e2df`](https://togithub.com/sinonjs/sinon/commit/7863e2dfdbda79e0a32e42af09e6539fc2f2b80f) Fix [#​2414](https://togithub.com/sinonjs/sinon/issues/2414): make Sinon available on homepage (Carl-Erik Kopseng) - [`fabaabdd`](https://togithub.com/sinonjs/sinon/commit/fabaabdda82f39a7f5b75b55bd56cf77b1cd4a8f) Bump nokogiri from 1.11.4 to 1.13.1 ([#​2423](https://togithub.com/sinonjs/sinon/issues/2423)) (dependabot\[bot]) - [`dbc0fbd2`](https://togithub.com/sinonjs/sinon/commit/dbc0fbd263c8419fa47f9c3b20cf47890a242d21) Bump shelljs from 0.8.4 to 0.8.5 ([#​2422](https://togithub.com/sinonjs/sinon/issues/2422)) (dependabot\[bot]) - [`fb8b3d72`](https://togithub.com/sinonjs/sinon/commit/fb8b3d72a85dc8fb0547f859baf3f03a22a039f7) Run Prettier (Carl-Erik Kopseng) - [`12a45939`](https://togithub.com/sinonjs/sinon/commit/12a45939e9b047b6d3663fe55f2eb383ec63c4e1) Fix 2377: Throw error when trying to stub non-configurable or non-writable properties ([#​2417](https://togithub.com/sinonjs/sinon/issues/2417)) (Stuart Dotson) > Fixes issue [#​2377](https://togithub.com/sinonjs/sinon/issues/2377) by throwing an error when trying to stub non-configurable or non-writable properties *Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2022-01-28.* ### [`v12.0.1`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1201) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v12.0.0...v12.0.1) - [`3f598221`](https://togithub.com/sinonjs/sinon/commit/3f598221045904681f2b3b3ba1df617ed5e230e3) Fix issue with npm unlink for npm version > 6 (Carl-Erik Kopseng) - [`51417a38`](https://togithub.com/sinonjs/sinon/commit/51417a38111eeeb7cd14338bfb762cc2df487e1b) Fix bundling of cjs module ([#​2412](https://togithub.com/sinonjs/sinon/issues/2412)) (Julian Grinblat) *Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2021-11-04.*
--- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-cloud-shell). --- packages/google-cloud-shell/package-lock.json | 22 +++++++++---------- packages/google-cloud-shell/package.json | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/google-cloud-shell/package-lock.json b/packages/google-cloud-shell/package-lock.json index f4dd6c03217..630ac3e39d7 100644 --- a/packages/google-cloud-shell/package-lock.json +++ b/packages/google-cloud-shell/package-lock.json @@ -288,9 +288,9 @@ } }, "@sinonjs/samsam": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-6.0.2.tgz", - "integrity": "sha512-jxPRPp9n93ci7b8hMfJOFDPRLFYadN6FSpeROFTR4UNF4i5b+EK6m4QXPO46BDhFgRy1JuS87zAnFOzCUwMJcQ==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-6.1.1.tgz", + "integrity": "sha512-cZ7rKJTLiE7u7Wi/v9Hc2fs3Ucc3jrWeMgPHbbTCeVAB2S0wOBbYlkJVeNSL04i7fdhT8wIbDq1zhC/PXTD2SA==", "dev": true, "requires": { "@sinonjs/commons": "^1.6.0", @@ -4235,23 +4235,23 @@ "dev": true }, "sinon": { - "version": "12.0.0", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-12.0.0.tgz", - "integrity": "sha512-wVMT1jvgyLroQu+tWTa2XJu2g5SoVaEBhdwGPuzmWlRvZNSG+pcEb8HEmsxTdoPjUL58pJFQ3+oFRWrhC4JKHw==", + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-13.0.0.tgz", + "integrity": "sha512-3tjMDB/tY04b06Bnb4aMKQfNrau2C9HET+R4HVWfv2KegDVLGg4wnBqjVepvxR7S7R1GTwDZzEv52tpFipt6yA==", "dev": true, "requires": { "@sinonjs/commons": "^1.8.3", - "@sinonjs/fake-timers": "^8.1.0", - "@sinonjs/samsam": "^6.0.2", + "@sinonjs/fake-timers": "^9.0.0", + "@sinonjs/samsam": "^6.1.1", "diff": "^5.0.0", "nise": "^5.1.0", "supports-color": "^7.2.0" }, "dependencies": { "@sinonjs/fake-timers": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz", - "integrity": "sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.0.0.tgz", + "integrity": "sha512-+shXA2X7KNP7H7qNbQTJ3SA+NQc0pZDSBrdvFSRwF8sAo/ohw+ZQFD8Moc+gnz51+1eRXtEQBpKWPiQ4jsRC/w==", "dev": true, "requires": { "@sinonjs/commons": "^1.7.0" diff --git a/packages/google-cloud-shell/package.json b/packages/google-cloud-shell/package.json index 6ffd7ff908a..dfb25a56e2a 100644 --- a/packages/google-cloud-shell/package.json +++ b/packages/google-cloud-shell/package.json @@ -54,7 +54,7 @@ "mocha": "^9.0.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", - "sinon": "^12.0.0", + "sinon": "^13.0.0", "ts-loader": "^9.1.2", "typescript": "^4.2.4", "webpack": "^5.36.2", From af677449bb3e4fb8b2f84dd1a4a080b25aec244f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 2 Feb 2022 17:01:11 +0100 Subject: [PATCH 135/254] chore(deps): update dependency sinon to v13 (#52) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^12.0.0` -> `^13.0.0`](https://renovatebot.com/diffs/npm/sinon/12.0.1/13.0.1) | [![age](https://badges.renovateapi.com/packages/npm/sinon/13.0.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/13.0.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/13.0.1/compatibility-slim/12.0.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/13.0.1/confidence-slim/12.0.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v13.0.1`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1301) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v13.0.0...v13.0.1) - [`ec4223f9`](https://togithub.com/sinonjs/sinon/commit/ec4223f94076d809483e3c6a7536cfc1278dd3c9) Bump nise to fix [sinonjs/nise#​193](https://togithub.com/sinonjs/nise/issues/193) (Carl-Erik Kopseng) - [`f329a010`](https://togithub.com/sinonjs/sinon/commit/f329a01040bfa5a79e039419220b21eda56935d6) Add unimported to workflow ([#​2441](https://togithub.com/sinonjs/sinon/issues/2441)) (Morgan Roderick) - [`7f16cec9`](https://togithub.com/sinonjs/sinon/commit/7f16cec968c3c8d4e580267fb00195916d6f827d) Enable updates to same major version (Carl-Erik Kopseng) - [`f784d7ad`](https://togithub.com/sinonjs/sinon/commit/f784d7ad2c86be0fc65477d69f8bdafca846ef2c) Re-introduce new version.sh script to version hook (Joel Bradshaw) > This was inadvertently removed during merge conflicts, and is required > for any of the new release process stuff to work - [`51c508ab`](https://togithub.com/sinonjs/sinon/commit/51c508ab77cf0f9fb8c5305ff626f6a2eada178f) Add dry run mode to `npm version` ([#​2436](https://togithub.com/sinonjs/sinon/issues/2436)) (Joel Bradshaw) > - Add DRY_RUN flag to skip publish/push > > - Allow overriding branch names for testing - [`05341dcf`](https://togithub.com/sinonjs/sinon/commit/05341dcf92ddca4a1d4c90966b1fcdc7039cff18) Update npm version scripts to manage new releases branch (Joel Bradshaw) - [`fe658261`](https://togithub.com/sinonjs/sinon/commit/fe65826171db69ed2986a1060db77944dbc98a6d) Remove release archives from master (Joel Bradshaw) > These archives made it difficult to find things in the GitHub interface, > and take up a lot of space in a checked-out repo for something that is > not useful to most people checking out the repository. > > The main purpose of these archives is to make old versions and > documentation available on the Sinon website that is run out of this > repo. This can be supported by using a separate branch for website > releases, and to maintain the archives. > > Following this commit, the `npm version` scripts will be updated to > automatically handle archiving the releases in the new releases branch > and keeping it up to date with master. > > Also remove the directories we removed from .prettierignore, since they > don't exist any more. *Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2022-02-01.* ### [`v13.0.0`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1300) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v12.0.1...v13.0.0) - [`cf3d6c0c`](https://togithub.com/sinonjs/sinon/commit/cf3d6c0cd9689c0ee673b3daa8bf9abd70304392) Upgrade packages ([#​2431](https://togithub.com/sinonjs/sinon/issues/2431)) (Carl-Erik Kopseng) > - Update all @​sinonjs/ packages > > - Upgrade to fake-timers 9 > > - chore: ensure always using latest LTS release - [`41710467`](https://togithub.com/sinonjs/sinon/commit/417104670d575e96a1b645ea40ce763afa76fb1b) Adjust deploy scripts to archive old releases in a separate branch, move existing releases out of master ([#​2426](https://togithub.com/sinonjs/sinon/issues/2426)) (Joel Bradshaw) > Co-authored-by: Carl-Erik Kopseng - [`c80a7266`](https://togithub.com/sinonjs/sinon/commit/c80a72660e89d88b08275eff1028ecb9e26fd8e9) Bump node-fetch from 2.6.1 to 2.6.7 ([#​2430](https://togithub.com/sinonjs/sinon/issues/2430)) (dependabot\[bot]) > Co-authored-by: dependabot\[bot] <49699333+dependabot\[bot][@​users](https://togithub.com/users).noreply.github.com> - [`a00f14a9`](https://togithub.com/sinonjs/sinon/commit/a00f14a97dbe8c65afa89674e16ad73fc7d2fdc0) Add explicit export for `./*` ([#​2413](https://togithub.com/sinonjs/sinon/issues/2413)) (なつき) - [`b82ca7ad`](https://togithub.com/sinonjs/sinon/commit/b82ca7ad9b1add59007771f65a18ee34415de8ca) Bump cached-path-relative from 1.0.2 to 1.1.0 ([#​2428](https://togithub.com/sinonjs/sinon/issues/2428)) (dependabot\[bot]) - [`a9ea1427`](https://togithub.com/sinonjs/sinon/commit/a9ea142716c094ef3c432ecc4089f8207b8dd8b6) Add documentation for assert.calledOnceWithMatch ([#​2424](https://togithub.com/sinonjs/sinon/issues/2424)) (Mathias Schreck) - [`1d5ab86b`](https://togithub.com/sinonjs/sinon/commit/1d5ab86ba60e50dd69593ffed2bffd4b8faa0d38) Be more general in stripping off stack frames to fix Firefox tests ([#​2425](https://togithub.com/sinonjs/sinon/issues/2425)) (Joel Bradshaw) - [`56b06129`](https://togithub.com/sinonjs/sinon/commit/56b06129e223eae690265c37b1113067e2b31bdc) Check call count type ([#​2410](https://togithub.com/sinonjs/sinon/issues/2410)) (Joel Bradshaw) - [`7863e2df`](https://togithub.com/sinonjs/sinon/commit/7863e2dfdbda79e0a32e42af09e6539fc2f2b80f) Fix [#​2414](https://togithub.com/sinonjs/sinon/issues/2414): make Sinon available on homepage (Carl-Erik Kopseng) - [`fabaabdd`](https://togithub.com/sinonjs/sinon/commit/fabaabdda82f39a7f5b75b55bd56cf77b1cd4a8f) Bump nokogiri from 1.11.4 to 1.13.1 ([#​2423](https://togithub.com/sinonjs/sinon/issues/2423)) (dependabot\[bot]) - [`dbc0fbd2`](https://togithub.com/sinonjs/sinon/commit/dbc0fbd263c8419fa47f9c3b20cf47890a242d21) Bump shelljs from 0.8.4 to 0.8.5 ([#​2422](https://togithub.com/sinonjs/sinon/issues/2422)) (dependabot\[bot]) - [`fb8b3d72`](https://togithub.com/sinonjs/sinon/commit/fb8b3d72a85dc8fb0547f859baf3f03a22a039f7) Run Prettier (Carl-Erik Kopseng) - [`12a45939`](https://togithub.com/sinonjs/sinon/commit/12a45939e9b047b6d3663fe55f2eb383ec63c4e1) Fix 2377: Throw error when trying to stub non-configurable or non-writable properties ([#​2417](https://togithub.com/sinonjs/sinon/issues/2417)) (Stuart Dotson) > Fixes issue [#​2377](https://togithub.com/sinonjs/sinon/issues/2377) by throwing an error when trying to stub non-configurable or non-writable properties *Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2022-01-28.*
--- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-gke-connect-gateway). --- packages/google-cloud-gkeconnect-gateway/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-gkeconnect-gateway/package.json b/packages/google-cloud-gkeconnect-gateway/package.json index 4ff78b3bbf6..7cd9c728a0b 100644 --- a/packages/google-cloud-gkeconnect-gateway/package.json +++ b/packages/google-cloud-gkeconnect-gateway/package.json @@ -54,7 +54,7 @@ "mocha": "^9.0.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", - "sinon": "^12.0.0", + "sinon": "^13.0.0", "ts-loader": "^9.1.2", "typescript": "^4.2.4", "webpack": "^5.36.2", From 230ee863da21282f4b7b36170b34033560b49acb Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 2 Feb 2022 17:20:42 +0100 Subject: [PATCH 136/254] chore(deps): update dependency sinon to v13 (#103) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^12.0.0` -> `^13.0.0`](https://renovatebot.com/diffs/npm/sinon/12.0.1/13.0.1) | [![age](https://badges.renovateapi.com/packages/npm/sinon/13.0.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/13.0.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/13.0.1/compatibility-slim/12.0.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/13.0.1/confidence-slim/12.0.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v13.0.1`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1301) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v13.0.0...v13.0.1) - [`ec4223f9`](https://togithub.com/sinonjs/sinon/commit/ec4223f94076d809483e3c6a7536cfc1278dd3c9) Bump nise to fix [sinonjs/nise#​193](https://togithub.com/sinonjs/nise/issues/193) (Carl-Erik Kopseng) - [`f329a010`](https://togithub.com/sinonjs/sinon/commit/f329a01040bfa5a79e039419220b21eda56935d6) Add unimported to workflow ([#​2441](https://togithub.com/sinonjs/sinon/issues/2441)) (Morgan Roderick) - [`7f16cec9`](https://togithub.com/sinonjs/sinon/commit/7f16cec968c3c8d4e580267fb00195916d6f827d) Enable updates to same major version (Carl-Erik Kopseng) - [`f784d7ad`](https://togithub.com/sinonjs/sinon/commit/f784d7ad2c86be0fc65477d69f8bdafca846ef2c) Re-introduce new version.sh script to version hook (Joel Bradshaw) > This was inadvertently removed during merge conflicts, and is required > for any of the new release process stuff to work - [`51c508ab`](https://togithub.com/sinonjs/sinon/commit/51c508ab77cf0f9fb8c5305ff626f6a2eada178f) Add dry run mode to `npm version` ([#​2436](https://togithub.com/sinonjs/sinon/issues/2436)) (Joel Bradshaw) > - Add DRY_RUN flag to skip publish/push > > - Allow overriding branch names for testing - [`05341dcf`](https://togithub.com/sinonjs/sinon/commit/05341dcf92ddca4a1d4c90966b1fcdc7039cff18) Update npm version scripts to manage new releases branch (Joel Bradshaw) - [`fe658261`](https://togithub.com/sinonjs/sinon/commit/fe65826171db69ed2986a1060db77944dbc98a6d) Remove release archives from master (Joel Bradshaw) > These archives made it difficult to find things in the GitHub interface, > and take up a lot of space in a checked-out repo for something that is > not useful to most people checking out the repository. > > The main purpose of these archives is to make old versions and > documentation available on the Sinon website that is run out of this > repo. This can be supported by using a separate branch for website > releases, and to maintain the archives. > > Following this commit, the `npm version` scripts will be updated to > automatically handle archiving the releases in the new releases branch > and keeping it up to date with master. > > Also remove the directories we removed from .prettierignore, since they > don't exist any more. *Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2022-02-01.* ### [`v13.0.0`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1300) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v12.0.1...v13.0.0) - [`cf3d6c0c`](https://togithub.com/sinonjs/sinon/commit/cf3d6c0cd9689c0ee673b3daa8bf9abd70304392) Upgrade packages ([#​2431](https://togithub.com/sinonjs/sinon/issues/2431)) (Carl-Erik Kopseng) > - Update all @​sinonjs/ packages > > - Upgrade to fake-timers 9 > > - chore: ensure always using latest LTS release - [`41710467`](https://togithub.com/sinonjs/sinon/commit/417104670d575e96a1b645ea40ce763afa76fb1b) Adjust deploy scripts to archive old releases in a separate branch, move existing releases out of master ([#​2426](https://togithub.com/sinonjs/sinon/issues/2426)) (Joel Bradshaw) > Co-authored-by: Carl-Erik Kopseng - [`c80a7266`](https://togithub.com/sinonjs/sinon/commit/c80a72660e89d88b08275eff1028ecb9e26fd8e9) Bump node-fetch from 2.6.1 to 2.6.7 ([#​2430](https://togithub.com/sinonjs/sinon/issues/2430)) (dependabot\[bot]) > Co-authored-by: dependabot\[bot] <49699333+dependabot\[bot][@​users](https://togithub.com/users).noreply.github.com> - [`a00f14a9`](https://togithub.com/sinonjs/sinon/commit/a00f14a97dbe8c65afa89674e16ad73fc7d2fdc0) Add explicit export for `./*` ([#​2413](https://togithub.com/sinonjs/sinon/issues/2413)) (なつき) - [`b82ca7ad`](https://togithub.com/sinonjs/sinon/commit/b82ca7ad9b1add59007771f65a18ee34415de8ca) Bump cached-path-relative from 1.0.2 to 1.1.0 ([#​2428](https://togithub.com/sinonjs/sinon/issues/2428)) (dependabot\[bot]) - [`a9ea1427`](https://togithub.com/sinonjs/sinon/commit/a9ea142716c094ef3c432ecc4089f8207b8dd8b6) Add documentation for assert.calledOnceWithMatch ([#​2424](https://togithub.com/sinonjs/sinon/issues/2424)) (Mathias Schreck) - [`1d5ab86b`](https://togithub.com/sinonjs/sinon/commit/1d5ab86ba60e50dd69593ffed2bffd4b8faa0d38) Be more general in stripping off stack frames to fix Firefox tests ([#​2425](https://togithub.com/sinonjs/sinon/issues/2425)) (Joel Bradshaw) - [`56b06129`](https://togithub.com/sinonjs/sinon/commit/56b06129e223eae690265c37b1113067e2b31bdc) Check call count type ([#​2410](https://togithub.com/sinonjs/sinon/issues/2410)) (Joel Bradshaw) - [`7863e2df`](https://togithub.com/sinonjs/sinon/commit/7863e2dfdbda79e0a32e42af09e6539fc2f2b80f) Fix [#​2414](https://togithub.com/sinonjs/sinon/issues/2414): make Sinon available on homepage (Carl-Erik Kopseng) - [`fabaabdd`](https://togithub.com/sinonjs/sinon/commit/fabaabdda82f39a7f5b75b55bd56cf77b1cd4a8f) Bump nokogiri from 1.11.4 to 1.13.1 ([#​2423](https://togithub.com/sinonjs/sinon/issues/2423)) (dependabot\[bot]) - [`dbc0fbd2`](https://togithub.com/sinonjs/sinon/commit/dbc0fbd263c8419fa47f9c3b20cf47890a242d21) Bump shelljs from 0.8.4 to 0.8.5 ([#​2422](https://togithub.com/sinonjs/sinon/issues/2422)) (dependabot\[bot]) - [`fb8b3d72`](https://togithub.com/sinonjs/sinon/commit/fb8b3d72a85dc8fb0547f859baf3f03a22a039f7) Run Prettier (Carl-Erik Kopseng) - [`12a45939`](https://togithub.com/sinonjs/sinon/commit/12a45939e9b047b6d3663fe55f2eb383ec63c4e1) Fix 2377: Throw error when trying to stub non-configurable or non-writable properties ([#​2417](https://togithub.com/sinonjs/sinon/issues/2417)) (Stuart Dotson) > Fixes issue [#​2377](https://togithub.com/sinonjs/sinon/issues/2377) by throwing an error when trying to stub non-configurable or non-writable properties *Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2022-01-28.*
--- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-policy-troubleshooter). --- packages/google-cloud-policytroubleshooter/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-policytroubleshooter/package.json b/packages/google-cloud-policytroubleshooter/package.json index 0d4837ef9a8..f70d116e685 100644 --- a/packages/google-cloud-policytroubleshooter/package.json +++ b/packages/google-cloud-policytroubleshooter/package.json @@ -54,7 +54,7 @@ "mocha": "^8.2.1", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", - "sinon": "^12.0.0", + "sinon": "^13.0.0", "ts-loader": "^9.0.0", "typescript": "^4.1.2", "webpack": "^5.9.0", From 5ffda8eab69e47ffa063fe735900bcd9e66ad120 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 3 Feb 2022 22:05:08 +0000 Subject: [PATCH 137/254] docs(nodejs): version support policy edits (#1346) (#67) --- packages/google-cloud-shell/README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/google-cloud-shell/README.md b/packages/google-cloud-shell/README.md index 73087ec9bfe..9df0f4b74c8 100644 --- a/packages/google-cloud-shell/README.md +++ b/packages/google-cloud-shell/README.md @@ -99,21 +99,21 @@ also contains samples. Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). Libraries are compatible with all current _active_ and _maintenance_ versions of Node.js. +If you are using an end-of-life version of Node.js, we recommend that you update +as soon as possible to an actively supported LTS version. -Client libraries targeting some end-of-life versions of Node.js are available, and -can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). -The dist-tags follow the naming convention `legacy-(version)`. - -_Legacy Node.js versions are supported as a best effort:_ +Google's client libraries support legacy versions of Node.js runtimes on a +best-efforts basis with the following warnings: -* Legacy versions will not be tested in continuous integration. -* Some security patches may not be able to be backported. -* Dependencies will not be kept up-to-date, and features will not be backported. +* Legacy versions are not tested in continuous integration. +* Some security patches and features cannot be backported. +* Dependencies cannot be kept up-to-date. -#### Legacy tags available - -* `legacy-8`: install client libraries from this dist-tag for versions - compatible with Node.js 8. +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. +For example, `npm install @google-cloud/shell@legacy-8` installs client libraries +for versions compatible with Node.js 8. ## Versioning From 51a4f5d545ed4f9d71e382dfbda491100930ce0e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 3 Feb 2022 22:10:54 +0000 Subject: [PATCH 138/254] docs(nodejs): version support policy edits (#1346) (#54) --- .../google-cloud-gkeconnect-gateway/README.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/google-cloud-gkeconnect-gateway/README.md b/packages/google-cloud-gkeconnect-gateway/README.md index 50e1c00f85a..b0101c6f775 100644 --- a/packages/google-cloud-gkeconnect-gateway/README.md +++ b/packages/google-cloud-gkeconnect-gateway/README.md @@ -86,21 +86,21 @@ also contains samples. Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). Libraries are compatible with all current _active_ and _maintenance_ versions of Node.js. +If you are using an end-of-life version of Node.js, we recommend that you update +as soon as possible to an actively supported LTS version. -Client libraries targeting some end-of-life versions of Node.js are available, and -can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). -The dist-tags follow the naming convention `legacy-(version)`. - -_Legacy Node.js versions are supported as a best effort:_ +Google's client libraries support legacy versions of Node.js runtimes on a +best-efforts basis with the following warnings: -* Legacy versions will not be tested in continuous integration. -* Some security patches may not be able to be backported. -* Dependencies will not be kept up-to-date, and features will not be backported. +* Legacy versions are not tested in continuous integration. +* Some security patches and features cannot be backported. +* Dependencies cannot be kept up-to-date. -#### Legacy tags available - -* `legacy-8`: install client libraries from this dist-tag for versions - compatible with Node.js 8. +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. +For example, `npm install @google-cloud/gke-connect-gateway@legacy-8` installs client libraries +for versions compatible with Node.js 8. ## Versioning From ee81b06b415478355652d206a7390403c271b93a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 4 Feb 2022 16:09:02 +0000 Subject: [PATCH 139/254] docs(nodejs): version support policy edits (#1346) (#105) --- .../README.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/google-cloud-policytroubleshooter/README.md b/packages/google-cloud-policytroubleshooter/README.md index f2426dbbb70..396d2898f05 100644 --- a/packages/google-cloud-policytroubleshooter/README.md +++ b/packages/google-cloud-policytroubleshooter/README.md @@ -102,21 +102,21 @@ also contains samples. Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). Libraries are compatible with all current _active_ and _maintenance_ versions of Node.js. +If you are using an end-of-life version of Node.js, we recommend that you update +as soon as possible to an actively supported LTS version. -Client libraries targeting some end-of-life versions of Node.js are available, and -can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). -The dist-tags follow the naming convention `legacy-(version)`. - -_Legacy Node.js versions are supported as a best effort:_ +Google's client libraries support legacy versions of Node.js runtimes on a +best-efforts basis with the following warnings: -* Legacy versions will not be tested in continuous integration. -* Some security patches may not be able to be backported. -* Dependencies will not be kept up-to-date, and features will not be backported. +* Legacy versions are not tested in continuous integration. +* Some security patches and features cannot be backported. +* Dependencies cannot be kept up-to-date. -#### Legacy tags available - -* `legacy-8`: install client libraries from this dist-tag for versions - compatible with Node.js 8. +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. +For example, `npm install @google-cloud/policy-troubleshooter@legacy-8` installs client libraries +for versions compatible with Node.js 8. ## Versioning From 6daf39d4412860560bb2eef3c96b8a9d398822ea Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 4 Feb 2022 16:12:59 +0000 Subject: [PATCH 140/254] docs(nodejs): version support policy edits (#1346) (#30) --- packages/google-cloud-deploy/README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/google-cloud-deploy/README.md b/packages/google-cloud-deploy/README.md index 5602363a48d..6ac60296661 100644 --- a/packages/google-cloud-deploy/README.md +++ b/packages/google-cloud-deploy/README.md @@ -132,21 +132,21 @@ also contains samples. Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). Libraries are compatible with all current _active_ and _maintenance_ versions of Node.js. +If you are using an end-of-life version of Node.js, we recommend that you update +as soon as possible to an actively supported LTS version. -Client libraries targeting some end-of-life versions of Node.js are available, and -can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). -The dist-tags follow the naming convention `legacy-(version)`. - -_Legacy Node.js versions are supported as a best effort:_ +Google's client libraries support legacy versions of Node.js runtimes on a +best-efforts basis with the following warnings: -* Legacy versions will not be tested in continuous integration. -* Some security patches may not be able to be backported. -* Dependencies will not be kept up-to-date, and features will not be backported. +* Legacy versions are not tested in continuous integration. +* Some security patches and features cannot be backported. +* Dependencies cannot be kept up-to-date. -#### Legacy tags available - -* `legacy-8`: install client libraries from this dist-tag for versions - compatible with Node.js 8. +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. +For example, `npm install @google-cloud/deploy@legacy-8` installs client libraries +for versions compatible with Node.js 8. ## Versioning From 5d4db8f9deb5f894f8ce240d1641f9749300baec Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sat, 5 Feb 2022 18:39:10 +0100 Subject: [PATCH 141/254] chore(deps): update dependency sinon to v13 (#28) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^12.0.0` -> `^13.0.0`](https://renovatebot.com/diffs/npm/sinon/12.0.1/13.0.1) | [![age](https://badges.renovateapi.com/packages/npm/sinon/13.0.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/13.0.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/13.0.1/compatibility-slim/12.0.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/13.0.1/confidence-slim/12.0.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v13.0.1`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1301) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v13.0.0...v13.0.1) - [`ec4223f9`](https://togithub.com/sinonjs/sinon/commit/ec4223f94076d809483e3c6a7536cfc1278dd3c9) Bump nise to fix [sinonjs/nise#​193](https://togithub.com/sinonjs/nise/issues/193) (Carl-Erik Kopseng) - [`f329a010`](https://togithub.com/sinonjs/sinon/commit/f329a01040bfa5a79e039419220b21eda56935d6) Add unimported to workflow ([#​2441](https://togithub.com/sinonjs/sinon/issues/2441)) (Morgan Roderick) - [`7f16cec9`](https://togithub.com/sinonjs/sinon/commit/7f16cec968c3c8d4e580267fb00195916d6f827d) Enable updates to same major version (Carl-Erik Kopseng) - [`f784d7ad`](https://togithub.com/sinonjs/sinon/commit/f784d7ad2c86be0fc65477d69f8bdafca846ef2c) Re-introduce new version.sh script to version hook (Joel Bradshaw) > This was inadvertently removed during merge conflicts, and is required > for any of the new release process stuff to work - [`51c508ab`](https://togithub.com/sinonjs/sinon/commit/51c508ab77cf0f9fb8c5305ff626f6a2eada178f) Add dry run mode to `npm version` ([#​2436](https://togithub.com/sinonjs/sinon/issues/2436)) (Joel Bradshaw) > - Add DRY_RUN flag to skip publish/push > > - Allow overriding branch names for testing - [`05341dcf`](https://togithub.com/sinonjs/sinon/commit/05341dcf92ddca4a1d4c90966b1fcdc7039cff18) Update npm version scripts to manage new releases branch (Joel Bradshaw) - [`fe658261`](https://togithub.com/sinonjs/sinon/commit/fe65826171db69ed2986a1060db77944dbc98a6d) Remove release archives from master (Joel Bradshaw) > These archives made it difficult to find things in the GitHub interface, > and take up a lot of space in a checked-out repo for something that is > not useful to most people checking out the repository. > > The main purpose of these archives is to make old versions and > documentation available on the Sinon website that is run out of this > repo. This can be supported by using a separate branch for website > releases, and to maintain the archives. > > Following this commit, the `npm version` scripts will be updated to > automatically handle archiving the releases in the new releases branch > and keeping it up to date with master. > > Also remove the directories we removed from .prettierignore, since they > don't exist any more. *Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2022-02-01.* ### [`v13.0.0`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1300) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v12.0.1...v13.0.0) - [`cf3d6c0c`](https://togithub.com/sinonjs/sinon/commit/cf3d6c0cd9689c0ee673b3daa8bf9abd70304392) Upgrade packages ([#​2431](https://togithub.com/sinonjs/sinon/issues/2431)) (Carl-Erik Kopseng) > - Update all @​sinonjs/ packages > > - Upgrade to fake-timers 9 > > - chore: ensure always using latest LTS release - [`41710467`](https://togithub.com/sinonjs/sinon/commit/417104670d575e96a1b645ea40ce763afa76fb1b) Adjust deploy scripts to archive old releases in a separate branch, move existing releases out of master ([#​2426](https://togithub.com/sinonjs/sinon/issues/2426)) (Joel Bradshaw) > Co-authored-by: Carl-Erik Kopseng - [`c80a7266`](https://togithub.com/sinonjs/sinon/commit/c80a72660e89d88b08275eff1028ecb9e26fd8e9) Bump node-fetch from 2.6.1 to 2.6.7 ([#​2430](https://togithub.com/sinonjs/sinon/issues/2430)) (dependabot\[bot]) > Co-authored-by: dependabot\[bot] <49699333+dependabot\[bot][@​users](https://togithub.com/users).noreply.github.com> - [`a00f14a9`](https://togithub.com/sinonjs/sinon/commit/a00f14a97dbe8c65afa89674e16ad73fc7d2fdc0) Add explicit export for `./*` ([#​2413](https://togithub.com/sinonjs/sinon/issues/2413)) (なつき) - [`b82ca7ad`](https://togithub.com/sinonjs/sinon/commit/b82ca7ad9b1add59007771f65a18ee34415de8ca) Bump cached-path-relative from 1.0.2 to 1.1.0 ([#​2428](https://togithub.com/sinonjs/sinon/issues/2428)) (dependabot\[bot]) - [`a9ea1427`](https://togithub.com/sinonjs/sinon/commit/a9ea142716c094ef3c432ecc4089f8207b8dd8b6) Add documentation for assert.calledOnceWithMatch ([#​2424](https://togithub.com/sinonjs/sinon/issues/2424)) (Mathias Schreck) - [`1d5ab86b`](https://togithub.com/sinonjs/sinon/commit/1d5ab86ba60e50dd69593ffed2bffd4b8faa0d38) Be more general in stripping off stack frames to fix Firefox tests ([#​2425](https://togithub.com/sinonjs/sinon/issues/2425)) (Joel Bradshaw) - [`56b06129`](https://togithub.com/sinonjs/sinon/commit/56b06129e223eae690265c37b1113067e2b31bdc) Check call count type ([#​2410](https://togithub.com/sinonjs/sinon/issues/2410)) (Joel Bradshaw) - [`7863e2df`](https://togithub.com/sinonjs/sinon/commit/7863e2dfdbda79e0a32e42af09e6539fc2f2b80f) Fix [#​2414](https://togithub.com/sinonjs/sinon/issues/2414): make Sinon available on homepage (Carl-Erik Kopseng) - [`fabaabdd`](https://togithub.com/sinonjs/sinon/commit/fabaabdda82f39a7f5b75b55bd56cf77b1cd4a8f) Bump nokogiri from 1.11.4 to 1.13.1 ([#​2423](https://togithub.com/sinonjs/sinon/issues/2423)) (dependabot\[bot]) - [`dbc0fbd2`](https://togithub.com/sinonjs/sinon/commit/dbc0fbd263c8419fa47f9c3b20cf47890a242d21) Bump shelljs from 0.8.4 to 0.8.5 ([#​2422](https://togithub.com/sinonjs/sinon/issues/2422)) (dependabot\[bot]) - [`fb8b3d72`](https://togithub.com/sinonjs/sinon/commit/fb8b3d72a85dc8fb0547f859baf3f03a22a039f7) Run Prettier (Carl-Erik Kopseng) - [`12a45939`](https://togithub.com/sinonjs/sinon/commit/12a45939e9b047b6d3663fe55f2eb383ec63c4e1) Fix 2377: Throw error when trying to stub non-configurable or non-writable properties ([#​2417](https://togithub.com/sinonjs/sinon/issues/2417)) (Stuart Dotson) > Fixes issue [#​2377](https://togithub.com/sinonjs/sinon/issues/2377) by throwing an error when trying to stub non-configurable or non-writable properties *Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2022-01-28.*
--- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-deploy). --- packages/google-cloud-deploy/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-deploy/package.json b/packages/google-cloud-deploy/package.json index 217d26f37df..b5f9ffa003d 100644 --- a/packages/google-cloud-deploy/package.json +++ b/packages/google-cloud-deploy/package.json @@ -54,7 +54,7 @@ "mocha": "^9.0.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", - "sinon": "^12.0.0", + "sinon": "^13.0.0", "ts-loader": "^9.1.2", "typescript": "^4.2.4", "webpack": "^5.36.2", From 2e971ef7f56b9476450f293e579096b184e5ae30 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Mon, 7 Feb 2022 14:17:23 -0800 Subject: [PATCH 142/254] build: fix owlbot image (#7) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * build: fix owlbot image * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../.github/.OwlBot.yaml | 2 +- packages/google-cloud-dataplex/README.md | 30 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/packages/google-cloud-dataplex/.github/.OwlBot.yaml b/packages/google-cloud-dataplex/.github/.OwlBot.yaml index 62fb1fb24eb..8b2097bf7f4 100644 --- a/packages/google-cloud-dataplex/.github/.OwlBot.yaml +++ b/packages/google-cloud-dataplex/.github/.OwlBot.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. docker: - image: gcr.io/repo-automation-bots/owlbot-nodejs:latest + image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest deep-remove-regex: - /owl-bot-staging diff --git a/packages/google-cloud-dataplex/README.md b/packages/google-cloud-dataplex/README.md index b3a5710965b..a6bbab6dd7c 100644 --- a/packages/google-cloud-dataplex/README.md +++ b/packages/google-cloud-dataplex/README.md @@ -14,7 +14,7 @@ dataplex client for Node.js A comprehensive list of changes in each version may be found in -[the CHANGELOG](https://github.com/googleapis/nodejs-dataplex/blob/master/CHANGELOG.md). +[the CHANGELOG](https://github.com/googleapis/nodejs-dataplex/blob/main/CHANGELOG.md). * [Cloud Dataplex Node.js Client API Reference][client-docs] * [Cloud Dataplex Documentation][product-docs] @@ -65,21 +65,21 @@ also contains samples. Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). Libraries are compatible with all current _active_ and _maintenance_ versions of Node.js. +If you are using an end-of-life version of Node.js, we recommend that you update +as soon as possible to an actively supported LTS version. -Client libraries targeting some end-of-life versions of Node.js are available, and -can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). -The dist-tags follow the naming convention `legacy-(version)`. - -_Legacy Node.js versions are supported as a best effort:_ +Google's client libraries support legacy versions of Node.js runtimes on a +best-efforts basis with the following warnings: -* Legacy versions will not be tested in continuous integration. -* Some security patches may not be able to be backported. -* Dependencies will not be kept up-to-date, and features will not be backported. +* Legacy versions are not tested in continuous integration. +* Some security patches and features cannot be backported. +* Dependencies cannot be kept up-to-date. -#### Legacy tags available - -* `legacy-8`: install client libraries from this dist-tag for versions - compatible with Node.js 8. +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. +For example, `npm install @google-cloud/dataplex@legacy-8` installs client libraries +for versions compatible with Node.js 8. ## Versioning @@ -103,7 +103,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-dataplex/blob/master/CONTRIBUTING.md). +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-dataplex/blob/main/CONTRIBUTING.md). Please note that this `README.md`, the `samples/README.md`, and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) @@ -115,7 +115,7 @@ to its templates in Apache Version 2.0 -See [LICENSE](https://github.com/googleapis/nodejs-dataplex/blob/master/LICENSE) +See [LICENSE](https://github.com/googleapis/nodejs-dataplex/blob/main/LICENSE) [client-docs]: https://cloud.google.com/dataplex [product-docs]: https://cloud.google.com/dataplex/ From 630e41650d446bb1a68310d0cd3e4181ebd4b123 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Mon, 7 Feb 2022 14:35:20 -0800 Subject: [PATCH 143/254] chore: fix repository in metadata (#9) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: fix repository in metadata * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- packages/google-cloud-dataplex/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-dataplex/package.json b/packages/google-cloud-dataplex/package.json index 8419c4bb6a9..61729e33f74 100644 --- a/packages/google-cloud-dataplex/package.json +++ b/packages/google-cloud-dataplex/package.json @@ -2,7 +2,7 @@ "name": "@google-cloud/dataplex", "version": "0.1.0", "description": "dataplex client for Node.js", - "repository": "googleapis/googleapis/nodejs-dataplex", + "repository": "googleapis/nodejs-dataplex", "license": "Apache-2.0", "author": "Google LLC", "main": "build/src/index.js", From 9666f25a036c3409e1dafc20ef8b4210f301c941 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 7 Feb 2022 22:28:49 -0800 Subject: [PATCH 144/254] chore(main): release 1.0.0 (#8) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Jeff Ching --- packages/google-cloud-dataplex/CHANGELOG.md | 8 ++++++++ packages/google-cloud-dataplex/package.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 packages/google-cloud-dataplex/CHANGELOG.md diff --git a/packages/google-cloud-dataplex/CHANGELOG.md b/packages/google-cloud-dataplex/CHANGELOG.md new file mode 100644 index 00000000000..301c4fec87f --- /dev/null +++ b/packages/google-cloud-dataplex/CHANGELOG.md @@ -0,0 +1,8 @@ +# Changelog + +## 1.0.0 (2022-02-07) + + +### Features + +* initial generation ([0315f09](https://github.com/googleapis/nodejs-dataplex/commit/0315f09e8c2768b8acb46793694cf7ba64432f2f)) diff --git a/packages/google-cloud-dataplex/package.json b/packages/google-cloud-dataplex/package.json index 61729e33f74..41f17be2186 100644 --- a/packages/google-cloud-dataplex/package.json +++ b/packages/google-cloud-dataplex/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/dataplex", - "version": "0.1.0", + "version": "1.0.0", "description": "dataplex client for Node.js", "repository": "googleapis/nodejs-dataplex", "license": "Apache-2.0", From fa996d5dd2c9b1a75d35981ef3194bd501300dcc Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 9 Feb 2022 20:35:51 +0100 Subject: [PATCH 145/254] chore(deps): update dependency @types/node to v16 (#2) --- packages/google-cloud-dataplex/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-dataplex/package.json b/packages/google-cloud-dataplex/package.json index 41f17be2186..87dfeada7c2 100644 --- a/packages/google-cloud-dataplex/package.json +++ b/packages/google-cloud-dataplex/package.json @@ -41,7 +41,7 @@ }, "devDependencies": { "@types/mocha": "^8.2.2", - "@types/node": "^14.14.44", + "@types/node": "^16.0.0", "@types/sinon": "^10.0.0", "c8": "^7.7.2", "gts": "^3.1.0", From 16b591c852149a9876ba4711f5f6ef172874781b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 9 Feb 2022 20:42:16 +0100 Subject: [PATCH 146/254] chore(deps): update dependency linkinator to v3 (#3) Co-authored-by: Takashi Matsuo --- packages/google-cloud-dataplex/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-dataplex/package.json b/packages/google-cloud-dataplex/package.json index 87dfeada7c2..a9eda6eada6 100644 --- a/packages/google-cloud-dataplex/package.json +++ b/packages/google-cloud-dataplex/package.json @@ -48,7 +48,7 @@ "jsdoc": "^3.6.6", "jsdoc-fresh": "^1.0.2", "jsdoc-region-tag": "^1.0.6", - "linkinator": "^2.13.6", + "linkinator": "^3.0.0", "mocha": "^8.4.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", From 8a17dbe38fc0df824e47b07bec3b6735b3719338 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 9 Feb 2022 20:51:15 +0100 Subject: [PATCH 147/254] chore(deps): update dependency mocha to v9 (#4) --- packages/google-cloud-dataplex/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-dataplex/package.json b/packages/google-cloud-dataplex/package.json index a9eda6eada6..2b8b9600471 100644 --- a/packages/google-cloud-dataplex/package.json +++ b/packages/google-cloud-dataplex/package.json @@ -40,7 +40,7 @@ "google-gax": "^2.12.0" }, "devDependencies": { - "@types/mocha": "^8.2.2", + "@types/mocha": "^9.0.0", "@types/node": "^16.0.0", "@types/sinon": "^10.0.0", "c8": "^7.7.2", @@ -49,7 +49,7 @@ "jsdoc-fresh": "^1.0.2", "jsdoc-region-tag": "^1.0.6", "linkinator": "^3.0.0", - "mocha": "^8.4.0", + "mocha": "^9.0.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", "sinon": "^10.0.0", From e672efa9b01b9beccc554aeef5867785c80d8342 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 9 Feb 2022 21:03:35 +0100 Subject: [PATCH 148/254] chore(deps): update dependency sinon to v13 (#5) Co-authored-by: Jeff Ching Co-authored-by: Takashi Matsuo --- packages/google-cloud-dataplex/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-dataplex/package.json b/packages/google-cloud-dataplex/package.json index 2b8b9600471..a04508729b5 100644 --- a/packages/google-cloud-dataplex/package.json +++ b/packages/google-cloud-dataplex/package.json @@ -52,7 +52,7 @@ "mocha": "^9.0.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", - "sinon": "^10.0.0", + "sinon": "^13.0.0", "ts-loader": "^9.1.2", "typescript": "^4.2.4", "webpack": "^5.36.2", From e5ff54640a4ee802634c9b66a9af939f44eacbd8 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Wed, 9 Feb 2022 12:33:03 -0800 Subject: [PATCH 149/254] samples: add quickstart sample (#10) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * samples: add quickstart sample * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * deps: add chai * add samples npm scripts * fix test * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update local dep version Co-authored-by: Owl Bot Co-authored-by: Takashi Matsuo --- packages/google-cloud-dataplex/README.md | 39 ++++++++++++++- packages/google-cloud-dataplex/package.json | 3 ++ .../google-cloud-dataplex/samples/README.md | 50 +++++++++++++++++++ .../samples/package.json | 23 +++++++++ .../samples/quickstart.js | 49 ++++++++++++++++++ .../samples/test/quickstart.js | 43 ++++++++++++++++ 6 files changed, 205 insertions(+), 2 deletions(-) create mode 100644 packages/google-cloud-dataplex/samples/README.md create mode 100644 packages/google-cloud-dataplex/samples/package.json create mode 100644 packages/google-cloud-dataplex/samples/quickstart.js create mode 100644 packages/google-cloud-dataplex/samples/test/quickstart.js diff --git a/packages/google-cloud-dataplex/README.md b/packages/google-cloud-dataplex/README.md index a6bbab6dd7c..e9b39bcaac5 100644 --- a/packages/google-cloud-dataplex/README.md +++ b/packages/google-cloud-dataplex/README.md @@ -31,8 +31,8 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. * [Quickstart](#quickstart) * [Before you begin](#before-you-begin) * [Installing the client library](#installing-the-client-library) - - + * [Using the client library](#using-the-client-library) +* [Samples](#samples) * [Versioning](#versioning) * [Contributing](#contributing) * [License](#license) @@ -54,6 +54,41 @@ npm install @google-cloud/dataplex ``` +### Using the client library + +```javascript +// Imports the Google Cloud client library + +// eslint-disable-next-line node/no-missing-require +const {DataplexServiceClient} = require('@google-cloud/dataplex'); + +// TODO(developer): replace with your prefered project ID. +// const projectId = 'my-project' +// const location = 'my-location' + +// Creates a client1046198160504 +// eslint-disable-next-line no-unused-vars +const client = new DataplexServiceClient(); + +async function listLakes() { + const [lakes] = await client.listLakes({ + parent: `projects/${projectId}/locations/${location}`, + }); + console.info(lakes); +} +listLakes(); + +``` + + + +## Samples + +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-dataplex/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. + +| Sample | Source Code | Try it | +| --------------------------- | --------------------------------- | ------ | +| Quickstart | [source code](https://github.com/googleapis/nodejs-dataplex/blob/main/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-dataplex&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | diff --git a/packages/google-cloud-dataplex/package.json b/packages/google-cloud-dataplex/package.json index a04508729b5..a9c5fed0558 100644 --- a/packages/google-cloud-dataplex/package.json +++ b/packages/google-cloud-dataplex/package.json @@ -24,6 +24,8 @@ "dataplex service" ], "scripts": { + "samples-test": "c8 npm run samples-test-suite", + "samples-test-suite": "cd samples/ && npm link ../ && npm test && cd ../", "clean": "gts clean", "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", @@ -44,6 +46,7 @@ "@types/node": "^16.0.0", "@types/sinon": "^10.0.0", "c8": "^7.7.2", + "chai": "^4.3.6", "gts": "^3.1.0", "jsdoc": "^3.6.6", "jsdoc-fresh": "^1.0.2", diff --git a/packages/google-cloud-dataplex/samples/README.md b/packages/google-cloud-dataplex/samples/README.md new file mode 100644 index 00000000000..71f4c0bdedf --- /dev/null +++ b/packages/google-cloud-dataplex/samples/README.md @@ -0,0 +1,50 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [Cloud Dataplex: Node.js Samples](https://github.com/googleapis/nodejs-dataplex) + +[![Open in Cloud Shell][shell_img]][shell_link] + + + +## Table of Contents + +* [Before you begin](#before-you-begin) +* [Samples](#samples) + * [Quickstart](#quickstart) + +## Before you begin + +Before running the samples, make sure you've followed the steps outlined in +[Using the client library](https://github.com/googleapis/nodejs-dataplex#using-the-client-library). + +`cd samples` + +`npm install` + +`cd ..` + +## Samples + + + +### Quickstart + +View the [source code](https://github.com/googleapis/nodejs-dataplex/blob/main/samples/quickstart.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-dataplex&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node samples/quickstart.js` + + + + + + +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-dataplex&page=editor&open_in_editor=samples/README.md +[product-docs]: https://cloud.google.com/dataplex/ diff --git a/packages/google-cloud-dataplex/samples/package.json b/packages/google-cloud-dataplex/samples/package.json new file mode 100644 index 00000000000..ea0c0b9ef7a --- /dev/null +++ b/packages/google-cloud-dataplex/samples/package.json @@ -0,0 +1,23 @@ +{ + "name": "nodejs-dataplex", + "private": true, + "license": "Apache-2.0", + "author": "Google LLC", + "engines": { + "node": ">=10" + }, + "files": [ + "*.js" + ], + "scripts": { + "test": "c8 mocha --timeout 600000 test/*.js" + }, + "dependencies": { + "@google-cloud/dataplex": "^1.0.0" + }, + "devDependencies": { + "c8": "^7.1.0", + "chai": "^4.2.0", + "mocha": "^8.0.0" + } +} diff --git a/packages/google-cloud-dataplex/samples/quickstart.js b/packages/google-cloud-dataplex/samples/quickstart.js new file mode 100644 index 00000000000..a5440a474e1 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/quickstart.js @@ -0,0 +1,49 @@ +// Copyright 2022 Google LLC +// +// 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 +// +// https://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. + +'use strict'; + +async function main(projectId, location) { + // [START nodejs_dataplex_quickstart] + // Imports the Google Cloud client library + + // eslint-disable-next-line node/no-missing-require + const {DataplexServiceClient} = require('@google-cloud/dataplex'); + + // TODO(developer): replace with your prefered project ID. + // const projectId = 'my-project' + // const location = 'my-location' + + // Creates a client1046198160504 + // eslint-disable-next-line no-unused-vars + const client = new DataplexServiceClient(); + + async function listLakes() { + const [lakes] = await client.listLakes({ + parent: `projects/${projectId}/locations/${location}`, + }); + console.info(lakes); + } + listLakes(); + // [END nodejs_dataplex_quickstart] +} + +main(...process.argv.slice(2)).catch(err => { + console.error(err.message); + process.exitCode = 1; +}); +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); diff --git a/packages/google-cloud-dataplex/samples/test/quickstart.js b/packages/google-cloud-dataplex/samples/test/quickstart.js new file mode 100644 index 00000000000..a47fe5d383d --- /dev/null +++ b/packages/google-cloud-dataplex/samples/test/quickstart.js @@ -0,0 +1,43 @@ +// Copyright 2022 Google LLC +// +// 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 +// +// https://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. + +'use strict'; + +const path = require('path'); +const cp = require('child_process'); +const {before, describe, it} = require('mocha'); +// eslint-disable-next-line node/no-missing-require +const {DataplexServiceClient} = require('@google-cloud/dataplex'); +const {assert} = require('chai'); + +const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); + +const cwd = path.join(__dirname, '..'); + +const client = new DataplexServiceClient(); + +describe('Quickstart', () => { + let projectId; + + before(async () => { + projectId = await client.getProjectId(); + }); + + it('should run quickstart', async () => { + const stdout = execSync(`node ./quickstart.js ${projectId} us-central1`, { + cwd, + }); + assert.match(stdout, /\[\]/); + }); +}); From 198e96182370b803aaf01ceab910775f77061ac3 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 16 Feb 2022 23:08:54 +0000 Subject: [PATCH 150/254] feat: add Content APIs (#11) - [ ] Regenerate this pull request now. 1. Content APIs. 2. Create|Update|Delete Metadata APIs (e.g. Entity and/or Partition). PiperOrigin-RevId: 429081053 Source-Link: https://github.com/googleapis/googleapis/commit/7b42fd062975fb2939a19aa33210e09ae303f8ea Source-Link: https://github.com/googleapis/googleapis-gen/commit/3f71d2df5c102ee1fe82f492de545cd3a3dc7f79 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiM2Y3MWQyZGY1YzEwMmVlMWZlODJmNDkyZGU1NDVjZDNhM2RjN2Y3OSJ9 feat: add Create|Update|Delete Metadata APIs (e.g. Entity and/or Partition). --- .../google/cloud/dataplex/v1/analyze.proto | 265 + .../google/cloud/dataplex/v1/content.proto | 196 + .../google/cloud/dataplex/v1/metadata.proto | 294 +- .../google/cloud/dataplex/v1/resources.proto | 7 - .../google/cloud/dataplex/v1/service.proto | 203 +- .../google-cloud-dataplex/protos/protos.d.ts | 14591 +++--- .../google-cloud-dataplex/protos/protos.js | 39276 ++++++++++------ .../google-cloud-dataplex/protos/protos.json | 3880 +- .../v1/content_service.create_content.js | 64 + .../v1/content_service.delete_content.js | 54 + .../v1/content_service.get_content.js | 58 + .../v1/content_service.list_content.js | 79 + .../v1/content_service.update_content.js | 64 + .../v1/dataplex_service.create_environment.js | 75 + .../v1/dataplex_service.create_lake.js | 2 +- .../v1/dataplex_service.delete_environment.js | 55 + .../v1/dataplex_service.get_environment.js | 54 + .../v1/dataplex_service.list_environments.js | 77 + .../v1/dataplex_service.list_sessions.js | 69 + .../v1/dataplex_service.update_environment.js | 65 + .../v1/metadata_service.create_entity.js | 64 + .../v1/metadata_service.create_partition.js | 64 + .../v1/metadata_service.delete_entity.js | 59 + .../v1/metadata_service.delete_partition.js | 61 + .../v1/metadata_service.get_partition.js | 4 +- .../v1/metadata_service.list_entities.js | 12 +- .../v1/metadata_service.list_partitions.js | 20 +- .../v1/metadata_service.update_entity.js | 58 + packages/google-cloud-dataplex/src/index.ts | 11 +- .../src/v1/content_service_client.ts | 2003 + .../src/v1/content_service_client_config.json | 46 + .../src/v1/content_service_proto_list.json | 9 + .../src/v1/dataplex_service_client.ts | 2312 +- .../v1/dataplex_service_client_config.json | 24 + .../src/v1/dataplex_service_proto_list.json | 2 + .../src/v1/gapic_metadata.json | 186 + .../google-cloud-dataplex/src/v1/index.ts | 1 + .../src/v1/metadata_service_client.ts | 810 +- .../v1/metadata_service_client_config.json | 25 + .../src/v1/metadata_service_proto_list.json | 2 + .../system-test/fixtures/sample/src/index.js | 1 + .../system-test/fixtures/sample/src/index.ts | 7 + .../test/gapic_content_service_v1.ts | 2086 + .../test/gapic_dataplex_service_v1.ts | 2693 +- .../test/gapic_metadata_service_v1.ts | 832 +- .../google-cloud-dataplex/webpack.config.js | 4 +- 46 files changed, 47058 insertions(+), 23766 deletions(-) create mode 100644 packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/analyze.proto create mode 100644 packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/content.proto create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/content_service.create_content.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/content_service.delete_content.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/content_service.get_content.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/content_service.list_content.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/content_service.update_content.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_environment.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_environment.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_environment.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_environments.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_sessions.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_environment.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/metadata_service.create_entity.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/metadata_service.create_partition.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/metadata_service.delete_entity.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/metadata_service.delete_partition.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/metadata_service.update_entity.js create mode 100644 packages/google-cloud-dataplex/src/v1/content_service_client.ts create mode 100644 packages/google-cloud-dataplex/src/v1/content_service_client_config.json create mode 100644 packages/google-cloud-dataplex/src/v1/content_service_proto_list.json create mode 100644 packages/google-cloud-dataplex/test/gapic_content_service_v1.ts diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/analyze.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/analyze.proto new file mode 100644 index 00000000000..c95aa3f1ddd --- /dev/null +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/analyze.proto @@ -0,0 +1,265 @@ +// Copyright 2022 Google LLC +// +// 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. + +syntax = "proto3"; + +package google.cloud.dataplex.v1; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/dataplex/v1/resources.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/dataplex/v1;dataplex"; +option java_multiple_files = true; +option java_outer_classname = "AnalyzeProto"; +option java_package = "com.google.cloud.dataplex.v1"; + +// Environment represents a user-visible compute infrastructure for analytics +// within a lake. +message Environment { + option (google.api.resource) = { + type: "dataplex.googleapis.com/Environment" + pattern: "projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}" + }; + + // Configuration for the underlying infrastructure used to run workloads. + message InfrastructureSpec { + // Compute resources associated with the analyze interactive workloads. + message ComputeResources { + // Optional. Size in GB of the disk. Default is 100 GB. + int32 disk_size_gb = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Total number of nodes in the sessions created for this environment. + int32 node_count = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Max configurable nodes. + // If max_node_count > node_count, then auto-scaling is enabled. + int32 max_node_count = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Software Runtime Configuration to run Analyze. + message OsImageRuntime { + // Required. Dataplex Image version. + string image_version = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. List of Java jars to be included in the runtime environment. + // Valid input includes Cloud Storage URIs to Jar binaries. + // For example, gs://bucket-name/my/path/to/file.jar + repeated string java_libraries = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of python packages to be installed. + // Valid formats include Cloud Storage URI to a PIP installable library. + // For example, gs://bucket-name/my/path/to/lib.tar.gz + repeated string python_packages = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Spark properties to provide configuration for use in sessions created + // for this environment. The properties to set on daemon config files. + // Property keys are specified in `prefix:property` format. + // The prefix must be "spark". + map properties = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Hardware config + oneof resources { + // Optional. Compute resources needed for analyze interactive workloads. + ComputeResources compute = 50 [(google.api.field_behavior) = OPTIONAL]; + } + + // Software config + oneof runtime { + // Required. Software Runtime Configuration for analyze interactive workloads. + OsImageRuntime os_image = 100 [(google.api.field_behavior) = REQUIRED]; + } + } + + message SessionSpec { + // Optional. The idle time configuration of the session. The session will be + // auto-terminated at the end of this period. + google.protobuf.Duration max_idle_duration = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If True, this causes sessions to be pre-created and available for faster + // startup to enable interactive exploration use-cases. This defaults to + // False to avoid additional billed charges. + // These can only be set to True for the environment with name set to + // "default", and with default configuration. + bool enable_fast_startup = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + message SessionStatus { + // Output only. Queries over sessions to mark whether the environment is currently + // active or not + bool active = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + message Endpoints { + // Output only. URI to serve notebook APIs + string notebooks = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. URI to serve SQL APIs + string sql = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. The relative resource name of the environment, of the form: + // projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id} + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Environment" + } + ]; + + // Optional. User friendly display name. + string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. System generated globally unique ID for the environment. This ID will be + // different if the environment is deleted and re-created with the same name. + string uid = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Environment creation time. + google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the environment was last updated. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. User defined labels for the environment. + map labels = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Description of the environment. + string description = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Current state of the environment. + State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Infrastructure specification for the Environment. + InfrastructureSpec infrastructure_spec = 100 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Configuration for sessions created for this environment. + SessionSpec session_spec = 101 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Status of sessions created for this environment. + SessionStatus session_status = 102 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. URI Endpoints to access sessions associated with the Environment. + Endpoints endpoints = 200 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Content represents a user-visible notebook or a sql script +message Content { + option (google.api.resource) = { + type: "dataplex.googleapis.com/Content" + pattern: "projects/{project}/locations/{location}/lakes/{lake}/content/{content}" + }; + + // Configuration for the Sql Script content. + message SqlScript { + // Query Engine Type of the SQL Script. + enum QueryEngine { + // Value was unspecified. + QUERY_ENGINE_UNSPECIFIED = 0; + + // Spark SQL Query. + SPARK = 2; + } + + // Required. Query Engine to be used for the Sql Query. + QueryEngine engine = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Configuration for Notebook content. + message Notebook { + // Kernel Type of the Jupyter notebook. + enum KernelType { + // Kernel Type unspecified. + KERNEL_TYPE_UNSPECIFIED = 0; + + // Python 3 Kernel. + PYTHON3 = 1; + } + + // Required. Kernel Type of the notebook. + KernelType kernel_type = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Output only. The relative resource name of the content, of the form: + // projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Content" + } + ]; + + // Output only. System generated globally unique ID for the content. This ID will be + // different if the content is deleted and re-created with the same name. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The path for the Content file, represented as directory structure. + // Unique within a lake. + // Limited to alphanumerics, hyphens, underscores, dots and slashes. + string path = 3 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Content creation time. + google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the content was last updated. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. User defined labels for the content. + map labels = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Description of the content. + string description = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Only returned in `GetContent` requests and not in `ListContent` request. + oneof data { + // Required. Content data in string format. + string data_text = 9 [(google.api.field_behavior) = REQUIRED]; + } + + oneof content { + // Sql Script related configurations. + SqlScript sql_script = 100; + + // Notebook related configurations. + Notebook notebook = 101; + } +} + +// Represents an active analyze session running for a user. +message Session { + option (google.api.resource) = { + type: "dataplex.googleapis.com/Session" + pattern: "projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}/sessions/{session}" + }; + + // Output only. The relative resource name of the content, of the form: + // projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}/sessions/{session_id} + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Session" + } + ]; + + // Output only. Email of user running the session. + string user_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Session start time. + google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/content.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/content.proto new file mode 100644 index 00000000000..bc0f5c6a8b0 --- /dev/null +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/content.proto @@ -0,0 +1,196 @@ +// Copyright 2022 Google LLC +// +// 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. + +syntax = "proto3"; + +package google.cloud.dataplex.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/dataplex/v1/analyze.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/dataplex/v1;dataplex"; +option java_multiple_files = true; +option java_outer_classname = "ContentProto"; +option java_package = "com.google.cloud.dataplex.v1"; + +// ContentService manages Notebook and SQL Scripts for Dataplex. +service ContentService { + option (google.api.default_host) = "dataplex.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Create a content. + rpc CreateContent(CreateContentRequest) returns (Content) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/lakes/*}/contentitems" + body: "content" + }; + option (google.api.method_signature) = "parent,content"; + } + + // Update a content. Only supports full resource update. + rpc UpdateContent(UpdateContentRequest) returns (Content) { + option (google.api.http) = { + patch: "/v1/{content.name=projects/*/locations/*/lakes/*/contentitems/**}" + body: "content" + }; + option (google.api.method_signature) = "content,update_mask"; + } + + // Delete a content. + rpc DeleteContent(DeleteContentRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/lakes/*/contentitems/**}" + }; + option (google.api.method_signature) = "name"; + } + + // Get a content resource. + rpc GetContent(GetContentRequest) returns (Content) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/lakes/*/contentitems/**}" + }; + option (google.api.method_signature) = "name"; + } + + // List content. + rpc ListContent(ListContentRequest) returns (ListContentResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/lakes/*}/contentitems" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Create content request. +message CreateContentRequest { + // Required. The resource name of the parent lake: + // projects/{project_id}/locations/{location_id}/lakes/{lake_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Lake" + } + ]; + + // Required. Content resource. + Content content = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Update content request. +message UpdateContentRequest { + // Required. Mask of fields to update. + google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Update description. + // Only fields specified in `update_mask` are updated. + Content content = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Delete content request. +message DeleteContentRequest { + // Required. The resource name of the content: + // projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Content" + } + ]; +} + +// List content request. Returns the BASIC Content view. +message ListContentRequest { + // Required. The resource name of the parent lake: + // projects/{project_id}/locations/{location_id}/lakes/{lake_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Lake" + } + ]; + + // Optional. Maximum number of content to return. The service may return fewer than + // this value. If unspecified, at most 10 content will be returned. The + // maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListContent` call. Provide this + // to retrieve the subsequent page. When paginating, all other parameters + // provided to `ListContent` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter request. Filters are case-sensitive. + // The following formats are supported: + // + // labels.key1 = "value1" + // labels:key1 + // type = "NOTEBOOK" + // type = "SQL_SCRIPT" + // + // These restrictions can be coinjoined with AND, OR and NOT conjunctions. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// List content response. +message ListContentResponse { + // Content under the given parent lake. + repeated Content content = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// Get content request. +message GetContentRequest { + // Specifies whether the request should return the full or the partial + // representation. + enum ContentView { + // Content view not specified. Defaults to BASIC. + // The API will default to the BASIC view. + CONTENT_VIEW_UNSPECIFIED = 0; + + // Will not return the `data_text` field. + BASIC = 1; + + // Returns the complete proto. + FULL = 2; + } + + // Required. The resource name of the content: + // projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Content" + } + ]; + + // Optional. Specify content view to make a partial request. + ContentView view = 2 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/metadata.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/metadata.proto index 5320013ecf3..48d439057aa 100644 --- a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/metadata.proto +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/metadata.proto @@ -21,7 +21,6 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/dataplex/v1;dataplex"; @@ -35,6 +34,31 @@ service MetadataService { option (google.api.default_host) = "dataplex.googleapis.com"; option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Create a metadata entity. + rpc CreateEntity(CreateEntityRequest) returns (Entity) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/entities" + body: "entity" + }; + option (google.api.method_signature) = "parent,entity"; + } + + // Update a metadata entity. Only supports full resource update. + rpc UpdateEntity(UpdateEntityRequest) returns (Entity) { + option (google.api.http) = { + put: "/v1/{entity.name=projects/*/locations/*/lakes/*/zones/*/entities/*}" + body: "entity" + }; + } + + // Delete a metadata entity. + rpc DeleteEntity(DeleteEntityRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*}" + }; + option (google.api.method_signature) = "name"; + } + // Get a metadata entity. rpc GetEntity(GetEntityRequest) returns (Entity) { option (google.api.http) = { @@ -51,6 +75,23 @@ service MetadataService { option (google.api.method_signature) = "parent"; } + // Create a metadata partition. + rpc CreatePartition(CreatePartitionRequest) returns (Partition) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/entities/*}/partitions" + body: "partition" + }; + option (google.api.method_signature) = "parent,partition"; + } + + // Delete a metadata partition. + rpc DeletePartition(DeletePartitionRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*/partitions/**}" + }; + option (google.api.method_signature) = "name"; + } + // Get a metadata partition of an entity. rpc GetPartition(GetPartitionRequest) returns (Partition) { option (google.api.http) = { @@ -68,6 +109,53 @@ service MetadataService { } } +// Create a metadata entity request. +message CreateEntityRequest { + // Required. The resource name of the parent zone: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Zone" + } + ]; + + // Required. Entity resource. + Entity entity = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Update a metadata entity request. +// The exiting entity will be fully replaced by the entity in the request. +// The entity ID is mutable. To modify the ID, use the current entity ID in the +// request URL and specify the new ID in the request body. +message UpdateEntityRequest { + // Required. Update description. + Entity entity = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Delete a metadata entity request. +message DeleteEntityRequest { + // Required. The resource name of the entity: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Entity" + } + ]; + + // Required. The etag associated with the partition if it was previously retrieved. + string etag = 2 [(google.api.field_behavior) = REQUIRED]; +} + // List metadata entities request. message ListEntitiesRequest { // Entity views. @@ -95,8 +183,8 @@ message ListEntitiesRequest { EntityView view = 2 [(google.api.field_behavior) = REQUIRED]; // Optional. Maximum number of entities to return. The service may return fewer than - // this value. If unspecified, at most 10 entities will be returned. The - // maximum value is 1000; values above 1000 are set to 1000. + // this value. If unspecified, 100 entities will be returned by default. The + // maximum value is 500; larger values will will be truncated to 500. int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Page token received from a previous `ListEntities` call. Provide @@ -105,7 +193,14 @@ message ListEntitiesRequest { // page token. string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Filter request by name prefix. + // Optional. The following filter parameters can be added to the URL to limit the + // entities returned by the API: + // + // - Entity ID: ?filter="id=entityID" + // - Asset ID: ?filter="asset=assetID" + // - Data path ?filter="data_path=gs://my-bucket" + // - Is HIVE compatible: ?filter=”hive_compatible=true” + // - Is BigQuery compatible: ?filter=”bigquery_compatible=true” string filter = 5 [(google.api.field_behavior) = OPTIONAL]; } @@ -132,7 +227,7 @@ message GetEntityRequest { // Include basic information and schema. SCHEMA = 2; - // Include everything. + // Include everything. Currently, this is the same as the SCHEMA view. FULL = 4; } @@ -162,8 +257,8 @@ message ListPartitionsRequest { ]; // Optional. Maximum number of partitions to return. The service may return fewer than - // this value. If unspecified, at most 10 partitions will be returned. The - // maximum value is 1000; values above 1000 will be coerced to 1000. + // this value. If unspecified, 100 partitions will be returned by default. The + // maximum page size is 500; larger values will will be truncated to 500. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Page token received from a previous `ListPartitions` call. Provide @@ -172,10 +267,68 @@ message ListPartitionsRequest { // page token. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Filter request. + // Optional. Filter the partitions returned to the caller using a key vslue pair + // expression. The filter expression supports: + // + // - logical operators: AND, OR + // - comparison operators: <, >, >=, <= ,=, != + // - LIKE operators: + // - The right hand of a LIKE operator supports “.” and + // “*” for wildcard searches, for example "value1 LIKE ".*oo.*" + // - parenthetical grouping: ( ) + // + // Sample filter expression: `?filter="key1 < value1 OR key2 > value2" + // + // **Notes:** + // + // - Keys to the left of operators are case insensitive. + // - Partition results are sorted first by creation time, then by + // lexicographic order. + // - Up to 20 key value filter pairs are allowed, but due to performance + // considerations, only the first 10 will be used as a filter. string filter = 4 [(google.api.field_behavior) = OPTIONAL]; } +// Create metadata partition request. +message CreatePartitionRequest { + // Required. The resource name of the parent zone: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Entity" + } + ]; + + // Required. Partition resource. + Partition partition = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Delete metadata partition request. +message DeletePartitionRequest { + // Required. The resource name of the partition. + // format: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. + // The {partition_value_path} segment consists of an ordered sequence of + // partition values separated by "/". All values must be provided. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Partition" + } + ]; + + // Optional. The etag associated with the partition if it was previously retrieved. + string etag = 2 [ + deprecated = true, + (google.api.field_behavior) = OPTIONAL + ]; +} + // List metadata partitions response. message ListPartitionsResponse { // Partitions under the specified parent entity. @@ -189,7 +342,9 @@ message ListPartitionsResponse { // Get metadata partition request. message GetPartitionRequest { // Required. The resource name of the partition: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_id}`. + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. + // The {partition_value_path} segment consists of an ordered sequence of + // partition values separated by "/". All values must be provided. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -246,10 +401,11 @@ message Entity { } ]; - // Optional. User friendly display name. + // Optional. Display name must be shorter than or equal to 63 characters. string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. User friendly longer description text. + // Optional. User friendly longer description text. Must be shorter than or equal to + // 1024 characters. string description = 3 [(google.api.field_behavior) = OPTIONAL]; // Output only. The time when the entity was created. @@ -261,18 +417,26 @@ message Entity { // Required. A user-provided entity ID. It is mutable, and will be used as the // published table name. Specifying a new ID in an update entity // request will override the existing value. + // The ID must contain only letters (a-z, A-Z), numbers (0-9), and + // underscores. Must begin with a letter. string id = 7 [(google.api.field_behavior) = REQUIRED]; - // Optional. The etag for this entity. - // Required for update requests. It must match the server's etag. + // Optional. The etag for this entity. Required for update and delete requests. Must + // match the server's etag. string etag = 8 [(google.api.field_behavior) = OPTIONAL]; - // Required. The type of entity. - Type type = 10 [(google.api.field_behavior) = REQUIRED]; + // Required. Immutable. The type of entity. + Type type = 10 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; - // Required. The name of the asset associated with the storage location containing the - // entity data. - string asset = 11 [(google.api.field_behavior) = REQUIRED]; + // Required. Immutable. The ID of the asset associated with the storage location containing the + // entity data. The entity must be with in the same zone with the asset. + string asset = 11 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; // Required. Immutable. The storage path of the entity data. // For Cloud Storage data, this is the fully-qualified path to the entity, @@ -292,8 +456,11 @@ message Entity { // Output only. The name of the associated Data Catalog entry. string catalog_entry = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Required. Identifies the storage system of the entity data. - StorageSystem system = 15 [(google.api.field_behavior) = REQUIRED]; + // Required. Immutable. Identifies the storage system of the entity data. + StorageSystem system = 15 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; // Required. Identifies the storage format of the entity data. // It does not apply to entities with data stored in BigQuery. @@ -315,9 +482,13 @@ message Partition { pattern: "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}" }; - // Output only. The resource name of the partition, of the form: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_id}`. - // {partition_id} is a generated unique ID. + // Output only. The values must be HTML URL encoded two times before constructing the path. + // For example, if you have a value of "US:CA", encoded it two times and you + // get "US%253ACA". Then if you have the 2nd value is "CA#Sunnyvale", encoded + // two times and you get "CA%2523Sunnyvale". The partition values path is + // "US%253ACA/CA%2523Sunnyvale". The final URL will be + // "https://.../partitions/US%253ACA/CA%2523Sunnyvale". The name field in the + // responses will always have the encoded format. string name = 1 [ (google.api.field_behavior) = OUTPUT_ONLY, (google.api.resource_reference) = { @@ -334,14 +505,17 @@ message Partition { // Required. Immutable. The location of the entity data within the partition, for example, // `gs://bucket/path/to/entity/key1=value1/key2=value2`. + // Or `projects//datasets//tables/` string location = 3 [ (google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = IMMUTABLE ]; // Optional. The etag for this partition. - // Required for update requests. It must match the server's etag. - string etag = 4 [(google.api.field_behavior) = OPTIONAL]; + string etag = 4 [ + deprecated = true, + (google.api.field_behavior) = OPTIONAL + ]; } // Schema information describing the structure and layout of the data. @@ -415,10 +589,12 @@ message Schema { // Represents a column field within a table schema. message SchemaField { - // Required. The name of the field. + // Required. The name of the field. The maximum length is 767 characters. The name + // must begins with a letter and not contains `:` and `.`. string name = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional. User friendly field description. + // Optional. User friendly field description. Must be less than or equal to 1024 + // characters. string description = 2 [(google.api.field_behavior) = OPTIONAL]; // Required. The type of field. @@ -431,13 +607,19 @@ message Schema { repeated SchemaField fields = 10 [(google.api.field_behavior) = OPTIONAL]; } - // Represents a key field within the entity's partition structure. + // Represents a key field within the entity's partition structure. You could + // have up to 20 partition fields, but only the first 10 partitions have the + // filtering ability due to performance consideration. message PartitionField { - // Required. The name of the field. + // Required. Partition name is editable if only the partition style is not HIVE + // compatible. The maximum length allowed is 767 characters. string name = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The type of field. - Type type = 2 [(google.api.field_behavior) = REQUIRED]; + // Required. Immutable. The type of field. + Type type = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; } // The structure of paths within the entity, which represent partitions. @@ -451,8 +633,23 @@ message Schema { HIVE_COMPATIBLE = 1; } - // Required. Whether the schema is user-managed or managed by the service. User-managed - // schemas are not automatically updated by discovery jobs. + // Required. Whether the schema is user-managed or managed by the service. + // - Set user_manage to false if you would like Dataplex to help you manage + // the schema. You will get the full service provided by Dataplex discovery, + // including new data discovery, schema inference and schema evolution. You + // can still provide input the schema of the entities, for example renaming a + // schema field, changing CSV or Json options if you think the discovered + // values are not as accurate. Dataplex will consider your input as the + // initial schema (as if they were produced by the previous discovery run), + // and will evolve schema or flag actions based on that. + // - Set user_manage to true if you would like to fully manage the entity + // schema by yourself. This is useful when you would like to manually specify + // the schema for a table. In this case, the schema defined by the user is + // guaranteed to be kept unchanged and would not be overwritten. But this also + // means Dataplex will not provide schema evolution management for you. + // Dataplex will still be able to manage partition registration (i.e., keeping + // the list of partitions up to date) when Dataplex discovery is turned on and + // user_managed is set to true. bool user_managed = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. The sequence of fields describing data in table entities. @@ -470,24 +667,26 @@ message Schema { message StorageFormat { // Describes CSV and similar semi-structured data formats. message CsvOptions { - // Optional. The character encoding of the data. The default is UTF-8. + // Optional. The character encoding of the data. Accepts "US-ASCII", "UTF-8", and + // "ISO-8859-1". Defaults to UTF-8 if unspecified. string encoding = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. The number of rows to interpret as header rows that should be skipped - // when reading data rows. + // when reading data rows. Defaults to 0. int32 header_rows = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The delimiter used to separate values. Defaults to ','. string delimiter = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The character used to quote column values. Defaults to empty, - // implying unquoted data. + // Optional. The character used to quote column values. Accepts '"' and '''. + // Defaults to '"' if unspecified. string quote = 4 [(google.api.field_behavior) = OPTIONAL]; } // Describes JSON data format. message JsonOptions { - // Optional. The character encoding of the data. The default is UTF-8. + // Optional. The character encoding of the data. Accepts "US-ASCII", "UTF-8" and + // "ISO-8859-1". Defaults to UTF-8 if not specified. string encoding = 1 [(google.api.field_behavior) = OPTIONAL]; } @@ -514,7 +713,7 @@ message StorageFormat { // Image data formats (such as jpg and png). IMAGE = 200; - // Audio data formats (such as mp3 and wav). + // Audio data formats (such as mp3, and wav). AUDIO = 201; // Video data formats (such as mp4 and mpg). @@ -546,15 +745,26 @@ message StorageFormat { } // Output only. The data format associated with the stored data, which represents - // content type values. + // content type values. The value is inferred from mime type. Format format = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. The compression type associated with the stored data. // If unspecified, the data is uncompressed. CompressionFormat compression_format = 2 [(google.api.field_behavior) = OPTIONAL]; - // Required. The mime type descriptor for the data. This field is valid for formats - // other than `UNKNOWN` and `MIXED`. + // Required. The mime type descriptor for the data. Must match the pattern + // {type}/{subtype}. Supported values: + // - application/x-parquet + // - application/x-avro + // - application/x-orc + // - application/x-tfrecord + // - application/json + // - application/{subtypes} + // - text/csv + // - text/ + // - image/{image subtype} + // - video/{video subtype} + // - audio/{audio subtype} string mime_type = 3 [(google.api.field_behavior) = REQUIRED]; // Additional format-specific options. diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/resources.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/resources.proto index 5c71a9bb531..18ae0baa2dd 100644 --- a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/resources.proto +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/resources.proto @@ -634,13 +634,6 @@ message Asset { // being managed within a lake. For example: // `projects/{project_number}/buckets/{bucket_id}` // `projects/{project_number}/datasets/{dataset_id}` - // If the creation policy indicates ATTACH behavior, then an existing - // resource must be provided. - // If the policy indicates CREATE behavior, new resource will be created - // with the given name.However if it is empty, then the resource will be - // created using {asset_id}-{UUID} template for name. - // The location of the referenced resource must always match that of the - // asset. string name = 1 [(google.api.field_behavior) = IMMUTABLE]; // Required. Immutable. Type of resource. diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/service.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/service.proto index 401cb9a8332..e104f445e09 100644 --- a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/service.proto +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/service.proto @@ -20,6 +20,7 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/dataplex/v1/analyze.proto"; import "google/cloud/dataplex/v1/resources.proto"; import "google/cloud/dataplex/v1/tasks.proto"; import "google/longrunning/operations.proto"; @@ -308,12 +309,75 @@ service DataplexService { }; option (google.api.method_signature) = "name"; } + + // Create an environment resource. + rpc CreateEnvironment(CreateEnvironmentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/lakes/*}/environments" + body: "environment" + }; + option (google.api.method_signature) = "parent,environment,environment_id"; + option (google.longrunning.operation_info) = { + response_type: "Environment" + metadata_type: "OperationMetadata" + }; + } + + // Update the environment resource. + rpc UpdateEnvironment(UpdateEnvironmentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{environment.name=projects/*/locations/*/lakes/*/environments/*}" + body: "environment" + }; + option (google.api.method_signature) = "environment,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Environment" + metadata_type: "OperationMetadata" + }; + } + + // Delete the environment resource. All the child resources must have been + // deleted before environment deletion can be initiated. + rpc DeleteEnvironment(DeleteEnvironmentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/lakes/*/environments/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists environments under the given lake. + rpc ListEnvironments(ListEnvironmentsRequest) returns (ListEnvironmentsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/lakes/*}/environments" + }; + option (google.api.method_signature) = "parent"; + } + + // Get environment resource. + rpc GetEnvironment(GetEnvironmentRequest) returns (Environment) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/lakes/*/environments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists session resources in an environment. + rpc ListSessions(ListSessionsRequest) returns (ListSessionsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/lakes/*/environments/*}/sessions" + }; + option (google.api.method_signature) = "parent"; + } } // Create lake request. message CreateLakeRequest { // Required. The resource name of the lake location, of the form: - // `projects/{project_number}/locations/{location_id}` + // projects/{project_number}/locations/{location_id} // where `location_id` refers to a GCP region. string parent = 1 [ (google.api.field_behavior) = REQUIRED, @@ -895,3 +959,140 @@ message CancelJobRequest { } ]; } + +// Create environment request. +message CreateEnvironmentRequest { + // Required. The resource name of the parent lake: + // projects/{project_id}/locations/{location_id}/lakes/{lake_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Lake" + } + ]; + + // Required. Environment identifier. + // * Must contain only lowercase letters, numbers and hyphens. + // * Must start with a letter. + // * Must be between 1-63 characters. + // * Must end with a number or a letter. + // * Must be unique within the lake. + string environment_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Environment resource. + Environment environment = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Update environment request. +message UpdateEnvironmentRequest { + // Required. Mask of fields to update. + google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Update description. + // Only fields specified in `update_mask` are updated. + Environment environment = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Delete environment request. +message DeleteEnvironmentRequest { + // Required. The resource name of the environment: + // projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Environment" + } + ]; +} + +// List environments request. +message ListEnvironmentsRequest { + // Required. The resource name of the parent lake: + // projects/{project_id}/locations/{location_id}/lakes/{lake_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Lake" + } + ]; + + // Optional. Maximum number of environments to return. The service may return fewer than + // this value. If unspecified, at most 10 environments will be returned. The + // maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListEnvironments` call. Provide this + // to retrieve the subsequent page. When paginating, all other parameters + // provided to `ListEnvironments` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter request. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Order by fields for the result. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// List environments response. +message ListEnvironmentsResponse { + // Environments under the given parent lake. + repeated Environment environments = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// Get environment request. +message GetEnvironmentRequest { + // Required. The resource name of the environment: + // projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Environment" + } + ]; +} + +// List sessions request. +message ListSessionsRequest { + // Required. The resource name of the parent environment: + // projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Environment" + } + ]; + + // Optional. Maximum number of sessions to return. The service may return fewer than + // this value. If unspecified, at most 10 sessions will be returned. The + // maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListSessions` call. Provide this to + // retrieve the subsequent page. When paginating, all other parameters + // provided to `ListSessions` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// List sessions response. +message ListSessionsResponse { + // Sessions under a given environment. + repeated Session sessions = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} diff --git a/packages/google-cloud-dataplex/protos/protos.d.ts b/packages/google-cloud-dataplex/protos/protos.d.ts index e8042eff9e4..652016b6a1f 100644 --- a/packages/google-cloud-dataplex/protos/protos.d.ts +++ b/packages/google-cloud-dataplex/protos/protos.d.ts @@ -26,3577 +26,3888 @@ export namespace google { /** Namespace v1. */ namespace v1 { - /** Properties of a DiscoveryEvent. */ - interface IDiscoveryEvent { + /** Properties of an Environment. */ + interface IEnvironment { - /** DiscoveryEvent message */ - message?: (string|null); + /** Environment name */ + name?: (string|null); - /** DiscoveryEvent lakeId */ - lakeId?: (string|null); + /** Environment displayName */ + displayName?: (string|null); - /** DiscoveryEvent zoneId */ - zoneId?: (string|null); + /** Environment uid */ + uid?: (string|null); - /** DiscoveryEvent assetId */ - assetId?: (string|null); + /** Environment createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** DiscoveryEvent dataLocation */ - dataLocation?: (string|null); + /** Environment updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); - /** DiscoveryEvent type */ - type?: (google.cloud.dataplex.v1.DiscoveryEvent.EventType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EventType|null); + /** Environment labels */ + labels?: ({ [k: string]: string }|null); - /** DiscoveryEvent config */ - config?: (google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null); + /** Environment description */ + description?: (string|null); - /** DiscoveryEvent entity */ - entity?: (google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null); + /** Environment state */ + state?: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State|null); - /** DiscoveryEvent partition */ - partition?: (google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null); + /** Environment infrastructureSpec */ + infrastructureSpec?: (google.cloud.dataplex.v1.Environment.IInfrastructureSpec|null); - /** DiscoveryEvent action */ - action?: (google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null); + /** Environment sessionSpec */ + sessionSpec?: (google.cloud.dataplex.v1.Environment.ISessionSpec|null); + + /** Environment sessionStatus */ + sessionStatus?: (google.cloud.dataplex.v1.Environment.ISessionStatus|null); + + /** Environment endpoints */ + endpoints?: (google.cloud.dataplex.v1.Environment.IEndpoints|null); } - /** Represents a DiscoveryEvent. */ - class DiscoveryEvent implements IDiscoveryEvent { + /** Represents an Environment. */ + class Environment implements IEnvironment { /** - * Constructs a new DiscoveryEvent. + * Constructs a new Environment. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IDiscoveryEvent); + constructor(properties?: google.cloud.dataplex.v1.IEnvironment); - /** DiscoveryEvent message. */ - public message: string; + /** Environment name. */ + public name: string; - /** DiscoveryEvent lakeId. */ - public lakeId: string; + /** Environment displayName. */ + public displayName: string; - /** DiscoveryEvent zoneId. */ - public zoneId: string; + /** Environment uid. */ + public uid: string; - /** DiscoveryEvent assetId. */ - public assetId: string; + /** Environment createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** DiscoveryEvent dataLocation. */ - public dataLocation: string; + /** Environment updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** DiscoveryEvent type. */ - public type: (google.cloud.dataplex.v1.DiscoveryEvent.EventType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EventType); + /** Environment labels. */ + public labels: { [k: string]: string }; - /** DiscoveryEvent config. */ - public config?: (google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null); + /** Environment description. */ + public description: string; - /** DiscoveryEvent entity. */ - public entity?: (google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null); + /** Environment state. */ + public state: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State); - /** DiscoveryEvent partition. */ - public partition?: (google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null); + /** Environment infrastructureSpec. */ + public infrastructureSpec?: (google.cloud.dataplex.v1.Environment.IInfrastructureSpec|null); - /** DiscoveryEvent action. */ - public action?: (google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null); + /** Environment sessionSpec. */ + public sessionSpec?: (google.cloud.dataplex.v1.Environment.ISessionSpec|null); - /** DiscoveryEvent details. */ - public details?: ("config"|"entity"|"partition"|"action"); + /** Environment sessionStatus. */ + public sessionStatus?: (google.cloud.dataplex.v1.Environment.ISessionStatus|null); + + /** Environment endpoints. */ + public endpoints?: (google.cloud.dataplex.v1.Environment.IEndpoints|null); /** - * Creates a new DiscoveryEvent instance using the specified properties. + * Creates a new Environment instance using the specified properties. * @param [properties] Properties to set - * @returns DiscoveryEvent instance + * @returns Environment instance */ - public static create(properties?: google.cloud.dataplex.v1.IDiscoveryEvent): google.cloud.dataplex.v1.DiscoveryEvent; + public static create(properties?: google.cloud.dataplex.v1.IEnvironment): google.cloud.dataplex.v1.Environment; /** - * Encodes the specified DiscoveryEvent message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. - * @param message DiscoveryEvent message or plain object to encode + * Encodes the specified Environment message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.verify|verify} messages. + * @param message Environment message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IDiscoveryEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DiscoveryEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. - * @param message DiscoveryEvent message or plain object to encode + * Encodes the specified Environment message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.verify|verify} messages. + * @param message Environment message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDiscoveryEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DiscoveryEvent message from the specified reader or buffer. + * Decodes an Environment message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DiscoveryEvent + * @returns Environment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DiscoveryEvent; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Environment; /** - * Decodes a DiscoveryEvent message from the specified reader or buffer, length delimited. + * Decodes an Environment message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DiscoveryEvent + * @returns Environment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DiscoveryEvent; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Environment; /** - * Verifies a DiscoveryEvent message. + * Verifies an Environment message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DiscoveryEvent message from a plain object. Also converts values to their respective internal types. + * Creates an Environment message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DiscoveryEvent + * @returns Environment */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Environment; /** - * Creates a plain object from a DiscoveryEvent message. Also converts values to other types if specified. - * @param message DiscoveryEvent + * Creates a plain object from an Environment message. Also converts values to other types if specified. + * @param message Environment * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.Environment, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DiscoveryEvent to JSON. + * Converts this Environment to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace DiscoveryEvent { - - /** EventType enum. */ - enum EventType { - EVENT_TYPE_UNSPECIFIED = 0, - CONFIG = 1, - ENTITY_CREATED = 2, - ENTITY_UPDATED = 3, - ENTITY_DELETED = 4, - PARTITION_CREATED = 5, - PARTITION_UPDATED = 6, - PARTITION_DELETED = 7 - } + namespace Environment { - /** EntityType enum. */ - enum EntityType { - ENTITY_TYPE_UNSPECIFIED = 0, - TABLE = 1, - FILESET = 2 - } + /** Properties of an InfrastructureSpec. */ + interface IInfrastructureSpec { - /** Properties of a ConfigDetails. */ - interface IConfigDetails { + /** InfrastructureSpec compute */ + compute?: (google.cloud.dataplex.v1.Environment.InfrastructureSpec.IComputeResources|null); - /** ConfigDetails parameters */ - parameters?: ({ [k: string]: string }|null); + /** InfrastructureSpec osImage */ + osImage?: (google.cloud.dataplex.v1.Environment.InfrastructureSpec.IOsImageRuntime|null); } - /** Represents a ConfigDetails. */ - class ConfigDetails implements IConfigDetails { + /** Represents an InfrastructureSpec. */ + class InfrastructureSpec implements IInfrastructureSpec { /** - * Constructs a new ConfigDetails. + * Constructs a new InfrastructureSpec. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails); + constructor(properties?: google.cloud.dataplex.v1.Environment.IInfrastructureSpec); - /** ConfigDetails parameters. */ - public parameters: { [k: string]: string }; + /** InfrastructureSpec compute. */ + public compute?: (google.cloud.dataplex.v1.Environment.InfrastructureSpec.IComputeResources|null); + + /** InfrastructureSpec osImage. */ + public osImage?: (google.cloud.dataplex.v1.Environment.InfrastructureSpec.IOsImageRuntime|null); + + /** InfrastructureSpec resources. */ + public resources?: "compute"; + + /** InfrastructureSpec runtime. */ + public runtime?: "osImage"; /** - * Creates a new ConfigDetails instance using the specified properties. + * Creates a new InfrastructureSpec instance using the specified properties. * @param [properties] Properties to set - * @returns ConfigDetails instance + * @returns InfrastructureSpec instance */ - public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails): google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails; + public static create(properties?: google.cloud.dataplex.v1.Environment.IInfrastructureSpec): google.cloud.dataplex.v1.Environment.InfrastructureSpec; /** - * Encodes the specified ConfigDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. - * @param message ConfigDetails message or plain object to encode + * Encodes the specified InfrastructureSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.InfrastructureSpec.verify|verify} messages. + * @param message InfrastructureSpec message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.Environment.IInfrastructureSpec, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ConfigDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. - * @param message ConfigDetails message or plain object to encode + * Encodes the specified InfrastructureSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.InfrastructureSpec.verify|verify} messages. + * @param message InfrastructureSpec message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.Environment.IInfrastructureSpec, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ConfigDetails message from the specified reader or buffer. + * Decodes an InfrastructureSpec message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ConfigDetails + * @returns InfrastructureSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Environment.InfrastructureSpec; /** - * Decodes a ConfigDetails message from the specified reader or buffer, length delimited. + * Decodes an InfrastructureSpec message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ConfigDetails + * @returns InfrastructureSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Environment.InfrastructureSpec; /** - * Verifies a ConfigDetails message. + * Verifies an InfrastructureSpec message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ConfigDetails message from a plain object. Also converts values to their respective internal types. + * Creates an InfrastructureSpec message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ConfigDetails + * @returns InfrastructureSpec */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Environment.InfrastructureSpec; /** - * Creates a plain object from a ConfigDetails message. Also converts values to other types if specified. - * @param message ConfigDetails + * Creates a plain object from an InfrastructureSpec message. Also converts values to other types if specified. + * @param message InfrastructureSpec * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.Environment.InfrastructureSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ConfigDetails to JSON. + * Converts this InfrastructureSpec to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an EntityDetails. */ - interface IEntityDetails { + namespace InfrastructureSpec { - /** EntityDetails entity */ - entity?: (string|null); + /** Properties of a ComputeResources. */ + interface IComputeResources { - /** EntityDetails type */ - type?: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null); - } + /** ComputeResources diskSizeGb */ + diskSizeGb?: (number|null); - /** Represents an EntityDetails. */ - class EntityDetails implements IEntityDetails { + /** ComputeResources nodeCount */ + nodeCount?: (number|null); - /** - * Constructs a new EntityDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails); + /** ComputeResources maxNodeCount */ + maxNodeCount?: (number|null); + } - /** EntityDetails entity. */ - public entity: string; + /** Represents a ComputeResources. */ + class ComputeResources implements IComputeResources { - /** EntityDetails type. */ - public type: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType); + /** + * Constructs a new ComputeResources. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Environment.InfrastructureSpec.IComputeResources); - /** - * Creates a new EntityDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns EntityDetails instance - */ - public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails): google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails; + /** ComputeResources diskSizeGb. */ + public diskSizeGb: number; - /** - * Encodes the specified EntityDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. - * @param message EntityDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails, writer?: $protobuf.Writer): $protobuf.Writer; + /** ComputeResources nodeCount. */ + public nodeCount: number; - /** - * Encodes the specified EntityDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. - * @param message EntityDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails, writer?: $protobuf.Writer): $protobuf.Writer; + /** ComputeResources maxNodeCount. */ + public maxNodeCount: number; - /** - * Decodes an EntityDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EntityDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails; + /** + * Creates a new ComputeResources instance using the specified properties. + * @param [properties] Properties to set + * @returns ComputeResources instance + */ + public static create(properties?: google.cloud.dataplex.v1.Environment.InfrastructureSpec.IComputeResources): google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources; - /** - * Decodes an EntityDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EntityDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails; + /** + * Encodes the specified ComputeResources message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources.verify|verify} messages. + * @param message ComputeResources message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Environment.InfrastructureSpec.IComputeResources, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies an EntityDetails message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified ComputeResources message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources.verify|verify} messages. + * @param message ComputeResources message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Environment.InfrastructureSpec.IComputeResources, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates an EntityDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EntityDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails; + /** + * Decodes a ComputeResources message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ComputeResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources; - /** - * Creates a plain object from an EntityDetails message. Also converts values to other types if specified. - * @param message EntityDetails + /** + * Decodes a ComputeResources message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ComputeResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources; + + /** + * Verifies a ComputeResources message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ComputeResources message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ComputeResources + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources; + + /** + * Creates a plain object from a ComputeResources message. Also converts values to other types if specified. + * @param message ComputeResources + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ComputeResources to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an OsImageRuntime. */ + interface IOsImageRuntime { + + /** OsImageRuntime imageVersion */ + imageVersion?: (string|null); + + /** OsImageRuntime javaLibraries */ + javaLibraries?: (string[]|null); + + /** OsImageRuntime pythonPackages */ + pythonPackages?: (string[]|null); + + /** OsImageRuntime properties */ + properties?: ({ [k: string]: string }|null); + } + + /** Represents an OsImageRuntime. */ + class OsImageRuntime implements IOsImageRuntime { + + /** + * Constructs a new OsImageRuntime. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Environment.InfrastructureSpec.IOsImageRuntime); + + /** OsImageRuntime imageVersion. */ + public imageVersion: string; + + /** OsImageRuntime javaLibraries. */ + public javaLibraries: string[]; + + /** OsImageRuntime pythonPackages. */ + public pythonPackages: string[]; + + /** OsImageRuntime properties. */ + public properties: { [k: string]: string }; + + /** + * Creates a new OsImageRuntime instance using the specified properties. + * @param [properties] Properties to set + * @returns OsImageRuntime instance + */ + public static create(properties?: google.cloud.dataplex.v1.Environment.InfrastructureSpec.IOsImageRuntime): google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime; + + /** + * Encodes the specified OsImageRuntime message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.verify|verify} messages. + * @param message OsImageRuntime message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Environment.InfrastructureSpec.IOsImageRuntime, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OsImageRuntime message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.verify|verify} messages. + * @param message OsImageRuntime message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Environment.InfrastructureSpec.IOsImageRuntime, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OsImageRuntime message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OsImageRuntime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime; + + /** + * Decodes an OsImageRuntime message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OsImageRuntime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime; + + /** + * Verifies an OsImageRuntime message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OsImageRuntime message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OsImageRuntime + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime; + + /** + * Creates a plain object from an OsImageRuntime message. Also converts values to other types if specified. + * @param message OsImageRuntime + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OsImageRuntime to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a SessionSpec. */ + interface ISessionSpec { + + /** SessionSpec maxIdleDuration */ + maxIdleDuration?: (google.protobuf.IDuration|null); + + /** SessionSpec enableFastStartup */ + enableFastStartup?: (boolean|null); + } + + /** Represents a SessionSpec. */ + class SessionSpec implements ISessionSpec { + + /** + * Constructs a new SessionSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Environment.ISessionSpec); + + /** SessionSpec maxIdleDuration. */ + public maxIdleDuration?: (google.protobuf.IDuration|null); + + /** SessionSpec enableFastStartup. */ + public enableFastStartup: boolean; + + /** + * Creates a new SessionSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns SessionSpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.Environment.ISessionSpec): google.cloud.dataplex.v1.Environment.SessionSpec; + + /** + * Encodes the specified SessionSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.SessionSpec.verify|verify} messages. + * @param message SessionSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Environment.ISessionSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SessionSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.SessionSpec.verify|verify} messages. + * @param message SessionSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Environment.ISessionSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SessionSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SessionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Environment.SessionSpec; + + /** + * Decodes a SessionSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SessionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Environment.SessionSpec; + + /** + * Verifies a SessionSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SessionSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SessionSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Environment.SessionSpec; + + /** + * Creates a plain object from a SessionSpec message. Also converts values to other types if specified. + * @param message SessionSpec * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.Environment.SessionSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EntityDetails to JSON. + * Converts this SessionSpec to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a PartitionDetails. */ - interface IPartitionDetails { - - /** PartitionDetails partition */ - partition?: (string|null); - - /** PartitionDetails entity */ - entity?: (string|null); + /** Properties of a SessionStatus. */ + interface ISessionStatus { - /** PartitionDetails type */ - type?: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null); + /** SessionStatus active */ + active?: (boolean|null); } - /** Represents a PartitionDetails. */ - class PartitionDetails implements IPartitionDetails { + /** Represents a SessionStatus. */ + class SessionStatus implements ISessionStatus { /** - * Constructs a new PartitionDetails. + * Constructs a new SessionStatus. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails); - - /** PartitionDetails partition. */ - public partition: string; - - /** PartitionDetails entity. */ - public entity: string; + constructor(properties?: google.cloud.dataplex.v1.Environment.ISessionStatus); - /** PartitionDetails type. */ - public type: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType); + /** SessionStatus active. */ + public active: boolean; /** - * Creates a new PartitionDetails instance using the specified properties. + * Creates a new SessionStatus instance using the specified properties. * @param [properties] Properties to set - * @returns PartitionDetails instance + * @returns SessionStatus instance */ - public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails): google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails; + public static create(properties?: google.cloud.dataplex.v1.Environment.ISessionStatus): google.cloud.dataplex.v1.Environment.SessionStatus; /** - * Encodes the specified PartitionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. - * @param message PartitionDetails message or plain object to encode + * Encodes the specified SessionStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.SessionStatus.verify|verify} messages. + * @param message SessionStatus message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.Environment.ISessionStatus, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PartitionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. - * @param message PartitionDetails message or plain object to encode + * Encodes the specified SessionStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.SessionStatus.verify|verify} messages. + * @param message SessionStatus message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.Environment.ISessionStatus, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PartitionDetails message from the specified reader or buffer. + * Decodes a SessionStatus message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PartitionDetails + * @returns SessionStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Environment.SessionStatus; /** - * Decodes a PartitionDetails message from the specified reader or buffer, length delimited. + * Decodes a SessionStatus message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PartitionDetails + * @returns SessionStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Environment.SessionStatus; /** - * Verifies a PartitionDetails message. + * Verifies a SessionStatus message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PartitionDetails message from a plain object. Also converts values to their respective internal types. + * Creates a SessionStatus message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PartitionDetails + * @returns SessionStatus */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Environment.SessionStatus; /** - * Creates a plain object from a PartitionDetails message. Also converts values to other types if specified. - * @param message PartitionDetails + * Creates a plain object from a SessionStatus message. Also converts values to other types if specified. + * @param message SessionStatus * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.Environment.SessionStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PartitionDetails to JSON. + * Converts this SessionStatus to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ActionDetails. */ - interface IActionDetails { + /** Properties of an Endpoints. */ + interface IEndpoints { - /** ActionDetails type */ - type?: (string|null); + /** Endpoints notebooks */ + notebooks?: (string|null); + + /** Endpoints sql */ + sql?: (string|null); } - /** Represents an ActionDetails. */ - class ActionDetails implements IActionDetails { + /** Represents an Endpoints. */ + class Endpoints implements IEndpoints { /** - * Constructs a new ActionDetails. + * Constructs a new Endpoints. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails); + constructor(properties?: google.cloud.dataplex.v1.Environment.IEndpoints); - /** ActionDetails type. */ - public type: string; + /** Endpoints notebooks. */ + public notebooks: string; + + /** Endpoints sql. */ + public sql: string; /** - * Creates a new ActionDetails instance using the specified properties. + * Creates a new Endpoints instance using the specified properties. * @param [properties] Properties to set - * @returns ActionDetails instance + * @returns Endpoints instance */ - public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails): google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails; + public static create(properties?: google.cloud.dataplex.v1.Environment.IEndpoints): google.cloud.dataplex.v1.Environment.Endpoints; /** - * Encodes the specified ActionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. - * @param message ActionDetails message or plain object to encode + * Encodes the specified Endpoints message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.Endpoints.verify|verify} messages. + * @param message Endpoints message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.Environment.IEndpoints, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ActionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. - * @param message ActionDetails message or plain object to encode + * Encodes the specified Endpoints message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.Endpoints.verify|verify} messages. + * @param message Endpoints message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.Environment.IEndpoints, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ActionDetails message from the specified reader or buffer. + * Decodes an Endpoints message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ActionDetails + * @returns Endpoints * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Environment.Endpoints; /** - * Decodes an ActionDetails message from the specified reader or buffer, length delimited. + * Decodes an Endpoints message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ActionDetails + * @returns Endpoints * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Environment.Endpoints; /** - * Verifies an ActionDetails message. + * Verifies an Endpoints message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ActionDetails message from a plain object. Also converts values to their respective internal types. + * Creates an Endpoints message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ActionDetails + * @returns Endpoints */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Environment.Endpoints; /** - * Creates a plain object from an ActionDetails message. Also converts values to other types if specified. - * @param message ActionDetails + * Creates a plain object from an Endpoints message. Also converts values to other types if specified. + * @param message Endpoints * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.Environment.Endpoints, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ActionDetails to JSON. + * Converts this Endpoints to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } } - /** Properties of a JobEvent. */ - interface IJobEvent { + /** Properties of a Content. */ + interface IContent { - /** JobEvent message */ - message?: (string|null); + /** Content name */ + name?: (string|null); - /** JobEvent jobId */ - jobId?: (string|null); + /** Content uid */ + uid?: (string|null); - /** JobEvent startTime */ - startTime?: (google.protobuf.ITimestamp|null); + /** Content path */ + path?: (string|null); - /** JobEvent endTime */ - endTime?: (google.protobuf.ITimestamp|null); + /** Content createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** JobEvent state */ - state?: (google.cloud.dataplex.v1.JobEvent.State|keyof typeof google.cloud.dataplex.v1.JobEvent.State|null); + /** Content updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); - /** JobEvent retries */ - retries?: (number|null); + /** Content labels */ + labels?: ({ [k: string]: string }|null); - /** JobEvent type */ - type?: (google.cloud.dataplex.v1.JobEvent.Type|keyof typeof google.cloud.dataplex.v1.JobEvent.Type|null); + /** Content description */ + description?: (string|null); - /** JobEvent service */ - service?: (google.cloud.dataplex.v1.JobEvent.Service|keyof typeof google.cloud.dataplex.v1.JobEvent.Service|null); + /** Content dataText */ + dataText?: (string|null); - /** JobEvent serviceJob */ - serviceJob?: (string|null); + /** Content sqlScript */ + sqlScript?: (google.cloud.dataplex.v1.Content.ISqlScript|null); + + /** Content notebook */ + notebook?: (google.cloud.dataplex.v1.Content.INotebook|null); } - /** Represents a JobEvent. */ - class JobEvent implements IJobEvent { + /** Represents a Content. */ + class Content implements IContent { /** - * Constructs a new JobEvent. + * Constructs a new Content. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IJobEvent); + constructor(properties?: google.cloud.dataplex.v1.IContent); - /** JobEvent message. */ - public message: string; + /** Content name. */ + public name: string; - /** JobEvent jobId. */ - public jobId: string; + /** Content uid. */ + public uid: string; - /** JobEvent startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); + /** Content path. */ + public path: string; - /** JobEvent endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); + /** Content createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** JobEvent state. */ - public state: (google.cloud.dataplex.v1.JobEvent.State|keyof typeof google.cloud.dataplex.v1.JobEvent.State); + /** Content updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** JobEvent retries. */ - public retries: number; + /** Content labels. */ + public labels: { [k: string]: string }; - /** JobEvent type. */ - public type: (google.cloud.dataplex.v1.JobEvent.Type|keyof typeof google.cloud.dataplex.v1.JobEvent.Type); + /** Content description. */ + public description: string; - /** JobEvent service. */ - public service: (google.cloud.dataplex.v1.JobEvent.Service|keyof typeof google.cloud.dataplex.v1.JobEvent.Service); + /** Content dataText. */ + public dataText?: (string|null); - /** JobEvent serviceJob. */ - public serviceJob: string; + /** Content sqlScript. */ + public sqlScript?: (google.cloud.dataplex.v1.Content.ISqlScript|null); + + /** Content notebook. */ + public notebook?: (google.cloud.dataplex.v1.Content.INotebook|null); + + /** Content data. */ + public data?: "dataText"; + + /** Content content. */ + public content?: ("sqlScript"|"notebook"); /** - * Creates a new JobEvent instance using the specified properties. + * Creates a new Content instance using the specified properties. * @param [properties] Properties to set - * @returns JobEvent instance + * @returns Content instance */ - public static create(properties?: google.cloud.dataplex.v1.IJobEvent): google.cloud.dataplex.v1.JobEvent; + public static create(properties?: google.cloud.dataplex.v1.IContent): google.cloud.dataplex.v1.Content; /** - * Encodes the specified JobEvent message. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. - * @param message JobEvent message or plain object to encode + * Encodes the specified Content message. Does not implicitly {@link google.cloud.dataplex.v1.Content.verify|verify} messages. + * @param message Content message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IJobEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IContent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified JobEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. - * @param message JobEvent message or plain object to encode + * Encodes the specified Content message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Content.verify|verify} messages. + * @param message Content message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IJobEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IContent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a JobEvent message from the specified reader or buffer. + * Decodes a Content message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns JobEvent + * @returns Content * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.JobEvent; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Content; /** - * Decodes a JobEvent message from the specified reader or buffer, length delimited. + * Decodes a Content message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns JobEvent + * @returns Content * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.JobEvent; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Content; /** - * Verifies a JobEvent message. + * Verifies a Content message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a JobEvent message from a plain object. Also converts values to their respective internal types. + * Creates a Content message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns JobEvent + * @returns Content */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.JobEvent; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Content; /** - * Creates a plain object from a JobEvent message. Also converts values to other types if specified. - * @param message JobEvent + * Creates a plain object from a Content message. Also converts values to other types if specified. + * @param message Content * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.JobEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.Content, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this JobEvent to JSON. + * Converts this Content to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace JobEvent { + namespace Content { - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - SPARK = 1, - NOTEBOOK = 2 + /** Properties of a SqlScript. */ + interface ISqlScript { + + /** SqlScript engine */ + engine?: (google.cloud.dataplex.v1.Content.SqlScript.QueryEngine|keyof typeof google.cloud.dataplex.v1.Content.SqlScript.QueryEngine|null); } - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - SUCCEEDED = 1, - FAILED = 2, - CANCELLED = 3, - ABORTED = 4 + /** Represents a SqlScript. */ + class SqlScript implements ISqlScript { + + /** + * Constructs a new SqlScript. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Content.ISqlScript); + + /** SqlScript engine. */ + public engine: (google.cloud.dataplex.v1.Content.SqlScript.QueryEngine|keyof typeof google.cloud.dataplex.v1.Content.SqlScript.QueryEngine); + + /** + * Creates a new SqlScript instance using the specified properties. + * @param [properties] Properties to set + * @returns SqlScript instance + */ + public static create(properties?: google.cloud.dataplex.v1.Content.ISqlScript): google.cloud.dataplex.v1.Content.SqlScript; + + /** + * Encodes the specified SqlScript message. Does not implicitly {@link google.cloud.dataplex.v1.Content.SqlScript.verify|verify} messages. + * @param message SqlScript message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Content.ISqlScript, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SqlScript message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Content.SqlScript.verify|verify} messages. + * @param message SqlScript message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Content.ISqlScript, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SqlScript message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SqlScript + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Content.SqlScript; + + /** + * Decodes a SqlScript message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SqlScript + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Content.SqlScript; + + /** + * Verifies a SqlScript message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SqlScript message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SqlScript + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Content.SqlScript; + + /** + * Creates a plain object from a SqlScript message. Also converts values to other types if specified. + * @param message SqlScript + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Content.SqlScript, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SqlScript to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } - /** Service enum. */ - enum Service { - SERVICE_UNSPECIFIED = 0, - DATAPROC = 1 + namespace SqlScript { + + /** QueryEngine enum. */ + enum QueryEngine { + QUERY_ENGINE_UNSPECIFIED = 0, + SPARK = 2 + } + } + + /** Properties of a Notebook. */ + interface INotebook { + + /** Notebook kernelType */ + kernelType?: (google.cloud.dataplex.v1.Content.Notebook.KernelType|keyof typeof google.cloud.dataplex.v1.Content.Notebook.KernelType|null); + } + + /** Represents a Notebook. */ + class Notebook implements INotebook { + + /** + * Constructs a new Notebook. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Content.INotebook); + + /** Notebook kernelType. */ + public kernelType: (google.cloud.dataplex.v1.Content.Notebook.KernelType|keyof typeof google.cloud.dataplex.v1.Content.Notebook.KernelType); + + /** + * Creates a new Notebook instance using the specified properties. + * @param [properties] Properties to set + * @returns Notebook instance + */ + public static create(properties?: google.cloud.dataplex.v1.Content.INotebook): google.cloud.dataplex.v1.Content.Notebook; + + /** + * Encodes the specified Notebook message. Does not implicitly {@link google.cloud.dataplex.v1.Content.Notebook.verify|verify} messages. + * @param message Notebook message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Content.INotebook, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Notebook message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Content.Notebook.verify|verify} messages. + * @param message Notebook message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Content.INotebook, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Notebook message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Notebook + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Content.Notebook; + + /** + * Decodes a Notebook message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Notebook + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Content.Notebook; + + /** + * Verifies a Notebook message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Notebook message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Notebook + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Content.Notebook; + + /** + * Creates a plain object from a Notebook message. Also converts values to other types if specified. + * @param message Notebook + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Content.Notebook, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Notebook to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Notebook { + + /** KernelType enum. */ + enum KernelType { + KERNEL_TYPE_UNSPECIFIED = 0, + PYTHON3 = 1 + } } } - /** Properties of a SessionEvent. */ - interface ISessionEvent { + /** Properties of a Session. */ + interface ISession { - /** SessionEvent message */ - message?: (string|null); + /** Session name */ + name?: (string|null); - /** SessionEvent userId */ + /** Session userId */ userId?: (string|null); - /** SessionEvent sessionId */ - sessionId?: (string|null); - - /** SessionEvent type */ - type?: (google.cloud.dataplex.v1.SessionEvent.EventType|keyof typeof google.cloud.dataplex.v1.SessionEvent.EventType|null); + /** Session createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** SessionEvent query */ - query?: (google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null); + /** Session state */ + state?: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State|null); } - /** Represents a SessionEvent. */ - class SessionEvent implements ISessionEvent { + /** Represents a Session. */ + class Session implements ISession { /** - * Constructs a new SessionEvent. + * Constructs a new Session. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.ISessionEvent); + constructor(properties?: google.cloud.dataplex.v1.ISession); - /** SessionEvent message. */ - public message: string; + /** Session name. */ + public name: string; - /** SessionEvent userId. */ + /** Session userId. */ public userId: string; - /** SessionEvent sessionId. */ - public sessionId: string; - - /** SessionEvent type. */ - public type: (google.cloud.dataplex.v1.SessionEvent.EventType|keyof typeof google.cloud.dataplex.v1.SessionEvent.EventType); - - /** SessionEvent query. */ - public query?: (google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null); + /** Session createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** SessionEvent detail. */ - public detail?: "query"; + /** Session state. */ + public state: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State); /** - * Creates a new SessionEvent instance using the specified properties. + * Creates a new Session instance using the specified properties. * @param [properties] Properties to set - * @returns SessionEvent instance + * @returns Session instance */ - public static create(properties?: google.cloud.dataplex.v1.ISessionEvent): google.cloud.dataplex.v1.SessionEvent; + public static create(properties?: google.cloud.dataplex.v1.ISession): google.cloud.dataplex.v1.Session; /** - * Encodes the specified SessionEvent message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. - * @param message SessionEvent message or plain object to encode + * Encodes the specified Session message. Does not implicitly {@link google.cloud.dataplex.v1.Session.verify|verify} messages. + * @param message Session message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.ISessionEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.ISession, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SessionEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. - * @param message SessionEvent message or plain object to encode + * Encodes the specified Session message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Session.verify|verify} messages. + * @param message Session message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ISessionEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.ISession, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SessionEvent message from the specified reader or buffer. + * Decodes a Session message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SessionEvent + * @returns Session * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.SessionEvent; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Session; /** - * Decodes a SessionEvent message from the specified reader or buffer, length delimited. + * Decodes a Session message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SessionEvent + * @returns Session * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.SessionEvent; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Session; /** - * Verifies a SessionEvent message. + * Verifies a Session message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SessionEvent message from a plain object. Also converts values to their respective internal types. + * Creates a Session message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SessionEvent + * @returns Session */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.SessionEvent; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Session; /** - * Creates a plain object from a SessionEvent message. Also converts values to other types if specified. - * @param message SessionEvent + * Creates a plain object from a Session message. Also converts values to other types if specified. + * @param message Session * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.SessionEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.Session, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SessionEvent to JSON. + * Converts this Session to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace SessionEvent { + /** Properties of a Lake. */ + interface ILake { - /** EventType enum. */ - enum EventType { - EVENT_TYPE_UNSPECIFIED = 0, - START = 1, - STOP = 2, - QUERY = 3 - } + /** Lake name */ + name?: (string|null); - /** Properties of a QueryDetail. */ - interface IQueryDetail { + /** Lake displayName */ + displayName?: (string|null); - /** QueryDetail queryId */ - queryId?: (string|null); + /** Lake uid */ + uid?: (string|null); - /** QueryDetail queryText */ - queryText?: (string|null); + /** Lake createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** QueryDetail engine */ - engine?: (google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|keyof typeof google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|null); + /** Lake updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); - /** QueryDetail duration */ - duration?: (google.protobuf.IDuration|null); + /** Lake labels */ + labels?: ({ [k: string]: string }|null); - /** QueryDetail resultSizeBytes */ - resultSizeBytes?: (number|Long|string|null); + /** Lake description */ + description?: (string|null); - /** QueryDetail dataProcessedBytes */ - dataProcessedBytes?: (number|Long|string|null); - } + /** Lake state */ + state?: (google.cloud.dataplex.v1.Lake.MetastoreStatus.State|keyof typeof google.cloud.dataplex.v1.Lake.MetastoreStatus.State|null); - /** Represents a QueryDetail. */ - class QueryDetail implements IQueryDetail { + /** Lake serviceAccount */ + serviceAccount?: (string|null); - /** - * Constructs a new QueryDetail. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.SessionEvent.IQueryDetail); + /** Lake metastore */ + metastore?: (google.cloud.dataplex.v1.Lake.IMetastore|null); - /** QueryDetail queryId. */ - public queryId: string; + /** Lake assetStatus */ + assetStatus?: (google.cloud.dataplex.v1.IAssetStatus|null); - /** QueryDetail queryText. */ - public queryText: string; + /** Lake metastoreStatus */ + metastoreStatus?: (google.cloud.dataplex.v1.Lake.IMetastoreStatus|null); + } - /** QueryDetail engine. */ - public engine: (google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|keyof typeof google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine); + /** Represents a Lake. */ + class Lake implements ILake { - /** QueryDetail duration. */ - public duration?: (google.protobuf.IDuration|null); + /** + * Constructs a new Lake. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ILake); - /** QueryDetail resultSizeBytes. */ - public resultSizeBytes: (number|Long|string); + /** Lake name. */ + public name: string; - /** QueryDetail dataProcessedBytes. */ - public dataProcessedBytes: (number|Long|string); + /** Lake displayName. */ + public displayName: string; + + /** Lake uid. */ + public uid: string; + + /** Lake createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Lake updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Lake labels. */ + public labels: { [k: string]: string }; + + /** Lake description. */ + public description: string; + + /** Lake state. */ + public state: (google.cloud.dataplex.v1.Lake.MetastoreStatus.State|keyof typeof google.cloud.dataplex.v1.Lake.MetastoreStatus.State); + + /** Lake serviceAccount. */ + public serviceAccount: string; + + /** Lake metastore. */ + public metastore?: (google.cloud.dataplex.v1.Lake.IMetastore|null); + + /** Lake assetStatus. */ + public assetStatus?: (google.cloud.dataplex.v1.IAssetStatus|null); + + /** Lake metastoreStatus. */ + public metastoreStatus?: (google.cloud.dataplex.v1.Lake.IMetastoreStatus|null); + + /** + * Creates a new Lake instance using the specified properties. + * @param [properties] Properties to set + * @returns Lake instance + */ + public static create(properties?: google.cloud.dataplex.v1.ILake): google.cloud.dataplex.v1.Lake; + + /** + * Encodes the specified Lake message. Does not implicitly {@link google.cloud.dataplex.v1.Lake.verify|verify} messages. + * @param message Lake message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ILake, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Lake message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Lake.verify|verify} messages. + * @param message Lake message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ILake, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Lake message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Lake + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Lake; + + /** + * Decodes a Lake message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Lake + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Lake; + + /** + * Verifies a Lake message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Lake message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Lake + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Lake; + + /** + * Creates a plain object from a Lake message. Also converts values to other types if specified. + * @param message Lake + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Lake, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Lake to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Lake { + + /** Properties of a Metastore. */ + interface IMetastore { + + /** Metastore service */ + service?: (string|null); + } + + /** Represents a Metastore. */ + class Metastore implements IMetastore { /** - * Creates a new QueryDetail instance using the specified properties. + * Constructs a new Metastore. * @param [properties] Properties to set - * @returns QueryDetail instance */ - public static create(properties?: google.cloud.dataplex.v1.SessionEvent.IQueryDetail): google.cloud.dataplex.v1.SessionEvent.QueryDetail; + constructor(properties?: google.cloud.dataplex.v1.Lake.IMetastore); + + /** Metastore service. */ + public service: string; /** - * Encodes the specified QueryDetail message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. - * @param message QueryDetail message or plain object to encode + * Creates a new Metastore instance using the specified properties. + * @param [properties] Properties to set + * @returns Metastore instance + */ + public static create(properties?: google.cloud.dataplex.v1.Lake.IMetastore): google.cloud.dataplex.v1.Lake.Metastore; + + /** + * Encodes the specified Metastore message. Does not implicitly {@link google.cloud.dataplex.v1.Lake.Metastore.verify|verify} messages. + * @param message Metastore message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.SessionEvent.IQueryDetail, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.Lake.IMetastore, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified QueryDetail message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. - * @param message QueryDetail message or plain object to encode + * Encodes the specified Metastore message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Lake.Metastore.verify|verify} messages. + * @param message Metastore message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.SessionEvent.IQueryDetail, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.Lake.IMetastore, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a QueryDetail message from the specified reader or buffer. + * Decodes a Metastore message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns QueryDetail + * @returns Metastore * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.SessionEvent.QueryDetail; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Lake.Metastore; /** - * Decodes a QueryDetail message from the specified reader or buffer, length delimited. + * Decodes a Metastore message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns QueryDetail + * @returns Metastore * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.SessionEvent.QueryDetail; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Lake.Metastore; /** - * Verifies a QueryDetail message. + * Verifies a Metastore message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a QueryDetail message from a plain object. Also converts values to their respective internal types. + * Creates a Metastore message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns QueryDetail + * @returns Metastore */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.SessionEvent.QueryDetail; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Lake.Metastore; /** - * Creates a plain object from a QueryDetail message. Also converts values to other types if specified. - * @param message QueryDetail + * Creates a plain object from a Metastore message. Also converts values to other types if specified. + * @param message Metastore * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.SessionEvent.QueryDetail, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.Lake.Metastore, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this QueryDetail to JSON. + * Converts this Metastore to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace QueryDetail { + /** Properties of a MetastoreStatus. */ + interface IMetastoreStatus { - /** Engine enum. */ - enum Engine { - ENGINE_UNSPECIFIED = 0, - SPARK_SQL = 1, - BIGQUERY = 2 - } - } - } + /** MetastoreStatus state */ + state?: (google.cloud.dataplex.v1.Lake.MetastoreStatus.State|keyof typeof google.cloud.dataplex.v1.Lake.MetastoreStatus.State|null); - /** Represents a MetadataService */ - class MetadataService extends $protobuf.rpc.Service { + /** MetastoreStatus message */ + message?: (string|null); - /** - * Constructs a new MetadataService service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + /** MetastoreStatus updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); - /** - * Creates new MetadataService service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): MetadataService; + /** MetastoreStatus endpoint */ + endpoint?: (string|null); + } - /** - * Calls GetEntity. - * @param request GetEntityRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Entity - */ - public getEntity(request: google.cloud.dataplex.v1.IGetEntityRequest, callback: google.cloud.dataplex.v1.MetadataService.GetEntityCallback): void; + /** Represents a MetastoreStatus. */ + class MetastoreStatus implements IMetastoreStatus { - /** - * Calls GetEntity. - * @param request GetEntityRequest message or plain object - * @returns Promise - */ - public getEntity(request: google.cloud.dataplex.v1.IGetEntityRequest): Promise; + /** + * Constructs a new MetastoreStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Lake.IMetastoreStatus); - /** - * Calls ListEntities. - * @param request ListEntitiesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListEntitiesResponse - */ - public listEntities(request: google.cloud.dataplex.v1.IListEntitiesRequest, callback: google.cloud.dataplex.v1.MetadataService.ListEntitiesCallback): void; + /** MetastoreStatus state. */ + public state: (google.cloud.dataplex.v1.Lake.MetastoreStatus.State|keyof typeof google.cloud.dataplex.v1.Lake.MetastoreStatus.State); - /** - * Calls ListEntities. - * @param request ListEntitiesRequest message or plain object - * @returns Promise - */ - public listEntities(request: google.cloud.dataplex.v1.IListEntitiesRequest): Promise; + /** MetastoreStatus message. */ + public message: string; - /** - * Calls GetPartition. - * @param request GetPartitionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Partition - */ - public getPartition(request: google.cloud.dataplex.v1.IGetPartitionRequest, callback: google.cloud.dataplex.v1.MetadataService.GetPartitionCallback): void; + /** MetastoreStatus updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** - * Calls GetPartition. - * @param request GetPartitionRequest message or plain object - * @returns Promise - */ - public getPartition(request: google.cloud.dataplex.v1.IGetPartitionRequest): Promise; + /** MetastoreStatus endpoint. */ + public endpoint: string; - /** - * Calls ListPartitions. - * @param request ListPartitionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListPartitionsResponse - */ - public listPartitions(request: google.cloud.dataplex.v1.IListPartitionsRequest, callback: google.cloud.dataplex.v1.MetadataService.ListPartitionsCallback): void; + /** + * Creates a new MetastoreStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns MetastoreStatus instance + */ + public static create(properties?: google.cloud.dataplex.v1.Lake.IMetastoreStatus): google.cloud.dataplex.v1.Lake.MetastoreStatus; - /** - * Calls ListPartitions. - * @param request ListPartitionsRequest message or plain object - * @returns Promise - */ - public listPartitions(request: google.cloud.dataplex.v1.IListPartitionsRequest): Promise; - } + /** + * Encodes the specified MetastoreStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Lake.MetastoreStatus.verify|verify} messages. + * @param message MetastoreStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Lake.IMetastoreStatus, writer?: $protobuf.Writer): $protobuf.Writer; - namespace MetadataService { + /** + * Encodes the specified MetastoreStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Lake.MetastoreStatus.verify|verify} messages. + * @param message MetastoreStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Lake.IMetastoreStatus, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#getEntity}. - * @param error Error, if any - * @param [response] Entity - */ - type GetEntityCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Entity) => void; + /** + * Decodes a MetastoreStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetastoreStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Lake.MetastoreStatus; - /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#listEntities}. - * @param error Error, if any - * @param [response] ListEntitiesResponse - */ - type ListEntitiesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListEntitiesResponse) => void; + /** + * Decodes a MetastoreStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetastoreStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Lake.MetastoreStatus; - /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#getPartition}. - * @param error Error, if any - * @param [response] Partition - */ - type GetPartitionCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Partition) => void; + /** + * Verifies a MetastoreStatus message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#listPartitions}. - * @param error Error, if any - * @param [response] ListPartitionsResponse - */ - type ListPartitionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListPartitionsResponse) => void; - } + /** + * Creates a MetastoreStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetastoreStatus + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Lake.MetastoreStatus; - /** Properties of a ListEntitiesRequest. */ - interface IListEntitiesRequest { + /** + * Creates a plain object from a MetastoreStatus message. Also converts values to other types if specified. + * @param message MetastoreStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Lake.MetastoreStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ListEntitiesRequest parent */ - parent?: (string|null); + /** + * Converts this MetastoreStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** ListEntitiesRequest view */ - view?: (google.cloud.dataplex.v1.ListEntitiesRequest.EntityView|keyof typeof google.cloud.dataplex.v1.ListEntitiesRequest.EntityView|null); + namespace MetastoreStatus { - /** ListEntitiesRequest pageSize */ - pageSize?: (number|null); + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + NONE = 1, + READY = 2, + UPDATING = 3, + ERROR = 4 + } + } + } - /** ListEntitiesRequest pageToken */ - pageToken?: (string|null); + /** Properties of an AssetStatus. */ + interface IAssetStatus { - /** ListEntitiesRequest filter */ - filter?: (string|null); + /** AssetStatus updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** AssetStatus activeAssets */ + activeAssets?: (number|null); + + /** AssetStatus securityPolicyApplyingAssets */ + securityPolicyApplyingAssets?: (number|null); } - /** Represents a ListEntitiesRequest. */ - class ListEntitiesRequest implements IListEntitiesRequest { + /** Represents an AssetStatus. */ + class AssetStatus implements IAssetStatus { /** - * Constructs a new ListEntitiesRequest. + * Constructs a new AssetStatus. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IListEntitiesRequest); - - /** ListEntitiesRequest parent. */ - public parent: string; - - /** ListEntitiesRequest view. */ - public view: (google.cloud.dataplex.v1.ListEntitiesRequest.EntityView|keyof typeof google.cloud.dataplex.v1.ListEntitiesRequest.EntityView); + constructor(properties?: google.cloud.dataplex.v1.IAssetStatus); - /** ListEntitiesRequest pageSize. */ - public pageSize: number; + /** AssetStatus updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** ListEntitiesRequest pageToken. */ - public pageToken: string; + /** AssetStatus activeAssets. */ + public activeAssets: number; - /** ListEntitiesRequest filter. */ - public filter: string; + /** AssetStatus securityPolicyApplyingAssets. */ + public securityPolicyApplyingAssets: number; /** - * Creates a new ListEntitiesRequest instance using the specified properties. + * Creates a new AssetStatus instance using the specified properties. * @param [properties] Properties to set - * @returns ListEntitiesRequest instance + * @returns AssetStatus instance */ - public static create(properties?: google.cloud.dataplex.v1.IListEntitiesRequest): google.cloud.dataplex.v1.ListEntitiesRequest; + public static create(properties?: google.cloud.dataplex.v1.IAssetStatus): google.cloud.dataplex.v1.AssetStatus; /** - * Encodes the specified ListEntitiesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesRequest.verify|verify} messages. - * @param message ListEntitiesRequest message or plain object to encode + * Encodes the specified AssetStatus message. Does not implicitly {@link google.cloud.dataplex.v1.AssetStatus.verify|verify} messages. + * @param message AssetStatus message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IListEntitiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IAssetStatus, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListEntitiesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesRequest.verify|verify} messages. - * @param message ListEntitiesRequest message or plain object to encode + * Encodes the specified AssetStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AssetStatus.verify|verify} messages. + * @param message AssetStatus message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListEntitiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IAssetStatus, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListEntitiesRequest message from the specified reader or buffer. + * Decodes an AssetStatus message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListEntitiesRequest + * @returns AssetStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListEntitiesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.AssetStatus; /** - * Decodes a ListEntitiesRequest message from the specified reader or buffer, length delimited. + * Decodes an AssetStatus message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListEntitiesRequest + * @returns AssetStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListEntitiesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.AssetStatus; /** - * Verifies a ListEntitiesRequest message. + * Verifies an AssetStatus message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListEntitiesRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AssetStatus message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListEntitiesRequest + * @returns AssetStatus */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListEntitiesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.AssetStatus; /** - * Creates a plain object from a ListEntitiesRequest message. Also converts values to other types if specified. - * @param message ListEntitiesRequest + * Creates a plain object from an AssetStatus message. Also converts values to other types if specified. + * @param message AssetStatus * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.ListEntitiesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.AssetStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListEntitiesRequest to JSON. + * Converts this AssetStatus to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace ListEntitiesRequest { + /** Properties of a Zone. */ + interface IZone { - /** EntityView enum. */ - enum EntityView { - ENTITY_VIEW_UNSPECIFIED = 0, - TABLES = 1, - FILESETS = 2 - } - } + /** Zone name */ + name?: (string|null); - /** Properties of a ListEntitiesResponse. */ - interface IListEntitiesResponse { + /** Zone displayName */ + displayName?: (string|null); - /** ListEntitiesResponse entities */ - entities?: (google.cloud.dataplex.v1.IEntity[]|null); + /** Zone uid */ + uid?: (string|null); - /** ListEntitiesResponse nextPageToken */ - nextPageToken?: (string|null); - } + /** Zone createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** Represents a ListEntitiesResponse. */ - class ListEntitiesResponse implements IListEntitiesResponse { + /** Zone updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); - /** - * Constructs a new ListEntitiesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListEntitiesResponse); + /** Zone labels */ + labels?: ({ [k: string]: string }|null); - /** ListEntitiesResponse entities. */ - public entities: google.cloud.dataplex.v1.IEntity[]; + /** Zone description */ + description?: (string|null); - /** ListEntitiesResponse nextPageToken. */ - public nextPageToken: string; + /** Zone state */ + state?: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State|null); - /** - * Creates a new ListEntitiesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListEntitiesResponse instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListEntitiesResponse): google.cloud.dataplex.v1.ListEntitiesResponse; + /** Zone type */ + type?: (google.cloud.dataplex.v1.Zone.Type|keyof typeof google.cloud.dataplex.v1.Zone.Type|null); - /** - * Encodes the specified ListEntitiesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesResponse.verify|verify} messages. - * @param message ListEntitiesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListEntitiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** Zone discoverySpec */ + discoverySpec?: (google.cloud.dataplex.v1.Zone.IDiscoverySpec|null); - /** - * Encodes the specified ListEntitiesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesResponse.verify|verify} messages. - * @param message ListEntitiesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListEntitiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** Zone resourceSpec */ + resourceSpec?: (google.cloud.dataplex.v1.Zone.IResourceSpec|null); - /** - * Decodes a ListEntitiesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListEntitiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListEntitiesResponse; + /** Zone assetStatus */ + assetStatus?: (google.cloud.dataplex.v1.IAssetStatus|null); + } - /** - * Decodes a ListEntitiesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListEntitiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListEntitiesResponse; + /** Represents a Zone. */ + class Zone implements IZone { /** - * Verifies a ListEntitiesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Constructs a new Zone. + * @param [properties] Properties to set */ - public static verify(message: { [k: string]: any }): (string|null); + constructor(properties?: google.cloud.dataplex.v1.IZone); - /** - * Creates a ListEntitiesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListEntitiesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListEntitiesResponse; + /** Zone name. */ + public name: string; - /** - * Creates a plain object from a ListEntitiesResponse message. Also converts values to other types if specified. - * @param message ListEntitiesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListEntitiesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Zone displayName. */ + public displayName: string; - /** - * Converts this ListEntitiesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Zone uid. */ + public uid: string; - /** Properties of a GetEntityRequest. */ - interface IGetEntityRequest { + /** Zone createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** GetEntityRequest name */ - name?: (string|null); + /** Zone updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** GetEntityRequest view */ - view?: (google.cloud.dataplex.v1.GetEntityRequest.EntityView|keyof typeof google.cloud.dataplex.v1.GetEntityRequest.EntityView|null); - } + /** Zone labels. */ + public labels: { [k: string]: string }; - /** Represents a GetEntityRequest. */ - class GetEntityRequest implements IGetEntityRequest { + /** Zone description. */ + public description: string; - /** - * Constructs a new GetEntityRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IGetEntityRequest); + /** Zone state. */ + public state: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State); - /** GetEntityRequest name. */ - public name: string; + /** Zone type. */ + public type: (google.cloud.dataplex.v1.Zone.Type|keyof typeof google.cloud.dataplex.v1.Zone.Type); - /** GetEntityRequest view. */ - public view: (google.cloud.dataplex.v1.GetEntityRequest.EntityView|keyof typeof google.cloud.dataplex.v1.GetEntityRequest.EntityView); + /** Zone discoverySpec. */ + public discoverySpec?: (google.cloud.dataplex.v1.Zone.IDiscoverySpec|null); + + /** Zone resourceSpec. */ + public resourceSpec?: (google.cloud.dataplex.v1.Zone.IResourceSpec|null); + + /** Zone assetStatus. */ + public assetStatus?: (google.cloud.dataplex.v1.IAssetStatus|null); /** - * Creates a new GetEntityRequest instance using the specified properties. + * Creates a new Zone instance using the specified properties. * @param [properties] Properties to set - * @returns GetEntityRequest instance + * @returns Zone instance */ - public static create(properties?: google.cloud.dataplex.v1.IGetEntityRequest): google.cloud.dataplex.v1.GetEntityRequest; + public static create(properties?: google.cloud.dataplex.v1.IZone): google.cloud.dataplex.v1.Zone; /** - * Encodes the specified GetEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetEntityRequest.verify|verify} messages. - * @param message GetEntityRequest message or plain object to encode + * Encodes the specified Zone message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.verify|verify} messages. + * @param message Zone message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IGetEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IZone, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetEntityRequest.verify|verify} messages. - * @param message GetEntityRequest message or plain object to encode + * Encodes the specified Zone message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.verify|verify} messages. + * @param message Zone message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IGetEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IZone, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetEntityRequest message from the specified reader or buffer. + * Decodes a Zone message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetEntityRequest + * @returns Zone * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetEntityRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Zone; /** - * Decodes a GetEntityRequest message from the specified reader or buffer, length delimited. + * Decodes a Zone message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetEntityRequest + * @returns Zone * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetEntityRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Zone; /** - * Verifies a GetEntityRequest message. + * Verifies a Zone message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetEntityRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Zone message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetEntityRequest + * @returns Zone */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetEntityRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Zone; /** - * Creates a plain object from a GetEntityRequest message. Also converts values to other types if specified. - * @param message GetEntityRequest + * Creates a plain object from a Zone message. Also converts values to other types if specified. + * @param message Zone * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.GetEntityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.Zone, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetEntityRequest to JSON. + * Converts this Zone to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace GetEntityRequest { + namespace Zone { - /** EntityView enum. */ - enum EntityView { - ENTITY_VIEW_UNSPECIFIED = 0, - BASIC = 1, - SCHEMA = 2, - FULL = 4 + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + RAW = 1, + CURATED = 2 } - } - /** Properties of a ListPartitionsRequest. */ - interface IListPartitionsRequest { - - /** ListPartitionsRequest parent */ - parent?: (string|null); + /** Properties of a ResourceSpec. */ + interface IResourceSpec { - /** ListPartitionsRequest pageSize */ - pageSize?: (number|null); + /** ResourceSpec locationType */ + locationType?: (google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType|keyof typeof google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType|null); + } - /** ListPartitionsRequest pageToken */ - pageToken?: (string|null); + /** Represents a ResourceSpec. */ + class ResourceSpec implements IResourceSpec { - /** ListPartitionsRequest filter */ - filter?: (string|null); - } + /** + * Constructs a new ResourceSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Zone.IResourceSpec); - /** Represents a ListPartitionsRequest. */ - class ListPartitionsRequest implements IListPartitionsRequest { + /** ResourceSpec locationType. */ + public locationType: (google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType|keyof typeof google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType); - /** - * Constructs a new ListPartitionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListPartitionsRequest); + /** + * Creates a new ResourceSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceSpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.Zone.IResourceSpec): google.cloud.dataplex.v1.Zone.ResourceSpec; - /** ListPartitionsRequest parent. */ - public parent: string; + /** + * Encodes the specified ResourceSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.ResourceSpec.verify|verify} messages. + * @param message ResourceSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Zone.IResourceSpec, writer?: $protobuf.Writer): $protobuf.Writer; - /** ListPartitionsRequest pageSize. */ - public pageSize: number; + /** + * Encodes the specified ResourceSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.ResourceSpec.verify|verify} messages. + * @param message ResourceSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Zone.IResourceSpec, writer?: $protobuf.Writer): $protobuf.Writer; - /** ListPartitionsRequest pageToken. */ - public pageToken: string; + /** + * Decodes a ResourceSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Zone.ResourceSpec; - /** ListPartitionsRequest filter. */ - public filter: string; + /** + * Decodes a ResourceSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Zone.ResourceSpec; - /** - * Creates a new ListPartitionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListPartitionsRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListPartitionsRequest): google.cloud.dataplex.v1.ListPartitionsRequest; + /** + * Verifies a ResourceSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Encodes the specified ListPartitionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsRequest.verify|verify} messages. - * @param message ListPartitionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListPartitionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a ResourceSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Zone.ResourceSpec; - /** - * Encodes the specified ListPartitionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsRequest.verify|verify} messages. - * @param message ListPartitionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListPartitionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from a ResourceSpec message. Also converts values to other types if specified. + * @param message ResourceSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Zone.ResourceSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes a ListPartitionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListPartitionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListPartitionsRequest; + /** + * Converts this ResourceSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Decodes a ListPartitionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListPartitionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListPartitionsRequest; + namespace ResourceSpec { - /** - * Verifies a ListPartitionsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** LocationType enum. */ + enum LocationType { + LOCATION_TYPE_UNSPECIFIED = 0, + SINGLE_REGION = 1, + MULTI_REGION = 2 + } + } - /** - * Creates a ListPartitionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListPartitionsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListPartitionsRequest; + /** Properties of a DiscoverySpec. */ + interface IDiscoverySpec { - /** - * Creates a plain object from a ListPartitionsRequest message. Also converts values to other types if specified. - * @param message ListPartitionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListPartitionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** DiscoverySpec enabled */ + enabled?: (boolean|null); - /** - * Converts this ListPartitionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** DiscoverySpec includePatterns */ + includePatterns?: (string[]|null); - /** Properties of a ListPartitionsResponse. */ - interface IListPartitionsResponse { + /** DiscoverySpec excludePatterns */ + excludePatterns?: (string[]|null); - /** ListPartitionsResponse partitions */ - partitions?: (google.cloud.dataplex.v1.IPartition[]|null); + /** DiscoverySpec csvOptions */ + csvOptions?: (google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions|null); - /** ListPartitionsResponse nextPageToken */ - nextPageToken?: (string|null); - } + /** DiscoverySpec jsonOptions */ + jsonOptions?: (google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions|null); - /** Represents a ListPartitionsResponse. */ - class ListPartitionsResponse implements IListPartitionsResponse { + /** DiscoverySpec schedule */ + schedule?: (string|null); + } - /** - * Constructs a new ListPartitionsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListPartitionsResponse); + /** Represents a DiscoverySpec. */ + class DiscoverySpec implements IDiscoverySpec { - /** ListPartitionsResponse partitions. */ - public partitions: google.cloud.dataplex.v1.IPartition[]; + /** + * Constructs a new DiscoverySpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Zone.IDiscoverySpec); - /** ListPartitionsResponse nextPageToken. */ - public nextPageToken: string; + /** DiscoverySpec enabled. */ + public enabled: boolean; - /** - * Creates a new ListPartitionsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListPartitionsResponse instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListPartitionsResponse): google.cloud.dataplex.v1.ListPartitionsResponse; + /** DiscoverySpec includePatterns. */ + public includePatterns: string[]; - /** - * Encodes the specified ListPartitionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsResponse.verify|verify} messages. - * @param message ListPartitionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListPartitionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** DiscoverySpec excludePatterns. */ + public excludePatterns: string[]; - /** - * Encodes the specified ListPartitionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsResponse.verify|verify} messages. - * @param message ListPartitionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListPartitionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** DiscoverySpec csvOptions. */ + public csvOptions?: (google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions|null); - /** - * Decodes a ListPartitionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListPartitionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListPartitionsResponse; + /** DiscoverySpec jsonOptions. */ + public jsonOptions?: (google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions|null); - /** - * Decodes a ListPartitionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListPartitionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListPartitionsResponse; + /** DiscoverySpec schedule. */ + public schedule?: (string|null); - /** - * Verifies a ListPartitionsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** DiscoverySpec trigger. */ + public trigger?: "schedule"; - /** - * Creates a ListPartitionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListPartitionsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListPartitionsResponse; - - /** - * Creates a plain object from a ListPartitionsResponse message. Also converts values to other types if specified. - * @param message ListPartitionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListPartitionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a new DiscoverySpec instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoverySpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.Zone.IDiscoverySpec): google.cloud.dataplex.v1.Zone.DiscoverySpec; - /** - * Converts this ListPartitionsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Encodes the specified DiscoverySpec message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.verify|verify} messages. + * @param message DiscoverySpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Zone.IDiscoverySpec, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a GetPartitionRequest. */ - interface IGetPartitionRequest { + /** + * Encodes the specified DiscoverySpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.verify|verify} messages. + * @param message DiscoverySpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Zone.IDiscoverySpec, writer?: $protobuf.Writer): $protobuf.Writer; - /** GetPartitionRequest name */ - name?: (string|null); - } + /** + * Decodes a DiscoverySpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoverySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Zone.DiscoverySpec; - /** Represents a GetPartitionRequest. */ - class GetPartitionRequest implements IGetPartitionRequest { + /** + * Decodes a DiscoverySpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoverySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Zone.DiscoverySpec; - /** - * Constructs a new GetPartitionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IGetPartitionRequest); + /** + * Verifies a DiscoverySpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** GetPartitionRequest name. */ - public name: string; + /** + * Creates a DiscoverySpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoverySpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Zone.DiscoverySpec; - /** - * Creates a new GetPartitionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetPartitionRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IGetPartitionRequest): google.cloud.dataplex.v1.GetPartitionRequest; + /** + * Creates a plain object from a DiscoverySpec message. Also converts values to other types if specified. + * @param message DiscoverySpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Zone.DiscoverySpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified GetPartitionRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetPartitionRequest.verify|verify} messages. - * @param message GetPartitionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IGetPartitionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this DiscoverySpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Encodes the specified GetPartitionRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetPartitionRequest.verify|verify} messages. - * @param message GetPartitionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IGetPartitionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + namespace DiscoverySpec { - /** - * Decodes a GetPartitionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetPartitionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetPartitionRequest; + /** Properties of a CsvOptions. */ + interface ICsvOptions { - /** - * Decodes a GetPartitionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetPartitionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetPartitionRequest; + /** CsvOptions headerRows */ + headerRows?: (number|null); - /** - * Verifies a GetPartitionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** CsvOptions delimiter */ + delimiter?: (string|null); - /** - * Creates a GetPartitionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetPartitionRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetPartitionRequest; + /** CsvOptions encoding */ + encoding?: (string|null); - /** - * Creates a plain object from a GetPartitionRequest message. Also converts values to other types if specified. - * @param message GetPartitionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.GetPartitionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** CsvOptions disableTypeInference */ + disableTypeInference?: (boolean|null); + } - /** - * Converts this GetPartitionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Represents a CsvOptions. */ + class CsvOptions implements ICsvOptions { - /** Properties of an Entity. */ - interface IEntity { + /** + * Constructs a new CsvOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions); - /** Entity name */ - name?: (string|null); + /** CsvOptions headerRows. */ + public headerRows: number; - /** Entity displayName */ - displayName?: (string|null); + /** CsvOptions delimiter. */ + public delimiter: string; - /** Entity description */ - description?: (string|null); + /** CsvOptions encoding. */ + public encoding: string; - /** Entity createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** CsvOptions disableTypeInference. */ + public disableTypeInference: boolean; - /** Entity updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** + * Creates a new CsvOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns CsvOptions instance + */ + public static create(properties?: google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions): google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions; - /** Entity id */ - id?: (string|null); + /** + * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.verify|verify} messages. + * @param message CsvOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** Entity etag */ - etag?: (string|null); + /** + * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.verify|verify} messages. + * @param message CsvOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** Entity type */ - type?: (google.cloud.dataplex.v1.Entity.Type|keyof typeof google.cloud.dataplex.v1.Entity.Type|null); + /** + * Decodes a CsvOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions; - /** Entity asset */ - asset?: (string|null); + /** + * Decodes a CsvOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions; - /** Entity dataPath */ - dataPath?: (string|null); + /** + * Verifies a CsvOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Entity dataPathPattern */ - dataPathPattern?: (string|null); + /** + * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CsvOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions; - /** Entity catalogEntry */ - catalogEntry?: (string|null); + /** + * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. + * @param message CsvOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Entity system */ - system?: (google.cloud.dataplex.v1.StorageSystem|keyof typeof google.cloud.dataplex.v1.StorageSystem|null); + /** + * Converts this CsvOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Entity format */ - format?: (google.cloud.dataplex.v1.IStorageFormat|null); + /** Properties of a JsonOptions. */ + interface IJsonOptions { - /** Entity compatibility */ - compatibility?: (google.cloud.dataplex.v1.Entity.ICompatibilityStatus|null); + /** JsonOptions encoding */ + encoding?: (string|null); - /** Entity schema */ - schema?: (google.cloud.dataplex.v1.ISchema|null); + /** JsonOptions disableTypeInference */ + disableTypeInference?: (boolean|null); + } + + /** Represents a JsonOptions. */ + class JsonOptions implements IJsonOptions { + + /** + * Constructs a new JsonOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions); + + /** JsonOptions encoding. */ + public encoding: string; + + /** JsonOptions disableTypeInference. */ + public disableTypeInference: boolean; + + /** + * Creates a new JsonOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns JsonOptions instance + */ + public static create(properties?: google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions): google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions; + + /** + * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.verify|verify} messages. + * @param message JsonOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.verify|verify} messages. + * @param message JsonOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JsonOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions; + + /** + * Decodes a JsonOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions; + + /** + * Verifies a JsonOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JsonOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions; + + /** + * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. + * @param message JsonOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JsonOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } } - /** Represents an Entity. */ - class Entity implements IEntity { + /** Properties of an Action. */ + interface IAction { + + /** Action category */ + category?: (google.cloud.dataplex.v1.Action.Category|keyof typeof google.cloud.dataplex.v1.Action.Category|null); + + /** Action issue */ + issue?: (string|null); + + /** Action detectTime */ + detectTime?: (google.protobuf.ITimestamp|null); + + /** Action name */ + name?: (string|null); + + /** Action lake */ + lake?: (string|null); + + /** Action zone */ + zone?: (string|null); + + /** Action asset */ + asset?: (string|null); + + /** Action dataLocations */ + dataLocations?: (string[]|null); + + /** Action invalidDataFormat */ + invalidDataFormat?: (google.cloud.dataplex.v1.Action.IInvalidDataFormat|null); + + /** Action incompatibleDataSchema */ + incompatibleDataSchema?: (google.cloud.dataplex.v1.Action.IIncompatibleDataSchema|null); + + /** Action invalidDataPartition */ + invalidDataPartition?: (google.cloud.dataplex.v1.Action.IInvalidDataPartition|null); + + /** Action missingData */ + missingData?: (google.cloud.dataplex.v1.Action.IMissingData|null); + + /** Action missingResource */ + missingResource?: (google.cloud.dataplex.v1.Action.IMissingResource|null); + + /** Action unauthorizedResource */ + unauthorizedResource?: (google.cloud.dataplex.v1.Action.IUnauthorizedResource|null); + + /** Action failedSecurityPolicyApply */ + failedSecurityPolicyApply?: (google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply|null); + + /** Action invalidDataOrganization */ + invalidDataOrganization?: (google.cloud.dataplex.v1.Action.IInvalidDataOrganization|null); + } + + /** Represents an Action. */ + class Action implements IAction { /** - * Constructs a new Entity. + * Constructs a new Action. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IEntity); + constructor(properties?: google.cloud.dataplex.v1.IAction); - /** Entity name. */ - public name: string; + /** Action category. */ + public category: (google.cloud.dataplex.v1.Action.Category|keyof typeof google.cloud.dataplex.v1.Action.Category); - /** Entity displayName. */ - public displayName: string; + /** Action issue. */ + public issue: string; - /** Entity description. */ - public description: string; + /** Action detectTime. */ + public detectTime?: (google.protobuf.ITimestamp|null); - /** Entity createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** Action name. */ + public name: string; - /** Entity updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** Action lake. */ + public lake: string; - /** Entity id. */ - public id: string; + /** Action zone. */ + public zone: string; - /** Entity etag. */ - public etag: string; + /** Action asset. */ + public asset: string; - /** Entity type. */ - public type: (google.cloud.dataplex.v1.Entity.Type|keyof typeof google.cloud.dataplex.v1.Entity.Type); + /** Action dataLocations. */ + public dataLocations: string[]; - /** Entity asset. */ - public asset: string; + /** Action invalidDataFormat. */ + public invalidDataFormat?: (google.cloud.dataplex.v1.Action.IInvalidDataFormat|null); - /** Entity dataPath. */ - public dataPath: string; + /** Action incompatibleDataSchema. */ + public incompatibleDataSchema?: (google.cloud.dataplex.v1.Action.IIncompatibleDataSchema|null); - /** Entity dataPathPattern. */ - public dataPathPattern: string; + /** Action invalidDataPartition. */ + public invalidDataPartition?: (google.cloud.dataplex.v1.Action.IInvalidDataPartition|null); - /** Entity catalogEntry. */ - public catalogEntry: string; + /** Action missingData. */ + public missingData?: (google.cloud.dataplex.v1.Action.IMissingData|null); - /** Entity system. */ - public system: (google.cloud.dataplex.v1.StorageSystem|keyof typeof google.cloud.dataplex.v1.StorageSystem); + /** Action missingResource. */ + public missingResource?: (google.cloud.dataplex.v1.Action.IMissingResource|null); - /** Entity format. */ - public format?: (google.cloud.dataplex.v1.IStorageFormat|null); + /** Action unauthorizedResource. */ + public unauthorizedResource?: (google.cloud.dataplex.v1.Action.IUnauthorizedResource|null); - /** Entity compatibility. */ - public compatibility?: (google.cloud.dataplex.v1.Entity.ICompatibilityStatus|null); + /** Action failedSecurityPolicyApply. */ + public failedSecurityPolicyApply?: (google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply|null); - /** Entity schema. */ - public schema?: (google.cloud.dataplex.v1.ISchema|null); + /** Action invalidDataOrganization. */ + public invalidDataOrganization?: (google.cloud.dataplex.v1.Action.IInvalidDataOrganization|null); + + /** Action details. */ + public details?: ("invalidDataFormat"|"incompatibleDataSchema"|"invalidDataPartition"|"missingData"|"missingResource"|"unauthorizedResource"|"failedSecurityPolicyApply"|"invalidDataOrganization"); /** - * Creates a new Entity instance using the specified properties. + * Creates a new Action instance using the specified properties. * @param [properties] Properties to set - * @returns Entity instance + * @returns Action instance */ - public static create(properties?: google.cloud.dataplex.v1.IEntity): google.cloud.dataplex.v1.Entity; + public static create(properties?: google.cloud.dataplex.v1.IAction): google.cloud.dataplex.v1.Action; /** - * Encodes the specified Entity message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.verify|verify} messages. - * @param message Entity message or plain object to encode + * Encodes the specified Action message. Does not implicitly {@link google.cloud.dataplex.v1.Action.verify|verify} messages. + * @param message Action message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IAction, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.verify|verify} messages. - * @param message Entity message or plain object to encode + * Encodes the specified Action message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.verify|verify} messages. + * @param message Action message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IAction, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Entity message from the specified reader or buffer. + * Decodes an Action message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Entity + * @returns Action * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Entity; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action; /** - * Decodes an Entity message from the specified reader or buffer, length delimited. + * Decodes an Action message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Entity + * @returns Action * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Entity; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action; /** - * Verifies an Entity message. + * Verifies an Action message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an Entity message from a plain object. Also converts values to their respective internal types. + * Creates an Action message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Entity + * @returns Action */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Entity; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action; /** - * Creates a plain object from an Entity message. Also converts values to other types if specified. - * @param message Entity + * Creates a plain object from an Action message. Also converts values to other types if specified. + * @param message Action * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.Entity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.Action, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Entity to JSON. + * Converts this Action to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Entity { + namespace Action { - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - TABLE = 1, - FILESET = 2 + /** Category enum. */ + enum Category { + CATEGORY_UNSPECIFIED = 0, + RESOURCE_MANAGEMENT = 1, + SECURITY_POLICY = 2, + DATA_DISCOVERY = 3 } - /** Properties of a CompatibilityStatus. */ - interface ICompatibilityStatus { - - /** CompatibilityStatus hiveMetastore */ - hiveMetastore?: (google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null); - - /** CompatibilityStatus bigquery */ - bigquery?: (google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null); + /** Properties of a MissingResource. */ + interface IMissingResource { } - /** Represents a CompatibilityStatus. */ - class CompatibilityStatus implements ICompatibilityStatus { + /** Represents a MissingResource. */ + class MissingResource implements IMissingResource { /** - * Constructs a new CompatibilityStatus. + * Constructs a new MissingResource. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.Entity.ICompatibilityStatus); - - /** CompatibilityStatus hiveMetastore. */ - public hiveMetastore?: (google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null); - - /** CompatibilityStatus bigquery. */ - public bigquery?: (google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null); + constructor(properties?: google.cloud.dataplex.v1.Action.IMissingResource); /** - * Creates a new CompatibilityStatus instance using the specified properties. + * Creates a new MissingResource instance using the specified properties. * @param [properties] Properties to set - * @returns CompatibilityStatus instance + * @returns MissingResource instance */ - public static create(properties?: google.cloud.dataplex.v1.Entity.ICompatibilityStatus): google.cloud.dataplex.v1.Entity.CompatibilityStatus; + public static create(properties?: google.cloud.dataplex.v1.Action.IMissingResource): google.cloud.dataplex.v1.Action.MissingResource; /** - * Encodes the specified CompatibilityStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify|verify} messages. - * @param message CompatibilityStatus message or plain object to encode + * Encodes the specified MissingResource message. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingResource.verify|verify} messages. + * @param message MissingResource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.Entity.ICompatibilityStatus, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.Action.IMissingResource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CompatibilityStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify|verify} messages. - * @param message CompatibilityStatus message or plain object to encode + * Encodes the specified MissingResource message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingResource.verify|verify} messages. + * @param message MissingResource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Entity.ICompatibilityStatus, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IMissingResource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CompatibilityStatus message from the specified reader or buffer. + * Decodes a MissingResource message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CompatibilityStatus + * @returns MissingResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Entity.CompatibilityStatus; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.MissingResource; /** - * Decodes a CompatibilityStatus message from the specified reader or buffer, length delimited. + * Decodes a MissingResource message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CompatibilityStatus + * @returns MissingResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Entity.CompatibilityStatus; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.MissingResource; /** - * Verifies a CompatibilityStatus message. + * Verifies a MissingResource message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CompatibilityStatus message from a plain object. Also converts values to their respective internal types. + * Creates a MissingResource message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CompatibilityStatus + * @returns MissingResource */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Entity.CompatibilityStatus; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.MissingResource; /** - * Creates a plain object from a CompatibilityStatus message. Also converts values to other types if specified. - * @param message CompatibilityStatus + * Creates a plain object from a MissingResource message. Also converts values to other types if specified. + * @param message MissingResource * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.Entity.CompatibilityStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.Action.MissingResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CompatibilityStatus to JSON. + * Converts this MissingResource to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace CompatibilityStatus { + /** Properties of an UnauthorizedResource. */ + interface IUnauthorizedResource { + } - /** Properties of a Compatibility. */ - interface ICompatibility { + /** Represents an UnauthorizedResource. */ + class UnauthorizedResource implements IUnauthorizedResource { - /** Compatibility compatible */ - compatible?: (boolean|null); + /** + * Constructs a new UnauthorizedResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Action.IUnauthorizedResource); - /** Compatibility reason */ - reason?: (string|null); - } + /** + * Creates a new UnauthorizedResource instance using the specified properties. + * @param [properties] Properties to set + * @returns UnauthorizedResource instance + */ + public static create(properties?: google.cloud.dataplex.v1.Action.IUnauthorizedResource): google.cloud.dataplex.v1.Action.UnauthorizedResource; - /** Represents a Compatibility. */ - class Compatibility implements ICompatibility { + /** + * Encodes the specified UnauthorizedResource message. Does not implicitly {@link google.cloud.dataplex.v1.Action.UnauthorizedResource.verify|verify} messages. + * @param message UnauthorizedResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Action.IUnauthorizedResource, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new Compatibility. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility); + /** + * Encodes the specified UnauthorizedResource message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.UnauthorizedResource.verify|verify} messages. + * @param message UnauthorizedResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IUnauthorizedResource, writer?: $protobuf.Writer): $protobuf.Writer; - /** Compatibility compatible. */ - public compatible: boolean; + /** + * Decodes an UnauthorizedResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UnauthorizedResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.UnauthorizedResource; - /** Compatibility reason. */ - public reason: string; + /** + * Decodes an UnauthorizedResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UnauthorizedResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.UnauthorizedResource; - /** - * Creates a new Compatibility instance using the specified properties. - * @param [properties] Properties to set - * @returns Compatibility instance - */ - public static create(properties?: google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility): google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility; + /** + * Verifies an UnauthorizedResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Encodes the specified Compatibility message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify|verify} messages. - * @param message Compatibility message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates an UnauthorizedResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UnauthorizedResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.UnauthorizedResource; - /** - * Encodes the specified Compatibility message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify|verify} messages. - * @param message Compatibility message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from an UnauthorizedResource message. Also converts values to other types if specified. + * @param message UnauthorizedResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Action.UnauthorizedResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes a Compatibility message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Compatibility - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility; + /** + * Converts this UnauthorizedResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Decodes a Compatibility message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Compatibility - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility; + /** Properties of a FailedSecurityPolicyApply. */ + interface IFailedSecurityPolicyApply { - /** - * Verifies a Compatibility message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** FailedSecurityPolicyApply asset */ + asset?: (string|null); + } - /** - * Creates a Compatibility message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Compatibility - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility; + /** Represents a FailedSecurityPolicyApply. */ + class FailedSecurityPolicyApply implements IFailedSecurityPolicyApply { - /** - * Creates a plain object from a Compatibility message. Also converts values to other types if specified. - * @param message Compatibility - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Constructs a new FailedSecurityPolicyApply. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply); - /** - * Converts this Compatibility to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } + /** FailedSecurityPolicyApply asset. */ + public asset: string; - /** Properties of a Partition. */ - interface IPartition { + /** + * Creates a new FailedSecurityPolicyApply instance using the specified properties. + * @param [properties] Properties to set + * @returns FailedSecurityPolicyApply instance + */ + public static create(properties?: google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply): google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply; - /** Partition name */ - name?: (string|null); + /** + * Encodes the specified FailedSecurityPolicyApply message. Does not implicitly {@link google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.verify|verify} messages. + * @param message FailedSecurityPolicyApply message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply, writer?: $protobuf.Writer): $protobuf.Writer; - /** Partition values */ - values?: (string[]|null); + /** + * Encodes the specified FailedSecurityPolicyApply message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.verify|verify} messages. + * @param message FailedSecurityPolicyApply message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply, writer?: $protobuf.Writer): $protobuf.Writer; - /** Partition location */ - location?: (string|null); + /** + * Decodes a FailedSecurityPolicyApply message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FailedSecurityPolicyApply + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply; - /** Partition etag */ - etag?: (string|null); - } + /** + * Decodes a FailedSecurityPolicyApply message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FailedSecurityPolicyApply + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply; - /** Represents a Partition. */ - class Partition implements IPartition { + /** + * Verifies a FailedSecurityPolicyApply message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Constructs a new Partition. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IPartition); + /** + * Creates a FailedSecurityPolicyApply message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FailedSecurityPolicyApply + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply; - /** Partition name. */ - public name: string; + /** + * Creates a plain object from a FailedSecurityPolicyApply message. Also converts values to other types if specified. + * @param message FailedSecurityPolicyApply + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Partition values. */ - public values: string[]; + /** + * Converts this FailedSecurityPolicyApply to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Partition location. */ - public location: string; + /** Properties of an InvalidDataFormat. */ + interface IInvalidDataFormat { - /** Partition etag. */ - public etag: string; + /** InvalidDataFormat sampledDataLocations */ + sampledDataLocations?: (string[]|null); - /** - * Creates a new Partition instance using the specified properties. - * @param [properties] Properties to set - * @returns Partition instance - */ - public static create(properties?: google.cloud.dataplex.v1.IPartition): google.cloud.dataplex.v1.Partition; + /** InvalidDataFormat expectedFormat */ + expectedFormat?: (string|null); - /** - * Encodes the specified Partition message. Does not implicitly {@link google.cloud.dataplex.v1.Partition.verify|verify} messages. - * @param message Partition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IPartition, writer?: $protobuf.Writer): $protobuf.Writer; + /** InvalidDataFormat newFormat */ + newFormat?: (string|null); + } - /** - * Encodes the specified Partition message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Partition.verify|verify} messages. - * @param message Partition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IPartition, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents an InvalidDataFormat. */ + class InvalidDataFormat implements IInvalidDataFormat { - /** - * Decodes a Partition message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Partition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Partition; + /** + * Constructs a new InvalidDataFormat. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Action.IInvalidDataFormat); - /** - * Decodes a Partition message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Partition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Partition; + /** InvalidDataFormat sampledDataLocations. */ + public sampledDataLocations: string[]; - /** - * Verifies a Partition message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** InvalidDataFormat expectedFormat. */ + public expectedFormat: string; - /** - * Creates a Partition message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Partition - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Partition; + /** InvalidDataFormat newFormat. */ + public newFormat: string; - /** - * Creates a plain object from a Partition message. Also converts values to other types if specified. - * @param message Partition - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Partition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a new InvalidDataFormat instance using the specified properties. + * @param [properties] Properties to set + * @returns InvalidDataFormat instance + */ + public static create(properties?: google.cloud.dataplex.v1.Action.IInvalidDataFormat): google.cloud.dataplex.v1.Action.InvalidDataFormat; - /** - * Converts this Partition to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Encodes the specified InvalidDataFormat message. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataFormat.verify|verify} messages. + * @param message InvalidDataFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Action.IInvalidDataFormat, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a Schema. */ - interface ISchema { + /** + * Encodes the specified InvalidDataFormat message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataFormat.verify|verify} messages. + * @param message InvalidDataFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IInvalidDataFormat, writer?: $protobuf.Writer): $protobuf.Writer; - /** Schema userManaged */ - userManaged?: (boolean|null); + /** + * Decodes an InvalidDataFormat message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InvalidDataFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.InvalidDataFormat; - /** Schema fields */ - fields?: (google.cloud.dataplex.v1.Schema.ISchemaField[]|null); + /** + * Decodes an InvalidDataFormat message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InvalidDataFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.InvalidDataFormat; - /** Schema partitionFields */ - partitionFields?: (google.cloud.dataplex.v1.Schema.IPartitionField[]|null); + /** + * Verifies an InvalidDataFormat message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Schema partitionStyle */ - partitionStyle?: (google.cloud.dataplex.v1.Schema.PartitionStyle|keyof typeof google.cloud.dataplex.v1.Schema.PartitionStyle|null); - } - - /** Represents a Schema. */ - class Schema implements ISchema { - - /** - * Constructs a new Schema. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.ISchema); - - /** Schema userManaged. */ - public userManaged: boolean; - - /** Schema fields. */ - public fields: google.cloud.dataplex.v1.Schema.ISchemaField[]; - - /** Schema partitionFields. */ - public partitionFields: google.cloud.dataplex.v1.Schema.IPartitionField[]; - - /** Schema partitionStyle. */ - public partitionStyle: (google.cloud.dataplex.v1.Schema.PartitionStyle|keyof typeof google.cloud.dataplex.v1.Schema.PartitionStyle); - - /** - * Creates a new Schema instance using the specified properties. - * @param [properties] Properties to set - * @returns Schema instance - */ - public static create(properties?: google.cloud.dataplex.v1.ISchema): google.cloud.dataplex.v1.Schema; - - /** - * Encodes the specified Schema message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.verify|verify} messages. - * @param message Schema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.ISchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Schema message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.verify|verify} messages. - * @param message Schema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ISchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Schema message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Schema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Schema; - - /** - * Decodes a Schema message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Schema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Schema; - - /** - * Verifies a Schema message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Schema message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Schema - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Schema; - - /** - * Creates a plain object from a Schema message. Also converts values to other types if specified. - * @param message Schema - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Schema, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Schema to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace Schema { + /** + * Creates an InvalidDataFormat message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InvalidDataFormat + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.InvalidDataFormat; - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - BOOLEAN = 1, - BYTE = 2, - INT16 = 3, - INT32 = 4, - INT64 = 5, - FLOAT = 6, - DOUBLE = 7, - DECIMAL = 8, - STRING = 9, - BINARY = 10, - TIMESTAMP = 11, - DATE = 12, - TIME = 13, - RECORD = 14, - NULL = 100 - } + /** + * Creates a plain object from an InvalidDataFormat message. Also converts values to other types if specified. + * @param message InvalidDataFormat + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Action.InvalidDataFormat, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Mode enum. */ - enum Mode { - MODE_UNSPECIFIED = 0, - REQUIRED = 1, - NULLABLE = 2, - REPEATED = 3 + /** + * Converts this InvalidDataFormat to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } - /** Properties of a SchemaField. */ - interface ISchemaField { + /** Properties of an IncompatibleDataSchema. */ + interface IIncompatibleDataSchema { - /** SchemaField name */ - name?: (string|null); + /** IncompatibleDataSchema table */ + table?: (string|null); - /** SchemaField description */ - description?: (string|null); + /** IncompatibleDataSchema existingSchema */ + existingSchema?: (string|null); - /** SchemaField type */ - type?: (google.cloud.dataplex.v1.Schema.Type|keyof typeof google.cloud.dataplex.v1.Schema.Type|null); + /** IncompatibleDataSchema newSchema */ + newSchema?: (string|null); - /** SchemaField mode */ - mode?: (google.cloud.dataplex.v1.Schema.Mode|keyof typeof google.cloud.dataplex.v1.Schema.Mode|null); + /** IncompatibleDataSchema sampledDataLocations */ + sampledDataLocations?: (string[]|null); - /** SchemaField fields */ - fields?: (google.cloud.dataplex.v1.Schema.ISchemaField[]|null); + /** IncompatibleDataSchema schemaChange */ + schemaChange?: (google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange|keyof typeof google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange|null); } - /** Represents a SchemaField. */ - class SchemaField implements ISchemaField { + /** Represents an IncompatibleDataSchema. */ + class IncompatibleDataSchema implements IIncompatibleDataSchema { /** - * Constructs a new SchemaField. + * Constructs a new IncompatibleDataSchema. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.Schema.ISchemaField); + constructor(properties?: google.cloud.dataplex.v1.Action.IIncompatibleDataSchema); - /** SchemaField name. */ - public name: string; + /** IncompatibleDataSchema table. */ + public table: string; - /** SchemaField description. */ - public description: string; + /** IncompatibleDataSchema existingSchema. */ + public existingSchema: string; - /** SchemaField type. */ - public type: (google.cloud.dataplex.v1.Schema.Type|keyof typeof google.cloud.dataplex.v1.Schema.Type); + /** IncompatibleDataSchema newSchema. */ + public newSchema: string; - /** SchemaField mode. */ - public mode: (google.cloud.dataplex.v1.Schema.Mode|keyof typeof google.cloud.dataplex.v1.Schema.Mode); + /** IncompatibleDataSchema sampledDataLocations. */ + public sampledDataLocations: string[]; - /** SchemaField fields. */ - public fields: google.cloud.dataplex.v1.Schema.ISchemaField[]; + /** IncompatibleDataSchema schemaChange. */ + public schemaChange: (google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange|keyof typeof google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange); /** - * Creates a new SchemaField instance using the specified properties. + * Creates a new IncompatibleDataSchema instance using the specified properties. * @param [properties] Properties to set - * @returns SchemaField instance + * @returns IncompatibleDataSchema instance */ - public static create(properties?: google.cloud.dataplex.v1.Schema.ISchemaField): google.cloud.dataplex.v1.Schema.SchemaField; + public static create(properties?: google.cloud.dataplex.v1.Action.IIncompatibleDataSchema): google.cloud.dataplex.v1.Action.IncompatibleDataSchema; /** - * Encodes the specified SchemaField message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.SchemaField.verify|verify} messages. - * @param message SchemaField message or plain object to encode + * Encodes the specified IncompatibleDataSchema message. Does not implicitly {@link google.cloud.dataplex.v1.Action.IncompatibleDataSchema.verify|verify} messages. + * @param message IncompatibleDataSchema message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.Schema.ISchemaField, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.Action.IIncompatibleDataSchema, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SchemaField message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.SchemaField.verify|verify} messages. - * @param message SchemaField message or plain object to encode + * Encodes the specified IncompatibleDataSchema message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.IncompatibleDataSchema.verify|verify} messages. + * @param message IncompatibleDataSchema message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Schema.ISchemaField, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IIncompatibleDataSchema, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SchemaField message from the specified reader or buffer. + * Decodes an IncompatibleDataSchema message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SchemaField + * @returns IncompatibleDataSchema * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Schema.SchemaField; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.IncompatibleDataSchema; /** - * Decodes a SchemaField message from the specified reader or buffer, length delimited. + * Decodes an IncompatibleDataSchema message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SchemaField + * @returns IncompatibleDataSchema * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Schema.SchemaField; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.IncompatibleDataSchema; /** - * Verifies a SchemaField message. + * Verifies an IncompatibleDataSchema message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SchemaField message from a plain object. Also converts values to their respective internal types. + * Creates an IncompatibleDataSchema message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SchemaField + * @returns IncompatibleDataSchema */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Schema.SchemaField; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.IncompatibleDataSchema; /** - * Creates a plain object from a SchemaField message. Also converts values to other types if specified. - * @param message SchemaField + * Creates a plain object from an IncompatibleDataSchema message. Also converts values to other types if specified. + * @param message IncompatibleDataSchema * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.Schema.SchemaField, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.Action.IncompatibleDataSchema, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SchemaField to JSON. + * Converts this IncompatibleDataSchema to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a PartitionField. */ - interface IPartitionField { - - /** PartitionField name */ - name?: (string|null); + namespace IncompatibleDataSchema { - /** PartitionField type */ - type?: (google.cloud.dataplex.v1.Schema.Type|keyof typeof google.cloud.dataplex.v1.Schema.Type|null); + /** SchemaChange enum. */ + enum SchemaChange { + SCHEMA_CHANGE_UNSPECIFIED = 0, + INCOMPATIBLE = 1, + MODIFIED = 2 + } } - /** Represents a PartitionField. */ - class PartitionField implements IPartitionField { + /** Properties of an InvalidDataPartition. */ + interface IInvalidDataPartition { - /** - * Constructs a new PartitionField. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Schema.IPartitionField); + /** InvalidDataPartition expectedStructure */ + expectedStructure?: (google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure|keyof typeof google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure|null); + } - /** PartitionField name. */ - public name: string; + /** Represents an InvalidDataPartition. */ + class InvalidDataPartition implements IInvalidDataPartition { - /** PartitionField type. */ - public type: (google.cloud.dataplex.v1.Schema.Type|keyof typeof google.cloud.dataplex.v1.Schema.Type); + /** + * Constructs a new InvalidDataPartition. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Action.IInvalidDataPartition); + + /** InvalidDataPartition expectedStructure. */ + public expectedStructure: (google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure|keyof typeof google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure); /** - * Creates a new PartitionField instance using the specified properties. + * Creates a new InvalidDataPartition instance using the specified properties. * @param [properties] Properties to set - * @returns PartitionField instance + * @returns InvalidDataPartition instance */ - public static create(properties?: google.cloud.dataplex.v1.Schema.IPartitionField): google.cloud.dataplex.v1.Schema.PartitionField; + public static create(properties?: google.cloud.dataplex.v1.Action.IInvalidDataPartition): google.cloud.dataplex.v1.Action.InvalidDataPartition; /** - * Encodes the specified PartitionField message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.PartitionField.verify|verify} messages. - * @param message PartitionField message or plain object to encode + * Encodes the specified InvalidDataPartition message. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataPartition.verify|verify} messages. + * @param message InvalidDataPartition message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.Schema.IPartitionField, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.Action.IInvalidDataPartition, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PartitionField message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.PartitionField.verify|verify} messages. - * @param message PartitionField message or plain object to encode + * Encodes the specified InvalidDataPartition message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataPartition.verify|verify} messages. + * @param message InvalidDataPartition message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Schema.IPartitionField, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IInvalidDataPartition, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PartitionField message from the specified reader or buffer. + * Decodes an InvalidDataPartition message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PartitionField + * @returns InvalidDataPartition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Schema.PartitionField; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.InvalidDataPartition; /** - * Decodes a PartitionField message from the specified reader or buffer, length delimited. + * Decodes an InvalidDataPartition message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PartitionField + * @returns InvalidDataPartition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Schema.PartitionField; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.InvalidDataPartition; /** - * Verifies a PartitionField message. + * Verifies an InvalidDataPartition message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PartitionField message from a plain object. Also converts values to their respective internal types. + * Creates an InvalidDataPartition message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PartitionField + * @returns InvalidDataPartition */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Schema.PartitionField; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.InvalidDataPartition; /** - * Creates a plain object from a PartitionField message. Also converts values to other types if specified. - * @param message PartitionField + * Creates a plain object from an InvalidDataPartition message. Also converts values to other types if specified. + * @param message InvalidDataPartition * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.Schema.PartitionField, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.Action.InvalidDataPartition, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PartitionField to JSON. + * Converts this InvalidDataPartition to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** PartitionStyle enum. */ - enum PartitionStyle { - PARTITION_STYLE_UNSPECIFIED = 0, - HIVE_COMPATIBLE = 1 - } - } - - /** Properties of a StorageFormat. */ - interface IStorageFormat { - - /** StorageFormat format */ - format?: (google.cloud.dataplex.v1.StorageFormat.Format|keyof typeof google.cloud.dataplex.v1.StorageFormat.Format|null); - - /** StorageFormat compressionFormat */ - compressionFormat?: (google.cloud.dataplex.v1.StorageFormat.CompressionFormat|keyof typeof google.cloud.dataplex.v1.StorageFormat.CompressionFormat|null); - - /** StorageFormat mimeType */ - mimeType?: (string|null); - - /** StorageFormat csv */ - csv?: (google.cloud.dataplex.v1.StorageFormat.ICsvOptions|null); - - /** StorageFormat json */ - json?: (google.cloud.dataplex.v1.StorageFormat.IJsonOptions|null); - } - - /** Represents a StorageFormat. */ - class StorageFormat implements IStorageFormat { - - /** - * Constructs a new StorageFormat. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IStorageFormat); - - /** StorageFormat format. */ - public format: (google.cloud.dataplex.v1.StorageFormat.Format|keyof typeof google.cloud.dataplex.v1.StorageFormat.Format); - - /** StorageFormat compressionFormat. */ - public compressionFormat: (google.cloud.dataplex.v1.StorageFormat.CompressionFormat|keyof typeof google.cloud.dataplex.v1.StorageFormat.CompressionFormat); - - /** StorageFormat mimeType. */ - public mimeType: string; - - /** StorageFormat csv. */ - public csv?: (google.cloud.dataplex.v1.StorageFormat.ICsvOptions|null); - - /** StorageFormat json. */ - public json?: (google.cloud.dataplex.v1.StorageFormat.IJsonOptions|null); - - /** StorageFormat options. */ - public options?: ("csv"|"json"); - - /** - * Creates a new StorageFormat instance using the specified properties. - * @param [properties] Properties to set - * @returns StorageFormat instance - */ - public static create(properties?: google.cloud.dataplex.v1.IStorageFormat): google.cloud.dataplex.v1.StorageFormat; - - /** - * Encodes the specified StorageFormat message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.verify|verify} messages. - * @param message StorageFormat message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IStorageFormat, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StorageFormat message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.verify|verify} messages. - * @param message StorageFormat message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IStorageFormat, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StorageFormat message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StorageFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.StorageFormat; - - /** - * Decodes a StorageFormat message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StorageFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.StorageFormat; - - /** - * Verifies a StorageFormat message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StorageFormat message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StorageFormat - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.StorageFormat; - - /** - * Creates a plain object from a StorageFormat message. Also converts values to other types if specified. - * @param message StorageFormat - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.StorageFormat, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StorageFormat to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace StorageFormat { - - /** Properties of a CsvOptions. */ - interface ICsvOptions { - - /** CsvOptions encoding */ - encoding?: (string|null); - - /** CsvOptions headerRows */ - headerRows?: (number|null); + namespace InvalidDataPartition { - /** CsvOptions delimiter */ - delimiter?: (string|null); + /** PartitionStructure enum. */ + enum PartitionStructure { + PARTITION_STRUCTURE_UNSPECIFIED = 0, + CONSISTENT_KEYS = 1, + HIVE_STYLE_KEYS = 2 + } + } - /** CsvOptions quote */ - quote?: (string|null); + /** Properties of a MissingData. */ + interface IMissingData { } - /** Represents a CsvOptions. */ - class CsvOptions implements ICsvOptions { + /** Represents a MissingData. */ + class MissingData implements IMissingData { /** - * Constructs a new CsvOptions. + * Constructs a new MissingData. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.StorageFormat.ICsvOptions); - - /** CsvOptions encoding. */ - public encoding: string; - - /** CsvOptions headerRows. */ - public headerRows: number; - - /** CsvOptions delimiter. */ - public delimiter: string; - - /** CsvOptions quote. */ - public quote: string; + constructor(properties?: google.cloud.dataplex.v1.Action.IMissingData); /** - * Creates a new CsvOptions instance using the specified properties. + * Creates a new MissingData instance using the specified properties. * @param [properties] Properties to set - * @returns CsvOptions instance + * @returns MissingData instance */ - public static create(properties?: google.cloud.dataplex.v1.StorageFormat.ICsvOptions): google.cloud.dataplex.v1.StorageFormat.CsvOptions; + public static create(properties?: google.cloud.dataplex.v1.Action.IMissingData): google.cloud.dataplex.v1.Action.MissingData; /** - * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify|verify} messages. - * @param message CsvOptions message or plain object to encode + * Encodes the specified MissingData message. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingData.verify|verify} messages. + * @param message MissingData message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.StorageFormat.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.Action.IMissingData, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify|verify} messages. - * @param message CsvOptions message or plain object to encode + * Encodes the specified MissingData message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingData.verify|verify} messages. + * @param message MissingData message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.StorageFormat.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IMissingData, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CsvOptions message from the specified reader or buffer. + * Decodes a MissingData message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CsvOptions + * @returns MissingData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.StorageFormat.CsvOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.MissingData; /** - * Decodes a CsvOptions message from the specified reader or buffer, length delimited. + * Decodes a MissingData message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CsvOptions + * @returns MissingData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.StorageFormat.CsvOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.MissingData; /** - * Verifies a CsvOptions message. + * Verifies a MissingData message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. + * Creates a MissingData message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CsvOptions + * @returns MissingData */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.StorageFormat.CsvOptions; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.MissingData; /** - * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. - * @param message CsvOptions + * Creates a plain object from a MissingData message. Also converts values to other types if specified. + * @param message MissingData * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.StorageFormat.CsvOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.Action.MissingData, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CsvOptions to JSON. + * Converts this MissingData to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a JsonOptions. */ - interface IJsonOptions { - - /** JsonOptions encoding */ - encoding?: (string|null); + /** Properties of an InvalidDataOrganization. */ + interface IInvalidDataOrganization { } - /** Represents a JsonOptions. */ - class JsonOptions implements IJsonOptions { + /** Represents an InvalidDataOrganization. */ + class InvalidDataOrganization implements IInvalidDataOrganization { /** - * Constructs a new JsonOptions. + * Constructs a new InvalidDataOrganization. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.StorageFormat.IJsonOptions); - - /** JsonOptions encoding. */ - public encoding: string; + constructor(properties?: google.cloud.dataplex.v1.Action.IInvalidDataOrganization); /** - * Creates a new JsonOptions instance using the specified properties. + * Creates a new InvalidDataOrganization instance using the specified properties. * @param [properties] Properties to set - * @returns JsonOptions instance + * @returns InvalidDataOrganization instance */ - public static create(properties?: google.cloud.dataplex.v1.StorageFormat.IJsonOptions): google.cloud.dataplex.v1.StorageFormat.JsonOptions; + public static create(properties?: google.cloud.dataplex.v1.Action.IInvalidDataOrganization): google.cloud.dataplex.v1.Action.InvalidDataOrganization; /** - * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify|verify} messages. - * @param message JsonOptions message or plain object to encode + * Encodes the specified InvalidDataOrganization message. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataOrganization.verify|verify} messages. + * @param message InvalidDataOrganization message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.StorageFormat.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.Action.IInvalidDataOrganization, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify|verify} messages. - * @param message JsonOptions message or plain object to encode + * Encodes the specified InvalidDataOrganization message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataOrganization.verify|verify} messages. + * @param message InvalidDataOrganization message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.StorageFormat.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IInvalidDataOrganization, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a JsonOptions message from the specified reader or buffer. + * Decodes an InvalidDataOrganization message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns JsonOptions + * @returns InvalidDataOrganization * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.StorageFormat.JsonOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.InvalidDataOrganization; /** - * Decodes a JsonOptions message from the specified reader or buffer, length delimited. + * Decodes an InvalidDataOrganization message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns JsonOptions + * @returns InvalidDataOrganization * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.StorageFormat.JsonOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.InvalidDataOrganization; /** - * Verifies a JsonOptions message. + * Verifies an InvalidDataOrganization message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. + * Creates an InvalidDataOrganization message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns JsonOptions + * @returns InvalidDataOrganization */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.StorageFormat.JsonOptions; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.InvalidDataOrganization; /** - * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. - * @param message JsonOptions + * Creates a plain object from an InvalidDataOrganization message. Also converts values to other types if specified. + * @param message InvalidDataOrganization * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.StorageFormat.JsonOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.Action.InvalidDataOrganization, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this JsonOptions to JSON. + * Converts this InvalidDataOrganization to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - - /** Format enum. */ - enum Format { - FORMAT_UNSPECIFIED = 0, - PARQUET = 1, - AVRO = 2, - ORC = 3, - CSV = 100, - JSON = 101, - IMAGE = 200, - AUDIO = 201, - VIDEO = 202, - TEXT = 203, - TFRECORD = 204, - OTHER = 1000, - UNKNOWN = 1001 - } - - /** CompressionFormat enum. */ - enum CompressionFormat { - COMPRESSION_FORMAT_UNSPECIFIED = 0, - GZIP = 2, - BZIP2 = 3 - } - } - - /** StorageSystem enum. */ - enum StorageSystem { - STORAGE_SYSTEM_UNSPECIFIED = 0, - CLOUD_STORAGE = 1, - BIGQUERY = 2 } - /** Properties of a Lake. */ - interface ILake { + /** Properties of an Asset. */ + interface IAsset { - /** Lake name */ + /** Asset name */ name?: (string|null); - /** Lake displayName */ + /** Asset displayName */ displayName?: (string|null); - /** Lake uid */ + /** Asset uid */ uid?: (string|null); - /** Lake createTime */ + /** Asset createTime */ createTime?: (google.protobuf.ITimestamp|null); - /** Lake updateTime */ + /** Asset updateTime */ updateTime?: (google.protobuf.ITimestamp|null); - /** Lake labels */ + /** Asset labels */ labels?: ({ [k: string]: string }|null); - /** Lake description */ + /** Asset description */ description?: (string|null); - /** Lake state */ - state?: (google.cloud.dataplex.v1.Lake.MetastoreStatus.State|keyof typeof google.cloud.dataplex.v1.Lake.MetastoreStatus.State|null); + /** Asset state */ + state?: (google.cloud.dataplex.v1.Asset.SecurityStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.SecurityStatus.State|null); - /** Lake serviceAccount */ - serviceAccount?: (string|null); + /** Asset resourceSpec */ + resourceSpec?: (google.cloud.dataplex.v1.Asset.IResourceSpec|null); - /** Lake metastore */ - metastore?: (google.cloud.dataplex.v1.Lake.IMetastore|null); + /** Asset resourceStatus */ + resourceStatus?: (google.cloud.dataplex.v1.Asset.IResourceStatus|null); - /** Lake assetStatus */ - assetStatus?: (google.cloud.dataplex.v1.IAssetStatus|null); + /** Asset securityStatus */ + securityStatus?: (google.cloud.dataplex.v1.Asset.ISecurityStatus|null); - /** Lake metastoreStatus */ - metastoreStatus?: (google.cloud.dataplex.v1.Lake.IMetastoreStatus|null); + /** Asset discoverySpec */ + discoverySpec?: (google.cloud.dataplex.v1.Asset.IDiscoverySpec|null); + + /** Asset discoveryStatus */ + discoveryStatus?: (google.cloud.dataplex.v1.Asset.IDiscoveryStatus|null); } - /** Represents a Lake. */ - class Lake implements ILake { + /** Represents an Asset. */ + class Asset implements IAsset { /** - * Constructs a new Lake. + * Constructs a new Asset. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.ILake); + constructor(properties?: google.cloud.dataplex.v1.IAsset); - /** Lake name. */ + /** Asset name. */ public name: string; - /** Lake displayName. */ + /** Asset displayName. */ public displayName: string; - /** Lake uid. */ + /** Asset uid. */ public uid: string; - /** Lake createTime. */ + /** Asset createTime. */ public createTime?: (google.protobuf.ITimestamp|null); - /** Lake updateTime. */ + /** Asset updateTime. */ public updateTime?: (google.protobuf.ITimestamp|null); - /** Lake labels. */ + /** Asset labels. */ public labels: { [k: string]: string }; - /** Lake description. */ + /** Asset description. */ public description: string; - /** Lake state. */ - public state: (google.cloud.dataplex.v1.Lake.MetastoreStatus.State|keyof typeof google.cloud.dataplex.v1.Lake.MetastoreStatus.State); + /** Asset state. */ + public state: (google.cloud.dataplex.v1.Asset.SecurityStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.SecurityStatus.State); - /** Lake serviceAccount. */ - public serviceAccount: string; + /** Asset resourceSpec. */ + public resourceSpec?: (google.cloud.dataplex.v1.Asset.IResourceSpec|null); - /** Lake metastore. */ - public metastore?: (google.cloud.dataplex.v1.Lake.IMetastore|null); + /** Asset resourceStatus. */ + public resourceStatus?: (google.cloud.dataplex.v1.Asset.IResourceStatus|null); - /** Lake assetStatus. */ - public assetStatus?: (google.cloud.dataplex.v1.IAssetStatus|null); + /** Asset securityStatus. */ + public securityStatus?: (google.cloud.dataplex.v1.Asset.ISecurityStatus|null); - /** Lake metastoreStatus. */ - public metastoreStatus?: (google.cloud.dataplex.v1.Lake.IMetastoreStatus|null); + /** Asset discoverySpec. */ + public discoverySpec?: (google.cloud.dataplex.v1.Asset.IDiscoverySpec|null); + + /** Asset discoveryStatus. */ + public discoveryStatus?: (google.cloud.dataplex.v1.Asset.IDiscoveryStatus|null); /** - * Creates a new Lake instance using the specified properties. + * Creates a new Asset instance using the specified properties. * @param [properties] Properties to set - * @returns Lake instance + * @returns Asset instance */ - public static create(properties?: google.cloud.dataplex.v1.ILake): google.cloud.dataplex.v1.Lake; + public static create(properties?: google.cloud.dataplex.v1.IAsset): google.cloud.dataplex.v1.Asset; /** - * Encodes the specified Lake message. Does not implicitly {@link google.cloud.dataplex.v1.Lake.verify|verify} messages. - * @param message Lake message or plain object to encode + * Encodes the specified Asset message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.verify|verify} messages. + * @param message Asset message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.ILake, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IAsset, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Lake message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Lake.verify|verify} messages. - * @param message Lake message or plain object to encode + * Encodes the specified Asset message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.verify|verify} messages. + * @param message Asset message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ILake, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IAsset, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Lake message from the specified reader or buffer. + * Decodes an Asset message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Lake + * @returns Asset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Lake; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset; /** - * Decodes a Lake message from the specified reader or buffer, length delimited. + * Decodes an Asset message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Lake + * @returns Asset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Lake; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset; /** - * Verifies a Lake message. + * Verifies an Asset message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Lake message from a plain object. Also converts values to their respective internal types. + * Creates an Asset message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Lake + * @returns Asset */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Lake; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset; /** - * Creates a plain object from a Lake message. Also converts values to other types if specified. - * @param message Lake + * Creates a plain object from an Asset message. Also converts values to other types if specified. + * @param message Asset * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.Lake, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.Asset, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Lake to JSON. + * Converts this Asset to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Lake { + namespace Asset { - /** Properties of a Metastore. */ - interface IMetastore { + /** Properties of a SecurityStatus. */ + interface ISecurityStatus { - /** Metastore service */ - service?: (string|null); + /** SecurityStatus state */ + state?: (google.cloud.dataplex.v1.Asset.SecurityStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.SecurityStatus.State|null); + + /** SecurityStatus message */ + message?: (string|null); + + /** SecurityStatus updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); } - /** Represents a Metastore. */ - class Metastore implements IMetastore { + /** Represents a SecurityStatus. */ + class SecurityStatus implements ISecurityStatus { /** - * Constructs a new Metastore. + * Constructs a new SecurityStatus. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.Lake.IMetastore); + constructor(properties?: google.cloud.dataplex.v1.Asset.ISecurityStatus); - /** Metastore service. */ - public service: string; + /** SecurityStatus state. */ + public state: (google.cloud.dataplex.v1.Asset.SecurityStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.SecurityStatus.State); + + /** SecurityStatus message. */ + public message: string; + + /** SecurityStatus updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new Metastore instance using the specified properties. + * Creates a new SecurityStatus instance using the specified properties. * @param [properties] Properties to set - * @returns Metastore instance + * @returns SecurityStatus instance */ - public static create(properties?: google.cloud.dataplex.v1.Lake.IMetastore): google.cloud.dataplex.v1.Lake.Metastore; + public static create(properties?: google.cloud.dataplex.v1.Asset.ISecurityStatus): google.cloud.dataplex.v1.Asset.SecurityStatus; /** - * Encodes the specified Metastore message. Does not implicitly {@link google.cloud.dataplex.v1.Lake.Metastore.verify|verify} messages. - * @param message Metastore message or plain object to encode + * Encodes the specified SecurityStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.SecurityStatus.verify|verify} messages. + * @param message SecurityStatus message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.Lake.IMetastore, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.Asset.ISecurityStatus, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Metastore message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Lake.Metastore.verify|verify} messages. - * @param message Metastore message or plain object to encode + * Encodes the specified SecurityStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.SecurityStatus.verify|verify} messages. + * @param message SecurityStatus message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Lake.IMetastore, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.ISecurityStatus, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Metastore message from the specified reader or buffer. + * Decodes a SecurityStatus message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Metastore + * @returns SecurityStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Lake.Metastore; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.SecurityStatus; /** - * Decodes a Metastore message from the specified reader or buffer, length delimited. + * Decodes a SecurityStatus message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Metastore + * @returns SecurityStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Lake.Metastore; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.SecurityStatus; /** - * Verifies a Metastore message. + * Verifies a SecurityStatus message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Metastore message from a plain object. Also converts values to their respective internal types. + * Creates a SecurityStatus message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Metastore + * @returns SecurityStatus */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Lake.Metastore; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.SecurityStatus; /** - * Creates a plain object from a Metastore message. Also converts values to other types if specified. - * @param message Metastore + * Creates a plain object from a SecurityStatus message. Also converts values to other types if specified. + * @param message SecurityStatus * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.Lake.Metastore, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.Asset.SecurityStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Metastore to JSON. + * Converts this SecurityStatus to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a MetastoreStatus. */ - interface IMetastoreStatus { + namespace SecurityStatus { - /** MetastoreStatus state */ - state?: (google.cloud.dataplex.v1.Lake.MetastoreStatus.State|keyof typeof google.cloud.dataplex.v1.Lake.MetastoreStatus.State|null); + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + READY = 1, + APPLYING = 2, + ERROR = 3 + } + } - /** MetastoreStatus message */ - message?: (string|null); + /** Properties of a DiscoverySpec. */ + interface IDiscoverySpec { - /** MetastoreStatus updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** DiscoverySpec enabled */ + enabled?: (boolean|null); - /** MetastoreStatus endpoint */ - endpoint?: (string|null); + /** DiscoverySpec includePatterns */ + includePatterns?: (string[]|null); + + /** DiscoverySpec excludePatterns */ + excludePatterns?: (string[]|null); + + /** DiscoverySpec csvOptions */ + csvOptions?: (google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions|null); + + /** DiscoverySpec jsonOptions */ + jsonOptions?: (google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions|null); + + /** DiscoverySpec schedule */ + schedule?: (string|null); } - /** Represents a MetastoreStatus. */ - class MetastoreStatus implements IMetastoreStatus { + /** Represents a DiscoverySpec. */ + class DiscoverySpec implements IDiscoverySpec { /** - * Constructs a new MetastoreStatus. + * Constructs a new DiscoverySpec. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.Lake.IMetastoreStatus); + constructor(properties?: google.cloud.dataplex.v1.Asset.IDiscoverySpec); - /** MetastoreStatus state. */ - public state: (google.cloud.dataplex.v1.Lake.MetastoreStatus.State|keyof typeof google.cloud.dataplex.v1.Lake.MetastoreStatus.State); + /** DiscoverySpec enabled. */ + public enabled: boolean; - /** MetastoreStatus message. */ - public message: string; + /** DiscoverySpec includePatterns. */ + public includePatterns: string[]; - /** MetastoreStatus updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** DiscoverySpec excludePatterns. */ + public excludePatterns: string[]; - /** MetastoreStatus endpoint. */ - public endpoint: string; + /** DiscoverySpec csvOptions. */ + public csvOptions?: (google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions|null); + + /** DiscoverySpec jsonOptions. */ + public jsonOptions?: (google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions|null); + + /** DiscoverySpec schedule. */ + public schedule?: (string|null); + + /** DiscoverySpec trigger. */ + public trigger?: "schedule"; /** - * Creates a new MetastoreStatus instance using the specified properties. + * Creates a new DiscoverySpec instance using the specified properties. * @param [properties] Properties to set - * @returns MetastoreStatus instance + * @returns DiscoverySpec instance */ - public static create(properties?: google.cloud.dataplex.v1.Lake.IMetastoreStatus): google.cloud.dataplex.v1.Lake.MetastoreStatus; + public static create(properties?: google.cloud.dataplex.v1.Asset.IDiscoverySpec): google.cloud.dataplex.v1.Asset.DiscoverySpec; /** - * Encodes the specified MetastoreStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Lake.MetastoreStatus.verify|verify} messages. - * @param message MetastoreStatus message or plain object to encode + * Encodes the specified DiscoverySpec message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.verify|verify} messages. + * @param message DiscoverySpec message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.Lake.IMetastoreStatus, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.Asset.IDiscoverySpec, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MetastoreStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Lake.MetastoreStatus.verify|verify} messages. - * @param message MetastoreStatus message or plain object to encode + * Encodes the specified DiscoverySpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.verify|verify} messages. + * @param message DiscoverySpec message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Lake.IMetastoreStatus, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.IDiscoverySpec, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MetastoreStatus message from the specified reader or buffer. + * Decodes a DiscoverySpec message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MetastoreStatus + * @returns DiscoverySpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Lake.MetastoreStatus; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.DiscoverySpec; /** - * Decodes a MetastoreStatus message from the specified reader or buffer, length delimited. + * Decodes a DiscoverySpec message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MetastoreStatus + * @returns DiscoverySpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Lake.MetastoreStatus; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.DiscoverySpec; /** - * Verifies a MetastoreStatus message. + * Verifies a DiscoverySpec message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MetastoreStatus message from a plain object. Also converts values to their respective internal types. + * Creates a DiscoverySpec message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MetastoreStatus + * @returns DiscoverySpec */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Lake.MetastoreStatus; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.DiscoverySpec; /** - * Creates a plain object from a MetastoreStatus message. Also converts values to other types if specified. - * @param message MetastoreStatus + * Creates a plain object from a DiscoverySpec message. Also converts values to other types if specified. + * @param message DiscoverySpec * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.Lake.MetastoreStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.Asset.DiscoverySpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MetastoreStatus to JSON. + * Converts this DiscoverySpec to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace MetastoreStatus { + namespace DiscoverySpec { - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - NONE = 1, - READY = 2, - UPDATING = 3, - ERROR = 4 - } - } - } + /** Properties of a CsvOptions. */ + interface ICsvOptions { - /** Properties of an AssetStatus. */ - interface IAssetStatus { + /** CsvOptions headerRows */ + headerRows?: (number|null); - /** AssetStatus updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** CsvOptions delimiter */ + delimiter?: (string|null); - /** AssetStatus activeAssets */ - activeAssets?: (number|null); + /** CsvOptions encoding */ + encoding?: (string|null); - /** AssetStatus securityPolicyApplyingAssets */ - securityPolicyApplyingAssets?: (number|null); - } + /** CsvOptions disableTypeInference */ + disableTypeInference?: (boolean|null); + } - /** Represents an AssetStatus. */ - class AssetStatus implements IAssetStatus { + /** Represents a CsvOptions. */ + class CsvOptions implements ICsvOptions { - /** - * Constructs a new AssetStatus. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IAssetStatus); + /** + * Constructs a new CsvOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions); - /** AssetStatus updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** CsvOptions headerRows. */ + public headerRows: number; - /** AssetStatus activeAssets. */ - public activeAssets: number; + /** CsvOptions delimiter. */ + public delimiter: string; - /** AssetStatus securityPolicyApplyingAssets. */ - public securityPolicyApplyingAssets: number; + /** CsvOptions encoding. */ + public encoding: string; - /** - * Creates a new AssetStatus instance using the specified properties. - * @param [properties] Properties to set - * @returns AssetStatus instance - */ - public static create(properties?: google.cloud.dataplex.v1.IAssetStatus): google.cloud.dataplex.v1.AssetStatus; + /** CsvOptions disableTypeInference. */ + public disableTypeInference: boolean; - /** - * Encodes the specified AssetStatus message. Does not implicitly {@link google.cloud.dataplex.v1.AssetStatus.verify|verify} messages. - * @param message AssetStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IAssetStatus, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new CsvOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns CsvOptions instance + */ + public static create(properties?: google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions): google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions; - /** - * Encodes the specified AssetStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AssetStatus.verify|verify} messages. - * @param message AssetStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IAssetStatus, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.verify|verify} messages. + * @param message CsvOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes an AssetStatus message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AssetStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.AssetStatus; + /** + * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.verify|verify} messages. + * @param message CsvOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes an AssetStatus message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AssetStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.AssetStatus; + /** + * Decodes a CsvOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions; - /** - * Verifies an AssetStatus message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a CsvOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions; - /** - * Creates an AssetStatus message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AssetStatus - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.AssetStatus; + /** + * Verifies a CsvOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a plain object from an AssetStatus message. Also converts values to other types if specified. - * @param message AssetStatus - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.AssetStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CsvOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions; - /** - * Converts this AssetStatus to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. + * @param message CsvOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of a Zone. */ - interface IZone { + /** + * Converts this CsvOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Zone name */ - name?: (string|null); + /** Properties of a JsonOptions. */ + interface IJsonOptions { - /** Zone displayName */ - displayName?: (string|null); + /** JsonOptions encoding */ + encoding?: (string|null); - /** Zone uid */ - uid?: (string|null); + /** JsonOptions disableTypeInference */ + disableTypeInference?: (boolean|null); + } - /** Zone createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** Represents a JsonOptions. */ + class JsonOptions implements IJsonOptions { - /** Zone updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** + * Constructs a new JsonOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions); - /** Zone labels */ - labels?: ({ [k: string]: string }|null); + /** JsonOptions encoding. */ + public encoding: string; - /** Zone description */ - description?: (string|null); + /** JsonOptions disableTypeInference. */ + public disableTypeInference: boolean; - /** Zone state */ - state?: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State|null); + /** + * Creates a new JsonOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns JsonOptions instance + */ + public static create(properties?: google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions): google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions; - /** Zone type */ - type?: (google.cloud.dataplex.v1.Zone.Type|keyof typeof google.cloud.dataplex.v1.Zone.Type|null); + /** + * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.verify|verify} messages. + * @param message JsonOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** Zone discoverySpec */ - discoverySpec?: (google.cloud.dataplex.v1.Zone.IDiscoverySpec|null); + /** + * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.verify|verify} messages. + * @param message JsonOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** Zone resourceSpec */ - resourceSpec?: (google.cloud.dataplex.v1.Zone.IResourceSpec|null); + /** + * Decodes a JsonOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions; - /** Zone assetStatus */ - assetStatus?: (google.cloud.dataplex.v1.IAssetStatus|null); - } + /** + * Decodes a JsonOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions; - /** Represents a Zone. */ - class Zone implements IZone { + /** + * Verifies a JsonOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Constructs a new Zone. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IZone); + /** + * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JsonOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions; - /** Zone name. */ - public name: string; + /** + * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. + * @param message JsonOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Zone displayName. */ - public displayName: string; + /** + * Converts this JsonOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** Zone uid. */ - public uid: string; + /** Properties of a ResourceSpec. */ + interface IResourceSpec { - /** Zone createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** ResourceSpec name */ + name?: (string|null); - /** Zone updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** ResourceSpec type */ + type?: (google.cloud.dataplex.v1.Asset.ResourceSpec.Type|keyof typeof google.cloud.dataplex.v1.Asset.ResourceSpec.Type|null); + } - /** Zone labels. */ - public labels: { [k: string]: string }; - - /** Zone description. */ - public description: string; - - /** Zone state. */ - public state: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State); - - /** Zone type. */ - public type: (google.cloud.dataplex.v1.Zone.Type|keyof typeof google.cloud.dataplex.v1.Zone.Type); - - /** Zone discoverySpec. */ - public discoverySpec?: (google.cloud.dataplex.v1.Zone.IDiscoverySpec|null); - - /** Zone resourceSpec. */ - public resourceSpec?: (google.cloud.dataplex.v1.Zone.IResourceSpec|null); - - /** Zone assetStatus. */ - public assetStatus?: (google.cloud.dataplex.v1.IAssetStatus|null); - - /** - * Creates a new Zone instance using the specified properties. - * @param [properties] Properties to set - * @returns Zone instance - */ - public static create(properties?: google.cloud.dataplex.v1.IZone): google.cloud.dataplex.v1.Zone; - - /** - * Encodes the specified Zone message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.verify|verify} messages. - * @param message Zone message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IZone, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Zone message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.verify|verify} messages. - * @param message Zone message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IZone, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Zone message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Zone - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Zone; - - /** - * Decodes a Zone message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Zone - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Zone; - - /** - * Verifies a Zone message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Zone message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Zone - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Zone; - - /** - * Creates a plain object from a Zone message. Also converts values to other types if specified. - * @param message Zone - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Zone, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Zone to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace Zone { - - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - RAW = 1, - CURATED = 2 - } - - /** Properties of a ResourceSpec. */ - interface IResourceSpec { - - /** ResourceSpec locationType */ - locationType?: (google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType|keyof typeof google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType|null); - } - - /** Represents a ResourceSpec. */ - class ResourceSpec implements IResourceSpec { + /** Represents a ResourceSpec. */ + class ResourceSpec implements IResourceSpec { /** * Constructs a new ResourceSpec. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.Zone.IResourceSpec); + constructor(properties?: google.cloud.dataplex.v1.Asset.IResourceSpec); - /** ResourceSpec locationType. */ - public locationType: (google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType|keyof typeof google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType); + /** ResourceSpec name. */ + public name: string; + + /** ResourceSpec type. */ + public type: (google.cloud.dataplex.v1.Asset.ResourceSpec.Type|keyof typeof google.cloud.dataplex.v1.Asset.ResourceSpec.Type); /** * Creates a new ResourceSpec instance using the specified properties. * @param [properties] Properties to set * @returns ResourceSpec instance */ - public static create(properties?: google.cloud.dataplex.v1.Zone.IResourceSpec): google.cloud.dataplex.v1.Zone.ResourceSpec; + public static create(properties?: google.cloud.dataplex.v1.Asset.IResourceSpec): google.cloud.dataplex.v1.Asset.ResourceSpec; /** - * Encodes the specified ResourceSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.ResourceSpec.verify|verify} messages. + * Encodes the specified ResourceSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceSpec.verify|verify} messages. * @param message ResourceSpec message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.Zone.IResourceSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.Asset.IResourceSpec, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ResourceSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.ResourceSpec.verify|verify} messages. + * Encodes the specified ResourceSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceSpec.verify|verify} messages. * @param message ResourceSpec message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Zone.IResourceSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.IResourceSpec, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a ResourceSpec message from the specified reader or buffer. @@ -3606,7 +3917,7 @@ export namespace google { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Zone.ResourceSpec; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.ResourceSpec; /** * Decodes a ResourceSpec message from the specified reader or buffer, length delimited. @@ -3615,7 +3926,7 @@ export namespace google { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Zone.ResourceSpec; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.ResourceSpec; /** * Verifies a ResourceSpec message. @@ -3629,7 +3940,7 @@ export namespace google { * @param object Plain object * @returns ResourceSpec */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Zone.ResourceSpec; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.ResourceSpec; /** * Creates a plain object from a ResourceSpec message. Also converts values to other types if specified. @@ -3637,7 +3948,7 @@ export namespace google { * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.Zone.ResourceSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.Asset.ResourceSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this ResourceSpec to JSON. @@ -3648,6249 +3959,9407 @@ export namespace google { namespace ResourceSpec { - /** LocationType enum. */ - enum LocationType { - LOCATION_TYPE_UNSPECIFIED = 0, - SINGLE_REGION = 1, - MULTI_REGION = 2 + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + STORAGE_BUCKET = 1, + BIGQUERY_DATASET = 2 } } - /** Properties of a DiscoverySpec. */ - interface IDiscoverySpec { - - /** DiscoverySpec enabled */ - enabled?: (boolean|null); - - /** DiscoverySpec includePatterns */ - includePatterns?: (string[]|null); - - /** DiscoverySpec excludePatterns */ - excludePatterns?: (string[]|null); + /** Properties of a ResourceStatus. */ + interface IResourceStatus { - /** DiscoverySpec csvOptions */ - csvOptions?: (google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions|null); + /** ResourceStatus state */ + state?: (google.cloud.dataplex.v1.Asset.ResourceStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.ResourceStatus.State|null); - /** DiscoverySpec jsonOptions */ - jsonOptions?: (google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions|null); + /** ResourceStatus message */ + message?: (string|null); - /** DiscoverySpec schedule */ - schedule?: (string|null); + /** ResourceStatus updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); } - /** Represents a DiscoverySpec. */ - class DiscoverySpec implements IDiscoverySpec { + /** Represents a ResourceStatus. */ + class ResourceStatus implements IResourceStatus { /** - * Constructs a new DiscoverySpec. + * Constructs a new ResourceStatus. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.Zone.IDiscoverySpec); - - /** DiscoverySpec enabled. */ - public enabled: boolean; - - /** DiscoverySpec includePatterns. */ - public includePatterns: string[]; - - /** DiscoverySpec excludePatterns. */ - public excludePatterns: string[]; - - /** DiscoverySpec csvOptions. */ - public csvOptions?: (google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions|null); + constructor(properties?: google.cloud.dataplex.v1.Asset.IResourceStatus); - /** DiscoverySpec jsonOptions. */ - public jsonOptions?: (google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions|null); + /** ResourceStatus state. */ + public state: (google.cloud.dataplex.v1.Asset.ResourceStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.ResourceStatus.State); - /** DiscoverySpec schedule. */ - public schedule?: (string|null); + /** ResourceStatus message. */ + public message: string; - /** DiscoverySpec trigger. */ - public trigger?: "schedule"; + /** ResourceStatus updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new DiscoverySpec instance using the specified properties. + * Creates a new ResourceStatus instance using the specified properties. * @param [properties] Properties to set - * @returns DiscoverySpec instance + * @returns ResourceStatus instance */ - public static create(properties?: google.cloud.dataplex.v1.Zone.IDiscoverySpec): google.cloud.dataplex.v1.Zone.DiscoverySpec; + public static create(properties?: google.cloud.dataplex.v1.Asset.IResourceStatus): google.cloud.dataplex.v1.Asset.ResourceStatus; /** - * Encodes the specified DiscoverySpec message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.verify|verify} messages. - * @param message DiscoverySpec message or plain object to encode + * Encodes the specified ResourceStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceStatus.verify|verify} messages. + * @param message ResourceStatus message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.Zone.IDiscoverySpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.Asset.IResourceStatus, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DiscoverySpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.verify|verify} messages. - * @param message DiscoverySpec message or plain object to encode + * Encodes the specified ResourceStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceStatus.verify|verify} messages. + * @param message ResourceStatus message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Zone.IDiscoverySpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.IResourceStatus, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DiscoverySpec message from the specified reader or buffer. + * Decodes a ResourceStatus message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DiscoverySpec + * @returns ResourceStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Zone.DiscoverySpec; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.ResourceStatus; /** - * Decodes a DiscoverySpec message from the specified reader or buffer, length delimited. + * Decodes a ResourceStatus message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DiscoverySpec + * @returns ResourceStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Zone.DiscoverySpec; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.ResourceStatus; /** - * Verifies a DiscoverySpec message. + * Verifies a ResourceStatus message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DiscoverySpec message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceStatus message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DiscoverySpec + * @returns ResourceStatus */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Zone.DiscoverySpec; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.ResourceStatus; /** - * Creates a plain object from a DiscoverySpec message. Also converts values to other types if specified. - * @param message DiscoverySpec + * Creates a plain object from a ResourceStatus message. Also converts values to other types if specified. + * @param message ResourceStatus * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.Zone.DiscoverySpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.Asset.ResourceStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DiscoverySpec to JSON. + * Converts this ResourceStatus to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace DiscoverySpec { - - /** Properties of a CsvOptions. */ - interface ICsvOptions { - - /** CsvOptions headerRows */ - headerRows?: (number|null); + namespace ResourceStatus { - /** CsvOptions delimiter */ - delimiter?: (string|null); + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + READY = 1, + ERROR = 2 + } + } - /** CsvOptions encoding */ - encoding?: (string|null); + /** Properties of a DiscoveryStatus. */ + interface IDiscoveryStatus { - /** CsvOptions disableTypeInference */ - disableTypeInference?: (boolean|null); + /** DiscoveryStatus state */ + state?: (google.cloud.dataplex.v1.Asset.DiscoveryStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.DiscoveryStatus.State|null); + + /** DiscoveryStatus message */ + message?: (string|null); + + /** DiscoveryStatus updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** DiscoveryStatus lastRunTime */ + lastRunTime?: (google.protobuf.ITimestamp|null); + + /** DiscoveryStatus stats */ + stats?: (google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats|null); + + /** DiscoveryStatus lastRunDuration */ + lastRunDuration?: (google.protobuf.IDuration|null); + } + + /** Represents a DiscoveryStatus. */ + class DiscoveryStatus implements IDiscoveryStatus { + + /** + * Constructs a new DiscoveryStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Asset.IDiscoveryStatus); + + /** DiscoveryStatus state. */ + public state: (google.cloud.dataplex.v1.Asset.DiscoveryStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.DiscoveryStatus.State); + + /** DiscoveryStatus message. */ + public message: string; + + /** DiscoveryStatus updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** DiscoveryStatus lastRunTime. */ + public lastRunTime?: (google.protobuf.ITimestamp|null); + + /** DiscoveryStatus stats. */ + public stats?: (google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats|null); + + /** DiscoveryStatus lastRunDuration. */ + public lastRunDuration?: (google.protobuf.IDuration|null); + + /** + * Creates a new DiscoveryStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoveryStatus instance + */ + public static create(properties?: google.cloud.dataplex.v1.Asset.IDiscoveryStatus): google.cloud.dataplex.v1.Asset.DiscoveryStatus; + + /** + * Encodes the specified DiscoveryStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.verify|verify} messages. + * @param message DiscoveryStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Asset.IDiscoveryStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoveryStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.verify|verify} messages. + * @param message DiscoveryStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.IDiscoveryStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoveryStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoveryStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.DiscoveryStatus; + + /** + * Decodes a DiscoveryStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoveryStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.DiscoveryStatus; + + /** + * Verifies a DiscoveryStatus message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiscoveryStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoveryStatus + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.DiscoveryStatus; + + /** + * Creates a plain object from a DiscoveryStatus message. Also converts values to other types if specified. + * @param message DiscoveryStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Asset.DiscoveryStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoveryStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DiscoveryStatus { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + SCHEDULED = 1, + IN_PROGRESS = 2, + PAUSED = 3, + DISABLED = 5 } - /** Represents a CsvOptions. */ - class CsvOptions implements ICsvOptions { + /** Properties of a Stats. */ + interface IStats { + + /** Stats dataItems */ + dataItems?: (number|Long|string|null); + + /** Stats dataSize */ + dataSize?: (number|Long|string|null); + + /** Stats tables */ + tables?: (number|Long|string|null); + + /** Stats filesets */ + filesets?: (number|Long|string|null); + } + + /** Represents a Stats. */ + class Stats implements IStats { /** - * Constructs a new CsvOptions. + * Constructs a new Stats. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions); + constructor(properties?: google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats); - /** CsvOptions headerRows. */ - public headerRows: number; + /** Stats dataItems. */ + public dataItems: (number|Long|string); - /** CsvOptions delimiter. */ - public delimiter: string; + /** Stats dataSize. */ + public dataSize: (number|Long|string); - /** CsvOptions encoding. */ - public encoding: string; + /** Stats tables. */ + public tables: (number|Long|string); - /** CsvOptions disableTypeInference. */ - public disableTypeInference: boolean; + /** Stats filesets. */ + public filesets: (number|Long|string); /** - * Creates a new CsvOptions instance using the specified properties. + * Creates a new Stats instance using the specified properties. * @param [properties] Properties to set - * @returns CsvOptions instance + * @returns Stats instance */ - public static create(properties?: google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions): google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions; + public static create(properties?: google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats): google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats; /** - * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.verify|verify} messages. - * @param message CsvOptions message or plain object to encode + * Encodes the specified Stats message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.verify|verify} messages. + * @param message Stats message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.verify|verify} messages. - * @param message CsvOptions message or plain object to encode + * Encodes the specified Stats message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.verify|verify} messages. + * @param message Stats message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CsvOptions message from the specified reader or buffer. + * Decodes a Stats message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CsvOptions + * @returns Stats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats; /** - * Decodes a CsvOptions message from the specified reader or buffer, length delimited. + * Decodes a Stats message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CsvOptions + * @returns Stats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats; /** - * Verifies a CsvOptions message. + * Verifies a Stats message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. + * Creates a Stats message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CsvOptions + * @returns Stats */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats; /** - * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. - * @param message CsvOptions + * Creates a plain object from a Stats message. Also converts values to other types if specified. + * @param message Stats * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CsvOptions to JSON. + * Converts this Stats to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } + } + } - /** Properties of a JsonOptions. */ - interface IJsonOptions { + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + ACTIVE = 1, + CREATING = 2, + DELETING = 3, + ACTION_REQUIRED = 4 + } - /** JsonOptions encoding */ - encoding?: (string|null); + /** Represents a ContentService */ + class ContentService extends $protobuf.rpc.Service { - /** JsonOptions disableTypeInference */ - disableTypeInference?: (boolean|null); - } + /** + * Constructs a new ContentService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - /** Represents a JsonOptions. */ - class JsonOptions implements IJsonOptions { + /** + * Creates new ContentService service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): ContentService; - /** - * Constructs a new JsonOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions); - - /** JsonOptions encoding. */ - public encoding: string; - - /** JsonOptions disableTypeInference. */ - public disableTypeInference: boolean; + /** + * Calls CreateContent. + * @param request CreateContentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Content + */ + public createContent(request: google.cloud.dataplex.v1.ICreateContentRequest, callback: google.cloud.dataplex.v1.ContentService.CreateContentCallback): void; - /** - * Creates a new JsonOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns JsonOptions instance - */ - public static create(properties?: google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions): google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions; + /** + * Calls CreateContent. + * @param request CreateContentRequest message or plain object + * @returns Promise + */ + public createContent(request: google.cloud.dataplex.v1.ICreateContentRequest): Promise; - /** - * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.verify|verify} messages. - * @param message JsonOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Calls UpdateContent. + * @param request UpdateContentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Content + */ + public updateContent(request: google.cloud.dataplex.v1.IUpdateContentRequest, callback: google.cloud.dataplex.v1.ContentService.UpdateContentCallback): void; - /** - * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.verify|verify} messages. - * @param message JsonOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Calls UpdateContent. + * @param request UpdateContentRequest message or plain object + * @returns Promise + */ + public updateContent(request: google.cloud.dataplex.v1.IUpdateContentRequest): Promise; - /** - * Decodes a JsonOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns JsonOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions; + /** + * Calls DeleteContent. + * @param request DeleteContentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteContent(request: google.cloud.dataplex.v1.IDeleteContentRequest, callback: google.cloud.dataplex.v1.ContentService.DeleteContentCallback): void; - /** - * Decodes a JsonOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns JsonOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions; + /** + * Calls DeleteContent. + * @param request DeleteContentRequest message or plain object + * @returns Promise + */ + public deleteContent(request: google.cloud.dataplex.v1.IDeleteContentRequest): Promise; - /** - * Verifies a JsonOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Calls GetContent. + * @param request GetContentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Content + */ + public getContent(request: google.cloud.dataplex.v1.IGetContentRequest, callback: google.cloud.dataplex.v1.ContentService.GetContentCallback): void; - /** - * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns JsonOptions - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions; + /** + * Calls GetContent. + * @param request GetContentRequest message or plain object + * @returns Promise + */ + public getContent(request: google.cloud.dataplex.v1.IGetContentRequest): Promise; - /** - * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. - * @param message JsonOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Calls ListContent. + * @param request ListContentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListContentResponse + */ + public listContent(request: google.cloud.dataplex.v1.IListContentRequest, callback: google.cloud.dataplex.v1.ContentService.ListContentCallback): void; - /** - * Converts this JsonOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** + * Calls ListContent. + * @param request ListContentRequest message or plain object + * @returns Promise + */ + public listContent(request: google.cloud.dataplex.v1.IListContentRequest): Promise; } - /** Properties of an Action. */ - interface IAction { - - /** Action category */ - category?: (google.cloud.dataplex.v1.Action.Category|keyof typeof google.cloud.dataplex.v1.Action.Category|null); - - /** Action issue */ - issue?: (string|null); - - /** Action detectTime */ - detectTime?: (google.protobuf.ITimestamp|null); - - /** Action name */ - name?: (string|null); - - /** Action lake */ - lake?: (string|null); - - /** Action zone */ - zone?: (string|null); + namespace ContentService { - /** Action asset */ - asset?: (string|null); - - /** Action dataLocations */ - dataLocations?: (string[]|null); + /** + * Callback as used by {@link google.cloud.dataplex.v1.ContentService#createContent}. + * @param error Error, if any + * @param [response] Content + */ + type CreateContentCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Content) => void; - /** Action invalidDataFormat */ - invalidDataFormat?: (google.cloud.dataplex.v1.Action.IInvalidDataFormat|null); + /** + * Callback as used by {@link google.cloud.dataplex.v1.ContentService#updateContent}. + * @param error Error, if any + * @param [response] Content + */ + type UpdateContentCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Content) => void; - /** Action incompatibleDataSchema */ - incompatibleDataSchema?: (google.cloud.dataplex.v1.Action.IIncompatibleDataSchema|null); + /** + * Callback as used by {@link google.cloud.dataplex.v1.ContentService#deleteContent}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteContentCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - /** Action invalidDataPartition */ - invalidDataPartition?: (google.cloud.dataplex.v1.Action.IInvalidDataPartition|null); + /** + * Callback as used by {@link google.cloud.dataplex.v1.ContentService#getContent}. + * @param error Error, if any + * @param [response] Content + */ + type GetContentCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Content) => void; - /** Action missingData */ - missingData?: (google.cloud.dataplex.v1.Action.IMissingData|null); + /** + * Callback as used by {@link google.cloud.dataplex.v1.ContentService#listContent}. + * @param error Error, if any + * @param [response] ListContentResponse + */ + type ListContentCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListContentResponse) => void; + } - /** Action missingResource */ - missingResource?: (google.cloud.dataplex.v1.Action.IMissingResource|null); + /** Properties of a CreateContentRequest. */ + interface ICreateContentRequest { - /** Action unauthorizedResource */ - unauthorizedResource?: (google.cloud.dataplex.v1.Action.IUnauthorizedResource|null); + /** CreateContentRequest parent */ + parent?: (string|null); - /** Action failedSecurityPolicyApply */ - failedSecurityPolicyApply?: (google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply|null); + /** CreateContentRequest content */ + content?: (google.cloud.dataplex.v1.IContent|null); - /** Action invalidDataOrganization */ - invalidDataOrganization?: (google.cloud.dataplex.v1.Action.IInvalidDataOrganization|null); + /** CreateContentRequest validateOnly */ + validateOnly?: (boolean|null); } - /** Represents an Action. */ - class Action implements IAction { + /** Represents a CreateContentRequest. */ + class CreateContentRequest implements ICreateContentRequest { /** - * Constructs a new Action. + * Constructs a new CreateContentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IAction); - - /** Action category. */ - public category: (google.cloud.dataplex.v1.Action.Category|keyof typeof google.cloud.dataplex.v1.Action.Category); - - /** Action issue. */ - public issue: string; - - /** Action detectTime. */ - public detectTime?: (google.protobuf.ITimestamp|null); - - /** Action name. */ - public name: string; - - /** Action lake. */ - public lake: string; - - /** Action zone. */ - public zone: string; - - /** Action asset. */ - public asset: string; - - /** Action dataLocations. */ - public dataLocations: string[]; - - /** Action invalidDataFormat. */ - public invalidDataFormat?: (google.cloud.dataplex.v1.Action.IInvalidDataFormat|null); - - /** Action incompatibleDataSchema. */ - public incompatibleDataSchema?: (google.cloud.dataplex.v1.Action.IIncompatibleDataSchema|null); - - /** Action invalidDataPartition. */ - public invalidDataPartition?: (google.cloud.dataplex.v1.Action.IInvalidDataPartition|null); - - /** Action missingData. */ - public missingData?: (google.cloud.dataplex.v1.Action.IMissingData|null); + constructor(properties?: google.cloud.dataplex.v1.ICreateContentRequest); - /** Action missingResource. */ - public missingResource?: (google.cloud.dataplex.v1.Action.IMissingResource|null); - - /** Action unauthorizedResource. */ - public unauthorizedResource?: (google.cloud.dataplex.v1.Action.IUnauthorizedResource|null); - - /** Action failedSecurityPolicyApply. */ - public failedSecurityPolicyApply?: (google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply|null); + /** CreateContentRequest parent. */ + public parent: string; - /** Action invalidDataOrganization. */ - public invalidDataOrganization?: (google.cloud.dataplex.v1.Action.IInvalidDataOrganization|null); + /** CreateContentRequest content. */ + public content?: (google.cloud.dataplex.v1.IContent|null); - /** Action details. */ - public details?: ("invalidDataFormat"|"incompatibleDataSchema"|"invalidDataPartition"|"missingData"|"missingResource"|"unauthorizedResource"|"failedSecurityPolicyApply"|"invalidDataOrganization"); + /** CreateContentRequest validateOnly. */ + public validateOnly: boolean; /** - * Creates a new Action instance using the specified properties. + * Creates a new CreateContentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Action instance + * @returns CreateContentRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IAction): google.cloud.dataplex.v1.Action; + public static create(properties?: google.cloud.dataplex.v1.ICreateContentRequest): google.cloud.dataplex.v1.CreateContentRequest; /** - * Encodes the specified Action message. Does not implicitly {@link google.cloud.dataplex.v1.Action.verify|verify} messages. - * @param message Action message or plain object to encode + * Encodes the specified CreateContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateContentRequest.verify|verify} messages. + * @param message CreateContentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IAction, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.ICreateContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Action message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.verify|verify} messages. - * @param message Action message or plain object to encode + * Encodes the specified CreateContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateContentRequest.verify|verify} messages. + * @param message CreateContentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IAction, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Action message from the specified reader or buffer. + * Decodes a CreateContentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Action + * @returns CreateContentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateContentRequest; /** - * Decodes an Action message from the specified reader or buffer, length delimited. + * Decodes a CreateContentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Action + * @returns CreateContentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateContentRequest; /** - * Verifies an Action message. + * Verifies a CreateContentRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an Action message from a plain object. Also converts values to their respective internal types. + * Creates a CreateContentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Action + * @returns CreateContentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateContentRequest; /** - * Creates a plain object from an Action message. Also converts values to other types if specified. - * @param message Action + * Creates a plain object from a CreateContentRequest message. Also converts values to other types if specified. + * @param message CreateContentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.Action, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.CreateContentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Action to JSON. + * Converts this CreateContentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Action { + /** Properties of an UpdateContentRequest. */ + interface IUpdateContentRequest { - /** Category enum. */ - enum Category { - CATEGORY_UNSPECIFIED = 0, - RESOURCE_MANAGEMENT = 1, - SECURITY_POLICY = 2, - DATA_DISCOVERY = 3 - } + /** UpdateContentRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); - /** Properties of a MissingResource. */ - interface IMissingResource { - } + /** UpdateContentRequest content */ + content?: (google.cloud.dataplex.v1.IContent|null); - /** Represents a MissingResource. */ - class MissingResource implements IMissingResource { + /** UpdateContentRequest validateOnly */ + validateOnly?: (boolean|null); + } - /** - * Constructs a new MissingResource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Action.IMissingResource); + /** Represents an UpdateContentRequest. */ + class UpdateContentRequest implements IUpdateContentRequest { - /** - * Creates a new MissingResource instance using the specified properties. - * @param [properties] Properties to set - * @returns MissingResource instance - */ - public static create(properties?: google.cloud.dataplex.v1.Action.IMissingResource): google.cloud.dataplex.v1.Action.MissingResource; + /** + * Constructs a new UpdateContentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IUpdateContentRequest); - /** - * Encodes the specified MissingResource message. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingResource.verify|verify} messages. - * @param message MissingResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Action.IMissingResource, writer?: $protobuf.Writer): $protobuf.Writer; + /** UpdateContentRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** - * Encodes the specified MissingResource message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingResource.verify|verify} messages. - * @param message MissingResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IMissingResource, writer?: $protobuf.Writer): $protobuf.Writer; + /** UpdateContentRequest content. */ + public content?: (google.cloud.dataplex.v1.IContent|null); - /** - * Decodes a MissingResource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MissingResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.MissingResource; + /** UpdateContentRequest validateOnly. */ + public validateOnly: boolean; - /** - * Decodes a MissingResource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MissingResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.MissingResource; + /** + * Creates a new UpdateContentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateContentRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IUpdateContentRequest): google.cloud.dataplex.v1.UpdateContentRequest; - /** - * Verifies a MissingResource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified UpdateContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateContentRequest.verify|verify} messages. + * @param message UpdateContentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IUpdateContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a MissingResource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MissingResource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.MissingResource; + /** + * Encodes the specified UpdateContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateContentRequest.verify|verify} messages. + * @param message UpdateContentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from a MissingResource message. Also converts values to other types if specified. - * @param message MissingResource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Action.MissingResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes an UpdateContentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateContentRequest; - /** - * Converts this MissingResource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes an UpdateContentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateContentRequest; - /** Properties of an UnauthorizedResource. */ - interface IUnauthorizedResource { - } + /** + * Verifies an UpdateContentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Represents an UnauthorizedResource. */ - class UnauthorizedResource implements IUnauthorizedResource { + /** + * Creates an UpdateContentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateContentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateContentRequest; - /** - * Constructs a new UnauthorizedResource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Action.IUnauthorizedResource); + /** + * Creates a plain object from an UpdateContentRequest message. Also converts values to other types if specified. + * @param message UpdateContentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.UpdateContentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a new UnauthorizedResource instance using the specified properties. - * @param [properties] Properties to set - * @returns UnauthorizedResource instance - */ - public static create(properties?: google.cloud.dataplex.v1.Action.IUnauthorizedResource): google.cloud.dataplex.v1.Action.UnauthorizedResource; + /** + * Converts this UpdateContentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Encodes the specified UnauthorizedResource message. Does not implicitly {@link google.cloud.dataplex.v1.Action.UnauthorizedResource.verify|verify} messages. - * @param message UnauthorizedResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Action.IUnauthorizedResource, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of a DeleteContentRequest. */ + interface IDeleteContentRequest { - /** - * Encodes the specified UnauthorizedResource message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.UnauthorizedResource.verify|verify} messages. - * @param message UnauthorizedResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IUnauthorizedResource, writer?: $protobuf.Writer): $protobuf.Writer; + /** DeleteContentRequest name */ + name?: (string|null); + } - /** - * Decodes an UnauthorizedResource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UnauthorizedResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.UnauthorizedResource; + /** Represents a DeleteContentRequest. */ + class DeleteContentRequest implements IDeleteContentRequest { - /** - * Decodes an UnauthorizedResource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UnauthorizedResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.UnauthorizedResource; + /** + * Constructs a new DeleteContentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDeleteContentRequest); - /** - * Verifies an UnauthorizedResource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** DeleteContentRequest name. */ + public name: string; - /** - * Creates an UnauthorizedResource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UnauthorizedResource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.UnauthorizedResource; + /** + * Creates a new DeleteContentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteContentRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDeleteContentRequest): google.cloud.dataplex.v1.DeleteContentRequest; - /** - * Creates a plain object from an UnauthorizedResource message. Also converts values to other types if specified. - * @param message UnauthorizedResource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Action.UnauthorizedResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified DeleteContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteContentRequest.verify|verify} messages. + * @param message DeleteContentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDeleteContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this UnauthorizedResource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Encodes the specified DeleteContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteContentRequest.verify|verify} messages. + * @param message DeleteContentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a FailedSecurityPolicyApply. */ - interface IFailedSecurityPolicyApply { + /** + * Decodes a DeleteContentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteContentRequest; - /** FailedSecurityPolicyApply asset */ - asset?: (string|null); - } + /** + * Decodes a DeleteContentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteContentRequest; - /** Represents a FailedSecurityPolicyApply. */ - class FailedSecurityPolicyApply implements IFailedSecurityPolicyApply { + /** + * Verifies a DeleteContentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Constructs a new FailedSecurityPolicyApply. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply); + /** + * Creates a DeleteContentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteContentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteContentRequest; - /** FailedSecurityPolicyApply asset. */ - public asset: string; + /** + * Creates a plain object from a DeleteContentRequest message. Also converts values to other types if specified. + * @param message DeleteContentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DeleteContentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a new FailedSecurityPolicyApply instance using the specified properties. - * @param [properties] Properties to set - * @returns FailedSecurityPolicyApply instance - */ - public static create(properties?: google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply): google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply; + /** + * Converts this DeleteContentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Encodes the specified FailedSecurityPolicyApply message. Does not implicitly {@link google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.verify|verify} messages. - * @param message FailedSecurityPolicyApply message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of a ListContentRequest. */ + interface IListContentRequest { - /** - * Encodes the specified FailedSecurityPolicyApply message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.verify|verify} messages. - * @param message FailedSecurityPolicyApply message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListContentRequest parent */ + parent?: (string|null); - /** - * Decodes a FailedSecurityPolicyApply message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FailedSecurityPolicyApply - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply; + /** ListContentRequest pageSize */ + pageSize?: (number|null); - /** - * Decodes a FailedSecurityPolicyApply message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FailedSecurityPolicyApply - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply; + /** ListContentRequest pageToken */ + pageToken?: (string|null); - /** - * Verifies a FailedSecurityPolicyApply message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** ListContentRequest filter */ + filter?: (string|null); + } - /** - * Creates a FailedSecurityPolicyApply message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FailedSecurityPolicyApply - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply; + /** Represents a ListContentRequest. */ + class ListContentRequest implements IListContentRequest { - /** - * Creates a plain object from a FailedSecurityPolicyApply message. Also converts values to other types if specified. - * @param message FailedSecurityPolicyApply - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Constructs a new ListContentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListContentRequest); - /** - * Converts this FailedSecurityPolicyApply to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** ListContentRequest parent. */ + public parent: string; - /** Properties of an InvalidDataFormat. */ - interface IInvalidDataFormat { + /** ListContentRequest pageSize. */ + public pageSize: number; - /** InvalidDataFormat sampledDataLocations */ - sampledDataLocations?: (string[]|null); + /** ListContentRequest pageToken. */ + public pageToken: string; - /** InvalidDataFormat expectedFormat */ - expectedFormat?: (string|null); + /** ListContentRequest filter. */ + public filter: string; - /** InvalidDataFormat newFormat */ - newFormat?: (string|null); - } + /** + * Creates a new ListContentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListContentRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListContentRequest): google.cloud.dataplex.v1.ListContentRequest; - /** Represents an InvalidDataFormat. */ - class InvalidDataFormat implements IInvalidDataFormat { + /** + * Encodes the specified ListContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListContentRequest.verify|verify} messages. + * @param message ListContentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new InvalidDataFormat. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Action.IInvalidDataFormat); + /** + * Encodes the specified ListContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListContentRequest.verify|verify} messages. + * @param message ListContentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** InvalidDataFormat sampledDataLocations. */ - public sampledDataLocations: string[]; + /** + * Decodes a ListContentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListContentRequest; - /** InvalidDataFormat expectedFormat. */ - public expectedFormat: string; + /** + * Decodes a ListContentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListContentRequest; - /** InvalidDataFormat newFormat. */ - public newFormat: string; + /** + * Verifies a ListContentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a new InvalidDataFormat instance using the specified properties. - * @param [properties] Properties to set - * @returns InvalidDataFormat instance - */ - public static create(properties?: google.cloud.dataplex.v1.Action.IInvalidDataFormat): google.cloud.dataplex.v1.Action.InvalidDataFormat; + /** + * Creates a ListContentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListContentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListContentRequest; - /** - * Encodes the specified InvalidDataFormat message. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataFormat.verify|verify} messages. - * @param message InvalidDataFormat message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Action.IInvalidDataFormat, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from a ListContentRequest message. Also converts values to other types if specified. + * @param message ListContentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListContentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified InvalidDataFormat message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataFormat.verify|verify} messages. - * @param message InvalidDataFormat message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IInvalidDataFormat, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this ListContentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Decodes an InvalidDataFormat message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InvalidDataFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.InvalidDataFormat; + /** Properties of a ListContentResponse. */ + interface IListContentResponse { - /** - * Decodes an InvalidDataFormat message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InvalidDataFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.InvalidDataFormat; + /** ListContentResponse content */ + content?: (google.cloud.dataplex.v1.IContent[]|null); - /** - * Verifies an InvalidDataFormat message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** ListContentResponse nextPageToken */ + nextPageToken?: (string|null); + } - /** - * Creates an InvalidDataFormat message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InvalidDataFormat - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.InvalidDataFormat; + /** Represents a ListContentResponse. */ + class ListContentResponse implements IListContentResponse { - /** - * Creates a plain object from an InvalidDataFormat message. Also converts values to other types if specified. - * @param message InvalidDataFormat - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Action.InvalidDataFormat, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Constructs a new ListContentResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListContentResponse); - /** - * Converts this InvalidDataFormat to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** ListContentResponse content. */ + public content: google.cloud.dataplex.v1.IContent[]; - /** Properties of an IncompatibleDataSchema. */ - interface IIncompatibleDataSchema { + /** ListContentResponse nextPageToken. */ + public nextPageToken: string; - /** IncompatibleDataSchema table */ - table?: (string|null); + /** + * Creates a new ListContentResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListContentResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListContentResponse): google.cloud.dataplex.v1.ListContentResponse; - /** IncompatibleDataSchema existingSchema */ - existingSchema?: (string|null); + /** + * Encodes the specified ListContentResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListContentResponse.verify|verify} messages. + * @param message ListContentResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListContentResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** IncompatibleDataSchema newSchema */ - newSchema?: (string|null); + /** + * Encodes the specified ListContentResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListContentResponse.verify|verify} messages. + * @param message ListContentResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListContentResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** IncompatibleDataSchema sampledDataLocations */ - sampledDataLocations?: (string[]|null); + /** + * Decodes a ListContentResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListContentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListContentResponse; - /** IncompatibleDataSchema schemaChange */ - schemaChange?: (google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange|keyof typeof google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange|null); - } + /** + * Decodes a ListContentResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListContentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListContentResponse; - /** Represents an IncompatibleDataSchema. */ - class IncompatibleDataSchema implements IIncompatibleDataSchema { + /** + * Verifies a ListContentResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Constructs a new IncompatibleDataSchema. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Action.IIncompatibleDataSchema); + /** + * Creates a ListContentResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListContentResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListContentResponse; - /** IncompatibleDataSchema table. */ - public table: string; + /** + * Creates a plain object from a ListContentResponse message. Also converts values to other types if specified. + * @param message ListContentResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListContentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** IncompatibleDataSchema existingSchema. */ - public existingSchema: string; + /** + * Converts this ListContentResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** IncompatibleDataSchema newSchema. */ - public newSchema: string; + /** Properties of a GetContentRequest. */ + interface IGetContentRequest { - /** IncompatibleDataSchema sampledDataLocations. */ - public sampledDataLocations: string[]; + /** GetContentRequest name */ + name?: (string|null); - /** IncompatibleDataSchema schemaChange. */ - public schemaChange: (google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange|keyof typeof google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange); + /** GetContentRequest view */ + view?: (google.cloud.dataplex.v1.GetContentRequest.ContentView|keyof typeof google.cloud.dataplex.v1.GetContentRequest.ContentView|null); + } - /** - * Creates a new IncompatibleDataSchema instance using the specified properties. - * @param [properties] Properties to set - * @returns IncompatibleDataSchema instance - */ - public static create(properties?: google.cloud.dataplex.v1.Action.IIncompatibleDataSchema): google.cloud.dataplex.v1.Action.IncompatibleDataSchema; + /** Represents a GetContentRequest. */ + class GetContentRequest implements IGetContentRequest { - /** - * Encodes the specified IncompatibleDataSchema message. Does not implicitly {@link google.cloud.dataplex.v1.Action.IncompatibleDataSchema.verify|verify} messages. - * @param message IncompatibleDataSchema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Action.IIncompatibleDataSchema, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new GetContentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGetContentRequest); - /** - * Encodes the specified IncompatibleDataSchema message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.IncompatibleDataSchema.verify|verify} messages. - * @param message IncompatibleDataSchema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IIncompatibleDataSchema, writer?: $protobuf.Writer): $protobuf.Writer; + /** GetContentRequest name. */ + public name: string; - /** - * Decodes an IncompatibleDataSchema message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IncompatibleDataSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.IncompatibleDataSchema; + /** GetContentRequest view. */ + public view: (google.cloud.dataplex.v1.GetContentRequest.ContentView|keyof typeof google.cloud.dataplex.v1.GetContentRequest.ContentView); - /** - * Decodes an IncompatibleDataSchema message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IncompatibleDataSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.IncompatibleDataSchema; + /** + * Creates a new GetContentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetContentRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGetContentRequest): google.cloud.dataplex.v1.GetContentRequest; - /** - * Verifies an IncompatibleDataSchema message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified GetContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetContentRequest.verify|verify} messages. + * @param message GetContentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IGetContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates an IncompatibleDataSchema message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IncompatibleDataSchema - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.IncompatibleDataSchema; + /** + * Encodes the specified GetContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetContentRequest.verify|verify} messages. + * @param message GetContentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from an IncompatibleDataSchema message. Also converts values to other types if specified. - * @param message IncompatibleDataSchema - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Action.IncompatibleDataSchema, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a GetContentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetContentRequest; - /** - * Converts this IncompatibleDataSchema to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes a GetContentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetContentRequest; - namespace IncompatibleDataSchema { + /** + * Verifies a GetContentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** SchemaChange enum. */ - enum SchemaChange { - SCHEMA_CHANGE_UNSPECIFIED = 0, - INCOMPATIBLE = 1, - MODIFIED = 2 - } - } + /** + * Creates a GetContentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetContentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetContentRequest; - /** Properties of an InvalidDataPartition. */ - interface IInvalidDataPartition { + /** + * Creates a plain object from a GetContentRequest message. Also converts values to other types if specified. + * @param message GetContentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GetContentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** InvalidDataPartition expectedStructure */ - expectedStructure?: (google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure|keyof typeof google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure|null); - } + /** + * Converts this GetContentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Represents an InvalidDataPartition. */ - class InvalidDataPartition implements IInvalidDataPartition { + namespace GetContentRequest { - /** - * Constructs a new InvalidDataPartition. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Action.IInvalidDataPartition); + /** ContentView enum. */ + enum ContentView { + CONTENT_VIEW_UNSPECIFIED = 0, + BASIC = 1, + FULL = 2 + } + } - /** InvalidDataPartition expectedStructure. */ - public expectedStructure: (google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure|keyof typeof google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure); + /** Properties of a DiscoveryEvent. */ + interface IDiscoveryEvent { - /** - * Creates a new InvalidDataPartition instance using the specified properties. - * @param [properties] Properties to set - * @returns InvalidDataPartition instance - */ - public static create(properties?: google.cloud.dataplex.v1.Action.IInvalidDataPartition): google.cloud.dataplex.v1.Action.InvalidDataPartition; + /** DiscoveryEvent message */ + message?: (string|null); - /** - * Encodes the specified InvalidDataPartition message. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataPartition.verify|verify} messages. - * @param message InvalidDataPartition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Action.IInvalidDataPartition, writer?: $protobuf.Writer): $protobuf.Writer; + /** DiscoveryEvent lakeId */ + lakeId?: (string|null); - /** - * Encodes the specified InvalidDataPartition message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataPartition.verify|verify} messages. - * @param message InvalidDataPartition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IInvalidDataPartition, writer?: $protobuf.Writer): $protobuf.Writer; + /** DiscoveryEvent zoneId */ + zoneId?: (string|null); - /** - * Decodes an InvalidDataPartition message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InvalidDataPartition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.InvalidDataPartition; + /** DiscoveryEvent assetId */ + assetId?: (string|null); - /** - * Decodes an InvalidDataPartition message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InvalidDataPartition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.InvalidDataPartition; + /** DiscoveryEvent dataLocation */ + dataLocation?: (string|null); - /** - * Verifies an InvalidDataPartition message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** DiscoveryEvent type */ + type?: (google.cloud.dataplex.v1.DiscoveryEvent.EventType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EventType|null); - /** - * Creates an InvalidDataPartition message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InvalidDataPartition - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.InvalidDataPartition; + /** DiscoveryEvent config */ + config?: (google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null); - /** - * Creates a plain object from an InvalidDataPartition message. Also converts values to other types if specified. - * @param message InvalidDataPartition - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Action.InvalidDataPartition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** DiscoveryEvent entity */ + entity?: (google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null); - /** - * Converts this InvalidDataPartition to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** DiscoveryEvent partition */ + partition?: (google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null); - namespace InvalidDataPartition { + /** DiscoveryEvent action */ + action?: (google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null); + } - /** PartitionStructure enum. */ - enum PartitionStructure { - PARTITION_STRUCTURE_UNSPECIFIED = 0, - CONSISTENT_KEYS = 1, - HIVE_STYLE_KEYS = 2 - } - } + /** Represents a DiscoveryEvent. */ + class DiscoveryEvent implements IDiscoveryEvent { - /** Properties of a MissingData. */ - interface IMissingData { - } + /** + * Constructs a new DiscoveryEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDiscoveryEvent); - /** Represents a MissingData. */ - class MissingData implements IMissingData { + /** DiscoveryEvent message. */ + public message: string; - /** - * Constructs a new MissingData. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Action.IMissingData); + /** DiscoveryEvent lakeId. */ + public lakeId: string; - /** - * Creates a new MissingData instance using the specified properties. - * @param [properties] Properties to set - * @returns MissingData instance - */ - public static create(properties?: google.cloud.dataplex.v1.Action.IMissingData): google.cloud.dataplex.v1.Action.MissingData; + /** DiscoveryEvent zoneId. */ + public zoneId: string; - /** - * Encodes the specified MissingData message. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingData.verify|verify} messages. - * @param message MissingData message or plain object to encode + /** DiscoveryEvent assetId. */ + public assetId: string; + + /** DiscoveryEvent dataLocation. */ + public dataLocation: string; + + /** DiscoveryEvent type. */ + public type: (google.cloud.dataplex.v1.DiscoveryEvent.EventType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EventType); + + /** DiscoveryEvent config. */ + public config?: (google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null); + + /** DiscoveryEvent entity. */ + public entity?: (google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null); + + /** DiscoveryEvent partition. */ + public partition?: (google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null); + + /** DiscoveryEvent action. */ + public action?: (google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null); + + /** DiscoveryEvent details. */ + public details?: ("config"|"entity"|"partition"|"action"); + + /** + * Creates a new DiscoveryEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoveryEvent instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDiscoveryEvent): google.cloud.dataplex.v1.DiscoveryEvent; + + /** + * Encodes the specified DiscoveryEvent message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. + * @param message DiscoveryEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDiscoveryEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoveryEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. + * @param message DiscoveryEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDiscoveryEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoveryEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoveryEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DiscoveryEvent; + + /** + * Decodes a DiscoveryEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoveryEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DiscoveryEvent; + + /** + * Verifies a DiscoveryEvent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiscoveryEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoveryEvent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent; + + /** + * Creates a plain object from a DiscoveryEvent message. Also converts values to other types if specified. + * @param message DiscoveryEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoveryEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DiscoveryEvent { + + /** EventType enum. */ + enum EventType { + EVENT_TYPE_UNSPECIFIED = 0, + CONFIG = 1, + ENTITY_CREATED = 2, + ENTITY_UPDATED = 3, + ENTITY_DELETED = 4, + PARTITION_CREATED = 5, + PARTITION_UPDATED = 6, + PARTITION_DELETED = 7 + } + + /** EntityType enum. */ + enum EntityType { + ENTITY_TYPE_UNSPECIFIED = 0, + TABLE = 1, + FILESET = 2 + } + + /** Properties of a ConfigDetails. */ + interface IConfigDetails { + + /** ConfigDetails parameters */ + parameters?: ({ [k: string]: string }|null); + } + + /** Represents a ConfigDetails. */ + class ConfigDetails implements IConfigDetails { + + /** + * Constructs a new ConfigDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails); + + /** ConfigDetails parameters. */ + public parameters: { [k: string]: string }; + + /** + * Creates a new ConfigDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns ConfigDetails instance + */ + public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails): google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails; + + /** + * Encodes the specified ConfigDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. + * @param message ConfigDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.Action.IMissingData, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MissingData message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingData.verify|verify} messages. - * @param message MissingData message or plain object to encode + * Encodes the specified ConfigDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. + * @param message ConfigDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IMissingData, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MissingData message from the specified reader or buffer. + * Decodes a ConfigDetails message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MissingData + * @returns ConfigDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.MissingData; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails; /** - * Decodes a MissingData message from the specified reader or buffer, length delimited. + * Decodes a ConfigDetails message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MissingData + * @returns ConfigDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.MissingData; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails; /** - * Verifies a MissingData message. + * Verifies a ConfigDetails message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MissingData message from a plain object. Also converts values to their respective internal types. + * Creates a ConfigDetails message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MissingData + * @returns ConfigDetails */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.MissingData; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails; /** - * Creates a plain object from a MissingData message. Also converts values to other types if specified. - * @param message MissingData + * Creates a plain object from a ConfigDetails message. Also converts values to other types if specified. + * @param message ConfigDetails * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.Action.MissingData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MissingData to JSON. + * Converts this ConfigDetails to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an InvalidDataOrganization. */ - interface IInvalidDataOrganization { + /** Properties of an EntityDetails. */ + interface IEntityDetails { + + /** EntityDetails entity */ + entity?: (string|null); + + /** EntityDetails type */ + type?: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null); } - /** Represents an InvalidDataOrganization. */ - class InvalidDataOrganization implements IInvalidDataOrganization { + /** Represents an EntityDetails. */ + class EntityDetails implements IEntityDetails { /** - * Constructs a new InvalidDataOrganization. + * Constructs a new EntityDetails. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.Action.IInvalidDataOrganization); + constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails); + + /** EntityDetails entity. */ + public entity: string; + + /** EntityDetails type. */ + public type: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType); /** - * Creates a new InvalidDataOrganization instance using the specified properties. + * Creates a new EntityDetails instance using the specified properties. * @param [properties] Properties to set - * @returns InvalidDataOrganization instance + * @returns EntityDetails instance */ - public static create(properties?: google.cloud.dataplex.v1.Action.IInvalidDataOrganization): google.cloud.dataplex.v1.Action.InvalidDataOrganization; + public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails): google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails; /** - * Encodes the specified InvalidDataOrganization message. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataOrganization.verify|verify} messages. - * @param message InvalidDataOrganization message or plain object to encode + * Encodes the specified EntityDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. + * @param message EntityDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.Action.IInvalidDataOrganization, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified InvalidDataOrganization message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataOrganization.verify|verify} messages. - * @param message InvalidDataOrganization message or plain object to encode + * Encodes the specified EntityDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. + * @param message EntityDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IInvalidDataOrganization, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an InvalidDataOrganization message from the specified reader or buffer. + * Decodes an EntityDetails message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns InvalidDataOrganization + * @returns EntityDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.InvalidDataOrganization; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails; /** - * Decodes an InvalidDataOrganization message from the specified reader or buffer, length delimited. + * Decodes an EntityDetails message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns InvalidDataOrganization + * @returns EntityDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.InvalidDataOrganization; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails; /** - * Verifies an InvalidDataOrganization message. + * Verifies an EntityDetails message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an InvalidDataOrganization message from a plain object. Also converts values to their respective internal types. + * Creates an EntityDetails message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns InvalidDataOrganization + * @returns EntityDetails */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.InvalidDataOrganization; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails; /** - * Creates a plain object from an InvalidDataOrganization message. Also converts values to other types if specified. - * @param message InvalidDataOrganization + * Creates a plain object from an EntityDetails message. Also converts values to other types if specified. + * @param message EntityDetails * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.Action.InvalidDataOrganization, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this InvalidDataOrganization to JSON. + * Converts this EntityDetails to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - } - /** Properties of an Asset. */ - interface IAsset { + /** Properties of a PartitionDetails. */ + interface IPartitionDetails { - /** Asset name */ - name?: (string|null); - - /** Asset displayName */ - displayName?: (string|null); - - /** Asset uid */ - uid?: (string|null); - - /** Asset createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Asset updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** Asset labels */ - labels?: ({ [k: string]: string }|null); - - /** Asset description */ - description?: (string|null); - - /** Asset state */ - state?: (google.cloud.dataplex.v1.Asset.SecurityStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.SecurityStatus.State|null); - - /** Asset resourceSpec */ - resourceSpec?: (google.cloud.dataplex.v1.Asset.IResourceSpec|null); - - /** Asset resourceStatus */ - resourceStatus?: (google.cloud.dataplex.v1.Asset.IResourceStatus|null); - - /** Asset securityStatus */ - securityStatus?: (google.cloud.dataplex.v1.Asset.ISecurityStatus|null); - - /** Asset discoverySpec */ - discoverySpec?: (google.cloud.dataplex.v1.Asset.IDiscoverySpec|null); - - /** Asset discoveryStatus */ - discoveryStatus?: (google.cloud.dataplex.v1.Asset.IDiscoveryStatus|null); - } - - /** Represents an Asset. */ - class Asset implements IAsset { - - /** - * Constructs a new Asset. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IAsset); - - /** Asset name. */ - public name: string; - - /** Asset displayName. */ - public displayName: string; - - /** Asset uid. */ - public uid: string; - - /** Asset createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Asset updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** Asset labels. */ - public labels: { [k: string]: string }; - - /** Asset description. */ - public description: string; - - /** Asset state. */ - public state: (google.cloud.dataplex.v1.Asset.SecurityStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.SecurityStatus.State); - - /** Asset resourceSpec. */ - public resourceSpec?: (google.cloud.dataplex.v1.Asset.IResourceSpec|null); - - /** Asset resourceStatus. */ - public resourceStatus?: (google.cloud.dataplex.v1.Asset.IResourceStatus|null); - - /** Asset securityStatus. */ - public securityStatus?: (google.cloud.dataplex.v1.Asset.ISecurityStatus|null); - - /** Asset discoverySpec. */ - public discoverySpec?: (google.cloud.dataplex.v1.Asset.IDiscoverySpec|null); - - /** Asset discoveryStatus. */ - public discoveryStatus?: (google.cloud.dataplex.v1.Asset.IDiscoveryStatus|null); - - /** - * Creates a new Asset instance using the specified properties. - * @param [properties] Properties to set - * @returns Asset instance - */ - public static create(properties?: google.cloud.dataplex.v1.IAsset): google.cloud.dataplex.v1.Asset; - - /** - * Encodes the specified Asset message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.verify|verify} messages. - * @param message Asset message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IAsset, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Asset message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.verify|verify} messages. - * @param message Asset message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IAsset, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Asset message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Asset - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset; - - /** - * Decodes an Asset message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Asset - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset; - - /** - * Verifies an Asset message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Asset message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Asset - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset; - - /** - * Creates a plain object from an Asset message. Also converts values to other types if specified. - * @param message Asset - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Asset, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Asset to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace Asset { - - /** Properties of a SecurityStatus. */ - interface ISecurityStatus { - - /** SecurityStatus state */ - state?: (google.cloud.dataplex.v1.Asset.SecurityStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.SecurityStatus.State|null); + /** PartitionDetails partition */ + partition?: (string|null); - /** SecurityStatus message */ - message?: (string|null); + /** PartitionDetails entity */ + entity?: (string|null); - /** SecurityStatus updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** PartitionDetails type */ + type?: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null); } - /** Represents a SecurityStatus. */ - class SecurityStatus implements ISecurityStatus { + /** Represents a PartitionDetails. */ + class PartitionDetails implements IPartitionDetails { /** - * Constructs a new SecurityStatus. + * Constructs a new PartitionDetails. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.Asset.ISecurityStatus); + constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails); - /** SecurityStatus state. */ - public state: (google.cloud.dataplex.v1.Asset.SecurityStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.SecurityStatus.State); + /** PartitionDetails partition. */ + public partition: string; - /** SecurityStatus message. */ - public message: string; + /** PartitionDetails entity. */ + public entity: string; - /** SecurityStatus updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** PartitionDetails type. */ + public type: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType); /** - * Creates a new SecurityStatus instance using the specified properties. + * Creates a new PartitionDetails instance using the specified properties. * @param [properties] Properties to set - * @returns SecurityStatus instance + * @returns PartitionDetails instance */ - public static create(properties?: google.cloud.dataplex.v1.Asset.ISecurityStatus): google.cloud.dataplex.v1.Asset.SecurityStatus; + public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails): google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails; /** - * Encodes the specified SecurityStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.SecurityStatus.verify|verify} messages. - * @param message SecurityStatus message or plain object to encode + * Encodes the specified PartitionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. + * @param message PartitionDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.Asset.ISecurityStatus, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SecurityStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.SecurityStatus.verify|verify} messages. - * @param message SecurityStatus message or plain object to encode + * Encodes the specified PartitionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. + * @param message PartitionDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.ISecurityStatus, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SecurityStatus message from the specified reader or buffer. + * Decodes a PartitionDetails message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SecurityStatus + * @returns PartitionDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.SecurityStatus; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails; /** - * Decodes a SecurityStatus message from the specified reader or buffer, length delimited. + * Decodes a PartitionDetails message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SecurityStatus + * @returns PartitionDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.SecurityStatus; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails; /** - * Verifies a SecurityStatus message. + * Verifies a PartitionDetails message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SecurityStatus message from a plain object. Also converts values to their respective internal types. + * Creates a PartitionDetails message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SecurityStatus + * @returns PartitionDetails */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.SecurityStatus; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails; /** - * Creates a plain object from a SecurityStatus message. Also converts values to other types if specified. - * @param message SecurityStatus + * Creates a plain object from a PartitionDetails message. Also converts values to other types if specified. + * @param message PartitionDetails * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.Asset.SecurityStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SecurityStatus to JSON. + * Converts this PartitionDetails to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace SecurityStatus { + /** Properties of an ActionDetails. */ + interface IActionDetails { - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - READY = 1, - APPLYING = 2, - ERROR = 3 - } + /** ActionDetails type */ + type?: (string|null); } - /** Properties of a DiscoverySpec. */ - interface IDiscoverySpec { - - /** DiscoverySpec enabled */ - enabled?: (boolean|null); - - /** DiscoverySpec includePatterns */ - includePatterns?: (string[]|null); - - /** DiscoverySpec excludePatterns */ - excludePatterns?: (string[]|null); - - /** DiscoverySpec csvOptions */ - csvOptions?: (google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions|null); - - /** DiscoverySpec jsonOptions */ - jsonOptions?: (google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions|null); - - /** DiscoverySpec schedule */ - schedule?: (string|null); - } - - /** Represents a DiscoverySpec. */ - class DiscoverySpec implements IDiscoverySpec { + /** Represents an ActionDetails. */ + class ActionDetails implements IActionDetails { /** - * Constructs a new DiscoverySpec. + * Constructs a new ActionDetails. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.Asset.IDiscoverySpec); - - /** DiscoverySpec enabled. */ - public enabled: boolean; - - /** DiscoverySpec includePatterns. */ - public includePatterns: string[]; - - /** DiscoverySpec excludePatterns. */ - public excludePatterns: string[]; - - /** DiscoverySpec csvOptions. */ - public csvOptions?: (google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions|null); - - /** DiscoverySpec jsonOptions. */ - public jsonOptions?: (google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions|null); - - /** DiscoverySpec schedule. */ - public schedule?: (string|null); + constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails); - /** DiscoverySpec trigger. */ - public trigger?: "schedule"; + /** ActionDetails type. */ + public type: string; /** - * Creates a new DiscoverySpec instance using the specified properties. + * Creates a new ActionDetails instance using the specified properties. * @param [properties] Properties to set - * @returns DiscoverySpec instance + * @returns ActionDetails instance */ - public static create(properties?: google.cloud.dataplex.v1.Asset.IDiscoverySpec): google.cloud.dataplex.v1.Asset.DiscoverySpec; + public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails): google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails; /** - * Encodes the specified DiscoverySpec message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.verify|verify} messages. - * @param message DiscoverySpec message or plain object to encode + * Encodes the specified ActionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. + * @param message ActionDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.Asset.IDiscoverySpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DiscoverySpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.verify|verify} messages. - * @param message DiscoverySpec message or plain object to encode + * Encodes the specified ActionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. + * @param message ActionDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.IDiscoverySpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DiscoverySpec message from the specified reader or buffer. + * Decodes an ActionDetails message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DiscoverySpec + * @returns ActionDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.DiscoverySpec; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails; /** - * Decodes a DiscoverySpec message from the specified reader or buffer, length delimited. + * Decodes an ActionDetails message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DiscoverySpec + * @returns ActionDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.DiscoverySpec; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails; /** - * Verifies a DiscoverySpec message. + * Verifies an ActionDetails message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DiscoverySpec message from a plain object. Also converts values to their respective internal types. + * Creates an ActionDetails message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DiscoverySpec + * @returns ActionDetails */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.DiscoverySpec; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails; /** - * Creates a plain object from a DiscoverySpec message. Also converts values to other types if specified. - * @param message DiscoverySpec + * Creates a plain object from an ActionDetails message. Also converts values to other types if specified. + * @param message ActionDetails * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.Asset.DiscoverySpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DiscoverySpec to JSON. + * Converts this ActionDetails to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } + } - namespace DiscoverySpec { - - /** Properties of a CsvOptions. */ - interface ICsvOptions { - - /** CsvOptions headerRows */ - headerRows?: (number|null); + /** Properties of a JobEvent. */ + interface IJobEvent { - /** CsvOptions delimiter */ - delimiter?: (string|null); + /** JobEvent message */ + message?: (string|null); - /** CsvOptions encoding */ - encoding?: (string|null); + /** JobEvent jobId */ + jobId?: (string|null); - /** CsvOptions disableTypeInference */ - disableTypeInference?: (boolean|null); - } + /** JobEvent startTime */ + startTime?: (google.protobuf.ITimestamp|null); - /** Represents a CsvOptions. */ - class CsvOptions implements ICsvOptions { + /** JobEvent endTime */ + endTime?: (google.protobuf.ITimestamp|null); - /** - * Constructs a new CsvOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions); + /** JobEvent state */ + state?: (google.cloud.dataplex.v1.JobEvent.State|keyof typeof google.cloud.dataplex.v1.JobEvent.State|null); - /** CsvOptions headerRows. */ - public headerRows: number; + /** JobEvent retries */ + retries?: (number|null); - /** CsvOptions delimiter. */ - public delimiter: string; + /** JobEvent type */ + type?: (google.cloud.dataplex.v1.JobEvent.Type|keyof typeof google.cloud.dataplex.v1.JobEvent.Type|null); - /** CsvOptions encoding. */ - public encoding: string; + /** JobEvent service */ + service?: (google.cloud.dataplex.v1.JobEvent.Service|keyof typeof google.cloud.dataplex.v1.JobEvent.Service|null); - /** CsvOptions disableTypeInference. */ - public disableTypeInference: boolean; + /** JobEvent serviceJob */ + serviceJob?: (string|null); + } - /** - * Creates a new CsvOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns CsvOptions instance - */ - public static create(properties?: google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions): google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions; + /** Represents a JobEvent. */ + class JobEvent implements IJobEvent { - /** - * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.verify|verify} messages. - * @param message CsvOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new JobEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IJobEvent); - /** - * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.verify|verify} messages. - * @param message CsvOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** JobEvent message. */ + public message: string; - /** - * Decodes a CsvOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CsvOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions; + /** JobEvent jobId. */ + public jobId: string; - /** - * Decodes a CsvOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CsvOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions; + /** JobEvent startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); - /** - * Verifies a CsvOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** JobEvent endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); - /** - * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CsvOptions - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions; + /** JobEvent state. */ + public state: (google.cloud.dataplex.v1.JobEvent.State|keyof typeof google.cloud.dataplex.v1.JobEvent.State); - /** - * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. - * @param message CsvOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** JobEvent retries. */ + public retries: number; - /** - * Converts this CsvOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** JobEvent type. */ + public type: (google.cloud.dataplex.v1.JobEvent.Type|keyof typeof google.cloud.dataplex.v1.JobEvent.Type); - /** Properties of a JsonOptions. */ - interface IJsonOptions { + /** JobEvent service. */ + public service: (google.cloud.dataplex.v1.JobEvent.Service|keyof typeof google.cloud.dataplex.v1.JobEvent.Service); - /** JsonOptions encoding */ - encoding?: (string|null); + /** JobEvent serviceJob. */ + public serviceJob: string; - /** JsonOptions disableTypeInference */ - disableTypeInference?: (boolean|null); - } + /** + * Creates a new JobEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns JobEvent instance + */ + public static create(properties?: google.cloud.dataplex.v1.IJobEvent): google.cloud.dataplex.v1.JobEvent; - /** Represents a JsonOptions. */ - class JsonOptions implements IJsonOptions { + /** + * Encodes the specified JobEvent message. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. + * @param message JobEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IJobEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JobEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. + * @param message JobEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IJobEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JobEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JobEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.JobEvent; + + /** + * Decodes a JobEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JobEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.JobEvent; + + /** + * Verifies a JobEvent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JobEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JobEvent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.JobEvent; + + /** + * Creates a plain object from a JobEvent message. Also converts values to other types if specified. + * @param message JobEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.JobEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JobEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace JobEvent { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + SPARK = 1, + NOTEBOOK = 2 + } + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + SUCCEEDED = 1, + FAILED = 2, + CANCELLED = 3, + ABORTED = 4 + } + + /** Service enum. */ + enum Service { + SERVICE_UNSPECIFIED = 0, + DATAPROC = 1 + } + } + + /** Properties of a SessionEvent. */ + interface ISessionEvent { + + /** SessionEvent message */ + message?: (string|null); + + /** SessionEvent userId */ + userId?: (string|null); + + /** SessionEvent sessionId */ + sessionId?: (string|null); + + /** SessionEvent type */ + type?: (google.cloud.dataplex.v1.SessionEvent.EventType|keyof typeof google.cloud.dataplex.v1.SessionEvent.EventType|null); + + /** SessionEvent query */ + query?: (google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null); + } + + /** Represents a SessionEvent. */ + class SessionEvent implements ISessionEvent { + + /** + * Constructs a new SessionEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ISessionEvent); + + /** SessionEvent message. */ + public message: string; + + /** SessionEvent userId. */ + public userId: string; + + /** SessionEvent sessionId. */ + public sessionId: string; + + /** SessionEvent type. */ + public type: (google.cloud.dataplex.v1.SessionEvent.EventType|keyof typeof google.cloud.dataplex.v1.SessionEvent.EventType); + + /** SessionEvent query. */ + public query?: (google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null); + + /** SessionEvent detail. */ + public detail?: "query"; + + /** + * Creates a new SessionEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns SessionEvent instance + */ + public static create(properties?: google.cloud.dataplex.v1.ISessionEvent): google.cloud.dataplex.v1.SessionEvent; + + /** + * Encodes the specified SessionEvent message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. + * @param message SessionEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ISessionEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SessionEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. + * @param message SessionEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ISessionEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SessionEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SessionEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.SessionEvent; + + /** + * Decodes a SessionEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SessionEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.SessionEvent; + + /** + * Verifies a SessionEvent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SessionEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SessionEvent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.SessionEvent; + + /** + * Creates a plain object from a SessionEvent message. Also converts values to other types if specified. + * @param message SessionEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.SessionEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SessionEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace SessionEvent { + + /** EventType enum. */ + enum EventType { + EVENT_TYPE_UNSPECIFIED = 0, + START = 1, + STOP = 2, + QUERY = 3 + } + + /** Properties of a QueryDetail. */ + interface IQueryDetail { + + /** QueryDetail queryId */ + queryId?: (string|null); + + /** QueryDetail queryText */ + queryText?: (string|null); + + /** QueryDetail engine */ + engine?: (google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|keyof typeof google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|null); + + /** QueryDetail duration */ + duration?: (google.protobuf.IDuration|null); + + /** QueryDetail resultSizeBytes */ + resultSizeBytes?: (number|Long|string|null); + + /** QueryDetail dataProcessedBytes */ + dataProcessedBytes?: (number|Long|string|null); + } + + /** Represents a QueryDetail. */ + class QueryDetail implements IQueryDetail { + + /** + * Constructs a new QueryDetail. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.SessionEvent.IQueryDetail); + + /** QueryDetail queryId. */ + public queryId: string; + + /** QueryDetail queryText. */ + public queryText: string; + + /** QueryDetail engine. */ + public engine: (google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|keyof typeof google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine); + + /** QueryDetail duration. */ + public duration?: (google.protobuf.IDuration|null); + + /** QueryDetail resultSizeBytes. */ + public resultSizeBytes: (number|Long|string); + + /** QueryDetail dataProcessedBytes. */ + public dataProcessedBytes: (number|Long|string); + + /** + * Creates a new QueryDetail instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDetail instance + */ + public static create(properties?: google.cloud.dataplex.v1.SessionEvent.IQueryDetail): google.cloud.dataplex.v1.SessionEvent.QueryDetail; + + /** + * Encodes the specified QueryDetail message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. + * @param message QueryDetail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.SessionEvent.IQueryDetail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryDetail message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. + * @param message QueryDetail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.SessionEvent.IQueryDetail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryDetail message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.SessionEvent.QueryDetail; + + /** + * Decodes a QueryDetail message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.SessionEvent.QueryDetail; + + /** + * Verifies a QueryDetail message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryDetail message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryDetail + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.SessionEvent.QueryDetail; + + /** + * Creates a plain object from a QueryDetail message. Also converts values to other types if specified. + * @param message QueryDetail + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.SessionEvent.QueryDetail, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryDetail to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace QueryDetail { + + /** Engine enum. */ + enum Engine { + ENGINE_UNSPECIFIED = 0, + SPARK_SQL = 1, + BIGQUERY = 2 + } + } + } + + /** Represents a MetadataService */ + class MetadataService extends $protobuf.rpc.Service { + + /** + * Constructs a new MetadataService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new MetadataService service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): MetadataService; + + /** + * Calls CreateEntity. + * @param request CreateEntityRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Entity + */ + public createEntity(request: google.cloud.dataplex.v1.ICreateEntityRequest, callback: google.cloud.dataplex.v1.MetadataService.CreateEntityCallback): void; + + /** + * Calls CreateEntity. + * @param request CreateEntityRequest message or plain object + * @returns Promise + */ + public createEntity(request: google.cloud.dataplex.v1.ICreateEntityRequest): Promise; + + /** + * Calls UpdateEntity. + * @param request UpdateEntityRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Entity + */ + public updateEntity(request: google.cloud.dataplex.v1.IUpdateEntityRequest, callback: google.cloud.dataplex.v1.MetadataService.UpdateEntityCallback): void; + + /** + * Calls UpdateEntity. + * @param request UpdateEntityRequest message or plain object + * @returns Promise + */ + public updateEntity(request: google.cloud.dataplex.v1.IUpdateEntityRequest): Promise; + + /** + * Calls DeleteEntity. + * @param request DeleteEntityRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteEntity(request: google.cloud.dataplex.v1.IDeleteEntityRequest, callback: google.cloud.dataplex.v1.MetadataService.DeleteEntityCallback): void; + + /** + * Calls DeleteEntity. + * @param request DeleteEntityRequest message or plain object + * @returns Promise + */ + public deleteEntity(request: google.cloud.dataplex.v1.IDeleteEntityRequest): Promise; + + /** + * Calls GetEntity. + * @param request GetEntityRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Entity + */ + public getEntity(request: google.cloud.dataplex.v1.IGetEntityRequest, callback: google.cloud.dataplex.v1.MetadataService.GetEntityCallback): void; + + /** + * Calls GetEntity. + * @param request GetEntityRequest message or plain object + * @returns Promise + */ + public getEntity(request: google.cloud.dataplex.v1.IGetEntityRequest): Promise; + + /** + * Calls ListEntities. + * @param request ListEntitiesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListEntitiesResponse + */ + public listEntities(request: google.cloud.dataplex.v1.IListEntitiesRequest, callback: google.cloud.dataplex.v1.MetadataService.ListEntitiesCallback): void; + + /** + * Calls ListEntities. + * @param request ListEntitiesRequest message or plain object + * @returns Promise + */ + public listEntities(request: google.cloud.dataplex.v1.IListEntitiesRequest): Promise; + + /** + * Calls CreatePartition. + * @param request CreatePartitionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Partition + */ + public createPartition(request: google.cloud.dataplex.v1.ICreatePartitionRequest, callback: google.cloud.dataplex.v1.MetadataService.CreatePartitionCallback): void; + + /** + * Calls CreatePartition. + * @param request CreatePartitionRequest message or plain object + * @returns Promise + */ + public createPartition(request: google.cloud.dataplex.v1.ICreatePartitionRequest): Promise; + + /** + * Calls DeletePartition. + * @param request DeletePartitionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deletePartition(request: google.cloud.dataplex.v1.IDeletePartitionRequest, callback: google.cloud.dataplex.v1.MetadataService.DeletePartitionCallback): void; + + /** + * Calls DeletePartition. + * @param request DeletePartitionRequest message or plain object + * @returns Promise + */ + public deletePartition(request: google.cloud.dataplex.v1.IDeletePartitionRequest): Promise; + + /** + * Calls GetPartition. + * @param request GetPartitionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Partition + */ + public getPartition(request: google.cloud.dataplex.v1.IGetPartitionRequest, callback: google.cloud.dataplex.v1.MetadataService.GetPartitionCallback): void; + + /** + * Calls GetPartition. + * @param request GetPartitionRequest message or plain object + * @returns Promise + */ + public getPartition(request: google.cloud.dataplex.v1.IGetPartitionRequest): Promise; + + /** + * Calls ListPartitions. + * @param request ListPartitionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListPartitionsResponse + */ + public listPartitions(request: google.cloud.dataplex.v1.IListPartitionsRequest, callback: google.cloud.dataplex.v1.MetadataService.ListPartitionsCallback): void; + + /** + * Calls ListPartitions. + * @param request ListPartitionsRequest message or plain object + * @returns Promise + */ + public listPartitions(request: google.cloud.dataplex.v1.IListPartitionsRequest): Promise; + } + + namespace MetadataService { + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#createEntity}. + * @param error Error, if any + * @param [response] Entity + */ + type CreateEntityCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Entity) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#updateEntity}. + * @param error Error, if any + * @param [response] Entity + */ + type UpdateEntityCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Entity) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#deleteEntity}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteEntityCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#getEntity}. + * @param error Error, if any + * @param [response] Entity + */ + type GetEntityCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Entity) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#listEntities}. + * @param error Error, if any + * @param [response] ListEntitiesResponse + */ + type ListEntitiesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListEntitiesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#createPartition}. + * @param error Error, if any + * @param [response] Partition + */ + type CreatePartitionCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Partition) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#deletePartition}. + * @param error Error, if any + * @param [response] Empty + */ + type DeletePartitionCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#getPartition}. + * @param error Error, if any + * @param [response] Partition + */ + type GetPartitionCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Partition) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#listPartitions}. + * @param error Error, if any + * @param [response] ListPartitionsResponse + */ + type ListPartitionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListPartitionsResponse) => void; + } + + /** Properties of a CreateEntityRequest. */ + interface ICreateEntityRequest { + + /** CreateEntityRequest parent */ + parent?: (string|null); + + /** CreateEntityRequest entity */ + entity?: (google.cloud.dataplex.v1.IEntity|null); + + /** CreateEntityRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateEntityRequest. */ + class CreateEntityRequest implements ICreateEntityRequest { + + /** + * Constructs a new CreateEntityRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ICreateEntityRequest); + + /** CreateEntityRequest parent. */ + public parent: string; + + /** CreateEntityRequest entity. */ + public entity?: (google.cloud.dataplex.v1.IEntity|null); + + /** CreateEntityRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateEntityRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateEntityRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.ICreateEntityRequest): google.cloud.dataplex.v1.CreateEntityRequest; + + /** + * Encodes the specified CreateEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateEntityRequest.verify|verify} messages. + * @param message CreateEntityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ICreateEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateEntityRequest.verify|verify} messages. + * @param message CreateEntityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateEntityRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateEntityRequest; + + /** + * Decodes a CreateEntityRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateEntityRequest; + + /** + * Verifies a CreateEntityRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateEntityRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateEntityRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateEntityRequest; + + /** + * Creates a plain object from a CreateEntityRequest message. Also converts values to other types if specified. + * @param message CreateEntityRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.CreateEntityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateEntityRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateEntityRequest. */ + interface IUpdateEntityRequest { + + /** UpdateEntityRequest entity */ + entity?: (google.cloud.dataplex.v1.IEntity|null); + + /** UpdateEntityRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents an UpdateEntityRequest. */ + class UpdateEntityRequest implements IUpdateEntityRequest { + + /** + * Constructs a new UpdateEntityRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IUpdateEntityRequest); + + /** UpdateEntityRequest entity. */ + public entity?: (google.cloud.dataplex.v1.IEntity|null); + + /** UpdateEntityRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new UpdateEntityRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateEntityRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IUpdateEntityRequest): google.cloud.dataplex.v1.UpdateEntityRequest; + + /** + * Encodes the specified UpdateEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEntityRequest.verify|verify} messages. + * @param message UpdateEntityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IUpdateEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEntityRequest.verify|verify} messages. + * @param message UpdateEntityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateEntityRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateEntityRequest; + + /** + * Decodes an UpdateEntityRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateEntityRequest; + + /** + * Verifies an UpdateEntityRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateEntityRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateEntityRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateEntityRequest; + + /** + * Creates a plain object from an UpdateEntityRequest message. Also converts values to other types if specified. + * @param message UpdateEntityRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.UpdateEntityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateEntityRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteEntityRequest. */ + interface IDeleteEntityRequest { + + /** DeleteEntityRequest name */ + name?: (string|null); + + /** DeleteEntityRequest etag */ + etag?: (string|null); + } + + /** Represents a DeleteEntityRequest. */ + class DeleteEntityRequest implements IDeleteEntityRequest { + + /** + * Constructs a new DeleteEntityRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDeleteEntityRequest); + + /** DeleteEntityRequest name. */ + public name: string; + + /** DeleteEntityRequest etag. */ + public etag: string; + + /** + * Creates a new DeleteEntityRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteEntityRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDeleteEntityRequest): google.cloud.dataplex.v1.DeleteEntityRequest; + + /** + * Encodes the specified DeleteEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEntityRequest.verify|verify} messages. + * @param message DeleteEntityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDeleteEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEntityRequest.verify|verify} messages. + * @param message DeleteEntityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteEntityRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteEntityRequest; + + /** + * Decodes a DeleteEntityRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteEntityRequest; + + /** + * Verifies a DeleteEntityRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteEntityRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteEntityRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteEntityRequest; + + /** + * Creates a plain object from a DeleteEntityRequest message. Also converts values to other types if specified. + * @param message DeleteEntityRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DeleteEntityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteEntityRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListEntitiesRequest. */ + interface IListEntitiesRequest { + + /** ListEntitiesRequest parent */ + parent?: (string|null); + + /** ListEntitiesRequest view */ + view?: (google.cloud.dataplex.v1.ListEntitiesRequest.EntityView|keyof typeof google.cloud.dataplex.v1.ListEntitiesRequest.EntityView|null); + + /** ListEntitiesRequest pageSize */ + pageSize?: (number|null); + + /** ListEntitiesRequest pageToken */ + pageToken?: (string|null); + + /** ListEntitiesRequest filter */ + filter?: (string|null); + } + + /** Represents a ListEntitiesRequest. */ + class ListEntitiesRequest implements IListEntitiesRequest { + + /** + * Constructs a new ListEntitiesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListEntitiesRequest); + + /** ListEntitiesRequest parent. */ + public parent: string; + + /** ListEntitiesRequest view. */ + public view: (google.cloud.dataplex.v1.ListEntitiesRequest.EntityView|keyof typeof google.cloud.dataplex.v1.ListEntitiesRequest.EntityView); + + /** ListEntitiesRequest pageSize. */ + public pageSize: number; + + /** ListEntitiesRequest pageToken. */ + public pageToken: string; + + /** ListEntitiesRequest filter. */ + public filter: string; + + /** + * Creates a new ListEntitiesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEntitiesRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListEntitiesRequest): google.cloud.dataplex.v1.ListEntitiesRequest; + + /** + * Encodes the specified ListEntitiesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesRequest.verify|verify} messages. + * @param message ListEntitiesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListEntitiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListEntitiesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesRequest.verify|verify} messages. + * @param message ListEntitiesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListEntitiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListEntitiesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListEntitiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListEntitiesRequest; + + /** + * Decodes a ListEntitiesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListEntitiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListEntitiesRequest; + + /** + * Verifies a ListEntitiesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListEntitiesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListEntitiesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListEntitiesRequest; + + /** + * Creates a plain object from a ListEntitiesRequest message. Also converts values to other types if specified. + * @param message ListEntitiesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListEntitiesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListEntitiesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ListEntitiesRequest { + + /** EntityView enum. */ + enum EntityView { + ENTITY_VIEW_UNSPECIFIED = 0, + TABLES = 1, + FILESETS = 2 + } + } + + /** Properties of a ListEntitiesResponse. */ + interface IListEntitiesResponse { + + /** ListEntitiesResponse entities */ + entities?: (google.cloud.dataplex.v1.IEntity[]|null); + + /** ListEntitiesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListEntitiesResponse. */ + class ListEntitiesResponse implements IListEntitiesResponse { + + /** + * Constructs a new ListEntitiesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListEntitiesResponse); + + /** ListEntitiesResponse entities. */ + public entities: google.cloud.dataplex.v1.IEntity[]; + + /** ListEntitiesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListEntitiesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEntitiesResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListEntitiesResponse): google.cloud.dataplex.v1.ListEntitiesResponse; + + /** + * Encodes the specified ListEntitiesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesResponse.verify|verify} messages. + * @param message ListEntitiesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListEntitiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListEntitiesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesResponse.verify|verify} messages. + * @param message ListEntitiesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListEntitiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListEntitiesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListEntitiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListEntitiesResponse; + + /** + * Decodes a ListEntitiesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListEntitiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListEntitiesResponse; + + /** + * Verifies a ListEntitiesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListEntitiesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListEntitiesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListEntitiesResponse; + + /** + * Creates a plain object from a ListEntitiesResponse message. Also converts values to other types if specified. + * @param message ListEntitiesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListEntitiesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListEntitiesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetEntityRequest. */ + interface IGetEntityRequest { + + /** GetEntityRequest name */ + name?: (string|null); + + /** GetEntityRequest view */ + view?: (google.cloud.dataplex.v1.GetEntityRequest.EntityView|keyof typeof google.cloud.dataplex.v1.GetEntityRequest.EntityView|null); + } + + /** Represents a GetEntityRequest. */ + class GetEntityRequest implements IGetEntityRequest { + + /** + * Constructs a new GetEntityRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGetEntityRequest); + + /** GetEntityRequest name. */ + public name: string; + + /** GetEntityRequest view. */ + public view: (google.cloud.dataplex.v1.GetEntityRequest.EntityView|keyof typeof google.cloud.dataplex.v1.GetEntityRequest.EntityView); + + /** + * Creates a new GetEntityRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetEntityRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGetEntityRequest): google.cloud.dataplex.v1.GetEntityRequest; + + /** + * Encodes the specified GetEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetEntityRequest.verify|verify} messages. + * @param message GetEntityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IGetEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetEntityRequest.verify|verify} messages. + * @param message GetEntityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetEntityRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetEntityRequest; + + /** + * Decodes a GetEntityRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetEntityRequest; + + /** + * Verifies a GetEntityRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetEntityRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetEntityRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetEntityRequest; + + /** + * Creates a plain object from a GetEntityRequest message. Also converts values to other types if specified. + * @param message GetEntityRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GetEntityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetEntityRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace GetEntityRequest { + + /** EntityView enum. */ + enum EntityView { + ENTITY_VIEW_UNSPECIFIED = 0, + BASIC = 1, + SCHEMA = 2, + FULL = 4 + } + } + + /** Properties of a ListPartitionsRequest. */ + interface IListPartitionsRequest { + + /** ListPartitionsRequest parent */ + parent?: (string|null); + + /** ListPartitionsRequest pageSize */ + pageSize?: (number|null); + + /** ListPartitionsRequest pageToken */ + pageToken?: (string|null); + + /** ListPartitionsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListPartitionsRequest. */ + class ListPartitionsRequest implements IListPartitionsRequest { + + /** + * Constructs a new ListPartitionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListPartitionsRequest); + + /** ListPartitionsRequest parent. */ + public parent: string; + + /** ListPartitionsRequest pageSize. */ + public pageSize: number; + + /** ListPartitionsRequest pageToken. */ + public pageToken: string; + + /** ListPartitionsRequest filter. */ + public filter: string; + + /** + * Creates a new ListPartitionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPartitionsRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListPartitionsRequest): google.cloud.dataplex.v1.ListPartitionsRequest; + + /** + * Encodes the specified ListPartitionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsRequest.verify|verify} messages. + * @param message ListPartitionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListPartitionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPartitionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsRequest.verify|verify} messages. + * @param message ListPartitionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListPartitionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPartitionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPartitionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListPartitionsRequest; + + /** + * Decodes a ListPartitionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPartitionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListPartitionsRequest; + + /** + * Verifies a ListPartitionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPartitionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPartitionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListPartitionsRequest; + + /** + * Creates a plain object from a ListPartitionsRequest message. Also converts values to other types if specified. + * @param message ListPartitionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListPartitionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPartitionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreatePartitionRequest. */ + interface ICreatePartitionRequest { + + /** CreatePartitionRequest parent */ + parent?: (string|null); + + /** CreatePartitionRequest partition */ + partition?: (google.cloud.dataplex.v1.IPartition|null); + + /** CreatePartitionRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreatePartitionRequest. */ + class CreatePartitionRequest implements ICreatePartitionRequest { + + /** + * Constructs a new CreatePartitionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ICreatePartitionRequest); + + /** CreatePartitionRequest parent. */ + public parent: string; + + /** CreatePartitionRequest partition. */ + public partition?: (google.cloud.dataplex.v1.IPartition|null); + + /** CreatePartitionRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreatePartitionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreatePartitionRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.ICreatePartitionRequest): google.cloud.dataplex.v1.CreatePartitionRequest; + + /** + * Encodes the specified CreatePartitionRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreatePartitionRequest.verify|verify} messages. + * @param message CreatePartitionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ICreatePartitionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreatePartitionRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreatePartitionRequest.verify|verify} messages. + * @param message CreatePartitionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreatePartitionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreatePartitionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreatePartitionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreatePartitionRequest; + + /** + * Decodes a CreatePartitionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreatePartitionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreatePartitionRequest; + + /** + * Verifies a CreatePartitionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreatePartitionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreatePartitionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreatePartitionRequest; + + /** + * Creates a plain object from a CreatePartitionRequest message. Also converts values to other types if specified. + * @param message CreatePartitionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.CreatePartitionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreatePartitionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeletePartitionRequest. */ + interface IDeletePartitionRequest { + + /** DeletePartitionRequest name */ + name?: (string|null); + + /** DeletePartitionRequest etag */ + etag?: (string|null); + } + + /** Represents a DeletePartitionRequest. */ + class DeletePartitionRequest implements IDeletePartitionRequest { + + /** + * Constructs a new DeletePartitionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDeletePartitionRequest); + + /** DeletePartitionRequest name. */ + public name: string; + + /** DeletePartitionRequest etag. */ + public etag: string; + + /** + * Creates a new DeletePartitionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeletePartitionRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDeletePartitionRequest): google.cloud.dataplex.v1.DeletePartitionRequest; + + /** + * Encodes the specified DeletePartitionRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeletePartitionRequest.verify|verify} messages. + * @param message DeletePartitionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDeletePartitionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeletePartitionRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeletePartitionRequest.verify|verify} messages. + * @param message DeletePartitionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDeletePartitionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeletePartitionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeletePartitionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeletePartitionRequest; + + /** + * Decodes a DeletePartitionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeletePartitionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeletePartitionRequest; + + /** + * Verifies a DeletePartitionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeletePartitionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeletePartitionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeletePartitionRequest; + + /** + * Creates a plain object from a DeletePartitionRequest message. Also converts values to other types if specified. + * @param message DeletePartitionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DeletePartitionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeletePartitionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListPartitionsResponse. */ + interface IListPartitionsResponse { + + /** ListPartitionsResponse partitions */ + partitions?: (google.cloud.dataplex.v1.IPartition[]|null); + + /** ListPartitionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListPartitionsResponse. */ + class ListPartitionsResponse implements IListPartitionsResponse { + + /** + * Constructs a new ListPartitionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListPartitionsResponse); + + /** ListPartitionsResponse partitions. */ + public partitions: google.cloud.dataplex.v1.IPartition[]; + + /** ListPartitionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListPartitionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPartitionsResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListPartitionsResponse): google.cloud.dataplex.v1.ListPartitionsResponse; + + /** + * Encodes the specified ListPartitionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsResponse.verify|verify} messages. + * @param message ListPartitionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListPartitionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPartitionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsResponse.verify|verify} messages. + * @param message ListPartitionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListPartitionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPartitionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPartitionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListPartitionsResponse; + + /** + * Decodes a ListPartitionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPartitionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListPartitionsResponse; + + /** + * Verifies a ListPartitionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPartitionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPartitionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListPartitionsResponse; + + /** + * Creates a plain object from a ListPartitionsResponse message. Also converts values to other types if specified. + * @param message ListPartitionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListPartitionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPartitionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetPartitionRequest. */ + interface IGetPartitionRequest { + + /** GetPartitionRequest name */ + name?: (string|null); + } + + /** Represents a GetPartitionRequest. */ + class GetPartitionRequest implements IGetPartitionRequest { + + /** + * Constructs a new GetPartitionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGetPartitionRequest); + + /** GetPartitionRequest name. */ + public name: string; + + /** + * Creates a new GetPartitionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPartitionRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGetPartitionRequest): google.cloud.dataplex.v1.GetPartitionRequest; + + /** + * Encodes the specified GetPartitionRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetPartitionRequest.verify|verify} messages. + * @param message GetPartitionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IGetPartitionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPartitionRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetPartitionRequest.verify|verify} messages. + * @param message GetPartitionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetPartitionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPartitionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPartitionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetPartitionRequest; + + /** + * Decodes a GetPartitionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPartitionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetPartitionRequest; + + /** + * Verifies a GetPartitionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetPartitionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPartitionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetPartitionRequest; + + /** + * Creates a plain object from a GetPartitionRequest message. Also converts values to other types if specified. + * @param message GetPartitionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GetPartitionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPartitionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Entity. */ + interface IEntity { + + /** Entity name */ + name?: (string|null); + + /** Entity displayName */ + displayName?: (string|null); + + /** Entity description */ + description?: (string|null); + + /** Entity createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Entity updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Entity id */ + id?: (string|null); + + /** Entity etag */ + etag?: (string|null); + + /** Entity type */ + type?: (google.cloud.dataplex.v1.Entity.Type|keyof typeof google.cloud.dataplex.v1.Entity.Type|null); + + /** Entity asset */ + asset?: (string|null); + + /** Entity dataPath */ + dataPath?: (string|null); + + /** Entity dataPathPattern */ + dataPathPattern?: (string|null); + + /** Entity catalogEntry */ + catalogEntry?: (string|null); + + /** Entity system */ + system?: (google.cloud.dataplex.v1.StorageSystem|keyof typeof google.cloud.dataplex.v1.StorageSystem|null); + + /** Entity format */ + format?: (google.cloud.dataplex.v1.IStorageFormat|null); + + /** Entity compatibility */ + compatibility?: (google.cloud.dataplex.v1.Entity.ICompatibilityStatus|null); + + /** Entity schema */ + schema?: (google.cloud.dataplex.v1.ISchema|null); + } + + /** Represents an Entity. */ + class Entity implements IEntity { + + /** + * Constructs a new Entity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IEntity); + + /** Entity name. */ + public name: string; + + /** Entity displayName. */ + public displayName: string; + + /** Entity description. */ + public description: string; + + /** Entity createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Entity updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Entity id. */ + public id: string; + + /** Entity etag. */ + public etag: string; + + /** Entity type. */ + public type: (google.cloud.dataplex.v1.Entity.Type|keyof typeof google.cloud.dataplex.v1.Entity.Type); + + /** Entity asset. */ + public asset: string; + + /** Entity dataPath. */ + public dataPath: string; + + /** Entity dataPathPattern. */ + public dataPathPattern: string; + + /** Entity catalogEntry. */ + public catalogEntry: string; + + /** Entity system. */ + public system: (google.cloud.dataplex.v1.StorageSystem|keyof typeof google.cloud.dataplex.v1.StorageSystem); + + /** Entity format. */ + public format?: (google.cloud.dataplex.v1.IStorageFormat|null); + + /** Entity compatibility. */ + public compatibility?: (google.cloud.dataplex.v1.Entity.ICompatibilityStatus|null); + + /** Entity schema. */ + public schema?: (google.cloud.dataplex.v1.ISchema|null); + + /** + * Creates a new Entity instance using the specified properties. + * @param [properties] Properties to set + * @returns Entity instance + */ + public static create(properties?: google.cloud.dataplex.v1.IEntity): google.cloud.dataplex.v1.Entity; + + /** + * Encodes the specified Entity message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.verify|verify} messages. + * @param message Entity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.verify|verify} messages. + * @param message Entity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Entity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Entity; + + /** + * Decodes an Entity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Entity; + + /** + * Verifies an Entity message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Entity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Entity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Entity; + + /** + * Creates a plain object from an Entity message. Also converts values to other types if specified. + * @param message Entity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Entity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Entity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Entity { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + TABLE = 1, + FILESET = 2 + } + + /** Properties of a CompatibilityStatus. */ + interface ICompatibilityStatus { + + /** CompatibilityStatus hiveMetastore */ + hiveMetastore?: (google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null); + + /** CompatibilityStatus bigquery */ + bigquery?: (google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null); + } + + /** Represents a CompatibilityStatus. */ + class CompatibilityStatus implements ICompatibilityStatus { + + /** + * Constructs a new CompatibilityStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Entity.ICompatibilityStatus); + + /** CompatibilityStatus hiveMetastore. */ + public hiveMetastore?: (google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null); + + /** CompatibilityStatus bigquery. */ + public bigquery?: (google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null); + + /** + * Creates a new CompatibilityStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns CompatibilityStatus instance + */ + public static create(properties?: google.cloud.dataplex.v1.Entity.ICompatibilityStatus): google.cloud.dataplex.v1.Entity.CompatibilityStatus; + + /** + * Encodes the specified CompatibilityStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify|verify} messages. + * @param message CompatibilityStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Entity.ICompatibilityStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CompatibilityStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify|verify} messages. + * @param message CompatibilityStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Entity.ICompatibilityStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompatibilityStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CompatibilityStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Entity.CompatibilityStatus; + + /** + * Decodes a CompatibilityStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CompatibilityStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Entity.CompatibilityStatus; + + /** + * Verifies a CompatibilityStatus message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CompatibilityStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CompatibilityStatus + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Entity.CompatibilityStatus; + + /** + * Creates a plain object from a CompatibilityStatus message. Also converts values to other types if specified. + * @param message CompatibilityStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Entity.CompatibilityStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CompatibilityStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace CompatibilityStatus { + + /** Properties of a Compatibility. */ + interface ICompatibility { + + /** Compatibility compatible */ + compatible?: (boolean|null); + + /** Compatibility reason */ + reason?: (string|null); + } + + /** Represents a Compatibility. */ + class Compatibility implements ICompatibility { + + /** + * Constructs a new Compatibility. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility); + + /** Compatibility compatible. */ + public compatible: boolean; + + /** Compatibility reason. */ + public reason: string; + + /** + * Creates a new Compatibility instance using the specified properties. + * @param [properties] Properties to set + * @returns Compatibility instance + */ + public static create(properties?: google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility): google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility; + + /** + * Encodes the specified Compatibility message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify|verify} messages. + * @param message Compatibility message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Compatibility message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify|verify} messages. + * @param message Compatibility message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Compatibility message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Compatibility + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility; + + /** + * Decodes a Compatibility message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Compatibility + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility; /** - * Constructs a new JsonOptions. - * @param [properties] Properties to set + * Verifies a Compatibility message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - constructor(properties?: google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions); + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Compatibility message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Compatibility + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility; + + /** + * Creates a plain object from a Compatibility message. Also converts values to other types if specified. + * @param message Compatibility + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Compatibility to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** Properties of a Partition. */ + interface IPartition { + + /** Partition name */ + name?: (string|null); + + /** Partition values */ + values?: (string[]|null); + + /** Partition location */ + location?: (string|null); + + /** Partition etag */ + etag?: (string|null); + } + + /** Represents a Partition. */ + class Partition implements IPartition { + + /** + * Constructs a new Partition. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IPartition); + + /** Partition name. */ + public name: string; + + /** Partition values. */ + public values: string[]; + + /** Partition location. */ + public location: string; + + /** Partition etag. */ + public etag: string; + + /** + * Creates a new Partition instance using the specified properties. + * @param [properties] Properties to set + * @returns Partition instance + */ + public static create(properties?: google.cloud.dataplex.v1.IPartition): google.cloud.dataplex.v1.Partition; + + /** + * Encodes the specified Partition message. Does not implicitly {@link google.cloud.dataplex.v1.Partition.verify|verify} messages. + * @param message Partition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IPartition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Partition message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Partition.verify|verify} messages. + * @param message Partition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IPartition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Partition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Partition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Partition; + + /** + * Decodes a Partition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Partition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Partition; + + /** + * Verifies a Partition message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Partition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Partition + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Partition; + + /** + * Creates a plain object from a Partition message. Also converts values to other types if specified. + * @param message Partition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Partition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Partition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Schema. */ + interface ISchema { + + /** Schema userManaged */ + userManaged?: (boolean|null); + + /** Schema fields */ + fields?: (google.cloud.dataplex.v1.Schema.ISchemaField[]|null); + + /** Schema partitionFields */ + partitionFields?: (google.cloud.dataplex.v1.Schema.IPartitionField[]|null); + + /** Schema partitionStyle */ + partitionStyle?: (google.cloud.dataplex.v1.Schema.PartitionStyle|keyof typeof google.cloud.dataplex.v1.Schema.PartitionStyle|null); + } + + /** Represents a Schema. */ + class Schema implements ISchema { + + /** + * Constructs a new Schema. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ISchema); + + /** Schema userManaged. */ + public userManaged: boolean; + + /** Schema fields. */ + public fields: google.cloud.dataplex.v1.Schema.ISchemaField[]; + + /** Schema partitionFields. */ + public partitionFields: google.cloud.dataplex.v1.Schema.IPartitionField[]; + + /** Schema partitionStyle. */ + public partitionStyle: (google.cloud.dataplex.v1.Schema.PartitionStyle|keyof typeof google.cloud.dataplex.v1.Schema.PartitionStyle); + + /** + * Creates a new Schema instance using the specified properties. + * @param [properties] Properties to set + * @returns Schema instance + */ + public static create(properties?: google.cloud.dataplex.v1.ISchema): google.cloud.dataplex.v1.Schema; + + /** + * Encodes the specified Schema message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.verify|verify} messages. + * @param message Schema message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ISchema, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Schema message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.verify|verify} messages. + * @param message Schema message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ISchema, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Schema message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Schema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Schema; + + /** + * Decodes a Schema message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Schema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Schema; + + /** + * Verifies a Schema message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Schema message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Schema + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Schema; + + /** + * Creates a plain object from a Schema message. Also converts values to other types if specified. + * @param message Schema + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Schema, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Schema to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Schema { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + BOOLEAN = 1, + BYTE = 2, + INT16 = 3, + INT32 = 4, + INT64 = 5, + FLOAT = 6, + DOUBLE = 7, + DECIMAL = 8, + STRING = 9, + BINARY = 10, + TIMESTAMP = 11, + DATE = 12, + TIME = 13, + RECORD = 14, + NULL = 100 + } + + /** Mode enum. */ + enum Mode { + MODE_UNSPECIFIED = 0, + REQUIRED = 1, + NULLABLE = 2, + REPEATED = 3 + } + + /** Properties of a SchemaField. */ + interface ISchemaField { + + /** SchemaField name */ + name?: (string|null); + + /** SchemaField description */ + description?: (string|null); + + /** SchemaField type */ + type?: (google.cloud.dataplex.v1.Schema.Type|keyof typeof google.cloud.dataplex.v1.Schema.Type|null); + + /** SchemaField mode */ + mode?: (google.cloud.dataplex.v1.Schema.Mode|keyof typeof google.cloud.dataplex.v1.Schema.Mode|null); + + /** SchemaField fields */ + fields?: (google.cloud.dataplex.v1.Schema.ISchemaField[]|null); + } + + /** Represents a SchemaField. */ + class SchemaField implements ISchemaField { + + /** + * Constructs a new SchemaField. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Schema.ISchemaField); + + /** SchemaField name. */ + public name: string; + + /** SchemaField description. */ + public description: string; + + /** SchemaField type. */ + public type: (google.cloud.dataplex.v1.Schema.Type|keyof typeof google.cloud.dataplex.v1.Schema.Type); + + /** SchemaField mode. */ + public mode: (google.cloud.dataplex.v1.Schema.Mode|keyof typeof google.cloud.dataplex.v1.Schema.Mode); + + /** SchemaField fields. */ + public fields: google.cloud.dataplex.v1.Schema.ISchemaField[]; + + /** + * Creates a new SchemaField instance using the specified properties. + * @param [properties] Properties to set + * @returns SchemaField instance + */ + public static create(properties?: google.cloud.dataplex.v1.Schema.ISchemaField): google.cloud.dataplex.v1.Schema.SchemaField; + + /** + * Encodes the specified SchemaField message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.SchemaField.verify|verify} messages. + * @param message SchemaField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Schema.ISchemaField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SchemaField message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.SchemaField.verify|verify} messages. + * @param message SchemaField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Schema.ISchemaField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SchemaField message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SchemaField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Schema.SchemaField; + + /** + * Decodes a SchemaField message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SchemaField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Schema.SchemaField; + + /** + * Verifies a SchemaField message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SchemaField message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SchemaField + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Schema.SchemaField; + + /** + * Creates a plain object from a SchemaField message. Also converts values to other types if specified. + * @param message SchemaField + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Schema.SchemaField, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SchemaField to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PartitionField. */ + interface IPartitionField { + + /** PartitionField name */ + name?: (string|null); + + /** PartitionField type */ + type?: (google.cloud.dataplex.v1.Schema.Type|keyof typeof google.cloud.dataplex.v1.Schema.Type|null); + } + + /** Represents a PartitionField. */ + class PartitionField implements IPartitionField { + + /** + * Constructs a new PartitionField. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Schema.IPartitionField); + + /** PartitionField name. */ + public name: string; + + /** PartitionField type. */ + public type: (google.cloud.dataplex.v1.Schema.Type|keyof typeof google.cloud.dataplex.v1.Schema.Type); + + /** + * Creates a new PartitionField instance using the specified properties. + * @param [properties] Properties to set + * @returns PartitionField instance + */ + public static create(properties?: google.cloud.dataplex.v1.Schema.IPartitionField): google.cloud.dataplex.v1.Schema.PartitionField; + + /** + * Encodes the specified PartitionField message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.PartitionField.verify|verify} messages. + * @param message PartitionField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Schema.IPartitionField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PartitionField message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.PartitionField.verify|verify} messages. + * @param message PartitionField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Schema.IPartitionField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PartitionField message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PartitionField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Schema.PartitionField; + + /** + * Decodes a PartitionField message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PartitionField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Schema.PartitionField; + + /** + * Verifies a PartitionField message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PartitionField message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PartitionField + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Schema.PartitionField; + + /** + * Creates a plain object from a PartitionField message. Also converts values to other types if specified. + * @param message PartitionField + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Schema.PartitionField, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PartitionField to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** PartitionStyle enum. */ + enum PartitionStyle { + PARTITION_STYLE_UNSPECIFIED = 0, + HIVE_COMPATIBLE = 1 + } + } + + /** Properties of a StorageFormat. */ + interface IStorageFormat { + + /** StorageFormat format */ + format?: (google.cloud.dataplex.v1.StorageFormat.Format|keyof typeof google.cloud.dataplex.v1.StorageFormat.Format|null); + + /** StorageFormat compressionFormat */ + compressionFormat?: (google.cloud.dataplex.v1.StorageFormat.CompressionFormat|keyof typeof google.cloud.dataplex.v1.StorageFormat.CompressionFormat|null); + + /** StorageFormat mimeType */ + mimeType?: (string|null); + + /** StorageFormat csv */ + csv?: (google.cloud.dataplex.v1.StorageFormat.ICsvOptions|null); + + /** StorageFormat json */ + json?: (google.cloud.dataplex.v1.StorageFormat.IJsonOptions|null); + } + + /** Represents a StorageFormat. */ + class StorageFormat implements IStorageFormat { + + /** + * Constructs a new StorageFormat. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IStorageFormat); + + /** StorageFormat format. */ + public format: (google.cloud.dataplex.v1.StorageFormat.Format|keyof typeof google.cloud.dataplex.v1.StorageFormat.Format); + + /** StorageFormat compressionFormat. */ + public compressionFormat: (google.cloud.dataplex.v1.StorageFormat.CompressionFormat|keyof typeof google.cloud.dataplex.v1.StorageFormat.CompressionFormat); + + /** StorageFormat mimeType. */ + public mimeType: string; + + /** StorageFormat csv. */ + public csv?: (google.cloud.dataplex.v1.StorageFormat.ICsvOptions|null); + + /** StorageFormat json. */ + public json?: (google.cloud.dataplex.v1.StorageFormat.IJsonOptions|null); + + /** StorageFormat options. */ + public options?: ("csv"|"json"); + + /** + * Creates a new StorageFormat instance using the specified properties. + * @param [properties] Properties to set + * @returns StorageFormat instance + */ + public static create(properties?: google.cloud.dataplex.v1.IStorageFormat): google.cloud.dataplex.v1.StorageFormat; + + /** + * Encodes the specified StorageFormat message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.verify|verify} messages. + * @param message StorageFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IStorageFormat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StorageFormat message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.verify|verify} messages. + * @param message StorageFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IStorageFormat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StorageFormat message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StorageFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.StorageFormat; + + /** + * Decodes a StorageFormat message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StorageFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.StorageFormat; + + /** + * Verifies a StorageFormat message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StorageFormat message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StorageFormat + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.StorageFormat; + + /** + * Creates a plain object from a StorageFormat message. Also converts values to other types if specified. + * @param message StorageFormat + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.StorageFormat, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StorageFormat to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace StorageFormat { + + /** Properties of a CsvOptions. */ + interface ICsvOptions { + + /** CsvOptions encoding */ + encoding?: (string|null); + + /** CsvOptions headerRows */ + headerRows?: (number|null); + + /** CsvOptions delimiter */ + delimiter?: (string|null); + + /** CsvOptions quote */ + quote?: (string|null); + } + + /** Represents a CsvOptions. */ + class CsvOptions implements ICsvOptions { + + /** + * Constructs a new CsvOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.StorageFormat.ICsvOptions); + + /** CsvOptions encoding. */ + public encoding: string; + + /** CsvOptions headerRows. */ + public headerRows: number; + + /** CsvOptions delimiter. */ + public delimiter: string; + + /** CsvOptions quote. */ + public quote: string; + + /** + * Creates a new CsvOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns CsvOptions instance + */ + public static create(properties?: google.cloud.dataplex.v1.StorageFormat.ICsvOptions): google.cloud.dataplex.v1.StorageFormat.CsvOptions; + + /** + * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify|verify} messages. + * @param message CsvOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.StorageFormat.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify|verify} messages. + * @param message CsvOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.StorageFormat.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CsvOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.StorageFormat.CsvOptions; + + /** + * Decodes a CsvOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.StorageFormat.CsvOptions; + + /** + * Verifies a CsvOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CsvOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.StorageFormat.CsvOptions; + + /** + * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. + * @param message CsvOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.StorageFormat.CsvOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CsvOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a JsonOptions. */ + interface IJsonOptions { + + /** JsonOptions encoding */ + encoding?: (string|null); + } + + /** Represents a JsonOptions. */ + class JsonOptions implements IJsonOptions { + + /** + * Constructs a new JsonOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.StorageFormat.IJsonOptions); + + /** JsonOptions encoding. */ + public encoding: string; + + /** + * Creates a new JsonOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns JsonOptions instance + */ + public static create(properties?: google.cloud.dataplex.v1.StorageFormat.IJsonOptions): google.cloud.dataplex.v1.StorageFormat.JsonOptions; + + /** + * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify|verify} messages. + * @param message JsonOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.StorageFormat.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify|verify} messages. + * @param message JsonOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.StorageFormat.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JsonOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.StorageFormat.JsonOptions; + + /** + * Decodes a JsonOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.StorageFormat.JsonOptions; + + /** + * Verifies a JsonOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JsonOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.StorageFormat.JsonOptions; + + /** + * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. + * @param message JsonOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.StorageFormat.JsonOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JsonOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Format enum. */ + enum Format { + FORMAT_UNSPECIFIED = 0, + PARQUET = 1, + AVRO = 2, + ORC = 3, + CSV = 100, + JSON = 101, + IMAGE = 200, + AUDIO = 201, + VIDEO = 202, + TEXT = 203, + TFRECORD = 204, + OTHER = 1000, + UNKNOWN = 1001 + } + + /** CompressionFormat enum. */ + enum CompressionFormat { + COMPRESSION_FORMAT_UNSPECIFIED = 0, + GZIP = 2, + BZIP2 = 3 + } + } + + /** StorageSystem enum. */ + enum StorageSystem { + STORAGE_SYSTEM_UNSPECIFIED = 0, + CLOUD_STORAGE = 1, + BIGQUERY = 2 + } + + /** Represents a DataplexService */ + class DataplexService extends $protobuf.rpc.Service { + + /** + * Constructs a new DataplexService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new DataplexService service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): DataplexService; + + /** + * Calls CreateLake. + * @param request CreateLakeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createLake(request: google.cloud.dataplex.v1.ICreateLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateLakeCallback): void; + + /** + * Calls CreateLake. + * @param request CreateLakeRequest message or plain object + * @returns Promise + */ + public createLake(request: google.cloud.dataplex.v1.ICreateLakeRequest): Promise; + + /** + * Calls UpdateLake. + * @param request UpdateLakeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateLake(request: google.cloud.dataplex.v1.IUpdateLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateLakeCallback): void; + + /** + * Calls UpdateLake. + * @param request UpdateLakeRequest message or plain object + * @returns Promise + */ + public updateLake(request: google.cloud.dataplex.v1.IUpdateLakeRequest): Promise; + + /** + * Calls DeleteLake. + * @param request DeleteLakeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteLake(request: google.cloud.dataplex.v1.IDeleteLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteLakeCallback): void; + + /** + * Calls DeleteLake. + * @param request DeleteLakeRequest message or plain object + * @returns Promise + */ + public deleteLake(request: google.cloud.dataplex.v1.IDeleteLakeRequest): Promise; + + /** + * Calls ListLakes. + * @param request ListLakesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListLakesResponse + */ + public listLakes(request: google.cloud.dataplex.v1.IListLakesRequest, callback: google.cloud.dataplex.v1.DataplexService.ListLakesCallback): void; + + /** + * Calls ListLakes. + * @param request ListLakesRequest message or plain object + * @returns Promise + */ + public listLakes(request: google.cloud.dataplex.v1.IListLakesRequest): Promise; + + /** + * Calls GetLake. + * @param request GetLakeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Lake + */ + public getLake(request: google.cloud.dataplex.v1.IGetLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.GetLakeCallback): void; + + /** + * Calls GetLake. + * @param request GetLakeRequest message or plain object + * @returns Promise + */ + public getLake(request: google.cloud.dataplex.v1.IGetLakeRequest): Promise; + + /** + * Calls ListLakeActions. + * @param request ListLakeActionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListActionsResponse + */ + public listLakeActions(request: google.cloud.dataplex.v1.IListLakeActionsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListLakeActionsCallback): void; + + /** + * Calls ListLakeActions. + * @param request ListLakeActionsRequest message or plain object + * @returns Promise + */ + public listLakeActions(request: google.cloud.dataplex.v1.IListLakeActionsRequest): Promise; + + /** + * Calls CreateZone. + * @param request CreateZoneRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createZone(request: google.cloud.dataplex.v1.ICreateZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateZoneCallback): void; + + /** + * Calls CreateZone. + * @param request CreateZoneRequest message or plain object + * @returns Promise + */ + public createZone(request: google.cloud.dataplex.v1.ICreateZoneRequest): Promise; + + /** + * Calls UpdateZone. + * @param request UpdateZoneRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateZone(request: google.cloud.dataplex.v1.IUpdateZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateZoneCallback): void; + + /** + * Calls UpdateZone. + * @param request UpdateZoneRequest message or plain object + * @returns Promise + */ + public updateZone(request: google.cloud.dataplex.v1.IUpdateZoneRequest): Promise; + + /** + * Calls DeleteZone. + * @param request DeleteZoneRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteZone(request: google.cloud.dataplex.v1.IDeleteZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteZoneCallback): void; + + /** + * Calls DeleteZone. + * @param request DeleteZoneRequest message or plain object + * @returns Promise + */ + public deleteZone(request: google.cloud.dataplex.v1.IDeleteZoneRequest): Promise; + + /** + * Calls ListZones. + * @param request ListZonesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListZonesResponse + */ + public listZones(request: google.cloud.dataplex.v1.IListZonesRequest, callback: google.cloud.dataplex.v1.DataplexService.ListZonesCallback): void; + + /** + * Calls ListZones. + * @param request ListZonesRequest message or plain object + * @returns Promise + */ + public listZones(request: google.cloud.dataplex.v1.IListZonesRequest): Promise; + + /** + * Calls GetZone. + * @param request GetZoneRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Zone + */ + public getZone(request: google.cloud.dataplex.v1.IGetZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.GetZoneCallback): void; + + /** + * Calls GetZone. + * @param request GetZoneRequest message or plain object + * @returns Promise + */ + public getZone(request: google.cloud.dataplex.v1.IGetZoneRequest): Promise; + + /** + * Calls ListZoneActions. + * @param request ListZoneActionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListActionsResponse + */ + public listZoneActions(request: google.cloud.dataplex.v1.IListZoneActionsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListZoneActionsCallback): void; - /** JsonOptions encoding. */ - public encoding: string; + /** + * Calls ListZoneActions. + * @param request ListZoneActionsRequest message or plain object + * @returns Promise + */ + public listZoneActions(request: google.cloud.dataplex.v1.IListZoneActionsRequest): Promise; - /** JsonOptions disableTypeInference. */ - public disableTypeInference: boolean; + /** + * Calls CreateAsset. + * @param request CreateAssetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createAsset(request: google.cloud.dataplex.v1.ICreateAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateAssetCallback): void; - /** - * Creates a new JsonOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns JsonOptions instance - */ - public static create(properties?: google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions): google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions; + /** + * Calls CreateAsset. + * @param request CreateAssetRequest message or plain object + * @returns Promise + */ + public createAsset(request: google.cloud.dataplex.v1.ICreateAssetRequest): Promise; - /** - * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.verify|verify} messages. - * @param message JsonOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Calls UpdateAsset. + * @param request UpdateAssetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateAsset(request: google.cloud.dataplex.v1.IUpdateAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateAssetCallback): void; - /** - * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.verify|verify} messages. - * @param message JsonOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Calls UpdateAsset. + * @param request UpdateAssetRequest message or plain object + * @returns Promise + */ + public updateAsset(request: google.cloud.dataplex.v1.IUpdateAssetRequest): Promise; - /** - * Decodes a JsonOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns JsonOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions; + /** + * Calls DeleteAsset. + * @param request DeleteAssetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteAsset(request: google.cloud.dataplex.v1.IDeleteAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteAssetCallback): void; - /** - * Decodes a JsonOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns JsonOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions; + /** + * Calls DeleteAsset. + * @param request DeleteAssetRequest message or plain object + * @returns Promise + */ + public deleteAsset(request: google.cloud.dataplex.v1.IDeleteAssetRequest): Promise; - /** - * Verifies a JsonOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Calls ListAssets. + * @param request ListAssetsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAssetsResponse + */ + public listAssets(request: google.cloud.dataplex.v1.IListAssetsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListAssetsCallback): void; - /** - * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns JsonOptions - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions; + /** + * Calls ListAssets. + * @param request ListAssetsRequest message or plain object + * @returns Promise + */ + public listAssets(request: google.cloud.dataplex.v1.IListAssetsRequest): Promise; - /** - * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. - * @param message JsonOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Calls GetAsset. + * @param request GetAssetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Asset + */ + public getAsset(request: google.cloud.dataplex.v1.IGetAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.GetAssetCallback): void; - /** - * Converts this JsonOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** + * Calls GetAsset. + * @param request GetAssetRequest message or plain object + * @returns Promise + */ + public getAsset(request: google.cloud.dataplex.v1.IGetAssetRequest): Promise; - /** Properties of a ResourceSpec. */ - interface IResourceSpec { + /** + * Calls ListAssetActions. + * @param request ListAssetActionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListActionsResponse + */ + public listAssetActions(request: google.cloud.dataplex.v1.IListAssetActionsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListAssetActionsCallback): void; - /** ResourceSpec name */ - name?: (string|null); + /** + * Calls ListAssetActions. + * @param request ListAssetActionsRequest message or plain object + * @returns Promise + */ + public listAssetActions(request: google.cloud.dataplex.v1.IListAssetActionsRequest): Promise; - /** ResourceSpec type */ - type?: (google.cloud.dataplex.v1.Asset.ResourceSpec.Type|keyof typeof google.cloud.dataplex.v1.Asset.ResourceSpec.Type|null); - } + /** + * Calls CreateTask. + * @param request CreateTaskRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createTask(request: google.cloud.dataplex.v1.ICreateTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateTaskCallback): void; - /** Represents a ResourceSpec. */ - class ResourceSpec implements IResourceSpec { + /** + * Calls CreateTask. + * @param request CreateTaskRequest message or plain object + * @returns Promise + */ + public createTask(request: google.cloud.dataplex.v1.ICreateTaskRequest): Promise; - /** - * Constructs a new ResourceSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Asset.IResourceSpec); + /** + * Calls UpdateTask. + * @param request UpdateTaskRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateTask(request: google.cloud.dataplex.v1.IUpdateTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateTaskCallback): void; - /** ResourceSpec name. */ - public name: string; + /** + * Calls UpdateTask. + * @param request UpdateTaskRequest message or plain object + * @returns Promise + */ + public updateTask(request: google.cloud.dataplex.v1.IUpdateTaskRequest): Promise; - /** ResourceSpec type. */ - public type: (google.cloud.dataplex.v1.Asset.ResourceSpec.Type|keyof typeof google.cloud.dataplex.v1.Asset.ResourceSpec.Type); + /** + * Calls DeleteTask. + * @param request DeleteTaskRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteTask(request: google.cloud.dataplex.v1.IDeleteTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteTaskCallback): void; - /** - * Creates a new ResourceSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceSpec instance - */ - public static create(properties?: google.cloud.dataplex.v1.Asset.IResourceSpec): google.cloud.dataplex.v1.Asset.ResourceSpec; + /** + * Calls DeleteTask. + * @param request DeleteTaskRequest message or plain object + * @returns Promise + */ + public deleteTask(request: google.cloud.dataplex.v1.IDeleteTaskRequest): Promise; - /** - * Encodes the specified ResourceSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceSpec.verify|verify} messages. - * @param message ResourceSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Asset.IResourceSpec, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Calls ListTasks. + * @param request ListTasksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListTasksResponse + */ + public listTasks(request: google.cloud.dataplex.v1.IListTasksRequest, callback: google.cloud.dataplex.v1.DataplexService.ListTasksCallback): void; + + /** + * Calls ListTasks. + * @param request ListTasksRequest message or plain object + * @returns Promise + */ + public listTasks(request: google.cloud.dataplex.v1.IListTasksRequest): Promise; + + /** + * Calls GetTask. + * @param request GetTaskRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Task + */ + public getTask(request: google.cloud.dataplex.v1.IGetTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.GetTaskCallback): void; + + /** + * Calls GetTask. + * @param request GetTaskRequest message or plain object + * @returns Promise + */ + public getTask(request: google.cloud.dataplex.v1.IGetTaskRequest): Promise; + + /** + * Calls ListJobs. + * @param request ListJobsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListJobsResponse + */ + public listJobs(request: google.cloud.dataplex.v1.IListJobsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListJobsCallback): void; + + /** + * Calls ListJobs. + * @param request ListJobsRequest message or plain object + * @returns Promise + */ + public listJobs(request: google.cloud.dataplex.v1.IListJobsRequest): Promise; - /** - * Encodes the specified ResourceSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceSpec.verify|verify} messages. - * @param message ResourceSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.IResourceSpec, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Calls GetJob. + * @param request GetJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Job + */ + public getJob(request: google.cloud.dataplex.v1.IGetJobRequest, callback: google.cloud.dataplex.v1.DataplexService.GetJobCallback): void; - /** - * Decodes a ResourceSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.ResourceSpec; + /** + * Calls GetJob. + * @param request GetJobRequest message or plain object + * @returns Promise + */ + public getJob(request: google.cloud.dataplex.v1.IGetJobRequest): Promise; - /** - * Decodes a ResourceSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.ResourceSpec; + /** + * Calls CancelJob. + * @param request CancelJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public cancelJob(request: google.cloud.dataplex.v1.ICancelJobRequest, callback: google.cloud.dataplex.v1.DataplexService.CancelJobCallback): void; - /** - * Verifies a ResourceSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Calls CancelJob. + * @param request CancelJobRequest message or plain object + * @returns Promise + */ + public cancelJob(request: google.cloud.dataplex.v1.ICancelJobRequest): Promise; - /** - * Creates a ResourceSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.ResourceSpec; + /** + * Calls CreateEnvironment. + * @param request CreateEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createEnvironment(request: google.cloud.dataplex.v1.ICreateEnvironmentRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateEnvironmentCallback): void; - /** - * Creates a plain object from a ResourceSpec message. Also converts values to other types if specified. - * @param message ResourceSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Asset.ResourceSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Calls CreateEnvironment. + * @param request CreateEnvironmentRequest message or plain object + * @returns Promise + */ + public createEnvironment(request: google.cloud.dataplex.v1.ICreateEnvironmentRequest): Promise; - /** - * Converts this ResourceSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Calls UpdateEnvironment. + * @param request UpdateEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateEnvironment(request: google.cloud.dataplex.v1.IUpdateEnvironmentRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateEnvironmentCallback): void; - namespace ResourceSpec { + /** + * Calls UpdateEnvironment. + * @param request UpdateEnvironmentRequest message or plain object + * @returns Promise + */ + public updateEnvironment(request: google.cloud.dataplex.v1.IUpdateEnvironmentRequest): Promise; - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - STORAGE_BUCKET = 1, - BIGQUERY_DATASET = 2 - } - } + /** + * Calls DeleteEnvironment. + * @param request DeleteEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteEnvironment(request: google.cloud.dataplex.v1.IDeleteEnvironmentRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteEnvironmentCallback): void; - /** Properties of a ResourceStatus. */ - interface IResourceStatus { + /** + * Calls DeleteEnvironment. + * @param request DeleteEnvironmentRequest message or plain object + * @returns Promise + */ + public deleteEnvironment(request: google.cloud.dataplex.v1.IDeleteEnvironmentRequest): Promise; - /** ResourceStatus state */ - state?: (google.cloud.dataplex.v1.Asset.ResourceStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.ResourceStatus.State|null); + /** + * Calls ListEnvironments. + * @param request ListEnvironmentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListEnvironmentsResponse + */ + public listEnvironments(request: google.cloud.dataplex.v1.IListEnvironmentsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListEnvironmentsCallback): void; - /** ResourceStatus message */ - message?: (string|null); + /** + * Calls ListEnvironments. + * @param request ListEnvironmentsRequest message or plain object + * @returns Promise + */ + public listEnvironments(request: google.cloud.dataplex.v1.IListEnvironmentsRequest): Promise; - /** ResourceStatus updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - } + /** + * Calls GetEnvironment. + * @param request GetEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Environment + */ + public getEnvironment(request: google.cloud.dataplex.v1.IGetEnvironmentRequest, callback: google.cloud.dataplex.v1.DataplexService.GetEnvironmentCallback): void; - /** Represents a ResourceStatus. */ - class ResourceStatus implements IResourceStatus { + /** + * Calls GetEnvironment. + * @param request GetEnvironmentRequest message or plain object + * @returns Promise + */ + public getEnvironment(request: google.cloud.dataplex.v1.IGetEnvironmentRequest): Promise; - /** - * Constructs a new ResourceStatus. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Asset.IResourceStatus); + /** + * Calls ListSessions. + * @param request ListSessionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListSessionsResponse + */ + public listSessions(request: google.cloud.dataplex.v1.IListSessionsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListSessionsCallback): void; - /** ResourceStatus state. */ - public state: (google.cloud.dataplex.v1.Asset.ResourceStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.ResourceStatus.State); + /** + * Calls ListSessions. + * @param request ListSessionsRequest message or plain object + * @returns Promise + */ + public listSessions(request: google.cloud.dataplex.v1.IListSessionsRequest): Promise; + } - /** ResourceStatus message. */ - public message: string; + namespace DataplexService { - /** ResourceStatus updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createLake}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateLakeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** - * Creates a new ResourceStatus instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceStatus instance - */ - public static create(properties?: google.cloud.dataplex.v1.Asset.IResourceStatus): google.cloud.dataplex.v1.Asset.ResourceStatus; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateLake}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateLakeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** - * Encodes the specified ResourceStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceStatus.verify|verify} messages. - * @param message ResourceStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Asset.IResourceStatus, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteLake}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteLakeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** - * Encodes the specified ResourceStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceStatus.verify|verify} messages. - * @param message ResourceStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.IResourceStatus, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listLakes}. + * @param error Error, if any + * @param [response] ListLakesResponse + */ + type ListLakesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListLakesResponse) => void; - /** - * Decodes a ResourceStatus message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.ResourceStatus; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getLake}. + * @param error Error, if any + * @param [response] Lake + */ + type GetLakeCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Lake) => void; - /** - * Decodes a ResourceStatus message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.ResourceStatus; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listLakeActions}. + * @param error Error, if any + * @param [response] ListActionsResponse + */ + type ListLakeActionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListActionsResponse) => void; - /** - * Verifies a ResourceStatus message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createZone}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateZoneCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** - * Creates a ResourceStatus message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceStatus - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.ResourceStatus; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateZone}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateZoneCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** - * Creates a plain object from a ResourceStatus message. Also converts values to other types if specified. - * @param message ResourceStatus - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Asset.ResourceStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteZone}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteZoneCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** - * Converts this ResourceStatus to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listZones}. + * @param error Error, if any + * @param [response] ListZonesResponse + */ + type ListZonesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListZonesResponse) => void; - namespace ResourceStatus { + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getZone}. + * @param error Error, if any + * @param [response] Zone + */ + type GetZoneCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Zone) => void; - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - READY = 1, - ERROR = 2 - } - } + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listZoneActions}. + * @param error Error, if any + * @param [response] ListActionsResponse + */ + type ListZoneActionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListActionsResponse) => void; - /** Properties of a DiscoveryStatus. */ - interface IDiscoveryStatus { + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createAsset}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateAssetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** DiscoveryStatus state */ - state?: (google.cloud.dataplex.v1.Asset.DiscoveryStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.DiscoveryStatus.State|null); + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateAsset}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateAssetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** DiscoveryStatus message */ - message?: (string|null); + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteAsset}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteAssetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** DiscoveryStatus updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listAssets}. + * @param error Error, if any + * @param [response] ListAssetsResponse + */ + type ListAssetsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListAssetsResponse) => void; - /** DiscoveryStatus lastRunTime */ - lastRunTime?: (google.protobuf.ITimestamp|null); + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getAsset}. + * @param error Error, if any + * @param [response] Asset + */ + type GetAssetCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Asset) => void; - /** DiscoveryStatus stats */ - stats?: (google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats|null); + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listAssetActions}. + * @param error Error, if any + * @param [response] ListActionsResponse + */ + type ListAssetActionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListActionsResponse) => void; - /** DiscoveryStatus lastRunDuration */ - lastRunDuration?: (google.protobuf.IDuration|null); - } + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createTask}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateTaskCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** Represents a DiscoveryStatus. */ - class DiscoveryStatus implements IDiscoveryStatus { + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateTask}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateTaskCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** - * Constructs a new DiscoveryStatus. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Asset.IDiscoveryStatus); + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteTask}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteTaskCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** DiscoveryStatus state. */ - public state: (google.cloud.dataplex.v1.Asset.DiscoveryStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.DiscoveryStatus.State); + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listTasks}. + * @param error Error, if any + * @param [response] ListTasksResponse + */ + type ListTasksCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListTasksResponse) => void; - /** DiscoveryStatus message. */ - public message: string; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getTask}. + * @param error Error, if any + * @param [response] Task + */ + type GetTaskCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Task) => void; - /** DiscoveryStatus updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listJobs}. + * @param error Error, if any + * @param [response] ListJobsResponse + */ + type ListJobsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListJobsResponse) => void; - /** DiscoveryStatus lastRunTime. */ - public lastRunTime?: (google.protobuf.ITimestamp|null); + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getJob}. + * @param error Error, if any + * @param [response] Job + */ + type GetJobCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Job) => void; - /** DiscoveryStatus stats. */ - public stats?: (google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats|null); + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#cancelJob}. + * @param error Error, if any + * @param [response] Empty + */ + type CancelJobCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - /** DiscoveryStatus lastRunDuration. */ - public lastRunDuration?: (google.protobuf.IDuration|null); + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createEnvironment}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** - * Creates a new DiscoveryStatus instance using the specified properties. - * @param [properties] Properties to set - * @returns DiscoveryStatus instance - */ - public static create(properties?: google.cloud.dataplex.v1.Asset.IDiscoveryStatus): google.cloud.dataplex.v1.Asset.DiscoveryStatus; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateEnvironment}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** - * Encodes the specified DiscoveryStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.verify|verify} messages. - * @param message DiscoveryStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Asset.IDiscoveryStatus, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteEnvironment}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** - * Encodes the specified DiscoveryStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.verify|verify} messages. - * @param message DiscoveryStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.IDiscoveryStatus, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listEnvironments}. + * @param error Error, if any + * @param [response] ListEnvironmentsResponse + */ + type ListEnvironmentsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListEnvironmentsResponse) => void; - /** - * Decodes a DiscoveryStatus message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DiscoveryStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.DiscoveryStatus; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getEnvironment}. + * @param error Error, if any + * @param [response] Environment + */ + type GetEnvironmentCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Environment) => void; - /** - * Decodes a DiscoveryStatus message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DiscoveryStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.DiscoveryStatus; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listSessions}. + * @param error Error, if any + * @param [response] ListSessionsResponse + */ + type ListSessionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListSessionsResponse) => void; + } - /** - * Verifies a DiscoveryStatus message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Properties of a CreateLakeRequest. */ + interface ICreateLakeRequest { - /** - * Creates a DiscoveryStatus message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DiscoveryStatus - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.DiscoveryStatus; + /** CreateLakeRequest parent */ + parent?: (string|null); - /** - * Creates a plain object from a DiscoveryStatus message. Also converts values to other types if specified. - * @param message DiscoveryStatus - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Asset.DiscoveryStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** CreateLakeRequest lakeId */ + lakeId?: (string|null); - /** - * Converts this DiscoveryStatus to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** CreateLakeRequest lake */ + lake?: (google.cloud.dataplex.v1.ILake|null); - namespace DiscoveryStatus { + /** CreateLakeRequest validateOnly */ + validateOnly?: (boolean|null); + } - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - SCHEDULED = 1, - IN_PROGRESS = 2, - PAUSED = 3, - DISABLED = 5 - } + /** Represents a CreateLakeRequest. */ + class CreateLakeRequest implements ICreateLakeRequest { - /** Properties of a Stats. */ - interface IStats { + /** + * Constructs a new CreateLakeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ICreateLakeRequest); + + /** CreateLakeRequest parent. */ + public parent: string; - /** Stats dataItems */ - dataItems?: (number|Long|string|null); + /** CreateLakeRequest lakeId. */ + public lakeId: string; - /** Stats dataSize */ - dataSize?: (number|Long|string|null); + /** CreateLakeRequest lake. */ + public lake?: (google.cloud.dataplex.v1.ILake|null); - /** Stats tables */ - tables?: (number|Long|string|null); + /** CreateLakeRequest validateOnly. */ + public validateOnly: boolean; - /** Stats filesets */ - filesets?: (number|Long|string|null); - } + /** + * Creates a new CreateLakeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateLakeRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.ICreateLakeRequest): google.cloud.dataplex.v1.CreateLakeRequest; - /** Represents a Stats. */ - class Stats implements IStats { + /** + * Encodes the specified CreateLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateLakeRequest.verify|verify} messages. + * @param message CreateLakeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ICreateLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new Stats. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats); + /** + * Encodes the specified CreateLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateLakeRequest.verify|verify} messages. + * @param message CreateLakeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Stats dataItems. */ - public dataItems: (number|Long|string); + /** + * Decodes a CreateLakeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateLakeRequest; - /** Stats dataSize. */ - public dataSize: (number|Long|string); + /** + * Decodes a CreateLakeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateLakeRequest; - /** Stats tables. */ - public tables: (number|Long|string); + /** + * Verifies a CreateLakeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Stats filesets. */ - public filesets: (number|Long|string); + /** + * Creates a CreateLakeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateLakeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateLakeRequest; - /** - * Creates a new Stats instance using the specified properties. - * @param [properties] Properties to set - * @returns Stats instance - */ - public static create(properties?: google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats): google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats; + /** + * Creates a plain object from a CreateLakeRequest message. Also converts values to other types if specified. + * @param message CreateLakeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.CreateLakeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified Stats message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.verify|verify} messages. - * @param message Stats message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this CreateLakeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Encodes the specified Stats message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.verify|verify} messages. - * @param message Stats message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of an UpdateLakeRequest. */ + interface IUpdateLakeRequest { - /** - * Decodes a Stats message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Stats - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats; + /** UpdateLakeRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); - /** - * Decodes a Stats message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Stats - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats; + /** UpdateLakeRequest lake */ + lake?: (google.cloud.dataplex.v1.ILake|null); - /** - * Verifies a Stats message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** UpdateLakeRequest validateOnly */ + validateOnly?: (boolean|null); + } - /** - * Creates a Stats message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Stats - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats; + /** Represents an UpdateLakeRequest. */ + class UpdateLakeRequest implements IUpdateLakeRequest { - /** - * Creates a plain object from a Stats message. Also converts values to other types if specified. - * @param message Stats - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Constructs a new UpdateLakeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IUpdateLakeRequest); - /** - * Converts this Stats to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } + /** UpdateLakeRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - ACTIVE = 1, - CREATING = 2, - DELETING = 3, - ACTION_REQUIRED = 4 - } + /** UpdateLakeRequest lake. */ + public lake?: (google.cloud.dataplex.v1.ILake|null); - /** Represents a DataplexService */ - class DataplexService extends $protobuf.rpc.Service { + /** UpdateLakeRequest validateOnly. */ + public validateOnly: boolean; /** - * Constructs a new DataplexService service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited + * Creates a new UpdateLakeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateLakeRequest instance */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + public static create(properties?: google.cloud.dataplex.v1.IUpdateLakeRequest): google.cloud.dataplex.v1.UpdateLakeRequest; /** - * Creates new DataplexService service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. + * Encodes the specified UpdateLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateLakeRequest.verify|verify} messages. + * @param message UpdateLakeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): DataplexService; + public static encode(message: google.cloud.dataplex.v1.IUpdateLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls CreateLake. - * @param request CreateLakeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Encodes the specified UpdateLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateLakeRequest.verify|verify} messages. + * @param message UpdateLakeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public createLake(request: google.cloud.dataplex.v1.ICreateLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateLakeCallback): void; + public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls CreateLake. - * @param request CreateLakeRequest message or plain object - * @returns Promise + * Decodes an UpdateLakeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createLake(request: google.cloud.dataplex.v1.ICreateLakeRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateLakeRequest; /** - * Calls UpdateLake. - * @param request UpdateLakeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Decodes an UpdateLakeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public updateLake(request: google.cloud.dataplex.v1.IUpdateLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateLakeCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateLakeRequest; /** - * Calls UpdateLake. - * @param request UpdateLakeRequest message or plain object - * @returns Promise + * Verifies an UpdateLakeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public updateLake(request: google.cloud.dataplex.v1.IUpdateLakeRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls DeleteLake. - * @param request DeleteLakeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Creates an UpdateLakeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateLakeRequest */ - public deleteLake(request: google.cloud.dataplex.v1.IDeleteLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteLakeCallback): void; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateLakeRequest; /** - * Calls DeleteLake. - * @param request DeleteLakeRequest message or plain object - * @returns Promise + * Creates a plain object from an UpdateLakeRequest message. Also converts values to other types if specified. + * @param message UpdateLakeRequest + * @param [options] Conversion options + * @returns Plain object */ - public deleteLake(request: google.cloud.dataplex.v1.IDeleteLakeRequest): Promise; + public static toObject(message: google.cloud.dataplex.v1.UpdateLakeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls ListLakes. - * @param request ListLakesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListLakesResponse + * Converts this UpdateLakeRequest to JSON. + * @returns JSON object */ - public listLakes(request: google.cloud.dataplex.v1.IListLakesRequest, callback: google.cloud.dataplex.v1.DataplexService.ListLakesCallback): void; + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteLakeRequest. */ + interface IDeleteLakeRequest { + + /** DeleteLakeRequest name */ + name?: (string|null); + } + + /** Represents a DeleteLakeRequest. */ + class DeleteLakeRequest implements IDeleteLakeRequest { /** - * Calls ListLakes. - * @param request ListLakesRequest message or plain object - * @returns Promise + * Constructs a new DeleteLakeRequest. + * @param [properties] Properties to set */ - public listLakes(request: google.cloud.dataplex.v1.IListLakesRequest): Promise; + constructor(properties?: google.cloud.dataplex.v1.IDeleteLakeRequest); + + /** DeleteLakeRequest name. */ + public name: string; /** - * Calls GetLake. - * @param request GetLakeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Lake + * Creates a new DeleteLakeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteLakeRequest instance */ - public getLake(request: google.cloud.dataplex.v1.IGetLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.GetLakeCallback): void; + public static create(properties?: google.cloud.dataplex.v1.IDeleteLakeRequest): google.cloud.dataplex.v1.DeleteLakeRequest; /** - * Calls GetLake. - * @param request GetLakeRequest message or plain object - * @returns Promise + * Encodes the specified DeleteLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteLakeRequest.verify|verify} messages. + * @param message DeleteLakeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getLake(request: google.cloud.dataplex.v1.IGetLakeRequest): Promise; + public static encode(message: google.cloud.dataplex.v1.IDeleteLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListLakeActions. - * @param request ListLakeActionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListActionsResponse + * Encodes the specified DeleteLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteLakeRequest.verify|verify} messages. + * @param message DeleteLakeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listLakeActions(request: google.cloud.dataplex.v1.IListLakeActionsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListLakeActionsCallback): void; + public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListLakeActions. - * @param request ListLakeActionsRequest message or plain object - * @returns Promise + * Decodes a DeleteLakeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listLakeActions(request: google.cloud.dataplex.v1.IListLakeActionsRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteLakeRequest; /** - * Calls CreateZone. - * @param request CreateZoneRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Decodes a DeleteLakeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createZone(request: google.cloud.dataplex.v1.ICreateZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateZoneCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteLakeRequest; /** - * Calls CreateZone. - * @param request CreateZoneRequest message or plain object - * @returns Promise + * Verifies a DeleteLakeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public createZone(request: google.cloud.dataplex.v1.ICreateZoneRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls UpdateZone. - * @param request UpdateZoneRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Creates a DeleteLakeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteLakeRequest */ - public updateZone(request: google.cloud.dataplex.v1.IUpdateZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateZoneCallback): void; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteLakeRequest; /** - * Calls UpdateZone. - * @param request UpdateZoneRequest message or plain object - * @returns Promise + * Creates a plain object from a DeleteLakeRequest message. Also converts values to other types if specified. + * @param message DeleteLakeRequest + * @param [options] Conversion options + * @returns Plain object */ - public updateZone(request: google.cloud.dataplex.v1.IUpdateZoneRequest): Promise; + public static toObject(message: google.cloud.dataplex.v1.DeleteLakeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls DeleteZone. - * @param request DeleteZoneRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Converts this DeleteLakeRequest to JSON. + * @returns JSON object */ - public deleteZone(request: google.cloud.dataplex.v1.IDeleteZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteZoneCallback): void; + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListLakesRequest. */ + interface IListLakesRequest { + + /** ListLakesRequest parent */ + parent?: (string|null); + + /** ListLakesRequest pageSize */ + pageSize?: (number|null); + + /** ListLakesRequest pageToken */ + pageToken?: (string|null); + + /** ListLakesRequest filter */ + filter?: (string|null); + + /** ListLakesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListLakesRequest. */ + class ListLakesRequest implements IListLakesRequest { /** - * Calls DeleteZone. - * @param request DeleteZoneRequest message or plain object - * @returns Promise + * Constructs a new ListLakesRequest. + * @param [properties] Properties to set */ - public deleteZone(request: google.cloud.dataplex.v1.IDeleteZoneRequest): Promise; + constructor(properties?: google.cloud.dataplex.v1.IListLakesRequest); + + /** ListLakesRequest parent. */ + public parent: string; + + /** ListLakesRequest pageSize. */ + public pageSize: number; + + /** ListLakesRequest pageToken. */ + public pageToken: string; + + /** ListLakesRequest filter. */ + public filter: string; + + /** ListLakesRequest orderBy. */ + public orderBy: string; /** - * Calls ListZones. - * @param request ListZonesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListZonesResponse + * Creates a new ListLakesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLakesRequest instance */ - public listZones(request: google.cloud.dataplex.v1.IListZonesRequest, callback: google.cloud.dataplex.v1.DataplexService.ListZonesCallback): void; + public static create(properties?: google.cloud.dataplex.v1.IListLakesRequest): google.cloud.dataplex.v1.ListLakesRequest; /** - * Calls ListZones. - * @param request ListZonesRequest message or plain object - * @returns Promise + * Encodes the specified ListLakesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesRequest.verify|verify} messages. + * @param message ListLakesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listZones(request: google.cloud.dataplex.v1.IListZonesRequest): Promise; + public static encode(message: google.cloud.dataplex.v1.IListLakesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetZone. - * @param request GetZoneRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Zone + * Encodes the specified ListLakesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesRequest.verify|verify} messages. + * @param message ListLakesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getZone(request: google.cloud.dataplex.v1.IGetZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.GetZoneCallback): void; + public static encodeDelimited(message: google.cloud.dataplex.v1.IListLakesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetZone. - * @param request GetZoneRequest message or plain object - * @returns Promise + * Decodes a ListLakesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLakesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public getZone(request: google.cloud.dataplex.v1.IGetZoneRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListLakesRequest; /** - * Calls ListZoneActions. - * @param request ListZoneActionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListActionsResponse + * Decodes a ListLakesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLakesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listZoneActions(request: google.cloud.dataplex.v1.IListZoneActionsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListZoneActionsCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListLakesRequest; /** - * Calls ListZoneActions. - * @param request ListZoneActionsRequest message or plain object - * @returns Promise + * Verifies a ListLakesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public listZoneActions(request: google.cloud.dataplex.v1.IListZoneActionsRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls CreateAsset. - * @param request CreateAssetRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Creates a ListLakesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLakesRequest */ - public createAsset(request: google.cloud.dataplex.v1.ICreateAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateAssetCallback): void; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListLakesRequest; /** - * Calls CreateAsset. - * @param request CreateAssetRequest message or plain object - * @returns Promise + * Creates a plain object from a ListLakesRequest message. Also converts values to other types if specified. + * @param message ListLakesRequest + * @param [options] Conversion options + * @returns Plain object */ - public createAsset(request: google.cloud.dataplex.v1.ICreateAssetRequest): Promise; + public static toObject(message: google.cloud.dataplex.v1.ListLakesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls UpdateAsset. - * @param request UpdateAssetRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Converts this ListLakesRequest to JSON. + * @returns JSON object */ - public updateAsset(request: google.cloud.dataplex.v1.IUpdateAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateAssetCallback): void; + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListLakesResponse. */ + interface IListLakesResponse { + + /** ListLakesResponse lakes */ + lakes?: (google.cloud.dataplex.v1.ILake[]|null); + + /** ListLakesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListLakesResponse unreachableLocations */ + unreachableLocations?: (string[]|null); + } + + /** Represents a ListLakesResponse. */ + class ListLakesResponse implements IListLakesResponse { /** - * Calls UpdateAsset. - * @param request UpdateAssetRequest message or plain object - * @returns Promise + * Constructs a new ListLakesResponse. + * @param [properties] Properties to set */ - public updateAsset(request: google.cloud.dataplex.v1.IUpdateAssetRequest): Promise; + constructor(properties?: google.cloud.dataplex.v1.IListLakesResponse); - /** - * Calls DeleteAsset. - * @param request DeleteAssetRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteAsset(request: google.cloud.dataplex.v1.IDeleteAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteAssetCallback): void; + /** ListLakesResponse lakes. */ + public lakes: google.cloud.dataplex.v1.ILake[]; - /** - * Calls DeleteAsset. - * @param request DeleteAssetRequest message or plain object - * @returns Promise - */ - public deleteAsset(request: google.cloud.dataplex.v1.IDeleteAssetRequest): Promise; + /** ListLakesResponse nextPageToken. */ + public nextPageToken: string; - /** - * Calls ListAssets. - * @param request ListAssetsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListAssetsResponse - */ - public listAssets(request: google.cloud.dataplex.v1.IListAssetsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListAssetsCallback): void; + /** ListLakesResponse unreachableLocations. */ + public unreachableLocations: string[]; /** - * Calls ListAssets. - * @param request ListAssetsRequest message or plain object - * @returns Promise + * Creates a new ListLakesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLakesResponse instance */ - public listAssets(request: google.cloud.dataplex.v1.IListAssetsRequest): Promise; + public static create(properties?: google.cloud.dataplex.v1.IListLakesResponse): google.cloud.dataplex.v1.ListLakesResponse; /** - * Calls GetAsset. - * @param request GetAssetRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Asset + * Encodes the specified ListLakesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesResponse.verify|verify} messages. + * @param message ListLakesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getAsset(request: google.cloud.dataplex.v1.IGetAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.GetAssetCallback): void; + public static encode(message: google.cloud.dataplex.v1.IListLakesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetAsset. - * @param request GetAssetRequest message or plain object - * @returns Promise + * Encodes the specified ListLakesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesResponse.verify|verify} messages. + * @param message ListLakesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getAsset(request: google.cloud.dataplex.v1.IGetAssetRequest): Promise; + public static encodeDelimited(message: google.cloud.dataplex.v1.IListLakesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListAssetActions. - * @param request ListAssetActionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListActionsResponse + * Decodes a ListLakesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLakesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listAssetActions(request: google.cloud.dataplex.v1.IListAssetActionsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListAssetActionsCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListLakesResponse; /** - * Calls ListAssetActions. - * @param request ListAssetActionsRequest message or plain object - * @returns Promise + * Decodes a ListLakesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLakesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listAssetActions(request: google.cloud.dataplex.v1.IListAssetActionsRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListLakesResponse; /** - * Calls CreateTask. - * @param request CreateTaskRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Verifies a ListLakesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public createTask(request: google.cloud.dataplex.v1.ICreateTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateTaskCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls CreateTask. - * @param request CreateTaskRequest message or plain object - * @returns Promise + * Creates a ListLakesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLakesResponse */ - public createTask(request: google.cloud.dataplex.v1.ICreateTaskRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListLakesResponse; /** - * Calls UpdateTask. - * @param request UpdateTaskRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Creates a plain object from a ListLakesResponse message. Also converts values to other types if specified. + * @param message ListLakesResponse + * @param [options] Conversion options + * @returns Plain object */ - public updateTask(request: google.cloud.dataplex.v1.IUpdateTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateTaskCallback): void; + public static toObject(message: google.cloud.dataplex.v1.ListLakesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls UpdateTask. - * @param request UpdateTaskRequest message or plain object - * @returns Promise + * Converts this ListLakesResponse to JSON. + * @returns JSON object */ - public updateTask(request: google.cloud.dataplex.v1.IUpdateTaskRequest): Promise; + public toJSON(): { [k: string]: any }; + } - /** - * Calls DeleteTask. - * @param request DeleteTaskRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteTask(request: google.cloud.dataplex.v1.IDeleteTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteTaskCallback): void; + /** Properties of a ListLakeActionsRequest. */ + interface IListLakeActionsRequest { - /** - * Calls DeleteTask. - * @param request DeleteTaskRequest message or plain object - * @returns Promise - */ - public deleteTask(request: google.cloud.dataplex.v1.IDeleteTaskRequest): Promise; + /** ListLakeActionsRequest parent */ + parent?: (string|null); + + /** ListLakeActionsRequest pageSize */ + pageSize?: (number|null); + + /** ListLakeActionsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListLakeActionsRequest. */ + class ListLakeActionsRequest implements IListLakeActionsRequest { /** - * Calls ListTasks. - * @param request ListTasksRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListTasksResponse + * Constructs a new ListLakeActionsRequest. + * @param [properties] Properties to set */ - public listTasks(request: google.cloud.dataplex.v1.IListTasksRequest, callback: google.cloud.dataplex.v1.DataplexService.ListTasksCallback): void; + constructor(properties?: google.cloud.dataplex.v1.IListLakeActionsRequest); + + /** ListLakeActionsRequest parent. */ + public parent: string; + + /** ListLakeActionsRequest pageSize. */ + public pageSize: number; + + /** ListLakeActionsRequest pageToken. */ + public pageToken: string; /** - * Calls ListTasks. - * @param request ListTasksRequest message or plain object - * @returns Promise + * Creates a new ListLakeActionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLakeActionsRequest instance */ - public listTasks(request: google.cloud.dataplex.v1.IListTasksRequest): Promise; + public static create(properties?: google.cloud.dataplex.v1.IListLakeActionsRequest): google.cloud.dataplex.v1.ListLakeActionsRequest; /** - * Calls GetTask. - * @param request GetTaskRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Task + * Encodes the specified ListLakeActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakeActionsRequest.verify|verify} messages. + * @param message ListLakeActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getTask(request: google.cloud.dataplex.v1.IGetTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.GetTaskCallback): void; + public static encode(message: google.cloud.dataplex.v1.IListLakeActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetTask. - * @param request GetTaskRequest message or plain object - * @returns Promise + * Encodes the specified ListLakeActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakeActionsRequest.verify|verify} messages. + * @param message ListLakeActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getTask(request: google.cloud.dataplex.v1.IGetTaskRequest): Promise; + public static encodeDelimited(message: google.cloud.dataplex.v1.IListLakeActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListJobs. - * @param request ListJobsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListJobsResponse + * Decodes a ListLakeActionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLakeActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listJobs(request: google.cloud.dataplex.v1.IListJobsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListJobsCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListLakeActionsRequest; /** - * Calls ListJobs. - * @param request ListJobsRequest message or plain object - * @returns Promise + * Decodes a ListLakeActionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLakeActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listJobs(request: google.cloud.dataplex.v1.IListJobsRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListLakeActionsRequest; /** - * Calls GetJob. - * @param request GetJobRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Job + * Verifies a ListLakeActionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public getJob(request: google.cloud.dataplex.v1.IGetJobRequest, callback: google.cloud.dataplex.v1.DataplexService.GetJobCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls GetJob. - * @param request GetJobRequest message or plain object - * @returns Promise + * Creates a ListLakeActionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLakeActionsRequest */ - public getJob(request: google.cloud.dataplex.v1.IGetJobRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListLakeActionsRequest; /** - * Calls CancelJob. - * @param request CancelJobRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Creates a plain object from a ListLakeActionsRequest message. Also converts values to other types if specified. + * @param message ListLakeActionsRequest + * @param [options] Conversion options + * @returns Plain object */ - public cancelJob(request: google.cloud.dataplex.v1.ICancelJobRequest, callback: google.cloud.dataplex.v1.DataplexService.CancelJobCallback): void; + public static toObject(message: google.cloud.dataplex.v1.ListLakeActionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls CancelJob. - * @param request CancelJobRequest message or plain object - * @returns Promise + * Converts this ListLakeActionsRequest to JSON. + * @returns JSON object */ - public cancelJob(request: google.cloud.dataplex.v1.ICancelJobRequest): Promise; + public toJSON(): { [k: string]: any }; } - namespace DataplexService { + /** Properties of a ListActionsResponse. */ + interface IListActionsResponse { - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createLake}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateLakeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** ListActionsResponse actions */ + actions?: (google.cloud.dataplex.v1.IAction[]|null); - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateLake}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateLakeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** ListActionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListActionsResponse. */ + class ListActionsResponse implements IListActionsResponse { /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteLake}. - * @param error Error, if any - * @param [response] Operation + * Constructs a new ListActionsResponse. + * @param [properties] Properties to set */ - type DeleteLakeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + constructor(properties?: google.cloud.dataplex.v1.IListActionsResponse); - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listLakes}. - * @param error Error, if any - * @param [response] ListLakesResponse - */ - type ListLakesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListLakesResponse) => void; + /** ListActionsResponse actions. */ + public actions: google.cloud.dataplex.v1.IAction[]; - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getLake}. - * @param error Error, if any - * @param [response] Lake - */ - type GetLakeCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Lake) => void; + /** ListActionsResponse nextPageToken. */ + public nextPageToken: string; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listLakeActions}. - * @param error Error, if any - * @param [response] ListActionsResponse + * Creates a new ListActionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListActionsResponse instance */ - type ListLakeActionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListActionsResponse) => void; + public static create(properties?: google.cloud.dataplex.v1.IListActionsResponse): google.cloud.dataplex.v1.ListActionsResponse; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createZone}. - * @param error Error, if any - * @param [response] Operation + * Encodes the specified ListActionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListActionsResponse.verify|verify} messages. + * @param message ListActionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type CreateZoneCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static encode(message: google.cloud.dataplex.v1.IListActionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateZone}. - * @param error Error, if any - * @param [response] Operation + * Encodes the specified ListActionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListActionsResponse.verify|verify} messages. + * @param message ListActionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type UpdateZoneCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static encodeDelimited(message: google.cloud.dataplex.v1.IListActionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteZone}. - * @param error Error, if any - * @param [response] Operation + * Decodes a ListActionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type DeleteZoneCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListActionsResponse; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listZones}. - * @param error Error, if any - * @param [response] ListZonesResponse + * Decodes a ListActionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type ListZonesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListZonesResponse) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListActionsResponse; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getZone}. - * @param error Error, if any - * @param [response] Zone + * Verifies a ListActionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type GetZoneCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Zone) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listZoneActions}. - * @param error Error, if any - * @param [response] ListActionsResponse + * Creates a ListActionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListActionsResponse */ - type ListZoneActionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListActionsResponse) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListActionsResponse; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createAsset}. - * @param error Error, if any - * @param [response] Operation + * Creates a plain object from a ListActionsResponse message. Also converts values to other types if specified. + * @param message ListActionsResponse + * @param [options] Conversion options + * @returns Plain object */ - type CreateAssetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static toObject(message: google.cloud.dataplex.v1.ListActionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateAsset}. - * @param error Error, if any - * @param [response] Operation + * Converts this ListActionsResponse to JSON. + * @returns JSON object */ - type UpdateAssetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public toJSON(): { [k: string]: any }; + } - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteAsset}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteAssetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** Properties of a GetLakeRequest. */ + interface IGetLakeRequest { - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listAssets}. - * @param error Error, if any - * @param [response] ListAssetsResponse - */ - type ListAssetsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListAssetsResponse) => void; + /** GetLakeRequest name */ + name?: (string|null); + } + + /** Represents a GetLakeRequest. */ + class GetLakeRequest implements IGetLakeRequest { /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getAsset}. - * @param error Error, if any - * @param [response] Asset + * Constructs a new GetLakeRequest. + * @param [properties] Properties to set */ - type GetAssetCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Asset) => void; + constructor(properties?: google.cloud.dataplex.v1.IGetLakeRequest); + + /** GetLakeRequest name. */ + public name: string; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listAssetActions}. - * @param error Error, if any - * @param [response] ListActionsResponse + * Creates a new GetLakeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetLakeRequest instance */ - type ListAssetActionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListActionsResponse) => void; + public static create(properties?: google.cloud.dataplex.v1.IGetLakeRequest): google.cloud.dataplex.v1.GetLakeRequest; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createTask}. - * @param error Error, if any - * @param [response] Operation + * Encodes the specified GetLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetLakeRequest.verify|verify} messages. + * @param message GetLakeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type CreateTaskCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static encode(message: google.cloud.dataplex.v1.IGetLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateTask}. - * @param error Error, if any - * @param [response] Operation + * Encodes the specified GetLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetLakeRequest.verify|verify} messages. + * @param message GetLakeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type UpdateTaskCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteTask}. - * @param error Error, if any - * @param [response] Operation + * Decodes a GetLakeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type DeleteTaskCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetLakeRequest; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listTasks}. - * @param error Error, if any - * @param [response] ListTasksResponse + * Decodes a GetLakeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type ListTasksCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListTasksResponse) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetLakeRequest; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getTask}. - * @param error Error, if any - * @param [response] Task + * Verifies a GetLakeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type GetTaskCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Task) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listJobs}. - * @param error Error, if any - * @param [response] ListJobsResponse + * Creates a GetLakeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetLakeRequest */ - type ListJobsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListJobsResponse) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetLakeRequest; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getJob}. - * @param error Error, if any - * @param [response] Job + * Creates a plain object from a GetLakeRequest message. Also converts values to other types if specified. + * @param message GetLakeRequest + * @param [options] Conversion options + * @returns Plain object */ - type GetJobCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Job) => void; + public static toObject(message: google.cloud.dataplex.v1.GetLakeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#cancelJob}. - * @param error Error, if any - * @param [response] Empty + * Converts this GetLakeRequest to JSON. + * @returns JSON object */ - type CancelJobCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public toJSON(): { [k: string]: any }; } - /** Properties of a CreateLakeRequest. */ - interface ICreateLakeRequest { + /** Properties of a CreateZoneRequest. */ + interface ICreateZoneRequest { - /** CreateLakeRequest parent */ + /** CreateZoneRequest parent */ parent?: (string|null); - /** CreateLakeRequest lakeId */ - lakeId?: (string|null); + /** CreateZoneRequest zoneId */ + zoneId?: (string|null); - /** CreateLakeRequest lake */ - lake?: (google.cloud.dataplex.v1.ILake|null); + /** CreateZoneRequest zone */ + zone?: (google.cloud.dataplex.v1.IZone|null); - /** CreateLakeRequest validateOnly */ + /** CreateZoneRequest validateOnly */ validateOnly?: (boolean|null); } - /** Represents a CreateLakeRequest. */ - class CreateLakeRequest implements ICreateLakeRequest { + /** Represents a CreateZoneRequest. */ + class CreateZoneRequest implements ICreateZoneRequest { /** - * Constructs a new CreateLakeRequest. + * Constructs a new CreateZoneRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.ICreateLakeRequest); + constructor(properties?: google.cloud.dataplex.v1.ICreateZoneRequest); - /** CreateLakeRequest parent. */ + /** CreateZoneRequest parent. */ public parent: string; - /** CreateLakeRequest lakeId. */ - public lakeId: string; + /** CreateZoneRequest zoneId. */ + public zoneId: string; - /** CreateLakeRequest lake. */ - public lake?: (google.cloud.dataplex.v1.ILake|null); + /** CreateZoneRequest zone. */ + public zone?: (google.cloud.dataplex.v1.IZone|null); - /** CreateLakeRequest validateOnly. */ + /** CreateZoneRequest validateOnly. */ public validateOnly: boolean; /** - * Creates a new CreateLakeRequest instance using the specified properties. + * Creates a new CreateZoneRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateLakeRequest instance + * @returns CreateZoneRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.ICreateLakeRequest): google.cloud.dataplex.v1.CreateLakeRequest; + public static create(properties?: google.cloud.dataplex.v1.ICreateZoneRequest): google.cloud.dataplex.v1.CreateZoneRequest; /** - * Encodes the specified CreateLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateLakeRequest.verify|verify} messages. - * @param message CreateLakeRequest message or plain object to encode + * Encodes the specified CreateZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateZoneRequest.verify|verify} messages. + * @param message CreateZoneRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.ICreateLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.ICreateZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateLakeRequest.verify|verify} messages. - * @param message CreateLakeRequest message or plain object to encode + * Encodes the specified CreateZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateZoneRequest.verify|verify} messages. + * @param message CreateZoneRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateLakeRequest message from the specified reader or buffer. + * Decodes a CreateZoneRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateLakeRequest + * @returns CreateZoneRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateLakeRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateZoneRequest; /** - * Decodes a CreateLakeRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateZoneRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateLakeRequest + * @returns CreateZoneRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateLakeRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateZoneRequest; /** - * Verifies a CreateLakeRequest message. + * Verifies a CreateZoneRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateLakeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateZoneRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateLakeRequest + * @returns CreateZoneRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateLakeRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateZoneRequest; /** - * Creates a plain object from a CreateLakeRequest message. Also converts values to other types if specified. - * @param message CreateLakeRequest + * Creates a plain object from a CreateZoneRequest message. Also converts values to other types if specified. + * @param message CreateZoneRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.CreateLakeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.CreateZoneRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateLakeRequest to JSON. + * Converts this CreateZoneRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateLakeRequest. */ - interface IUpdateLakeRequest { + /** Properties of an UpdateZoneRequest. */ + interface IUpdateZoneRequest { - /** UpdateLakeRequest updateMask */ + /** UpdateZoneRequest updateMask */ updateMask?: (google.protobuf.IFieldMask|null); - /** UpdateLakeRequest lake */ - lake?: (google.cloud.dataplex.v1.ILake|null); + /** UpdateZoneRequest zone */ + zone?: (google.cloud.dataplex.v1.IZone|null); - /** UpdateLakeRequest validateOnly */ + /** UpdateZoneRequest validateOnly */ validateOnly?: (boolean|null); } - /** Represents an UpdateLakeRequest. */ - class UpdateLakeRequest implements IUpdateLakeRequest { + /** Represents an UpdateZoneRequest. */ + class UpdateZoneRequest implements IUpdateZoneRequest { /** - * Constructs a new UpdateLakeRequest. + * Constructs a new UpdateZoneRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IUpdateLakeRequest); + constructor(properties?: google.cloud.dataplex.v1.IUpdateZoneRequest); - /** UpdateLakeRequest updateMask. */ + /** UpdateZoneRequest updateMask. */ public updateMask?: (google.protobuf.IFieldMask|null); - /** UpdateLakeRequest lake. */ - public lake?: (google.cloud.dataplex.v1.ILake|null); + /** UpdateZoneRequest zone. */ + public zone?: (google.cloud.dataplex.v1.IZone|null); - /** UpdateLakeRequest validateOnly. */ + /** UpdateZoneRequest validateOnly. */ public validateOnly: boolean; /** - * Creates a new UpdateLakeRequest instance using the specified properties. + * Creates a new UpdateZoneRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateLakeRequest instance + * @returns UpdateZoneRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IUpdateLakeRequest): google.cloud.dataplex.v1.UpdateLakeRequest; + public static create(properties?: google.cloud.dataplex.v1.IUpdateZoneRequest): google.cloud.dataplex.v1.UpdateZoneRequest; /** - * Encodes the specified UpdateLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateLakeRequest.verify|verify} messages. - * @param message UpdateLakeRequest message or plain object to encode + * Encodes the specified UpdateZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateZoneRequest.verify|verify} messages. + * @param message UpdateZoneRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IUpdateLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IUpdateZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateLakeRequest.verify|verify} messages. - * @param message UpdateLakeRequest message or plain object to encode + * Encodes the specified UpdateZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateZoneRequest.verify|verify} messages. + * @param message UpdateZoneRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateLakeRequest message from the specified reader or buffer. + * Decodes an UpdateZoneRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateLakeRequest + * @returns UpdateZoneRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateLakeRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateZoneRequest; /** - * Decodes an UpdateLakeRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateZoneRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateLakeRequest + * @returns UpdateZoneRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateLakeRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateZoneRequest; /** - * Verifies an UpdateLakeRequest message. + * Verifies an UpdateZoneRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateLakeRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateZoneRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateLakeRequest + * @returns UpdateZoneRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateLakeRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateZoneRequest; /** - * Creates a plain object from an UpdateLakeRequest message. Also converts values to other types if specified. - * @param message UpdateLakeRequest + * Creates a plain object from an UpdateZoneRequest message. Also converts values to other types if specified. + * @param message UpdateZoneRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.UpdateLakeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.UpdateZoneRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateLakeRequest to JSON. + * Converts this UpdateZoneRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteLakeRequest. */ - interface IDeleteLakeRequest { + /** Properties of a DeleteZoneRequest. */ + interface IDeleteZoneRequest { - /** DeleteLakeRequest name */ + /** DeleteZoneRequest name */ name?: (string|null); } - /** Represents a DeleteLakeRequest. */ - class DeleteLakeRequest implements IDeleteLakeRequest { + /** Represents a DeleteZoneRequest. */ + class DeleteZoneRequest implements IDeleteZoneRequest { /** - * Constructs a new DeleteLakeRequest. + * Constructs a new DeleteZoneRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IDeleteLakeRequest); + constructor(properties?: google.cloud.dataplex.v1.IDeleteZoneRequest); - /** DeleteLakeRequest name. */ + /** DeleteZoneRequest name. */ public name: string; /** - * Creates a new DeleteLakeRequest instance using the specified properties. + * Creates a new DeleteZoneRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteLakeRequest instance + * @returns DeleteZoneRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IDeleteLakeRequest): google.cloud.dataplex.v1.DeleteLakeRequest; + public static create(properties?: google.cloud.dataplex.v1.IDeleteZoneRequest): google.cloud.dataplex.v1.DeleteZoneRequest; /** - * Encodes the specified DeleteLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteLakeRequest.verify|verify} messages. - * @param message DeleteLakeRequest message or plain object to encode + * Encodes the specified DeleteZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteZoneRequest.verify|verify} messages. + * @param message DeleteZoneRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IDeleteLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IDeleteZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteLakeRequest.verify|verify} messages. - * @param message DeleteLakeRequest message or plain object to encode + * Encodes the specified DeleteZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteZoneRequest.verify|verify} messages. + * @param message DeleteZoneRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteLakeRequest message from the specified reader or buffer. + * Decodes a DeleteZoneRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteLakeRequest + * @returns DeleteZoneRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteLakeRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteZoneRequest; /** - * Decodes a DeleteLakeRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteZoneRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteLakeRequest + * @returns DeleteZoneRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteLakeRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteZoneRequest; /** - * Verifies a DeleteLakeRequest message. + * Verifies a DeleteZoneRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteLakeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteZoneRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteLakeRequest + * @returns DeleteZoneRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteLakeRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteZoneRequest; /** - * Creates a plain object from a DeleteLakeRequest message. Also converts values to other types if specified. - * @param message DeleteLakeRequest + * Creates a plain object from a DeleteZoneRequest message. Also converts values to other types if specified. + * @param message DeleteZoneRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.DeleteLakeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.DeleteZoneRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteLakeRequest to JSON. + * Converts this DeleteZoneRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListLakesRequest. */ - interface IListLakesRequest { + /** Properties of a ListZonesRequest. */ + interface IListZonesRequest { - /** ListLakesRequest parent */ + /** ListZonesRequest parent */ parent?: (string|null); - /** ListLakesRequest pageSize */ + /** ListZonesRequest pageSize */ pageSize?: (number|null); - /** ListLakesRequest pageToken */ + /** ListZonesRequest pageToken */ pageToken?: (string|null); - /** ListLakesRequest filter */ + /** ListZonesRequest filter */ filter?: (string|null); - /** ListLakesRequest orderBy */ + /** ListZonesRequest orderBy */ orderBy?: (string|null); } - /** Represents a ListLakesRequest. */ - class ListLakesRequest implements IListLakesRequest { + /** Represents a ListZonesRequest. */ + class ListZonesRequest implements IListZonesRequest { /** - * Constructs a new ListLakesRequest. + * Constructs a new ListZonesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IListLakesRequest); + constructor(properties?: google.cloud.dataplex.v1.IListZonesRequest); - /** ListLakesRequest parent. */ + /** ListZonesRequest parent. */ public parent: string; - /** ListLakesRequest pageSize. */ + /** ListZonesRequest pageSize. */ public pageSize: number; - /** ListLakesRequest pageToken. */ + /** ListZonesRequest pageToken. */ public pageToken: string; - /** ListLakesRequest filter. */ + /** ListZonesRequest filter. */ public filter: string; - /** ListLakesRequest orderBy. */ + /** ListZonesRequest orderBy. */ public orderBy: string; /** - * Creates a new ListLakesRequest instance using the specified properties. + * Creates a new ListZonesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListLakesRequest instance + * @returns ListZonesRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IListLakesRequest): google.cloud.dataplex.v1.ListLakesRequest; + public static create(properties?: google.cloud.dataplex.v1.IListZonesRequest): google.cloud.dataplex.v1.ListZonesRequest; /** - * Encodes the specified ListLakesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesRequest.verify|verify} messages. - * @param message ListLakesRequest message or plain object to encode + * Encodes the specified ListZonesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesRequest.verify|verify} messages. + * @param message ListZonesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IListLakesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IListZonesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListLakesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesRequest.verify|verify} messages. - * @param message ListLakesRequest message or plain object to encode + * Encodes the specified ListZonesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesRequest.verify|verify} messages. + * @param message ListZonesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListLakesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IListZonesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListLakesRequest message from the specified reader or buffer. + * Decodes a ListZonesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListLakesRequest + * @returns ListZonesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListLakesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListZonesRequest; /** - * Decodes a ListLakesRequest message from the specified reader or buffer, length delimited. + * Decodes a ListZonesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListLakesRequest + * @returns ListZonesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListLakesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListZonesRequest; /** - * Verifies a ListLakesRequest message. + * Verifies a ListZonesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListLakesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListZonesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListLakesRequest + * @returns ListZonesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListLakesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListZonesRequest; /** - * Creates a plain object from a ListLakesRequest message. Also converts values to other types if specified. - * @param message ListLakesRequest + * Creates a plain object from a ListZonesRequest message. Also converts values to other types if specified. + * @param message ListZonesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.ListLakesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.ListZonesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListLakesRequest to JSON. + * Converts this ListZonesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListLakesResponse. */ - interface IListLakesResponse { + /** Properties of a ListZonesResponse. */ + interface IListZonesResponse { - /** ListLakesResponse lakes */ - lakes?: (google.cloud.dataplex.v1.ILake[]|null); + /** ListZonesResponse zones */ + zones?: (google.cloud.dataplex.v1.IZone[]|null); - /** ListLakesResponse nextPageToken */ + /** ListZonesResponse nextPageToken */ nextPageToken?: (string|null); - - /** ListLakesResponse unreachableLocations */ - unreachableLocations?: (string[]|null); } - /** Represents a ListLakesResponse. */ - class ListLakesResponse implements IListLakesResponse { + /** Represents a ListZonesResponse. */ + class ListZonesResponse implements IListZonesResponse { /** - * Constructs a new ListLakesResponse. + * Constructs a new ListZonesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IListLakesResponse); + constructor(properties?: google.cloud.dataplex.v1.IListZonesResponse); - /** ListLakesResponse lakes. */ - public lakes: google.cloud.dataplex.v1.ILake[]; + /** ListZonesResponse zones. */ + public zones: google.cloud.dataplex.v1.IZone[]; - /** ListLakesResponse nextPageToken. */ + /** ListZonesResponse nextPageToken. */ public nextPageToken: string; - /** ListLakesResponse unreachableLocations. */ - public unreachableLocations: string[]; - /** - * Creates a new ListLakesResponse instance using the specified properties. + * Creates a new ListZonesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListLakesResponse instance + * @returns ListZonesResponse instance */ - public static create(properties?: google.cloud.dataplex.v1.IListLakesResponse): google.cloud.dataplex.v1.ListLakesResponse; + public static create(properties?: google.cloud.dataplex.v1.IListZonesResponse): google.cloud.dataplex.v1.ListZonesResponse; /** - * Encodes the specified ListLakesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesResponse.verify|verify} messages. - * @param message ListLakesResponse message or plain object to encode + * Encodes the specified ListZonesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesResponse.verify|verify} messages. + * @param message ListZonesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IListLakesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IListZonesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListLakesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesResponse.verify|verify} messages. - * @param message ListLakesResponse message or plain object to encode + * Encodes the specified ListZonesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesResponse.verify|verify} messages. + * @param message ListZonesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListLakesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IListZonesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListLakesResponse message from the specified reader or buffer. + * Decodes a ListZonesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListLakesResponse + * @returns ListZonesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListLakesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListZonesResponse; /** - * Decodes a ListLakesResponse message from the specified reader or buffer, length delimited. + * Decodes a ListZonesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListLakesResponse + * @returns ListZonesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListLakesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListZonesResponse; /** - * Verifies a ListLakesResponse message. + * Verifies a ListZonesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListLakesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListZonesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListLakesResponse + * @returns ListZonesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListLakesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListZonesResponse; /** - * Creates a plain object from a ListLakesResponse message. Also converts values to other types if specified. - * @param message ListLakesResponse + * Creates a plain object from a ListZonesResponse message. Also converts values to other types if specified. + * @param message ListZonesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.ListLakesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.ListZonesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListLakesResponse to JSON. + * Converts this ListZonesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListLakeActionsRequest. */ - interface IListLakeActionsRequest { + /** Properties of a ListZoneActionsRequest. */ + interface IListZoneActionsRequest { - /** ListLakeActionsRequest parent */ + /** ListZoneActionsRequest parent */ parent?: (string|null); - /** ListLakeActionsRequest pageSize */ + /** ListZoneActionsRequest pageSize */ pageSize?: (number|null); - /** ListLakeActionsRequest pageToken */ + /** ListZoneActionsRequest pageToken */ pageToken?: (string|null); } - /** Represents a ListLakeActionsRequest. */ - class ListLakeActionsRequest implements IListLakeActionsRequest { + /** Represents a ListZoneActionsRequest. */ + class ListZoneActionsRequest implements IListZoneActionsRequest { /** - * Constructs a new ListLakeActionsRequest. + * Constructs a new ListZoneActionsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IListLakeActionsRequest); + constructor(properties?: google.cloud.dataplex.v1.IListZoneActionsRequest); - /** ListLakeActionsRequest parent. */ + /** ListZoneActionsRequest parent. */ public parent: string; - /** ListLakeActionsRequest pageSize. */ + /** ListZoneActionsRequest pageSize. */ public pageSize: number; - /** ListLakeActionsRequest pageToken. */ + /** ListZoneActionsRequest pageToken. */ public pageToken: string; /** - * Creates a new ListLakeActionsRequest instance using the specified properties. + * Creates a new ListZoneActionsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListLakeActionsRequest instance + * @returns ListZoneActionsRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IListLakeActionsRequest): google.cloud.dataplex.v1.ListLakeActionsRequest; + public static create(properties?: google.cloud.dataplex.v1.IListZoneActionsRequest): google.cloud.dataplex.v1.ListZoneActionsRequest; /** - * Encodes the specified ListLakeActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakeActionsRequest.verify|verify} messages. - * @param message ListLakeActionsRequest message or plain object to encode + * Encodes the specified ListZoneActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListZoneActionsRequest.verify|verify} messages. + * @param message ListZoneActionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IListLakeActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IListZoneActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListLakeActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakeActionsRequest.verify|verify} messages. - * @param message ListLakeActionsRequest message or plain object to encode + * Encodes the specified ListZoneActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZoneActionsRequest.verify|verify} messages. + * @param message ListZoneActionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListLakeActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IListZoneActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListLakeActionsRequest message from the specified reader or buffer. + * Decodes a ListZoneActionsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListLakeActionsRequest + * @returns ListZoneActionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListLakeActionsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListZoneActionsRequest; /** - * Decodes a ListLakeActionsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListZoneActionsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListLakeActionsRequest + * @returns ListZoneActionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListLakeActionsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListZoneActionsRequest; /** - * Verifies a ListLakeActionsRequest message. + * Verifies a ListZoneActionsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListLakeActionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListZoneActionsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListLakeActionsRequest + * @returns ListZoneActionsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListLakeActionsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListZoneActionsRequest; /** - * Creates a plain object from a ListLakeActionsRequest message. Also converts values to other types if specified. - * @param message ListLakeActionsRequest + * Creates a plain object from a ListZoneActionsRequest message. Also converts values to other types if specified. + * @param message ListZoneActionsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.ListLakeActionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.ListZoneActionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListLakeActionsRequest to JSON. + * Converts this ListZoneActionsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListActionsResponse. */ - interface IListActionsResponse { - - /** ListActionsResponse actions */ - actions?: (google.cloud.dataplex.v1.IAction[]|null); + /** Properties of a GetZoneRequest. */ + interface IGetZoneRequest { - /** ListActionsResponse nextPageToken */ - nextPageToken?: (string|null); + /** GetZoneRequest name */ + name?: (string|null); } - /** Represents a ListActionsResponse. */ - class ListActionsResponse implements IListActionsResponse { + /** Represents a GetZoneRequest. */ + class GetZoneRequest implements IGetZoneRequest { /** - * Constructs a new ListActionsResponse. + * Constructs a new GetZoneRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IListActionsResponse); - - /** ListActionsResponse actions. */ - public actions: google.cloud.dataplex.v1.IAction[]; + constructor(properties?: google.cloud.dataplex.v1.IGetZoneRequest); - /** ListActionsResponse nextPageToken. */ - public nextPageToken: string; + /** GetZoneRequest name. */ + public name: string; /** - * Creates a new ListActionsResponse instance using the specified properties. + * Creates a new GetZoneRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListActionsResponse instance + * @returns GetZoneRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IListActionsResponse): google.cloud.dataplex.v1.ListActionsResponse; + public static create(properties?: google.cloud.dataplex.v1.IGetZoneRequest): google.cloud.dataplex.v1.GetZoneRequest; /** - * Encodes the specified ListActionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListActionsResponse.verify|verify} messages. - * @param message ListActionsResponse message or plain object to encode + * Encodes the specified GetZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetZoneRequest.verify|verify} messages. + * @param message GetZoneRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IListActionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IGetZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListActionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListActionsResponse.verify|verify} messages. - * @param message ListActionsResponse message or plain object to encode + * Encodes the specified GetZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetZoneRequest.verify|verify} messages. + * @param message GetZoneRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListActionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListActionsResponse message from the specified reader or buffer. + * Decodes a GetZoneRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListActionsResponse + * @returns GetZoneRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListActionsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetZoneRequest; /** - * Decodes a ListActionsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetZoneRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListActionsResponse + * @returns GetZoneRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListActionsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetZoneRequest; /** - * Verifies a ListActionsResponse message. + * Verifies a GetZoneRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListActionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetZoneRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListActionsResponse + * @returns GetZoneRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListActionsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetZoneRequest; /** - * Creates a plain object from a ListActionsResponse message. Also converts values to other types if specified. - * @param message ListActionsResponse + * Creates a plain object from a GetZoneRequest message. Also converts values to other types if specified. + * @param message GetZoneRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.ListActionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.GetZoneRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListActionsResponse to JSON. + * Converts this GetZoneRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetLakeRequest. */ - interface IGetLakeRequest { + /** Properties of a CreateAssetRequest. */ + interface ICreateAssetRequest { - /** GetLakeRequest name */ - name?: (string|null); + /** CreateAssetRequest parent */ + parent?: (string|null); + + /** CreateAssetRequest assetId */ + assetId?: (string|null); + + /** CreateAssetRequest asset */ + asset?: (google.cloud.dataplex.v1.IAsset|null); + + /** CreateAssetRequest validateOnly */ + validateOnly?: (boolean|null); } - /** Represents a GetLakeRequest. */ - class GetLakeRequest implements IGetLakeRequest { + /** Represents a CreateAssetRequest. */ + class CreateAssetRequest implements ICreateAssetRequest { /** - * Constructs a new GetLakeRequest. + * Constructs a new CreateAssetRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IGetLakeRequest); + constructor(properties?: google.cloud.dataplex.v1.ICreateAssetRequest); - /** GetLakeRequest name. */ - public name: string; + /** CreateAssetRequest parent. */ + public parent: string; + + /** CreateAssetRequest assetId. */ + public assetId: string; + + /** CreateAssetRequest asset. */ + public asset?: (google.cloud.dataplex.v1.IAsset|null); + + /** CreateAssetRequest validateOnly. */ + public validateOnly: boolean; /** - * Creates a new GetLakeRequest instance using the specified properties. + * Creates a new CreateAssetRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetLakeRequest instance + * @returns CreateAssetRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IGetLakeRequest): google.cloud.dataplex.v1.GetLakeRequest; + public static create(properties?: google.cloud.dataplex.v1.ICreateAssetRequest): google.cloud.dataplex.v1.CreateAssetRequest; /** - * Encodes the specified GetLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetLakeRequest.verify|verify} messages. - * @param message GetLakeRequest message or plain object to encode + * Encodes the specified CreateAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateAssetRequest.verify|verify} messages. + * @param message CreateAssetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IGetLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.ICreateAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetLakeRequest.verify|verify} messages. - * @param message GetLakeRequest message or plain object to encode + * Encodes the specified CreateAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateAssetRequest.verify|verify} messages. + * @param message CreateAssetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IGetLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetLakeRequest message from the specified reader or buffer. + * Decodes a CreateAssetRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetLakeRequest + * @returns CreateAssetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetLakeRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateAssetRequest; /** - * Decodes a GetLakeRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateAssetRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetLakeRequest + * @returns CreateAssetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetLakeRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateAssetRequest; /** - * Verifies a GetLakeRequest message. + * Verifies a CreateAssetRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetLakeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateAssetRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetLakeRequest + * @returns CreateAssetRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetLakeRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateAssetRequest; /** - * Creates a plain object from a GetLakeRequest message. Also converts values to other types if specified. - * @param message GetLakeRequest + * Creates a plain object from a CreateAssetRequest message. Also converts values to other types if specified. + * @param message CreateAssetRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.GetLakeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.CreateAssetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetLakeRequest to JSON. + * Converts this CreateAssetRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateZoneRequest. */ - interface ICreateZoneRequest { - - /** CreateZoneRequest parent */ - parent?: (string|null); + /** Properties of an UpdateAssetRequest. */ + interface IUpdateAssetRequest { - /** CreateZoneRequest zoneId */ - zoneId?: (string|null); + /** UpdateAssetRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); - /** CreateZoneRequest zone */ - zone?: (google.cloud.dataplex.v1.IZone|null); + /** UpdateAssetRequest asset */ + asset?: (google.cloud.dataplex.v1.IAsset|null); - /** CreateZoneRequest validateOnly */ + /** UpdateAssetRequest validateOnly */ validateOnly?: (boolean|null); } - /** Represents a CreateZoneRequest. */ - class CreateZoneRequest implements ICreateZoneRequest { + /** Represents an UpdateAssetRequest. */ + class UpdateAssetRequest implements IUpdateAssetRequest { /** - * Constructs a new CreateZoneRequest. + * Constructs a new UpdateAssetRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.ICreateZoneRequest); - - /** CreateZoneRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.dataplex.v1.IUpdateAssetRequest); - /** CreateZoneRequest zoneId. */ - public zoneId: string; + /** UpdateAssetRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** CreateZoneRequest zone. */ - public zone?: (google.cloud.dataplex.v1.IZone|null); + /** UpdateAssetRequest asset. */ + public asset?: (google.cloud.dataplex.v1.IAsset|null); - /** CreateZoneRequest validateOnly. */ + /** UpdateAssetRequest validateOnly. */ public validateOnly: boolean; /** - * Creates a new CreateZoneRequest instance using the specified properties. + * Creates a new UpdateAssetRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateZoneRequest instance + * @returns UpdateAssetRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.ICreateZoneRequest): google.cloud.dataplex.v1.CreateZoneRequest; + public static create(properties?: google.cloud.dataplex.v1.IUpdateAssetRequest): google.cloud.dataplex.v1.UpdateAssetRequest; /** - * Encodes the specified CreateZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateZoneRequest.verify|verify} messages. - * @param message CreateZoneRequest message or plain object to encode + * Encodes the specified UpdateAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAssetRequest.verify|verify} messages. + * @param message UpdateAssetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.ICreateZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IUpdateAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateZoneRequest.verify|verify} messages. - * @param message CreateZoneRequest message or plain object to encode + * Encodes the specified UpdateAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAssetRequest.verify|verify} messages. + * @param message UpdateAssetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateZoneRequest message from the specified reader or buffer. + * Decodes an UpdateAssetRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateZoneRequest + * @returns UpdateAssetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateZoneRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateAssetRequest; /** - * Decodes a CreateZoneRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateAssetRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateZoneRequest + * @returns UpdateAssetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateZoneRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateAssetRequest; /** - * Verifies a CreateZoneRequest message. + * Verifies an UpdateAssetRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateZoneRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateAssetRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateZoneRequest + * @returns UpdateAssetRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateZoneRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateAssetRequest; /** - * Creates a plain object from a CreateZoneRequest message. Also converts values to other types if specified. - * @param message CreateZoneRequest + * Creates a plain object from an UpdateAssetRequest message. Also converts values to other types if specified. + * @param message UpdateAssetRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.CreateZoneRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.UpdateAssetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateZoneRequest to JSON. + * Converts this UpdateAssetRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateZoneRequest. */ - interface IUpdateZoneRequest { - - /** UpdateZoneRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateZoneRequest zone */ - zone?: (google.cloud.dataplex.v1.IZone|null); + /** Properties of a DeleteAssetRequest. */ + interface IDeleteAssetRequest { - /** UpdateZoneRequest validateOnly */ - validateOnly?: (boolean|null); + /** DeleteAssetRequest name */ + name?: (string|null); } - /** Represents an UpdateZoneRequest. */ - class UpdateZoneRequest implements IUpdateZoneRequest { + /** Represents a DeleteAssetRequest. */ + class DeleteAssetRequest implements IDeleteAssetRequest { /** - * Constructs a new UpdateZoneRequest. + * Constructs a new DeleteAssetRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IUpdateZoneRequest); - - /** UpdateZoneRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateZoneRequest zone. */ - public zone?: (google.cloud.dataplex.v1.IZone|null); + constructor(properties?: google.cloud.dataplex.v1.IDeleteAssetRequest); - /** UpdateZoneRequest validateOnly. */ - public validateOnly: boolean; + /** DeleteAssetRequest name. */ + public name: string; /** - * Creates a new UpdateZoneRequest instance using the specified properties. + * Creates a new DeleteAssetRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateZoneRequest instance + * @returns DeleteAssetRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IUpdateZoneRequest): google.cloud.dataplex.v1.UpdateZoneRequest; + public static create(properties?: google.cloud.dataplex.v1.IDeleteAssetRequest): google.cloud.dataplex.v1.DeleteAssetRequest; /** - * Encodes the specified UpdateZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateZoneRequest.verify|verify} messages. - * @param message UpdateZoneRequest message or plain object to encode + * Encodes the specified DeleteAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAssetRequest.verify|verify} messages. + * @param message DeleteAssetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IUpdateZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IDeleteAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateZoneRequest.verify|verify} messages. - * @param message UpdateZoneRequest message or plain object to encode + * Encodes the specified DeleteAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAssetRequest.verify|verify} messages. + * @param message DeleteAssetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateZoneRequest message from the specified reader or buffer. + * Decodes a DeleteAssetRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateZoneRequest + * @returns DeleteAssetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateZoneRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteAssetRequest; /** - * Decodes an UpdateZoneRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteAssetRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateZoneRequest + * @returns DeleteAssetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateZoneRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteAssetRequest; /** - * Verifies an UpdateZoneRequest message. + * Verifies a DeleteAssetRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateZoneRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteAssetRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateZoneRequest + * @returns DeleteAssetRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateZoneRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteAssetRequest; /** - * Creates a plain object from an UpdateZoneRequest message. Also converts values to other types if specified. - * @param message UpdateZoneRequest + * Creates a plain object from a DeleteAssetRequest message. Also converts values to other types if specified. + * @param message DeleteAssetRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.UpdateZoneRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.DeleteAssetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateZoneRequest to JSON. + * Converts this DeleteAssetRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteZoneRequest. */ - interface IDeleteZoneRequest { + /** Properties of a ListAssetsRequest. */ + interface IListAssetsRequest { - /** DeleteZoneRequest name */ - name?: (string|null); + /** ListAssetsRequest parent */ + parent?: (string|null); + + /** ListAssetsRequest pageSize */ + pageSize?: (number|null); + + /** ListAssetsRequest pageToken */ + pageToken?: (string|null); + + /** ListAssetsRequest filter */ + filter?: (string|null); + + /** ListAssetsRequest orderBy */ + orderBy?: (string|null); } - /** Represents a DeleteZoneRequest. */ - class DeleteZoneRequest implements IDeleteZoneRequest { + /** Represents a ListAssetsRequest. */ + class ListAssetsRequest implements IListAssetsRequest { /** - * Constructs a new DeleteZoneRequest. + * Constructs a new ListAssetsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IDeleteZoneRequest); + constructor(properties?: google.cloud.dataplex.v1.IListAssetsRequest); - /** DeleteZoneRequest name. */ - public name: string; + /** ListAssetsRequest parent. */ + public parent: string; + + /** ListAssetsRequest pageSize. */ + public pageSize: number; + + /** ListAssetsRequest pageToken. */ + public pageToken: string; + + /** ListAssetsRequest filter. */ + public filter: string; + + /** ListAssetsRequest orderBy. */ + public orderBy: string; /** - * Creates a new DeleteZoneRequest instance using the specified properties. + * Creates a new ListAssetsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteZoneRequest instance + * @returns ListAssetsRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IDeleteZoneRequest): google.cloud.dataplex.v1.DeleteZoneRequest; + public static create(properties?: google.cloud.dataplex.v1.IListAssetsRequest): google.cloud.dataplex.v1.ListAssetsRequest; /** - * Encodes the specified DeleteZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteZoneRequest.verify|verify} messages. - * @param message DeleteZoneRequest message or plain object to encode + * Encodes the specified ListAssetsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsRequest.verify|verify} messages. + * @param message ListAssetsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IDeleteZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IListAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteZoneRequest.verify|verify} messages. - * @param message DeleteZoneRequest message or plain object to encode + * Encodes the specified ListAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsRequest.verify|verify} messages. + * @param message ListAssetsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IListAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteZoneRequest message from the specified reader or buffer. + * Decodes a ListAssetsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteZoneRequest + * @returns ListAssetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteZoneRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListAssetsRequest; /** - * Decodes a DeleteZoneRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAssetsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteZoneRequest + * @returns ListAssetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteZoneRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListAssetsRequest; /** - * Verifies a DeleteZoneRequest message. + * Verifies a ListAssetsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteZoneRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListAssetsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteZoneRequest + * @returns ListAssetsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteZoneRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListAssetsRequest; /** - * Creates a plain object from a DeleteZoneRequest message. Also converts values to other types if specified. - * @param message DeleteZoneRequest + * Creates a plain object from a ListAssetsRequest message. Also converts values to other types if specified. + * @param message ListAssetsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.DeleteZoneRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.ListAssetsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteZoneRequest to JSON. + * Converts this ListAssetsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListZonesRequest. */ - interface IListZonesRequest { - - /** ListZonesRequest parent */ - parent?: (string|null); - - /** ListZonesRequest pageSize */ - pageSize?: (number|null); - - /** ListZonesRequest pageToken */ - pageToken?: (string|null); + /** Properties of a ListAssetsResponse. */ + interface IListAssetsResponse { - /** ListZonesRequest filter */ - filter?: (string|null); + /** ListAssetsResponse assets */ + assets?: (google.cloud.dataplex.v1.IAsset[]|null); - /** ListZonesRequest orderBy */ - orderBy?: (string|null); + /** ListAssetsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a ListZonesRequest. */ - class ListZonesRequest implements IListZonesRequest { + /** Represents a ListAssetsResponse. */ + class ListAssetsResponse implements IListAssetsResponse { /** - * Constructs a new ListZonesRequest. + * Constructs a new ListAssetsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IListZonesRequest); - - /** ListZonesRequest parent. */ - public parent: string; - - /** ListZonesRequest pageSize. */ - public pageSize: number; - - /** ListZonesRequest pageToken. */ - public pageToken: string; + constructor(properties?: google.cloud.dataplex.v1.IListAssetsResponse); - /** ListZonesRequest filter. */ - public filter: string; + /** ListAssetsResponse assets. */ + public assets: google.cloud.dataplex.v1.IAsset[]; - /** ListZonesRequest orderBy. */ - public orderBy: string; + /** ListAssetsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new ListZonesRequest instance using the specified properties. + * Creates a new ListAssetsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListZonesRequest instance + * @returns ListAssetsResponse instance */ - public static create(properties?: google.cloud.dataplex.v1.IListZonesRequest): google.cloud.dataplex.v1.ListZonesRequest; + public static create(properties?: google.cloud.dataplex.v1.IListAssetsResponse): google.cloud.dataplex.v1.ListAssetsResponse; /** - * Encodes the specified ListZonesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesRequest.verify|verify} messages. - * @param message ListZonesRequest message or plain object to encode + * Encodes the specified ListAssetsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsResponse.verify|verify} messages. + * @param message ListAssetsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IListZonesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IListAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListZonesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesRequest.verify|verify} messages. - * @param message ListZonesRequest message or plain object to encode + * Encodes the specified ListAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsResponse.verify|verify} messages. + * @param message ListAssetsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListZonesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IListAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListZonesRequest message from the specified reader or buffer. + * Decodes a ListAssetsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListZonesRequest + * @returns ListAssetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListZonesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListAssetsResponse; /** - * Decodes a ListZonesRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAssetsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListZonesRequest + * @returns ListAssetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListZonesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListAssetsResponse; /** - * Verifies a ListZonesRequest message. + * Verifies a ListAssetsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListZonesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListAssetsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListZonesRequest + * @returns ListAssetsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListZonesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListAssetsResponse; /** - * Creates a plain object from a ListZonesRequest message. Also converts values to other types if specified. - * @param message ListZonesRequest + * Creates a plain object from a ListAssetsResponse message. Also converts values to other types if specified. + * @param message ListAssetsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.ListZonesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.ListAssetsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListZonesRequest to JSON. + * Converts this ListAssetsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListZonesResponse. */ - interface IListZonesResponse { + /** Properties of a ListAssetActionsRequest. */ + interface IListAssetActionsRequest { - /** ListZonesResponse zones */ - zones?: (google.cloud.dataplex.v1.IZone[]|null); + /** ListAssetActionsRequest parent */ + parent?: (string|null); - /** ListZonesResponse nextPageToken */ - nextPageToken?: (string|null); + /** ListAssetActionsRequest pageSize */ + pageSize?: (number|null); + + /** ListAssetActionsRequest pageToken */ + pageToken?: (string|null); } - /** Represents a ListZonesResponse. */ - class ListZonesResponse implements IListZonesResponse { + /** Represents a ListAssetActionsRequest. */ + class ListAssetActionsRequest implements IListAssetActionsRequest { /** - * Constructs a new ListZonesResponse. + * Constructs a new ListAssetActionsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IListZonesResponse); + constructor(properties?: google.cloud.dataplex.v1.IListAssetActionsRequest); - /** ListZonesResponse zones. */ - public zones: google.cloud.dataplex.v1.IZone[]; + /** ListAssetActionsRequest parent. */ + public parent: string; - /** ListZonesResponse nextPageToken. */ - public nextPageToken: string; + /** ListAssetActionsRequest pageSize. */ + public pageSize: number; + + /** ListAssetActionsRequest pageToken. */ + public pageToken: string; /** - * Creates a new ListZonesResponse instance using the specified properties. + * Creates a new ListAssetActionsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListZonesResponse instance + * @returns ListAssetActionsRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IListZonesResponse): google.cloud.dataplex.v1.ListZonesResponse; + public static create(properties?: google.cloud.dataplex.v1.IListAssetActionsRequest): google.cloud.dataplex.v1.ListAssetActionsRequest; /** - * Encodes the specified ListZonesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesResponse.verify|verify} messages. - * @param message ListZonesResponse message or plain object to encode + * Encodes the specified ListAssetActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetActionsRequest.verify|verify} messages. + * @param message ListAssetActionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IListZonesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IListAssetActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListZonesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesResponse.verify|verify} messages. - * @param message ListZonesResponse message or plain object to encode + * Encodes the specified ListAssetActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetActionsRequest.verify|verify} messages. + * @param message ListAssetActionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListZonesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IListAssetActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListZonesResponse message from the specified reader or buffer. + * Decodes a ListAssetActionsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListZonesResponse + * @returns ListAssetActionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListZonesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListAssetActionsRequest; /** - * Decodes a ListZonesResponse message from the specified reader or buffer, length delimited. + * Decodes a ListAssetActionsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListZonesResponse + * @returns ListAssetActionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListZonesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListAssetActionsRequest; /** - * Verifies a ListZonesResponse message. + * Verifies a ListAssetActionsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListZonesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListAssetActionsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListZonesResponse + * @returns ListAssetActionsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListZonesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListAssetActionsRequest; /** - * Creates a plain object from a ListZonesResponse message. Also converts values to other types if specified. - * @param message ListZonesResponse + * Creates a plain object from a ListAssetActionsRequest message. Also converts values to other types if specified. + * @param message ListAssetActionsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.ListZonesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.ListAssetActionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListZonesResponse to JSON. + * Converts this ListAssetActionsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListZoneActionsRequest. */ - interface IListZoneActionsRequest { - - /** ListZoneActionsRequest parent */ - parent?: (string|null); - - /** ListZoneActionsRequest pageSize */ - pageSize?: (number|null); + /** Properties of a GetAssetRequest. */ + interface IGetAssetRequest { - /** ListZoneActionsRequest pageToken */ - pageToken?: (string|null); + /** GetAssetRequest name */ + name?: (string|null); } - /** Represents a ListZoneActionsRequest. */ - class ListZoneActionsRequest implements IListZoneActionsRequest { + /** Represents a GetAssetRequest. */ + class GetAssetRequest implements IGetAssetRequest { /** - * Constructs a new ListZoneActionsRequest. + * Constructs a new GetAssetRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IListZoneActionsRequest); - - /** ListZoneActionsRequest parent. */ - public parent: string; - - /** ListZoneActionsRequest pageSize. */ - public pageSize: number; + constructor(properties?: google.cloud.dataplex.v1.IGetAssetRequest); - /** ListZoneActionsRequest pageToken. */ - public pageToken: string; + /** GetAssetRequest name. */ + public name: string; /** - * Creates a new ListZoneActionsRequest instance using the specified properties. + * Creates a new GetAssetRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListZoneActionsRequest instance + * @returns GetAssetRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IListZoneActionsRequest): google.cloud.dataplex.v1.ListZoneActionsRequest; + public static create(properties?: google.cloud.dataplex.v1.IGetAssetRequest): google.cloud.dataplex.v1.GetAssetRequest; /** - * Encodes the specified ListZoneActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListZoneActionsRequest.verify|verify} messages. - * @param message ListZoneActionsRequest message or plain object to encode + * Encodes the specified GetAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetAssetRequest.verify|verify} messages. + * @param message GetAssetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IListZoneActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IGetAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListZoneActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZoneActionsRequest.verify|verify} messages. - * @param message ListZoneActionsRequest message or plain object to encode + * Encodes the specified GetAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetAssetRequest.verify|verify} messages. + * @param message GetAssetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListZoneActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListZoneActionsRequest message from the specified reader or buffer. + * Decodes a GetAssetRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListZoneActionsRequest + * @returns GetAssetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListZoneActionsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetAssetRequest; /** - * Decodes a ListZoneActionsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetAssetRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListZoneActionsRequest + * @returns GetAssetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListZoneActionsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetAssetRequest; /** - * Verifies a ListZoneActionsRequest message. + * Verifies a GetAssetRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListZoneActionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetAssetRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListZoneActionsRequest + * @returns GetAssetRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListZoneActionsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetAssetRequest; /** - * Creates a plain object from a ListZoneActionsRequest message. Also converts values to other types if specified. - * @param message ListZoneActionsRequest + * Creates a plain object from a GetAssetRequest message. Also converts values to other types if specified. + * @param message GetAssetRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.ListZoneActionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.GetAssetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListZoneActionsRequest to JSON. + * Converts this GetAssetRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetZoneRequest. */ - interface IGetZoneRequest { + /** Properties of an OperationMetadata. */ + interface IOperationMetadata { - /** GetZoneRequest name */ - name?: (string|null); + /** OperationMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata target */ + target?: (string|null); + + /** OperationMetadata verb */ + verb?: (string|null); + + /** OperationMetadata statusMessage */ + statusMessage?: (string|null); + + /** OperationMetadata requestedCancellation */ + requestedCancellation?: (boolean|null); + + /** OperationMetadata apiVersion */ + apiVersion?: (string|null); } - /** Represents a GetZoneRequest. */ - class GetZoneRequest implements IGetZoneRequest { + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { /** - * Constructs a new GetZoneRequest. + * Constructs a new OperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IGetZoneRequest); + constructor(properties?: google.cloud.dataplex.v1.IOperationMetadata); - /** GetZoneRequest name. */ - public name: string; + /** OperationMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata target. */ + public target: string; + + /** OperationMetadata verb. */ + public verb: string; + + /** OperationMetadata statusMessage. */ + public statusMessage: string; + + /** OperationMetadata requestedCancellation. */ + public requestedCancellation: boolean; + + /** OperationMetadata apiVersion. */ + public apiVersion: string; /** - * Creates a new GetZoneRequest instance using the specified properties. + * Creates a new OperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns GetZoneRequest instance + * @returns OperationMetadata instance */ - public static create(properties?: google.cloud.dataplex.v1.IGetZoneRequest): google.cloud.dataplex.v1.GetZoneRequest; + public static create(properties?: google.cloud.dataplex.v1.IOperationMetadata): google.cloud.dataplex.v1.OperationMetadata; /** - * Encodes the specified GetZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetZoneRequest.verify|verify} messages. - * @param message GetZoneRequest message or plain object to encode + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.dataplex.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IGetZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetZoneRequest.verify|verify} messages. - * @param message GetZoneRequest message or plain object to encode + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IGetZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetZoneRequest message from the specified reader or buffer. + * Decodes an OperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetZoneRequest + * @returns OperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetZoneRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.OperationMetadata; /** - * Decodes a GetZoneRequest message from the specified reader or buffer, length delimited. + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetZoneRequest + * @returns OperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetZoneRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.OperationMetadata; /** - * Verifies a GetZoneRequest message. + * Verifies an OperationMetadata message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetZoneRequest message from a plain object. Also converts values to their respective internal types. + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetZoneRequest + * @returns OperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetZoneRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.OperationMetadata; /** - * Creates a plain object from a GetZoneRequest message. Also converts values to other types if specified. - * @param message GetZoneRequest + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @param message OperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.GetZoneRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetZoneRequest to JSON. + * Converts this OperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateAssetRequest. */ - interface ICreateAssetRequest { + /** Properties of a CreateTaskRequest. */ + interface ICreateTaskRequest { - /** CreateAssetRequest parent */ + /** CreateTaskRequest parent */ parent?: (string|null); - /** CreateAssetRequest assetId */ - assetId?: (string|null); + /** CreateTaskRequest taskId */ + taskId?: (string|null); - /** CreateAssetRequest asset */ - asset?: (google.cloud.dataplex.v1.IAsset|null); + /** CreateTaskRequest task */ + task?: (google.cloud.dataplex.v1.ITask|null); - /** CreateAssetRequest validateOnly */ + /** CreateTaskRequest validateOnly */ validateOnly?: (boolean|null); } - /** Represents a CreateAssetRequest. */ - class CreateAssetRequest implements ICreateAssetRequest { + /** Represents a CreateTaskRequest. */ + class CreateTaskRequest implements ICreateTaskRequest { /** - * Constructs a new CreateAssetRequest. + * Constructs a new CreateTaskRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.ICreateAssetRequest); + constructor(properties?: google.cloud.dataplex.v1.ICreateTaskRequest); - /** CreateAssetRequest parent. */ + /** CreateTaskRequest parent. */ public parent: string; - /** CreateAssetRequest assetId. */ - public assetId: string; + /** CreateTaskRequest taskId. */ + public taskId: string; - /** CreateAssetRequest asset. */ - public asset?: (google.cloud.dataplex.v1.IAsset|null); + /** CreateTaskRequest task. */ + public task?: (google.cloud.dataplex.v1.ITask|null); - /** CreateAssetRequest validateOnly. */ + /** CreateTaskRequest validateOnly. */ public validateOnly: boolean; /** - * Creates a new CreateAssetRequest instance using the specified properties. + * Creates a new CreateTaskRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateAssetRequest instance + * @returns CreateTaskRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.ICreateAssetRequest): google.cloud.dataplex.v1.CreateAssetRequest; + public static create(properties?: google.cloud.dataplex.v1.ICreateTaskRequest): google.cloud.dataplex.v1.CreateTaskRequest; /** - * Encodes the specified CreateAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateAssetRequest.verify|verify} messages. - * @param message CreateAssetRequest message or plain object to encode + * Encodes the specified CreateTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateTaskRequest.verify|verify} messages. + * @param message CreateTaskRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.ICreateAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.ICreateTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateAssetRequest.verify|verify} messages. - * @param message CreateAssetRequest message or plain object to encode + * Encodes the specified CreateTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateTaskRequest.verify|verify} messages. + * @param message CreateTaskRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateAssetRequest message from the specified reader or buffer. + * Decodes a CreateTaskRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateAssetRequest + * @returns CreateTaskRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateAssetRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateTaskRequest; /** - * Decodes a CreateAssetRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateTaskRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateAssetRequest + * @returns CreateTaskRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateAssetRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateTaskRequest; /** - * Verifies a CreateAssetRequest message. + * Verifies a CreateTaskRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateAssetRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateTaskRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateAssetRequest + * @returns CreateTaskRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateAssetRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateTaskRequest; /** - * Creates a plain object from a CreateAssetRequest message. Also converts values to other types if specified. - * @param message CreateAssetRequest + * Creates a plain object from a CreateTaskRequest message. Also converts values to other types if specified. + * @param message CreateTaskRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.CreateAssetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.CreateTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateAssetRequest to JSON. + * Converts this CreateTaskRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateAssetRequest. */ - interface IUpdateAssetRequest { + /** Properties of an UpdateTaskRequest. */ + interface IUpdateTaskRequest { - /** UpdateAssetRequest updateMask */ + /** UpdateTaskRequest updateMask */ updateMask?: (google.protobuf.IFieldMask|null); - /** UpdateAssetRequest asset */ - asset?: (google.cloud.dataplex.v1.IAsset|null); + /** UpdateTaskRequest task */ + task?: (google.cloud.dataplex.v1.ITask|null); - /** UpdateAssetRequest validateOnly */ + /** UpdateTaskRequest validateOnly */ validateOnly?: (boolean|null); } - /** Represents an UpdateAssetRequest. */ - class UpdateAssetRequest implements IUpdateAssetRequest { + /** Represents an UpdateTaskRequest. */ + class UpdateTaskRequest implements IUpdateTaskRequest { /** - * Constructs a new UpdateAssetRequest. + * Constructs a new UpdateTaskRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IUpdateAssetRequest); + constructor(properties?: google.cloud.dataplex.v1.IUpdateTaskRequest); - /** UpdateAssetRequest updateMask. */ + /** UpdateTaskRequest updateMask. */ public updateMask?: (google.protobuf.IFieldMask|null); - /** UpdateAssetRequest asset. */ - public asset?: (google.cloud.dataplex.v1.IAsset|null); + /** UpdateTaskRequest task. */ + public task?: (google.cloud.dataplex.v1.ITask|null); - /** UpdateAssetRequest validateOnly. */ + /** UpdateTaskRequest validateOnly. */ public validateOnly: boolean; /** - * Creates a new UpdateAssetRequest instance using the specified properties. + * Creates a new UpdateTaskRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateAssetRequest instance + * @returns UpdateTaskRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IUpdateAssetRequest): google.cloud.dataplex.v1.UpdateAssetRequest; + public static create(properties?: google.cloud.dataplex.v1.IUpdateTaskRequest): google.cloud.dataplex.v1.UpdateTaskRequest; /** - * Encodes the specified UpdateAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAssetRequest.verify|verify} messages. - * @param message UpdateAssetRequest message or plain object to encode + * Encodes the specified UpdateTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateTaskRequest.verify|verify} messages. + * @param message UpdateTaskRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IUpdateAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IUpdateTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAssetRequest.verify|verify} messages. - * @param message UpdateAssetRequest message or plain object to encode + * Encodes the specified UpdateTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateTaskRequest.verify|verify} messages. + * @param message UpdateTaskRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateAssetRequest message from the specified reader or buffer. + * Decodes an UpdateTaskRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateAssetRequest + * @returns UpdateTaskRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateAssetRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateTaskRequest; /** - * Decodes an UpdateAssetRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateTaskRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateAssetRequest + * @returns UpdateTaskRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateAssetRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateTaskRequest; /** - * Verifies an UpdateAssetRequest message. + * Verifies an UpdateTaskRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateAssetRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateTaskRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateAssetRequest + * @returns UpdateTaskRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateAssetRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateTaskRequest; /** - * Creates a plain object from an UpdateAssetRequest message. Also converts values to other types if specified. - * @param message UpdateAssetRequest + * Creates a plain object from an UpdateTaskRequest message. Also converts values to other types if specified. + * @param message UpdateTaskRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.UpdateAssetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.UpdateTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateAssetRequest to JSON. + * Converts this UpdateTaskRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteAssetRequest. */ - interface IDeleteAssetRequest { + /** Properties of a DeleteTaskRequest. */ + interface IDeleteTaskRequest { - /** DeleteAssetRequest name */ + /** DeleteTaskRequest name */ name?: (string|null); } - /** Represents a DeleteAssetRequest. */ - class DeleteAssetRequest implements IDeleteAssetRequest { + /** Represents a DeleteTaskRequest. */ + class DeleteTaskRequest implements IDeleteTaskRequest { /** - * Constructs a new DeleteAssetRequest. + * Constructs a new DeleteTaskRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IDeleteAssetRequest); + constructor(properties?: google.cloud.dataplex.v1.IDeleteTaskRequest); - /** DeleteAssetRequest name. */ + /** DeleteTaskRequest name. */ public name: string; /** - * Creates a new DeleteAssetRequest instance using the specified properties. + * Creates a new DeleteTaskRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteAssetRequest instance + * @returns DeleteTaskRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IDeleteAssetRequest): google.cloud.dataplex.v1.DeleteAssetRequest; + public static create(properties?: google.cloud.dataplex.v1.IDeleteTaskRequest): google.cloud.dataplex.v1.DeleteTaskRequest; /** - * Encodes the specified DeleteAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAssetRequest.verify|verify} messages. - * @param message DeleteAssetRequest message or plain object to encode + * Encodes the specified DeleteTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteTaskRequest.verify|verify} messages. + * @param message DeleteTaskRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IDeleteAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IDeleteTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAssetRequest.verify|verify} messages. - * @param message DeleteAssetRequest message or plain object to encode + * Encodes the specified DeleteTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteTaskRequest.verify|verify} messages. + * @param message DeleteTaskRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteAssetRequest message from the specified reader or buffer. + * Decodes a DeleteTaskRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteAssetRequest + * @returns DeleteTaskRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteAssetRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteTaskRequest; /** - * Decodes a DeleteAssetRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteTaskRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteAssetRequest + * @returns DeleteTaskRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteAssetRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteTaskRequest; /** - * Verifies a DeleteAssetRequest message. + * Verifies a DeleteTaskRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteAssetRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteTaskRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteAssetRequest + * @returns DeleteTaskRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteAssetRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteTaskRequest; /** - * Creates a plain object from a DeleteAssetRequest message. Also converts values to other types if specified. - * @param message DeleteAssetRequest + * Creates a plain object from a DeleteTaskRequest message. Also converts values to other types if specified. + * @param message DeleteTaskRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.DeleteAssetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.DeleteTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteAssetRequest to JSON. + * Converts this DeleteTaskRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListAssetsRequest. */ - interface IListAssetsRequest { + /** Properties of a ListTasksRequest. */ + interface IListTasksRequest { - /** ListAssetsRequest parent */ + /** ListTasksRequest parent */ parent?: (string|null); - /** ListAssetsRequest pageSize */ + /** ListTasksRequest pageSize */ pageSize?: (number|null); - /** ListAssetsRequest pageToken */ + /** ListTasksRequest pageToken */ pageToken?: (string|null); - /** ListAssetsRequest filter */ + /** ListTasksRequest filter */ filter?: (string|null); - /** ListAssetsRequest orderBy */ + /** ListTasksRequest orderBy */ orderBy?: (string|null); } - /** Represents a ListAssetsRequest. */ - class ListAssetsRequest implements IListAssetsRequest { + /** Represents a ListTasksRequest. */ + class ListTasksRequest implements IListTasksRequest { /** - * Constructs a new ListAssetsRequest. + * Constructs a new ListTasksRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IListAssetsRequest); + constructor(properties?: google.cloud.dataplex.v1.IListTasksRequest); - /** ListAssetsRequest parent. */ + /** ListTasksRequest parent. */ public parent: string; - /** ListAssetsRequest pageSize. */ + /** ListTasksRequest pageSize. */ public pageSize: number; - /** ListAssetsRequest pageToken. */ + /** ListTasksRequest pageToken. */ public pageToken: string; - /** ListAssetsRequest filter. */ + /** ListTasksRequest filter. */ public filter: string; - /** ListAssetsRequest orderBy. */ + /** ListTasksRequest orderBy. */ public orderBy: string; /** - * Creates a new ListAssetsRequest instance using the specified properties. + * Creates a new ListTasksRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListAssetsRequest instance + * @returns ListTasksRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IListAssetsRequest): google.cloud.dataplex.v1.ListAssetsRequest; + public static create(properties?: google.cloud.dataplex.v1.IListTasksRequest): google.cloud.dataplex.v1.ListTasksRequest; /** - * Encodes the specified ListAssetsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsRequest.verify|verify} messages. - * @param message ListAssetsRequest message or plain object to encode + * Encodes the specified ListTasksRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksRequest.verify|verify} messages. + * @param message ListTasksRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IListAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IListTasksRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsRequest.verify|verify} messages. - * @param message ListAssetsRequest message or plain object to encode + * Encodes the specified ListTasksRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksRequest.verify|verify} messages. + * @param message ListTasksRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IListTasksRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListAssetsRequest message from the specified reader or buffer. + * Decodes a ListTasksRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListAssetsRequest + * @returns ListTasksRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListAssetsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListTasksRequest; /** - * Decodes a ListAssetsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListTasksRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListAssetsRequest + * @returns ListTasksRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListAssetsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListTasksRequest; /** - * Verifies a ListAssetsRequest message. + * Verifies a ListTasksRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListAssetsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListTasksRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListAssetsRequest + * @returns ListTasksRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListAssetsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListTasksRequest; /** - * Creates a plain object from a ListAssetsRequest message. Also converts values to other types if specified. - * @param message ListAssetsRequest + * Creates a plain object from a ListTasksRequest message. Also converts values to other types if specified. + * @param message ListTasksRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.ListAssetsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.ListTasksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListAssetsRequest to JSON. + * Converts this ListTasksRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListAssetsResponse. */ - interface IListAssetsResponse { + /** Properties of a ListTasksResponse. */ + interface IListTasksResponse { - /** ListAssetsResponse assets */ - assets?: (google.cloud.dataplex.v1.IAsset[]|null); + /** ListTasksResponse tasks */ + tasks?: (google.cloud.dataplex.v1.ITask[]|null); - /** ListAssetsResponse nextPageToken */ + /** ListTasksResponse nextPageToken */ nextPageToken?: (string|null); + + /** ListTasksResponse unreachableLocations */ + unreachableLocations?: (string[]|null); } - /** Represents a ListAssetsResponse. */ - class ListAssetsResponse implements IListAssetsResponse { + /** Represents a ListTasksResponse. */ + class ListTasksResponse implements IListTasksResponse { /** - * Constructs a new ListAssetsResponse. + * Constructs a new ListTasksResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IListAssetsResponse); + constructor(properties?: google.cloud.dataplex.v1.IListTasksResponse); - /** ListAssetsResponse assets. */ - public assets: google.cloud.dataplex.v1.IAsset[]; + /** ListTasksResponse tasks. */ + public tasks: google.cloud.dataplex.v1.ITask[]; - /** ListAssetsResponse nextPageToken. */ + /** ListTasksResponse nextPageToken. */ public nextPageToken: string; + /** ListTasksResponse unreachableLocations. */ + public unreachableLocations: string[]; + /** - * Creates a new ListAssetsResponse instance using the specified properties. + * Creates a new ListTasksResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListAssetsResponse instance + * @returns ListTasksResponse instance */ - public static create(properties?: google.cloud.dataplex.v1.IListAssetsResponse): google.cloud.dataplex.v1.ListAssetsResponse; + public static create(properties?: google.cloud.dataplex.v1.IListTasksResponse): google.cloud.dataplex.v1.ListTasksResponse; /** - * Encodes the specified ListAssetsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsResponse.verify|verify} messages. - * @param message ListAssetsResponse message or plain object to encode + * Encodes the specified ListTasksResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksResponse.verify|verify} messages. + * @param message ListTasksResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IListAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IListTasksResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsResponse.verify|verify} messages. - * @param message ListAssetsResponse message or plain object to encode + * Encodes the specified ListTasksResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksResponse.verify|verify} messages. + * @param message ListTasksResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IListTasksResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListAssetsResponse message from the specified reader or buffer. + * Decodes a ListTasksResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListAssetsResponse + * @returns ListTasksResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListAssetsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListTasksResponse; /** - * Decodes a ListAssetsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListTasksResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListAssetsResponse + * @returns ListTasksResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListAssetsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListTasksResponse; /** - * Verifies a ListAssetsResponse message. + * Verifies a ListTasksResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListAssetsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListTasksResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListAssetsResponse + * @returns ListTasksResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListAssetsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListTasksResponse; /** - * Creates a plain object from a ListAssetsResponse message. Also converts values to other types if specified. - * @param message ListAssetsResponse + * Creates a plain object from a ListTasksResponse message. Also converts values to other types if specified. + * @param message ListTasksResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.ListAssetsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.ListTasksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListAssetsResponse to JSON. + * Converts this ListTasksResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListAssetActionsRequest. */ - interface IListAssetActionsRequest { - - /** ListAssetActionsRequest parent */ - parent?: (string|null); - - /** ListAssetActionsRequest pageSize */ - pageSize?: (number|null); + /** Properties of a GetTaskRequest. */ + interface IGetTaskRequest { - /** ListAssetActionsRequest pageToken */ - pageToken?: (string|null); + /** GetTaskRequest name */ + name?: (string|null); } - /** Represents a ListAssetActionsRequest. */ - class ListAssetActionsRequest implements IListAssetActionsRequest { + /** Represents a GetTaskRequest. */ + class GetTaskRequest implements IGetTaskRequest { /** - * Constructs a new ListAssetActionsRequest. + * Constructs a new GetTaskRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IListAssetActionsRequest); - - /** ListAssetActionsRequest parent. */ - public parent: string; - - /** ListAssetActionsRequest pageSize. */ - public pageSize: number; + constructor(properties?: google.cloud.dataplex.v1.IGetTaskRequest); - /** ListAssetActionsRequest pageToken. */ - public pageToken: string; + /** GetTaskRequest name. */ + public name: string; /** - * Creates a new ListAssetActionsRequest instance using the specified properties. + * Creates a new GetTaskRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListAssetActionsRequest instance + * @returns GetTaskRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IListAssetActionsRequest): google.cloud.dataplex.v1.ListAssetActionsRequest; + public static create(properties?: google.cloud.dataplex.v1.IGetTaskRequest): google.cloud.dataplex.v1.GetTaskRequest; /** - * Encodes the specified ListAssetActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetActionsRequest.verify|verify} messages. - * @param message ListAssetActionsRequest message or plain object to encode + * Encodes the specified GetTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetTaskRequest.verify|verify} messages. + * @param message GetTaskRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IListAssetActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IGetTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListAssetActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetActionsRequest.verify|verify} messages. - * @param message ListAssetActionsRequest message or plain object to encode + * Encodes the specified GetTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetTaskRequest.verify|verify} messages. + * @param message GetTaskRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListAssetActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListAssetActionsRequest message from the specified reader or buffer. + * Decodes a GetTaskRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListAssetActionsRequest + * @returns GetTaskRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListAssetActionsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetTaskRequest; /** - * Decodes a ListAssetActionsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetTaskRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListAssetActionsRequest + * @returns GetTaskRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListAssetActionsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetTaskRequest; /** - * Verifies a ListAssetActionsRequest message. + * Verifies a GetTaskRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListAssetActionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetTaskRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListAssetActionsRequest + * @returns GetTaskRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListAssetActionsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetTaskRequest; /** - * Creates a plain object from a ListAssetActionsRequest message. Also converts values to other types if specified. - * @param message ListAssetActionsRequest + * Creates a plain object from a GetTaskRequest message. Also converts values to other types if specified. + * @param message GetTaskRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.ListAssetActionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.GetTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListAssetActionsRequest to JSON. + * Converts this GetTaskRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetAssetRequest. */ - interface IGetAssetRequest { + /** Properties of a GetJobRequest. */ + interface IGetJobRequest { - /** GetAssetRequest name */ + /** GetJobRequest name */ name?: (string|null); } - /** Represents a GetAssetRequest. */ - class GetAssetRequest implements IGetAssetRequest { + /** Represents a GetJobRequest. */ + class GetJobRequest implements IGetJobRequest { /** - * Constructs a new GetAssetRequest. + * Constructs a new GetJobRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IGetAssetRequest); + constructor(properties?: google.cloud.dataplex.v1.IGetJobRequest); - /** GetAssetRequest name. */ + /** GetJobRequest name. */ public name: string; /** - * Creates a new GetAssetRequest instance using the specified properties. + * Creates a new GetJobRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetAssetRequest instance + * @returns GetJobRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IGetAssetRequest): google.cloud.dataplex.v1.GetAssetRequest; + public static create(properties?: google.cloud.dataplex.v1.IGetJobRequest): google.cloud.dataplex.v1.GetJobRequest; /** - * Encodes the specified GetAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetAssetRequest.verify|verify} messages. - * @param message GetAssetRequest message or plain object to encode + * Encodes the specified GetJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetJobRequest.verify|verify} messages. + * @param message GetJobRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IGetAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IGetJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetAssetRequest.verify|verify} messages. - * @param message GetAssetRequest message or plain object to encode + * Encodes the specified GetJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetJobRequest.verify|verify} messages. + * @param message GetJobRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IGetAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetAssetRequest message from the specified reader or buffer. + * Decodes a GetJobRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetAssetRequest + * @returns GetJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetAssetRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetJobRequest; /** - * Decodes a GetAssetRequest message from the specified reader or buffer, length delimited. + * Decodes a GetJobRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetAssetRequest + * @returns GetJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetAssetRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetJobRequest; /** - * Verifies a GetAssetRequest message. + * Verifies a GetJobRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetAssetRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetJobRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetAssetRequest + * @returns GetJobRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetAssetRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetJobRequest; /** - * Creates a plain object from a GetAssetRequest message. Also converts values to other types if specified. - * @param message GetAssetRequest + * Creates a plain object from a GetJobRequest message. Also converts values to other types if specified. + * @param message GetJobRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.GetAssetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.GetJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetAssetRequest to JSON. + * Converts this GetJobRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an OperationMetadata. */ - interface IOperationMetadata { - - /** OperationMetadata createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata endTime */ - endTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata target */ - target?: (string|null); - - /** OperationMetadata verb */ - verb?: (string|null); + /** Properties of a ListJobsRequest. */ + interface IListJobsRequest { - /** OperationMetadata statusMessage */ - statusMessage?: (string|null); + /** ListJobsRequest parent */ + parent?: (string|null); - /** OperationMetadata requestedCancellation */ - requestedCancellation?: (boolean|null); + /** ListJobsRequest pageSize */ + pageSize?: (number|null); - /** OperationMetadata apiVersion */ - apiVersion?: (string|null); + /** ListJobsRequest pageToken */ + pageToken?: (string|null); } - /** Represents an OperationMetadata. */ - class OperationMetadata implements IOperationMetadata { + /** Represents a ListJobsRequest. */ + class ListJobsRequest implements IListJobsRequest { /** - * Constructs a new OperationMetadata. + * Constructs a new ListJobsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IOperationMetadata); - - /** OperationMetadata createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata target. */ - public target: string; - - /** OperationMetadata verb. */ - public verb: string; + constructor(properties?: google.cloud.dataplex.v1.IListJobsRequest); - /** OperationMetadata statusMessage. */ - public statusMessage: string; + /** ListJobsRequest parent. */ + public parent: string; - /** OperationMetadata requestedCancellation. */ - public requestedCancellation: boolean; + /** ListJobsRequest pageSize. */ + public pageSize: number; - /** OperationMetadata apiVersion. */ - public apiVersion: string; + /** ListJobsRequest pageToken. */ + public pageToken: string; /** - * Creates a new OperationMetadata instance using the specified properties. + * Creates a new ListJobsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns OperationMetadata instance + * @returns ListJobsRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IOperationMetadata): google.cloud.dataplex.v1.OperationMetadata; + public static create(properties?: google.cloud.dataplex.v1.IListJobsRequest): google.cloud.dataplex.v1.ListJobsRequest; /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.dataplex.v1.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode + * Encodes the specified ListJobsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsRequest.verify|verify} messages. + * @param message ListJobsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IListJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode + * Encodes the specified ListJobsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsRequest.verify|verify} messages. + * @param message ListJobsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IListJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OperationMetadata message from the specified reader or buffer. + * Decodes a ListJobsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OperationMetadata + * @returns ListJobsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.OperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListJobsRequest; /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a ListJobsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OperationMetadata + * @returns ListJobsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.OperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListJobsRequest; /** - * Verifies an OperationMetadata message. + * Verifies a ListJobsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a ListJobsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OperationMetadata + * @returns ListJobsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.OperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListJobsRequest; /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. - * @param message OperationMetadata + * Creates a plain object from a ListJobsRequest message. Also converts values to other types if specified. + * @param message ListJobsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.ListJobsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OperationMetadata to JSON. + * Converts this ListJobsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateTaskRequest. */ - interface ICreateTaskRequest { - - /** CreateTaskRequest parent */ - parent?: (string|null); - - /** CreateTaskRequest taskId */ - taskId?: (string|null); + /** Properties of a ListJobsResponse. */ + interface IListJobsResponse { - /** CreateTaskRequest task */ - task?: (google.cloud.dataplex.v1.ITask|null); + /** ListJobsResponse jobs */ + jobs?: (google.cloud.dataplex.v1.IJob[]|null); - /** CreateTaskRequest validateOnly */ - validateOnly?: (boolean|null); + /** ListJobsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a CreateTaskRequest. */ - class CreateTaskRequest implements ICreateTaskRequest { + /** Represents a ListJobsResponse. */ + class ListJobsResponse implements IListJobsResponse { /** - * Constructs a new CreateTaskRequest. + * Constructs a new ListJobsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.ICreateTaskRequest); - - /** CreateTaskRequest parent. */ - public parent: string; - - /** CreateTaskRequest taskId. */ - public taskId: string; + constructor(properties?: google.cloud.dataplex.v1.IListJobsResponse); - /** CreateTaskRequest task. */ - public task?: (google.cloud.dataplex.v1.ITask|null); + /** ListJobsResponse jobs. */ + public jobs: google.cloud.dataplex.v1.IJob[]; - /** CreateTaskRequest validateOnly. */ - public validateOnly: boolean; + /** ListJobsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new CreateTaskRequest instance using the specified properties. + * Creates a new ListJobsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns CreateTaskRequest instance + * @returns ListJobsResponse instance */ - public static create(properties?: google.cloud.dataplex.v1.ICreateTaskRequest): google.cloud.dataplex.v1.CreateTaskRequest; + public static create(properties?: google.cloud.dataplex.v1.IListJobsResponse): google.cloud.dataplex.v1.ListJobsResponse; /** - * Encodes the specified CreateTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateTaskRequest.verify|verify} messages. - * @param message CreateTaskRequest message or plain object to encode + * Encodes the specified ListJobsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsResponse.verify|verify} messages. + * @param message ListJobsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.ICreateTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IListJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateTaskRequest.verify|verify} messages. - * @param message CreateTaskRequest message or plain object to encode + * Encodes the specified ListJobsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsResponse.verify|verify} messages. + * @param message ListJobsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IListJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateTaskRequest message from the specified reader or buffer. + * Decodes a ListJobsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateTaskRequest + * @returns ListJobsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateTaskRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListJobsResponse; /** - * Decodes a CreateTaskRequest message from the specified reader or buffer, length delimited. + * Decodes a ListJobsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateTaskRequest + * @returns ListJobsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateTaskRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListJobsResponse; /** - * Verifies a CreateTaskRequest message. + * Verifies a ListJobsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateTaskRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListJobsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateTaskRequest + * @returns ListJobsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateTaskRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListJobsResponse; /** - * Creates a plain object from a CreateTaskRequest message. Also converts values to other types if specified. - * @param message CreateTaskRequest + * Creates a plain object from a ListJobsResponse message. Also converts values to other types if specified. + * @param message ListJobsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.CreateTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.ListJobsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateTaskRequest to JSON. + * Converts this ListJobsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateTaskRequest. */ - interface IUpdateTaskRequest { - - /** UpdateTaskRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateTaskRequest task */ - task?: (google.cloud.dataplex.v1.ITask|null); + /** Properties of a CancelJobRequest. */ + interface ICancelJobRequest { - /** UpdateTaskRequest validateOnly */ - validateOnly?: (boolean|null); + /** CancelJobRequest name */ + name?: (string|null); } - /** Represents an UpdateTaskRequest. */ - class UpdateTaskRequest implements IUpdateTaskRequest { + /** Represents a CancelJobRequest. */ + class CancelJobRequest implements ICancelJobRequest { /** - * Constructs a new UpdateTaskRequest. + * Constructs a new CancelJobRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IUpdateTaskRequest); - - /** UpdateTaskRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateTaskRequest task. */ - public task?: (google.cloud.dataplex.v1.ITask|null); + constructor(properties?: google.cloud.dataplex.v1.ICancelJobRequest); - /** UpdateTaskRequest validateOnly. */ - public validateOnly: boolean; + /** CancelJobRequest name. */ + public name: string; /** - * Creates a new UpdateTaskRequest instance using the specified properties. + * Creates a new CancelJobRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateTaskRequest instance + * @returns CancelJobRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IUpdateTaskRequest): google.cloud.dataplex.v1.UpdateTaskRequest; + public static create(properties?: google.cloud.dataplex.v1.ICancelJobRequest): google.cloud.dataplex.v1.CancelJobRequest; /** - * Encodes the specified UpdateTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateTaskRequest.verify|verify} messages. - * @param message UpdateTaskRequest message or plain object to encode + * Encodes the specified CancelJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CancelJobRequest.verify|verify} messages. + * @param message CancelJobRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IUpdateTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.ICancelJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateTaskRequest.verify|verify} messages. - * @param message UpdateTaskRequest message or plain object to encode + * Encodes the specified CancelJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CancelJobRequest.verify|verify} messages. + * @param message CancelJobRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.ICancelJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateTaskRequest message from the specified reader or buffer. + * Decodes a CancelJobRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateTaskRequest + * @returns CancelJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateTaskRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CancelJobRequest; /** - * Decodes an UpdateTaskRequest message from the specified reader or buffer, length delimited. + * Decodes a CancelJobRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateTaskRequest + * @returns CancelJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateTaskRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CancelJobRequest; /** - * Verifies an UpdateTaskRequest message. + * Verifies a CancelJobRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateTaskRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CancelJobRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateTaskRequest + * @returns CancelJobRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateTaskRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CancelJobRequest; /** - * Creates a plain object from an UpdateTaskRequest message. Also converts values to other types if specified. - * @param message UpdateTaskRequest + * Creates a plain object from a CancelJobRequest message. Also converts values to other types if specified. + * @param message CancelJobRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.UpdateTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.CancelJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateTaskRequest to JSON. + * Converts this CancelJobRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteTaskRequest. */ - interface IDeleteTaskRequest { + /** Properties of a CreateEnvironmentRequest. */ + interface ICreateEnvironmentRequest { - /** DeleteTaskRequest name */ - name?: (string|null); + /** CreateEnvironmentRequest parent */ + parent?: (string|null); + + /** CreateEnvironmentRequest environmentId */ + environmentId?: (string|null); + + /** CreateEnvironmentRequest environment */ + environment?: (google.cloud.dataplex.v1.IEnvironment|null); + + /** CreateEnvironmentRequest validateOnly */ + validateOnly?: (boolean|null); } - /** Represents a DeleteTaskRequest. */ - class DeleteTaskRequest implements IDeleteTaskRequest { + /** Represents a CreateEnvironmentRequest. */ + class CreateEnvironmentRequest implements ICreateEnvironmentRequest { /** - * Constructs a new DeleteTaskRequest. + * Constructs a new CreateEnvironmentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IDeleteTaskRequest); + constructor(properties?: google.cloud.dataplex.v1.ICreateEnvironmentRequest); - /** DeleteTaskRequest name. */ - public name: string; + /** CreateEnvironmentRequest parent. */ + public parent: string; + + /** CreateEnvironmentRequest environmentId. */ + public environmentId: string; + + /** CreateEnvironmentRequest environment. */ + public environment?: (google.cloud.dataplex.v1.IEnvironment|null); + + /** CreateEnvironmentRequest validateOnly. */ + public validateOnly: boolean; /** - * Creates a new DeleteTaskRequest instance using the specified properties. + * Creates a new CreateEnvironmentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteTaskRequest instance + * @returns CreateEnvironmentRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IDeleteTaskRequest): google.cloud.dataplex.v1.DeleteTaskRequest; + public static create(properties?: google.cloud.dataplex.v1.ICreateEnvironmentRequest): google.cloud.dataplex.v1.CreateEnvironmentRequest; /** - * Encodes the specified DeleteTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteTaskRequest.verify|verify} messages. - * @param message DeleteTaskRequest message or plain object to encode + * Encodes the specified CreateEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateEnvironmentRequest.verify|verify} messages. + * @param message CreateEnvironmentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IDeleteTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.ICreateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteTaskRequest.verify|verify} messages. - * @param message DeleteTaskRequest message or plain object to encode + * Encodes the specified CreateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateEnvironmentRequest.verify|verify} messages. + * @param message CreateEnvironmentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteTaskRequest message from the specified reader or buffer. + * Decodes a CreateEnvironmentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteTaskRequest + * @returns CreateEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteTaskRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateEnvironmentRequest; /** - * Decodes a DeleteTaskRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateEnvironmentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteTaskRequest + * @returns CreateEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteTaskRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateEnvironmentRequest; /** - * Verifies a DeleteTaskRequest message. + * Verifies a CreateEnvironmentRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteTaskRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteTaskRequest + * @returns CreateEnvironmentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteTaskRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateEnvironmentRequest; /** - * Creates a plain object from a DeleteTaskRequest message. Also converts values to other types if specified. - * @param message DeleteTaskRequest + * Creates a plain object from a CreateEnvironmentRequest message. Also converts values to other types if specified. + * @param message CreateEnvironmentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.DeleteTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.CreateEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteTaskRequest to JSON. + * Converts this CreateEnvironmentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListTasksRequest. */ - interface IListTasksRequest { - - /** ListTasksRequest parent */ - parent?: (string|null); - - /** ListTasksRequest pageSize */ - pageSize?: (number|null); + /** Properties of an UpdateEnvironmentRequest. */ + interface IUpdateEnvironmentRequest { - /** ListTasksRequest pageToken */ - pageToken?: (string|null); + /** UpdateEnvironmentRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); - /** ListTasksRequest filter */ - filter?: (string|null); + /** UpdateEnvironmentRequest environment */ + environment?: (google.cloud.dataplex.v1.IEnvironment|null); - /** ListTasksRequest orderBy */ - orderBy?: (string|null); + /** UpdateEnvironmentRequest validateOnly */ + validateOnly?: (boolean|null); } - /** Represents a ListTasksRequest. */ - class ListTasksRequest implements IListTasksRequest { + /** Represents an UpdateEnvironmentRequest. */ + class UpdateEnvironmentRequest implements IUpdateEnvironmentRequest { /** - * Constructs a new ListTasksRequest. + * Constructs a new UpdateEnvironmentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IListTasksRequest); - - /** ListTasksRequest parent. */ - public parent: string; - - /** ListTasksRequest pageSize. */ - public pageSize: number; + constructor(properties?: google.cloud.dataplex.v1.IUpdateEnvironmentRequest); - /** ListTasksRequest pageToken. */ - public pageToken: string; + /** UpdateEnvironmentRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** ListTasksRequest filter. */ - public filter: string; + /** UpdateEnvironmentRequest environment. */ + public environment?: (google.cloud.dataplex.v1.IEnvironment|null); - /** ListTasksRequest orderBy. */ - public orderBy: string; + /** UpdateEnvironmentRequest validateOnly. */ + public validateOnly: boolean; /** - * Creates a new ListTasksRequest instance using the specified properties. + * Creates a new UpdateEnvironmentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListTasksRequest instance + * @returns UpdateEnvironmentRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IListTasksRequest): google.cloud.dataplex.v1.ListTasksRequest; + public static create(properties?: google.cloud.dataplex.v1.IUpdateEnvironmentRequest): google.cloud.dataplex.v1.UpdateEnvironmentRequest; /** - * Encodes the specified ListTasksRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksRequest.verify|verify} messages. - * @param message ListTasksRequest message or plain object to encode + * Encodes the specified UpdateEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEnvironmentRequest.verify|verify} messages. + * @param message UpdateEnvironmentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IListTasksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IUpdateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListTasksRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksRequest.verify|verify} messages. - * @param message ListTasksRequest message or plain object to encode + * Encodes the specified UpdateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEnvironmentRequest.verify|verify} messages. + * @param message UpdateEnvironmentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListTasksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListTasksRequest message from the specified reader or buffer. + * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListTasksRequest + * @returns UpdateEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListTasksRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateEnvironmentRequest; /** - * Decodes a ListTasksRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListTasksRequest + * @returns UpdateEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListTasksRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateEnvironmentRequest; /** - * Verifies a ListTasksRequest message. + * Verifies an UpdateEnvironmentRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListTasksRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListTasksRequest + * @returns UpdateEnvironmentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListTasksRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateEnvironmentRequest; /** - * Creates a plain object from a ListTasksRequest message. Also converts values to other types if specified. - * @param message ListTasksRequest + * Creates a plain object from an UpdateEnvironmentRequest message. Also converts values to other types if specified. + * @param message UpdateEnvironmentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.ListTasksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.UpdateEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListTasksRequest to JSON. + * Converts this UpdateEnvironmentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListTasksResponse. */ - interface IListTasksResponse { - - /** ListTasksResponse tasks */ - tasks?: (google.cloud.dataplex.v1.ITask[]|null); - - /** ListTasksResponse nextPageToken */ - nextPageToken?: (string|null); + /** Properties of a DeleteEnvironmentRequest. */ + interface IDeleteEnvironmentRequest { - /** ListTasksResponse unreachableLocations */ - unreachableLocations?: (string[]|null); + /** DeleteEnvironmentRequest name */ + name?: (string|null); } - /** Represents a ListTasksResponse. */ - class ListTasksResponse implements IListTasksResponse { + /** Represents a DeleteEnvironmentRequest. */ + class DeleteEnvironmentRequest implements IDeleteEnvironmentRequest { /** - * Constructs a new ListTasksResponse. + * Constructs a new DeleteEnvironmentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IListTasksResponse); - - /** ListTasksResponse tasks. */ - public tasks: google.cloud.dataplex.v1.ITask[]; - - /** ListTasksResponse nextPageToken. */ - public nextPageToken: string; + constructor(properties?: google.cloud.dataplex.v1.IDeleteEnvironmentRequest); - /** ListTasksResponse unreachableLocations. */ - public unreachableLocations: string[]; + /** DeleteEnvironmentRequest name. */ + public name: string; /** - * Creates a new ListTasksResponse instance using the specified properties. + * Creates a new DeleteEnvironmentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListTasksResponse instance + * @returns DeleteEnvironmentRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IListTasksResponse): google.cloud.dataplex.v1.ListTasksResponse; + public static create(properties?: google.cloud.dataplex.v1.IDeleteEnvironmentRequest): google.cloud.dataplex.v1.DeleteEnvironmentRequest; /** - * Encodes the specified ListTasksResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksResponse.verify|verify} messages. - * @param message ListTasksResponse message or plain object to encode + * Encodes the specified DeleteEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEnvironmentRequest.verify|verify} messages. + * @param message DeleteEnvironmentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IListTasksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IDeleteEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListTasksResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksResponse.verify|verify} messages. - * @param message ListTasksResponse message or plain object to encode + * Encodes the specified DeleteEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEnvironmentRequest.verify|verify} messages. + * @param message DeleteEnvironmentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListTasksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListTasksResponse message from the specified reader or buffer. + * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListTasksResponse + * @returns DeleteEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListTasksResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteEnvironmentRequest; /** - * Decodes a ListTasksResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListTasksResponse + * @returns DeleteEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListTasksResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteEnvironmentRequest; /** - * Verifies a ListTasksResponse message. + * Verifies a DeleteEnvironmentRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListTasksResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteEnvironmentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListTasksResponse + * @returns DeleteEnvironmentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListTasksResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteEnvironmentRequest; /** - * Creates a plain object from a ListTasksResponse message. Also converts values to other types if specified. - * @param message ListTasksResponse + * Creates a plain object from a DeleteEnvironmentRequest message. Also converts values to other types if specified. + * @param message DeleteEnvironmentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.ListTasksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.DeleteEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListTasksResponse to JSON. + * Converts this DeleteEnvironmentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetTaskRequest. */ - interface IGetTaskRequest { + /** Properties of a ListEnvironmentsRequest. */ + interface IListEnvironmentsRequest { - /** GetTaskRequest name */ - name?: (string|null); + /** ListEnvironmentsRequest parent */ + parent?: (string|null); + + /** ListEnvironmentsRequest pageSize */ + pageSize?: (number|null); + + /** ListEnvironmentsRequest pageToken */ + pageToken?: (string|null); + + /** ListEnvironmentsRequest filter */ + filter?: (string|null); + + /** ListEnvironmentsRequest orderBy */ + orderBy?: (string|null); } - /** Represents a GetTaskRequest. */ - class GetTaskRequest implements IGetTaskRequest { + /** Represents a ListEnvironmentsRequest. */ + class ListEnvironmentsRequest implements IListEnvironmentsRequest { /** - * Constructs a new GetTaskRequest. + * Constructs a new ListEnvironmentsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IGetTaskRequest); + constructor(properties?: google.cloud.dataplex.v1.IListEnvironmentsRequest); - /** GetTaskRequest name. */ - public name: string; + /** ListEnvironmentsRequest parent. */ + public parent: string; + + /** ListEnvironmentsRequest pageSize. */ + public pageSize: number; + + /** ListEnvironmentsRequest pageToken. */ + public pageToken: string; + + /** ListEnvironmentsRequest filter. */ + public filter: string; + + /** ListEnvironmentsRequest orderBy. */ + public orderBy: string; /** - * Creates a new GetTaskRequest instance using the specified properties. + * Creates a new ListEnvironmentsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetTaskRequest instance + * @returns ListEnvironmentsRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IGetTaskRequest): google.cloud.dataplex.v1.GetTaskRequest; + public static create(properties?: google.cloud.dataplex.v1.IListEnvironmentsRequest): google.cloud.dataplex.v1.ListEnvironmentsRequest; /** - * Encodes the specified GetTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetTaskRequest.verify|verify} messages. - * @param message GetTaskRequest message or plain object to encode + * Encodes the specified ListEnvironmentsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsRequest.verify|verify} messages. + * @param message ListEnvironmentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IGetTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IListEnvironmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetTaskRequest.verify|verify} messages. - * @param message GetTaskRequest message or plain object to encode + * Encodes the specified ListEnvironmentsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsRequest.verify|verify} messages. + * @param message ListEnvironmentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IGetTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IListEnvironmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetTaskRequest message from the specified reader or buffer. + * Decodes a ListEnvironmentsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetTaskRequest + * @returns ListEnvironmentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetTaskRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListEnvironmentsRequest; /** - * Decodes a GetTaskRequest message from the specified reader or buffer, length delimited. + * Decodes a ListEnvironmentsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetTaskRequest + * @returns ListEnvironmentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetTaskRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListEnvironmentsRequest; /** - * Verifies a GetTaskRequest message. + * Verifies a ListEnvironmentsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetTaskRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListEnvironmentsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetTaskRequest + * @returns ListEnvironmentsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetTaskRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListEnvironmentsRequest; /** - * Creates a plain object from a GetTaskRequest message. Also converts values to other types if specified. - * @param message GetTaskRequest + * Creates a plain object from a ListEnvironmentsRequest message. Also converts values to other types if specified. + * @param message ListEnvironmentsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.GetTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.ListEnvironmentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetTaskRequest to JSON. + * Converts this ListEnvironmentsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetJobRequest. */ - interface IGetJobRequest { + /** Properties of a ListEnvironmentsResponse. */ + interface IListEnvironmentsResponse { - /** GetJobRequest name */ - name?: (string|null); + /** ListEnvironmentsResponse environments */ + environments?: (google.cloud.dataplex.v1.IEnvironment[]|null); + + /** ListEnvironmentsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a GetJobRequest. */ - class GetJobRequest implements IGetJobRequest { + /** Represents a ListEnvironmentsResponse. */ + class ListEnvironmentsResponse implements IListEnvironmentsResponse { /** - * Constructs a new GetJobRequest. + * Constructs a new ListEnvironmentsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IGetJobRequest); + constructor(properties?: google.cloud.dataplex.v1.IListEnvironmentsResponse); - /** GetJobRequest name. */ - public name: string; + /** ListEnvironmentsResponse environments. */ + public environments: google.cloud.dataplex.v1.IEnvironment[]; + + /** ListEnvironmentsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new GetJobRequest instance using the specified properties. + * Creates a new ListEnvironmentsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetJobRequest instance + * @returns ListEnvironmentsResponse instance */ - public static create(properties?: google.cloud.dataplex.v1.IGetJobRequest): google.cloud.dataplex.v1.GetJobRequest; + public static create(properties?: google.cloud.dataplex.v1.IListEnvironmentsResponse): google.cloud.dataplex.v1.ListEnvironmentsResponse; /** - * Encodes the specified GetJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetJobRequest.verify|verify} messages. - * @param message GetJobRequest message or plain object to encode + * Encodes the specified ListEnvironmentsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsResponse.verify|verify} messages. + * @param message ListEnvironmentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IGetJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IListEnvironmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetJobRequest.verify|verify} messages. - * @param message GetJobRequest message or plain object to encode + * Encodes the specified ListEnvironmentsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsResponse.verify|verify} messages. + * @param message ListEnvironmentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IGetJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IListEnvironmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetJobRequest message from the specified reader or buffer. + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetJobRequest + * @returns ListEnvironmentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetJobRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListEnvironmentsResponse; /** - * Decodes a GetJobRequest message from the specified reader or buffer, length delimited. + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetJobRequest + * @returns ListEnvironmentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetJobRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListEnvironmentsResponse; /** - * Verifies a GetJobRequest message. + * Verifies a ListEnvironmentsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetJobRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListEnvironmentsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetJobRequest + * @returns ListEnvironmentsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetJobRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListEnvironmentsResponse; /** - * Creates a plain object from a GetJobRequest message. Also converts values to other types if specified. - * @param message GetJobRequest + * Creates a plain object from a ListEnvironmentsResponse message. Also converts values to other types if specified. + * @param message ListEnvironmentsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.GetJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.ListEnvironmentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetJobRequest to JSON. + * Converts this ListEnvironmentsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListJobsRequest. */ - interface IListJobsRequest { - - /** ListJobsRequest parent */ - parent?: (string|null); - - /** ListJobsRequest pageSize */ - pageSize?: (number|null); + /** Properties of a GetEnvironmentRequest. */ + interface IGetEnvironmentRequest { - /** ListJobsRequest pageToken */ - pageToken?: (string|null); + /** GetEnvironmentRequest name */ + name?: (string|null); } - /** Represents a ListJobsRequest. */ - class ListJobsRequest implements IListJobsRequest { + /** Represents a GetEnvironmentRequest. */ + class GetEnvironmentRequest implements IGetEnvironmentRequest { /** - * Constructs a new ListJobsRequest. + * Constructs a new GetEnvironmentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IListJobsRequest); - - /** ListJobsRequest parent. */ - public parent: string; - - /** ListJobsRequest pageSize. */ - public pageSize: number; + constructor(properties?: google.cloud.dataplex.v1.IGetEnvironmentRequest); - /** ListJobsRequest pageToken. */ - public pageToken: string; + /** GetEnvironmentRequest name. */ + public name: string; /** - * Creates a new ListJobsRequest instance using the specified properties. + * Creates a new GetEnvironmentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListJobsRequest instance + * @returns GetEnvironmentRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IListJobsRequest): google.cloud.dataplex.v1.ListJobsRequest; + public static create(properties?: google.cloud.dataplex.v1.IGetEnvironmentRequest): google.cloud.dataplex.v1.GetEnvironmentRequest; /** - * Encodes the specified ListJobsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsRequest.verify|verify} messages. - * @param message ListJobsRequest message or plain object to encode + * Encodes the specified GetEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetEnvironmentRequest.verify|verify} messages. + * @param message GetEnvironmentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IListJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IGetEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListJobsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsRequest.verify|verify} messages. - * @param message ListJobsRequest message or plain object to encode + * Encodes the specified GetEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetEnvironmentRequest.verify|verify} messages. + * @param message GetEnvironmentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListJobsRequest message from the specified reader or buffer. + * Decodes a GetEnvironmentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListJobsRequest + * @returns GetEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListJobsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetEnvironmentRequest; /** - * Decodes a ListJobsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetEnvironmentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListJobsRequest + * @returns GetEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListJobsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetEnvironmentRequest; /** - * Verifies a ListJobsRequest message. + * Verifies a GetEnvironmentRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListJobsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetEnvironmentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListJobsRequest + * @returns GetEnvironmentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListJobsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetEnvironmentRequest; /** - * Creates a plain object from a ListJobsRequest message. Also converts values to other types if specified. - * @param message ListJobsRequest + * Creates a plain object from a GetEnvironmentRequest message. Also converts values to other types if specified. + * @param message GetEnvironmentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.ListJobsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.GetEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListJobsRequest to JSON. + * Converts this GetEnvironmentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListJobsResponse. */ - interface IListJobsResponse { + /** Properties of a ListSessionsRequest. */ + interface IListSessionsRequest { - /** ListJobsResponse jobs */ - jobs?: (google.cloud.dataplex.v1.IJob[]|null); + /** ListSessionsRequest parent */ + parent?: (string|null); - /** ListJobsResponse nextPageToken */ - nextPageToken?: (string|null); + /** ListSessionsRequest pageSize */ + pageSize?: (number|null); + + /** ListSessionsRequest pageToken */ + pageToken?: (string|null); } - /** Represents a ListJobsResponse. */ - class ListJobsResponse implements IListJobsResponse { + /** Represents a ListSessionsRequest. */ + class ListSessionsRequest implements IListSessionsRequest { /** - * Constructs a new ListJobsResponse. + * Constructs a new ListSessionsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IListJobsResponse); + constructor(properties?: google.cloud.dataplex.v1.IListSessionsRequest); - /** ListJobsResponse jobs. */ - public jobs: google.cloud.dataplex.v1.IJob[]; + /** ListSessionsRequest parent. */ + public parent: string; - /** ListJobsResponse nextPageToken. */ - public nextPageToken: string; + /** ListSessionsRequest pageSize. */ + public pageSize: number; + + /** ListSessionsRequest pageToken. */ + public pageToken: string; /** - * Creates a new ListJobsResponse instance using the specified properties. + * Creates a new ListSessionsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListJobsResponse instance + * @returns ListSessionsRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IListJobsResponse): google.cloud.dataplex.v1.ListJobsResponse; + public static create(properties?: google.cloud.dataplex.v1.IListSessionsRequest): google.cloud.dataplex.v1.ListSessionsRequest; /** - * Encodes the specified ListJobsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsResponse.verify|verify} messages. - * @param message ListJobsResponse message or plain object to encode + * Encodes the specified ListSessionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsRequest.verify|verify} messages. + * @param message ListSessionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IListJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IListSessionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListJobsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsResponse.verify|verify} messages. - * @param message ListJobsResponse message or plain object to encode + * Encodes the specified ListSessionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsRequest.verify|verify} messages. + * @param message ListSessionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IListSessionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListJobsResponse message from the specified reader or buffer. + * Decodes a ListSessionsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListJobsResponse + * @returns ListSessionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListJobsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListSessionsRequest; /** - * Decodes a ListJobsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListSessionsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListJobsResponse + * @returns ListSessionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListJobsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListSessionsRequest; /** - * Verifies a ListJobsResponse message. + * Verifies a ListSessionsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListJobsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListSessionsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListJobsResponse + * @returns ListSessionsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListJobsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListSessionsRequest; /** - * Creates a plain object from a ListJobsResponse message. Also converts values to other types if specified. - * @param message ListJobsResponse + * Creates a plain object from a ListSessionsRequest message. Also converts values to other types if specified. + * @param message ListSessionsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.ListJobsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.ListSessionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListJobsResponse to JSON. + * Converts this ListSessionsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CancelJobRequest. */ - interface ICancelJobRequest { + /** Properties of a ListSessionsResponse. */ + interface IListSessionsResponse { - /** CancelJobRequest name */ - name?: (string|null); + /** ListSessionsResponse sessions */ + sessions?: (google.cloud.dataplex.v1.ISession[]|null); + + /** ListSessionsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a CancelJobRequest. */ - class CancelJobRequest implements ICancelJobRequest { + /** Represents a ListSessionsResponse. */ + class ListSessionsResponse implements IListSessionsResponse { /** - * Constructs a new CancelJobRequest. + * Constructs a new ListSessionsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.ICancelJobRequest); + constructor(properties?: google.cloud.dataplex.v1.IListSessionsResponse); - /** CancelJobRequest name. */ - public name: string; + /** ListSessionsResponse sessions. */ + public sessions: google.cloud.dataplex.v1.ISession[]; + + /** ListSessionsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new CancelJobRequest instance using the specified properties. + * Creates a new ListSessionsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns CancelJobRequest instance + * @returns ListSessionsResponse instance */ - public static create(properties?: google.cloud.dataplex.v1.ICancelJobRequest): google.cloud.dataplex.v1.CancelJobRequest; + public static create(properties?: google.cloud.dataplex.v1.IListSessionsResponse): google.cloud.dataplex.v1.ListSessionsResponse; /** - * Encodes the specified CancelJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CancelJobRequest.verify|verify} messages. - * @param message CancelJobRequest message or plain object to encode + * Encodes the specified ListSessionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsResponse.verify|verify} messages. + * @param message ListSessionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.ICancelJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IListSessionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CancelJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CancelJobRequest.verify|verify} messages. - * @param message CancelJobRequest message or plain object to encode + * Encodes the specified ListSessionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsResponse.verify|verify} messages. + * @param message ListSessionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ICancelJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IListSessionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CancelJobRequest message from the specified reader or buffer. + * Decodes a ListSessionsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CancelJobRequest + * @returns ListSessionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CancelJobRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListSessionsResponse; /** - * Decodes a CancelJobRequest message from the specified reader or buffer, length delimited. + * Decodes a ListSessionsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CancelJobRequest + * @returns ListSessionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CancelJobRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListSessionsResponse; /** - * Verifies a CancelJobRequest message. + * Verifies a ListSessionsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CancelJobRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListSessionsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CancelJobRequest + * @returns ListSessionsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CancelJobRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListSessionsResponse; /** - * Creates a plain object from a CancelJobRequest message. Also converts values to other types if specified. - * @param message CancelJobRequest + * Creates a plain object from a ListSessionsResponse message. Also converts values to other types if specified. + * @param message ListSessionsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.CancelJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.ListSessionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CancelJobRequest to JSON. + * Converts this ListSessionsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; diff --git a/packages/google-cloud-dataplex/protos/protos.js b/packages/google-cloud-dataplex/protos/protos.js index 6be7684d7b4..d0496740a1d 100644 --- a/packages/google-cloud-dataplex/protos/protos.js +++ b/packages/google-cloud-dataplex/protos/protos.js @@ -66,33 +66,36 @@ */ var v1 = {}; - v1.DiscoveryEvent = (function() { + v1.Environment = (function() { /** - * Properties of a DiscoveryEvent. + * Properties of an Environment. * @memberof google.cloud.dataplex.v1 - * @interface IDiscoveryEvent - * @property {string|null} [message] DiscoveryEvent message - * @property {string|null} [lakeId] DiscoveryEvent lakeId - * @property {string|null} [zoneId] DiscoveryEvent zoneId - * @property {string|null} [assetId] DiscoveryEvent assetId - * @property {string|null} [dataLocation] DiscoveryEvent dataLocation - * @property {google.cloud.dataplex.v1.DiscoveryEvent.EventType|null} [type] DiscoveryEvent type - * @property {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null} [config] DiscoveryEvent config - * @property {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null} [entity] DiscoveryEvent entity - * @property {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null} [partition] DiscoveryEvent partition - * @property {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null} [action] DiscoveryEvent action - */ - - /** - * Constructs a new DiscoveryEvent. + * @interface IEnvironment + * @property {string|null} [name] Environment name + * @property {string|null} [displayName] Environment displayName + * @property {string|null} [uid] Environment uid + * @property {google.protobuf.ITimestamp|null} [createTime] Environment createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Environment updateTime + * @property {Object.|null} [labels] Environment labels + * @property {string|null} [description] Environment description + * @property {google.cloud.dataplex.v1.State|null} [state] Environment state + * @property {google.cloud.dataplex.v1.Environment.IInfrastructureSpec|null} [infrastructureSpec] Environment infrastructureSpec + * @property {google.cloud.dataplex.v1.Environment.ISessionSpec|null} [sessionSpec] Environment sessionSpec + * @property {google.cloud.dataplex.v1.Environment.ISessionStatus|null} [sessionStatus] Environment sessionStatus + * @property {google.cloud.dataplex.v1.Environment.IEndpoints|null} [endpoints] Environment endpoints + */ + + /** + * Constructs a new Environment. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DiscoveryEvent. - * @implements IDiscoveryEvent + * @classdesc Represents an Environment. + * @implements IEnvironment * @constructor - * @param {google.cloud.dataplex.v1.IDiscoveryEvent=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IEnvironment=} [properties] Properties to set */ - function DiscoveryEvent(properties) { + function Environment(properties) { + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -100,206 +103,238 @@ } /** - * DiscoveryEvent message. - * @member {string} message - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * Environment name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Environment * @instance */ - DiscoveryEvent.prototype.message = ""; + Environment.prototype.name = ""; /** - * DiscoveryEvent lakeId. - * @member {string} lakeId - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * Environment displayName. + * @member {string} displayName + * @memberof google.cloud.dataplex.v1.Environment * @instance */ - DiscoveryEvent.prototype.lakeId = ""; + Environment.prototype.displayName = ""; /** - * DiscoveryEvent zoneId. - * @member {string} zoneId - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * Environment uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.Environment * @instance */ - DiscoveryEvent.prototype.zoneId = ""; + Environment.prototype.uid = ""; /** - * DiscoveryEvent assetId. - * @member {string} assetId - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * Environment createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.Environment * @instance */ - DiscoveryEvent.prototype.assetId = ""; + Environment.prototype.createTime = null; /** - * DiscoveryEvent dataLocation. - * @member {string} dataLocation - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * Environment updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Environment * @instance */ - DiscoveryEvent.prototype.dataLocation = ""; + Environment.prototype.updateTime = null; /** - * DiscoveryEvent type. - * @member {google.cloud.dataplex.v1.DiscoveryEvent.EventType} type - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * Environment labels. + * @member {Object.} labels + * @memberof google.cloud.dataplex.v1.Environment * @instance */ - DiscoveryEvent.prototype.type = 0; + Environment.prototype.labels = $util.emptyObject; /** - * DiscoveryEvent config. - * @member {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null|undefined} config - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * Environment description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.Environment * @instance */ - DiscoveryEvent.prototype.config = null; + Environment.prototype.description = ""; /** - * DiscoveryEvent entity. - * @member {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null|undefined} entity - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * Environment state. + * @member {google.cloud.dataplex.v1.State} state + * @memberof google.cloud.dataplex.v1.Environment * @instance */ - DiscoveryEvent.prototype.entity = null; + Environment.prototype.state = 0; /** - * DiscoveryEvent partition. - * @member {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null|undefined} partition - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * Environment infrastructureSpec. + * @member {google.cloud.dataplex.v1.Environment.IInfrastructureSpec|null|undefined} infrastructureSpec + * @memberof google.cloud.dataplex.v1.Environment * @instance */ - DiscoveryEvent.prototype.partition = null; + Environment.prototype.infrastructureSpec = null; /** - * DiscoveryEvent action. - * @member {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null|undefined} action - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * Environment sessionSpec. + * @member {google.cloud.dataplex.v1.Environment.ISessionSpec|null|undefined} sessionSpec + * @memberof google.cloud.dataplex.v1.Environment * @instance */ - DiscoveryEvent.prototype.action = null; + Environment.prototype.sessionSpec = null; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Environment sessionStatus. + * @member {google.cloud.dataplex.v1.Environment.ISessionStatus|null|undefined} sessionStatus + * @memberof google.cloud.dataplex.v1.Environment + * @instance + */ + Environment.prototype.sessionStatus = null; /** - * DiscoveryEvent details. - * @member {"config"|"entity"|"partition"|"action"|undefined} details - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * Environment endpoints. + * @member {google.cloud.dataplex.v1.Environment.IEndpoints|null|undefined} endpoints + * @memberof google.cloud.dataplex.v1.Environment * @instance */ - Object.defineProperty(DiscoveryEvent.prototype, "details", { - get: $util.oneOfGetter($oneOfFields = ["config", "entity", "partition", "action"]), - set: $util.oneOfSetter($oneOfFields) - }); + Environment.prototype.endpoints = null; /** - * Creates a new DiscoveryEvent instance using the specified properties. + * Creates a new Environment instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @memberof google.cloud.dataplex.v1.Environment * @static - * @param {google.cloud.dataplex.v1.IDiscoveryEvent=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent instance + * @param {google.cloud.dataplex.v1.IEnvironment=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Environment} Environment instance */ - DiscoveryEvent.create = function create(properties) { - return new DiscoveryEvent(properties); + Environment.create = function create(properties) { + return new Environment(properties); }; /** - * Encodes the specified DiscoveryEvent message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. + * Encodes the specified Environment message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @memberof google.cloud.dataplex.v1.Environment * @static - * @param {google.cloud.dataplex.v1.IDiscoveryEvent} message DiscoveryEvent message or plain object to encode + * @param {google.cloud.dataplex.v1.IEnvironment} message Environment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryEvent.encode = function encode(message, writer) { + Environment.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); - if (message.lakeId != null && Object.hasOwnProperty.call(message, "lakeId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.lakeId); - if (message.zoneId != null && Object.hasOwnProperty.call(message, "zoneId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.zoneId); - if (message.assetId != null && Object.hasOwnProperty.call(message, "assetId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.assetId); - if (message.dataLocation != null && Object.hasOwnProperty.call(message, "dataLocation")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.dataLocation); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.type); - if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.encode(message.config, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) - $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.encode(message.entity, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) - $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.encode(message.partition, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) - $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.encode(message.action, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.uid); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.description); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); + if (message.infrastructureSpec != null && Object.hasOwnProperty.call(message, "infrastructureSpec")) + $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.encode(message.infrastructureSpec, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + if (message.sessionSpec != null && Object.hasOwnProperty.call(message, "sessionSpec")) + $root.google.cloud.dataplex.v1.Environment.SessionSpec.encode(message.sessionSpec, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.sessionStatus != null && Object.hasOwnProperty.call(message, "sessionStatus")) + $root.google.cloud.dataplex.v1.Environment.SessionStatus.encode(message.sessionStatus, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); + if (message.endpoints != null && Object.hasOwnProperty.call(message, "endpoints")) + $root.google.cloud.dataplex.v1.Environment.Endpoints.encode(message.endpoints, writer.uint32(/* id 200, wireType 2 =*/1602).fork()).ldelim(); return writer; }; /** - * Encodes the specified DiscoveryEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. + * Encodes the specified Environment message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @memberof google.cloud.dataplex.v1.Environment * @static - * @param {google.cloud.dataplex.v1.IDiscoveryEvent} message DiscoveryEvent message or plain object to encode + * @param {google.cloud.dataplex.v1.IEnvironment} message Environment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryEvent.encodeDelimited = function encodeDelimited(message, writer) { + Environment.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DiscoveryEvent message from the specified reader or buffer. + * Decodes an Environment message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @memberof google.cloud.dataplex.v1.Environment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent + * @returns {google.cloud.dataplex.v1.Environment} Environment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoveryEvent.decode = function decode(reader, length) { + Environment.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Environment(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.message = reader.string(); + message.name = reader.string(); break; case 2: - message.lakeId = reader.string(); + message.displayName = reader.string(); break; case 3: - message.zoneId = reader.string(); + message.uid = reader.string(); break; case 4: - message.assetId = reader.string(); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; case 5: - message.dataLocation = reader.string(); + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; - case 10: - message.type = reader.int32(); + case 6: + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; break; - case 20: - message.config = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.decode(reader, reader.uint32()); + case 7: + message.description = reader.string(); break; - case 21: - message.entity = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.decode(reader, reader.uint32()); + case 8: + message.state = reader.int32(); break; - case 22: - message.partition = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.decode(reader, reader.uint32()); + case 100: + message.infrastructureSpec = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.decode(reader, reader.uint32()); break; - case 23: - message.action = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.decode(reader, reader.uint32()); + case 101: + message.sessionSpec = $root.google.cloud.dataplex.v1.Environment.SessionSpec.decode(reader, reader.uint32()); + break; + case 102: + message.sessionStatus = $root.google.cloud.dataplex.v1.Environment.SessionStatus.decode(reader, reader.uint32()); + break; + case 200: + message.endpoints = $root.google.cloud.dataplex.v1.Environment.Endpoints.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -310,310 +345,267 @@ }; /** - * Decodes a DiscoveryEvent message from the specified reader or buffer, length delimited. + * Decodes an Environment message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @memberof google.cloud.dataplex.v1.Environment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent + * @returns {google.cloud.dataplex.v1.Environment} Environment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoveryEvent.decodeDelimited = function decodeDelimited(reader) { + Environment.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DiscoveryEvent message. + * Verifies an Environment message. * @function verify - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @memberof google.cloud.dataplex.v1.Environment * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DiscoveryEvent.verify = function verify(message) { + Environment.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.lakeId != null && message.hasOwnProperty("lakeId")) - if (!$util.isString(message.lakeId)) - return "lakeId: string expected"; - if (message.zoneId != null && message.hasOwnProperty("zoneId")) - if (!$util.isString(message.zoneId)) - return "zoneId: string expected"; - if (message.assetId != null && message.hasOwnProperty("assetId")) - if (!$util.isString(message.assetId)) - return "assetId: string expected"; - if (message.dataLocation != null && message.hasOwnProperty("dataLocation")) - if (!$util.isString(message.dataLocation)) - return "dataLocation: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { default: - return "type: enum value expected"; + return "state: enum value expected"; case 0: case 1: case 2: case 3: case 4: - case 5: - case 6: - case 7: break; } - if (message.config != null && message.hasOwnProperty("config")) { - properties.details = 1; - { - var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify(message.config); - if (error) - return "config." + error; - } + if (message.infrastructureSpec != null && message.hasOwnProperty("infrastructureSpec")) { + var error = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.verify(message.infrastructureSpec); + if (error) + return "infrastructureSpec." + error; } - if (message.entity != null && message.hasOwnProperty("entity")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify(message.entity); - if (error) - return "entity." + error; - } + if (message.sessionSpec != null && message.hasOwnProperty("sessionSpec")) { + var error = $root.google.cloud.dataplex.v1.Environment.SessionSpec.verify(message.sessionSpec); + if (error) + return "sessionSpec." + error; } - if (message.partition != null && message.hasOwnProperty("partition")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify(message.partition); - if (error) - return "partition." + error; - } + if (message.sessionStatus != null && message.hasOwnProperty("sessionStatus")) { + var error = $root.google.cloud.dataplex.v1.Environment.SessionStatus.verify(message.sessionStatus); + if (error) + return "sessionStatus." + error; } - if (message.action != null && message.hasOwnProperty("action")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify(message.action); - if (error) - return "action." + error; - } + if (message.endpoints != null && message.hasOwnProperty("endpoints")) { + var error = $root.google.cloud.dataplex.v1.Environment.Endpoints.verify(message.endpoints); + if (error) + return "endpoints." + error; } return null; }; /** - * Creates a DiscoveryEvent message from a plain object. Also converts values to their respective internal types. + * Creates an Environment message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @memberof google.cloud.dataplex.v1.Environment * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent + * @returns {google.cloud.dataplex.v1.Environment} Environment */ - DiscoveryEvent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent) + Environment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Environment) return object; - var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent(); - if (object.message != null) - message.message = String(object.message); - if (object.lakeId != null) - message.lakeId = String(object.lakeId); - if (object.zoneId != null) - message.zoneId = String(object.zoneId); - if (object.assetId != null) - message.assetId = String(object.assetId); - if (object.dataLocation != null) - message.dataLocation = String(object.dataLocation); - switch (object.type) { - case "EVENT_TYPE_UNSPECIFIED": + var message = new $root.google.cloud.dataplex.v1.Environment(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uid != null) + message.uid = String(object.uid); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Environment.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Environment.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.dataplex.v1.Environment.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.description != null) + message.description = String(object.description); + switch (object.state) { + case "STATE_UNSPECIFIED": case 0: - message.type = 0; + message.state = 0; break; - case "CONFIG": + case "ACTIVE": case 1: - message.type = 1; + message.state = 1; break; - case "ENTITY_CREATED": + case "CREATING": case 2: - message.type = 2; + message.state = 2; break; - case "ENTITY_UPDATED": + case "DELETING": case 3: - message.type = 3; + message.state = 3; break; - case "ENTITY_DELETED": + case "ACTION_REQUIRED": case 4: - message.type = 4; - break; - case "PARTITION_CREATED": - case 5: - message.type = 5; - break; - case "PARTITION_UPDATED": - case 6: - message.type = 6; - break; - case "PARTITION_DELETED": - case 7: - message.type = 7; + message.state = 4; break; } - if (object.config != null) { - if (typeof object.config !== "object") - throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.config: object expected"); - message.config = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.fromObject(object.config); + if (object.infrastructureSpec != null) { + if (typeof object.infrastructureSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Environment.infrastructureSpec: object expected"); + message.infrastructureSpec = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.fromObject(object.infrastructureSpec); } - if (object.entity != null) { - if (typeof object.entity !== "object") - throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.entity: object expected"); - message.entity = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.fromObject(object.entity); + if (object.sessionSpec != null) { + if (typeof object.sessionSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Environment.sessionSpec: object expected"); + message.sessionSpec = $root.google.cloud.dataplex.v1.Environment.SessionSpec.fromObject(object.sessionSpec); } - if (object.partition != null) { - if (typeof object.partition !== "object") - throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.partition: object expected"); - message.partition = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.fromObject(object.partition); + if (object.sessionStatus != null) { + if (typeof object.sessionStatus !== "object") + throw TypeError(".google.cloud.dataplex.v1.Environment.sessionStatus: object expected"); + message.sessionStatus = $root.google.cloud.dataplex.v1.Environment.SessionStatus.fromObject(object.sessionStatus); } - if (object.action != null) { - if (typeof object.action !== "object") - throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.action: object expected"); - message.action = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.fromObject(object.action); + if (object.endpoints != null) { + if (typeof object.endpoints !== "object") + throw TypeError(".google.cloud.dataplex.v1.Environment.endpoints: object expected"); + message.endpoints = $root.google.cloud.dataplex.v1.Environment.Endpoints.fromObject(object.endpoints); } return message; }; /** - * Creates a plain object from a DiscoveryEvent message. Also converts values to other types if specified. + * Creates a plain object from an Environment message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @memberof google.cloud.dataplex.v1.Environment * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent} message DiscoveryEvent + * @param {google.cloud.dataplex.v1.Environment} message Environment * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DiscoveryEvent.toObject = function toObject(message, options) { + Environment.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.labels = {}; if (options.defaults) { - object.message = ""; - object.lakeId = ""; - object.zoneId = ""; - object.assetId = ""; - object.dataLocation = ""; - object.type = options.enums === String ? "EVENT_TYPE_UNSPECIFIED" : 0; - } - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.lakeId != null && message.hasOwnProperty("lakeId")) - object.lakeId = message.lakeId; - if (message.zoneId != null && message.hasOwnProperty("zoneId")) - object.zoneId = message.zoneId; - if (message.assetId != null && message.hasOwnProperty("assetId")) - object.assetId = message.assetId; - if (message.dataLocation != null && message.hasOwnProperty("dataLocation")) - object.dataLocation = message.dataLocation; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DiscoveryEvent.EventType[message.type] : message.type; - if (message.config != null && message.hasOwnProperty("config")) { - object.config = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.toObject(message.config, options); - if (options.oneofs) - object.details = "config"; - } - if (message.entity != null && message.hasOwnProperty("entity")) { - object.entity = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.toObject(message.entity, options); - if (options.oneofs) - object.details = "entity"; - } - if (message.partition != null && message.hasOwnProperty("partition")) { - object.partition = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.toObject(message.partition, options); - if (options.oneofs) - object.details = "partition"; + object.name = ""; + object.displayName = ""; + object.uid = ""; + object.createTime = null; + object.updateTime = null; + object.description = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.infrastructureSpec = null; + object.sessionSpec = null; + object.sessionStatus = null; + object.endpoints = null; } - if (message.action != null && message.hasOwnProperty("action")) { - object.action = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.toObject(message.action, options); - if (options.oneofs) - object.details = "action"; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.State[message.state] : message.state; + if (message.infrastructureSpec != null && message.hasOwnProperty("infrastructureSpec")) + object.infrastructureSpec = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.toObject(message.infrastructureSpec, options); + if (message.sessionSpec != null && message.hasOwnProperty("sessionSpec")) + object.sessionSpec = $root.google.cloud.dataplex.v1.Environment.SessionSpec.toObject(message.sessionSpec, options); + if (message.sessionStatus != null && message.hasOwnProperty("sessionStatus")) + object.sessionStatus = $root.google.cloud.dataplex.v1.Environment.SessionStatus.toObject(message.sessionStatus, options); + if (message.endpoints != null && message.hasOwnProperty("endpoints")) + object.endpoints = $root.google.cloud.dataplex.v1.Environment.Endpoints.toObject(message.endpoints, options); return object; }; /** - * Converts this DiscoveryEvent to JSON. + * Converts this Environment to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @memberof google.cloud.dataplex.v1.Environment * @instance * @returns {Object.} JSON object */ - DiscoveryEvent.prototype.toJSON = function toJSON() { + Environment.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * EventType enum. - * @name google.cloud.dataplex.v1.DiscoveryEvent.EventType - * @enum {number} - * @property {number} EVENT_TYPE_UNSPECIFIED=0 EVENT_TYPE_UNSPECIFIED value - * @property {number} CONFIG=1 CONFIG value - * @property {number} ENTITY_CREATED=2 ENTITY_CREATED value - * @property {number} ENTITY_UPDATED=3 ENTITY_UPDATED value - * @property {number} ENTITY_DELETED=4 ENTITY_DELETED value - * @property {number} PARTITION_CREATED=5 PARTITION_CREATED value - * @property {number} PARTITION_UPDATED=6 PARTITION_UPDATED value - * @property {number} PARTITION_DELETED=7 PARTITION_DELETED value - */ - DiscoveryEvent.EventType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EVENT_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CONFIG"] = 1; - values[valuesById[2] = "ENTITY_CREATED"] = 2; - values[valuesById[3] = "ENTITY_UPDATED"] = 3; - values[valuesById[4] = "ENTITY_DELETED"] = 4; - values[valuesById[5] = "PARTITION_CREATED"] = 5; - values[valuesById[6] = "PARTITION_UPDATED"] = 6; - values[valuesById[7] = "PARTITION_DELETED"] = 7; - return values; - })(); - - /** - * EntityType enum. - * @name google.cloud.dataplex.v1.DiscoveryEvent.EntityType - * @enum {number} - * @property {number} ENTITY_TYPE_UNSPECIFIED=0 ENTITY_TYPE_UNSPECIFIED value - * @property {number} TABLE=1 TABLE value - * @property {number} FILESET=2 FILESET value - */ - DiscoveryEvent.EntityType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENTITY_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "TABLE"] = 1; - values[valuesById[2] = "FILESET"] = 2; - return values; - })(); - - DiscoveryEvent.ConfigDetails = (function() { + Environment.InfrastructureSpec = (function() { /** - * Properties of a ConfigDetails. - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @interface IConfigDetails - * @property {Object.|null} [parameters] ConfigDetails parameters + * Properties of an InfrastructureSpec. + * @memberof google.cloud.dataplex.v1.Environment + * @interface IInfrastructureSpec + * @property {google.cloud.dataplex.v1.Environment.InfrastructureSpec.IComputeResources|null} [compute] InfrastructureSpec compute + * @property {google.cloud.dataplex.v1.Environment.InfrastructureSpec.IOsImageRuntime|null} [osImage] InfrastructureSpec osImage */ /** - * Constructs a new ConfigDetails. - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @classdesc Represents a ConfigDetails. - * @implements IConfigDetails + * Constructs a new InfrastructureSpec. + * @memberof google.cloud.dataplex.v1.Environment + * @classdesc Represents an InfrastructureSpec. + * @implements IInfrastructureSpec * @constructor - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.Environment.IInfrastructureSpec=} [properties] Properties to set */ - function ConfigDetails(properties) { - this.parameters = {}; + function InfrastructureSpec(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -621,95 +613,113 @@ } /** - * ConfigDetails parameters. - * @member {Object.} parameters - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * InfrastructureSpec compute. + * @member {google.cloud.dataplex.v1.Environment.InfrastructureSpec.IComputeResources|null|undefined} compute + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec * @instance */ - ConfigDetails.prototype.parameters = $util.emptyObject; + InfrastructureSpec.prototype.compute = null; /** - * Creates a new ConfigDetails instance using the specified properties. + * InfrastructureSpec osImage. + * @member {google.cloud.dataplex.v1.Environment.InfrastructureSpec.IOsImageRuntime|null|undefined} osImage + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec + * @instance + */ + InfrastructureSpec.prototype.osImage = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * InfrastructureSpec resources. + * @member {"compute"|undefined} resources + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec + * @instance + */ + Object.defineProperty(InfrastructureSpec.prototype, "resources", { + get: $util.oneOfGetter($oneOfFields = ["compute"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * InfrastructureSpec runtime. + * @member {"osImage"|undefined} runtime + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec + * @instance + */ + Object.defineProperty(InfrastructureSpec.prototype, "runtime", { + get: $util.oneOfGetter($oneOfFields = ["osImage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new InfrastructureSpec instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails instance + * @param {google.cloud.dataplex.v1.Environment.IInfrastructureSpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Environment.InfrastructureSpec} InfrastructureSpec instance */ - ConfigDetails.create = function create(properties) { - return new ConfigDetails(properties); + InfrastructureSpec.create = function create(properties) { + return new InfrastructureSpec(properties); }; /** - * Encodes the specified ConfigDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. + * Encodes the specified InfrastructureSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.InfrastructureSpec.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails} message ConfigDetails message or plain object to encode + * @param {google.cloud.dataplex.v1.Environment.IInfrastructureSpec} message InfrastructureSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConfigDetails.encode = function encode(message, writer) { + InfrastructureSpec.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) - for (var keys = Object.keys(message.parameters), i = 0; i < keys.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.parameters[keys[i]]).ldelim(); + if (message.compute != null && Object.hasOwnProperty.call(message, "compute")) + $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources.encode(message.compute, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.osImage != null && Object.hasOwnProperty.call(message, "osImage")) + $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.encode(message.osImage, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); return writer; }; /** - * Encodes the specified ConfigDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. + * Encodes the specified InfrastructureSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.InfrastructureSpec.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails} message ConfigDetails message or plain object to encode + * @param {google.cloud.dataplex.v1.Environment.IInfrastructureSpec} message InfrastructureSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConfigDetails.encodeDelimited = function encodeDelimited(message, writer) { + InfrastructureSpec.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ConfigDetails message from the specified reader or buffer. + * Decodes an InfrastructureSpec message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails + * @returns {google.cloud.dataplex.v1.Environment.InfrastructureSpec} InfrastructureSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConfigDetails.decode = function decode(reader, length) { + InfrastructureSpec.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (message.parameters === $util.emptyObject) - message.parameters = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.parameters[key] = value; + case 50: + message.compute = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources.decode(reader, reader.uint32()); + break; + case 100: + message.osImage = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -720,453 +730,780 @@ }; /** - * Decodes a ConfigDetails message from the specified reader or buffer, length delimited. + * Decodes an InfrastructureSpec message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails + * @returns {google.cloud.dataplex.v1.Environment.InfrastructureSpec} InfrastructureSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConfigDetails.decodeDelimited = function decodeDelimited(reader) { + InfrastructureSpec.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ConfigDetails message. + * Verifies an InfrastructureSpec message. * @function verify - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ConfigDetails.verify = function verify(message) { + InfrastructureSpec.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parameters != null && message.hasOwnProperty("parameters")) { - if (!$util.isObject(message.parameters)) - return "parameters: object expected"; - var key = Object.keys(message.parameters); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.parameters[key[i]])) - return "parameters: string{k:string} expected"; + var properties = {}; + if (message.compute != null && message.hasOwnProperty("compute")) { + properties.resources = 1; + { + var error = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources.verify(message.compute); + if (error) + return "compute." + error; + } + } + if (message.osImage != null && message.hasOwnProperty("osImage")) { + properties.runtime = 1; + { + var error = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.verify(message.osImage); + if (error) + return "osImage." + error; + } } return null; }; /** - * Creates a ConfigDetails message from a plain object. Also converts values to their respective internal types. + * Creates an InfrastructureSpec message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails + * @returns {google.cloud.dataplex.v1.Environment.InfrastructureSpec} InfrastructureSpec */ - ConfigDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails) + InfrastructureSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec) return object; - var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails(); - if (object.parameters) { - if (typeof object.parameters !== "object") - throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.parameters: object expected"); - message.parameters = {}; - for (var keys = Object.keys(object.parameters), i = 0; i < keys.length; ++i) - message.parameters[keys[i]] = String(object.parameters[keys[i]]); + var message = new $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec(); + if (object.compute != null) { + if (typeof object.compute !== "object") + throw TypeError(".google.cloud.dataplex.v1.Environment.InfrastructureSpec.compute: object expected"); + message.compute = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources.fromObject(object.compute); + } + if (object.osImage != null) { + if (typeof object.osImage !== "object") + throw TypeError(".google.cloud.dataplex.v1.Environment.InfrastructureSpec.osImage: object expected"); + message.osImage = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.fromObject(object.osImage); } return message; }; /** - * Creates a plain object from a ConfigDetails message. Also converts values to other types if specified. + * Creates a plain object from an InfrastructureSpec message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} message ConfigDetails + * @param {google.cloud.dataplex.v1.Environment.InfrastructureSpec} message InfrastructureSpec * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ConfigDetails.toObject = function toObject(message, options) { + InfrastructureSpec.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.parameters = {}; - var keys2; - if (message.parameters && (keys2 = Object.keys(message.parameters)).length) { - object.parameters = {}; - for (var j = 0; j < keys2.length; ++j) - object.parameters[keys2[j]] = message.parameters[keys2[j]]; + if (message.compute != null && message.hasOwnProperty("compute")) { + object.compute = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources.toObject(message.compute, options); + if (options.oneofs) + object.resources = "compute"; + } + if (message.osImage != null && message.hasOwnProperty("osImage")) { + object.osImage = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.toObject(message.osImage, options); + if (options.oneofs) + object.runtime = "osImage"; } return object; }; /** - * Converts this ConfigDetails to JSON. + * Converts this InfrastructureSpec to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec * @instance * @returns {Object.} JSON object */ - ConfigDetails.prototype.toJSON = function toJSON() { + InfrastructureSpec.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ConfigDetails; - })(); - - DiscoveryEvent.EntityDetails = (function() { + InfrastructureSpec.ComputeResources = (function() { - /** - * Properties of an EntityDetails. - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @interface IEntityDetails - * @property {string|null} [entity] EntityDetails entity - * @property {google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null} [type] EntityDetails type - */ + /** + * Properties of a ComputeResources. + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec + * @interface IComputeResources + * @property {number|null} [diskSizeGb] ComputeResources diskSizeGb + * @property {number|null} [nodeCount] ComputeResources nodeCount + * @property {number|null} [maxNodeCount] ComputeResources maxNodeCount + */ - /** - * Constructs a new EntityDetails. - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @classdesc Represents an EntityDetails. - * @implements IEntityDetails - * @constructor - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails=} [properties] Properties to set - */ - function EntityDetails(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new ComputeResources. + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec + * @classdesc Represents a ComputeResources. + * @implements IComputeResources + * @constructor + * @param {google.cloud.dataplex.v1.Environment.InfrastructureSpec.IComputeResources=} [properties] Properties to set + */ + function ComputeResources(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * EntityDetails entity. - * @member {string} entity - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @instance - */ - EntityDetails.prototype.entity = ""; + /** + * ComputeResources diskSizeGb. + * @member {number} diskSizeGb + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources + * @instance + */ + ComputeResources.prototype.diskSizeGb = 0; - /** - * EntityDetails type. - * @member {google.cloud.dataplex.v1.DiscoveryEvent.EntityType} type - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @instance - */ - EntityDetails.prototype.type = 0; + /** + * ComputeResources nodeCount. + * @member {number} nodeCount + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources + * @instance + */ + ComputeResources.prototype.nodeCount = 0; - /** - * Creates a new EntityDetails instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails instance - */ - EntityDetails.create = function create(properties) { - return new EntityDetails(properties); - }; + /** + * ComputeResources maxNodeCount. + * @member {number} maxNodeCount + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources + * @instance + */ + ComputeResources.prototype.maxNodeCount = 0; - /** - * Encodes the specified EntityDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails} message EntityDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EntityDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.entity); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); - return writer; - }; + /** + * Creates a new ComputeResources instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources + * @static + * @param {google.cloud.dataplex.v1.Environment.InfrastructureSpec.IComputeResources=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources} ComputeResources instance + */ + ComputeResources.create = function create(properties) { + return new ComputeResources(properties); + }; - /** - * Encodes the specified EntityDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails} message EntityDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EntityDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ComputeResources message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources + * @static + * @param {google.cloud.dataplex.v1.Environment.InfrastructureSpec.IComputeResources} message ComputeResources message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComputeResources.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.diskSizeGb != null && Object.hasOwnProperty.call(message, "diskSizeGb")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.diskSizeGb); + if (message.nodeCount != null && Object.hasOwnProperty.call(message, "nodeCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nodeCount); + if (message.maxNodeCount != null && Object.hasOwnProperty.call(message, "maxNodeCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.maxNodeCount); + return writer; + }; - /** - * Decodes an EntityDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EntityDetails.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.entity = reader.string(); - break; - case 2: - message.type = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Encodes the specified ComputeResources message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources + * @static + * @param {google.cloud.dataplex.v1.Environment.InfrastructureSpec.IComputeResources} message ComputeResources message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComputeResources.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ComputeResources message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources} ComputeResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComputeResources.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.diskSizeGb = reader.int32(); + break; + case 2: + message.nodeCount = reader.int32(); + break; + case 3: + message.maxNodeCount = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes an EntityDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EntityDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a ComputeResources message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources} ComputeResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComputeResources.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an EntityDetails message. - * @function verify - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EntityDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.entity != null && message.hasOwnProperty("entity")) - if (!$util.isString(message.entity)) - return "entity: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; + /** + * Verifies a ComputeResources message. + * @function verify + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ComputeResources.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) + if (!$util.isInteger(message.diskSizeGb)) + return "diskSizeGb: integer expected"; + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + if (!$util.isInteger(message.nodeCount)) + return "nodeCount: integer expected"; + if (message.maxNodeCount != null && message.hasOwnProperty("maxNodeCount")) + if (!$util.isInteger(message.maxNodeCount)) + return "maxNodeCount: integer expected"; + return null; + }; - /** - * Creates an EntityDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails - */ - EntityDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails) + /** + * Creates a ComputeResources message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources} ComputeResources + */ + ComputeResources.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources) + return object; + var message = new $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources(); + if (object.diskSizeGb != null) + message.diskSizeGb = object.diskSizeGb | 0; + if (object.nodeCount != null) + message.nodeCount = object.nodeCount | 0; + if (object.maxNodeCount != null) + message.maxNodeCount = object.maxNodeCount | 0; + return message; + }; + + /** + * Creates a plain object from a ComputeResources message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources + * @static + * @param {google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources} message ComputeResources + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ComputeResources.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.diskSizeGb = 0; + object.nodeCount = 0; + object.maxNodeCount = 0; + } + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) + object.diskSizeGb = message.diskSizeGb; + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + object.nodeCount = message.nodeCount; + if (message.maxNodeCount != null && message.hasOwnProperty("maxNodeCount")) + object.maxNodeCount = message.maxNodeCount; return object; - var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails(); - if (object.entity != null) - message.entity = String(object.entity); - switch (object.type) { - case "ENTITY_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "TABLE": - case 1: - message.type = 1; - break; - case "FILESET": - case 2: - message.type = 2; - break; - } - return message; - }; + }; - /** - * Creates a plain object from an EntityDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} message EntityDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EntityDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.entity = ""; - object.type = options.enums === String ? "ENTITY_TYPE_UNSPECIFIED" : 0; - } - if (message.entity != null && message.hasOwnProperty("entity")) - object.entity = message.entity; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityType[message.type] : message.type; - return object; - }; + /** + * Converts this ComputeResources to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources + * @instance + * @returns {Object.} JSON object + */ + ComputeResources.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this EntityDetails to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @instance - * @returns {Object.} JSON object - */ - EntityDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return ComputeResources; + })(); - return EntityDetails; - })(); + InfrastructureSpec.OsImageRuntime = (function() { - DiscoveryEvent.PartitionDetails = (function() { + /** + * Properties of an OsImageRuntime. + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec + * @interface IOsImageRuntime + * @property {string|null} [imageVersion] OsImageRuntime imageVersion + * @property {Array.|null} [javaLibraries] OsImageRuntime javaLibraries + * @property {Array.|null} [pythonPackages] OsImageRuntime pythonPackages + * @property {Object.|null} [properties] OsImageRuntime properties + */ - /** - * Properties of a PartitionDetails. - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @interface IPartitionDetails - * @property {string|null} [partition] PartitionDetails partition - * @property {string|null} [entity] PartitionDetails entity - * @property {google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null} [type] PartitionDetails type - */ + /** + * Constructs a new OsImageRuntime. + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec + * @classdesc Represents an OsImageRuntime. + * @implements IOsImageRuntime + * @constructor + * @param {google.cloud.dataplex.v1.Environment.InfrastructureSpec.IOsImageRuntime=} [properties] Properties to set + */ + function OsImageRuntime(properties) { + this.javaLibraries = []; + this.pythonPackages = []; + this.properties = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new PartitionDetails. - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @classdesc Represents a PartitionDetails. - * @implements IPartitionDetails - * @constructor - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails=} [properties] Properties to set - */ - function PartitionDetails(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * OsImageRuntime imageVersion. + * @member {string} imageVersion + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime + * @instance + */ + OsImageRuntime.prototype.imageVersion = ""; - /** - * PartitionDetails partition. - * @member {string} partition - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @instance + /** + * OsImageRuntime javaLibraries. + * @member {Array.} javaLibraries + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime + * @instance + */ + OsImageRuntime.prototype.javaLibraries = $util.emptyArray; + + /** + * OsImageRuntime pythonPackages. + * @member {Array.} pythonPackages + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime + * @instance + */ + OsImageRuntime.prototype.pythonPackages = $util.emptyArray; + + /** + * OsImageRuntime properties. + * @member {Object.} properties + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime + * @instance + */ + OsImageRuntime.prototype.properties = $util.emptyObject; + + /** + * Creates a new OsImageRuntime instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime + * @static + * @param {google.cloud.dataplex.v1.Environment.InfrastructureSpec.IOsImageRuntime=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime} OsImageRuntime instance + */ + OsImageRuntime.create = function create(properties) { + return new OsImageRuntime(properties); + }; + + /** + * Encodes the specified OsImageRuntime message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime + * @static + * @param {google.cloud.dataplex.v1.Environment.InfrastructureSpec.IOsImageRuntime} message OsImageRuntime message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OsImageRuntime.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.imageVersion != null && Object.hasOwnProperty.call(message, "imageVersion")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.imageVersion); + if (message.javaLibraries != null && message.javaLibraries.length) + for (var i = 0; i < message.javaLibraries.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.javaLibraries[i]); + if (message.pythonPackages != null && message.pythonPackages.length) + for (var i = 0; i < message.pythonPackages.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pythonPackages[i]); + if (message.properties != null && Object.hasOwnProperty.call(message, "properties")) + for (var keys = Object.keys(message.properties), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.properties[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified OsImageRuntime message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime + * @static + * @param {google.cloud.dataplex.v1.Environment.InfrastructureSpec.IOsImageRuntime} message OsImageRuntime message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OsImageRuntime.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OsImageRuntime message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime} OsImageRuntime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OsImageRuntime.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.imageVersion = reader.string(); + break; + case 2: + if (!(message.javaLibraries && message.javaLibraries.length)) + message.javaLibraries = []; + message.javaLibraries.push(reader.string()); + break; + case 3: + if (!(message.pythonPackages && message.pythonPackages.length)) + message.pythonPackages = []; + message.pythonPackages.push(reader.string()); + break; + case 4: + if (message.properties === $util.emptyObject) + message.properties = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.properties[key] = value; + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OsImageRuntime message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime} OsImageRuntime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OsImageRuntime.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OsImageRuntime message. + * @function verify + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OsImageRuntime.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) + if (!$util.isString(message.imageVersion)) + return "imageVersion: string expected"; + if (message.javaLibraries != null && message.hasOwnProperty("javaLibraries")) { + if (!Array.isArray(message.javaLibraries)) + return "javaLibraries: array expected"; + for (var i = 0; i < message.javaLibraries.length; ++i) + if (!$util.isString(message.javaLibraries[i])) + return "javaLibraries: string[] expected"; + } + if (message.pythonPackages != null && message.hasOwnProperty("pythonPackages")) { + if (!Array.isArray(message.pythonPackages)) + return "pythonPackages: array expected"; + for (var i = 0; i < message.pythonPackages.length; ++i) + if (!$util.isString(message.pythonPackages[i])) + return "pythonPackages: string[] expected"; + } + if (message.properties != null && message.hasOwnProperty("properties")) { + if (!$util.isObject(message.properties)) + return "properties: object expected"; + var key = Object.keys(message.properties); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.properties[key[i]])) + return "properties: string{k:string} expected"; + } + return null; + }; + + /** + * Creates an OsImageRuntime message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime} OsImageRuntime + */ + OsImageRuntime.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime) + return object; + var message = new $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime(); + if (object.imageVersion != null) + message.imageVersion = String(object.imageVersion); + if (object.javaLibraries) { + if (!Array.isArray(object.javaLibraries)) + throw TypeError(".google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.javaLibraries: array expected"); + message.javaLibraries = []; + for (var i = 0; i < object.javaLibraries.length; ++i) + message.javaLibraries[i] = String(object.javaLibraries[i]); + } + if (object.pythonPackages) { + if (!Array.isArray(object.pythonPackages)) + throw TypeError(".google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.pythonPackages: array expected"); + message.pythonPackages = []; + for (var i = 0; i < object.pythonPackages.length; ++i) + message.pythonPackages[i] = String(object.pythonPackages[i]); + } + if (object.properties) { + if (typeof object.properties !== "object") + throw TypeError(".google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.properties: object expected"); + message.properties = {}; + for (var keys = Object.keys(object.properties), i = 0; i < keys.length; ++i) + message.properties[keys[i]] = String(object.properties[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from an OsImageRuntime message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime + * @static + * @param {google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime} message OsImageRuntime + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OsImageRuntime.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.javaLibraries = []; + object.pythonPackages = []; + } + if (options.objects || options.defaults) + object.properties = {}; + if (options.defaults) + object.imageVersion = ""; + if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) + object.imageVersion = message.imageVersion; + if (message.javaLibraries && message.javaLibraries.length) { + object.javaLibraries = []; + for (var j = 0; j < message.javaLibraries.length; ++j) + object.javaLibraries[j] = message.javaLibraries[j]; + } + if (message.pythonPackages && message.pythonPackages.length) { + object.pythonPackages = []; + for (var j = 0; j < message.pythonPackages.length; ++j) + object.pythonPackages[j] = message.pythonPackages[j]; + } + var keys2; + if (message.properties && (keys2 = Object.keys(message.properties)).length) { + object.properties = {}; + for (var j = 0; j < keys2.length; ++j) + object.properties[keys2[j]] = message.properties[keys2[j]]; + } + return object; + }; + + /** + * Converts this OsImageRuntime to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime + * @instance + * @returns {Object.} JSON object + */ + OsImageRuntime.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OsImageRuntime; + })(); + + return InfrastructureSpec; + })(); + + Environment.SessionSpec = (function() { + + /** + * Properties of a SessionSpec. + * @memberof google.cloud.dataplex.v1.Environment + * @interface ISessionSpec + * @property {google.protobuf.IDuration|null} [maxIdleDuration] SessionSpec maxIdleDuration + * @property {boolean|null} [enableFastStartup] SessionSpec enableFastStartup */ - PartitionDetails.prototype.partition = ""; /** - * PartitionDetails entity. - * @member {string} entity - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * Constructs a new SessionSpec. + * @memberof google.cloud.dataplex.v1.Environment + * @classdesc Represents a SessionSpec. + * @implements ISessionSpec + * @constructor + * @param {google.cloud.dataplex.v1.Environment.ISessionSpec=} [properties] Properties to set + */ + function SessionSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SessionSpec maxIdleDuration. + * @member {google.protobuf.IDuration|null|undefined} maxIdleDuration + * @memberof google.cloud.dataplex.v1.Environment.SessionSpec * @instance */ - PartitionDetails.prototype.entity = ""; + SessionSpec.prototype.maxIdleDuration = null; /** - * PartitionDetails type. - * @member {google.cloud.dataplex.v1.DiscoveryEvent.EntityType} type - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * SessionSpec enableFastStartup. + * @member {boolean} enableFastStartup + * @memberof google.cloud.dataplex.v1.Environment.SessionSpec * @instance */ - PartitionDetails.prototype.type = 0; + SessionSpec.prototype.enableFastStartup = false; /** - * Creates a new PartitionDetails instance using the specified properties. + * Creates a new SessionSpec instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @memberof google.cloud.dataplex.v1.Environment.SessionSpec * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails instance + * @param {google.cloud.dataplex.v1.Environment.ISessionSpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Environment.SessionSpec} SessionSpec instance */ - PartitionDetails.create = function create(properties) { - return new PartitionDetails(properties); + SessionSpec.create = function create(properties) { + return new SessionSpec(properties); }; /** - * Encodes the specified PartitionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. + * Encodes the specified SessionSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.SessionSpec.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @memberof google.cloud.dataplex.v1.Environment.SessionSpec * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails} message PartitionDetails message or plain object to encode + * @param {google.cloud.dataplex.v1.Environment.ISessionSpec} message SessionSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PartitionDetails.encode = function encode(message, writer) { + SessionSpec.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.partition); - if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.entity); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type); + if (message.maxIdleDuration != null && Object.hasOwnProperty.call(message, "maxIdleDuration")) + $root.google.protobuf.Duration.encode(message.maxIdleDuration, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.enableFastStartup != null && Object.hasOwnProperty.call(message, "enableFastStartup")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enableFastStartup); return writer; }; /** - * Encodes the specified PartitionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. + * Encodes the specified SessionSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.SessionSpec.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @memberof google.cloud.dataplex.v1.Environment.SessionSpec * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails} message PartitionDetails message or plain object to encode + * @param {google.cloud.dataplex.v1.Environment.ISessionSpec} message SessionSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PartitionDetails.encodeDelimited = function encodeDelimited(message, writer) { + SessionSpec.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PartitionDetails message from the specified reader or buffer. + * Decodes a SessionSpec message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @memberof google.cloud.dataplex.v1.Environment.SessionSpec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails + * @returns {google.cloud.dataplex.v1.Environment.SessionSpec} SessionSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PartitionDetails.decode = function decode(reader, length) { + SessionSpec.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Environment.SessionSpec(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.partition = reader.string(); + message.maxIdleDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; case 2: - message.entity = reader.string(); - break; - case 3: - message.type = reader.int32(); + message.enableFastStartup = reader.bool(); break; default: reader.skipType(tag & 7); @@ -1177,142 +1514,121 @@ }; /** - * Decodes a PartitionDetails message from the specified reader or buffer, length delimited. + * Decodes a SessionSpec message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @memberof google.cloud.dataplex.v1.Environment.SessionSpec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails + * @returns {google.cloud.dataplex.v1.Environment.SessionSpec} SessionSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PartitionDetails.decodeDelimited = function decodeDelimited(reader) { + SessionSpec.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PartitionDetails message. + * Verifies a SessionSpec message. * @function verify - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @memberof google.cloud.dataplex.v1.Environment.SessionSpec * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PartitionDetails.verify = function verify(message) { + SessionSpec.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.partition != null && message.hasOwnProperty("partition")) - if (!$util.isString(message.partition)) - return "partition: string expected"; - if (message.entity != null && message.hasOwnProperty("entity")) - if (!$util.isString(message.entity)) - return "entity: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.maxIdleDuration != null && message.hasOwnProperty("maxIdleDuration")) { + var error = $root.google.protobuf.Duration.verify(message.maxIdleDuration); + if (error) + return "maxIdleDuration." + error; + } + if (message.enableFastStartup != null && message.hasOwnProperty("enableFastStartup")) + if (typeof message.enableFastStartup !== "boolean") + return "enableFastStartup: boolean expected"; return null; }; /** - * Creates a PartitionDetails message from a plain object. Also converts values to their respective internal types. + * Creates a SessionSpec message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @memberof google.cloud.dataplex.v1.Environment.SessionSpec * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails + * @returns {google.cloud.dataplex.v1.Environment.SessionSpec} SessionSpec */ - PartitionDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails) + SessionSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Environment.SessionSpec) return object; - var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails(); - if (object.partition != null) - message.partition = String(object.partition); - if (object.entity != null) - message.entity = String(object.entity); - switch (object.type) { - case "ENTITY_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "TABLE": - case 1: - message.type = 1; - break; - case "FILESET": - case 2: - message.type = 2; - break; - } + var message = new $root.google.cloud.dataplex.v1.Environment.SessionSpec(); + if (object.maxIdleDuration != null) { + if (typeof object.maxIdleDuration !== "object") + throw TypeError(".google.cloud.dataplex.v1.Environment.SessionSpec.maxIdleDuration: object expected"); + message.maxIdleDuration = $root.google.protobuf.Duration.fromObject(object.maxIdleDuration); + } + if (object.enableFastStartup != null) + message.enableFastStartup = Boolean(object.enableFastStartup); return message; }; /** - * Creates a plain object from a PartitionDetails message. Also converts values to other types if specified. + * Creates a plain object from a SessionSpec message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @memberof google.cloud.dataplex.v1.Environment.SessionSpec * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} message PartitionDetails + * @param {google.cloud.dataplex.v1.Environment.SessionSpec} message SessionSpec * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PartitionDetails.toObject = function toObject(message, options) { + SessionSpec.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.partition = ""; - object.entity = ""; - object.type = options.enums === String ? "ENTITY_TYPE_UNSPECIFIED" : 0; + object.maxIdleDuration = null; + object.enableFastStartup = false; } - if (message.partition != null && message.hasOwnProperty("partition")) - object.partition = message.partition; - if (message.entity != null && message.hasOwnProperty("entity")) - object.entity = message.entity; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityType[message.type] : message.type; + if (message.maxIdleDuration != null && message.hasOwnProperty("maxIdleDuration")) + object.maxIdleDuration = $root.google.protobuf.Duration.toObject(message.maxIdleDuration, options); + if (message.enableFastStartup != null && message.hasOwnProperty("enableFastStartup")) + object.enableFastStartup = message.enableFastStartup; return object; }; /** - * Converts this PartitionDetails to JSON. + * Converts this SessionSpec to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @memberof google.cloud.dataplex.v1.Environment.SessionSpec * @instance * @returns {Object.} JSON object */ - PartitionDetails.prototype.toJSON = function toJSON() { + SessionSpec.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return PartitionDetails; + return SessionSpec; })(); - DiscoveryEvent.ActionDetails = (function() { + Environment.SessionStatus = (function() { /** - * Properties of an ActionDetails. - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @interface IActionDetails - * @property {string|null} [type] ActionDetails type + * Properties of a SessionStatus. + * @memberof google.cloud.dataplex.v1.Environment + * @interface ISessionStatus + * @property {boolean|null} [active] SessionStatus active */ /** - * Constructs a new ActionDetails. - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @classdesc Represents an ActionDetails. - * @implements IActionDetails + * Constructs a new SessionStatus. + * @memberof google.cloud.dataplex.v1.Environment + * @classdesc Represents a SessionStatus. + * @implements ISessionStatus * @constructor - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.Environment.ISessionStatus=} [properties] Properties to set */ - function ActionDetails(properties) { + function SessionStatus(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1320,75 +1636,75 @@ } /** - * ActionDetails type. - * @member {string} type - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * SessionStatus active. + * @member {boolean} active + * @memberof google.cloud.dataplex.v1.Environment.SessionStatus * @instance */ - ActionDetails.prototype.type = ""; + SessionStatus.prototype.active = false; /** - * Creates a new ActionDetails instance using the specified properties. + * Creates a new SessionStatus instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @memberof google.cloud.dataplex.v1.Environment.SessionStatus * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails instance + * @param {google.cloud.dataplex.v1.Environment.ISessionStatus=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Environment.SessionStatus} SessionStatus instance */ - ActionDetails.create = function create(properties) { - return new ActionDetails(properties); + SessionStatus.create = function create(properties) { + return new SessionStatus(properties); }; /** - * Encodes the specified ActionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. + * Encodes the specified SessionStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.SessionStatus.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @memberof google.cloud.dataplex.v1.Environment.SessionStatus * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails} message ActionDetails message or plain object to encode + * @param {google.cloud.dataplex.v1.Environment.ISessionStatus} message SessionStatus message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ActionDetails.encode = function encode(message, writer) { + SessionStatus.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.active != null && Object.hasOwnProperty.call(message, "active")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.active); return writer; }; /** - * Encodes the specified ActionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. + * Encodes the specified SessionStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.SessionStatus.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @memberof google.cloud.dataplex.v1.Environment.SessionStatus * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails} message ActionDetails message or plain object to encode + * @param {google.cloud.dataplex.v1.Environment.ISessionStatus} message SessionStatus message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ActionDetails.encodeDelimited = function encodeDelimited(message, writer) { + SessionStatus.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ActionDetails message from the specified reader or buffer. + * Decodes a SessionStatus message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @memberof google.cloud.dataplex.v1.Environment.SessionStatus * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails + * @returns {google.cloud.dataplex.v1.Environment.SessionStatus} SessionStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ActionDetails.decode = function decode(reader, length) { + SessionStatus.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Environment.SessionStatus(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.string(); + message.active = reader.bool(); break; default: reader.skipType(tag & 7); @@ -1399,298 +1715,568 @@ }; /** - * Decodes an ActionDetails message from the specified reader or buffer, length delimited. + * Decodes a SessionStatus message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @memberof google.cloud.dataplex.v1.Environment.SessionStatus * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails + * @returns {google.cloud.dataplex.v1.Environment.SessionStatus} SessionStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ActionDetails.decodeDelimited = function decodeDelimited(reader) { + SessionStatus.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ActionDetails message. + * Verifies a SessionStatus message. * @function verify - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @memberof google.cloud.dataplex.v1.Environment.SessionStatus * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ActionDetails.verify = function verify(message) { + SessionStatus.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; + if (message.active != null && message.hasOwnProperty("active")) + if (typeof message.active !== "boolean") + return "active: boolean expected"; return null; }; /** - * Creates an ActionDetails message from a plain object. Also converts values to their respective internal types. + * Creates a SessionStatus message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @memberof google.cloud.dataplex.v1.Environment.SessionStatus * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails + * @returns {google.cloud.dataplex.v1.Environment.SessionStatus} SessionStatus */ - ActionDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails) + SessionStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Environment.SessionStatus) return object; - var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails(); - if (object.type != null) - message.type = String(object.type); + var message = new $root.google.cloud.dataplex.v1.Environment.SessionStatus(); + if (object.active != null) + message.active = Boolean(object.active); return message; }; /** - * Creates a plain object from an ActionDetails message. Also converts values to other types if specified. + * Creates a plain object from a SessionStatus message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @memberof google.cloud.dataplex.v1.Environment.SessionStatus * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} message ActionDetails + * @param {google.cloud.dataplex.v1.Environment.SessionStatus} message SessionStatus * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ActionDetails.toObject = function toObject(message, options) { + SessionStatus.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.type = ""; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; + object.active = false; + if (message.active != null && message.hasOwnProperty("active")) + object.active = message.active; return object; }; /** - * Converts this ActionDetails to JSON. + * Converts this SessionStatus to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @memberof google.cloud.dataplex.v1.Environment.SessionStatus * @instance * @returns {Object.} JSON object */ - ActionDetails.prototype.toJSON = function toJSON() { + SessionStatus.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ActionDetails; + return SessionStatus; })(); - return DiscoveryEvent; - })(); - - v1.JobEvent = (function() { - - /** - * Properties of a JobEvent. - * @memberof google.cloud.dataplex.v1 - * @interface IJobEvent - * @property {string|null} [message] JobEvent message - * @property {string|null} [jobId] JobEvent jobId - * @property {google.protobuf.ITimestamp|null} [startTime] JobEvent startTime - * @property {google.protobuf.ITimestamp|null} [endTime] JobEvent endTime - * @property {google.cloud.dataplex.v1.JobEvent.State|null} [state] JobEvent state - * @property {number|null} [retries] JobEvent retries - * @property {google.cloud.dataplex.v1.JobEvent.Type|null} [type] JobEvent type - * @property {google.cloud.dataplex.v1.JobEvent.Service|null} [service] JobEvent service - * @property {string|null} [serviceJob] JobEvent serviceJob - */ - - /** - * Constructs a new JobEvent. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a JobEvent. - * @implements IJobEvent - * @constructor - * @param {google.cloud.dataplex.v1.IJobEvent=} [properties] Properties to set - */ - function JobEvent(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Environment.Endpoints = (function() { - /** - * JobEvent message. - * @member {string} message - * @memberof google.cloud.dataplex.v1.JobEvent - * @instance - */ - JobEvent.prototype.message = ""; + /** + * Properties of an Endpoints. + * @memberof google.cloud.dataplex.v1.Environment + * @interface IEndpoints + * @property {string|null} [notebooks] Endpoints notebooks + * @property {string|null} [sql] Endpoints sql + */ - /** - * JobEvent jobId. - * @member {string} jobId - * @memberof google.cloud.dataplex.v1.JobEvent - * @instance - */ - JobEvent.prototype.jobId = ""; + /** + * Constructs a new Endpoints. + * @memberof google.cloud.dataplex.v1.Environment + * @classdesc Represents an Endpoints. + * @implements IEndpoints + * @constructor + * @param {google.cloud.dataplex.v1.Environment.IEndpoints=} [properties] Properties to set + */ + function Endpoints(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * JobEvent startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.dataplex.v1.JobEvent - * @instance - */ - JobEvent.prototype.startTime = null; + /** + * Endpoints notebooks. + * @member {string} notebooks + * @memberof google.cloud.dataplex.v1.Environment.Endpoints + * @instance + */ + Endpoints.prototype.notebooks = ""; - /** - * JobEvent endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.dataplex.v1.JobEvent - * @instance - */ - JobEvent.prototype.endTime = null; + /** + * Endpoints sql. + * @member {string} sql + * @memberof google.cloud.dataplex.v1.Environment.Endpoints + * @instance + */ + Endpoints.prototype.sql = ""; - /** - * JobEvent state. - * @member {google.cloud.dataplex.v1.JobEvent.State} state - * @memberof google.cloud.dataplex.v1.JobEvent - * @instance - */ - JobEvent.prototype.state = 0; + /** + * Creates a new Endpoints instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Environment.Endpoints + * @static + * @param {google.cloud.dataplex.v1.Environment.IEndpoints=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Environment.Endpoints} Endpoints instance + */ + Endpoints.create = function create(properties) { + return new Endpoints(properties); + }; - /** - * JobEvent retries. - * @member {number} retries - * @memberof google.cloud.dataplex.v1.JobEvent - * @instance - */ - JobEvent.prototype.retries = 0; + /** + * Encodes the specified Endpoints message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.Endpoints.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Environment.Endpoints + * @static + * @param {google.cloud.dataplex.v1.Environment.IEndpoints} message Endpoints message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Endpoints.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.notebooks != null && Object.hasOwnProperty.call(message, "notebooks")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.notebooks); + if (message.sql != null && Object.hasOwnProperty.call(message, "sql")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sql); + return writer; + }; - /** - * JobEvent type. - * @member {google.cloud.dataplex.v1.JobEvent.Type} type - * @memberof google.cloud.dataplex.v1.JobEvent - * @instance - */ - JobEvent.prototype.type = 0; + /** + * Encodes the specified Endpoints message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.Endpoints.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Environment.Endpoints + * @static + * @param {google.cloud.dataplex.v1.Environment.IEndpoints} message Endpoints message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Endpoints.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * JobEvent service. - * @member {google.cloud.dataplex.v1.JobEvent.Service} service - * @memberof google.cloud.dataplex.v1.JobEvent - * @instance + /** + * Decodes an Endpoints message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Environment.Endpoints + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Environment.Endpoints} Endpoints + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Endpoints.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Environment.Endpoints(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.notebooks = reader.string(); + break; + case 2: + message.sql = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Endpoints message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Environment.Endpoints + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Environment.Endpoints} Endpoints + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Endpoints.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Endpoints message. + * @function verify + * @memberof google.cloud.dataplex.v1.Environment.Endpoints + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Endpoints.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.notebooks != null && message.hasOwnProperty("notebooks")) + if (!$util.isString(message.notebooks)) + return "notebooks: string expected"; + if (message.sql != null && message.hasOwnProperty("sql")) + if (!$util.isString(message.sql)) + return "sql: string expected"; + return null; + }; + + /** + * Creates an Endpoints message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Environment.Endpoints + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Environment.Endpoints} Endpoints + */ + Endpoints.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Environment.Endpoints) + return object; + var message = new $root.google.cloud.dataplex.v1.Environment.Endpoints(); + if (object.notebooks != null) + message.notebooks = String(object.notebooks); + if (object.sql != null) + message.sql = String(object.sql); + return message; + }; + + /** + * Creates a plain object from an Endpoints message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Environment.Endpoints + * @static + * @param {google.cloud.dataplex.v1.Environment.Endpoints} message Endpoints + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Endpoints.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.notebooks = ""; + object.sql = ""; + } + if (message.notebooks != null && message.hasOwnProperty("notebooks")) + object.notebooks = message.notebooks; + if (message.sql != null && message.hasOwnProperty("sql")) + object.sql = message.sql; + return object; + }; + + /** + * Converts this Endpoints to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Environment.Endpoints + * @instance + * @returns {Object.} JSON object + */ + Endpoints.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Endpoints; + })(); + + return Environment; + })(); + + v1.Content = (function() { + + /** + * Properties of a Content. + * @memberof google.cloud.dataplex.v1 + * @interface IContent + * @property {string|null} [name] Content name + * @property {string|null} [uid] Content uid + * @property {string|null} [path] Content path + * @property {google.protobuf.ITimestamp|null} [createTime] Content createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Content updateTime + * @property {Object.|null} [labels] Content labels + * @property {string|null} [description] Content description + * @property {string|null} [dataText] Content dataText + * @property {google.cloud.dataplex.v1.Content.ISqlScript|null} [sqlScript] Content sqlScript + * @property {google.cloud.dataplex.v1.Content.INotebook|null} [notebook] Content notebook */ - JobEvent.prototype.service = 0; /** - * JobEvent serviceJob. - * @member {string} serviceJob - * @memberof google.cloud.dataplex.v1.JobEvent + * Constructs a new Content. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a Content. + * @implements IContent + * @constructor + * @param {google.cloud.dataplex.v1.IContent=} [properties] Properties to set + */ + function Content(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Content name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Content * @instance */ - JobEvent.prototype.serviceJob = ""; + Content.prototype.name = ""; /** - * Creates a new JobEvent instance using the specified properties. + * Content uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.Content + * @instance + */ + Content.prototype.uid = ""; + + /** + * Content path. + * @member {string} path + * @memberof google.cloud.dataplex.v1.Content + * @instance + */ + Content.prototype.path = ""; + + /** + * Content createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.Content + * @instance + */ + Content.prototype.createTime = null; + + /** + * Content updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Content + * @instance + */ + Content.prototype.updateTime = null; + + /** + * Content labels. + * @member {Object.} labels + * @memberof google.cloud.dataplex.v1.Content + * @instance + */ + Content.prototype.labels = $util.emptyObject; + + /** + * Content description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.Content + * @instance + */ + Content.prototype.description = ""; + + /** + * Content dataText. + * @member {string|null|undefined} dataText + * @memberof google.cloud.dataplex.v1.Content + * @instance + */ + Content.prototype.dataText = null; + + /** + * Content sqlScript. + * @member {google.cloud.dataplex.v1.Content.ISqlScript|null|undefined} sqlScript + * @memberof google.cloud.dataplex.v1.Content + * @instance + */ + Content.prototype.sqlScript = null; + + /** + * Content notebook. + * @member {google.cloud.dataplex.v1.Content.INotebook|null|undefined} notebook + * @memberof google.cloud.dataplex.v1.Content + * @instance + */ + Content.prototype.notebook = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Content data. + * @member {"dataText"|undefined} data + * @memberof google.cloud.dataplex.v1.Content + * @instance + */ + Object.defineProperty(Content.prototype, "data", { + get: $util.oneOfGetter($oneOfFields = ["dataText"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Content content. + * @member {"sqlScript"|"notebook"|undefined} content + * @memberof google.cloud.dataplex.v1.Content + * @instance + */ + Object.defineProperty(Content.prototype, "content", { + get: $util.oneOfGetter($oneOfFields = ["sqlScript", "notebook"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Content instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.JobEvent + * @memberof google.cloud.dataplex.v1.Content * @static - * @param {google.cloud.dataplex.v1.IJobEvent=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent instance + * @param {google.cloud.dataplex.v1.IContent=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Content} Content instance */ - JobEvent.create = function create(properties) { - return new JobEvent(properties); + Content.create = function create(properties) { + return new Content(properties); }; /** - * Encodes the specified JobEvent message. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. + * Encodes the specified Content message. Does not implicitly {@link google.cloud.dataplex.v1.Content.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.JobEvent + * @memberof google.cloud.dataplex.v1.Content * @static - * @param {google.cloud.dataplex.v1.IJobEvent} message JobEvent message or plain object to encode + * @param {google.cloud.dataplex.v1.IContent} message Content message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - JobEvent.encode = function encode(message, writer) { + Content.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); - if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.jobId); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); - if (message.retries != null && Object.hasOwnProperty.call(message, "retries")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.retries); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.type); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.service); - if (message.serviceJob != null && Object.hasOwnProperty.call(message, "serviceJob")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.serviceJob); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.path); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.description); + if (message.dataText != null && Object.hasOwnProperty.call(message, "dataText")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.dataText); + if (message.sqlScript != null && Object.hasOwnProperty.call(message, "sqlScript")) + $root.google.cloud.dataplex.v1.Content.SqlScript.encode(message.sqlScript, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + if (message.notebook != null && Object.hasOwnProperty.call(message, "notebook")) + $root.google.cloud.dataplex.v1.Content.Notebook.encode(message.notebook, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); return writer; }; /** - * Encodes the specified JobEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. + * Encodes the specified Content message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Content.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.JobEvent + * @memberof google.cloud.dataplex.v1.Content * @static - * @param {google.cloud.dataplex.v1.IJobEvent} message JobEvent message or plain object to encode + * @param {google.cloud.dataplex.v1.IContent} message Content message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - JobEvent.encodeDelimited = function encodeDelimited(message, writer) { + Content.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a JobEvent message from the specified reader or buffer. + * Decodes a Content message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.JobEvent + * @memberof google.cloud.dataplex.v1.Content * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent + * @returns {google.cloud.dataplex.v1.Content} Content * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - JobEvent.decode = function decode(reader, length) { + Content.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.JobEvent(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Content(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.message = reader.string(); + message.name = reader.string(); break; case 2: - message.jobId = reader.string(); + message.uid = reader.string(); break; case 3: - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.path = reader.string(); break; case 4: - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; case 5: - message.state = reader.int32(); + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; case 6: - message.retries = reader.int32(); + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; break; case 7: - message.type = reader.int32(); - break; - case 8: - message.service = reader.int32(); + message.description = reader.string(); break; case 9: - message.serviceJob = reader.string(); + message.dataText = reader.string(); + break; + case 100: + message.sqlScript = $root.google.cloud.dataplex.v1.Content.SqlScript.decode(reader, reader.uint32()); + break; + case 101: + message.notebook = $root.google.cloud.dataplex.v1.Content.Notebook.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -1701,437 +2287,778 @@ }; /** - * Decodes a JobEvent message from the specified reader or buffer, length delimited. + * Decodes a Content message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.JobEvent + * @memberof google.cloud.dataplex.v1.Content * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent + * @returns {google.cloud.dataplex.v1.Content} Content * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - JobEvent.decodeDelimited = function decodeDelimited(reader) { + Content.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a JobEvent message. + * Verifies a Content message. * @function verify - * @memberof google.cloud.dataplex.v1.JobEvent + * @memberof google.cloud.dataplex.v1.Content * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - JobEvent.verify = function verify(message) { + Content.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.jobId != null && message.hasOwnProperty("jobId")) - if (!$util.isString(message.jobId)) - return "jobId: string expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) - return "startTime." + error; + return "createTime." + error; } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); if (error) - return "endTime." + error; + return "updateTime." + error; } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.retries != null && message.hasOwnProperty("retries")) - if (!$util.isInteger(message.retries)) - return "retries: integer expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.dataText != null && message.hasOwnProperty("dataText")) { + properties.data = 1; + if (!$util.isString(message.dataText)) + return "dataText: string expected"; + } + if (message.sqlScript != null && message.hasOwnProperty("sqlScript")) { + properties.content = 1; + { + var error = $root.google.cloud.dataplex.v1.Content.SqlScript.verify(message.sqlScript); + if (error) + return "sqlScript." + error; } - if (message.service != null && message.hasOwnProperty("service")) - switch (message.service) { - default: - return "service: enum value expected"; - case 0: - case 1: - break; + } + if (message.notebook != null && message.hasOwnProperty("notebook")) { + if (properties.content === 1) + return "content: multiple values"; + properties.content = 1; + { + var error = $root.google.cloud.dataplex.v1.Content.Notebook.verify(message.notebook); + if (error) + return "notebook." + error; } - if (message.serviceJob != null && message.hasOwnProperty("serviceJob")) - if (!$util.isString(message.serviceJob)) - return "serviceJob: string expected"; + } return null; }; /** - * Creates a JobEvent message from a plain object. Also converts values to their respective internal types. + * Creates a Content message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.JobEvent + * @memberof google.cloud.dataplex.v1.Content * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent + * @returns {google.cloud.dataplex.v1.Content} Content */ - JobEvent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.JobEvent) + Content.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Content) return object; - var message = new $root.google.cloud.dataplex.v1.JobEvent(); - if (object.message != null) - message.message = String(object.message); - if (object.jobId != null) - message.jobId = String(object.jobId); - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.JobEvent.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.JobEvent.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + var message = new $root.google.cloud.dataplex.v1.Content(); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.path != null) + message.path = String(object.path); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Content.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } - switch (object.state) { - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "SUCCEEDED": - case 1: - message.state = 1; - break; - case "FAILED": - case 2: - message.state = 2; - break; - case "CANCELLED": - case 3: - message.state = 3; - break; - case "ABORTED": - case 4: - message.state = 4; - break; + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Content.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } - if (object.retries != null) - message.retries = object.retries | 0; - switch (object.type) { - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "SPARK": - case 1: - message.type = 1; - break; - case "NOTEBOOK": - case 2: - message.type = 2; - break; + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.dataplex.v1.Content.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); } - switch (object.service) { - case "SERVICE_UNSPECIFIED": - case 0: - message.service = 0; - break; - case "DATAPROC": - case 1: - message.service = 1; - break; + if (object.description != null) + message.description = String(object.description); + if (object.dataText != null) + message.dataText = String(object.dataText); + if (object.sqlScript != null) { + if (typeof object.sqlScript !== "object") + throw TypeError(".google.cloud.dataplex.v1.Content.sqlScript: object expected"); + message.sqlScript = $root.google.cloud.dataplex.v1.Content.SqlScript.fromObject(object.sqlScript); + } + if (object.notebook != null) { + if (typeof object.notebook !== "object") + throw TypeError(".google.cloud.dataplex.v1.Content.notebook: object expected"); + message.notebook = $root.google.cloud.dataplex.v1.Content.Notebook.fromObject(object.notebook); } - if (object.serviceJob != null) - message.serviceJob = String(object.serviceJob); return message; }; /** - * Creates a plain object from a JobEvent message. Also converts values to other types if specified. + * Creates a plain object from a Content message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.JobEvent + * @memberof google.cloud.dataplex.v1.Content * @static - * @param {google.cloud.dataplex.v1.JobEvent} message JobEvent + * @param {google.cloud.dataplex.v1.Content} message Content * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - JobEvent.toObject = function toObject(message, options) { + Content.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.labels = {}; if (options.defaults) { - object.message = ""; - object.jobId = ""; - object.startTime = null; - object.endTime = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.retries = 0; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.service = options.enums === String ? "SERVICE_UNSPECIFIED" : 0; - object.serviceJob = ""; + object.name = ""; + object.uid = ""; + object.path = ""; + object.createTime = null; + object.updateTime = null; + object.description = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.dataText != null && message.hasOwnProperty("dataText")) { + object.dataText = message.dataText; + if (options.oneofs) + object.data = "dataText"; + } + if (message.sqlScript != null && message.hasOwnProperty("sqlScript")) { + object.sqlScript = $root.google.cloud.dataplex.v1.Content.SqlScript.toObject(message.sqlScript, options); + if (options.oneofs) + object.content = "sqlScript"; + } + if (message.notebook != null && message.hasOwnProperty("notebook")) { + object.notebook = $root.google.cloud.dataplex.v1.Content.Notebook.toObject(message.notebook, options); + if (options.oneofs) + object.content = "notebook"; } - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.jobId != null && message.hasOwnProperty("jobId")) - object.jobId = message.jobId; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataplex.v1.JobEvent.State[message.state] : message.state; - if (message.retries != null && message.hasOwnProperty("retries")) - object.retries = message.retries; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.JobEvent.Type[message.type] : message.type; - if (message.service != null && message.hasOwnProperty("service")) - object.service = options.enums === String ? $root.google.cloud.dataplex.v1.JobEvent.Service[message.service] : message.service; - if (message.serviceJob != null && message.hasOwnProperty("serviceJob")) - object.serviceJob = message.serviceJob; return object; }; /** - * Converts this JobEvent to JSON. + * Converts this Content to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.JobEvent + * @memberof google.cloud.dataplex.v1.Content * @instance * @returns {Object.} JSON object */ - JobEvent.prototype.toJSON = function toJSON() { + Content.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Type enum. - * @name google.cloud.dataplex.v1.JobEvent.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} SPARK=1 SPARK value - * @property {number} NOTEBOOK=2 NOTEBOOK value - */ - JobEvent.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SPARK"] = 1; - values[valuesById[2] = "NOTEBOOK"] = 2; - return values; - })(); - - /** - * State enum. - * @name google.cloud.dataplex.v1.JobEvent.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} SUCCEEDED=1 SUCCEEDED value - * @property {number} FAILED=2 FAILED value - * @property {number} CANCELLED=3 CANCELLED value - * @property {number} ABORTED=4 ABORTED value - */ - JobEvent.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SUCCEEDED"] = 1; - values[valuesById[2] = "FAILED"] = 2; - values[valuesById[3] = "CANCELLED"] = 3; - values[valuesById[4] = "ABORTED"] = 4; - return values; - })(); + Content.SqlScript = (function() { - /** - * Service enum. - * @name google.cloud.dataplex.v1.JobEvent.Service - * @enum {number} - * @property {number} SERVICE_UNSPECIFIED=0 SERVICE_UNSPECIFIED value - * @property {number} DATAPROC=1 DATAPROC value - */ - JobEvent.Service = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SERVICE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DATAPROC"] = 1; - return values; - })(); + /** + * Properties of a SqlScript. + * @memberof google.cloud.dataplex.v1.Content + * @interface ISqlScript + * @property {google.cloud.dataplex.v1.Content.SqlScript.QueryEngine|null} [engine] SqlScript engine + */ - return JobEvent; - })(); + /** + * Constructs a new SqlScript. + * @memberof google.cloud.dataplex.v1.Content + * @classdesc Represents a SqlScript. + * @implements ISqlScript + * @constructor + * @param {google.cloud.dataplex.v1.Content.ISqlScript=} [properties] Properties to set + */ + function SqlScript(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - v1.SessionEvent = (function() { + /** + * SqlScript engine. + * @member {google.cloud.dataplex.v1.Content.SqlScript.QueryEngine} engine + * @memberof google.cloud.dataplex.v1.Content.SqlScript + * @instance + */ + SqlScript.prototype.engine = 0; - /** - * Properties of a SessionEvent. - * @memberof google.cloud.dataplex.v1 - * @interface ISessionEvent - * @property {string|null} [message] SessionEvent message - * @property {string|null} [userId] SessionEvent userId - * @property {string|null} [sessionId] SessionEvent sessionId - * @property {google.cloud.dataplex.v1.SessionEvent.EventType|null} [type] SessionEvent type - * @property {google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null} [query] SessionEvent query - */ + /** + * Creates a new SqlScript instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Content.SqlScript + * @static + * @param {google.cloud.dataplex.v1.Content.ISqlScript=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Content.SqlScript} SqlScript instance + */ + SqlScript.create = function create(properties) { + return new SqlScript(properties); + }; - /** - * Constructs a new SessionEvent. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a SessionEvent. - * @implements ISessionEvent - * @constructor - * @param {google.cloud.dataplex.v1.ISessionEvent=} [properties] Properties to set - */ - function SessionEvent(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Encodes the specified SqlScript message. Does not implicitly {@link google.cloud.dataplex.v1.Content.SqlScript.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Content.SqlScript + * @static + * @param {google.cloud.dataplex.v1.Content.ISqlScript} message SqlScript message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SqlScript.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.engine != null && Object.hasOwnProperty.call(message, "engine")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.engine); + return writer; + }; - /** - * SessionEvent message. - * @member {string} message - * @memberof google.cloud.dataplex.v1.SessionEvent - * @instance - */ - SessionEvent.prototype.message = ""; + /** + * Encodes the specified SqlScript message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Content.SqlScript.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Content.SqlScript + * @static + * @param {google.cloud.dataplex.v1.Content.ISqlScript} message SqlScript message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SqlScript.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * SessionEvent userId. - * @member {string} userId - * @memberof google.cloud.dataplex.v1.SessionEvent - * @instance - */ - SessionEvent.prototype.userId = ""; + /** + * Decodes a SqlScript message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Content.SqlScript + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Content.SqlScript} SqlScript + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SqlScript.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Content.SqlScript(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.engine = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * SessionEvent sessionId. - * @member {string} sessionId - * @memberof google.cloud.dataplex.v1.SessionEvent - * @instance - */ - SessionEvent.prototype.sessionId = ""; + /** + * Decodes a SqlScript message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Content.SqlScript + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Content.SqlScript} SqlScript + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SqlScript.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * SessionEvent type. - * @member {google.cloud.dataplex.v1.SessionEvent.EventType} type - * @memberof google.cloud.dataplex.v1.SessionEvent - * @instance - */ - SessionEvent.prototype.type = 0; + /** + * Verifies a SqlScript message. + * @function verify + * @memberof google.cloud.dataplex.v1.Content.SqlScript + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SqlScript.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.engine != null && message.hasOwnProperty("engine")) + switch (message.engine) { + default: + return "engine: enum value expected"; + case 0: + case 2: + break; + } + return null; + }; - /** - * SessionEvent query. - * @member {google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null|undefined} query - * @memberof google.cloud.dataplex.v1.SessionEvent - * @instance - */ - SessionEvent.prototype.query = null; + /** + * Creates a SqlScript message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Content.SqlScript + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Content.SqlScript} SqlScript + */ + SqlScript.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Content.SqlScript) + return object; + var message = new $root.google.cloud.dataplex.v1.Content.SqlScript(); + switch (object.engine) { + case "QUERY_ENGINE_UNSPECIFIED": + case 0: + message.engine = 0; + break; + case "SPARK": + case 2: + message.engine = 2; + break; + } + return message; + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Creates a plain object from a SqlScript message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Content.SqlScript + * @static + * @param {google.cloud.dataplex.v1.Content.SqlScript} message SqlScript + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SqlScript.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.engine = options.enums === String ? "QUERY_ENGINE_UNSPECIFIED" : 0; + if (message.engine != null && message.hasOwnProperty("engine")) + object.engine = options.enums === String ? $root.google.cloud.dataplex.v1.Content.SqlScript.QueryEngine[message.engine] : message.engine; + return object; + }; - /** - * SessionEvent detail. - * @member {"query"|undefined} detail - * @memberof google.cloud.dataplex.v1.SessionEvent - * @instance - */ - Object.defineProperty(SessionEvent.prototype, "detail", { - get: $util.oneOfGetter($oneOfFields = ["query"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Converts this SqlScript to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Content.SqlScript + * @instance + * @returns {Object.} JSON object + */ + SqlScript.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a new SessionEvent instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.SessionEvent - * @static - * @param {google.cloud.dataplex.v1.ISessionEvent=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent instance - */ - SessionEvent.create = function create(properties) { - return new SessionEvent(properties); - }; + /** + * QueryEngine enum. + * @name google.cloud.dataplex.v1.Content.SqlScript.QueryEngine + * @enum {number} + * @property {number} QUERY_ENGINE_UNSPECIFIED=0 QUERY_ENGINE_UNSPECIFIED value + * @property {number} SPARK=2 SPARK value + */ + SqlScript.QueryEngine = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "QUERY_ENGINE_UNSPECIFIED"] = 0; + values[valuesById[2] = "SPARK"] = 2; + return values; + })(); - /** - * Encodes the specified SessionEvent message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.SessionEvent - * @static - * @param {google.cloud.dataplex.v1.ISessionEvent} message SessionEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SessionEvent.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); - if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.userId); - if (message.sessionId != null && Object.hasOwnProperty.call(message, "sessionId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.sessionId); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.type); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.encode(message.query, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; + return SqlScript; + })(); - /** - * Encodes the specified SessionEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. + Content.Notebook = (function() { + + /** + * Properties of a Notebook. + * @memberof google.cloud.dataplex.v1.Content + * @interface INotebook + * @property {google.cloud.dataplex.v1.Content.Notebook.KernelType|null} [kernelType] Notebook kernelType + */ + + /** + * Constructs a new Notebook. + * @memberof google.cloud.dataplex.v1.Content + * @classdesc Represents a Notebook. + * @implements INotebook + * @constructor + * @param {google.cloud.dataplex.v1.Content.INotebook=} [properties] Properties to set + */ + function Notebook(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Notebook kernelType. + * @member {google.cloud.dataplex.v1.Content.Notebook.KernelType} kernelType + * @memberof google.cloud.dataplex.v1.Content.Notebook + * @instance + */ + Notebook.prototype.kernelType = 0; + + /** + * Creates a new Notebook instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Content.Notebook + * @static + * @param {google.cloud.dataplex.v1.Content.INotebook=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Content.Notebook} Notebook instance + */ + Notebook.create = function create(properties) { + return new Notebook(properties); + }; + + /** + * Encodes the specified Notebook message. Does not implicitly {@link google.cloud.dataplex.v1.Content.Notebook.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Content.Notebook + * @static + * @param {google.cloud.dataplex.v1.Content.INotebook} message Notebook message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Notebook.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kernelType != null && Object.hasOwnProperty.call(message, "kernelType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.kernelType); + return writer; + }; + + /** + * Encodes the specified Notebook message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Content.Notebook.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Content.Notebook + * @static + * @param {google.cloud.dataplex.v1.Content.INotebook} message Notebook message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Notebook.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Notebook message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Content.Notebook + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Content.Notebook} Notebook + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Notebook.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Content.Notebook(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.kernelType = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Notebook message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Content.Notebook + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Content.Notebook} Notebook + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Notebook.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Notebook message. + * @function verify + * @memberof google.cloud.dataplex.v1.Content.Notebook + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Notebook.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kernelType != null && message.hasOwnProperty("kernelType")) + switch (message.kernelType) { + default: + return "kernelType: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates a Notebook message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Content.Notebook + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Content.Notebook} Notebook + */ + Notebook.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Content.Notebook) + return object; + var message = new $root.google.cloud.dataplex.v1.Content.Notebook(); + switch (object.kernelType) { + case "KERNEL_TYPE_UNSPECIFIED": + case 0: + message.kernelType = 0; + break; + case "PYTHON3": + case 1: + message.kernelType = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a Notebook message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Content.Notebook + * @static + * @param {google.cloud.dataplex.v1.Content.Notebook} message Notebook + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Notebook.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.kernelType = options.enums === String ? "KERNEL_TYPE_UNSPECIFIED" : 0; + if (message.kernelType != null && message.hasOwnProperty("kernelType")) + object.kernelType = options.enums === String ? $root.google.cloud.dataplex.v1.Content.Notebook.KernelType[message.kernelType] : message.kernelType; + return object; + }; + + /** + * Converts this Notebook to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Content.Notebook + * @instance + * @returns {Object.} JSON object + */ + Notebook.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * KernelType enum. + * @name google.cloud.dataplex.v1.Content.Notebook.KernelType + * @enum {number} + * @property {number} KERNEL_TYPE_UNSPECIFIED=0 KERNEL_TYPE_UNSPECIFIED value + * @property {number} PYTHON3=1 PYTHON3 value + */ + Notebook.KernelType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "KERNEL_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PYTHON3"] = 1; + return values; + })(); + + return Notebook; + })(); + + return Content; + })(); + + v1.Session = (function() { + + /** + * Properties of a Session. + * @memberof google.cloud.dataplex.v1 + * @interface ISession + * @property {string|null} [name] Session name + * @property {string|null} [userId] Session userId + * @property {google.protobuf.ITimestamp|null} [createTime] Session createTime + * @property {google.cloud.dataplex.v1.State|null} [state] Session state + */ + + /** + * Constructs a new Session. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a Session. + * @implements ISession + * @constructor + * @param {google.cloud.dataplex.v1.ISession=} [properties] Properties to set + */ + function Session(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Session name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Session + * @instance + */ + Session.prototype.name = ""; + + /** + * Session userId. + * @member {string} userId + * @memberof google.cloud.dataplex.v1.Session + * @instance + */ + Session.prototype.userId = ""; + + /** + * Session createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.Session + * @instance + */ + Session.prototype.createTime = null; + + /** + * Session state. + * @member {google.cloud.dataplex.v1.State} state + * @memberof google.cloud.dataplex.v1.Session + * @instance + */ + Session.prototype.state = 0; + + /** + * Creates a new Session instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Session + * @static + * @param {google.cloud.dataplex.v1.ISession=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Session} Session instance + */ + Session.create = function create(properties) { + return new Session(properties); + }; + + /** + * Encodes the specified Session message. Does not implicitly {@link google.cloud.dataplex.v1.Session.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Session + * @static + * @param {google.cloud.dataplex.v1.ISession} message Session message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Session.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.userId); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + return writer; + }; + + /** + * Encodes the specified Session message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Session.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.SessionEvent + * @memberof google.cloud.dataplex.v1.Session * @static - * @param {google.cloud.dataplex.v1.ISessionEvent} message SessionEvent message or plain object to encode + * @param {google.cloud.dataplex.v1.ISession} message Session message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SessionEvent.encodeDelimited = function encodeDelimited(message, writer) { + Session.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SessionEvent message from the specified reader or buffer. + * Decodes a Session message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.SessionEvent + * @memberof google.cloud.dataplex.v1.Session * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent + * @returns {google.cloud.dataplex.v1.Session} Session * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SessionEvent.decode = function decode(reader, length) { + Session.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.SessionEvent(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Session(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.message = reader.string(); + message.name = reader.string(); break; case 2: message.userId = reader.string(); break; case 3: - message.sessionId = reader.string(); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; case 4: - message.type = reader.int32(); - break; - case 5: - message.query = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.decode(reader, reader.uint32()); + message.state = reader.int32(); break; default: reader.skipType(tag & 7); @@ -2142,1128 +3069,1282 @@ }; /** - * Decodes a SessionEvent message from the specified reader or buffer, length delimited. + * Decodes a Session message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.SessionEvent + * @memberof google.cloud.dataplex.v1.Session * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent + * @returns {google.cloud.dataplex.v1.Session} Session * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SessionEvent.decodeDelimited = function decodeDelimited(reader) { + Session.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SessionEvent message. + * Verifies a Session message. * @function verify - * @memberof google.cloud.dataplex.v1.SessionEvent + * @memberof google.cloud.dataplex.v1.Session * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SessionEvent.verify = function verify(message) { + Session.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; if (message.userId != null && message.hasOwnProperty("userId")) if (!$util.isString(message.userId)) return "userId: string expected"; - if (message.sessionId != null && message.hasOwnProperty("sessionId")) - if (!$util.isString(message.sessionId)) - return "sessionId: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { default: - return "type: enum value expected"; + return "state: enum value expected"; case 0: case 1: case 2: case 3: + case 4: break; } - if (message.query != null && message.hasOwnProperty("query")) { - properties.detail = 1; - { - var error = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify(message.query); - if (error) - return "query." + error; - } - } return null; }; /** - * Creates a SessionEvent message from a plain object. Also converts values to their respective internal types. + * Creates a Session message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.SessionEvent + * @memberof google.cloud.dataplex.v1.Session * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent + * @returns {google.cloud.dataplex.v1.Session} Session */ - SessionEvent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.SessionEvent) + Session.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Session) return object; - var message = new $root.google.cloud.dataplex.v1.SessionEvent(); - if (object.message != null) - message.message = String(object.message); + var message = new $root.google.cloud.dataplex.v1.Session(); + if (object.name != null) + message.name = String(object.name); if (object.userId != null) message.userId = String(object.userId); - if (object.sessionId != null) - message.sessionId = String(object.sessionId); - switch (object.type) { - case "EVENT_TYPE_UNSPECIFIED": + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Session.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + switch (object.state) { + case "STATE_UNSPECIFIED": case 0: - message.type = 0; + message.state = 0; break; - case "START": + case "ACTIVE": case 1: - message.type = 1; + message.state = 1; break; - case "STOP": + case "CREATING": case 2: - message.type = 2; + message.state = 2; break; - case "QUERY": + case "DELETING": case 3: - message.type = 3; + message.state = 3; + break; + case "ACTION_REQUIRED": + case 4: + message.state = 4; break; - } - if (object.query != null) { - if (typeof object.query !== "object") - throw TypeError(".google.cloud.dataplex.v1.SessionEvent.query: object expected"); - message.query = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.fromObject(object.query); } return message; }; /** - * Creates a plain object from a SessionEvent message. Also converts values to other types if specified. + * Creates a plain object from a Session message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.SessionEvent + * @memberof google.cloud.dataplex.v1.Session * @static - * @param {google.cloud.dataplex.v1.SessionEvent} message SessionEvent + * @param {google.cloud.dataplex.v1.Session} message Session * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SessionEvent.toObject = function toObject(message, options) { + Session.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.message = ""; + object.name = ""; object.userId = ""; - object.sessionId = ""; - object.type = options.enums === String ? "EVENT_TYPE_UNSPECIFIED" : 0; + object.createTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; } - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; if (message.userId != null && message.hasOwnProperty("userId")) object.userId = message.userId; - if (message.sessionId != null && message.hasOwnProperty("sessionId")) - object.sessionId = message.sessionId; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.SessionEvent.EventType[message.type] : message.type; - if (message.query != null && message.hasOwnProperty("query")) { - object.query = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.toObject(message.query, options); - if (options.oneofs) - object.detail = "query"; - } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.State[message.state] : message.state; return object; }; /** - * Converts this SessionEvent to JSON. + * Converts this Session to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.SessionEvent + * @memberof google.cloud.dataplex.v1.Session * @instance * @returns {Object.} JSON object */ - SessionEvent.prototype.toJSON = function toJSON() { + Session.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + return Session; + })(); + + v1.Lake = (function() { + /** - * EventType enum. - * @name google.cloud.dataplex.v1.SessionEvent.EventType - * @enum {number} - * @property {number} EVENT_TYPE_UNSPECIFIED=0 EVENT_TYPE_UNSPECIFIED value - * @property {number} START=1 START value - * @property {number} STOP=2 STOP value - * @property {number} QUERY=3 QUERY value + * Properties of a Lake. + * @memberof google.cloud.dataplex.v1 + * @interface ILake + * @property {string|null} [name] Lake name + * @property {string|null} [displayName] Lake displayName + * @property {string|null} [uid] Lake uid + * @property {google.protobuf.ITimestamp|null} [createTime] Lake createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Lake updateTime + * @property {Object.|null} [labels] Lake labels + * @property {string|null} [description] Lake description + * @property {google.cloud.dataplex.v1.Lake.MetastoreStatus.State|null} [state] Lake state + * @property {string|null} [serviceAccount] Lake serviceAccount + * @property {google.cloud.dataplex.v1.Lake.IMetastore|null} [metastore] Lake metastore + * @property {google.cloud.dataplex.v1.IAssetStatus|null} [assetStatus] Lake assetStatus + * @property {google.cloud.dataplex.v1.Lake.IMetastoreStatus|null} [metastoreStatus] Lake metastoreStatus */ - SessionEvent.EventType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EVENT_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "START"] = 1; - values[valuesById[2] = "STOP"] = 2; - values[valuesById[3] = "QUERY"] = 3; - return values; - })(); - - SessionEvent.QueryDetail = (function() { - /** - * Properties of a QueryDetail. - * @memberof google.cloud.dataplex.v1.SessionEvent - * @interface IQueryDetail - * @property {string|null} [queryId] QueryDetail queryId - * @property {string|null} [queryText] QueryDetail queryText - * @property {google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|null} [engine] QueryDetail engine - * @property {google.protobuf.IDuration|null} [duration] QueryDetail duration - * @property {number|Long|null} [resultSizeBytes] QueryDetail resultSizeBytes - * @property {number|Long|null} [dataProcessedBytes] QueryDetail dataProcessedBytes - */ + /** + * Constructs a new Lake. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a Lake. + * @implements ILake + * @constructor + * @param {google.cloud.dataplex.v1.ILake=} [properties] Properties to set + */ + function Lake(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new QueryDetail. - * @memberof google.cloud.dataplex.v1.SessionEvent - * @classdesc Represents a QueryDetail. - * @implements IQueryDetail - * @constructor - * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail=} [properties] Properties to set - */ - function QueryDetail(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Lake name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.name = ""; - /** - * QueryDetail queryId. - * @member {string} queryId - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @instance - */ - QueryDetail.prototype.queryId = ""; + /** + * Lake displayName. + * @member {string} displayName + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.displayName = ""; - /** - * QueryDetail queryText. - * @member {string} queryText - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @instance - */ - QueryDetail.prototype.queryText = ""; + /** + * Lake uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.uid = ""; - /** - * QueryDetail engine. - * @member {google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine} engine - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @instance - */ - QueryDetail.prototype.engine = 0; + /** + * Lake createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.createTime = null; - /** - * QueryDetail duration. - * @member {google.protobuf.IDuration|null|undefined} duration - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @instance - */ - QueryDetail.prototype.duration = null; + /** + * Lake updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.updateTime = null; - /** - * QueryDetail resultSizeBytes. - * @member {number|Long} resultSizeBytes - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @instance - */ - QueryDetail.prototype.resultSizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Lake labels. + * @member {Object.} labels + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.labels = $util.emptyObject; - /** - * QueryDetail dataProcessedBytes. - * @member {number|Long} dataProcessedBytes - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @instance - */ - QueryDetail.prototype.dataProcessedBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Lake description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.description = ""; - /** - * Creates a new QueryDetail instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @static - * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail instance - */ - QueryDetail.create = function create(properties) { - return new QueryDetail(properties); - }; + /** + * Lake state. + * @member {google.cloud.dataplex.v1.Lake.MetastoreStatus.State} state + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.state = 0; - /** - * Encodes the specified QueryDetail message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @static - * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail} message QueryDetail message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDetail.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.queryId != null && Object.hasOwnProperty.call(message, "queryId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.queryId); - if (message.queryText != null && Object.hasOwnProperty.call(message, "queryText")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.queryText); - if (message.engine != null && Object.hasOwnProperty.call(message, "engine")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.engine); - if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) - $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.resultSizeBytes != null && Object.hasOwnProperty.call(message, "resultSizeBytes")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.resultSizeBytes); - if (message.dataProcessedBytes != null && Object.hasOwnProperty.call(message, "dataProcessedBytes")) - writer.uint32(/* id 6, wireType 0 =*/48).int64(message.dataProcessedBytes); - return writer; - }; - - /** - * Encodes the specified QueryDetail message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @static - * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail} message QueryDetail message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDetail.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Lake serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.serviceAccount = ""; - /** - * Decodes a QueryDetail message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDetail.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.queryId = reader.string(); - break; - case 2: - message.queryText = reader.string(); - break; - case 3: - message.engine = reader.int32(); - break; - case 4: - message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 5: - message.resultSizeBytes = reader.int64(); - break; - case 6: - message.dataProcessedBytes = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Lake metastore. + * @member {google.cloud.dataplex.v1.Lake.IMetastore|null|undefined} metastore + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.metastore = null; - /** - * Decodes a QueryDetail message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDetail.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Lake assetStatus. + * @member {google.cloud.dataplex.v1.IAssetStatus|null|undefined} assetStatus + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.assetStatus = null; - /** - * Verifies a QueryDetail message. - * @function verify - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryDetail.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.queryId != null && message.hasOwnProperty("queryId")) - if (!$util.isString(message.queryId)) - return "queryId: string expected"; - if (message.queryText != null && message.hasOwnProperty("queryText")) - if (!$util.isString(message.queryText)) - return "queryText: string expected"; - if (message.engine != null && message.hasOwnProperty("engine")) - switch (message.engine) { - default: - return "engine: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.duration != null && message.hasOwnProperty("duration")) { - var error = $root.google.protobuf.Duration.verify(message.duration); - if (error) - return "duration." + error; - } - if (message.resultSizeBytes != null && message.hasOwnProperty("resultSizeBytes")) - if (!$util.isInteger(message.resultSizeBytes) && !(message.resultSizeBytes && $util.isInteger(message.resultSizeBytes.low) && $util.isInteger(message.resultSizeBytes.high))) - return "resultSizeBytes: integer|Long expected"; - if (message.dataProcessedBytes != null && message.hasOwnProperty("dataProcessedBytes")) - if (!$util.isInteger(message.dataProcessedBytes) && !(message.dataProcessedBytes && $util.isInteger(message.dataProcessedBytes.low) && $util.isInteger(message.dataProcessedBytes.high))) - return "dataProcessedBytes: integer|Long expected"; - return null; - }; + /** + * Lake metastoreStatus. + * @member {google.cloud.dataplex.v1.Lake.IMetastoreStatus|null|undefined} metastoreStatus + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.metastoreStatus = null; - /** - * Creates a QueryDetail message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail - */ - QueryDetail.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail) - return object; - var message = new $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail(); - if (object.queryId != null) - message.queryId = String(object.queryId); - if (object.queryText != null) - message.queryText = String(object.queryText); - switch (object.engine) { - case "ENGINE_UNSPECIFIED": - case 0: - message.engine = 0; - break; - case "SPARK_SQL": - case 1: - message.engine = 1; - break; - case "BIGQUERY": - case 2: - message.engine = 2; - break; - } - if (object.duration != null) { - if (typeof object.duration !== "object") - throw TypeError(".google.cloud.dataplex.v1.SessionEvent.QueryDetail.duration: object expected"); - message.duration = $root.google.protobuf.Duration.fromObject(object.duration); - } - if (object.resultSizeBytes != null) - if ($util.Long) - (message.resultSizeBytes = $util.Long.fromValue(object.resultSizeBytes)).unsigned = false; - else if (typeof object.resultSizeBytes === "string") - message.resultSizeBytes = parseInt(object.resultSizeBytes, 10); - else if (typeof object.resultSizeBytes === "number") - message.resultSizeBytes = object.resultSizeBytes; - else if (typeof object.resultSizeBytes === "object") - message.resultSizeBytes = new $util.LongBits(object.resultSizeBytes.low >>> 0, object.resultSizeBytes.high >>> 0).toNumber(); - if (object.dataProcessedBytes != null) - if ($util.Long) - (message.dataProcessedBytes = $util.Long.fromValue(object.dataProcessedBytes)).unsigned = false; - else if (typeof object.dataProcessedBytes === "string") - message.dataProcessedBytes = parseInt(object.dataProcessedBytes, 10); - else if (typeof object.dataProcessedBytes === "number") - message.dataProcessedBytes = object.dataProcessedBytes; - else if (typeof object.dataProcessedBytes === "object") - message.dataProcessedBytes = new $util.LongBits(object.dataProcessedBytes.low >>> 0, object.dataProcessedBytes.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a QueryDetail message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @static - * @param {google.cloud.dataplex.v1.SessionEvent.QueryDetail} message QueryDetail - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryDetail.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.queryId = ""; - object.queryText = ""; - object.engine = options.enums === String ? "ENGINE_UNSPECIFIED" : 0; - object.duration = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.resultSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.resultSizeBytes = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.dataProcessedBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.dataProcessedBytes = options.longs === String ? "0" : 0; - } - if (message.queryId != null && message.hasOwnProperty("queryId")) - object.queryId = message.queryId; - if (message.queryText != null && message.hasOwnProperty("queryText")) - object.queryText = message.queryText; - if (message.engine != null && message.hasOwnProperty("engine")) - object.engine = options.enums === String ? $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine[message.engine] : message.engine; - if (message.duration != null && message.hasOwnProperty("duration")) - object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); - if (message.resultSizeBytes != null && message.hasOwnProperty("resultSizeBytes")) - if (typeof message.resultSizeBytes === "number") - object.resultSizeBytes = options.longs === String ? String(message.resultSizeBytes) : message.resultSizeBytes; - else - object.resultSizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.resultSizeBytes) : options.longs === Number ? new $util.LongBits(message.resultSizeBytes.low >>> 0, message.resultSizeBytes.high >>> 0).toNumber() : message.resultSizeBytes; - if (message.dataProcessedBytes != null && message.hasOwnProperty("dataProcessedBytes")) - if (typeof message.dataProcessedBytes === "number") - object.dataProcessedBytes = options.longs === String ? String(message.dataProcessedBytes) : message.dataProcessedBytes; - else - object.dataProcessedBytes = options.longs === String ? $util.Long.prototype.toString.call(message.dataProcessedBytes) : options.longs === Number ? new $util.LongBits(message.dataProcessedBytes.low >>> 0, message.dataProcessedBytes.high >>> 0).toNumber() : message.dataProcessedBytes; - return object; - }; - - /** - * Converts this QueryDetail to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @instance - * @returns {Object.} JSON object - */ - QueryDetail.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Engine enum. - * @name google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine - * @enum {number} - * @property {number} ENGINE_UNSPECIFIED=0 ENGINE_UNSPECIFIED value - * @property {number} SPARK_SQL=1 SPARK_SQL value - * @property {number} BIGQUERY=2 BIGQUERY value - */ - QueryDetail.Engine = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENGINE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SPARK_SQL"] = 1; - values[valuesById[2] = "BIGQUERY"] = 2; - return values; - })(); - - return QueryDetail; - })(); - - return SessionEvent; - })(); - - v1.MetadataService = (function() { - - /** - * Constructs a new MetadataService service. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a MetadataService - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function MetadataService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (MetadataService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MetadataService; + /** + * Creates a new Lake instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Lake + * @static + * @param {google.cloud.dataplex.v1.ILake=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Lake} Lake instance + */ + Lake.create = function create(properties) { + return new Lake(properties); + }; /** - * Creates new MetadataService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dataplex.v1.MetadataService + * Encodes the specified Lake message. Does not implicitly {@link google.cloud.dataplex.v1.Lake.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Lake * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {MetadataService} RPC service. Useful where requests and/or responses are streamed. + * @param {google.cloud.dataplex.v1.ILake} message Lake message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - MetadataService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); + Lake.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.uid); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.description); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.serviceAccount); + if (message.metastore != null && Object.hasOwnProperty.call(message, "metastore")) + $root.google.cloud.dataplex.v1.Lake.Metastore.encode(message.metastore, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); + if (message.assetStatus != null && Object.hasOwnProperty.call(message, "assetStatus")) + $root.google.cloud.dataplex.v1.AssetStatus.encode(message.assetStatus, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); + if (message.metastoreStatus != null && Object.hasOwnProperty.call(message, "metastoreStatus")) + $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.encode(message.metastoreStatus, writer.uint32(/* id 104, wireType 2 =*/834).fork()).ldelim(); + return writer; }; /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#getEntity}. - * @memberof google.cloud.dataplex.v1.MetadataService - * @typedef GetEntityCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Entity} [response] Entity + * Encodes the specified Lake message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Lake.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Lake + * @static + * @param {google.cloud.dataplex.v1.ILake} message Lake message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + Lake.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls GetEntity. - * @function getEntity - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.IGetEntityRequest} request GetEntityRequest message or plain object - * @param {google.cloud.dataplex.v1.MetadataService.GetEntityCallback} callback Node-style callback called with the error, if any, and Entity - * @returns {undefined} - * @variation 1 + * Decodes a Lake message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Lake + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Lake} Lake + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(MetadataService.prototype.getEntity = function getEntity(request, callback) { - return this.rpcCall(getEntity, $root.google.cloud.dataplex.v1.GetEntityRequest, $root.google.cloud.dataplex.v1.Entity, request, callback); - }, "name", { value: "GetEntity" }); + Lake.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Lake(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.displayName = reader.string(); + break; + case 3: + message.uid = reader.string(); + break; + case 4: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + case 7: + message.description = reader.string(); + break; + case 8: + message.state = reader.int32(); + break; + case 9: + message.serviceAccount = reader.string(); + break; + case 102: + message.metastore = $root.google.cloud.dataplex.v1.Lake.Metastore.decode(reader, reader.uint32()); + break; + case 103: + message.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.decode(reader, reader.uint32()); + break; + case 104: + message.metastoreStatus = $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls GetEntity. - * @function getEntity - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.IGetEntityRequest} request GetEntityRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a Lake message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Lake + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Lake} Lake + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + Lake.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#listEntities}. - * @memberof google.cloud.dataplex.v1.MetadataService - * @typedef ListEntitiesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListEntitiesResponse} [response] ListEntitiesResponse + * Verifies a Lake message. + * @function verify + * @memberof google.cloud.dataplex.v1.Lake + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + Lake.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.metastore != null && message.hasOwnProperty("metastore")) { + var error = $root.google.cloud.dataplex.v1.Lake.Metastore.verify(message.metastore); + if (error) + return "metastore." + error; + } + if (message.assetStatus != null && message.hasOwnProperty("assetStatus")) { + var error = $root.google.cloud.dataplex.v1.AssetStatus.verify(message.assetStatus); + if (error) + return "assetStatus." + error; + } + if (message.metastoreStatus != null && message.hasOwnProperty("metastoreStatus")) { + var error = $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.verify(message.metastoreStatus); + if (error) + return "metastoreStatus." + error; + } + return null; + }; /** - * Calls ListEntities. - * @function listEntities - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.IListEntitiesRequest} request ListEntitiesRequest message or plain object - * @param {google.cloud.dataplex.v1.MetadataService.ListEntitiesCallback} callback Node-style callback called with the error, if any, and ListEntitiesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MetadataService.prototype.listEntities = function listEntities(request, callback) { - return this.rpcCall(listEntities, $root.google.cloud.dataplex.v1.ListEntitiesRequest, $root.google.cloud.dataplex.v1.ListEntitiesResponse, request, callback); - }, "name", { value: "ListEntities" }); - - /** - * Calls ListEntities. - * @function listEntities - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.IListEntitiesRequest} request ListEntitiesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a Lake message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Lake + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Lake} Lake */ + Lake.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Lake) + return object; + var message = new $root.google.cloud.dataplex.v1.Lake(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uid != null) + message.uid = String(object.uid); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Lake.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Lake.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.dataplex.v1.Lake.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.description != null) + message.description = String(object.description); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "NONE": + case 1: + message.state = 1; + break; + case "READY": + case 2: + message.state = 2; + break; + case "UPDATING": + case 3: + message.state = 3; + break; + case "ERROR": + case 4: + message.state = 4; + break; + } + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.metastore != null) { + if (typeof object.metastore !== "object") + throw TypeError(".google.cloud.dataplex.v1.Lake.metastore: object expected"); + message.metastore = $root.google.cloud.dataplex.v1.Lake.Metastore.fromObject(object.metastore); + } + if (object.assetStatus != null) { + if (typeof object.assetStatus !== "object") + throw TypeError(".google.cloud.dataplex.v1.Lake.assetStatus: object expected"); + message.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.fromObject(object.assetStatus); + } + if (object.metastoreStatus != null) { + if (typeof object.metastoreStatus !== "object") + throw TypeError(".google.cloud.dataplex.v1.Lake.metastoreStatus: object expected"); + message.metastoreStatus = $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.fromObject(object.metastoreStatus); + } + return message; + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#getPartition}. - * @memberof google.cloud.dataplex.v1.MetadataService - * @typedef GetPartitionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Partition} [response] Partition + * Creates a plain object from a Lake message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Lake + * @static + * @param {google.cloud.dataplex.v1.Lake} message Lake + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + Lake.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.uid = ""; + object.createTime = null; + object.updateTime = null; + object.description = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.serviceAccount = ""; + object.metastore = null; + object.assetStatus = null; + object.metastoreStatus = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.State[message.state] : message.state; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.metastore != null && message.hasOwnProperty("metastore")) + object.metastore = $root.google.cloud.dataplex.v1.Lake.Metastore.toObject(message.metastore, options); + if (message.assetStatus != null && message.hasOwnProperty("assetStatus")) + object.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.toObject(message.assetStatus, options); + if (message.metastoreStatus != null && message.hasOwnProperty("metastoreStatus")) + object.metastoreStatus = $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.toObject(message.metastoreStatus, options); + return object; + }; /** - * Calls GetPartition. - * @function getPartition - * @memberof google.cloud.dataplex.v1.MetadataService + * Converts this Lake to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Lake * @instance - * @param {google.cloud.dataplex.v1.IGetPartitionRequest} request GetPartitionRequest message or plain object - * @param {google.cloud.dataplex.v1.MetadataService.GetPartitionCallback} callback Node-style callback called with the error, if any, and Partition - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(MetadataService.prototype.getPartition = function getPartition(request, callback) { - return this.rpcCall(getPartition, $root.google.cloud.dataplex.v1.GetPartitionRequest, $root.google.cloud.dataplex.v1.Partition, request, callback); - }, "name", { value: "GetPartition" }); + Lake.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Calls GetPartition. - * @function getPartition - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.IGetPartitionRequest} request GetPartitionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + Lake.Metastore = (function() { - /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#listPartitions}. - * @memberof google.cloud.dataplex.v1.MetadataService - * @typedef ListPartitionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListPartitionsResponse} [response] ListPartitionsResponse - */ + /** + * Properties of a Metastore. + * @memberof google.cloud.dataplex.v1.Lake + * @interface IMetastore + * @property {string|null} [service] Metastore service + */ - /** - * Calls ListPartitions. - * @function listPartitions - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.IListPartitionsRequest} request ListPartitionsRequest message or plain object - * @param {google.cloud.dataplex.v1.MetadataService.ListPartitionsCallback} callback Node-style callback called with the error, if any, and ListPartitionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MetadataService.prototype.listPartitions = function listPartitions(request, callback) { - return this.rpcCall(listPartitions, $root.google.cloud.dataplex.v1.ListPartitionsRequest, $root.google.cloud.dataplex.v1.ListPartitionsResponse, request, callback); - }, "name", { value: "ListPartitions" }); + /** + * Constructs a new Metastore. + * @memberof google.cloud.dataplex.v1.Lake + * @classdesc Represents a Metastore. + * @implements IMetastore + * @constructor + * @param {google.cloud.dataplex.v1.Lake.IMetastore=} [properties] Properties to set + */ + function Metastore(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Calls ListPartitions. - * @function listPartitions - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.IListPartitionsRequest} request ListPartitionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Metastore service. + * @member {string} service + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @instance + */ + Metastore.prototype.service = ""; - return MetadataService; - })(); + /** + * Creates a new Metastore instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @static + * @param {google.cloud.dataplex.v1.Lake.IMetastore=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Lake.Metastore} Metastore instance + */ + Metastore.create = function create(properties) { + return new Metastore(properties); + }; - v1.ListEntitiesRequest = (function() { + /** + * Encodes the specified Metastore message. Does not implicitly {@link google.cloud.dataplex.v1.Lake.Metastore.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @static + * @param {google.cloud.dataplex.v1.Lake.IMetastore} message Metastore message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metastore.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); + return writer; + }; - /** - * Properties of a ListEntitiesRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IListEntitiesRequest - * @property {string|null} [parent] ListEntitiesRequest parent - * @property {google.cloud.dataplex.v1.ListEntitiesRequest.EntityView|null} [view] ListEntitiesRequest view - * @property {number|null} [pageSize] ListEntitiesRequest pageSize - * @property {string|null} [pageToken] ListEntitiesRequest pageToken - * @property {string|null} [filter] ListEntitiesRequest filter - */ + /** + * Encodes the specified Metastore message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Lake.Metastore.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @static + * @param {google.cloud.dataplex.v1.Lake.IMetastore} message Metastore message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metastore.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Constructs a new ListEntitiesRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListEntitiesRequest. - * @implements IListEntitiesRequest - * @constructor - * @param {google.cloud.dataplex.v1.IListEntitiesRequest=} [properties] Properties to set - */ - function ListEntitiesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Decodes a Metastore message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Lake.Metastore} Metastore + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metastore.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Lake.Metastore(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.service = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * ListEntitiesRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest - * @instance - */ - ListEntitiesRequest.prototype.parent = ""; + /** + * Decodes a Metastore message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Lake.Metastore} Metastore + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metastore.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * ListEntitiesRequest view. - * @member {google.cloud.dataplex.v1.ListEntitiesRequest.EntityView} view - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest - * @instance - */ - ListEntitiesRequest.prototype.view = 0; + /** + * Verifies a Metastore message. + * @function verify + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metastore.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + return null; + }; - /** - * ListEntitiesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest - * @instance - */ - ListEntitiesRequest.prototype.pageSize = 0; + /** + * Creates a Metastore message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Lake.Metastore} Metastore + */ + Metastore.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Lake.Metastore) + return object; + var message = new $root.google.cloud.dataplex.v1.Lake.Metastore(); + if (object.service != null) + message.service = String(object.service); + return message; + }; - /** - * ListEntitiesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest - * @instance - */ - ListEntitiesRequest.prototype.pageToken = ""; + /** + * Creates a plain object from a Metastore message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @static + * @param {google.cloud.dataplex.v1.Lake.Metastore} message Metastore + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metastore.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.service = ""; + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + return object; + }; - /** - * ListEntitiesRequest filter. - * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest - * @instance - */ - ListEntitiesRequest.prototype.filter = ""; + /** + * Converts this Metastore to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @instance + * @returns {Object.} JSON object + */ + Metastore.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a new ListEntitiesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest - * @static - * @param {google.cloud.dataplex.v1.IListEntitiesRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListEntitiesRequest} ListEntitiesRequest instance - */ - ListEntitiesRequest.create = function create(properties) { - return new ListEntitiesRequest(properties); - }; + return Metastore; + })(); - /** - * Encodes the specified ListEntitiesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest - * @static - * @param {google.cloud.dataplex.v1.IListEntitiesRequest} message ListEntitiesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEntitiesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); - return writer; - }; + Lake.MetastoreStatus = (function() { - /** - * Encodes the specified ListEntitiesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest - * @static - * @param {google.cloud.dataplex.v1.IListEntitiesRequest} message ListEntitiesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEntitiesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a MetastoreStatus. + * @memberof google.cloud.dataplex.v1.Lake + * @interface IMetastoreStatus + * @property {google.cloud.dataplex.v1.Lake.MetastoreStatus.State|null} [state] MetastoreStatus state + * @property {string|null} [message] MetastoreStatus message + * @property {google.protobuf.ITimestamp|null} [updateTime] MetastoreStatus updateTime + * @property {string|null} [endpoint] MetastoreStatus endpoint + */ - /** - * Decodes a ListEntitiesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListEntitiesRequest} ListEntitiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEntitiesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListEntitiesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.view = reader.int32(); - break; - case 3: - message.pageSize = reader.int32(); - break; - case 4: - message.pageToken = reader.string(); - break; - case 5: - message.filter = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Constructs a new MetastoreStatus. + * @memberof google.cloud.dataplex.v1.Lake + * @classdesc Represents a MetastoreStatus. + * @implements IMetastoreStatus + * @constructor + * @param {google.cloud.dataplex.v1.Lake.IMetastoreStatus=} [properties] Properties to set + */ + function MetastoreStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - return message; - }; - /** - * Decodes a ListEntitiesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListEntitiesRequest} ListEntitiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEntitiesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * MetastoreStatus state. + * @member {google.cloud.dataplex.v1.Lake.MetastoreStatus.State} state + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @instance + */ + MetastoreStatus.prototype.state = 0; - /** - * Verifies a ListEntitiesRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListEntitiesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - return null; - }; + /** + * MetastoreStatus message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @instance + */ + MetastoreStatus.prototype.message = ""; - /** - * Creates a ListEntitiesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListEntitiesRequest} ListEntitiesRequest - */ - ListEntitiesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListEntitiesRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.ListEntitiesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - switch (object.view) { - case "ENTITY_VIEW_UNSPECIFIED": - case 0: - message.view = 0; - break; - case "TABLES": - case 1: - message.view = 1; - break; - case "FILESETS": - case 2: - message.view = 2; - break; - } - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - return message; - }; + /** + * MetastoreStatus updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @instance + */ + MetastoreStatus.prototype.updateTime = null; - /** - * Creates a plain object from a ListEntitiesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest - * @static - * @param {google.cloud.dataplex.v1.ListEntitiesRequest} message ListEntitiesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListEntitiesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.view = options.enums === String ? "ENTITY_VIEW_UNSPECIFIED" : 0; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.dataplex.v1.ListEntitiesRequest.EntityView[message.view] : message.view; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - return object; - }; + /** + * MetastoreStatus endpoint. + * @member {string} endpoint + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @instance + */ + MetastoreStatus.prototype.endpoint = ""; - /** - * Converts this ListEntitiesRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest - * @instance - * @returns {Object.} JSON object - */ - ListEntitiesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * EntityView enum. - * @name google.cloud.dataplex.v1.ListEntitiesRequest.EntityView - * @enum {number} - * @property {number} ENTITY_VIEW_UNSPECIFIED=0 ENTITY_VIEW_UNSPECIFIED value - * @property {number} TABLES=1 TABLES value - * @property {number} FILESETS=2 FILESETS value - */ - ListEntitiesRequest.EntityView = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENTITY_VIEW_UNSPECIFIED"] = 0; - values[valuesById[1] = "TABLES"] = 1; - values[valuesById[2] = "FILESETS"] = 2; - return values; - })(); - - return ListEntitiesRequest; - })(); + /** + * Creates a new MetastoreStatus instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @static + * @param {google.cloud.dataplex.v1.Lake.IMetastoreStatus=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Lake.MetastoreStatus} MetastoreStatus instance + */ + MetastoreStatus.create = function create(properties) { + return new MetastoreStatus(properties); + }; - v1.ListEntitiesResponse = (function() { + /** + * Encodes the specified MetastoreStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Lake.MetastoreStatus.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @static + * @param {google.cloud.dataplex.v1.Lake.IMetastoreStatus} message MetastoreStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetastoreStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.endpoint); + return writer; + }; - /** - * Properties of a ListEntitiesResponse. - * @memberof google.cloud.dataplex.v1 - * @interface IListEntitiesResponse - * @property {Array.|null} [entities] ListEntitiesResponse entities - * @property {string|null} [nextPageToken] ListEntitiesResponse nextPageToken - */ + /** + * Encodes the specified MetastoreStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Lake.MetastoreStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @static + * @param {google.cloud.dataplex.v1.Lake.IMetastoreStatus} message MetastoreStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetastoreStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Constructs a new ListEntitiesResponse. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListEntitiesResponse. - * @implements IListEntitiesResponse - * @constructor - * @param {google.cloud.dataplex.v1.IListEntitiesResponse=} [properties] Properties to set - */ - function ListEntitiesResponse(properties) { - this.entities = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Decodes a MetastoreStatus message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Lake.MetastoreStatus} MetastoreStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetastoreStatus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Lake.MetastoreStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.state = reader.int32(); + break; + case 2: + message.message = reader.string(); + break; + case 3: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.endpoint = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * ListEntitiesResponse entities. - * @member {Array.} entities - * @memberof google.cloud.dataplex.v1.ListEntitiesResponse - * @instance - */ - ListEntitiesResponse.prototype.entities = $util.emptyArray; + /** + * Decodes a MetastoreStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Lake.MetastoreStatus} MetastoreStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetastoreStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * ListEntitiesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListEntitiesResponse - * @instance - */ - ListEntitiesResponse.prototype.nextPageToken = ""; + /** + * Verifies a MetastoreStatus message. + * @function verify + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetastoreStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.endpoint != null && message.hasOwnProperty("endpoint")) + if (!$util.isString(message.endpoint)) + return "endpoint: string expected"; + return null; + }; - /** - * Creates a new ListEntitiesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListEntitiesResponse - * @static - * @param {google.cloud.dataplex.v1.IListEntitiesResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListEntitiesResponse} ListEntitiesResponse instance - */ - ListEntitiesResponse.create = function create(properties) { - return new ListEntitiesResponse(properties); - }; + /** + * Creates a MetastoreStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Lake.MetastoreStatus} MetastoreStatus + */ + MetastoreStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Lake.MetastoreStatus) + return object; + var message = new $root.google.cloud.dataplex.v1.Lake.MetastoreStatus(); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "NONE": + case 1: + message.state = 1; + break; + case "READY": + case 2: + message.state = 2; + break; + case "UPDATING": + case 3: + message.state = 3; + break; + case "ERROR": + case 4: + message.state = 4; + break; + } + if (object.message != null) + message.message = String(object.message); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Lake.MetastoreStatus.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.endpoint != null) + message.endpoint = String(object.endpoint); + return message; + }; - /** - * Encodes the specified ListEntitiesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesResponse.verify|verify} messages. + /** + * Creates a plain object from a MetastoreStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @static + * @param {google.cloud.dataplex.v1.Lake.MetastoreStatus} message MetastoreStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetastoreStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.message = ""; + object.updateTime = null; + object.endpoint = ""; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.State[message.state] : message.state; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.endpoint != null && message.hasOwnProperty("endpoint")) + object.endpoint = message.endpoint; + return object; + }; + + /** + * Converts this MetastoreStatus to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @instance + * @returns {Object.} JSON object + */ + MetastoreStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * State enum. + * @name google.cloud.dataplex.v1.Lake.MetastoreStatus.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} NONE=1 NONE value + * @property {number} READY=2 READY value + * @property {number} UPDATING=3 UPDATING value + * @property {number} ERROR=4 ERROR value + */ + MetastoreStatus.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NONE"] = 1; + values[valuesById[2] = "READY"] = 2; + values[valuesById[3] = "UPDATING"] = 3; + values[valuesById[4] = "ERROR"] = 4; + return values; + })(); + + return MetastoreStatus; + })(); + + return Lake; + })(); + + v1.AssetStatus = (function() { + + /** + * Properties of an AssetStatus. + * @memberof google.cloud.dataplex.v1 + * @interface IAssetStatus + * @property {google.protobuf.ITimestamp|null} [updateTime] AssetStatus updateTime + * @property {number|null} [activeAssets] AssetStatus activeAssets + * @property {number|null} [securityPolicyApplyingAssets] AssetStatus securityPolicyApplyingAssets + */ + + /** + * Constructs a new AssetStatus. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an AssetStatus. + * @implements IAssetStatus + * @constructor + * @param {google.cloud.dataplex.v1.IAssetStatus=} [properties] Properties to set + */ + function AssetStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AssetStatus updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.AssetStatus + * @instance + */ + AssetStatus.prototype.updateTime = null; + + /** + * AssetStatus activeAssets. + * @member {number} activeAssets + * @memberof google.cloud.dataplex.v1.AssetStatus + * @instance + */ + AssetStatus.prototype.activeAssets = 0; + + /** + * AssetStatus securityPolicyApplyingAssets. + * @member {number} securityPolicyApplyingAssets + * @memberof google.cloud.dataplex.v1.AssetStatus + * @instance + */ + AssetStatus.prototype.securityPolicyApplyingAssets = 0; + + /** + * Creates a new AssetStatus instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.AssetStatus + * @static + * @param {google.cloud.dataplex.v1.IAssetStatus=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.AssetStatus} AssetStatus instance + */ + AssetStatus.create = function create(properties) { + return new AssetStatus(properties); + }; + + /** + * Encodes the specified AssetStatus message. Does not implicitly {@link google.cloud.dataplex.v1.AssetStatus.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @memberof google.cloud.dataplex.v1.AssetStatus * @static - * @param {google.cloud.dataplex.v1.IListEntitiesResponse} message ListEntitiesResponse message or plain object to encode + * @param {google.cloud.dataplex.v1.IAssetStatus} message AssetStatus message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEntitiesResponse.encode = function encode(message, writer) { + AssetStatus.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.entities != null && message.entities.length) - for (var i = 0; i < message.entities.length; ++i) - $root.google.cloud.dataplex.v1.Entity.encode(message.entities[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.activeAssets != null && Object.hasOwnProperty.call(message, "activeAssets")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.activeAssets); + if (message.securityPolicyApplyingAssets != null && Object.hasOwnProperty.call(message, "securityPolicyApplyingAssets")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.securityPolicyApplyingAssets); return writer; }; /** - * Encodes the specified ListEntitiesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesResponse.verify|verify} messages. + * Encodes the specified AssetStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AssetStatus.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @memberof google.cloud.dataplex.v1.AssetStatus * @static - * @param {google.cloud.dataplex.v1.IListEntitiesResponse} message ListEntitiesResponse message or plain object to encode + * @param {google.cloud.dataplex.v1.IAssetStatus} message AssetStatus message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEntitiesResponse.encodeDelimited = function encodeDelimited(message, writer) { + AssetStatus.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListEntitiesResponse message from the specified reader or buffer. + * Decodes an AssetStatus message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @memberof google.cloud.dataplex.v1.AssetStatus * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListEntitiesResponse} ListEntitiesResponse + * @returns {google.cloud.dataplex.v1.AssetStatus} AssetStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEntitiesResponse.decode = function decode(reader, length) { + AssetStatus.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListEntitiesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.AssetStatus(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.entities && message.entities.length)) - message.entities = []; - message.entities.push($root.google.cloud.dataplex.v1.Entity.decode(reader, reader.uint32())); + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; case 2: - message.nextPageToken = reader.string(); + message.activeAssets = reader.int32(); + break; + case 3: + message.securityPolicyApplyingAssets = reader.int32(); break; default: reader.skipType(tag & 7); @@ -3274,134 +4355,141 @@ }; /** - * Decodes a ListEntitiesResponse message from the specified reader or buffer, length delimited. + * Decodes an AssetStatus message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @memberof google.cloud.dataplex.v1.AssetStatus * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListEntitiesResponse} ListEntitiesResponse + * @returns {google.cloud.dataplex.v1.AssetStatus} AssetStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEntitiesResponse.decodeDelimited = function decodeDelimited(reader) { + AssetStatus.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListEntitiesResponse message. + * Verifies an AssetStatus message. * @function verify - * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @memberof google.cloud.dataplex.v1.AssetStatus * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListEntitiesResponse.verify = function verify(message) { + AssetStatus.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.entities != null && message.hasOwnProperty("entities")) { - if (!Array.isArray(message.entities)) - return "entities: array expected"; - for (var i = 0; i < message.entities.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Entity.verify(message.entities[i]); - if (error) - return "entities." + error; - } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.activeAssets != null && message.hasOwnProperty("activeAssets")) + if (!$util.isInteger(message.activeAssets)) + return "activeAssets: integer expected"; + if (message.securityPolicyApplyingAssets != null && message.hasOwnProperty("securityPolicyApplyingAssets")) + if (!$util.isInteger(message.securityPolicyApplyingAssets)) + return "securityPolicyApplyingAssets: integer expected"; return null; }; /** - * Creates a ListEntitiesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an AssetStatus message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @memberof google.cloud.dataplex.v1.AssetStatus * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListEntitiesResponse} ListEntitiesResponse + * @returns {google.cloud.dataplex.v1.AssetStatus} AssetStatus */ - ListEntitiesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListEntitiesResponse) + AssetStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.AssetStatus) return object; - var message = new $root.google.cloud.dataplex.v1.ListEntitiesResponse(); - if (object.entities) { - if (!Array.isArray(object.entities)) - throw TypeError(".google.cloud.dataplex.v1.ListEntitiesResponse.entities: array expected"); - message.entities = []; - for (var i = 0; i < object.entities.length; ++i) { - if (typeof object.entities[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListEntitiesResponse.entities: object expected"); - message.entities[i] = $root.google.cloud.dataplex.v1.Entity.fromObject(object.entities[i]); - } + var message = new $root.google.cloud.dataplex.v1.AssetStatus(); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.AssetStatus.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + if (object.activeAssets != null) + message.activeAssets = object.activeAssets | 0; + if (object.securityPolicyApplyingAssets != null) + message.securityPolicyApplyingAssets = object.securityPolicyApplyingAssets | 0; return message; }; /** - * Creates a plain object from a ListEntitiesResponse message. Also converts values to other types if specified. + * Creates a plain object from an AssetStatus message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @memberof google.cloud.dataplex.v1.AssetStatus * @static - * @param {google.cloud.dataplex.v1.ListEntitiesResponse} message ListEntitiesResponse + * @param {google.cloud.dataplex.v1.AssetStatus} message AssetStatus * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListEntitiesResponse.toObject = function toObject(message, options) { + AssetStatus.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.entities = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.entities && message.entities.length) { - object.entities = []; - for (var j = 0; j < message.entities.length; ++j) - object.entities[j] = $root.google.cloud.dataplex.v1.Entity.toObject(message.entities[j], options); + if (options.defaults) { + object.updateTime = null; + object.activeAssets = 0; + object.securityPolicyApplyingAssets = 0; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.activeAssets != null && message.hasOwnProperty("activeAssets")) + object.activeAssets = message.activeAssets; + if (message.securityPolicyApplyingAssets != null && message.hasOwnProperty("securityPolicyApplyingAssets")) + object.securityPolicyApplyingAssets = message.securityPolicyApplyingAssets; return object; }; /** - * Converts this ListEntitiesResponse to JSON. + * Converts this AssetStatus to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @memberof google.cloud.dataplex.v1.AssetStatus * @instance * @returns {Object.} JSON object */ - ListEntitiesResponse.prototype.toJSON = function toJSON() { + AssetStatus.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListEntitiesResponse; + return AssetStatus; })(); - v1.GetEntityRequest = (function() { + v1.Zone = (function() { /** - * Properties of a GetEntityRequest. + * Properties of a Zone. * @memberof google.cloud.dataplex.v1 - * @interface IGetEntityRequest - * @property {string|null} [name] GetEntityRequest name - * @property {google.cloud.dataplex.v1.GetEntityRequest.EntityView|null} [view] GetEntityRequest view + * @interface IZone + * @property {string|null} [name] Zone name + * @property {string|null} [displayName] Zone displayName + * @property {string|null} [uid] Zone uid + * @property {google.protobuf.ITimestamp|null} [createTime] Zone createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Zone updateTime + * @property {Object.|null} [labels] Zone labels + * @property {string|null} [description] Zone description + * @property {google.cloud.dataplex.v1.State|null} [state] Zone state + * @property {google.cloud.dataplex.v1.Zone.Type|null} [type] Zone type + * @property {google.cloud.dataplex.v1.Zone.IDiscoverySpec|null} [discoverySpec] Zone discoverySpec + * @property {google.cloud.dataplex.v1.Zone.IResourceSpec|null} [resourceSpec] Zone resourceSpec + * @property {google.cloud.dataplex.v1.IAssetStatus|null} [assetStatus] Zone assetStatus */ /** - * Constructs a new GetEntityRequest. + * Constructs a new Zone. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetEntityRequest. - * @implements IGetEntityRequest + * @classdesc Represents a Zone. + * @implements IZone * @constructor - * @param {google.cloud.dataplex.v1.IGetEntityRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IZone=} [properties] Properties to set */ - function GetEntityRequest(properties) { + function Zone(properties) { + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3409,80 +4497,181 @@ } /** - * GetEntityRequest name. + * Zone name. * @member {string} name - * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @memberof google.cloud.dataplex.v1.Zone * @instance */ - GetEntityRequest.prototype.name = ""; + Zone.prototype.name = ""; /** - * GetEntityRequest view. - * @member {google.cloud.dataplex.v1.GetEntityRequest.EntityView} view - * @memberof google.cloud.dataplex.v1.GetEntityRequest + * Zone displayName. + * @member {string} displayName + * @memberof google.cloud.dataplex.v1.Zone * @instance */ - GetEntityRequest.prototype.view = 0; + Zone.prototype.displayName = ""; /** - * Creates a new GetEntityRequest instance using the specified properties. + * Zone uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.uid = ""; + + /** + * Zone createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.createTime = null; + + /** + * Zone updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.updateTime = null; + + /** + * Zone labels. + * @member {Object.} labels + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.labels = $util.emptyObject; + + /** + * Zone description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.description = ""; + + /** + * Zone state. + * @member {google.cloud.dataplex.v1.State} state + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.state = 0; + + /** + * Zone type. + * @member {google.cloud.dataplex.v1.Zone.Type} type + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.type = 0; + + /** + * Zone discoverySpec. + * @member {google.cloud.dataplex.v1.Zone.IDiscoverySpec|null|undefined} discoverySpec + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.discoverySpec = null; + + /** + * Zone resourceSpec. + * @member {google.cloud.dataplex.v1.Zone.IResourceSpec|null|undefined} resourceSpec + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.resourceSpec = null; + + /** + * Zone assetStatus. + * @member {google.cloud.dataplex.v1.IAssetStatus|null|undefined} assetStatus + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.assetStatus = null; + + /** + * Creates a new Zone instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @memberof google.cloud.dataplex.v1.Zone * @static - * @param {google.cloud.dataplex.v1.IGetEntityRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetEntityRequest} GetEntityRequest instance + * @param {google.cloud.dataplex.v1.IZone=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Zone} Zone instance */ - GetEntityRequest.create = function create(properties) { - return new GetEntityRequest(properties); + Zone.create = function create(properties) { + return new Zone(properties); }; /** - * Encodes the specified GetEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetEntityRequest.verify|verify} messages. + * Encodes the specified Zone message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @memberof google.cloud.dataplex.v1.Zone * @static - * @param {google.cloud.dataplex.v1.IGetEntityRequest} message GetEntityRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IZone} message Zone message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetEntityRequest.encode = function encode(message, writer) { + Zone.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.uid); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.description); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.type); + if (message.discoverySpec != null && Object.hasOwnProperty.call(message, "discoverySpec")) + $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.encode(message.discoverySpec, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); + if (message.resourceSpec != null && Object.hasOwnProperty.call(message, "resourceSpec")) + $root.google.cloud.dataplex.v1.Zone.ResourceSpec.encode(message.resourceSpec, writer.uint32(/* id 104, wireType 2 =*/834).fork()).ldelim(); + if (message.assetStatus != null && Object.hasOwnProperty.call(message, "assetStatus")) + $root.google.cloud.dataplex.v1.AssetStatus.encode(message.assetStatus, writer.uint32(/* id 105, wireType 2 =*/842).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetEntityRequest.verify|verify} messages. + * Encodes the specified Zone message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @memberof google.cloud.dataplex.v1.Zone * @static - * @param {google.cloud.dataplex.v1.IGetEntityRequest} message GetEntityRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IZone} message Zone message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetEntityRequest.encodeDelimited = function encodeDelimited(message, writer) { + Zone.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetEntityRequest message from the specified reader or buffer. + * Decodes a Zone message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @memberof google.cloud.dataplex.v1.Zone * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GetEntityRequest} GetEntityRequest + * @returns {google.cloud.dataplex.v1.Zone} Zone * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetEntityRequest.decode = function decode(reader, length) { + Zone.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetEntityRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Zone(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -3490,1987 +4679,1708 @@ message.name = reader.string(); break; case 2: - message.view = reader.int32(); + message.displayName = reader.string(); break; - default: - reader.skipType(tag & 7); + case 3: + message.uid = reader.string(); break; - } - } - return message; - }; - - /** - * Decodes a GetEntityRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetEntityRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GetEntityRequest} GetEntityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetEntityRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetEntityRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.GetEntityRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetEntityRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: + case 4: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + case 7: + message.description = reader.string(); + break; + case 8: + message.state = reader.int32(); + break; + case 9: + message.type = reader.int32(); + break; + case 103: + message.discoverySpec = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.decode(reader, reader.uint32()); + break; + case 104: + message.resourceSpec = $root.google.cloud.dataplex.v1.Zone.ResourceSpec.decode(reader, reader.uint32()); + break; + case 105: + message.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Zone message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Zone + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Zone} Zone + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Zone.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Zone message. + * @function verify + * @memberof google.cloud.dataplex.v1.Zone + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Zone.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: case 2: + case 3: case 4: break; } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.discoverySpec != null && message.hasOwnProperty("discoverySpec")) { + var error = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.verify(message.discoverySpec); + if (error) + return "discoverySpec." + error; + } + if (message.resourceSpec != null && message.hasOwnProperty("resourceSpec")) { + var error = $root.google.cloud.dataplex.v1.Zone.ResourceSpec.verify(message.resourceSpec); + if (error) + return "resourceSpec." + error; + } + if (message.assetStatus != null && message.hasOwnProperty("assetStatus")) { + var error = $root.google.cloud.dataplex.v1.AssetStatus.verify(message.assetStatus); + if (error) + return "assetStatus." + error; + } return null; }; /** - * Creates a GetEntityRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Zone message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @memberof google.cloud.dataplex.v1.Zone * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetEntityRequest} GetEntityRequest + * @returns {google.cloud.dataplex.v1.Zone} Zone */ - GetEntityRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetEntityRequest) + Zone.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Zone) return object; - var message = new $root.google.cloud.dataplex.v1.GetEntityRequest(); + var message = new $root.google.cloud.dataplex.v1.Zone(); if (object.name != null) message.name = String(object.name); - switch (object.view) { - case "ENTITY_VIEW_UNSPECIFIED": + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uid != null) + message.uid = String(object.uid); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Zone.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Zone.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.dataplex.v1.Zone.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.description != null) + message.description = String(object.description); + switch (object.state) { + case "STATE_UNSPECIFIED": case 0: - message.view = 0; + message.state = 0; break; - case "BASIC": + case "ACTIVE": case 1: - message.view = 1; + message.state = 1; break; - case "SCHEMA": + case "CREATING": case 2: - message.view = 2; + message.state = 2; break; - case "FULL": + case "DELETING": + case 3: + message.state = 3; + break; + case "ACTION_REQUIRED": case 4: - message.view = 4; + message.state = 4; + break; + } + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "RAW": + case 1: + message.type = 1; + break; + case "CURATED": + case 2: + message.type = 2; break; } + if (object.discoverySpec != null) { + if (typeof object.discoverySpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Zone.discoverySpec: object expected"); + message.discoverySpec = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.fromObject(object.discoverySpec); + } + if (object.resourceSpec != null) { + if (typeof object.resourceSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Zone.resourceSpec: object expected"); + message.resourceSpec = $root.google.cloud.dataplex.v1.Zone.ResourceSpec.fromObject(object.resourceSpec); + } + if (object.assetStatus != null) { + if (typeof object.assetStatus !== "object") + throw TypeError(".google.cloud.dataplex.v1.Zone.assetStatus: object expected"); + message.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.fromObject(object.assetStatus); + } return message; }; /** - * Creates a plain object from a GetEntityRequest message. Also converts values to other types if specified. + * Creates a plain object from a Zone message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @memberof google.cloud.dataplex.v1.Zone * @static - * @param {google.cloud.dataplex.v1.GetEntityRequest} message GetEntityRequest + * @param {google.cloud.dataplex.v1.Zone} message Zone * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetEntityRequest.toObject = function toObject(message, options) { + Zone.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.labels = {}; if (options.defaults) { object.name = ""; - object.view = options.enums === String ? "ENTITY_VIEW_UNSPECIFIED" : 0; + object.displayName = ""; + object.uid = ""; + object.createTime = null; + object.updateTime = null; + object.description = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.discoverySpec = null; + object.resourceSpec = null; + object.assetStatus = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.dataplex.v1.GetEntityRequest.EntityView[message.view] : message.view; - return object; - }; - - /** - * Converts this GetEntityRequest to JSON. + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.State[message.state] : message.state; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Zone.Type[message.type] : message.type; + if (message.discoverySpec != null && message.hasOwnProperty("discoverySpec")) + object.discoverySpec = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.toObject(message.discoverySpec, options); + if (message.resourceSpec != null && message.hasOwnProperty("resourceSpec")) + object.resourceSpec = $root.google.cloud.dataplex.v1.Zone.ResourceSpec.toObject(message.resourceSpec, options); + if (message.assetStatus != null && message.hasOwnProperty("assetStatus")) + object.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.toObject(message.assetStatus, options); + return object; + }; + + /** + * Converts this Zone to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @memberof google.cloud.dataplex.v1.Zone * @instance * @returns {Object.} JSON object */ - GetEntityRequest.prototype.toJSON = function toJSON() { + Zone.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * EntityView enum. - * @name google.cloud.dataplex.v1.GetEntityRequest.EntityView + * Type enum. + * @name google.cloud.dataplex.v1.Zone.Type * @enum {number} - * @property {number} ENTITY_VIEW_UNSPECIFIED=0 ENTITY_VIEW_UNSPECIFIED value - * @property {number} BASIC=1 BASIC value - * @property {number} SCHEMA=2 SCHEMA value - * @property {number} FULL=4 FULL value + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} RAW=1 RAW value + * @property {number} CURATED=2 CURATED value */ - GetEntityRequest.EntityView = (function() { + Zone.Type = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENTITY_VIEW_UNSPECIFIED"] = 0; - values[valuesById[1] = "BASIC"] = 1; - values[valuesById[2] = "SCHEMA"] = 2; - values[valuesById[4] = "FULL"] = 4; + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RAW"] = 1; + values[valuesById[2] = "CURATED"] = 2; return values; })(); - return GetEntityRequest; - })(); - - v1.ListPartitionsRequest = (function() { + Zone.ResourceSpec = (function() { - /** - * Properties of a ListPartitionsRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IListPartitionsRequest - * @property {string|null} [parent] ListPartitionsRequest parent - * @property {number|null} [pageSize] ListPartitionsRequest pageSize - * @property {string|null} [pageToken] ListPartitionsRequest pageToken - * @property {string|null} [filter] ListPartitionsRequest filter - */ + /** + * Properties of a ResourceSpec. + * @memberof google.cloud.dataplex.v1.Zone + * @interface IResourceSpec + * @property {google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType|null} [locationType] ResourceSpec locationType + */ - /** - * Constructs a new ListPartitionsRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListPartitionsRequest. - * @implements IListPartitionsRequest - * @constructor - * @param {google.cloud.dataplex.v1.IListPartitionsRequest=} [properties] Properties to set - */ - function ListPartitionsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new ResourceSpec. + * @memberof google.cloud.dataplex.v1.Zone + * @classdesc Represents a ResourceSpec. + * @implements IResourceSpec + * @constructor + * @param {google.cloud.dataplex.v1.Zone.IResourceSpec=} [properties] Properties to set + */ + function ResourceSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * ListPartitionsRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest - * @instance - */ - ListPartitionsRequest.prototype.parent = ""; + /** + * ResourceSpec locationType. + * @member {google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType} locationType + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @instance + */ + ResourceSpec.prototype.locationType = 0; - /** - * ListPartitionsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest - * @instance - */ - ListPartitionsRequest.prototype.pageSize = 0; + /** + * Creates a new ResourceSpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @static + * @param {google.cloud.dataplex.v1.Zone.IResourceSpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Zone.ResourceSpec} ResourceSpec instance + */ + ResourceSpec.create = function create(properties) { + return new ResourceSpec(properties); + }; - /** - * ListPartitionsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest - * @instance - */ - ListPartitionsRequest.prototype.pageToken = ""; + /** + * Encodes the specified ResourceSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.ResourceSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @static + * @param {google.cloud.dataplex.v1.Zone.IResourceSpec} message ResourceSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.locationType != null && Object.hasOwnProperty.call(message, "locationType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.locationType); + return writer; + }; - /** - * ListPartitionsRequest filter. - * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest - * @instance - */ - ListPartitionsRequest.prototype.filter = ""; + /** + * Encodes the specified ResourceSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.ResourceSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @static + * @param {google.cloud.dataplex.v1.Zone.IResourceSpec} message ResourceSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a new ListPartitionsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest - * @static - * @param {google.cloud.dataplex.v1.IListPartitionsRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListPartitionsRequest} ListPartitionsRequest instance - */ - ListPartitionsRequest.create = function create(properties) { - return new ListPartitionsRequest(properties); - }; + /** + * Decodes a ResourceSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Zone.ResourceSpec} ResourceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Zone.ResourceSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.locationType = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified ListPartitionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest - * @static - * @param {google.cloud.dataplex.v1.IListPartitionsRequest} message ListPartitionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPartitionsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - return writer; - }; + /** + * Decodes a ResourceSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Zone.ResourceSpec} ResourceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified ListPartitionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest - * @static - * @param {google.cloud.dataplex.v1.IListPartitionsRequest} message ListPartitionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPartitionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Verifies a ResourceSpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.locationType != null && message.hasOwnProperty("locationType")) + switch (message.locationType) { + default: + return "locationType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; - /** - * Decodes a ListPartitionsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListPartitionsRequest} ListPartitionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPartitionsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListPartitionsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + /** + * Creates a ResourceSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Zone.ResourceSpec} ResourceSpec + */ + ResourceSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Zone.ResourceSpec) + return object; + var message = new $root.google.cloud.dataplex.v1.Zone.ResourceSpec(); + switch (object.locationType) { + case "LOCATION_TYPE_UNSPECIFIED": + case 0: + message.locationType = 0; + break; + case "SINGLE_REGION": case 1: - message.parent = reader.string(); + message.locationType = 1; break; + case "MULTI_REGION": case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - case 4: - message.filter = reader.string(); - break; - default: - reader.skipType(tag & 7); + message.locationType = 2; break; } - } - return message; - }; - - /** - * Decodes a ListPartitionsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListPartitionsRequest} ListPartitionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPartitionsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListPartitionsRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListPartitionsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - return null; - }; + return message; + }; - /** - * Creates a ListPartitionsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListPartitionsRequest} ListPartitionsRequest - */ - ListPartitionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListPartitionsRequest) + /** + * Creates a plain object from a ResourceSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @static + * @param {google.cloud.dataplex.v1.Zone.ResourceSpec} message ResourceSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.locationType = options.enums === String ? "LOCATION_TYPE_UNSPECIFIED" : 0; + if (message.locationType != null && message.hasOwnProperty("locationType")) + object.locationType = options.enums === String ? $root.google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType[message.locationType] : message.locationType; return object; - var message = new $root.google.cloud.dataplex.v1.ListPartitionsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - return message; - }; + }; - /** - * Creates a plain object from a ListPartitionsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest - * @static - * @param {google.cloud.dataplex.v1.ListPartitionsRequest} message ListPartitionsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListPartitionsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - return object; - }; + /** + * Converts this ResourceSpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @instance + * @returns {Object.} JSON object + */ + ResourceSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this ListPartitionsRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest - * @instance - * @returns {Object.} JSON object - */ - ListPartitionsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * LocationType enum. + * @name google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType + * @enum {number} + * @property {number} LOCATION_TYPE_UNSPECIFIED=0 LOCATION_TYPE_UNSPECIFIED value + * @property {number} SINGLE_REGION=1 SINGLE_REGION value + * @property {number} MULTI_REGION=2 MULTI_REGION value + */ + ResourceSpec.LocationType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOCATION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SINGLE_REGION"] = 1; + values[valuesById[2] = "MULTI_REGION"] = 2; + return values; + })(); - return ListPartitionsRequest; - })(); + return ResourceSpec; + })(); - v1.ListPartitionsResponse = (function() { + Zone.DiscoverySpec = (function() { - /** - * Properties of a ListPartitionsResponse. - * @memberof google.cloud.dataplex.v1 - * @interface IListPartitionsResponse - * @property {Array.|null} [partitions] ListPartitionsResponse partitions - * @property {string|null} [nextPageToken] ListPartitionsResponse nextPageToken - */ + /** + * Properties of a DiscoverySpec. + * @memberof google.cloud.dataplex.v1.Zone + * @interface IDiscoverySpec + * @property {boolean|null} [enabled] DiscoverySpec enabled + * @property {Array.|null} [includePatterns] DiscoverySpec includePatterns + * @property {Array.|null} [excludePatterns] DiscoverySpec excludePatterns + * @property {google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions|null} [csvOptions] DiscoverySpec csvOptions + * @property {google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions|null} [jsonOptions] DiscoverySpec jsonOptions + * @property {string|null} [schedule] DiscoverySpec schedule + */ - /** - * Constructs a new ListPartitionsResponse. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListPartitionsResponse. - * @implements IListPartitionsResponse - * @constructor - * @param {google.cloud.dataplex.v1.IListPartitionsResponse=} [properties] Properties to set - */ - function ListPartitionsResponse(properties) { - this.partitions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new DiscoverySpec. + * @memberof google.cloud.dataplex.v1.Zone + * @classdesc Represents a DiscoverySpec. + * @implements IDiscoverySpec + * @constructor + * @param {google.cloud.dataplex.v1.Zone.IDiscoverySpec=} [properties] Properties to set + */ + function DiscoverySpec(properties) { + this.includePatterns = []; + this.excludePatterns = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * ListPartitionsResponse partitions. - * @member {Array.} partitions - * @memberof google.cloud.dataplex.v1.ListPartitionsResponse - * @instance - */ - ListPartitionsResponse.prototype.partitions = $util.emptyArray; + /** + * DiscoverySpec enabled. + * @member {boolean} enabled + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.enabled = false; - /** - * ListPartitionsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListPartitionsResponse - * @instance - */ - ListPartitionsResponse.prototype.nextPageToken = ""; + /** + * DiscoverySpec includePatterns. + * @member {Array.} includePatterns + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.includePatterns = $util.emptyArray; - /** - * Creates a new ListPartitionsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListPartitionsResponse - * @static - * @param {google.cloud.dataplex.v1.IListPartitionsResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListPartitionsResponse} ListPartitionsResponse instance - */ - ListPartitionsResponse.create = function create(properties) { - return new ListPartitionsResponse(properties); - }; + /** + * DiscoverySpec excludePatterns. + * @member {Array.} excludePatterns + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.excludePatterns = $util.emptyArray; - /** - * Encodes the specified ListPartitionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListPartitionsResponse - * @static - * @param {google.cloud.dataplex.v1.IListPartitionsResponse} message ListPartitionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPartitionsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.partitions != null && message.partitions.length) - for (var i = 0; i < message.partitions.length; ++i) - $root.google.cloud.dataplex.v1.Partition.encode(message.partitions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; + /** + * DiscoverySpec csvOptions. + * @member {google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions|null|undefined} csvOptions + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.csvOptions = null; - /** - * Encodes the specified ListPartitionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListPartitionsResponse - * @static - * @param {google.cloud.dataplex.v1.IListPartitionsResponse} message ListPartitionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPartitionsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * DiscoverySpec jsonOptions. + * @member {google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions|null|undefined} jsonOptions + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.jsonOptions = null; - /** - * Decodes a ListPartitionsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListPartitionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListPartitionsResponse} ListPartitionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPartitionsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListPartitionsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.partitions && message.partitions.length)) - message.partitions = []; - message.partitions.push($root.google.cloud.dataplex.v1.Partition.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * DiscoverySpec schedule. + * @member {string|null|undefined} schedule + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.schedule = null; - /** - * Decodes a ListPartitionsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListPartitionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListPartitionsResponse} ListPartitionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPartitionsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Verifies a ListPartitionsResponse message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListPartitionsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListPartitionsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.partitions != null && message.hasOwnProperty("partitions")) { - if (!Array.isArray(message.partitions)) - return "partitions: array expected"; - for (var i = 0; i < message.partitions.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Partition.verify(message.partitions[i]); - if (error) - return "partitions." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + /** + * DiscoverySpec trigger. + * @member {"schedule"|undefined} trigger + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @instance + */ + Object.defineProperty(DiscoverySpec.prototype, "trigger", { + get: $util.oneOfGetter($oneOfFields = ["schedule"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Creates a ListPartitionsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListPartitionsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListPartitionsResponse} ListPartitionsResponse - */ - ListPartitionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListPartitionsResponse) - return object; - var message = new $root.google.cloud.dataplex.v1.ListPartitionsResponse(); - if (object.partitions) { - if (!Array.isArray(object.partitions)) - throw TypeError(".google.cloud.dataplex.v1.ListPartitionsResponse.partitions: array expected"); - message.partitions = []; - for (var i = 0; i < object.partitions.length; ++i) { - if (typeof object.partitions[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListPartitionsResponse.partitions: object expected"); - message.partitions[i] = $root.google.cloud.dataplex.v1.Partition.fromObject(object.partitions[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; + /** + * Creates a new DiscoverySpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @static + * @param {google.cloud.dataplex.v1.Zone.IDiscoverySpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec} DiscoverySpec instance + */ + DiscoverySpec.create = function create(properties) { + return new DiscoverySpec(properties); + }; - /** - * Creates a plain object from a ListPartitionsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListPartitionsResponse - * @static - * @param {google.cloud.dataplex.v1.ListPartitionsResponse} message ListPartitionsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListPartitionsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.partitions = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.partitions && message.partitions.length) { - object.partitions = []; - for (var j = 0; j < message.partitions.length; ++j) - object.partitions[j] = $root.google.cloud.dataplex.v1.Partition.toObject(message.partitions[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListPartitionsResponse to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListPartitionsResponse - * @instance - * @returns {Object.} JSON object - */ - ListPartitionsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified DiscoverySpec message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @static + * @param {google.cloud.dataplex.v1.Zone.IDiscoverySpec} message DiscoverySpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoverySpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + if (message.includePatterns != null && message.includePatterns.length) + for (var i = 0; i < message.includePatterns.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.includePatterns[i]); + if (message.excludePatterns != null && message.excludePatterns.length) + for (var i = 0; i < message.excludePatterns.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.excludePatterns[i]); + if (message.csvOptions != null && Object.hasOwnProperty.call(message, "csvOptions")) + $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.encode(message.csvOptions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.jsonOptions != null && Object.hasOwnProperty.call(message, "jsonOptions")) + $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.encode(message.jsonOptions, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.schedule != null && Object.hasOwnProperty.call(message, "schedule")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.schedule); + return writer; + }; - return ListPartitionsResponse; - })(); + /** + * Encodes the specified DiscoverySpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @static + * @param {google.cloud.dataplex.v1.Zone.IDiscoverySpec} message DiscoverySpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoverySpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - v1.GetPartitionRequest = (function() { + /** + * Decodes a DiscoverySpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec} DiscoverySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoverySpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Zone.DiscoverySpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.enabled = reader.bool(); + break; + case 2: + if (!(message.includePatterns && message.includePatterns.length)) + message.includePatterns = []; + message.includePatterns.push(reader.string()); + break; + case 3: + if (!(message.excludePatterns && message.excludePatterns.length)) + message.excludePatterns = []; + message.excludePatterns.push(reader.string()); + break; + case 4: + message.csvOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.decode(reader, reader.uint32()); + break; + case 5: + message.jsonOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.decode(reader, reader.uint32()); + break; + case 10: + message.schedule = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Properties of a GetPartitionRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IGetPartitionRequest - * @property {string|null} [name] GetPartitionRequest name - */ + /** + * Decodes a DiscoverySpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec} DiscoverySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoverySpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Constructs a new GetPartitionRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetPartitionRequest. - * @implements IGetPartitionRequest - * @constructor - * @param {google.cloud.dataplex.v1.IGetPartitionRequest=} [properties] Properties to set - */ - function GetPartitionRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Verifies a DiscoverySpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoverySpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + if (message.includePatterns != null && message.hasOwnProperty("includePatterns")) { + if (!Array.isArray(message.includePatterns)) + return "includePatterns: array expected"; + for (var i = 0; i < message.includePatterns.length; ++i) + if (!$util.isString(message.includePatterns[i])) + return "includePatterns: string[] expected"; + } + if (message.excludePatterns != null && message.hasOwnProperty("excludePatterns")) { + if (!Array.isArray(message.excludePatterns)) + return "excludePatterns: array expected"; + for (var i = 0; i < message.excludePatterns.length; ++i) + if (!$util.isString(message.excludePatterns[i])) + return "excludePatterns: string[] expected"; + } + if (message.csvOptions != null && message.hasOwnProperty("csvOptions")) { + var error = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.verify(message.csvOptions); + if (error) + return "csvOptions." + error; + } + if (message.jsonOptions != null && message.hasOwnProperty("jsonOptions")) { + var error = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.verify(message.jsonOptions); + if (error) + return "jsonOptions." + error; + } + if (message.schedule != null && message.hasOwnProperty("schedule")) { + properties.trigger = 1; + if (!$util.isString(message.schedule)) + return "schedule: string expected"; + } + return null; + }; - /** - * GetPartitionRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.GetPartitionRequest - * @instance - */ - GetPartitionRequest.prototype.name = ""; + /** + * Creates a DiscoverySpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec} DiscoverySpec + */ + DiscoverySpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Zone.DiscoverySpec) + return object; + var message = new $root.google.cloud.dataplex.v1.Zone.DiscoverySpec(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.includePatterns) { + if (!Array.isArray(object.includePatterns)) + throw TypeError(".google.cloud.dataplex.v1.Zone.DiscoverySpec.includePatterns: array expected"); + message.includePatterns = []; + for (var i = 0; i < object.includePatterns.length; ++i) + message.includePatterns[i] = String(object.includePatterns[i]); + } + if (object.excludePatterns) { + if (!Array.isArray(object.excludePatterns)) + throw TypeError(".google.cloud.dataplex.v1.Zone.DiscoverySpec.excludePatterns: array expected"); + message.excludePatterns = []; + for (var i = 0; i < object.excludePatterns.length; ++i) + message.excludePatterns[i] = String(object.excludePatterns[i]); + } + if (object.csvOptions != null) { + if (typeof object.csvOptions !== "object") + throw TypeError(".google.cloud.dataplex.v1.Zone.DiscoverySpec.csvOptions: object expected"); + message.csvOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.fromObject(object.csvOptions); + } + if (object.jsonOptions != null) { + if (typeof object.jsonOptions !== "object") + throw TypeError(".google.cloud.dataplex.v1.Zone.DiscoverySpec.jsonOptions: object expected"); + message.jsonOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.fromObject(object.jsonOptions); + } + if (object.schedule != null) + message.schedule = String(object.schedule); + return message; + }; - /** - * Creates a new GetPartitionRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.GetPartitionRequest - * @static - * @param {google.cloud.dataplex.v1.IGetPartitionRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetPartitionRequest} GetPartitionRequest instance - */ - GetPartitionRequest.create = function create(properties) { - return new GetPartitionRequest(properties); - }; + /** + * Creates a plain object from a DiscoverySpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @static + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec} message DiscoverySpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoverySpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.includePatterns = []; + object.excludePatterns = []; + } + if (options.defaults) { + object.enabled = false; + object.csvOptions = null; + object.jsonOptions = null; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.includePatterns && message.includePatterns.length) { + object.includePatterns = []; + for (var j = 0; j < message.includePatterns.length; ++j) + object.includePatterns[j] = message.includePatterns[j]; + } + if (message.excludePatterns && message.excludePatterns.length) { + object.excludePatterns = []; + for (var j = 0; j < message.excludePatterns.length; ++j) + object.excludePatterns[j] = message.excludePatterns[j]; + } + if (message.csvOptions != null && message.hasOwnProperty("csvOptions")) + object.csvOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.toObject(message.csvOptions, options); + if (message.jsonOptions != null && message.hasOwnProperty("jsonOptions")) + object.jsonOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.toObject(message.jsonOptions, options); + if (message.schedule != null && message.hasOwnProperty("schedule")) { + object.schedule = message.schedule; + if (options.oneofs) + object.trigger = "schedule"; + } + return object; + }; - /** - * Encodes the specified GetPartitionRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetPartitionRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.GetPartitionRequest - * @static - * @param {google.cloud.dataplex.v1.IGetPartitionRequest} message GetPartitionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPartitionRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; + /** + * Converts this DiscoverySpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @instance + * @returns {Object.} JSON object + */ + DiscoverySpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Encodes the specified GetPartitionRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetPartitionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetPartitionRequest - * @static - * @param {google.cloud.dataplex.v1.IGetPartitionRequest} message GetPartitionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPartitionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + DiscoverySpec.CsvOptions = (function() { - /** - * Decodes a GetPartitionRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.GetPartitionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GetPartitionRequest} GetPartitionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPartitionRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetPartitionRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Properties of a CsvOptions. + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @interface ICsvOptions + * @property {number|null} [headerRows] CsvOptions headerRows + * @property {string|null} [delimiter] CsvOptions delimiter + * @property {string|null} [encoding] CsvOptions encoding + * @property {boolean|null} [disableTypeInference] CsvOptions disableTypeInference + */ + + /** + * Constructs a new CsvOptions. + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @classdesc Represents a CsvOptions. + * @implements ICsvOptions + * @constructor + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions=} [properties] Properties to set + */ + function CsvOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - } - return message; - }; - /** - * Decodes a GetPartitionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetPartitionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GetPartitionRequest} GetPartitionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPartitionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * CsvOptions headerRows. + * @member {number} headerRows + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @instance + */ + CsvOptions.prototype.headerRows = 0; - /** - * Verifies a GetPartitionRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.GetPartitionRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetPartitionRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; + /** + * CsvOptions delimiter. + * @member {string} delimiter + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @instance + */ + CsvOptions.prototype.delimiter = ""; - /** - * Creates a GetPartitionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.GetPartitionRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetPartitionRequest} GetPartitionRequest - */ - GetPartitionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetPartitionRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.GetPartitionRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + /** + * CsvOptions encoding. + * @member {string} encoding + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @instance + */ + CsvOptions.prototype.encoding = ""; - /** - * Creates a plain object from a GetPartitionRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.GetPartitionRequest - * @static - * @param {google.cloud.dataplex.v1.GetPartitionRequest} message GetPartitionRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetPartitionRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; + /** + * CsvOptions disableTypeInference. + * @member {boolean} disableTypeInference + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @instance + */ + CsvOptions.prototype.disableTypeInference = false; - /** - * Converts this GetPartitionRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.GetPartitionRequest - * @instance - * @returns {Object.} JSON object - */ - GetPartitionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a new CsvOptions instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions} CsvOptions instance + */ + CsvOptions.create = function create(properties) { + return new CsvOptions(properties); + }; - return GetPartitionRequest; - })(); + /** + * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions} message CsvOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CsvOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.headerRows != null && Object.hasOwnProperty.call(message, "headerRows")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.headerRows); + if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.delimiter); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.encoding); + if (message.disableTypeInference != null && Object.hasOwnProperty.call(message, "disableTypeInference")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disableTypeInference); + return writer; + }; - v1.Entity = (function() { + /** + * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions} message CsvOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CsvOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Properties of an Entity. - * @memberof google.cloud.dataplex.v1 - * @interface IEntity - * @property {string|null} [name] Entity name - * @property {string|null} [displayName] Entity displayName - * @property {string|null} [description] Entity description - * @property {google.protobuf.ITimestamp|null} [createTime] Entity createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Entity updateTime - * @property {string|null} [id] Entity id - * @property {string|null} [etag] Entity etag - * @property {google.cloud.dataplex.v1.Entity.Type|null} [type] Entity type - * @property {string|null} [asset] Entity asset - * @property {string|null} [dataPath] Entity dataPath - * @property {string|null} [dataPathPattern] Entity dataPathPattern - * @property {string|null} [catalogEntry] Entity catalogEntry - * @property {google.cloud.dataplex.v1.StorageSystem|null} [system] Entity system - * @property {google.cloud.dataplex.v1.IStorageFormat|null} [format] Entity format - * @property {google.cloud.dataplex.v1.Entity.ICompatibilityStatus|null} [compatibility] Entity compatibility - * @property {google.cloud.dataplex.v1.ISchema|null} [schema] Entity schema - */ + /** + * Decodes a CsvOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions} CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CsvOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.headerRows = reader.int32(); + break; + case 2: + message.delimiter = reader.string(); + break; + case 3: + message.encoding = reader.string(); + break; + case 4: + message.disableTypeInference = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Constructs a new Entity. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an Entity. - * @implements IEntity - * @constructor - * @param {google.cloud.dataplex.v1.IEntity=} [properties] Properties to set - */ - function Entity(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Decodes a CsvOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions} CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CsvOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Entity name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.Entity - * @instance - */ - Entity.prototype.name = ""; + /** + * Verifies a CsvOptions message. + * @function verify + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CsvOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.headerRows != null && message.hasOwnProperty("headerRows")) + if (!$util.isInteger(message.headerRows)) + return "headerRows: integer expected"; + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + if (!$util.isString(message.delimiter)) + return "delimiter: string expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) + if (!$util.isString(message.encoding)) + return "encoding: string expected"; + if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) + if (typeof message.disableTypeInference !== "boolean") + return "disableTypeInference: boolean expected"; + return null; + }; - /** - * Entity displayName. - * @member {string} displayName - * @memberof google.cloud.dataplex.v1.Entity - * @instance - */ - Entity.prototype.displayName = ""; + /** + * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions} CsvOptions + */ + CsvOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions) + return object; + var message = new $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions(); + if (object.headerRows != null) + message.headerRows = object.headerRows | 0; + if (object.delimiter != null) + message.delimiter = String(object.delimiter); + if (object.encoding != null) + message.encoding = String(object.encoding); + if (object.disableTypeInference != null) + message.disableTypeInference = Boolean(object.disableTypeInference); + return message; + }; - /** - * Entity description. - * @member {string} description - * @memberof google.cloud.dataplex.v1.Entity - * @instance - */ - Entity.prototype.description = ""; + /** + * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions} message CsvOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CsvOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.headerRows = 0; + object.delimiter = ""; + object.encoding = ""; + object.disableTypeInference = false; + } + if (message.headerRows != null && message.hasOwnProperty("headerRows")) + object.headerRows = message.headerRows; + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + object.delimiter = message.delimiter; + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = message.encoding; + if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) + object.disableTypeInference = message.disableTypeInference; + return object; + }; - /** - * Entity createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dataplex.v1.Entity - * @instance - */ - Entity.prototype.createTime = null; + /** + * Converts this CsvOptions to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @instance + * @returns {Object.} JSON object + */ + CsvOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Entity updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.Entity - * @instance - */ - Entity.prototype.updateTime = null; + return CsvOptions; + })(); - /** - * Entity id. - * @member {string} id - * @memberof google.cloud.dataplex.v1.Entity - * @instance - */ - Entity.prototype.id = ""; + DiscoverySpec.JsonOptions = (function() { - /** - * Entity etag. - * @member {string} etag - * @memberof google.cloud.dataplex.v1.Entity - * @instance - */ - Entity.prototype.etag = ""; + /** + * Properties of a JsonOptions. + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @interface IJsonOptions + * @property {string|null} [encoding] JsonOptions encoding + * @property {boolean|null} [disableTypeInference] JsonOptions disableTypeInference + */ - /** - * Entity type. - * @member {google.cloud.dataplex.v1.Entity.Type} type - * @memberof google.cloud.dataplex.v1.Entity - * @instance - */ - Entity.prototype.type = 0; + /** + * Constructs a new JsonOptions. + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @classdesc Represents a JsonOptions. + * @implements IJsonOptions + * @constructor + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions=} [properties] Properties to set + */ + function JsonOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Entity asset. - * @member {string} asset - * @memberof google.cloud.dataplex.v1.Entity - * @instance - */ - Entity.prototype.asset = ""; + /** + * JsonOptions encoding. + * @member {string} encoding + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @instance + */ + JsonOptions.prototype.encoding = ""; - /** - * Entity dataPath. - * @member {string} dataPath - * @memberof google.cloud.dataplex.v1.Entity - * @instance - */ - Entity.prototype.dataPath = ""; + /** + * JsonOptions disableTypeInference. + * @member {boolean} disableTypeInference + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @instance + */ + JsonOptions.prototype.disableTypeInference = false; - /** - * Entity dataPathPattern. - * @member {string} dataPathPattern - * @memberof google.cloud.dataplex.v1.Entity - * @instance - */ - Entity.prototype.dataPathPattern = ""; + /** + * Creates a new JsonOptions instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions} JsonOptions instance + */ + JsonOptions.create = function create(properties) { + return new JsonOptions(properties); + }; - /** - * Entity catalogEntry. - * @member {string} catalogEntry - * @memberof google.cloud.dataplex.v1.Entity - * @instance - */ - Entity.prototype.catalogEntry = ""; + /** + * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions} message JsonOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JsonOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.encoding); + if (message.disableTypeInference != null && Object.hasOwnProperty.call(message, "disableTypeInference")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.disableTypeInference); + return writer; + }; - /** - * Entity system. - * @member {google.cloud.dataplex.v1.StorageSystem} system - * @memberof google.cloud.dataplex.v1.Entity - * @instance - */ - Entity.prototype.system = 0; + /** + * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions} message JsonOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JsonOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Entity format. - * @member {google.cloud.dataplex.v1.IStorageFormat|null|undefined} format - * @memberof google.cloud.dataplex.v1.Entity - * @instance - */ - Entity.prototype.format = null; + /** + * Decodes a JsonOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions} JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JsonOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.encoding = reader.string(); + break; + case 2: + message.disableTypeInference = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Entity compatibility. - * @member {google.cloud.dataplex.v1.Entity.ICompatibilityStatus|null|undefined} compatibility - * @memberof google.cloud.dataplex.v1.Entity - * @instance - */ - Entity.prototype.compatibility = null; + /** + * Decodes a JsonOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions} JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JsonOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Entity schema. - * @member {google.cloud.dataplex.v1.ISchema|null|undefined} schema - * @memberof google.cloud.dataplex.v1.Entity - * @instance - */ - Entity.prototype.schema = null; + /** + * Verifies a JsonOptions message. + * @function verify + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JsonOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) + if (!$util.isString(message.encoding)) + return "encoding: string expected"; + if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) + if (typeof message.disableTypeInference !== "boolean") + return "disableTypeInference: boolean expected"; + return null; + }; - /** - * Creates a new Entity instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Entity - * @static - * @param {google.cloud.dataplex.v1.IEntity=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Entity} Entity instance - */ - Entity.create = function create(properties) { - return new Entity(properties); - }; + /** + * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions} JsonOptions + */ + JsonOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions) + return object; + var message = new $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions(); + if (object.encoding != null) + message.encoding = String(object.encoding); + if (object.disableTypeInference != null) + message.disableTypeInference = Boolean(object.disableTypeInference); + return message; + }; - /** - * Encodes the specified Entity message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Entity - * @static - * @param {google.cloud.dataplex.v1.IEntity} message Entity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Entity.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.id); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.etag); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.type); - if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.asset); - if (message.dataPath != null && Object.hasOwnProperty.call(message, "dataPath")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.dataPath); - if (message.dataPathPattern != null && Object.hasOwnProperty.call(message, "dataPathPattern")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.dataPathPattern); - if (message.catalogEntry != null && Object.hasOwnProperty.call(message, "catalogEntry")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.catalogEntry); - if (message.system != null && Object.hasOwnProperty.call(message, "system")) - writer.uint32(/* id 15, wireType 0 =*/120).int32(message.system); - if (message.format != null && Object.hasOwnProperty.call(message, "format")) - $root.google.cloud.dataplex.v1.StorageFormat.encode(message.format, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.compatibility != null && Object.hasOwnProperty.call(message, "compatibility")) - $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.encode(message.compatibility, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) - $root.google.cloud.dataplex.v1.Schema.encode(message.schema, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - return writer; - }; + /** + * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions} message JsonOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JsonOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.encoding = ""; + object.disableTypeInference = false; + } + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = message.encoding; + if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) + object.disableTypeInference = message.disableTypeInference; + return object; + }; + + /** + * Converts this JsonOptions to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @instance + * @returns {Object.} JSON object + */ + JsonOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return JsonOptions; + })(); + + return DiscoverySpec; + })(); + + return Zone; + })(); + + v1.Action = (function() { /** - * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Entity - * @static - * @param {google.cloud.dataplex.v1.IEntity} message Entity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Properties of an Action. + * @memberof google.cloud.dataplex.v1 + * @interface IAction + * @property {google.cloud.dataplex.v1.Action.Category|null} [category] Action category + * @property {string|null} [issue] Action issue + * @property {google.protobuf.ITimestamp|null} [detectTime] Action detectTime + * @property {string|null} [name] Action name + * @property {string|null} [lake] Action lake + * @property {string|null} [zone] Action zone + * @property {string|null} [asset] Action asset + * @property {Array.|null} [dataLocations] Action dataLocations + * @property {google.cloud.dataplex.v1.Action.IInvalidDataFormat|null} [invalidDataFormat] Action invalidDataFormat + * @property {google.cloud.dataplex.v1.Action.IIncompatibleDataSchema|null} [incompatibleDataSchema] Action incompatibleDataSchema + * @property {google.cloud.dataplex.v1.Action.IInvalidDataPartition|null} [invalidDataPartition] Action invalidDataPartition + * @property {google.cloud.dataplex.v1.Action.IMissingData|null} [missingData] Action missingData + * @property {google.cloud.dataplex.v1.Action.IMissingResource|null} [missingResource] Action missingResource + * @property {google.cloud.dataplex.v1.Action.IUnauthorizedResource|null} [unauthorizedResource] Action unauthorizedResource + * @property {google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply|null} [failedSecurityPolicyApply] Action failedSecurityPolicyApply + * @property {google.cloud.dataplex.v1.Action.IInvalidDataOrganization|null} [invalidDataOrganization] Action invalidDataOrganization */ - Entity.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes an Entity message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Entity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Entity} Entity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Constructs a new Action. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an Action. + * @implements IAction + * @constructor + * @param {google.cloud.dataplex.v1.IAction=} [properties] Properties to set */ - Entity.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Entity(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.displayName = reader.string(); - break; - case 3: - message.description = reader.string(); - break; - case 5: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 7: - message.id = reader.string(); - break; - case 8: - message.etag = reader.string(); - break; - case 10: - message.type = reader.int32(); - break; - case 11: - message.asset = reader.string(); - break; - case 12: - message.dataPath = reader.string(); - break; - case 13: - message.dataPathPattern = reader.string(); - break; - case 14: - message.catalogEntry = reader.string(); - break; - case 15: - message.system = reader.int32(); - break; - case 16: - message.format = $root.google.cloud.dataplex.v1.StorageFormat.decode(reader, reader.uint32()); - break; - case 19: - message.compatibility = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.decode(reader, reader.uint32()); - break; - case 50: - message.schema = $root.google.cloud.dataplex.v1.Schema.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + function Action(properties) { + this.dataLocations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Decodes an Entity message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Entity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Entity} Entity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Action category. + * @member {google.cloud.dataplex.v1.Action.Category} category + * @memberof google.cloud.dataplex.v1.Action + * @instance */ - Entity.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Action.prototype.category = 0; /** - * Verifies an Entity message. - * @function verify - * @memberof google.cloud.dataplex.v1.Entity - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Action issue. + * @member {string} issue + * @memberof google.cloud.dataplex.v1.Action + * @instance */ - Entity.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.asset != null && message.hasOwnProperty("asset")) - if (!$util.isString(message.asset)) - return "asset: string expected"; - if (message.dataPath != null && message.hasOwnProperty("dataPath")) - if (!$util.isString(message.dataPath)) - return "dataPath: string expected"; - if (message.dataPathPattern != null && message.hasOwnProperty("dataPathPattern")) - if (!$util.isString(message.dataPathPattern)) - return "dataPathPattern: string expected"; - if (message.catalogEntry != null && message.hasOwnProperty("catalogEntry")) - if (!$util.isString(message.catalogEntry)) - return "catalogEntry: string expected"; - if (message.system != null && message.hasOwnProperty("system")) - switch (message.system) { - default: - return "system: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.format != null && message.hasOwnProperty("format")) { - var error = $root.google.cloud.dataplex.v1.StorageFormat.verify(message.format); - if (error) - return "format." + error; - } - if (message.compatibility != null && message.hasOwnProperty("compatibility")) { - var error = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify(message.compatibility); - if (error) - return "compatibility." + error; - } - if (message.schema != null && message.hasOwnProperty("schema")) { - var error = $root.google.cloud.dataplex.v1.Schema.verify(message.schema); - if (error) - return "schema." + error; - } - return null; - }; + Action.prototype.issue = ""; /** - * Creates an Entity message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Entity - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Entity} Entity + * Action detectTime. + * @member {google.protobuf.ITimestamp|null|undefined} detectTime + * @memberof google.cloud.dataplex.v1.Action + * @instance */ - Entity.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Entity) - return object; - var message = new $root.google.cloud.dataplex.v1.Entity(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Entity.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Entity.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.id != null) - message.id = String(object.id); - if (object.etag != null) - message.etag = String(object.etag); - switch (object.type) { - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "TABLE": - case 1: - message.type = 1; - break; - case "FILESET": - case 2: - message.type = 2; - break; - } - if (object.asset != null) - message.asset = String(object.asset); - if (object.dataPath != null) - message.dataPath = String(object.dataPath); - if (object.dataPathPattern != null) - message.dataPathPattern = String(object.dataPathPattern); - if (object.catalogEntry != null) - message.catalogEntry = String(object.catalogEntry); - switch (object.system) { - case "STORAGE_SYSTEM_UNSPECIFIED": - case 0: - message.system = 0; - break; - case "CLOUD_STORAGE": - case 1: - message.system = 1; - break; - case "BIGQUERY": - case 2: - message.system = 2; - break; - } - if (object.format != null) { - if (typeof object.format !== "object") - throw TypeError(".google.cloud.dataplex.v1.Entity.format: object expected"); - message.format = $root.google.cloud.dataplex.v1.StorageFormat.fromObject(object.format); - } - if (object.compatibility != null) { - if (typeof object.compatibility !== "object") - throw TypeError(".google.cloud.dataplex.v1.Entity.compatibility: object expected"); - message.compatibility = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.fromObject(object.compatibility); - } - if (object.schema != null) { - if (typeof object.schema !== "object") - throw TypeError(".google.cloud.dataplex.v1.Entity.schema: object expected"); - message.schema = $root.google.cloud.dataplex.v1.Schema.fromObject(object.schema); - } - return message; - }; + Action.prototype.detectTime = null; /** - * Creates a plain object from an Entity message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Entity - * @static - * @param {google.cloud.dataplex.v1.Entity} message Entity - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Action name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Action + * @instance */ - Entity.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.description = ""; - object.createTime = null; - object.updateTime = null; - object.id = ""; - object.etag = ""; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.asset = ""; - object.dataPath = ""; - object.dataPathPattern = ""; - object.catalogEntry = ""; - object.system = options.enums === String ? "STORAGE_SYSTEM_UNSPECIFIED" : 0; - object.format = null; - object.compatibility = null; - object.schema = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Entity.Type[message.type] : message.type; - if (message.asset != null && message.hasOwnProperty("asset")) - object.asset = message.asset; - if (message.dataPath != null && message.hasOwnProperty("dataPath")) - object.dataPath = message.dataPath; - if (message.dataPathPattern != null && message.hasOwnProperty("dataPathPattern")) - object.dataPathPattern = message.dataPathPattern; - if (message.catalogEntry != null && message.hasOwnProperty("catalogEntry")) - object.catalogEntry = message.catalogEntry; - if (message.system != null && message.hasOwnProperty("system")) - object.system = options.enums === String ? $root.google.cloud.dataplex.v1.StorageSystem[message.system] : message.system; - if (message.format != null && message.hasOwnProperty("format")) - object.format = $root.google.cloud.dataplex.v1.StorageFormat.toObject(message.format, options); - if (message.compatibility != null && message.hasOwnProperty("compatibility")) - object.compatibility = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.toObject(message.compatibility, options); - if (message.schema != null && message.hasOwnProperty("schema")) - object.schema = $root.google.cloud.dataplex.v1.Schema.toObject(message.schema, options); - return object; - }; + Action.prototype.name = ""; /** - * Converts this Entity to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Entity + * Action lake. + * @member {string} lake + * @memberof google.cloud.dataplex.v1.Action * @instance - * @returns {Object.} JSON object */ - Entity.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Action.prototype.lake = ""; /** - * Type enum. - * @name google.cloud.dataplex.v1.Entity.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} TABLE=1 TABLE value - * @property {number} FILESET=2 FILESET value + * Action zone. + * @member {string} zone + * @memberof google.cloud.dataplex.v1.Action + * @instance */ - Entity.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "TABLE"] = 1; - values[valuesById[2] = "FILESET"] = 2; - return values; - })(); - - Entity.CompatibilityStatus = (function() { + Action.prototype.zone = ""; - /** - * Properties of a CompatibilityStatus. - * @memberof google.cloud.dataplex.v1.Entity - * @interface ICompatibilityStatus - * @property {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null} [hiveMetastore] CompatibilityStatus hiveMetastore - * @property {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null} [bigquery] CompatibilityStatus bigquery - */ + /** + * Action asset. + * @member {string} asset + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.asset = ""; - /** - * Constructs a new CompatibilityStatus. - * @memberof google.cloud.dataplex.v1.Entity - * @classdesc Represents a CompatibilityStatus. - * @implements ICompatibilityStatus - * @constructor - * @param {google.cloud.dataplex.v1.Entity.ICompatibilityStatus=} [properties] Properties to set - */ - function CompatibilityStatus(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Action dataLocations. + * @member {Array.} dataLocations + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.dataLocations = $util.emptyArray; - /** - * CompatibilityStatus hiveMetastore. - * @member {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null|undefined} hiveMetastore - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @instance - */ - CompatibilityStatus.prototype.hiveMetastore = null; - - /** - * CompatibilityStatus bigquery. - * @member {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null|undefined} bigquery - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @instance - */ - CompatibilityStatus.prototype.bigquery = null; - - /** - * Creates a new CompatibilityStatus instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @static - * @param {google.cloud.dataplex.v1.Entity.ICompatibilityStatus=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus} CompatibilityStatus instance - */ - CompatibilityStatus.create = function create(properties) { - return new CompatibilityStatus(properties); - }; + /** + * Action invalidDataFormat. + * @member {google.cloud.dataplex.v1.Action.IInvalidDataFormat|null|undefined} invalidDataFormat + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.invalidDataFormat = null; - /** - * Encodes the specified CompatibilityStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @static - * @param {google.cloud.dataplex.v1.Entity.ICompatibilityStatus} message CompatibilityStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompatibilityStatus.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.hiveMetastore != null && Object.hasOwnProperty.call(message, "hiveMetastore")) - $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.encode(message.hiveMetastore, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.bigquery != null && Object.hasOwnProperty.call(message, "bigquery")) - $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.encode(message.bigquery, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Action incompatibleDataSchema. + * @member {google.cloud.dataplex.v1.Action.IIncompatibleDataSchema|null|undefined} incompatibleDataSchema + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.incompatibleDataSchema = null; - /** - * Encodes the specified CompatibilityStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @static - * @param {google.cloud.dataplex.v1.Entity.ICompatibilityStatus} message CompatibilityStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompatibilityStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Action invalidDataPartition. + * @member {google.cloud.dataplex.v1.Action.IInvalidDataPartition|null|undefined} invalidDataPartition + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.invalidDataPartition = null; - /** - * Decodes a CompatibilityStatus message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus} CompatibilityStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompatibilityStatus.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hiveMetastore = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.decode(reader, reader.uint32()); - break; - case 2: - message.bigquery = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Action missingData. + * @member {google.cloud.dataplex.v1.Action.IMissingData|null|undefined} missingData + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.missingData = null; - /** - * Decodes a CompatibilityStatus message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus} CompatibilityStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompatibilityStatus.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Action missingResource. + * @member {google.cloud.dataplex.v1.Action.IMissingResource|null|undefined} missingResource + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.missingResource = null; - /** - * Verifies a CompatibilityStatus message. - * @function verify - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CompatibilityStatus.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.hiveMetastore != null && message.hasOwnProperty("hiveMetastore")) { - var error = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify(message.hiveMetastore); - if (error) - return "hiveMetastore." + error; - } - if (message.bigquery != null && message.hasOwnProperty("bigquery")) { - var error = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify(message.bigquery); - if (error) - return "bigquery." + error; - } - return null; - }; + /** + * Action unauthorizedResource. + * @member {google.cloud.dataplex.v1.Action.IUnauthorizedResource|null|undefined} unauthorizedResource + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.unauthorizedResource = null; - /** - * Creates a CompatibilityStatus message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus} CompatibilityStatus - */ - CompatibilityStatus.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus) - return object; - var message = new $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus(); - if (object.hiveMetastore != null) { - if (typeof object.hiveMetastore !== "object") - throw TypeError(".google.cloud.dataplex.v1.Entity.CompatibilityStatus.hiveMetastore: object expected"); - message.hiveMetastore = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.fromObject(object.hiveMetastore); - } - if (object.bigquery != null) { - if (typeof object.bigquery !== "object") - throw TypeError(".google.cloud.dataplex.v1.Entity.CompatibilityStatus.bigquery: object expected"); - message.bigquery = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.fromObject(object.bigquery); - } - return message; - }; + /** + * Action failedSecurityPolicyApply. + * @member {google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply|null|undefined} failedSecurityPolicyApply + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.failedSecurityPolicyApply = null; - /** - * Creates a plain object from a CompatibilityStatus message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @static - * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus} message CompatibilityStatus - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CompatibilityStatus.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.hiveMetastore = null; - object.bigquery = null; - } - if (message.hiveMetastore != null && message.hasOwnProperty("hiveMetastore")) - object.hiveMetastore = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.toObject(message.hiveMetastore, options); - if (message.bigquery != null && message.hasOwnProperty("bigquery")) - object.bigquery = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.toObject(message.bigquery, options); - return object; - }; + /** + * Action invalidDataOrganization. + * @member {google.cloud.dataplex.v1.Action.IInvalidDataOrganization|null|undefined} invalidDataOrganization + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.invalidDataOrganization = null; - /** - * Converts this CompatibilityStatus to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @instance - * @returns {Object.} JSON object - */ - CompatibilityStatus.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - CompatibilityStatus.Compatibility = (function() { - - /** - * Properties of a Compatibility. - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @interface ICompatibility - * @property {boolean|null} [compatible] Compatibility compatible - * @property {string|null} [reason] Compatibility reason - */ - - /** - * Constructs a new Compatibility. - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @classdesc Represents a Compatibility. - * @implements ICompatibility - * @constructor - * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility=} [properties] Properties to set - */ - function Compatibility(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Compatibility compatible. - * @member {boolean} compatible - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility - * @instance - */ - Compatibility.prototype.compatible = false; - - /** - * Compatibility reason. - * @member {string} reason - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility - * @instance - */ - Compatibility.prototype.reason = ""; - - /** - * Creates a new Compatibility instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility - * @static - * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} Compatibility instance - */ - Compatibility.create = function create(properties) { - return new Compatibility(properties); - }; - - /** - * Encodes the specified Compatibility message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility - * @static - * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility} message Compatibility message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Compatibility.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.compatible != null && Object.hasOwnProperty.call(message, "compatible")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.compatible); - if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.reason); - return writer; - }; - - /** - * Encodes the specified Compatibility message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility - * @static - * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility} message Compatibility message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Compatibility.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Compatibility message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} Compatibility - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Compatibility.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.compatible = reader.bool(); - break; - case 2: - message.reason = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Compatibility message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} Compatibility - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Compatibility.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Compatibility message. - * @function verify - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Compatibility.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.compatible != null && message.hasOwnProperty("compatible")) - if (typeof message.compatible !== "boolean") - return "compatible: boolean expected"; - if (message.reason != null && message.hasOwnProperty("reason")) - if (!$util.isString(message.reason)) - return "reason: string expected"; - return null; - }; - - /** - * Creates a Compatibility message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} Compatibility - */ - Compatibility.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility) - return object; - var message = new $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility(); - if (object.compatible != null) - message.compatible = Boolean(object.compatible); - if (object.reason != null) - message.reason = String(object.reason); - return message; - }; - - /** - * Creates a plain object from a Compatibility message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility - * @static - * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} message Compatibility - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Compatibility.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.compatible = false; - object.reason = ""; - } - if (message.compatible != null && message.hasOwnProperty("compatible")) - object.compatible = message.compatible; - if (message.reason != null && message.hasOwnProperty("reason")) - object.reason = message.reason; - return object; - }; - - /** - * Converts this Compatibility to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility - * @instance - * @returns {Object.} JSON object - */ - Compatibility.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Compatibility; - })(); - - return CompatibilityStatus; - })(); - - return Entity; - })(); - - v1.Partition = (function() { - - /** - * Properties of a Partition. - * @memberof google.cloud.dataplex.v1 - * @interface IPartition - * @property {string|null} [name] Partition name - * @property {Array.|null} [values] Partition values - * @property {string|null} [location] Partition location - * @property {string|null} [etag] Partition etag - */ + /** + * Action details. + * @member {"invalidDataFormat"|"incompatibleDataSchema"|"invalidDataPartition"|"missingData"|"missingResource"|"unauthorizedResource"|"failedSecurityPolicyApply"|"invalidDataOrganization"|undefined} details + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Object.defineProperty(Action.prototype, "details", { + get: $util.oneOfGetter($oneOfFields = ["invalidDataFormat", "incompatibleDataSchema", "invalidDataPartition", "missingData", "missingResource", "unauthorizedResource", "failedSecurityPolicyApply", "invalidDataOrganization"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Constructs a new Partition. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a Partition. - * @implements IPartition - * @constructor - * @param {google.cloud.dataplex.v1.IPartition=} [properties] Properties to set + * Creates a new Action instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Action + * @static + * @param {google.cloud.dataplex.v1.IAction=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Action} Action instance */ - function Partition(properties) { - this.values = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Action.create = function create(properties) { + return new Action(properties); + }; /** - * Partition name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.Partition - * @instance + * Encodes the specified Action message. Does not implicitly {@link google.cloud.dataplex.v1.Action.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Action + * @static + * @param {google.cloud.dataplex.v1.IAction} message Action message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Partition.prototype.name = ""; - - /** - * Partition values. - * @member {Array.} values - * @memberof google.cloud.dataplex.v1.Partition - * @instance - */ - Partition.prototype.values = $util.emptyArray; - - /** - * Partition location. - * @member {string} location - * @memberof google.cloud.dataplex.v1.Partition - * @instance - */ - Partition.prototype.location = ""; - - /** - * Partition etag. - * @member {string} etag - * @memberof google.cloud.dataplex.v1.Partition - * @instance - */ - Partition.prototype.etag = ""; - - /** - * Creates a new Partition instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Partition - * @static - * @param {google.cloud.dataplex.v1.IPartition=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Partition} Partition instance - */ - Partition.create = function create(properties) { - return new Partition(properties); - }; - - /** - * Encodes the specified Partition message. Does not implicitly {@link google.cloud.dataplex.v1.Partition.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Partition - * @static - * @param {google.cloud.dataplex.v1.IPartition} message Partition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Partition.encode = function encode(message, writer) { + Action.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.category != null && Object.hasOwnProperty.call(message, "category")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.category); + if (message.issue != null && Object.hasOwnProperty.call(message, "issue")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.issue); + if (message.detectTime != null && Object.hasOwnProperty.call(message, "detectTime")) + $root.google.protobuf.Timestamp.encode(message.detectTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.values[i]); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.location); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.etag); + writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); + if (message.lake != null && Object.hasOwnProperty.call(message, "lake")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.lake); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.zone); + if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.asset); + if (message.dataLocations != null && message.dataLocations.length) + for (var i = 0; i < message.dataLocations.length; ++i) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.dataLocations[i]); + if (message.invalidDataFormat != null && Object.hasOwnProperty.call(message, "invalidDataFormat")) + $root.google.cloud.dataplex.v1.Action.InvalidDataFormat.encode(message.invalidDataFormat, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.incompatibleDataSchema != null && Object.hasOwnProperty.call(message, "incompatibleDataSchema")) + $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.encode(message.incompatibleDataSchema, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.invalidDataPartition != null && Object.hasOwnProperty.call(message, "invalidDataPartition")) + $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.encode(message.invalidDataPartition, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.missingData != null && Object.hasOwnProperty.call(message, "missingData")) + $root.google.cloud.dataplex.v1.Action.MissingData.encode(message.missingData, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.missingResource != null && Object.hasOwnProperty.call(message, "missingResource")) + $root.google.cloud.dataplex.v1.Action.MissingResource.encode(message.missingResource, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.unauthorizedResource != null && Object.hasOwnProperty.call(message, "unauthorizedResource")) + $root.google.cloud.dataplex.v1.Action.UnauthorizedResource.encode(message.unauthorizedResource, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.failedSecurityPolicyApply != null && Object.hasOwnProperty.call(message, "failedSecurityPolicyApply")) + $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.encode(message.failedSecurityPolicyApply, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.invalidDataOrganization != null && Object.hasOwnProperty.call(message, "invalidDataOrganization")) + $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization.encode(message.invalidDataOrganization, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); return writer; }; /** - * Encodes the specified Partition message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Partition.verify|verify} messages. + * Encodes the specified Action message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Partition + * @memberof google.cloud.dataplex.v1.Action * @static - * @param {google.cloud.dataplex.v1.IPartition} message Partition message or plain object to encode + * @param {google.cloud.dataplex.v1.IAction} message Action message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Partition.encodeDelimited = function encodeDelimited(message, writer) { + Action.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Partition message from the specified reader or buffer. + * Decodes an Action message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.Partition + * @memberof google.cloud.dataplex.v1.Action * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Partition} Partition + * @returns {google.cloud.dataplex.v1.Action} Action * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Partition.decode = function decode(reader, length) { + Action.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Partition(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.category = reader.int32(); break; case 2: - if (!(message.values && message.values.length)) - message.values = []; - message.values.push(reader.string()); - break; - case 3: - message.location = reader.string(); + message.issue = reader.string(); break; case 4: - message.etag = reader.string(); + message.detectTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.name = reader.string(); + break; + case 6: + message.lake = reader.string(); + break; + case 7: + message.zone = reader.string(); + break; + case 8: + message.asset = reader.string(); + break; + case 9: + if (!(message.dataLocations && message.dataLocations.length)) + message.dataLocations = []; + message.dataLocations.push(reader.string()); + break; + case 10: + message.invalidDataFormat = $root.google.cloud.dataplex.v1.Action.InvalidDataFormat.decode(reader, reader.uint32()); + break; + case 11: + message.incompatibleDataSchema = $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.decode(reader, reader.uint32()); + break; + case 12: + message.invalidDataPartition = $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.decode(reader, reader.uint32()); + break; + case 13: + message.missingData = $root.google.cloud.dataplex.v1.Action.MissingData.decode(reader, reader.uint32()); + break; + case 14: + message.missingResource = $root.google.cloud.dataplex.v1.Action.MissingResource.decode(reader, reader.uint32()); + break; + case 15: + message.unauthorizedResource = $root.google.cloud.dataplex.v1.Action.UnauthorizedResource.decode(reader, reader.uint32()); + break; + case 21: + message.failedSecurityPolicyApply = $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.decode(reader, reader.uint32()); + break; + case 22: + message.invalidDataOrganization = $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -5481,650 +6391,602 @@ }; /** - * Decodes a Partition message from the specified reader or buffer, length delimited. + * Decodes an Action message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Partition + * @memberof google.cloud.dataplex.v1.Action * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Partition} Partition + * @returns {google.cloud.dataplex.v1.Action} Action * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Partition.decodeDelimited = function decodeDelimited(reader) { + Action.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Partition message. + * Verifies an Action message. * @function verify - * @memberof google.cloud.dataplex.v1.Partition + * @memberof google.cloud.dataplex.v1.Action * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Partition.verify = function verify(message) { + Action.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; + if (message.category != null && message.hasOwnProperty("category")) + switch (message.category) { + default: + return "category: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.issue != null && message.hasOwnProperty("issue")) + if (!$util.isString(message.issue)) + return "issue: string expected"; + if (message.detectTime != null && message.hasOwnProperty("detectTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.detectTime); + if (error) + return "detectTime." + error; + } if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) - if (!$util.isString(message.values[i])) - return "values: string[] expected"; + if (message.lake != null && message.hasOwnProperty("lake")) + if (!$util.isString(message.lake)) + return "lake: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.asset != null && message.hasOwnProperty("asset")) + if (!$util.isString(message.asset)) + return "asset: string expected"; + if (message.dataLocations != null && message.hasOwnProperty("dataLocations")) { + if (!Array.isArray(message.dataLocations)) + return "dataLocations: array expected"; + for (var i = 0; i < message.dataLocations.length; ++i) + if (!$util.isString(message.dataLocations[i])) + return "dataLocations: string[] expected"; } - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - return null; - }; - - /** - * Creates a Partition message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Partition - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Partition} Partition - */ - Partition.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Partition) - return object; - var message = new $root.google.cloud.dataplex.v1.Partition(); - if (object.name != null) - message.name = String(object.name); - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.cloud.dataplex.v1.Partition.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) - message.values[i] = String(object.values[i]); + if (message.invalidDataFormat != null && message.hasOwnProperty("invalidDataFormat")) { + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.Action.InvalidDataFormat.verify(message.invalidDataFormat); + if (error) + return "invalidDataFormat." + error; + } } - if (object.location != null) - message.location = String(object.location); - if (object.etag != null) - message.etag = String(object.etag); - return message; - }; - - /** - * Creates a plain object from a Partition message. Also converts values to other types if specified. + if (message.incompatibleDataSchema != null && message.hasOwnProperty("incompatibleDataSchema")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.verify(message.incompatibleDataSchema); + if (error) + return "incompatibleDataSchema." + error; + } + } + if (message.invalidDataPartition != null && message.hasOwnProperty("invalidDataPartition")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.verify(message.invalidDataPartition); + if (error) + return "invalidDataPartition." + error; + } + } + if (message.missingData != null && message.hasOwnProperty("missingData")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.Action.MissingData.verify(message.missingData); + if (error) + return "missingData." + error; + } + } + if (message.missingResource != null && message.hasOwnProperty("missingResource")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.Action.MissingResource.verify(message.missingResource); + if (error) + return "missingResource." + error; + } + } + if (message.unauthorizedResource != null && message.hasOwnProperty("unauthorizedResource")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.Action.UnauthorizedResource.verify(message.unauthorizedResource); + if (error) + return "unauthorizedResource." + error; + } + } + if (message.failedSecurityPolicyApply != null && message.hasOwnProperty("failedSecurityPolicyApply")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.verify(message.failedSecurityPolicyApply); + if (error) + return "failedSecurityPolicyApply." + error; + } + } + if (message.invalidDataOrganization != null && message.hasOwnProperty("invalidDataOrganization")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization.verify(message.invalidDataOrganization); + if (error) + return "invalidDataOrganization." + error; + } + } + return null; + }; + + /** + * Creates an Action message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Action + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Action} Action + */ + Action.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Action) + return object; + var message = new $root.google.cloud.dataplex.v1.Action(); + switch (object.category) { + case "CATEGORY_UNSPECIFIED": + case 0: + message.category = 0; + break; + case "RESOURCE_MANAGEMENT": + case 1: + message.category = 1; + break; + case "SECURITY_POLICY": + case 2: + message.category = 2; + break; + case "DATA_DISCOVERY": + case 3: + message.category = 3; + break; + } + if (object.issue != null) + message.issue = String(object.issue); + if (object.detectTime != null) { + if (typeof object.detectTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Action.detectTime: object expected"); + message.detectTime = $root.google.protobuf.Timestamp.fromObject(object.detectTime); + } + if (object.name != null) + message.name = String(object.name); + if (object.lake != null) + message.lake = String(object.lake); + if (object.zone != null) + message.zone = String(object.zone); + if (object.asset != null) + message.asset = String(object.asset); + if (object.dataLocations) { + if (!Array.isArray(object.dataLocations)) + throw TypeError(".google.cloud.dataplex.v1.Action.dataLocations: array expected"); + message.dataLocations = []; + for (var i = 0; i < object.dataLocations.length; ++i) + message.dataLocations[i] = String(object.dataLocations[i]); + } + if (object.invalidDataFormat != null) { + if (typeof object.invalidDataFormat !== "object") + throw TypeError(".google.cloud.dataplex.v1.Action.invalidDataFormat: object expected"); + message.invalidDataFormat = $root.google.cloud.dataplex.v1.Action.InvalidDataFormat.fromObject(object.invalidDataFormat); + } + if (object.incompatibleDataSchema != null) { + if (typeof object.incompatibleDataSchema !== "object") + throw TypeError(".google.cloud.dataplex.v1.Action.incompatibleDataSchema: object expected"); + message.incompatibleDataSchema = $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.fromObject(object.incompatibleDataSchema); + } + if (object.invalidDataPartition != null) { + if (typeof object.invalidDataPartition !== "object") + throw TypeError(".google.cloud.dataplex.v1.Action.invalidDataPartition: object expected"); + message.invalidDataPartition = $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.fromObject(object.invalidDataPartition); + } + if (object.missingData != null) { + if (typeof object.missingData !== "object") + throw TypeError(".google.cloud.dataplex.v1.Action.missingData: object expected"); + message.missingData = $root.google.cloud.dataplex.v1.Action.MissingData.fromObject(object.missingData); + } + if (object.missingResource != null) { + if (typeof object.missingResource !== "object") + throw TypeError(".google.cloud.dataplex.v1.Action.missingResource: object expected"); + message.missingResource = $root.google.cloud.dataplex.v1.Action.MissingResource.fromObject(object.missingResource); + } + if (object.unauthorizedResource != null) { + if (typeof object.unauthorizedResource !== "object") + throw TypeError(".google.cloud.dataplex.v1.Action.unauthorizedResource: object expected"); + message.unauthorizedResource = $root.google.cloud.dataplex.v1.Action.UnauthorizedResource.fromObject(object.unauthorizedResource); + } + if (object.failedSecurityPolicyApply != null) { + if (typeof object.failedSecurityPolicyApply !== "object") + throw TypeError(".google.cloud.dataplex.v1.Action.failedSecurityPolicyApply: object expected"); + message.failedSecurityPolicyApply = $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.fromObject(object.failedSecurityPolicyApply); + } + if (object.invalidDataOrganization != null) { + if (typeof object.invalidDataOrganization !== "object") + throw TypeError(".google.cloud.dataplex.v1.Action.invalidDataOrganization: object expected"); + message.invalidDataOrganization = $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization.fromObject(object.invalidDataOrganization); + } + return message; + }; + + /** + * Creates a plain object from an Action message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.Partition + * @memberof google.cloud.dataplex.v1.Action * @static - * @param {google.cloud.dataplex.v1.Partition} message Partition + * @param {google.cloud.dataplex.v1.Action} message Action * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Partition.toObject = function toObject(message, options) { + Action.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.values = []; + object.dataLocations = []; if (options.defaults) { + object.category = options.enums === String ? "CATEGORY_UNSPECIFIED" : 0; + object.issue = ""; + object.detectTime = null; object.name = ""; - object.location = ""; - object.etag = ""; + object.lake = ""; + object.zone = ""; + object.asset = ""; } + if (message.category != null && message.hasOwnProperty("category")) + object.category = options.enums === String ? $root.google.cloud.dataplex.v1.Action.Category[message.category] : message.category; + if (message.issue != null && message.hasOwnProperty("issue")) + object.issue = message.issue; + if (message.detectTime != null && message.hasOwnProperty("detectTime")) + object.detectTime = $root.google.protobuf.Timestamp.toObject(message.detectTime, options); if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = message.values[j]; + if (message.lake != null && message.hasOwnProperty("lake")) + object.lake = message.lake; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.asset != null && message.hasOwnProperty("asset")) + object.asset = message.asset; + if (message.dataLocations && message.dataLocations.length) { + object.dataLocations = []; + for (var j = 0; j < message.dataLocations.length; ++j) + object.dataLocations[j] = message.dataLocations[j]; + } + if (message.invalidDataFormat != null && message.hasOwnProperty("invalidDataFormat")) { + object.invalidDataFormat = $root.google.cloud.dataplex.v1.Action.InvalidDataFormat.toObject(message.invalidDataFormat, options); + if (options.oneofs) + object.details = "invalidDataFormat"; + } + if (message.incompatibleDataSchema != null && message.hasOwnProperty("incompatibleDataSchema")) { + object.incompatibleDataSchema = $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.toObject(message.incompatibleDataSchema, options); + if (options.oneofs) + object.details = "incompatibleDataSchema"; + } + if (message.invalidDataPartition != null && message.hasOwnProperty("invalidDataPartition")) { + object.invalidDataPartition = $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.toObject(message.invalidDataPartition, options); + if (options.oneofs) + object.details = "invalidDataPartition"; + } + if (message.missingData != null && message.hasOwnProperty("missingData")) { + object.missingData = $root.google.cloud.dataplex.v1.Action.MissingData.toObject(message.missingData, options); + if (options.oneofs) + object.details = "missingData"; + } + if (message.missingResource != null && message.hasOwnProperty("missingResource")) { + object.missingResource = $root.google.cloud.dataplex.v1.Action.MissingResource.toObject(message.missingResource, options); + if (options.oneofs) + object.details = "missingResource"; + } + if (message.unauthorizedResource != null && message.hasOwnProperty("unauthorizedResource")) { + object.unauthorizedResource = $root.google.cloud.dataplex.v1.Action.UnauthorizedResource.toObject(message.unauthorizedResource, options); + if (options.oneofs) + object.details = "unauthorizedResource"; + } + if (message.failedSecurityPolicyApply != null && message.hasOwnProperty("failedSecurityPolicyApply")) { + object.failedSecurityPolicyApply = $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.toObject(message.failedSecurityPolicyApply, options); + if (options.oneofs) + object.details = "failedSecurityPolicyApply"; + } + if (message.invalidDataOrganization != null && message.hasOwnProperty("invalidDataOrganization")) { + object.invalidDataOrganization = $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization.toObject(message.invalidDataOrganization, options); + if (options.oneofs) + object.details = "invalidDataOrganization"; } - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; return object; }; /** - * Converts this Partition to JSON. + * Converts this Action to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.Partition + * @memberof google.cloud.dataplex.v1.Action * @instance * @returns {Object.} JSON object */ - Partition.prototype.toJSON = function toJSON() { + Action.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Partition; - })(); - - v1.Schema = (function() { - - /** - * Properties of a Schema. - * @memberof google.cloud.dataplex.v1 - * @interface ISchema - * @property {boolean|null} [userManaged] Schema userManaged - * @property {Array.|null} [fields] Schema fields - * @property {Array.|null} [partitionFields] Schema partitionFields - * @property {google.cloud.dataplex.v1.Schema.PartitionStyle|null} [partitionStyle] Schema partitionStyle - */ - - /** - * Constructs a new Schema. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a Schema. - * @implements ISchema - * @constructor - * @param {google.cloud.dataplex.v1.ISchema=} [properties] Properties to set - */ - function Schema(properties) { - this.fields = []; - this.partitionFields = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * Schema userManaged. - * @member {boolean} userManaged - * @memberof google.cloud.dataplex.v1.Schema - * @instance + * Category enum. + * @name google.cloud.dataplex.v1.Action.Category + * @enum {number} + * @property {number} CATEGORY_UNSPECIFIED=0 CATEGORY_UNSPECIFIED value + * @property {number} RESOURCE_MANAGEMENT=1 RESOURCE_MANAGEMENT value + * @property {number} SECURITY_POLICY=2 SECURITY_POLICY value + * @property {number} DATA_DISCOVERY=3 DATA_DISCOVERY value */ - Schema.prototype.userManaged = false; + Action.Category = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CATEGORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "RESOURCE_MANAGEMENT"] = 1; + values[valuesById[2] = "SECURITY_POLICY"] = 2; + values[valuesById[3] = "DATA_DISCOVERY"] = 3; + return values; + })(); - /** - * Schema fields. - * @member {Array.} fields - * @memberof google.cloud.dataplex.v1.Schema - * @instance - */ - Schema.prototype.fields = $util.emptyArray; + Action.MissingResource = (function() { - /** - * Schema partitionFields. - * @member {Array.} partitionFields - * @memberof google.cloud.dataplex.v1.Schema - * @instance - */ - Schema.prototype.partitionFields = $util.emptyArray; + /** + * Properties of a MissingResource. + * @memberof google.cloud.dataplex.v1.Action + * @interface IMissingResource + */ - /** - * Schema partitionStyle. - * @member {google.cloud.dataplex.v1.Schema.PartitionStyle} partitionStyle - * @memberof google.cloud.dataplex.v1.Schema - * @instance - */ - Schema.prototype.partitionStyle = 0; + /** + * Constructs a new MissingResource. + * @memberof google.cloud.dataplex.v1.Action + * @classdesc Represents a MissingResource. + * @implements IMissingResource + * @constructor + * @param {google.cloud.dataplex.v1.Action.IMissingResource=} [properties] Properties to set + */ + function MissingResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a new Schema instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Schema - * @static - * @param {google.cloud.dataplex.v1.ISchema=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Schema} Schema instance - */ - Schema.create = function create(properties) { - return new Schema(properties); - }; + /** + * Creates a new MissingResource instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Action.MissingResource + * @static + * @param {google.cloud.dataplex.v1.Action.IMissingResource=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Action.MissingResource} MissingResource instance + */ + MissingResource.create = function create(properties) { + return new MissingResource(properties); + }; - /** - * Encodes the specified Schema message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Schema - * @static - * @param {google.cloud.dataplex.v1.ISchema} message Schema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Schema.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.userManaged != null && Object.hasOwnProperty.call(message, "userManaged")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.userManaged); - if (message.fields != null && message.fields.length) - for (var i = 0; i < message.fields.length; ++i) - $root.google.cloud.dataplex.v1.Schema.SchemaField.encode(message.fields[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.partitionFields != null && message.partitionFields.length) - for (var i = 0; i < message.partitionFields.length; ++i) - $root.google.cloud.dataplex.v1.Schema.PartitionField.encode(message.partitionFields[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.partitionStyle != null && Object.hasOwnProperty.call(message, "partitionStyle")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.partitionStyle); - return writer; - }; + /** + * Encodes the specified MissingResource message. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Action.MissingResource + * @static + * @param {google.cloud.dataplex.v1.Action.IMissingResource} message MissingResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MissingResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; - /** - * Encodes the specified Schema message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Schema - * @static - * @param {google.cloud.dataplex.v1.ISchema} message Schema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Schema.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified MissingResource message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Action.MissingResource + * @static + * @param {google.cloud.dataplex.v1.Action.IMissingResource} message MissingResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MissingResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a Schema message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Schema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Schema} Schema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Schema.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Schema(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.userManaged = reader.bool(); - break; - case 2: - if (!(message.fields && message.fields.length)) - message.fields = []; - message.fields.push($root.google.cloud.dataplex.v1.Schema.SchemaField.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.partitionFields && message.partitionFields.length)) - message.partitionFields = []; - message.partitionFields.push($root.google.cloud.dataplex.v1.Schema.PartitionField.decode(reader, reader.uint32())); - break; - case 4: - message.partitionStyle = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Decodes a MissingResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Action.MissingResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Action.MissingResource} MissingResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MissingResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.MissingResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; - - /** - * Decodes a Schema message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Schema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Schema} Schema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Schema.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Schema message. - * @function verify - * @memberof google.cloud.dataplex.v1.Schema - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Schema.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.userManaged != null && message.hasOwnProperty("userManaged")) - if (typeof message.userManaged !== "boolean") - return "userManaged: boolean expected"; - if (message.fields != null && message.hasOwnProperty("fields")) { - if (!Array.isArray(message.fields)) - return "fields: array expected"; - for (var i = 0; i < message.fields.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Schema.SchemaField.verify(message.fields[i]); - if (error) - return "fields." + error; - } - } - if (message.partitionFields != null && message.hasOwnProperty("partitionFields")) { - if (!Array.isArray(message.partitionFields)) - return "partitionFields: array expected"; - for (var i = 0; i < message.partitionFields.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Schema.PartitionField.verify(message.partitionFields[i]); - if (error) - return "partitionFields." + error; - } - } - if (message.partitionStyle != null && message.hasOwnProperty("partitionStyle")) - switch (message.partitionStyle) { - default: - return "partitionStyle: enum value expected"; - case 0: - case 1: - break; - } - return null; - }; - - /** - * Creates a Schema message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Schema - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Schema} Schema - */ - Schema.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Schema) - return object; - var message = new $root.google.cloud.dataplex.v1.Schema(); - if (object.userManaged != null) - message.userManaged = Boolean(object.userManaged); - if (object.fields) { - if (!Array.isArray(object.fields)) - throw TypeError(".google.cloud.dataplex.v1.Schema.fields: array expected"); - message.fields = []; - for (var i = 0; i < object.fields.length; ++i) { - if (typeof object.fields[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.Schema.fields: object expected"); - message.fields[i] = $root.google.cloud.dataplex.v1.Schema.SchemaField.fromObject(object.fields[i]); - } - } - if (object.partitionFields) { - if (!Array.isArray(object.partitionFields)) - throw TypeError(".google.cloud.dataplex.v1.Schema.partitionFields: array expected"); - message.partitionFields = []; - for (var i = 0; i < object.partitionFields.length; ++i) { - if (typeof object.partitionFields[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.Schema.partitionFields: object expected"); - message.partitionFields[i] = $root.google.cloud.dataplex.v1.Schema.PartitionField.fromObject(object.partitionFields[i]); - } - } - switch (object.partitionStyle) { - case "PARTITION_STYLE_UNSPECIFIED": - case 0: - message.partitionStyle = 0; - break; - case "HIVE_COMPATIBLE": - case 1: - message.partitionStyle = 1; - break; - } - return message; - }; - - /** - * Creates a plain object from a Schema message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Schema - * @static - * @param {google.cloud.dataplex.v1.Schema} message Schema - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Schema.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.fields = []; - object.partitionFields = []; - } - if (options.defaults) { - object.userManaged = false; - object.partitionStyle = options.enums === String ? "PARTITION_STYLE_UNSPECIFIED" : 0; - } - if (message.userManaged != null && message.hasOwnProperty("userManaged")) - object.userManaged = message.userManaged; - if (message.fields && message.fields.length) { - object.fields = []; - for (var j = 0; j < message.fields.length; ++j) - object.fields[j] = $root.google.cloud.dataplex.v1.Schema.SchemaField.toObject(message.fields[j], options); - } - if (message.partitionFields && message.partitionFields.length) { - object.partitionFields = []; - for (var j = 0; j < message.partitionFields.length; ++j) - object.partitionFields[j] = $root.google.cloud.dataplex.v1.Schema.PartitionField.toObject(message.partitionFields[j], options); - } - if (message.partitionStyle != null && message.hasOwnProperty("partitionStyle")) - object.partitionStyle = options.enums === String ? $root.google.cloud.dataplex.v1.Schema.PartitionStyle[message.partitionStyle] : message.partitionStyle; - return object; - }; - - /** - * Converts this Schema to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Schema - * @instance - * @returns {Object.} JSON object - */ - Schema.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Type enum. - * @name google.cloud.dataplex.v1.Schema.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} BOOLEAN=1 BOOLEAN value - * @property {number} BYTE=2 BYTE value - * @property {number} INT16=3 INT16 value - * @property {number} INT32=4 INT32 value - * @property {number} INT64=5 INT64 value - * @property {number} FLOAT=6 FLOAT value - * @property {number} DOUBLE=7 DOUBLE value - * @property {number} DECIMAL=8 DECIMAL value - * @property {number} STRING=9 STRING value - * @property {number} BINARY=10 BINARY value - * @property {number} TIMESTAMP=11 TIMESTAMP value - * @property {number} DATE=12 DATE value - * @property {number} TIME=13 TIME value - * @property {number} RECORD=14 RECORD value - * @property {number} NULL=100 NULL value - */ - Schema.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "BOOLEAN"] = 1; - values[valuesById[2] = "BYTE"] = 2; - values[valuesById[3] = "INT16"] = 3; - values[valuesById[4] = "INT32"] = 4; - values[valuesById[5] = "INT64"] = 5; - values[valuesById[6] = "FLOAT"] = 6; - values[valuesById[7] = "DOUBLE"] = 7; - values[valuesById[8] = "DECIMAL"] = 8; - values[valuesById[9] = "STRING"] = 9; - values[valuesById[10] = "BINARY"] = 10; - values[valuesById[11] = "TIMESTAMP"] = 11; - values[valuesById[12] = "DATE"] = 12; - values[valuesById[13] = "TIME"] = 13; - values[valuesById[14] = "RECORD"] = 14; - values[valuesById[100] = "NULL"] = 100; - return values; - })(); - - /** - * Mode enum. - * @name google.cloud.dataplex.v1.Schema.Mode - * @enum {number} - * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value - * @property {number} REQUIRED=1 REQUIRED value - * @property {number} NULLABLE=2 NULLABLE value - * @property {number} REPEATED=3 REPEATED value - */ - Schema.Mode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "REQUIRED"] = 1; - values[valuesById[2] = "NULLABLE"] = 2; - values[valuesById[3] = "REPEATED"] = 3; - return values; - })(); - - Schema.SchemaField = (function() { - - /** - * Properties of a SchemaField. - * @memberof google.cloud.dataplex.v1.Schema - * @interface ISchemaField - * @property {string|null} [name] SchemaField name - * @property {string|null} [description] SchemaField description - * @property {google.cloud.dataplex.v1.Schema.Type|null} [type] SchemaField type - * @property {google.cloud.dataplex.v1.Schema.Mode|null} [mode] SchemaField mode - * @property {Array.|null} [fields] SchemaField fields - */ + return message; + }; /** - * Constructs a new SchemaField. - * @memberof google.cloud.dataplex.v1.Schema - * @classdesc Represents a SchemaField. - * @implements ISchemaField - * @constructor - * @param {google.cloud.dataplex.v1.Schema.ISchemaField=} [properties] Properties to set + * Decodes a MissingResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Action.MissingResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Action.MissingResource} MissingResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - function SchemaField(properties) { - this.fields = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + MissingResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * SchemaField name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.Schema.SchemaField - * @instance + * Verifies a MissingResource message. + * @function verify + * @memberof google.cloud.dataplex.v1.Action.MissingResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SchemaField.prototype.name = ""; + MissingResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; /** - * SchemaField description. - * @member {string} description - * @memberof google.cloud.dataplex.v1.Schema.SchemaField - * @instance + * Creates a MissingResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Action.MissingResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Action.MissingResource} MissingResource */ - SchemaField.prototype.description = ""; + MissingResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Action.MissingResource) + return object; + return new $root.google.cloud.dataplex.v1.Action.MissingResource(); + }; /** - * SchemaField type. - * @member {google.cloud.dataplex.v1.Schema.Type} type - * @memberof google.cloud.dataplex.v1.Schema.SchemaField - * @instance + * Creates a plain object from a MissingResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Action.MissingResource + * @static + * @param {google.cloud.dataplex.v1.Action.MissingResource} message MissingResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - SchemaField.prototype.type = 0; + MissingResource.toObject = function toObject() { + return {}; + }; /** - * SchemaField mode. - * @member {google.cloud.dataplex.v1.Schema.Mode} mode - * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * Converts this MissingResource to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Action.MissingResource * @instance + * @returns {Object.} JSON object */ - SchemaField.prototype.mode = 0; + MissingResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MissingResource; + })(); + + Action.UnauthorizedResource = (function() { /** - * SchemaField fields. - * @member {Array.} fields - * @memberof google.cloud.dataplex.v1.Schema.SchemaField - * @instance + * Properties of an UnauthorizedResource. + * @memberof google.cloud.dataplex.v1.Action + * @interface IUnauthorizedResource */ - SchemaField.prototype.fields = $util.emptyArray; /** - * Creates a new SchemaField instance using the specified properties. + * Constructs a new UnauthorizedResource. + * @memberof google.cloud.dataplex.v1.Action + * @classdesc Represents an UnauthorizedResource. + * @implements IUnauthorizedResource + * @constructor + * @param {google.cloud.dataplex.v1.Action.IUnauthorizedResource=} [properties] Properties to set + */ + function UnauthorizedResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new UnauthorizedResource instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource * @static - * @param {google.cloud.dataplex.v1.Schema.ISchemaField=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Schema.SchemaField} SchemaField instance + * @param {google.cloud.dataplex.v1.Action.IUnauthorizedResource=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Action.UnauthorizedResource} UnauthorizedResource instance */ - SchemaField.create = function create(properties) { - return new SchemaField(properties); + UnauthorizedResource.create = function create(properties) { + return new UnauthorizedResource(properties); }; /** - * Encodes the specified SchemaField message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.SchemaField.verify|verify} messages. + * Encodes the specified UnauthorizedResource message. Does not implicitly {@link google.cloud.dataplex.v1.Action.UnauthorizedResource.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource * @static - * @param {google.cloud.dataplex.v1.Schema.ISchemaField} message SchemaField message or plain object to encode + * @param {google.cloud.dataplex.v1.Action.IUnauthorizedResource} message UnauthorizedResource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SchemaField.encode = function encode(message, writer) { + UnauthorizedResource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type); - if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.mode); - if (message.fields != null && message.fields.length) - for (var i = 0; i < message.fields.length; ++i) - $root.google.cloud.dataplex.v1.Schema.SchemaField.encode(message.fields[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); return writer; }; /** - * Encodes the specified SchemaField message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.SchemaField.verify|verify} messages. + * Encodes the specified UnauthorizedResource message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.UnauthorizedResource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource * @static - * @param {google.cloud.dataplex.v1.Schema.ISchemaField} message SchemaField message or plain object to encode + * @param {google.cloud.dataplex.v1.Action.IUnauthorizedResource} message UnauthorizedResource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SchemaField.encodeDelimited = function encodeDelimited(message, writer) { + UnauthorizedResource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SchemaField message from the specified reader or buffer. + * Decodes an UnauthorizedResource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Schema.SchemaField} SchemaField + * @returns {google.cloud.dataplex.v1.Action.UnauthorizedResource} UnauthorizedResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SchemaField.decode = function decode(reader, length) { + UnauthorizedResource.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Schema.SchemaField(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.UnauthorizedResource(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.type = reader.int32(); - break; - case 4: - message.mode = reader.int32(); - break; - case 10: - if (!(message.fields && message.fields.length)) - message.fields = []; - message.fields.push($root.google.cloud.dataplex.v1.Schema.SchemaField.decode(reader, reader.uint32())); - break; default: reader.skipType(tag & 7); break; @@ -6134,265 +6996,94 @@ }; /** - * Decodes a SchemaField message from the specified reader or buffer, length delimited. + * Decodes an UnauthorizedResource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Schema.SchemaField} SchemaField + * @returns {google.cloud.dataplex.v1.Action.UnauthorizedResource} UnauthorizedResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SchemaField.decodeDelimited = function decodeDelimited(reader) { + UnauthorizedResource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SchemaField message. + * Verifies an UnauthorizedResource message. * @function verify - * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SchemaField.verify = function verify(message) { + UnauthorizedResource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 100: - break; - } - if (message.mode != null && message.hasOwnProperty("mode")) - switch (message.mode) { - default: - return "mode: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.fields != null && message.hasOwnProperty("fields")) { - if (!Array.isArray(message.fields)) - return "fields: array expected"; - for (var i = 0; i < message.fields.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Schema.SchemaField.verify(message.fields[i]); - if (error) - return "fields." + error; - } - } return null; }; /** - * Creates a SchemaField message from a plain object. Also converts values to their respective internal types. + * Creates an UnauthorizedResource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Schema.SchemaField} SchemaField + * @returns {google.cloud.dataplex.v1.Action.UnauthorizedResource} UnauthorizedResource */ - SchemaField.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Schema.SchemaField) + UnauthorizedResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Action.UnauthorizedResource) return object; - var message = new $root.google.cloud.dataplex.v1.Schema.SchemaField(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - switch (object.type) { - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "BOOLEAN": - case 1: - message.type = 1; - break; - case "BYTE": - case 2: - message.type = 2; - break; - case "INT16": - case 3: - message.type = 3; - break; - case "INT32": - case 4: - message.type = 4; - break; - case "INT64": - case 5: - message.type = 5; - break; - case "FLOAT": - case 6: - message.type = 6; - break; - case "DOUBLE": - case 7: - message.type = 7; - break; - case "DECIMAL": - case 8: - message.type = 8; - break; - case "STRING": - case 9: - message.type = 9; - break; - case "BINARY": - case 10: - message.type = 10; - break; - case "TIMESTAMP": - case 11: - message.type = 11; - break; - case "DATE": - case 12: - message.type = 12; - break; - case "TIME": - case 13: - message.type = 13; - break; - case "RECORD": - case 14: - message.type = 14; - break; - case "NULL": - case 100: - message.type = 100; - break; - } - switch (object.mode) { - case "MODE_UNSPECIFIED": - case 0: - message.mode = 0; - break; - case "REQUIRED": - case 1: - message.mode = 1; - break; - case "NULLABLE": - case 2: - message.mode = 2; - break; - case "REPEATED": - case 3: - message.mode = 3; - break; - } - if (object.fields) { - if (!Array.isArray(object.fields)) - throw TypeError(".google.cloud.dataplex.v1.Schema.SchemaField.fields: array expected"); - message.fields = []; - for (var i = 0; i < object.fields.length; ++i) { - if (typeof object.fields[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.Schema.SchemaField.fields: object expected"); - message.fields[i] = $root.google.cloud.dataplex.v1.Schema.SchemaField.fromObject(object.fields[i]); - } - } - return message; + return new $root.google.cloud.dataplex.v1.Action.UnauthorizedResource(); }; /** - * Creates a plain object from a SchemaField message. Also converts values to other types if specified. + * Creates a plain object from an UnauthorizedResource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource * @static - * @param {google.cloud.dataplex.v1.Schema.SchemaField} message SchemaField + * @param {google.cloud.dataplex.v1.Action.UnauthorizedResource} message UnauthorizedResource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SchemaField.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.fields = []; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Schema.Type[message.type] : message.type; - if (message.mode != null && message.hasOwnProperty("mode")) - object.mode = options.enums === String ? $root.google.cloud.dataplex.v1.Schema.Mode[message.mode] : message.mode; - if (message.fields && message.fields.length) { - object.fields = []; - for (var j = 0; j < message.fields.length; ++j) - object.fields[j] = $root.google.cloud.dataplex.v1.Schema.SchemaField.toObject(message.fields[j], options); - } - return object; + UnauthorizedResource.toObject = function toObject() { + return {}; }; /** - * Converts this SchemaField to JSON. + * Converts this UnauthorizedResource to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource * @instance * @returns {Object.} JSON object */ - SchemaField.prototype.toJSON = function toJSON() { + UnauthorizedResource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SchemaField; + return UnauthorizedResource; })(); - Schema.PartitionField = (function() { + Action.FailedSecurityPolicyApply = (function() { /** - * Properties of a PartitionField. - * @memberof google.cloud.dataplex.v1.Schema - * @interface IPartitionField - * @property {string|null} [name] PartitionField name - * @property {google.cloud.dataplex.v1.Schema.Type|null} [type] PartitionField type + * Properties of a FailedSecurityPolicyApply. + * @memberof google.cloud.dataplex.v1.Action + * @interface IFailedSecurityPolicyApply + * @property {string|null} [asset] FailedSecurityPolicyApply asset */ /** - * Constructs a new PartitionField. - * @memberof google.cloud.dataplex.v1.Schema - * @classdesc Represents a PartitionField. - * @implements IPartitionField + * Constructs a new FailedSecurityPolicyApply. + * @memberof google.cloud.dataplex.v1.Action + * @classdesc Represents a FailedSecurityPolicyApply. + * @implements IFailedSecurityPolicyApply * @constructor - * @param {google.cloud.dataplex.v1.Schema.IPartitionField=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply=} [properties] Properties to set */ - function PartitionField(properties) { + function FailedSecurityPolicyApply(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6400,88 +7091,75 @@ } /** - * PartitionField name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.Schema.PartitionField - * @instance - */ - PartitionField.prototype.name = ""; - - /** - * PartitionField type. - * @member {google.cloud.dataplex.v1.Schema.Type} type - * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * FailedSecurityPolicyApply asset. + * @member {string} asset + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply * @instance */ - PartitionField.prototype.type = 0; + FailedSecurityPolicyApply.prototype.asset = ""; /** - * Creates a new PartitionField instance using the specified properties. + * Creates a new FailedSecurityPolicyApply instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply * @static - * @param {google.cloud.dataplex.v1.Schema.IPartitionField=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Schema.PartitionField} PartitionField instance + * @param {google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply} FailedSecurityPolicyApply instance */ - PartitionField.create = function create(properties) { - return new PartitionField(properties); + FailedSecurityPolicyApply.create = function create(properties) { + return new FailedSecurityPolicyApply(properties); }; /** - * Encodes the specified PartitionField message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.PartitionField.verify|verify} messages. + * Encodes the specified FailedSecurityPolicyApply message. Does not implicitly {@link google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply * @static - * @param {google.cloud.dataplex.v1.Schema.IPartitionField} message PartitionField message or plain object to encode + * @param {google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply} message FailedSecurityPolicyApply message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PartitionField.encode = function encode(message, writer) { + FailedSecurityPolicyApply.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.asset); return writer; }; /** - * Encodes the specified PartitionField message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.PartitionField.verify|verify} messages. + * Encodes the specified FailedSecurityPolicyApply message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply * @static - * @param {google.cloud.dataplex.v1.Schema.IPartitionField} message PartitionField message or plain object to encode + * @param {google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply} message FailedSecurityPolicyApply message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PartitionField.encodeDelimited = function encodeDelimited(message, writer) { + FailedSecurityPolicyApply.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PartitionField message from the specified reader or buffer. + * Decodes a FailedSecurityPolicyApply message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Schema.PartitionField} PartitionField + * @returns {google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply} FailedSecurityPolicyApply * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PartitionField.decode = function decode(reader, length) { + FailedSecurityPolicyApply.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Schema.PartitionField(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); - break; - case 2: - message.type = reader.int32(); + message.asset = reader.string(); break; default: reader.skipType(tag & 7); @@ -6492,615 +7170,361 @@ }; /** - * Decodes a PartitionField message from the specified reader or buffer, length delimited. + * Decodes a FailedSecurityPolicyApply message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Schema.PartitionField} PartitionField + * @returns {google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply} FailedSecurityPolicyApply * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PartitionField.decodeDelimited = function decodeDelimited(reader) { + FailedSecurityPolicyApply.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PartitionField message. + * Verifies a FailedSecurityPolicyApply message. * @function verify - * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PartitionField.verify = function verify(message) { + FailedSecurityPolicyApply.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 100: - break; - } + if (message.asset != null && message.hasOwnProperty("asset")) + if (!$util.isString(message.asset)) + return "asset: string expected"; return null; }; /** - * Creates a PartitionField message from a plain object. Also converts values to their respective internal types. + * Creates a FailedSecurityPolicyApply message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Schema.PartitionField} PartitionField + * @returns {google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply} FailedSecurityPolicyApply */ - PartitionField.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Schema.PartitionField) + FailedSecurityPolicyApply.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply) return object; - var message = new $root.google.cloud.dataplex.v1.Schema.PartitionField(); - if (object.name != null) - message.name = String(object.name); - switch (object.type) { - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "BOOLEAN": - case 1: - message.type = 1; - break; - case "BYTE": - case 2: - message.type = 2; - break; - case "INT16": - case 3: - message.type = 3; - break; - case "INT32": - case 4: - message.type = 4; - break; - case "INT64": - case 5: - message.type = 5; - break; - case "FLOAT": - case 6: - message.type = 6; - break; - case "DOUBLE": - case 7: - message.type = 7; - break; - case "DECIMAL": - case 8: - message.type = 8; - break; - case "STRING": - case 9: - message.type = 9; - break; - case "BINARY": - case 10: - message.type = 10; - break; - case "TIMESTAMP": - case 11: - message.type = 11; - break; - case "DATE": - case 12: - message.type = 12; - break; - case "TIME": - case 13: - message.type = 13; - break; - case "RECORD": - case 14: - message.type = 14; - break; - case "NULL": - case 100: - message.type = 100; - break; - } + var message = new $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply(); + if (object.asset != null) + message.asset = String(object.asset); return message; }; /** - * Creates a plain object from a PartitionField message. Also converts values to other types if specified. + * Creates a plain object from a FailedSecurityPolicyApply message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply * @static - * @param {google.cloud.dataplex.v1.Schema.PartitionField} message PartitionField + * @param {google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply} message FailedSecurityPolicyApply * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PartitionField.toObject = function toObject(message, options) { + FailedSecurityPolicyApply.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Schema.Type[message.type] : message.type; + if (options.defaults) + object.asset = ""; + if (message.asset != null && message.hasOwnProperty("asset")) + object.asset = message.asset; return object; }; /** - * Converts this PartitionField to JSON. + * Converts this FailedSecurityPolicyApply to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply * @instance * @returns {Object.} JSON object */ - PartitionField.prototype.toJSON = function toJSON() { + FailedSecurityPolicyApply.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return PartitionField; - })(); - - /** - * PartitionStyle enum. - * @name google.cloud.dataplex.v1.Schema.PartitionStyle - * @enum {number} - * @property {number} PARTITION_STYLE_UNSPECIFIED=0 PARTITION_STYLE_UNSPECIFIED value - * @property {number} HIVE_COMPATIBLE=1 HIVE_COMPATIBLE value - */ - Schema.PartitionStyle = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PARTITION_STYLE_UNSPECIFIED"] = 0; - values[valuesById[1] = "HIVE_COMPATIBLE"] = 1; - return values; + return FailedSecurityPolicyApply; })(); - return Schema; - })(); - - v1.StorageFormat = (function() { + Action.InvalidDataFormat = (function() { - /** - * Properties of a StorageFormat. - * @memberof google.cloud.dataplex.v1 - * @interface IStorageFormat - * @property {google.cloud.dataplex.v1.StorageFormat.Format|null} [format] StorageFormat format - * @property {google.cloud.dataplex.v1.StorageFormat.CompressionFormat|null} [compressionFormat] StorageFormat compressionFormat - * @property {string|null} [mimeType] StorageFormat mimeType - * @property {google.cloud.dataplex.v1.StorageFormat.ICsvOptions|null} [csv] StorageFormat csv - * @property {google.cloud.dataplex.v1.StorageFormat.IJsonOptions|null} [json] StorageFormat json - */ + /** + * Properties of an InvalidDataFormat. + * @memberof google.cloud.dataplex.v1.Action + * @interface IInvalidDataFormat + * @property {Array.|null} [sampledDataLocations] InvalidDataFormat sampledDataLocations + * @property {string|null} [expectedFormat] InvalidDataFormat expectedFormat + * @property {string|null} [newFormat] InvalidDataFormat newFormat + */ - /** - * Constructs a new StorageFormat. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a StorageFormat. - * @implements IStorageFormat - * @constructor - * @param {google.cloud.dataplex.v1.IStorageFormat=} [properties] Properties to set - */ - function StorageFormat(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new InvalidDataFormat. + * @memberof google.cloud.dataplex.v1.Action + * @classdesc Represents an InvalidDataFormat. + * @implements IInvalidDataFormat + * @constructor + * @param {google.cloud.dataplex.v1.Action.IInvalidDataFormat=} [properties] Properties to set + */ + function InvalidDataFormat(properties) { + this.sampledDataLocations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * StorageFormat format. - * @member {google.cloud.dataplex.v1.StorageFormat.Format} format - * @memberof google.cloud.dataplex.v1.StorageFormat - * @instance - */ - StorageFormat.prototype.format = 0; + /** + * InvalidDataFormat sampledDataLocations. + * @member {Array.} sampledDataLocations + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @instance + */ + InvalidDataFormat.prototype.sampledDataLocations = $util.emptyArray; - /** - * StorageFormat compressionFormat. - * @member {google.cloud.dataplex.v1.StorageFormat.CompressionFormat} compressionFormat - * @memberof google.cloud.dataplex.v1.StorageFormat - * @instance - */ - StorageFormat.prototype.compressionFormat = 0; + /** + * InvalidDataFormat expectedFormat. + * @member {string} expectedFormat + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @instance + */ + InvalidDataFormat.prototype.expectedFormat = ""; - /** - * StorageFormat mimeType. - * @member {string} mimeType - * @memberof google.cloud.dataplex.v1.StorageFormat - * @instance - */ - StorageFormat.prototype.mimeType = ""; + /** + * InvalidDataFormat newFormat. + * @member {string} newFormat + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @instance + */ + InvalidDataFormat.prototype.newFormat = ""; - /** - * StorageFormat csv. - * @member {google.cloud.dataplex.v1.StorageFormat.ICsvOptions|null|undefined} csv - * @memberof google.cloud.dataplex.v1.StorageFormat - * @instance - */ - StorageFormat.prototype.csv = null; + /** + * Creates a new InvalidDataFormat instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @static + * @param {google.cloud.dataplex.v1.Action.IInvalidDataFormat=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Action.InvalidDataFormat} InvalidDataFormat instance + */ + InvalidDataFormat.create = function create(properties) { + return new InvalidDataFormat(properties); + }; - /** - * StorageFormat json. - * @member {google.cloud.dataplex.v1.StorageFormat.IJsonOptions|null|undefined} json - * @memberof google.cloud.dataplex.v1.StorageFormat - * @instance - */ - StorageFormat.prototype.json = null; + /** + * Encodes the specified InvalidDataFormat message. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataFormat.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @static + * @param {google.cloud.dataplex.v1.Action.IInvalidDataFormat} message InvalidDataFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InvalidDataFormat.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sampledDataLocations != null && message.sampledDataLocations.length) + for (var i = 0; i < message.sampledDataLocations.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sampledDataLocations[i]); + if (message.expectedFormat != null && Object.hasOwnProperty.call(message, "expectedFormat")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.expectedFormat); + if (message.newFormat != null && Object.hasOwnProperty.call(message, "newFormat")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.newFormat); + return writer; + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Encodes the specified InvalidDataFormat message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataFormat.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @static + * @param {google.cloud.dataplex.v1.Action.IInvalidDataFormat} message InvalidDataFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InvalidDataFormat.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * StorageFormat options. - * @member {"csv"|"json"|undefined} options - * @memberof google.cloud.dataplex.v1.StorageFormat - * @instance - */ - Object.defineProperty(StorageFormat.prototype, "options", { - get: $util.oneOfGetter($oneOfFields = ["csv", "json"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Decodes an InvalidDataFormat message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Action.InvalidDataFormat} InvalidDataFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InvalidDataFormat.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.InvalidDataFormat(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.sampledDataLocations && message.sampledDataLocations.length)) + message.sampledDataLocations = []; + message.sampledDataLocations.push(reader.string()); + break; + case 2: + message.expectedFormat = reader.string(); + break; + case 3: + message.newFormat = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a new StorageFormat instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.StorageFormat - * @static - * @param {google.cloud.dataplex.v1.IStorageFormat=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.StorageFormat} StorageFormat instance - */ - StorageFormat.create = function create(properties) { - return new StorageFormat(properties); - }; + /** + * Decodes an InvalidDataFormat message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Action.InvalidDataFormat} InvalidDataFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InvalidDataFormat.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified StorageFormat message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.StorageFormat - * @static - * @param {google.cloud.dataplex.v1.IStorageFormat} message StorageFormat message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StorageFormat.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.format != null && Object.hasOwnProperty.call(message, "format")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); - if (message.compressionFormat != null && Object.hasOwnProperty.call(message, "compressionFormat")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.compressionFormat); - if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.mimeType); - if (message.csv != null && Object.hasOwnProperty.call(message, "csv")) - $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.encode(message.csv, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.json != null && Object.hasOwnProperty.call(message, "json")) - $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.encode(message.json, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - return writer; - }; + /** + * Verifies an InvalidDataFormat message. + * @function verify + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InvalidDataFormat.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sampledDataLocations != null && message.hasOwnProperty("sampledDataLocations")) { + if (!Array.isArray(message.sampledDataLocations)) + return "sampledDataLocations: array expected"; + for (var i = 0; i < message.sampledDataLocations.length; ++i) + if (!$util.isString(message.sampledDataLocations[i])) + return "sampledDataLocations: string[] expected"; + } + if (message.expectedFormat != null && message.hasOwnProperty("expectedFormat")) + if (!$util.isString(message.expectedFormat)) + return "expectedFormat: string expected"; + if (message.newFormat != null && message.hasOwnProperty("newFormat")) + if (!$util.isString(message.newFormat)) + return "newFormat: string expected"; + return null; + }; - /** - * Encodes the specified StorageFormat message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.StorageFormat - * @static - * @param {google.cloud.dataplex.v1.IStorageFormat} message StorageFormat message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StorageFormat.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates an InvalidDataFormat message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Action.InvalidDataFormat} InvalidDataFormat + */ + InvalidDataFormat.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Action.InvalidDataFormat) + return object; + var message = new $root.google.cloud.dataplex.v1.Action.InvalidDataFormat(); + if (object.sampledDataLocations) { + if (!Array.isArray(object.sampledDataLocations)) + throw TypeError(".google.cloud.dataplex.v1.Action.InvalidDataFormat.sampledDataLocations: array expected"); + message.sampledDataLocations = []; + for (var i = 0; i < object.sampledDataLocations.length; ++i) + message.sampledDataLocations[i] = String(object.sampledDataLocations[i]); + } + if (object.expectedFormat != null) + message.expectedFormat = String(object.expectedFormat); + if (object.newFormat != null) + message.newFormat = String(object.newFormat); + return message; + }; - /** - * Decodes a StorageFormat message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.StorageFormat - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.StorageFormat} StorageFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StorageFormat.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.StorageFormat(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.format = reader.int32(); - break; - case 2: - message.compressionFormat = reader.int32(); - break; - case 3: - message.mimeType = reader.string(); - break; - case 10: - message.csv = $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.decode(reader, reader.uint32()); - break; - case 11: - message.json = $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Creates a plain object from an InvalidDataFormat message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @static + * @param {google.cloud.dataplex.v1.Action.InvalidDataFormat} message InvalidDataFormat + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InvalidDataFormat.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.sampledDataLocations = []; + if (options.defaults) { + object.expectedFormat = ""; + object.newFormat = ""; } - } - return message; - }; + if (message.sampledDataLocations && message.sampledDataLocations.length) { + object.sampledDataLocations = []; + for (var j = 0; j < message.sampledDataLocations.length; ++j) + object.sampledDataLocations[j] = message.sampledDataLocations[j]; + } + if (message.expectedFormat != null && message.hasOwnProperty("expectedFormat")) + object.expectedFormat = message.expectedFormat; + if (message.newFormat != null && message.hasOwnProperty("newFormat")) + object.newFormat = message.newFormat; + return object; + }; - /** - * Decodes a StorageFormat message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.StorageFormat - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.StorageFormat} StorageFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StorageFormat.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Converts this InvalidDataFormat to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @instance + * @returns {Object.} JSON object + */ + InvalidDataFormat.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Verifies a StorageFormat message. - * @function verify - * @memberof google.cloud.dataplex.v1.StorageFormat - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StorageFormat.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.format != null && message.hasOwnProperty("format")) - switch (message.format) { - default: - return "format: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 100: - case 101: - case 200: - case 201: - case 202: - case 203: - case 204: - case 1000: - case 1001: - break; - } - if (message.compressionFormat != null && message.hasOwnProperty("compressionFormat")) - switch (message.compressionFormat) { - default: - return "compressionFormat: enum value expected"; - case 0: - case 2: - case 3: - break; - } - if (message.mimeType != null && message.hasOwnProperty("mimeType")) - if (!$util.isString(message.mimeType)) - return "mimeType: string expected"; - if (message.csv != null && message.hasOwnProperty("csv")) { - properties.options = 1; - { - var error = $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify(message.csv); - if (error) - return "csv." + error; - } - } - if (message.json != null && message.hasOwnProperty("json")) { - if (properties.options === 1) - return "options: multiple values"; - properties.options = 1; - { - var error = $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify(message.json); - if (error) - return "json." + error; - } - } - return null; - }; - - /** - * Creates a StorageFormat message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.StorageFormat - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.StorageFormat} StorageFormat - */ - StorageFormat.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.StorageFormat) - return object; - var message = new $root.google.cloud.dataplex.v1.StorageFormat(); - switch (object.format) { - case "FORMAT_UNSPECIFIED": - case 0: - message.format = 0; - break; - case "PARQUET": - case 1: - message.format = 1; - break; - case "AVRO": - case 2: - message.format = 2; - break; - case "ORC": - case 3: - message.format = 3; - break; - case "CSV": - case 100: - message.format = 100; - break; - case "JSON": - case 101: - message.format = 101; - break; - case "IMAGE": - case 200: - message.format = 200; - break; - case "AUDIO": - case 201: - message.format = 201; - break; - case "VIDEO": - case 202: - message.format = 202; - break; - case "TEXT": - case 203: - message.format = 203; - break; - case "TFRECORD": - case 204: - message.format = 204; - break; - case "OTHER": - case 1000: - message.format = 1000; - break; - case "UNKNOWN": - case 1001: - message.format = 1001; - break; - } - switch (object.compressionFormat) { - case "COMPRESSION_FORMAT_UNSPECIFIED": - case 0: - message.compressionFormat = 0; - break; - case "GZIP": - case 2: - message.compressionFormat = 2; - break; - case "BZIP2": - case 3: - message.compressionFormat = 3; - break; - } - if (object.mimeType != null) - message.mimeType = String(object.mimeType); - if (object.csv != null) { - if (typeof object.csv !== "object") - throw TypeError(".google.cloud.dataplex.v1.StorageFormat.csv: object expected"); - message.csv = $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.fromObject(object.csv); - } - if (object.json != null) { - if (typeof object.json !== "object") - throw TypeError(".google.cloud.dataplex.v1.StorageFormat.json: object expected"); - message.json = $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.fromObject(object.json); - } - return message; - }; - - /** - * Creates a plain object from a StorageFormat message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.StorageFormat - * @static - * @param {google.cloud.dataplex.v1.StorageFormat} message StorageFormat - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StorageFormat.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; - object.compressionFormat = options.enums === String ? "COMPRESSION_FORMAT_UNSPECIFIED" : 0; - object.mimeType = ""; - } - if (message.format != null && message.hasOwnProperty("format")) - object.format = options.enums === String ? $root.google.cloud.dataplex.v1.StorageFormat.Format[message.format] : message.format; - if (message.compressionFormat != null && message.hasOwnProperty("compressionFormat")) - object.compressionFormat = options.enums === String ? $root.google.cloud.dataplex.v1.StorageFormat.CompressionFormat[message.compressionFormat] : message.compressionFormat; - if (message.mimeType != null && message.hasOwnProperty("mimeType")) - object.mimeType = message.mimeType; - if (message.csv != null && message.hasOwnProperty("csv")) { - object.csv = $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.toObject(message.csv, options); - if (options.oneofs) - object.options = "csv"; - } - if (message.json != null && message.hasOwnProperty("json")) { - object.json = $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.toObject(message.json, options); - if (options.oneofs) - object.options = "json"; - } - return object; - }; - - /** - * Converts this StorageFormat to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.StorageFormat - * @instance - * @returns {Object.} JSON object - */ - StorageFormat.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return InvalidDataFormat; + })(); - StorageFormat.CsvOptions = (function() { + Action.IncompatibleDataSchema = (function() { /** - * Properties of a CsvOptions. - * @memberof google.cloud.dataplex.v1.StorageFormat - * @interface ICsvOptions - * @property {string|null} [encoding] CsvOptions encoding - * @property {number|null} [headerRows] CsvOptions headerRows - * @property {string|null} [delimiter] CsvOptions delimiter - * @property {string|null} [quote] CsvOptions quote + * Properties of an IncompatibleDataSchema. + * @memberof google.cloud.dataplex.v1.Action + * @interface IIncompatibleDataSchema + * @property {string|null} [table] IncompatibleDataSchema table + * @property {string|null} [existingSchema] IncompatibleDataSchema existingSchema + * @property {string|null} [newSchema] IncompatibleDataSchema newSchema + * @property {Array.|null} [sampledDataLocations] IncompatibleDataSchema sampledDataLocations + * @property {google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange|null} [schemaChange] IncompatibleDataSchema schemaChange */ /** - * Constructs a new CsvOptions. - * @memberof google.cloud.dataplex.v1.StorageFormat - * @classdesc Represents a CsvOptions. - * @implements ICsvOptions + * Constructs a new IncompatibleDataSchema. + * @memberof google.cloud.dataplex.v1.Action + * @classdesc Represents an IncompatibleDataSchema. + * @implements IIncompatibleDataSchema * @constructor - * @param {google.cloud.dataplex.v1.StorageFormat.ICsvOptions=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.Action.IIncompatibleDataSchema=} [properties] Properties to set */ - function CsvOptions(properties) { + function IncompatibleDataSchema(properties) { + this.sampledDataLocations = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7108,114 +7532,130 @@ } /** - * CsvOptions encoding. - * @member {string} encoding - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * IncompatibleDataSchema table. + * @member {string} table + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema * @instance */ - CsvOptions.prototype.encoding = ""; + IncompatibleDataSchema.prototype.table = ""; /** - * CsvOptions headerRows. - * @member {number} headerRows - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * IncompatibleDataSchema existingSchema. + * @member {string} existingSchema + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema * @instance */ - CsvOptions.prototype.headerRows = 0; + IncompatibleDataSchema.prototype.existingSchema = ""; /** - * CsvOptions delimiter. - * @member {string} delimiter - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * IncompatibleDataSchema newSchema. + * @member {string} newSchema + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema * @instance */ - CsvOptions.prototype.delimiter = ""; + IncompatibleDataSchema.prototype.newSchema = ""; /** - * CsvOptions quote. - * @member {string} quote - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * IncompatibleDataSchema sampledDataLocations. + * @member {Array.} sampledDataLocations + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema * @instance */ - CsvOptions.prototype.quote = ""; + IncompatibleDataSchema.prototype.sampledDataLocations = $util.emptyArray; /** - * Creates a new CsvOptions instance using the specified properties. + * IncompatibleDataSchema schemaChange. + * @member {google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange} schemaChange + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @instance + */ + IncompatibleDataSchema.prototype.schemaChange = 0; + + /** + * Creates a new IncompatibleDataSchema instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema * @static - * @param {google.cloud.dataplex.v1.StorageFormat.ICsvOptions=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.StorageFormat.CsvOptions} CsvOptions instance + * @param {google.cloud.dataplex.v1.Action.IIncompatibleDataSchema=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Action.IncompatibleDataSchema} IncompatibleDataSchema instance */ - CsvOptions.create = function create(properties) { - return new CsvOptions(properties); + IncompatibleDataSchema.create = function create(properties) { + return new IncompatibleDataSchema(properties); }; /** - * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify|verify} messages. + * Encodes the specified IncompatibleDataSchema message. Does not implicitly {@link google.cloud.dataplex.v1.Action.IncompatibleDataSchema.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema * @static - * @param {google.cloud.dataplex.v1.StorageFormat.ICsvOptions} message CsvOptions message or plain object to encode + * @param {google.cloud.dataplex.v1.Action.IIncompatibleDataSchema} message IncompatibleDataSchema message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CsvOptions.encode = function encode(message, writer) { + IncompatibleDataSchema.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.encoding); - if (message.headerRows != null && Object.hasOwnProperty.call(message, "headerRows")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.headerRows); - if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.delimiter); - if (message.quote != null && Object.hasOwnProperty.call(message, "quote")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.quote); + if (message.table != null && Object.hasOwnProperty.call(message, "table")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.table); + if (message.existingSchema != null && Object.hasOwnProperty.call(message, "existingSchema")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.existingSchema); + if (message.newSchema != null && Object.hasOwnProperty.call(message, "newSchema")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.newSchema); + if (message.sampledDataLocations != null && message.sampledDataLocations.length) + for (var i = 0; i < message.sampledDataLocations.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.sampledDataLocations[i]); + if (message.schemaChange != null && Object.hasOwnProperty.call(message, "schemaChange")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.schemaChange); return writer; }; /** - * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify|verify} messages. + * Encodes the specified IncompatibleDataSchema message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.IncompatibleDataSchema.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema * @static - * @param {google.cloud.dataplex.v1.StorageFormat.ICsvOptions} message CsvOptions message or plain object to encode + * @param {google.cloud.dataplex.v1.Action.IIncompatibleDataSchema} message IncompatibleDataSchema message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CsvOptions.encodeDelimited = function encodeDelimited(message, writer) { + IncompatibleDataSchema.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CsvOptions message from the specified reader or buffer. + * Decodes an IncompatibleDataSchema message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.StorageFormat.CsvOptions} CsvOptions + * @returns {google.cloud.dataplex.v1.Action.IncompatibleDataSchema} IncompatibleDataSchema * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CsvOptions.decode = function decode(reader, length) { + IncompatibleDataSchema.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.encoding = reader.string(); + message.table = reader.string(); break; case 2: - message.headerRows = reader.int32(); + message.existingSchema = reader.string(); break; case 3: - message.delimiter = reader.string(); + message.newSchema = reader.string(); break; case 4: - message.quote = reader.string(); + if (!(message.sampledDataLocations && message.sampledDataLocations.length)) + message.sampledDataLocations = []; + message.sampledDataLocations.push(reader.string()); + break; + case 5: + message.schemaChange = reader.int32(); break; default: reader.skipType(tag & 7); @@ -7226,132 +7666,187 @@ }; /** - * Decodes a CsvOptions message from the specified reader or buffer, length delimited. + * Decodes an IncompatibleDataSchema message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.StorageFormat.CsvOptions} CsvOptions + * @returns {google.cloud.dataplex.v1.Action.IncompatibleDataSchema} IncompatibleDataSchema * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CsvOptions.decodeDelimited = function decodeDelimited(reader) { + IncompatibleDataSchema.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CsvOptions message. + * Verifies an IncompatibleDataSchema message. * @function verify - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CsvOptions.verify = function verify(message) { + IncompatibleDataSchema.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.encoding != null && message.hasOwnProperty("encoding")) - if (!$util.isString(message.encoding)) - return "encoding: string expected"; - if (message.headerRows != null && message.hasOwnProperty("headerRows")) - if (!$util.isInteger(message.headerRows)) - return "headerRows: integer expected"; - if (message.delimiter != null && message.hasOwnProperty("delimiter")) - if (!$util.isString(message.delimiter)) - return "delimiter: string expected"; - if (message.quote != null && message.hasOwnProperty("quote")) - if (!$util.isString(message.quote)) - return "quote: string expected"; + if (message.table != null && message.hasOwnProperty("table")) + if (!$util.isString(message.table)) + return "table: string expected"; + if (message.existingSchema != null && message.hasOwnProperty("existingSchema")) + if (!$util.isString(message.existingSchema)) + return "existingSchema: string expected"; + if (message.newSchema != null && message.hasOwnProperty("newSchema")) + if (!$util.isString(message.newSchema)) + return "newSchema: string expected"; + if (message.sampledDataLocations != null && message.hasOwnProperty("sampledDataLocations")) { + if (!Array.isArray(message.sampledDataLocations)) + return "sampledDataLocations: array expected"; + for (var i = 0; i < message.sampledDataLocations.length; ++i) + if (!$util.isString(message.sampledDataLocations[i])) + return "sampledDataLocations: string[] expected"; + } + if (message.schemaChange != null && message.hasOwnProperty("schemaChange")) + switch (message.schemaChange) { + default: + return "schemaChange: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. + * Creates an IncompatibleDataSchema message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.StorageFormat.CsvOptions} CsvOptions + * @returns {google.cloud.dataplex.v1.Action.IncompatibleDataSchema} IncompatibleDataSchema */ - CsvOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions) + IncompatibleDataSchema.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema) return object; - var message = new $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions(); - if (object.encoding != null) - message.encoding = String(object.encoding); - if (object.headerRows != null) - message.headerRows = object.headerRows | 0; - if (object.delimiter != null) - message.delimiter = String(object.delimiter); - if (object.quote != null) - message.quote = String(object.quote); + var message = new $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema(); + if (object.table != null) + message.table = String(object.table); + if (object.existingSchema != null) + message.existingSchema = String(object.existingSchema); + if (object.newSchema != null) + message.newSchema = String(object.newSchema); + if (object.sampledDataLocations) { + if (!Array.isArray(object.sampledDataLocations)) + throw TypeError(".google.cloud.dataplex.v1.Action.IncompatibleDataSchema.sampledDataLocations: array expected"); + message.sampledDataLocations = []; + for (var i = 0; i < object.sampledDataLocations.length; ++i) + message.sampledDataLocations[i] = String(object.sampledDataLocations[i]); + } + switch (object.schemaChange) { + case "SCHEMA_CHANGE_UNSPECIFIED": + case 0: + message.schemaChange = 0; + break; + case "INCOMPATIBLE": + case 1: + message.schemaChange = 1; + break; + case "MODIFIED": + case 2: + message.schemaChange = 2; + break; + } return message; }; /** - * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. + * Creates a plain object from an IncompatibleDataSchema message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema * @static - * @param {google.cloud.dataplex.v1.StorageFormat.CsvOptions} message CsvOptions + * @param {google.cloud.dataplex.v1.Action.IncompatibleDataSchema} message IncompatibleDataSchema * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CsvOptions.toObject = function toObject(message, options) { + IncompatibleDataSchema.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.sampledDataLocations = []; if (options.defaults) { - object.encoding = ""; - object.headerRows = 0; - object.delimiter = ""; - object.quote = ""; + object.table = ""; + object.existingSchema = ""; + object.newSchema = ""; + object.schemaChange = options.enums === String ? "SCHEMA_CHANGE_UNSPECIFIED" : 0; } - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = message.encoding; - if (message.headerRows != null && message.hasOwnProperty("headerRows")) - object.headerRows = message.headerRows; - if (message.delimiter != null && message.hasOwnProperty("delimiter")) - object.delimiter = message.delimiter; - if (message.quote != null && message.hasOwnProperty("quote")) - object.quote = message.quote; + if (message.table != null && message.hasOwnProperty("table")) + object.table = message.table; + if (message.existingSchema != null && message.hasOwnProperty("existingSchema")) + object.existingSchema = message.existingSchema; + if (message.newSchema != null && message.hasOwnProperty("newSchema")) + object.newSchema = message.newSchema; + if (message.sampledDataLocations && message.sampledDataLocations.length) { + object.sampledDataLocations = []; + for (var j = 0; j < message.sampledDataLocations.length; ++j) + object.sampledDataLocations[j] = message.sampledDataLocations[j]; + } + if (message.schemaChange != null && message.hasOwnProperty("schemaChange")) + object.schemaChange = options.enums === String ? $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange[message.schemaChange] : message.schemaChange; return object; }; /** - * Converts this CsvOptions to JSON. + * Converts this IncompatibleDataSchema to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema * @instance * @returns {Object.} JSON object */ - CsvOptions.prototype.toJSON = function toJSON() { + IncompatibleDataSchema.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CsvOptions; + /** + * SchemaChange enum. + * @name google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange + * @enum {number} + * @property {number} SCHEMA_CHANGE_UNSPECIFIED=0 SCHEMA_CHANGE_UNSPECIFIED value + * @property {number} INCOMPATIBLE=1 INCOMPATIBLE value + * @property {number} MODIFIED=2 MODIFIED value + */ + IncompatibleDataSchema.SchemaChange = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SCHEMA_CHANGE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INCOMPATIBLE"] = 1; + values[valuesById[2] = "MODIFIED"] = 2; + return values; + })(); + + return IncompatibleDataSchema; })(); - StorageFormat.JsonOptions = (function() { + Action.InvalidDataPartition = (function() { /** - * Properties of a JsonOptions. - * @memberof google.cloud.dataplex.v1.StorageFormat - * @interface IJsonOptions - * @property {string|null} [encoding] JsonOptions encoding + * Properties of an InvalidDataPartition. + * @memberof google.cloud.dataplex.v1.Action + * @interface IInvalidDataPartition + * @property {google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure|null} [expectedStructure] InvalidDataPartition expectedStructure */ /** - * Constructs a new JsonOptions. - * @memberof google.cloud.dataplex.v1.StorageFormat - * @classdesc Represents a JsonOptions. - * @implements IJsonOptions - * @constructor - * @param {google.cloud.dataplex.v1.StorageFormat.IJsonOptions=} [properties] Properties to set - */ - function JsonOptions(properties) { + * Constructs a new InvalidDataPartition. + * @memberof google.cloud.dataplex.v1.Action + * @classdesc Represents an InvalidDataPartition. + * @implements IInvalidDataPartition + * @constructor + * @param {google.cloud.dataplex.v1.Action.IInvalidDataPartition=} [properties] Properties to set + */ + function InvalidDataPartition(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7359,75 +7854,75 @@ } /** - * JsonOptions encoding. - * @member {string} encoding - * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * InvalidDataPartition expectedStructure. + * @member {google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure} expectedStructure + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition * @instance */ - JsonOptions.prototype.encoding = ""; + InvalidDataPartition.prototype.expectedStructure = 0; /** - * Creates a new JsonOptions instance using the specified properties. + * Creates a new InvalidDataPartition instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition * @static - * @param {google.cloud.dataplex.v1.StorageFormat.IJsonOptions=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.StorageFormat.JsonOptions} JsonOptions instance + * @param {google.cloud.dataplex.v1.Action.IInvalidDataPartition=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Action.InvalidDataPartition} InvalidDataPartition instance */ - JsonOptions.create = function create(properties) { - return new JsonOptions(properties); + InvalidDataPartition.create = function create(properties) { + return new InvalidDataPartition(properties); }; /** - * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify|verify} messages. + * Encodes the specified InvalidDataPartition message. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataPartition.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition * @static - * @param {google.cloud.dataplex.v1.StorageFormat.IJsonOptions} message JsonOptions message or plain object to encode + * @param {google.cloud.dataplex.v1.Action.IInvalidDataPartition} message InvalidDataPartition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - JsonOptions.encode = function encode(message, writer) { + InvalidDataPartition.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.encoding); + if (message.expectedStructure != null && Object.hasOwnProperty.call(message, "expectedStructure")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.expectedStructure); return writer; }; /** - * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify|verify} messages. + * Encodes the specified InvalidDataPartition message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataPartition.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition * @static - * @param {google.cloud.dataplex.v1.StorageFormat.IJsonOptions} message JsonOptions message or plain object to encode + * @param {google.cloud.dataplex.v1.Action.IInvalidDataPartition} message InvalidDataPartition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - JsonOptions.encodeDelimited = function encodeDelimited(message, writer) { + InvalidDataPartition.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a JsonOptions message from the specified reader or buffer. + * Decodes an InvalidDataPartition message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.StorageFormat.JsonOptions} JsonOptions + * @returns {google.cloud.dataplex.v1.Action.InvalidDataPartition} InvalidDataPartition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - JsonOptions.decode = function decode(reader, length) { + InvalidDataPartition.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.InvalidDataPartition(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.encoding = reader.string(); + message.expectedStructure = reader.int32(); break; default: reader.skipType(tag & 7); @@ -7438,384 +7933,681 @@ }; /** - * Decodes a JsonOptions message from the specified reader or buffer, length delimited. + * Decodes an InvalidDataPartition message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.StorageFormat.JsonOptions} JsonOptions + * @returns {google.cloud.dataplex.v1.Action.InvalidDataPartition} InvalidDataPartition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - JsonOptions.decodeDelimited = function decodeDelimited(reader) { + InvalidDataPartition.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a JsonOptions message. + * Verifies an InvalidDataPartition message. * @function verify - * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - JsonOptions.verify = function verify(message) { + InvalidDataPartition.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.encoding != null && message.hasOwnProperty("encoding")) - if (!$util.isString(message.encoding)) - return "encoding: string expected"; + if (message.expectedStructure != null && message.hasOwnProperty("expectedStructure")) + switch (message.expectedStructure) { + default: + return "expectedStructure: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. + * Creates an InvalidDataPartition message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.StorageFormat.JsonOptions} JsonOptions + * @returns {google.cloud.dataplex.v1.Action.InvalidDataPartition} InvalidDataPartition */ - JsonOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions) + InvalidDataPartition.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Action.InvalidDataPartition) return object; - var message = new $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions(); - if (object.encoding != null) - message.encoding = String(object.encoding); + var message = new $root.google.cloud.dataplex.v1.Action.InvalidDataPartition(); + switch (object.expectedStructure) { + case "PARTITION_STRUCTURE_UNSPECIFIED": + case 0: + message.expectedStructure = 0; + break; + case "CONSISTENT_KEYS": + case 1: + message.expectedStructure = 1; + break; + case "HIVE_STYLE_KEYS": + case 2: + message.expectedStructure = 2; + break; + } return message; }; /** - * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. + * Creates a plain object from an InvalidDataPartition message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition * @static - * @param {google.cloud.dataplex.v1.StorageFormat.JsonOptions} message JsonOptions + * @param {google.cloud.dataplex.v1.Action.InvalidDataPartition} message InvalidDataPartition * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - JsonOptions.toObject = function toObject(message, options) { + InvalidDataPartition.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.encoding = ""; - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = message.encoding; + object.expectedStructure = options.enums === String ? "PARTITION_STRUCTURE_UNSPECIFIED" : 0; + if (message.expectedStructure != null && message.hasOwnProperty("expectedStructure")) + object.expectedStructure = options.enums === String ? $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure[message.expectedStructure] : message.expectedStructure; return object; }; /** - * Converts this JsonOptions to JSON. + * Converts this InvalidDataPartition to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition * @instance * @returns {Object.} JSON object */ - JsonOptions.prototype.toJSON = function toJSON() { + InvalidDataPartition.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return JsonOptions; - })(); + /** + * PartitionStructure enum. + * @name google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure + * @enum {number} + * @property {number} PARTITION_STRUCTURE_UNSPECIFIED=0 PARTITION_STRUCTURE_UNSPECIFIED value + * @property {number} CONSISTENT_KEYS=1 CONSISTENT_KEYS value + * @property {number} HIVE_STYLE_KEYS=2 HIVE_STYLE_KEYS value + */ + InvalidDataPartition.PartitionStructure = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PARTITION_STRUCTURE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CONSISTENT_KEYS"] = 1; + values[valuesById[2] = "HIVE_STYLE_KEYS"] = 2; + return values; + })(); - /** - * Format enum. - * @name google.cloud.dataplex.v1.StorageFormat.Format - * @enum {number} - * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value - * @property {number} PARQUET=1 PARQUET value - * @property {number} AVRO=2 AVRO value - * @property {number} ORC=3 ORC value - * @property {number} CSV=100 CSV value - * @property {number} JSON=101 JSON value - * @property {number} IMAGE=200 IMAGE value - * @property {number} AUDIO=201 AUDIO value - * @property {number} VIDEO=202 VIDEO value - * @property {number} TEXT=203 TEXT value - * @property {number} TFRECORD=204 TFRECORD value - * @property {number} OTHER=1000 OTHER value - * @property {number} UNKNOWN=1001 UNKNOWN value - */ - StorageFormat.Format = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; - values[valuesById[1] = "PARQUET"] = 1; - values[valuesById[2] = "AVRO"] = 2; - values[valuesById[3] = "ORC"] = 3; - values[valuesById[100] = "CSV"] = 100; - values[valuesById[101] = "JSON"] = 101; - values[valuesById[200] = "IMAGE"] = 200; - values[valuesById[201] = "AUDIO"] = 201; - values[valuesById[202] = "VIDEO"] = 202; - values[valuesById[203] = "TEXT"] = 203; - values[valuesById[204] = "TFRECORD"] = 204; - values[valuesById[1000] = "OTHER"] = 1000; - values[valuesById[1001] = "UNKNOWN"] = 1001; - return values; + return InvalidDataPartition; })(); - /** - * CompressionFormat enum. - * @name google.cloud.dataplex.v1.StorageFormat.CompressionFormat - * @enum {number} - * @property {number} COMPRESSION_FORMAT_UNSPECIFIED=0 COMPRESSION_FORMAT_UNSPECIFIED value - * @property {number} GZIP=2 GZIP value - * @property {number} BZIP2=3 BZIP2 value - */ - StorageFormat.CompressionFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "COMPRESSION_FORMAT_UNSPECIFIED"] = 0; - values[valuesById[2] = "GZIP"] = 2; - values[valuesById[3] = "BZIP2"] = 3; - return values; - })(); + Action.MissingData = (function() { - return StorageFormat; - })(); + /** + * Properties of a MissingData. + * @memberof google.cloud.dataplex.v1.Action + * @interface IMissingData + */ - /** - * StorageSystem enum. - * @name google.cloud.dataplex.v1.StorageSystem - * @enum {number} - * @property {number} STORAGE_SYSTEM_UNSPECIFIED=0 STORAGE_SYSTEM_UNSPECIFIED value - * @property {number} CLOUD_STORAGE=1 CLOUD_STORAGE value - * @property {number} BIGQUERY=2 BIGQUERY value - */ - v1.StorageSystem = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STORAGE_SYSTEM_UNSPECIFIED"] = 0; - values[valuesById[1] = "CLOUD_STORAGE"] = 1; - values[valuesById[2] = "BIGQUERY"] = 2; - return values; - })(); + /** + * Constructs a new MissingData. + * @memberof google.cloud.dataplex.v1.Action + * @classdesc Represents a MissingData. + * @implements IMissingData + * @constructor + * @param {google.cloud.dataplex.v1.Action.IMissingData=} [properties] Properties to set + */ + function MissingData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - v1.Lake = (function() { + /** + * Creates a new MissingData instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Action.MissingData + * @static + * @param {google.cloud.dataplex.v1.Action.IMissingData=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Action.MissingData} MissingData instance + */ + MissingData.create = function create(properties) { + return new MissingData(properties); + }; - /** - * Properties of a Lake. - * @memberof google.cloud.dataplex.v1 - * @interface ILake - * @property {string|null} [name] Lake name - * @property {string|null} [displayName] Lake displayName - * @property {string|null} [uid] Lake uid - * @property {google.protobuf.ITimestamp|null} [createTime] Lake createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Lake updateTime - * @property {Object.|null} [labels] Lake labels - * @property {string|null} [description] Lake description - * @property {google.cloud.dataplex.v1.Lake.MetastoreStatus.State|null} [state] Lake state - * @property {string|null} [serviceAccount] Lake serviceAccount - * @property {google.cloud.dataplex.v1.Lake.IMetastore|null} [metastore] Lake metastore - * @property {google.cloud.dataplex.v1.IAssetStatus|null} [assetStatus] Lake assetStatus - * @property {google.cloud.dataplex.v1.Lake.IMetastoreStatus|null} [metastoreStatus] Lake metastoreStatus - */ + /** + * Encodes the specified MissingData message. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingData.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Action.MissingData + * @static + * @param {google.cloud.dataplex.v1.Action.IMissingData} message MissingData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MissingData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; - /** - * Constructs a new Lake. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a Lake. - * @implements ILake - * @constructor - * @param {google.cloud.dataplex.v1.ILake=} [properties] Properties to set - */ - function Lake(properties) { - this.labels = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Encodes the specified MissingData message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Action.MissingData + * @static + * @param {google.cloud.dataplex.v1.Action.IMissingData} message MissingData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MissingData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Lake name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.Lake - * @instance - */ - Lake.prototype.name = ""; + /** + * Decodes a MissingData message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Action.MissingData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Action.MissingData} MissingData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MissingData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.MissingData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Lake displayName. - * @member {string} displayName - * @memberof google.cloud.dataplex.v1.Lake - * @instance - */ - Lake.prototype.displayName = ""; + /** + * Decodes a MissingData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Action.MissingData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Action.MissingData} MissingData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MissingData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Lake uid. - * @member {string} uid - * @memberof google.cloud.dataplex.v1.Lake - * @instance - */ - Lake.prototype.uid = ""; + /** + * Verifies a MissingData message. + * @function verify + * @memberof google.cloud.dataplex.v1.Action.MissingData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MissingData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; - /** - * Lake createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dataplex.v1.Lake - * @instance - */ - Lake.prototype.createTime = null; + /** + * Creates a MissingData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Action.MissingData + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Action.MissingData} MissingData + */ + MissingData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Action.MissingData) + return object; + return new $root.google.cloud.dataplex.v1.Action.MissingData(); + }; - /** - * Lake updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.Lake - * @instance - */ - Lake.prototype.updateTime = null; + /** + * Creates a plain object from a MissingData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Action.MissingData + * @static + * @param {google.cloud.dataplex.v1.Action.MissingData} message MissingData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MissingData.toObject = function toObject() { + return {}; + }; - /** - * Lake labels. - * @member {Object.} labels - * @memberof google.cloud.dataplex.v1.Lake - * @instance - */ - Lake.prototype.labels = $util.emptyObject; + /** + * Converts this MissingData to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Action.MissingData + * @instance + * @returns {Object.} JSON object + */ + MissingData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Lake description. - * @member {string} description - * @memberof google.cloud.dataplex.v1.Lake - * @instance - */ - Lake.prototype.description = ""; + return MissingData; + })(); - /** - * Lake state. - * @member {google.cloud.dataplex.v1.Lake.MetastoreStatus.State} state - * @memberof google.cloud.dataplex.v1.Lake - * @instance - */ - Lake.prototype.state = 0; + Action.InvalidDataOrganization = (function() { - /** - * Lake serviceAccount. - * @member {string} serviceAccount - * @memberof google.cloud.dataplex.v1.Lake - * @instance - */ - Lake.prototype.serviceAccount = ""; + /** + * Properties of an InvalidDataOrganization. + * @memberof google.cloud.dataplex.v1.Action + * @interface IInvalidDataOrganization + */ - /** - * Lake metastore. - * @member {google.cloud.dataplex.v1.Lake.IMetastore|null|undefined} metastore - * @memberof google.cloud.dataplex.v1.Lake - * @instance - */ - Lake.prototype.metastore = null; + /** + * Constructs a new InvalidDataOrganization. + * @memberof google.cloud.dataplex.v1.Action + * @classdesc Represents an InvalidDataOrganization. + * @implements IInvalidDataOrganization + * @constructor + * @param {google.cloud.dataplex.v1.Action.IInvalidDataOrganization=} [properties] Properties to set + */ + function InvalidDataOrganization(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Lake assetStatus. - * @member {google.cloud.dataplex.v1.IAssetStatus|null|undefined} assetStatus - * @memberof google.cloud.dataplex.v1.Lake - * @instance - */ - Lake.prototype.assetStatus = null; + /** + * Creates a new InvalidDataOrganization instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @static + * @param {google.cloud.dataplex.v1.Action.IInvalidDataOrganization=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Action.InvalidDataOrganization} InvalidDataOrganization instance + */ + InvalidDataOrganization.create = function create(properties) { + return new InvalidDataOrganization(properties); + }; - /** - * Lake metastoreStatus. - * @member {google.cloud.dataplex.v1.Lake.IMetastoreStatus|null|undefined} metastoreStatus - * @memberof google.cloud.dataplex.v1.Lake - * @instance + /** + * Encodes the specified InvalidDataOrganization message. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataOrganization.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @static + * @param {google.cloud.dataplex.v1.Action.IInvalidDataOrganization} message InvalidDataOrganization message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InvalidDataOrganization.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified InvalidDataOrganization message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataOrganization.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @static + * @param {google.cloud.dataplex.v1.Action.IInvalidDataOrganization} message InvalidDataOrganization message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InvalidDataOrganization.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InvalidDataOrganization message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Action.InvalidDataOrganization} InvalidDataOrganization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InvalidDataOrganization.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InvalidDataOrganization message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Action.InvalidDataOrganization} InvalidDataOrganization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InvalidDataOrganization.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InvalidDataOrganization message. + * @function verify + * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InvalidDataOrganization.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an InvalidDataOrganization message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Action.InvalidDataOrganization} InvalidDataOrganization + */ + InvalidDataOrganization.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization) + return object; + return new $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization(); + }; + + /** + * Creates a plain object from an InvalidDataOrganization message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @static + * @param {google.cloud.dataplex.v1.Action.InvalidDataOrganization} message InvalidDataOrganization + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InvalidDataOrganization.toObject = function toObject() { + return {}; + }; + + /** + * Converts this InvalidDataOrganization to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @instance + * @returns {Object.} JSON object + */ + InvalidDataOrganization.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return InvalidDataOrganization; + })(); + + return Action; + })(); + + v1.Asset = (function() { + + /** + * Properties of an Asset. + * @memberof google.cloud.dataplex.v1 + * @interface IAsset + * @property {string|null} [name] Asset name + * @property {string|null} [displayName] Asset displayName + * @property {string|null} [uid] Asset uid + * @property {google.protobuf.ITimestamp|null} [createTime] Asset createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Asset updateTime + * @property {Object.|null} [labels] Asset labels + * @property {string|null} [description] Asset description + * @property {google.cloud.dataplex.v1.Asset.SecurityStatus.State|null} [state] Asset state + * @property {google.cloud.dataplex.v1.Asset.IResourceSpec|null} [resourceSpec] Asset resourceSpec + * @property {google.cloud.dataplex.v1.Asset.IResourceStatus|null} [resourceStatus] Asset resourceStatus + * @property {google.cloud.dataplex.v1.Asset.ISecurityStatus|null} [securityStatus] Asset securityStatus + * @property {google.cloud.dataplex.v1.Asset.IDiscoverySpec|null} [discoverySpec] Asset discoverySpec + * @property {google.cloud.dataplex.v1.Asset.IDiscoveryStatus|null} [discoveryStatus] Asset discoveryStatus */ - Lake.prototype.metastoreStatus = null; /** - * Creates a new Lake instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Lake - * @static - * @param {google.cloud.dataplex.v1.ILake=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Lake} Lake instance + * Constructs a new Asset. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an Asset. + * @implements IAsset + * @constructor + * @param {google.cloud.dataplex.v1.IAsset=} [properties] Properties to set */ - Lake.create = function create(properties) { - return new Lake(properties); - }; + function Asset(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Encodes the specified Lake message. Does not implicitly {@link google.cloud.dataplex.v1.Lake.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Lake - * @static - * @param {google.cloud.dataplex.v1.ILake} message Lake message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Asset name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Asset + * @instance */ - Lake.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.uid); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.description); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); - if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.serviceAccount); - if (message.metastore != null && Object.hasOwnProperty.call(message, "metastore")) - $root.google.cloud.dataplex.v1.Lake.Metastore.encode(message.metastore, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); - if (message.assetStatus != null && Object.hasOwnProperty.call(message, "assetStatus")) - $root.google.cloud.dataplex.v1.AssetStatus.encode(message.assetStatus, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); - if (message.metastoreStatus != null && Object.hasOwnProperty.call(message, "metastoreStatus")) - $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.encode(message.metastoreStatus, writer.uint32(/* id 104, wireType 2 =*/834).fork()).ldelim(); - return writer; - }; + Asset.prototype.name = ""; /** - * Encodes the specified Lake message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Lake.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Lake - * @static - * @param {google.cloud.dataplex.v1.ILake} message Lake message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Asset displayName. + * @member {string} displayName + * @memberof google.cloud.dataplex.v1.Asset + * @instance */ - Lake.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Asset.prototype.displayName = ""; /** - * Decodes a Lake message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Lake - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Lake} Lake - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Asset uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.Asset + * @instance */ - Lake.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Lake(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.displayName = reader.string(); - break; - case 3: - message.uid = reader.string(); - break; + Asset.prototype.uid = ""; + + /** + * Asset createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.createTime = null; + + /** + * Asset updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.updateTime = null; + + /** + * Asset labels. + * @member {Object.} labels + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.labels = $util.emptyObject; + + /** + * Asset description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.description = ""; + + /** + * Asset state. + * @member {google.cloud.dataplex.v1.Asset.SecurityStatus.State} state + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.state = 0; + + /** + * Asset resourceSpec. + * @member {google.cloud.dataplex.v1.Asset.IResourceSpec|null|undefined} resourceSpec + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.resourceSpec = null; + + /** + * Asset resourceStatus. + * @member {google.cloud.dataplex.v1.Asset.IResourceStatus|null|undefined} resourceStatus + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.resourceStatus = null; + + /** + * Asset securityStatus. + * @member {google.cloud.dataplex.v1.Asset.ISecurityStatus|null|undefined} securityStatus + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.securityStatus = null; + + /** + * Asset discoverySpec. + * @member {google.cloud.dataplex.v1.Asset.IDiscoverySpec|null|undefined} discoverySpec + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.discoverySpec = null; + + /** + * Asset discoveryStatus. + * @member {google.cloud.dataplex.v1.Asset.IDiscoveryStatus|null|undefined} discoveryStatus + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.discoveryStatus = null; + + /** + * Creates a new Asset instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Asset + * @static + * @param {google.cloud.dataplex.v1.IAsset=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Asset} Asset instance + */ + Asset.create = function create(properties) { + return new Asset(properties); + }; + + /** + * Encodes the specified Asset message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Asset + * @static + * @param {google.cloud.dataplex.v1.IAsset} message Asset message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Asset.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.uid); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.description); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); + if (message.resourceSpec != null && Object.hasOwnProperty.call(message, "resourceSpec")) + $root.google.cloud.dataplex.v1.Asset.ResourceSpec.encode(message.resourceSpec, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + if (message.resourceStatus != null && Object.hasOwnProperty.call(message, "resourceStatus")) + $root.google.cloud.dataplex.v1.Asset.ResourceStatus.encode(message.resourceStatus, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.securityStatus != null && Object.hasOwnProperty.call(message, "securityStatus")) + $root.google.cloud.dataplex.v1.Asset.SecurityStatus.encode(message.securityStatus, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); + if (message.discoverySpec != null && Object.hasOwnProperty.call(message, "discoverySpec")) + $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.encode(message.discoverySpec, writer.uint32(/* id 106, wireType 2 =*/850).fork()).ldelim(); + if (message.discoveryStatus != null && Object.hasOwnProperty.call(message, "discoveryStatus")) + $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.encode(message.discoveryStatus, writer.uint32(/* id 107, wireType 2 =*/858).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Asset message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Asset + * @static + * @param {google.cloud.dataplex.v1.IAsset} message Asset message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Asset.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Asset message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Asset + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Asset} Asset + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Asset.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.displayName = reader.string(); + break; + case 3: + message.uid = reader.string(); + break; case 4: message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; @@ -7850,17 +8642,20 @@ case 8: message.state = reader.int32(); break; - case 9: - message.serviceAccount = reader.string(); + case 100: + message.resourceSpec = $root.google.cloud.dataplex.v1.Asset.ResourceSpec.decode(reader, reader.uint32()); break; - case 102: - message.metastore = $root.google.cloud.dataplex.v1.Lake.Metastore.decode(reader, reader.uint32()); + case 101: + message.resourceStatus = $root.google.cloud.dataplex.v1.Asset.ResourceStatus.decode(reader, reader.uint32()); break; case 103: - message.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.decode(reader, reader.uint32()); + message.securityStatus = $root.google.cloud.dataplex.v1.Asset.SecurityStatus.decode(reader, reader.uint32()); break; - case 104: - message.metastoreStatus = $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.decode(reader, reader.uint32()); + case 106: + message.discoverySpec = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.decode(reader, reader.uint32()); + break; + case 107: + message.discoveryStatus = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -7871,30 +8666,30 @@ }; /** - * Decodes a Lake message from the specified reader or buffer, length delimited. + * Decodes an Asset message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Lake + * @memberof google.cloud.dataplex.v1.Asset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Lake} Lake + * @returns {google.cloud.dataplex.v1.Asset} Asset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Lake.decodeDelimited = function decodeDelimited(reader) { + Asset.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Lake message. + * Verifies an Asset message. * @function verify - * @memberof google.cloud.dataplex.v1.Lake + * @memberof google.cloud.dataplex.v1.Asset * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Lake.verify = function verify(message) { + Asset.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -7935,42 +8730,48 @@ case 1: case 2: case 3: - case 4: break; } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - if (!$util.isString(message.serviceAccount)) - return "serviceAccount: string expected"; - if (message.metastore != null && message.hasOwnProperty("metastore")) { - var error = $root.google.cloud.dataplex.v1.Lake.Metastore.verify(message.metastore); + if (message.resourceSpec != null && message.hasOwnProperty("resourceSpec")) { + var error = $root.google.cloud.dataplex.v1.Asset.ResourceSpec.verify(message.resourceSpec); if (error) - return "metastore." + error; + return "resourceSpec." + error; } - if (message.assetStatus != null && message.hasOwnProperty("assetStatus")) { - var error = $root.google.cloud.dataplex.v1.AssetStatus.verify(message.assetStatus); + if (message.resourceStatus != null && message.hasOwnProperty("resourceStatus")) { + var error = $root.google.cloud.dataplex.v1.Asset.ResourceStatus.verify(message.resourceStatus); if (error) - return "assetStatus." + error; + return "resourceStatus." + error; } - if (message.metastoreStatus != null && message.hasOwnProperty("metastoreStatus")) { - var error = $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.verify(message.metastoreStatus); + if (message.securityStatus != null && message.hasOwnProperty("securityStatus")) { + var error = $root.google.cloud.dataplex.v1.Asset.SecurityStatus.verify(message.securityStatus); if (error) - return "metastoreStatus." + error; + return "securityStatus." + error; + } + if (message.discoverySpec != null && message.hasOwnProperty("discoverySpec")) { + var error = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.verify(message.discoverySpec); + if (error) + return "discoverySpec." + error; + } + if (message.discoveryStatus != null && message.hasOwnProperty("discoveryStatus")) { + var error = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.verify(message.discoveryStatus); + if (error) + return "discoveryStatus." + error; } return null; }; /** - * Creates a Lake message from a plain object. Also converts values to their respective internal types. + * Creates an Asset message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.Lake + * @memberof google.cloud.dataplex.v1.Asset * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Lake} Lake + * @returns {google.cloud.dataplex.v1.Asset} Asset */ - Lake.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Lake) + Asset.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Asset) return object; - var message = new $root.google.cloud.dataplex.v1.Lake(); + var message = new $root.google.cloud.dataplex.v1.Asset(); if (object.name != null) message.name = String(object.name); if (object.displayName != null) @@ -7979,17 +8780,17 @@ message.uid = String(object.uid); if (object.createTime != null) { if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Lake.createTime: object expected"); + throw TypeError(".google.cloud.dataplex.v1.Asset.createTime: object expected"); message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } if (object.updateTime != null) { if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Lake.updateTime: object expected"); + throw TypeError(".google.cloud.dataplex.v1.Asset.updateTime: object expected"); message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } if (object.labels) { if (typeof object.labels !== "object") - throw TypeError(".google.cloud.dataplex.v1.Lake.labels: object expected"); + throw TypeError(".google.cloud.dataplex.v1.Asset.labels: object expected"); message.labels = {}; for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) message.labels[keys[i]] = String(object.labels[keys[i]]); @@ -8001,53 +8802,57 @@ case 0: message.state = 0; break; - case "NONE": + case "READY": case 1: message.state = 1; break; - case "READY": + case "APPLYING": case 2: message.state = 2; break; - case "UPDATING": + case "ERROR": case 3: message.state = 3; break; - case "ERROR": - case 4: - message.state = 4; - break; } - if (object.serviceAccount != null) - message.serviceAccount = String(object.serviceAccount); - if (object.metastore != null) { - if (typeof object.metastore !== "object") - throw TypeError(".google.cloud.dataplex.v1.Lake.metastore: object expected"); - message.metastore = $root.google.cloud.dataplex.v1.Lake.Metastore.fromObject(object.metastore); + if (object.resourceSpec != null) { + if (typeof object.resourceSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.resourceSpec: object expected"); + message.resourceSpec = $root.google.cloud.dataplex.v1.Asset.ResourceSpec.fromObject(object.resourceSpec); } - if (object.assetStatus != null) { - if (typeof object.assetStatus !== "object") - throw TypeError(".google.cloud.dataplex.v1.Lake.assetStatus: object expected"); - message.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.fromObject(object.assetStatus); + if (object.resourceStatus != null) { + if (typeof object.resourceStatus !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.resourceStatus: object expected"); + message.resourceStatus = $root.google.cloud.dataplex.v1.Asset.ResourceStatus.fromObject(object.resourceStatus); } - if (object.metastoreStatus != null) { - if (typeof object.metastoreStatus !== "object") - throw TypeError(".google.cloud.dataplex.v1.Lake.metastoreStatus: object expected"); - message.metastoreStatus = $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.fromObject(object.metastoreStatus); + if (object.securityStatus != null) { + if (typeof object.securityStatus !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.securityStatus: object expected"); + message.securityStatus = $root.google.cloud.dataplex.v1.Asset.SecurityStatus.fromObject(object.securityStatus); + } + if (object.discoverySpec != null) { + if (typeof object.discoverySpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.discoverySpec: object expected"); + message.discoverySpec = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.fromObject(object.discoverySpec); + } + if (object.discoveryStatus != null) { + if (typeof object.discoveryStatus !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.discoveryStatus: object expected"); + message.discoveryStatus = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.fromObject(object.discoveryStatus); } return message; }; /** - * Creates a plain object from a Lake message. Also converts values to other types if specified. + * Creates a plain object from an Asset message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.Lake + * @memberof google.cloud.dataplex.v1.Asset * @static - * @param {google.cloud.dataplex.v1.Lake} message Lake + * @param {google.cloud.dataplex.v1.Asset} message Asset * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Lake.toObject = function toObject(message, options) { + Asset.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -8061,10 +8866,11 @@ object.updateTime = null; object.description = ""; object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.serviceAccount = ""; - object.metastore = null; - object.assetStatus = null; - object.metastoreStatus = null; + object.resourceSpec = null; + object.resourceStatus = null; + object.securityStatus = null; + object.discoverySpec = null; + object.discoveryStatus = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -8085,47 +8891,51 @@ if (message.description != null && message.hasOwnProperty("description")) object.description = message.description; if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.State[message.state] : message.state; - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - object.serviceAccount = message.serviceAccount; - if (message.metastore != null && message.hasOwnProperty("metastore")) - object.metastore = $root.google.cloud.dataplex.v1.Lake.Metastore.toObject(message.metastore, options); - if (message.assetStatus != null && message.hasOwnProperty("assetStatus")) - object.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.toObject(message.assetStatus, options); - if (message.metastoreStatus != null && message.hasOwnProperty("metastoreStatus")) - object.metastoreStatus = $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.toObject(message.metastoreStatus, options); + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Asset.SecurityStatus.State[message.state] : message.state; + if (message.resourceSpec != null && message.hasOwnProperty("resourceSpec")) + object.resourceSpec = $root.google.cloud.dataplex.v1.Asset.ResourceSpec.toObject(message.resourceSpec, options); + if (message.resourceStatus != null && message.hasOwnProperty("resourceStatus")) + object.resourceStatus = $root.google.cloud.dataplex.v1.Asset.ResourceStatus.toObject(message.resourceStatus, options); + if (message.securityStatus != null && message.hasOwnProperty("securityStatus")) + object.securityStatus = $root.google.cloud.dataplex.v1.Asset.SecurityStatus.toObject(message.securityStatus, options); + if (message.discoverySpec != null && message.hasOwnProperty("discoverySpec")) + object.discoverySpec = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.toObject(message.discoverySpec, options); + if (message.discoveryStatus != null && message.hasOwnProperty("discoveryStatus")) + object.discoveryStatus = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.toObject(message.discoveryStatus, options); return object; }; /** - * Converts this Lake to JSON. + * Converts this Asset to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.Lake + * @memberof google.cloud.dataplex.v1.Asset * @instance * @returns {Object.} JSON object */ - Lake.prototype.toJSON = function toJSON() { + Asset.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - Lake.Metastore = (function() { + Asset.SecurityStatus = (function() { /** - * Properties of a Metastore. - * @memberof google.cloud.dataplex.v1.Lake - * @interface IMetastore - * @property {string|null} [service] Metastore service + * Properties of a SecurityStatus. + * @memberof google.cloud.dataplex.v1.Asset + * @interface ISecurityStatus + * @property {google.cloud.dataplex.v1.Asset.SecurityStatus.State|null} [state] SecurityStatus state + * @property {string|null} [message] SecurityStatus message + * @property {google.protobuf.ITimestamp|null} [updateTime] SecurityStatus updateTime */ /** - * Constructs a new Metastore. - * @memberof google.cloud.dataplex.v1.Lake - * @classdesc Represents a Metastore. - * @implements IMetastore + * Constructs a new SecurityStatus. + * @memberof google.cloud.dataplex.v1.Asset + * @classdesc Represents a SecurityStatus. + * @implements ISecurityStatus * @constructor - * @param {google.cloud.dataplex.v1.Lake.IMetastore=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.Asset.ISecurityStatus=} [properties] Properties to set */ - function Metastore(properties) { + function SecurityStatus(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8133,75 +8943,101 @@ } /** - * Metastore service. - * @member {string} service - * @memberof google.cloud.dataplex.v1.Lake.Metastore + * SecurityStatus state. + * @member {google.cloud.dataplex.v1.Asset.SecurityStatus.State} state + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus * @instance */ - Metastore.prototype.service = ""; + SecurityStatus.prototype.state = 0; /** - * Creates a new Metastore instance using the specified properties. + * SecurityStatus message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @instance + */ + SecurityStatus.prototype.message = ""; + + /** + * SecurityStatus updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @instance + */ + SecurityStatus.prototype.updateTime = null; + + /** + * Creates a new SecurityStatus instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus * @static - * @param {google.cloud.dataplex.v1.Lake.IMetastore=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Lake.Metastore} Metastore instance + * @param {google.cloud.dataplex.v1.Asset.ISecurityStatus=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Asset.SecurityStatus} SecurityStatus instance */ - Metastore.create = function create(properties) { - return new Metastore(properties); + SecurityStatus.create = function create(properties) { + return new SecurityStatus(properties); }; /** - * Encodes the specified Metastore message. Does not implicitly {@link google.cloud.dataplex.v1.Lake.Metastore.verify|verify} messages. + * Encodes the specified SecurityStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.SecurityStatus.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus * @static - * @param {google.cloud.dataplex.v1.Lake.IMetastore} message Metastore message or plain object to encode + * @param {google.cloud.dataplex.v1.Asset.ISecurityStatus} message SecurityStatus message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Metastore.encode = function encode(message, writer) { + SecurityStatus.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified Metastore message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Lake.Metastore.verify|verify} messages. + * Encodes the specified SecurityStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.SecurityStatus.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus * @static - * @param {google.cloud.dataplex.v1.Lake.IMetastore} message Metastore message or plain object to encode + * @param {google.cloud.dataplex.v1.Asset.ISecurityStatus} message SecurityStatus message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Metastore.encodeDelimited = function encodeDelimited(message, writer) { + SecurityStatus.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Metastore message from the specified reader or buffer. + * Decodes a SecurityStatus message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Lake.Metastore} Metastore + * @returns {google.cloud.dataplex.v1.Asset.SecurityStatus} SecurityStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Metastore.decode = function decode(reader, length) { + SecurityStatus.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Lake.Metastore(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.SecurityStatus(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.service = reader.string(); + message.state = reader.int32(); + break; + case 2: + message.message = reader.string(); + break; + case 3: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -8212,110 +9048,177 @@ }; /** - * Decodes a Metastore message from the specified reader or buffer, length delimited. + * Decodes a SecurityStatus message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Lake.Metastore} Metastore + * @returns {google.cloud.dataplex.v1.Asset.SecurityStatus} SecurityStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Metastore.decodeDelimited = function decodeDelimited(reader) { + SecurityStatus.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Metastore message. + * Verifies a SecurityStatus message. * @function verify - * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Metastore.verify = function verify(message) { + SecurityStatus.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.service != null && message.hasOwnProperty("service")) - if (!$util.isString(message.service)) - return "service: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } return null; }; /** - * Creates a Metastore message from a plain object. Also converts values to their respective internal types. + * Creates a SecurityStatus message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Lake.Metastore} Metastore + * @returns {google.cloud.dataplex.v1.Asset.SecurityStatus} SecurityStatus */ - Metastore.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Lake.Metastore) + SecurityStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Asset.SecurityStatus) return object; - var message = new $root.google.cloud.dataplex.v1.Lake.Metastore(); - if (object.service != null) - message.service = String(object.service); - return message; - }; - - /** - * Creates a plain object from a Metastore message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Lake.Metastore - * @static - * @param {google.cloud.dataplex.v1.Lake.Metastore} message Metastore - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Metastore.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.service = ""; - if (message.service != null && message.hasOwnProperty("service")) - object.service = message.service; + var message = new $root.google.cloud.dataplex.v1.Asset.SecurityStatus(); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "READY": + case 1: + message.state = 1; + break; + case "APPLYING": + case 2: + message.state = 2; + break; + case "ERROR": + case 3: + message.state = 3; + break; + } + if (object.message != null) + message.message = String(object.message); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.SecurityStatus.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a SecurityStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @static + * @param {google.cloud.dataplex.v1.Asset.SecurityStatus} message SecurityStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SecurityStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.message = ""; + object.updateTime = null; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Asset.SecurityStatus.State[message.state] : message.state; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); return object; }; /** - * Converts this Metastore to JSON. + * Converts this SecurityStatus to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus * @instance * @returns {Object.} JSON object */ - Metastore.prototype.toJSON = function toJSON() { + SecurityStatus.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Metastore; + /** + * State enum. + * @name google.cloud.dataplex.v1.Asset.SecurityStatus.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} READY=1 READY value + * @property {number} APPLYING=2 APPLYING value + * @property {number} ERROR=3 ERROR value + */ + SecurityStatus.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "READY"] = 1; + values[valuesById[2] = "APPLYING"] = 2; + values[valuesById[3] = "ERROR"] = 3; + return values; + })(); + + return SecurityStatus; })(); - Lake.MetastoreStatus = (function() { + Asset.DiscoverySpec = (function() { /** - * Properties of a MetastoreStatus. - * @memberof google.cloud.dataplex.v1.Lake - * @interface IMetastoreStatus - * @property {google.cloud.dataplex.v1.Lake.MetastoreStatus.State|null} [state] MetastoreStatus state - * @property {string|null} [message] MetastoreStatus message - * @property {google.protobuf.ITimestamp|null} [updateTime] MetastoreStatus updateTime - * @property {string|null} [endpoint] MetastoreStatus endpoint + * Properties of a DiscoverySpec. + * @memberof google.cloud.dataplex.v1.Asset + * @interface IDiscoverySpec + * @property {boolean|null} [enabled] DiscoverySpec enabled + * @property {Array.|null} [includePatterns] DiscoverySpec includePatterns + * @property {Array.|null} [excludePatterns] DiscoverySpec excludePatterns + * @property {google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions|null} [csvOptions] DiscoverySpec csvOptions + * @property {google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions|null} [jsonOptions] DiscoverySpec jsonOptions + * @property {string|null} [schedule] DiscoverySpec schedule */ /** - * Constructs a new MetastoreStatus. - * @memberof google.cloud.dataplex.v1.Lake - * @classdesc Represents a MetastoreStatus. - * @implements IMetastoreStatus + * Constructs a new DiscoverySpec. + * @memberof google.cloud.dataplex.v1.Asset + * @classdesc Represents a DiscoverySpec. + * @implements IDiscoverySpec * @constructor - * @param {google.cloud.dataplex.v1.Lake.IMetastoreStatus=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.Asset.IDiscoverySpec=} [properties] Properties to set */ - function MetastoreStatus(properties) { + function DiscoverySpec(properties) { + this.includePatterns = []; + this.excludePatterns = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8323,114 +9226,160 @@ } /** - * MetastoreStatus state. - * @member {google.cloud.dataplex.v1.Lake.MetastoreStatus.State} state - * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * DiscoverySpec enabled. + * @member {boolean} enabled + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec * @instance */ - MetastoreStatus.prototype.state = 0; + DiscoverySpec.prototype.enabled = false; /** - * MetastoreStatus message. - * @member {string} message - * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * DiscoverySpec includePatterns. + * @member {Array.} includePatterns + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec * @instance */ - MetastoreStatus.prototype.message = ""; + DiscoverySpec.prototype.includePatterns = $util.emptyArray; /** - * MetastoreStatus updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * DiscoverySpec excludePatterns. + * @member {Array.} excludePatterns + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec * @instance */ - MetastoreStatus.prototype.updateTime = null; + DiscoverySpec.prototype.excludePatterns = $util.emptyArray; /** - * MetastoreStatus endpoint. - * @member {string} endpoint - * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * DiscoverySpec csvOptions. + * @member {google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions|null|undefined} csvOptions + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec * @instance */ - MetastoreStatus.prototype.endpoint = ""; + DiscoverySpec.prototype.csvOptions = null; /** - * Creates a new MetastoreStatus instance using the specified properties. + * DiscoverySpec jsonOptions. + * @member {google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions|null|undefined} jsonOptions + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.jsonOptions = null; + + /** + * DiscoverySpec schedule. + * @member {string|null|undefined} schedule + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.schedule = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DiscoverySpec trigger. + * @member {"schedule"|undefined} trigger + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @instance + */ + Object.defineProperty(DiscoverySpec.prototype, "trigger", { + get: $util.oneOfGetter($oneOfFields = ["schedule"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DiscoverySpec instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec * @static - * @param {google.cloud.dataplex.v1.Lake.IMetastoreStatus=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Lake.MetastoreStatus} MetastoreStatus instance + * @param {google.cloud.dataplex.v1.Asset.IDiscoverySpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec} DiscoverySpec instance */ - MetastoreStatus.create = function create(properties) { - return new MetastoreStatus(properties); + DiscoverySpec.create = function create(properties) { + return new DiscoverySpec(properties); }; /** - * Encodes the specified MetastoreStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Lake.MetastoreStatus.verify|verify} messages. + * Encodes the specified DiscoverySpec message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec * @static - * @param {google.cloud.dataplex.v1.Lake.IMetastoreStatus} message MetastoreStatus message or plain object to encode + * @param {google.cloud.dataplex.v1.Asset.IDiscoverySpec} message DiscoverySpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetastoreStatus.encode = function encode(message, writer) { + DiscoverySpec.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.endpoint); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + if (message.includePatterns != null && message.includePatterns.length) + for (var i = 0; i < message.includePatterns.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.includePatterns[i]); + if (message.excludePatterns != null && message.excludePatterns.length) + for (var i = 0; i < message.excludePatterns.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.excludePatterns[i]); + if (message.csvOptions != null && Object.hasOwnProperty.call(message, "csvOptions")) + $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.encode(message.csvOptions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.jsonOptions != null && Object.hasOwnProperty.call(message, "jsonOptions")) + $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.encode(message.jsonOptions, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.schedule != null && Object.hasOwnProperty.call(message, "schedule")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.schedule); return writer; }; /** - * Encodes the specified MetastoreStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Lake.MetastoreStatus.verify|verify} messages. + * Encodes the specified DiscoverySpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec * @static - * @param {google.cloud.dataplex.v1.Lake.IMetastoreStatus} message MetastoreStatus message or plain object to encode + * @param {google.cloud.dataplex.v1.Asset.IDiscoverySpec} message DiscoverySpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MetastoreStatus.encodeDelimited = function encodeDelimited(message, writer) { + DiscoverySpec.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MetastoreStatus message from the specified reader or buffer. + * Decodes a DiscoverySpec message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Lake.MetastoreStatus} MetastoreStatus + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec} DiscoverySpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetastoreStatus.decode = function decode(reader, length) { + DiscoverySpec.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Lake.MetastoreStatus(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.DiscoverySpec(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.state = reader.int32(); + message.enabled = reader.bool(); break; case 2: - message.message = reader.string(); + if (!(message.includePatterns && message.includePatterns.length)) + message.includePatterns = []; + message.includePatterns.push(reader.string()); break; case 3: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + if (!(message.excludePatterns && message.excludePatterns.length)) + message.excludePatterns = []; + message.excludePatterns.push(reader.string()); break; case 4: - message.endpoint = reader.string(); + message.csvOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.decode(reader, reader.uint32()); + break; + case 5: + message.jsonOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.decode(reader, reader.uint32()); + break; + case 10: + message.schedule = reader.string(); break; default: reader.skipType(tag & 7); @@ -8441,975 +9390,899 @@ }; /** - * Decodes a MetastoreStatus message from the specified reader or buffer, length delimited. + * Decodes a DiscoverySpec message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Lake.MetastoreStatus} MetastoreStatus + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec} DiscoverySpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MetastoreStatus.decodeDelimited = function decodeDelimited(reader) { + DiscoverySpec.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MetastoreStatus message. + * Verifies a DiscoverySpec message. * @function verify - * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MetastoreStatus.verify = function verify(message) { + DiscoverySpec.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + var properties = {}; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + if (message.includePatterns != null && message.hasOwnProperty("includePatterns")) { + if (!Array.isArray(message.includePatterns)) + return "includePatterns: array expected"; + for (var i = 0; i < message.includePatterns.length; ++i) + if (!$util.isString(message.includePatterns[i])) + return "includePatterns: string[] expected"; + } + if (message.excludePatterns != null && message.hasOwnProperty("excludePatterns")) { + if (!Array.isArray(message.excludePatterns)) + return "excludePatterns: array expected"; + for (var i = 0; i < message.excludePatterns.length; ++i) + if (!$util.isString(message.excludePatterns[i])) + return "excludePatterns: string[] expected"; + } + if (message.csvOptions != null && message.hasOwnProperty("csvOptions")) { + var error = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.verify(message.csvOptions); if (error) - return "updateTime." + error; + return "csvOptions." + error; + } + if (message.jsonOptions != null && message.hasOwnProperty("jsonOptions")) { + var error = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.verify(message.jsonOptions); + if (error) + return "jsonOptions." + error; + } + if (message.schedule != null && message.hasOwnProperty("schedule")) { + properties.trigger = 1; + if (!$util.isString(message.schedule)) + return "schedule: string expected"; } - if (message.endpoint != null && message.hasOwnProperty("endpoint")) - if (!$util.isString(message.endpoint)) - return "endpoint: string expected"; return null; }; /** - * Creates a MetastoreStatus message from a plain object. Also converts values to their respective internal types. + * Creates a DiscoverySpec message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Lake.MetastoreStatus} MetastoreStatus + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec} DiscoverySpec */ - MetastoreStatus.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Lake.MetastoreStatus) + DiscoverySpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Asset.DiscoverySpec) return object; - var message = new $root.google.cloud.dataplex.v1.Lake.MetastoreStatus(); - switch (object.state) { - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "NONE": - case 1: - message.state = 1; - break; - case "READY": - case 2: - message.state = 2; - break; - case "UPDATING": - case 3: - message.state = 3; - break; - case "ERROR": - case 4: - message.state = 4; - break; + var message = new $root.google.cloud.dataplex.v1.Asset.DiscoverySpec(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.includePatterns) { + if (!Array.isArray(object.includePatterns)) + throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoverySpec.includePatterns: array expected"); + message.includePatterns = []; + for (var i = 0; i < object.includePatterns.length; ++i) + message.includePatterns[i] = String(object.includePatterns[i]); } - if (object.message != null) - message.message = String(object.message); - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Lake.MetastoreStatus.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + if (object.excludePatterns) { + if (!Array.isArray(object.excludePatterns)) + throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoverySpec.excludePatterns: array expected"); + message.excludePatterns = []; + for (var i = 0; i < object.excludePatterns.length; ++i) + message.excludePatterns[i] = String(object.excludePatterns[i]); } - if (object.endpoint != null) - message.endpoint = String(object.endpoint); + if (object.csvOptions != null) { + if (typeof object.csvOptions !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoverySpec.csvOptions: object expected"); + message.csvOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.fromObject(object.csvOptions); + } + if (object.jsonOptions != null) { + if (typeof object.jsonOptions !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoverySpec.jsonOptions: object expected"); + message.jsonOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.fromObject(object.jsonOptions); + } + if (object.schedule != null) + message.schedule = String(object.schedule); return message; }; /** - * Creates a plain object from a MetastoreStatus message. Also converts values to other types if specified. + * Creates a plain object from a DiscoverySpec message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec * @static - * @param {google.cloud.dataplex.v1.Lake.MetastoreStatus} message MetastoreStatus + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec} message DiscoverySpec * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MetastoreStatus.toObject = function toObject(message, options) { + DiscoverySpec.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.includePatterns = []; + object.excludePatterns = []; + } if (options.defaults) { - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.message = ""; - object.updateTime = null; - object.endpoint = ""; + object.enabled = false; + object.csvOptions = null; + object.jsonOptions = null; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.includePatterns && message.includePatterns.length) { + object.includePatterns = []; + for (var j = 0; j < message.includePatterns.length; ++j) + object.includePatterns[j] = message.includePatterns[j]; + } + if (message.excludePatterns && message.excludePatterns.length) { + object.excludePatterns = []; + for (var j = 0; j < message.excludePatterns.length; ++j) + object.excludePatterns[j] = message.excludePatterns[j]; + } + if (message.csvOptions != null && message.hasOwnProperty("csvOptions")) + object.csvOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.toObject(message.csvOptions, options); + if (message.jsonOptions != null && message.hasOwnProperty("jsonOptions")) + object.jsonOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.toObject(message.jsonOptions, options); + if (message.schedule != null && message.hasOwnProperty("schedule")) { + object.schedule = message.schedule; + if (options.oneofs) + object.trigger = "schedule"; } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.State[message.state] : message.state; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.endpoint != null && message.hasOwnProperty("endpoint")) - object.endpoint = message.endpoint; return object; }; /** - * Converts this MetastoreStatus to JSON. + * Converts this DiscoverySpec to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec * @instance * @returns {Object.} JSON object */ - MetastoreStatus.prototype.toJSON = function toJSON() { + DiscoverySpec.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * State enum. - * @name google.cloud.dataplex.v1.Lake.MetastoreStatus.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} NONE=1 NONE value - * @property {number} READY=2 READY value - * @property {number} UPDATING=3 UPDATING value - * @property {number} ERROR=4 ERROR value - */ - MetastoreStatus.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "NONE"] = 1; - values[valuesById[2] = "READY"] = 2; - values[valuesById[3] = "UPDATING"] = 3; - values[valuesById[4] = "ERROR"] = 4; - return values; - })(); + DiscoverySpec.CsvOptions = (function() { - return MetastoreStatus; - })(); + /** + * Properties of a CsvOptions. + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @interface ICsvOptions + * @property {number|null} [headerRows] CsvOptions headerRows + * @property {string|null} [delimiter] CsvOptions delimiter + * @property {string|null} [encoding] CsvOptions encoding + * @property {boolean|null} [disableTypeInference] CsvOptions disableTypeInference + */ - return Lake; - })(); + /** + * Constructs a new CsvOptions. + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @classdesc Represents a CsvOptions. + * @implements ICsvOptions + * @constructor + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions=} [properties] Properties to set + */ + function CsvOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - v1.AssetStatus = (function() { + /** + * CsvOptions headerRows. + * @member {number} headerRows + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @instance + */ + CsvOptions.prototype.headerRows = 0; - /** - * Properties of an AssetStatus. - * @memberof google.cloud.dataplex.v1 - * @interface IAssetStatus - * @property {google.protobuf.ITimestamp|null} [updateTime] AssetStatus updateTime - * @property {number|null} [activeAssets] AssetStatus activeAssets - * @property {number|null} [securityPolicyApplyingAssets] AssetStatus securityPolicyApplyingAssets - */ + /** + * CsvOptions delimiter. + * @member {string} delimiter + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @instance + */ + CsvOptions.prototype.delimiter = ""; - /** - * Constructs a new AssetStatus. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an AssetStatus. - * @implements IAssetStatus - * @constructor - * @param {google.cloud.dataplex.v1.IAssetStatus=} [properties] Properties to set - */ - function AssetStatus(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * CsvOptions encoding. + * @member {string} encoding + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @instance + */ + CsvOptions.prototype.encoding = ""; - /** - * AssetStatus updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.AssetStatus - * @instance - */ - AssetStatus.prototype.updateTime = null; + /** + * CsvOptions disableTypeInference. + * @member {boolean} disableTypeInference + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @instance + */ + CsvOptions.prototype.disableTypeInference = false; - /** - * AssetStatus activeAssets. - * @member {number} activeAssets - * @memberof google.cloud.dataplex.v1.AssetStatus - * @instance - */ - AssetStatus.prototype.activeAssets = 0; + /** + * Creates a new CsvOptions instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions} CsvOptions instance + */ + CsvOptions.create = function create(properties) { + return new CsvOptions(properties); + }; - /** - * AssetStatus securityPolicyApplyingAssets. - * @member {number} securityPolicyApplyingAssets - * @memberof google.cloud.dataplex.v1.AssetStatus - * @instance - */ - AssetStatus.prototype.securityPolicyApplyingAssets = 0; + /** + * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions} message CsvOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CsvOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.headerRows != null && Object.hasOwnProperty.call(message, "headerRows")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.headerRows); + if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.delimiter); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.encoding); + if (message.disableTypeInference != null && Object.hasOwnProperty.call(message, "disableTypeInference")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disableTypeInference); + return writer; + }; - /** - * Creates a new AssetStatus instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.AssetStatus - * @static - * @param {google.cloud.dataplex.v1.IAssetStatus=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.AssetStatus} AssetStatus instance - */ - AssetStatus.create = function create(properties) { - return new AssetStatus(properties); - }; + /** + * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions} message CsvOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CsvOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified AssetStatus message. Does not implicitly {@link google.cloud.dataplex.v1.AssetStatus.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.AssetStatus - * @static - * @param {google.cloud.dataplex.v1.IAssetStatus} message AssetStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AssetStatus.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.activeAssets != null && Object.hasOwnProperty.call(message, "activeAssets")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.activeAssets); - if (message.securityPolicyApplyingAssets != null && Object.hasOwnProperty.call(message, "securityPolicyApplyingAssets")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.securityPolicyApplyingAssets); - return writer; - }; + /** + * Decodes a CsvOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions} CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CsvOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.headerRows = reader.int32(); + break; + case 2: + message.delimiter = reader.string(); + break; + case 3: + message.encoding = reader.string(); + break; + case 4: + message.disableTypeInference = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified AssetStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AssetStatus.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.AssetStatus - * @static - * @param {google.cloud.dataplex.v1.IAssetStatus} message AssetStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AssetStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes a CsvOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions} CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CsvOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes an AssetStatus message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.AssetStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.AssetStatus} AssetStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AssetStatus.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.AssetStatus(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 2: - message.activeAssets = reader.int32(); - break; - case 3: - message.securityPolicyApplyingAssets = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Verifies a CsvOptions message. + * @function verify + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CsvOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.headerRows != null && message.hasOwnProperty("headerRows")) + if (!$util.isInteger(message.headerRows)) + return "headerRows: integer expected"; + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + if (!$util.isString(message.delimiter)) + return "delimiter: string expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) + if (!$util.isString(message.encoding)) + return "encoding: string expected"; + if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) + if (typeof message.disableTypeInference !== "boolean") + return "disableTypeInference: boolean expected"; + return null; + }; - /** - * Decodes an AssetStatus message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.AssetStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.AssetStatus} AssetStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AssetStatus.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AssetStatus message. - * @function verify - * @memberof google.cloud.dataplex.v1.AssetStatus - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AssetStatus.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.activeAssets != null && message.hasOwnProperty("activeAssets")) - if (!$util.isInteger(message.activeAssets)) - return "activeAssets: integer expected"; - if (message.securityPolicyApplyingAssets != null && message.hasOwnProperty("securityPolicyApplyingAssets")) - if (!$util.isInteger(message.securityPolicyApplyingAssets)) - return "securityPolicyApplyingAssets: integer expected"; - return null; - }; + /** + * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions} CsvOptions + */ + CsvOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions) + return object; + var message = new $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions(); + if (object.headerRows != null) + message.headerRows = object.headerRows | 0; + if (object.delimiter != null) + message.delimiter = String(object.delimiter); + if (object.encoding != null) + message.encoding = String(object.encoding); + if (object.disableTypeInference != null) + message.disableTypeInference = Boolean(object.disableTypeInference); + return message; + }; - /** - * Creates an AssetStatus message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.AssetStatus - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.AssetStatus} AssetStatus - */ - AssetStatus.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.AssetStatus) - return object; - var message = new $root.google.cloud.dataplex.v1.AssetStatus(); - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.AssetStatus.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.activeAssets != null) - message.activeAssets = object.activeAssets | 0; - if (object.securityPolicyApplyingAssets != null) - message.securityPolicyApplyingAssets = object.securityPolicyApplyingAssets | 0; - return message; - }; + /** + * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions} message CsvOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CsvOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.headerRows = 0; + object.delimiter = ""; + object.encoding = ""; + object.disableTypeInference = false; + } + if (message.headerRows != null && message.hasOwnProperty("headerRows")) + object.headerRows = message.headerRows; + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + object.delimiter = message.delimiter; + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = message.encoding; + if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) + object.disableTypeInference = message.disableTypeInference; + return object; + }; - /** - * Creates a plain object from an AssetStatus message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.AssetStatus - * @static - * @param {google.cloud.dataplex.v1.AssetStatus} message AssetStatus - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AssetStatus.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateTime = null; - object.activeAssets = 0; - object.securityPolicyApplyingAssets = 0; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.activeAssets != null && message.hasOwnProperty("activeAssets")) - object.activeAssets = message.activeAssets; - if (message.securityPolicyApplyingAssets != null && message.hasOwnProperty("securityPolicyApplyingAssets")) - object.securityPolicyApplyingAssets = message.securityPolicyApplyingAssets; - return object; - }; + /** + * Converts this CsvOptions to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @instance + * @returns {Object.} JSON object + */ + CsvOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this AssetStatus to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.AssetStatus - * @instance - * @returns {Object.} JSON object - */ - AssetStatus.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return CsvOptions; + })(); - return AssetStatus; - })(); + DiscoverySpec.JsonOptions = (function() { - v1.Zone = (function() { + /** + * Properties of a JsonOptions. + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @interface IJsonOptions + * @property {string|null} [encoding] JsonOptions encoding + * @property {boolean|null} [disableTypeInference] JsonOptions disableTypeInference + */ - /** - * Properties of a Zone. - * @memberof google.cloud.dataplex.v1 - * @interface IZone - * @property {string|null} [name] Zone name - * @property {string|null} [displayName] Zone displayName - * @property {string|null} [uid] Zone uid - * @property {google.protobuf.ITimestamp|null} [createTime] Zone createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Zone updateTime - * @property {Object.|null} [labels] Zone labels - * @property {string|null} [description] Zone description - * @property {google.cloud.dataplex.v1.State|null} [state] Zone state - * @property {google.cloud.dataplex.v1.Zone.Type|null} [type] Zone type - * @property {google.cloud.dataplex.v1.Zone.IDiscoverySpec|null} [discoverySpec] Zone discoverySpec - * @property {google.cloud.dataplex.v1.Zone.IResourceSpec|null} [resourceSpec] Zone resourceSpec - * @property {google.cloud.dataplex.v1.IAssetStatus|null} [assetStatus] Zone assetStatus - */ + /** + * Constructs a new JsonOptions. + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @classdesc Represents a JsonOptions. + * @implements IJsonOptions + * @constructor + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions=} [properties] Properties to set + */ + function JsonOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new Zone. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a Zone. - * @implements IZone - * @constructor - * @param {google.cloud.dataplex.v1.IZone=} [properties] Properties to set - */ - function Zone(properties) { - this.labels = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * JsonOptions encoding. + * @member {string} encoding + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @instance + */ + JsonOptions.prototype.encoding = ""; - /** - * Zone name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.Zone - * @instance - */ - Zone.prototype.name = ""; + /** + * JsonOptions disableTypeInference. + * @member {boolean} disableTypeInference + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @instance + */ + JsonOptions.prototype.disableTypeInference = false; - /** - * Zone displayName. - * @member {string} displayName - * @memberof google.cloud.dataplex.v1.Zone - * @instance - */ - Zone.prototype.displayName = ""; + /** + * Creates a new JsonOptions instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions} JsonOptions instance + */ + JsonOptions.create = function create(properties) { + return new JsonOptions(properties); + }; - /** - * Zone uid. - * @member {string} uid - * @memberof google.cloud.dataplex.v1.Zone - * @instance - */ - Zone.prototype.uid = ""; + /** + * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions} message JsonOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JsonOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.encoding); + if (message.disableTypeInference != null && Object.hasOwnProperty.call(message, "disableTypeInference")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.disableTypeInference); + return writer; + }; - /** - * Zone createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dataplex.v1.Zone - * @instance - */ - Zone.prototype.createTime = null; + /** + * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions} message JsonOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JsonOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Zone updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.Zone - * @instance - */ - Zone.prototype.updateTime = null; + /** + * Decodes a JsonOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions} JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JsonOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.encoding = reader.string(); + break; + case 2: + message.disableTypeInference = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Zone labels. - * @member {Object.} labels - * @memberof google.cloud.dataplex.v1.Zone - * @instance - */ - Zone.prototype.labels = $util.emptyObject; + /** + * Decodes a JsonOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions} JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JsonOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Zone description. - * @member {string} description - * @memberof google.cloud.dataplex.v1.Zone - * @instance - */ - Zone.prototype.description = ""; + /** + * Verifies a JsonOptions message. + * @function verify + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JsonOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) + if (!$util.isString(message.encoding)) + return "encoding: string expected"; + if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) + if (typeof message.disableTypeInference !== "boolean") + return "disableTypeInference: boolean expected"; + return null; + }; - /** - * Zone state. - * @member {google.cloud.dataplex.v1.State} state - * @memberof google.cloud.dataplex.v1.Zone - * @instance - */ - Zone.prototype.state = 0; + /** + * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions} JsonOptions + */ + JsonOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions) + return object; + var message = new $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions(); + if (object.encoding != null) + message.encoding = String(object.encoding); + if (object.disableTypeInference != null) + message.disableTypeInference = Boolean(object.disableTypeInference); + return message; + }; - /** - * Zone type. - * @member {google.cloud.dataplex.v1.Zone.Type} type - * @memberof google.cloud.dataplex.v1.Zone - * @instance - */ - Zone.prototype.type = 0; + /** + * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions} message JsonOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JsonOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.encoding = ""; + object.disableTypeInference = false; + } + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = message.encoding; + if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) + object.disableTypeInference = message.disableTypeInference; + return object; + }; - /** - * Zone discoverySpec. - * @member {google.cloud.dataplex.v1.Zone.IDiscoverySpec|null|undefined} discoverySpec - * @memberof google.cloud.dataplex.v1.Zone - * @instance - */ - Zone.prototype.discoverySpec = null; + /** + * Converts this JsonOptions to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @instance + * @returns {Object.} JSON object + */ + JsonOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Zone resourceSpec. - * @member {google.cloud.dataplex.v1.Zone.IResourceSpec|null|undefined} resourceSpec - * @memberof google.cloud.dataplex.v1.Zone - * @instance - */ - Zone.prototype.resourceSpec = null; + return JsonOptions; + })(); - /** - * Zone assetStatus. - * @member {google.cloud.dataplex.v1.IAssetStatus|null|undefined} assetStatus - * @memberof google.cloud.dataplex.v1.Zone - * @instance - */ - Zone.prototype.assetStatus = null; + return DiscoverySpec; + })(); - /** - * Creates a new Zone instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Zone - * @static - * @param {google.cloud.dataplex.v1.IZone=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Zone} Zone instance - */ - Zone.create = function create(properties) { - return new Zone(properties); - }; + Asset.ResourceSpec = (function() { - /** - * Encodes the specified Zone message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Zone - * @static - * @param {google.cloud.dataplex.v1.IZone} message Zone message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Zone.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.uid); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.description); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.type); - if (message.discoverySpec != null && Object.hasOwnProperty.call(message, "discoverySpec")) - $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.encode(message.discoverySpec, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); - if (message.resourceSpec != null && Object.hasOwnProperty.call(message, "resourceSpec")) - $root.google.cloud.dataplex.v1.Zone.ResourceSpec.encode(message.resourceSpec, writer.uint32(/* id 104, wireType 2 =*/834).fork()).ldelim(); - if (message.assetStatus != null && Object.hasOwnProperty.call(message, "assetStatus")) - $root.google.cloud.dataplex.v1.AssetStatus.encode(message.assetStatus, writer.uint32(/* id 105, wireType 2 =*/842).fork()).ldelim(); - return writer; - }; + /** + * Properties of a ResourceSpec. + * @memberof google.cloud.dataplex.v1.Asset + * @interface IResourceSpec + * @property {string|null} [name] ResourceSpec name + * @property {google.cloud.dataplex.v1.Asset.ResourceSpec.Type|null} [type] ResourceSpec type + */ - /** - * Encodes the specified Zone message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Zone - * @static - * @param {google.cloud.dataplex.v1.IZone} message Zone message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Zone.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Constructs a new ResourceSpec. + * @memberof google.cloud.dataplex.v1.Asset + * @classdesc Represents a ResourceSpec. + * @implements IResourceSpec + * @constructor + * @param {google.cloud.dataplex.v1.Asset.IResourceSpec=} [properties] Properties to set + */ + function ResourceSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Decodes a Zone message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Zone - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Zone} Zone - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Zone.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Zone(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.displayName = reader.string(); - break; - case 3: - message.uid = reader.string(); - break; - case 4: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 5: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } + /** + * ResourceSpec name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @instance + */ + ResourceSpec.prototype.name = ""; + + /** + * ResourceSpec type. + * @member {google.cloud.dataplex.v1.Asset.ResourceSpec.Type} type + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @instance + */ + ResourceSpec.prototype.type = 0; + + /** + * Creates a new ResourceSpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @static + * @param {google.cloud.dataplex.v1.Asset.IResourceSpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Asset.ResourceSpec} ResourceSpec instance + */ + ResourceSpec.create = function create(properties) { + return new ResourceSpec(properties); + }; + + /** + * Encodes the specified ResourceSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @static + * @param {google.cloud.dataplex.v1.Asset.IResourceSpec} message ResourceSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + return writer; + }; + + /** + * Encodes the specified ResourceSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @static + * @param {google.cloud.dataplex.v1.Asset.IResourceSpec} message ResourceSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Asset.ResourceSpec} ResourceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.ResourceSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.type = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; } - message.labels[key] = value; - break; - case 7: - message.description = reader.string(); - break; - case 8: - message.state = reader.int32(); - break; - case 9: - message.type = reader.int32(); - break; - case 103: - message.discoverySpec = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.decode(reader, reader.uint32()); - break; - case 104: - message.resourceSpec = $root.google.cloud.dataplex.v1.Zone.ResourceSpec.decode(reader, reader.uint32()); - break; - case 105: - message.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a Zone message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Zone - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Zone} Zone - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Zone.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a ResourceSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Asset.ResourceSpec} ResourceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a Zone message. - * @function verify - * @memberof google.cloud.dataplex.v1.Zone - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Zone.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; + /** + * Verifies a ResourceSpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a ResourceSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Asset.ResourceSpec} ResourceSpec + */ + ResourceSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Asset.ResourceSpec) + return object; + var message = new $root.google.cloud.dataplex.v1.Asset.ResourceSpec(); + if (object.name != null) + message.name = String(object.name); + switch (object.type) { + case "TYPE_UNSPECIFIED": case 0: - case 1: - case 2: - case 3: - case 4: + message.type = 0; break; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: + case "STORAGE_BUCKET": case 1: + message.type = 1; + break; + case "BIGQUERY_DATASET": case 2: + message.type = 2; break; } - if (message.discoverySpec != null && message.hasOwnProperty("discoverySpec")) { - var error = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.verify(message.discoverySpec); - if (error) - return "discoverySpec." + error; - } - if (message.resourceSpec != null && message.hasOwnProperty("resourceSpec")) { - var error = $root.google.cloud.dataplex.v1.Zone.ResourceSpec.verify(message.resourceSpec); - if (error) - return "resourceSpec." + error; - } - if (message.assetStatus != null && message.hasOwnProperty("assetStatus")) { - var error = $root.google.cloud.dataplex.v1.AssetStatus.verify(message.assetStatus); - if (error) - return "assetStatus." + error; - } - return null; - }; + return message; + }; - /** - * Creates a Zone message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Zone - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Zone} Zone - */ - Zone.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Zone) + /** + * Creates a plain object from a ResourceSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @static + * @param {google.cloud.dataplex.v1.Asset.ResourceSpec} message ResourceSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Asset.ResourceSpec.Type[message.type] : message.type; return object; - var message = new $root.google.cloud.dataplex.v1.Zone(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uid != null) - message.uid = String(object.uid); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Zone.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Zone.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.dataplex.v1.Zone.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - if (object.description != null) - message.description = String(object.description); - switch (object.state) { - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "ACTIVE": - case 1: - message.state = 1; - break; - case "CREATING": - case 2: - message.state = 2; - break; - case "DELETING": - case 3: - message.state = 3; - break; - case "ACTION_REQUIRED": - case 4: - message.state = 4; - break; - } - switch (object.type) { - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "RAW": - case 1: - message.type = 1; - break; - case "CURATED": - case 2: - message.type = 2; - break; - } - if (object.discoverySpec != null) { - if (typeof object.discoverySpec !== "object") - throw TypeError(".google.cloud.dataplex.v1.Zone.discoverySpec: object expected"); - message.discoverySpec = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.fromObject(object.discoverySpec); - } - if (object.resourceSpec != null) { - if (typeof object.resourceSpec !== "object") - throw TypeError(".google.cloud.dataplex.v1.Zone.resourceSpec: object expected"); - message.resourceSpec = $root.google.cloud.dataplex.v1.Zone.ResourceSpec.fromObject(object.resourceSpec); - } - if (object.assetStatus != null) { - if (typeof object.assetStatus !== "object") - throw TypeError(".google.cloud.dataplex.v1.Zone.assetStatus: object expected"); - message.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.fromObject(object.assetStatus); - } - return message; - }; + }; - /** - * Creates a plain object from a Zone message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Zone - * @static - * @param {google.cloud.dataplex.v1.Zone} message Zone - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Zone.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.uid = ""; - object.createTime = null; - object.updateTime = null; - object.description = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.discoverySpec = null; - object.resourceSpec = null; - object.assetStatus = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataplex.v1.State[message.state] : message.state; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Zone.Type[message.type] : message.type; - if (message.discoverySpec != null && message.hasOwnProperty("discoverySpec")) - object.discoverySpec = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.toObject(message.discoverySpec, options); - if (message.resourceSpec != null && message.hasOwnProperty("resourceSpec")) - object.resourceSpec = $root.google.cloud.dataplex.v1.Zone.ResourceSpec.toObject(message.resourceSpec, options); - if (message.assetStatus != null && message.hasOwnProperty("assetStatus")) - object.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.toObject(message.assetStatus, options); - return object; - }; + /** + * Converts this ResourceSpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @instance + * @returns {Object.} JSON object + */ + ResourceSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this Zone to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Zone - * @instance - * @returns {Object.} JSON object - */ - Zone.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Type enum. + * @name google.cloud.dataplex.v1.Asset.ResourceSpec.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} STORAGE_BUCKET=1 STORAGE_BUCKET value + * @property {number} BIGQUERY_DATASET=2 BIGQUERY_DATASET value + */ + ResourceSpec.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "STORAGE_BUCKET"] = 1; + values[valuesById[2] = "BIGQUERY_DATASET"] = 2; + return values; + })(); - /** - * Type enum. - * @name google.cloud.dataplex.v1.Zone.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} RAW=1 RAW value - * @property {number} CURATED=2 CURATED value - */ - Zone.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "RAW"] = 1; - values[valuesById[2] = "CURATED"] = 2; - return values; + return ResourceSpec; })(); - Zone.ResourceSpec = (function() { + Asset.ResourceStatus = (function() { /** - * Properties of a ResourceSpec. - * @memberof google.cloud.dataplex.v1.Zone - * @interface IResourceSpec - * @property {google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType|null} [locationType] ResourceSpec locationType + * Properties of a ResourceStatus. + * @memberof google.cloud.dataplex.v1.Asset + * @interface IResourceStatus + * @property {google.cloud.dataplex.v1.Asset.ResourceStatus.State|null} [state] ResourceStatus state + * @property {string|null} [message] ResourceStatus message + * @property {google.protobuf.ITimestamp|null} [updateTime] ResourceStatus updateTime */ /** - * Constructs a new ResourceSpec. - * @memberof google.cloud.dataplex.v1.Zone - * @classdesc Represents a ResourceSpec. - * @implements IResourceSpec + * Constructs a new ResourceStatus. + * @memberof google.cloud.dataplex.v1.Asset + * @classdesc Represents a ResourceStatus. + * @implements IResourceStatus * @constructor - * @param {google.cloud.dataplex.v1.Zone.IResourceSpec=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.Asset.IResourceStatus=} [properties] Properties to set */ - function ResourceSpec(properties) { + function ResourceStatus(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9417,75 +10290,101 @@ } /** - * ResourceSpec locationType. - * @member {google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType} locationType - * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * ResourceStatus state. + * @member {google.cloud.dataplex.v1.Asset.ResourceStatus.State} state + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus * @instance */ - ResourceSpec.prototype.locationType = 0; + ResourceStatus.prototype.state = 0; /** - * Creates a new ResourceSpec instance using the specified properties. + * ResourceStatus message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @instance + */ + ResourceStatus.prototype.message = ""; + + /** + * ResourceStatus updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @instance + */ + ResourceStatus.prototype.updateTime = null; + + /** + * Creates a new ResourceStatus instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus * @static - * @param {google.cloud.dataplex.v1.Zone.IResourceSpec=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Zone.ResourceSpec} ResourceSpec instance + * @param {google.cloud.dataplex.v1.Asset.IResourceStatus=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Asset.ResourceStatus} ResourceStatus instance */ - ResourceSpec.create = function create(properties) { - return new ResourceSpec(properties); + ResourceStatus.create = function create(properties) { + return new ResourceStatus(properties); }; /** - * Encodes the specified ResourceSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.ResourceSpec.verify|verify} messages. + * Encodes the specified ResourceStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceStatus.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus * @static - * @param {google.cloud.dataplex.v1.Zone.IResourceSpec} message ResourceSpec message or plain object to encode + * @param {google.cloud.dataplex.v1.Asset.IResourceStatus} message ResourceStatus message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceSpec.encode = function encode(message, writer) { + ResourceStatus.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.locationType != null && Object.hasOwnProperty.call(message, "locationType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.locationType); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ResourceSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.ResourceSpec.verify|verify} messages. + * Encodes the specified ResourceStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceStatus.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus * @static - * @param {google.cloud.dataplex.v1.Zone.IResourceSpec} message ResourceSpec message or plain object to encode + * @param {google.cloud.dataplex.v1.Asset.IResourceStatus} message ResourceStatus message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceSpec.encodeDelimited = function encodeDelimited(message, writer) { + ResourceStatus.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceSpec message from the specified reader or buffer. + * Decodes a ResourceStatus message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Zone.ResourceSpec} ResourceSpec + * @returns {google.cloud.dataplex.v1.Asset.ResourceStatus} ResourceStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceSpec.decode = function decode(reader, length) { + ResourceStatus.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Zone.ResourceSpec(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.ResourceStatus(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.locationType = reader.int32(); + message.state = reader.int32(); + break; + case 2: + message.message = reader.string(); + break; + case 3: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -9496,148 +10395,168 @@ }; /** - * Decodes a ResourceSpec message from the specified reader or buffer, length delimited. + * Decodes a ResourceStatus message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Zone.ResourceSpec} ResourceSpec + * @returns {google.cloud.dataplex.v1.Asset.ResourceStatus} ResourceStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceSpec.decodeDelimited = function decodeDelimited(reader) { + ResourceStatus.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceSpec message. + * Verifies a ResourceStatus message. * @function verify - * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResourceSpec.verify = function verify(message) { + ResourceStatus.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.locationType != null && message.hasOwnProperty("locationType")) - switch (message.locationType) { + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { default: - return "locationType: enum value expected"; + return "state: enum value expected"; case 0: case 1: case 2: break; } + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } return null; }; /** - * Creates a ResourceSpec message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceStatus message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Zone.ResourceSpec} ResourceSpec + * @returns {google.cloud.dataplex.v1.Asset.ResourceStatus} ResourceStatus */ - ResourceSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Zone.ResourceSpec) + ResourceStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Asset.ResourceStatus) return object; - var message = new $root.google.cloud.dataplex.v1.Zone.ResourceSpec(); - switch (object.locationType) { - case "LOCATION_TYPE_UNSPECIFIED": + var message = new $root.google.cloud.dataplex.v1.Asset.ResourceStatus(); + switch (object.state) { + case "STATE_UNSPECIFIED": case 0: - message.locationType = 0; + message.state = 0; break; - case "SINGLE_REGION": + case "READY": case 1: - message.locationType = 1; + message.state = 1; break; - case "MULTI_REGION": + case "ERROR": case 2: - message.locationType = 2; + message.state = 2; break; } + if (object.message != null) + message.message = String(object.message); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.ResourceStatus.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } return message; }; /** - * Creates a plain object from a ResourceSpec message. Also converts values to other types if specified. + * Creates a plain object from a ResourceStatus message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus * @static - * @param {google.cloud.dataplex.v1.Zone.ResourceSpec} message ResourceSpec + * @param {google.cloud.dataplex.v1.Asset.ResourceStatus} message ResourceStatus * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceSpec.toObject = function toObject(message, options) { + ResourceStatus.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.locationType = options.enums === String ? "LOCATION_TYPE_UNSPECIFIED" : 0; - if (message.locationType != null && message.hasOwnProperty("locationType")) - object.locationType = options.enums === String ? $root.google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType[message.locationType] : message.locationType; + if (options.defaults) { + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.message = ""; + object.updateTime = null; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Asset.ResourceStatus.State[message.state] : message.state; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); return object; }; /** - * Converts this ResourceSpec to JSON. + * Converts this ResourceStatus to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus * @instance * @returns {Object.} JSON object */ - ResourceSpec.prototype.toJSON = function toJSON() { + ResourceStatus.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * LocationType enum. - * @name google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType + * State enum. + * @name google.cloud.dataplex.v1.Asset.ResourceStatus.State * @enum {number} - * @property {number} LOCATION_TYPE_UNSPECIFIED=0 LOCATION_TYPE_UNSPECIFIED value - * @property {number} SINGLE_REGION=1 SINGLE_REGION value - * @property {number} MULTI_REGION=2 MULTI_REGION value + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} READY=1 READY value + * @property {number} ERROR=2 ERROR value */ - ResourceSpec.LocationType = (function() { + ResourceStatus.State = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LOCATION_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SINGLE_REGION"] = 1; - values[valuesById[2] = "MULTI_REGION"] = 2; + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "READY"] = 1; + values[valuesById[2] = "ERROR"] = 2; return values; })(); - return ResourceSpec; + return ResourceStatus; })(); - Zone.DiscoverySpec = (function() { + Asset.DiscoveryStatus = (function() { /** - * Properties of a DiscoverySpec. - * @memberof google.cloud.dataplex.v1.Zone - * @interface IDiscoverySpec - * @property {boolean|null} [enabled] DiscoverySpec enabled - * @property {Array.|null} [includePatterns] DiscoverySpec includePatterns - * @property {Array.|null} [excludePatterns] DiscoverySpec excludePatterns - * @property {google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions|null} [csvOptions] DiscoverySpec csvOptions - * @property {google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions|null} [jsonOptions] DiscoverySpec jsonOptions - * @property {string|null} [schedule] DiscoverySpec schedule + * Properties of a DiscoveryStatus. + * @memberof google.cloud.dataplex.v1.Asset + * @interface IDiscoveryStatus + * @property {google.cloud.dataplex.v1.Asset.DiscoveryStatus.State|null} [state] DiscoveryStatus state + * @property {string|null} [message] DiscoveryStatus message + * @property {google.protobuf.ITimestamp|null} [updateTime] DiscoveryStatus updateTime + * @property {google.protobuf.ITimestamp|null} [lastRunTime] DiscoveryStatus lastRunTime + * @property {google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats|null} [stats] DiscoveryStatus stats + * @property {google.protobuf.IDuration|null} [lastRunDuration] DiscoveryStatus lastRunDuration */ /** - * Constructs a new DiscoverySpec. - * @memberof google.cloud.dataplex.v1.Zone - * @classdesc Represents a DiscoverySpec. - * @implements IDiscoverySpec + * Constructs a new DiscoveryStatus. + * @memberof google.cloud.dataplex.v1.Asset + * @classdesc Represents a DiscoveryStatus. + * @implements IDiscoveryStatus * @constructor - * @param {google.cloud.dataplex.v1.Zone.IDiscoverySpec=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.Asset.IDiscoveryStatus=} [properties] Properties to set */ - function DiscoverySpec(properties) { - this.includePatterns = []; - this.excludePatterns = []; + function DiscoveryStatus(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9645,160 +10564,140 @@ } /** - * DiscoverySpec enabled. - * @member {boolean} enabled - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec - * @instance - */ - DiscoverySpec.prototype.enabled = false; - - /** - * DiscoverySpec includePatterns. - * @member {Array.} includePatterns - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * DiscoveryStatus state. + * @member {google.cloud.dataplex.v1.Asset.DiscoveryStatus.State} state + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus * @instance */ - DiscoverySpec.prototype.includePatterns = $util.emptyArray; + DiscoveryStatus.prototype.state = 0; /** - * DiscoverySpec excludePatterns. - * @member {Array.} excludePatterns - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * DiscoveryStatus message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus * @instance */ - DiscoverySpec.prototype.excludePatterns = $util.emptyArray; + DiscoveryStatus.prototype.message = ""; /** - * DiscoverySpec csvOptions. - * @member {google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions|null|undefined} csvOptions - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * DiscoveryStatus updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus * @instance */ - DiscoverySpec.prototype.csvOptions = null; + DiscoveryStatus.prototype.updateTime = null; /** - * DiscoverySpec jsonOptions. - * @member {google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions|null|undefined} jsonOptions - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * DiscoveryStatus lastRunTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastRunTime + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus * @instance */ - DiscoverySpec.prototype.jsonOptions = null; + DiscoveryStatus.prototype.lastRunTime = null; /** - * DiscoverySpec schedule. - * @member {string|null|undefined} schedule - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * DiscoveryStatus stats. + * @member {google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats|null|undefined} stats + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus * @instance */ - DiscoverySpec.prototype.schedule = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + DiscoveryStatus.prototype.stats = null; /** - * DiscoverySpec trigger. - * @member {"schedule"|undefined} trigger - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * DiscoveryStatus lastRunDuration. + * @member {google.protobuf.IDuration|null|undefined} lastRunDuration + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus * @instance */ - Object.defineProperty(DiscoverySpec.prototype, "trigger", { - get: $util.oneOfGetter($oneOfFields = ["schedule"]), - set: $util.oneOfSetter($oneOfFields) - }); + DiscoveryStatus.prototype.lastRunDuration = null; /** - * Creates a new DiscoverySpec instance using the specified properties. + * Creates a new DiscoveryStatus instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus * @static - * @param {google.cloud.dataplex.v1.Zone.IDiscoverySpec=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec} DiscoverySpec instance + * @param {google.cloud.dataplex.v1.Asset.IDiscoveryStatus=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus} DiscoveryStatus instance */ - DiscoverySpec.create = function create(properties) { - return new DiscoverySpec(properties); + DiscoveryStatus.create = function create(properties) { + return new DiscoveryStatus(properties); }; /** - * Encodes the specified DiscoverySpec message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.verify|verify} messages. + * Encodes the specified DiscoveryStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus * @static - * @param {google.cloud.dataplex.v1.Zone.IDiscoverySpec} message DiscoverySpec message or plain object to encode + * @param {google.cloud.dataplex.v1.Asset.IDiscoveryStatus} message DiscoveryStatus message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoverySpec.encode = function encode(message, writer) { + DiscoveryStatus.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - if (message.includePatterns != null && message.includePatterns.length) - for (var i = 0; i < message.includePatterns.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.includePatterns[i]); - if (message.excludePatterns != null && message.excludePatterns.length) - for (var i = 0; i < message.excludePatterns.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.excludePatterns[i]); - if (message.csvOptions != null && Object.hasOwnProperty.call(message, "csvOptions")) - $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.encode(message.csvOptions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.jsonOptions != null && Object.hasOwnProperty.call(message, "jsonOptions")) - $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.encode(message.jsonOptions, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.schedule != null && Object.hasOwnProperty.call(message, "schedule")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.schedule); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.lastRunTime != null && Object.hasOwnProperty.call(message, "lastRunTime")) + $root.google.protobuf.Timestamp.encode(message.lastRunTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.stats != null && Object.hasOwnProperty.call(message, "stats")) + $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.encode(message.stats, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.lastRunDuration != null && Object.hasOwnProperty.call(message, "lastRunDuration")) + $root.google.protobuf.Duration.encode(message.lastRunDuration, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; /** - * Encodes the specified DiscoverySpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.verify|verify} messages. + * Encodes the specified DiscoveryStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus * @static - * @param {google.cloud.dataplex.v1.Zone.IDiscoverySpec} message DiscoverySpec message or plain object to encode + * @param {google.cloud.dataplex.v1.Asset.IDiscoveryStatus} message DiscoveryStatus message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoverySpec.encodeDelimited = function encodeDelimited(message, writer) { + DiscoveryStatus.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DiscoverySpec message from the specified reader or buffer. + * Decodes a DiscoveryStatus message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec} DiscoverySpec + * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus} DiscoveryStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoverySpec.decode = function decode(reader, length) { + DiscoveryStatus.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Zone.DiscoverySpec(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.enabled = reader.bool(); + message.state = reader.int32(); break; case 2: - if (!(message.includePatterns && message.includePatterns.length)) - message.includePatterns = []; - message.includePatterns.push(reader.string()); + message.message = reader.string(); break; case 3: - if (!(message.excludePatterns && message.excludePatterns.length)) - message.excludePatterns = []; - message.excludePatterns.push(reader.string()); + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; case 4: - message.csvOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.decode(reader, reader.uint32()); + message.lastRunTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; - case 5: - message.jsonOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.decode(reader, reader.uint32()); + case 6: + message.stats = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.decode(reader, reader.uint32()); break; - case 10: - message.schedule = reader.string(); + case 7: + message.lastRunDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -9809,189 +10708,216 @@ }; /** - * Decodes a DiscoverySpec message from the specified reader or buffer, length delimited. + * Decodes a DiscoveryStatus message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec} DiscoverySpec + * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus} DiscoveryStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoverySpec.decodeDelimited = function decodeDelimited(reader) { + DiscoveryStatus.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DiscoverySpec message. + * Verifies a DiscoveryStatus message. * @function verify - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DiscoverySpec.verify = function verify(message) { + DiscoveryStatus.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - if (message.includePatterns != null && message.hasOwnProperty("includePatterns")) { - if (!Array.isArray(message.includePatterns)) - return "includePatterns: array expected"; - for (var i = 0; i < message.includePatterns.length; ++i) - if (!$util.isString(message.includePatterns[i])) - return "includePatterns: string[] expected"; - } - if (message.excludePatterns != null && message.hasOwnProperty("excludePatterns")) { - if (!Array.isArray(message.excludePatterns)) - return "excludePatterns: array expected"; - for (var i = 0; i < message.excludePatterns.length; ++i) - if (!$util.isString(message.excludePatterns[i])) - return "excludePatterns: string[] expected"; - } - if (message.csvOptions != null && message.hasOwnProperty("csvOptions")) { - var error = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.verify(message.csvOptions); + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 5: + break; + } + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); if (error) - return "csvOptions." + error; + return "updateTime." + error; } - if (message.jsonOptions != null && message.hasOwnProperty("jsonOptions")) { - var error = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.verify(message.jsonOptions); + if (message.lastRunTime != null && message.hasOwnProperty("lastRunTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastRunTime); if (error) - return "jsonOptions." + error; + return "lastRunTime." + error; } - if (message.schedule != null && message.hasOwnProperty("schedule")) { - properties.trigger = 1; - if (!$util.isString(message.schedule)) - return "schedule: string expected"; + if (message.stats != null && message.hasOwnProperty("stats")) { + var error = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.verify(message.stats); + if (error) + return "stats." + error; + } + if (message.lastRunDuration != null && message.hasOwnProperty("lastRunDuration")) { + var error = $root.google.protobuf.Duration.verify(message.lastRunDuration); + if (error) + return "lastRunDuration." + error; } return null; }; /** - * Creates a DiscoverySpec message from a plain object. Also converts values to their respective internal types. + * Creates a DiscoveryStatus message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec} DiscoverySpec + * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus} DiscoveryStatus */ - DiscoverySpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Zone.DiscoverySpec) + DiscoveryStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus) return object; - var message = new $root.google.cloud.dataplex.v1.Zone.DiscoverySpec(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - if (object.includePatterns) { - if (!Array.isArray(object.includePatterns)) - throw TypeError(".google.cloud.dataplex.v1.Zone.DiscoverySpec.includePatterns: array expected"); - message.includePatterns = []; - for (var i = 0; i < object.includePatterns.length; ++i) - message.includePatterns[i] = String(object.includePatterns[i]); + var message = new $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus(); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "SCHEDULED": + case 1: + message.state = 1; + break; + case "IN_PROGRESS": + case 2: + message.state = 2; + break; + case "PAUSED": + case 3: + message.state = 3; + break; + case "DISABLED": + case 5: + message.state = 5; + break; } - if (object.excludePatterns) { - if (!Array.isArray(object.excludePatterns)) - throw TypeError(".google.cloud.dataplex.v1.Zone.DiscoverySpec.excludePatterns: array expected"); - message.excludePatterns = []; - for (var i = 0; i < object.excludePatterns.length; ++i) - message.excludePatterns[i] = String(object.excludePatterns[i]); + if (object.message != null) + message.message = String(object.message); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoveryStatus.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } - if (object.csvOptions != null) { - if (typeof object.csvOptions !== "object") - throw TypeError(".google.cloud.dataplex.v1.Zone.DiscoverySpec.csvOptions: object expected"); - message.csvOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.fromObject(object.csvOptions); + if (object.lastRunTime != null) { + if (typeof object.lastRunTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoveryStatus.lastRunTime: object expected"); + message.lastRunTime = $root.google.protobuf.Timestamp.fromObject(object.lastRunTime); } - if (object.jsonOptions != null) { - if (typeof object.jsonOptions !== "object") - throw TypeError(".google.cloud.dataplex.v1.Zone.DiscoverySpec.jsonOptions: object expected"); - message.jsonOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.fromObject(object.jsonOptions); + if (object.stats != null) { + if (typeof object.stats !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoveryStatus.stats: object expected"); + message.stats = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.fromObject(object.stats); + } + if (object.lastRunDuration != null) { + if (typeof object.lastRunDuration !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoveryStatus.lastRunDuration: object expected"); + message.lastRunDuration = $root.google.protobuf.Duration.fromObject(object.lastRunDuration); } - if (object.schedule != null) - message.schedule = String(object.schedule); return message; }; /** - * Creates a plain object from a DiscoverySpec message. Also converts values to other types if specified. + * Creates a plain object from a DiscoveryStatus message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus * @static - * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec} message DiscoverySpec + * @param {google.cloud.dataplex.v1.Asset.DiscoveryStatus} message DiscoveryStatus * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DiscoverySpec.toObject = function toObject(message, options) { + DiscoveryStatus.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.includePatterns = []; - object.excludePatterns = []; - } if (options.defaults) { - object.enabled = false; - object.csvOptions = null; - object.jsonOptions = null; - } - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - if (message.includePatterns && message.includePatterns.length) { - object.includePatterns = []; - for (var j = 0; j < message.includePatterns.length; ++j) - object.includePatterns[j] = message.includePatterns[j]; - } - if (message.excludePatterns && message.excludePatterns.length) { - object.excludePatterns = []; - for (var j = 0; j < message.excludePatterns.length; ++j) - object.excludePatterns[j] = message.excludePatterns[j]; - } - if (message.csvOptions != null && message.hasOwnProperty("csvOptions")) - object.csvOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.toObject(message.csvOptions, options); - if (message.jsonOptions != null && message.hasOwnProperty("jsonOptions")) - object.jsonOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.toObject(message.jsonOptions, options); - if (message.schedule != null && message.hasOwnProperty("schedule")) { - object.schedule = message.schedule; - if (options.oneofs) - object.trigger = "schedule"; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.message = ""; + object.updateTime = null; + object.lastRunTime = null; + object.stats = null; + object.lastRunDuration = null; } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.State[message.state] : message.state; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.lastRunTime != null && message.hasOwnProperty("lastRunTime")) + object.lastRunTime = $root.google.protobuf.Timestamp.toObject(message.lastRunTime, options); + if (message.stats != null && message.hasOwnProperty("stats")) + object.stats = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.toObject(message.stats, options); + if (message.lastRunDuration != null && message.hasOwnProperty("lastRunDuration")) + object.lastRunDuration = $root.google.protobuf.Duration.toObject(message.lastRunDuration, options); return object; }; /** - * Converts this DiscoverySpec to JSON. + * Converts this DiscoveryStatus to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus * @instance * @returns {Object.} JSON object */ - DiscoverySpec.prototype.toJSON = function toJSON() { + DiscoveryStatus.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - DiscoverySpec.CsvOptions = (function() { + /** + * State enum. + * @name google.cloud.dataplex.v1.Asset.DiscoveryStatus.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} SCHEDULED=1 SCHEDULED value + * @property {number} IN_PROGRESS=2 IN_PROGRESS value + * @property {number} PAUSED=3 PAUSED value + * @property {number} DISABLED=5 DISABLED value + */ + DiscoveryStatus.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SCHEDULED"] = 1; + values[valuesById[2] = "IN_PROGRESS"] = 2; + values[valuesById[3] = "PAUSED"] = 3; + values[valuesById[5] = "DISABLED"] = 5; + return values; + })(); + + DiscoveryStatus.Stats = (function() { /** - * Properties of a CsvOptions. - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec - * @interface ICsvOptions - * @property {number|null} [headerRows] CsvOptions headerRows - * @property {string|null} [delimiter] CsvOptions delimiter - * @property {string|null} [encoding] CsvOptions encoding - * @property {boolean|null} [disableTypeInference] CsvOptions disableTypeInference + * Properties of a Stats. + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @interface IStats + * @property {number|Long|null} [dataItems] Stats dataItems + * @property {number|Long|null} [dataSize] Stats dataSize + * @property {number|Long|null} [tables] Stats tables + * @property {number|Long|null} [filesets] Stats filesets */ /** - * Constructs a new CsvOptions. - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec - * @classdesc Represents a CsvOptions. - * @implements ICsvOptions + * Constructs a new Stats. + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @classdesc Represents a Stats. + * @implements IStats * @constructor - * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats=} [properties] Properties to set */ - function CsvOptions(properties) { + function Stats(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9999,114 +10925,114 @@ } /** - * CsvOptions headerRows. - * @member {number} headerRows - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * Stats dataItems. + * @member {number|Long} dataItems + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats * @instance */ - CsvOptions.prototype.headerRows = 0; + Stats.prototype.dataItems = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * CsvOptions delimiter. - * @member {string} delimiter - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * Stats dataSize. + * @member {number|Long} dataSize + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats * @instance */ - CsvOptions.prototype.delimiter = ""; + Stats.prototype.dataSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * CsvOptions encoding. - * @member {string} encoding - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * Stats tables. + * @member {number|Long} tables + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats * @instance */ - CsvOptions.prototype.encoding = ""; + Stats.prototype.tables = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * CsvOptions disableTypeInference. - * @member {boolean} disableTypeInference - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * Stats filesets. + * @member {number|Long} filesets + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats * @instance */ - CsvOptions.prototype.disableTypeInference = false; + Stats.prototype.filesets = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new CsvOptions instance using the specified properties. + * Creates a new Stats instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats * @static - * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions} CsvOptions instance + * @param {google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats} Stats instance */ - CsvOptions.create = function create(properties) { - return new CsvOptions(properties); + Stats.create = function create(properties) { + return new Stats(properties); }; /** - * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.verify|verify} messages. + * Encodes the specified Stats message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats * @static - * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions} message CsvOptions message or plain object to encode + * @param {google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats} message Stats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CsvOptions.encode = function encode(message, writer) { + Stats.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.headerRows != null && Object.hasOwnProperty.call(message, "headerRows")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.headerRows); - if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.delimiter); - if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.encoding); - if (message.disableTypeInference != null && Object.hasOwnProperty.call(message, "disableTypeInference")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disableTypeInference); + if (message.dataItems != null && Object.hasOwnProperty.call(message, "dataItems")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.dataItems); + if (message.dataSize != null && Object.hasOwnProperty.call(message, "dataSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.dataSize); + if (message.tables != null && Object.hasOwnProperty.call(message, "tables")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.tables); + if (message.filesets != null && Object.hasOwnProperty.call(message, "filesets")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.filesets); return writer; }; /** - * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.verify|verify} messages. + * Encodes the specified Stats message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats * @static - * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions} message CsvOptions message or plain object to encode + * @param {google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats} message Stats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CsvOptions.encodeDelimited = function encodeDelimited(message, writer) { + Stats.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CsvOptions message from the specified reader or buffer. + * Decodes a Stats message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions} CsvOptions + * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats} Stats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CsvOptions.decode = function decode(reader, length) { + Stats.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.headerRows = reader.int32(); + message.dataItems = reader.int64(); break; case 2: - message.delimiter = reader.string(); + message.dataSize = reader.int64(); break; case 3: - message.encoding = reader.string(); + message.tables = reader.int64(); break; case 4: - message.disableTypeInference = reader.bool(); + message.filesets = reader.int64(); break; default: reader.skipType(tag & 7); @@ -10117,652 +11043,518 @@ }; /** - * Decodes a CsvOptions message from the specified reader or buffer, length delimited. + * Decodes a Stats message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions} CsvOptions + * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats} Stats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CsvOptions.decodeDelimited = function decodeDelimited(reader) { + Stats.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CsvOptions message. + * Verifies a Stats message. * @function verify - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CsvOptions.verify = function verify(message) { + Stats.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.headerRows != null && message.hasOwnProperty("headerRows")) - if (!$util.isInteger(message.headerRows)) - return "headerRows: integer expected"; - if (message.delimiter != null && message.hasOwnProperty("delimiter")) - if (!$util.isString(message.delimiter)) - return "delimiter: string expected"; - if (message.encoding != null && message.hasOwnProperty("encoding")) - if (!$util.isString(message.encoding)) - return "encoding: string expected"; - if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) - if (typeof message.disableTypeInference !== "boolean") - return "disableTypeInference: boolean expected"; + if (message.dataItems != null && message.hasOwnProperty("dataItems")) + if (!$util.isInteger(message.dataItems) && !(message.dataItems && $util.isInteger(message.dataItems.low) && $util.isInteger(message.dataItems.high))) + return "dataItems: integer|Long expected"; + if (message.dataSize != null && message.hasOwnProperty("dataSize")) + if (!$util.isInteger(message.dataSize) && !(message.dataSize && $util.isInteger(message.dataSize.low) && $util.isInteger(message.dataSize.high))) + return "dataSize: integer|Long expected"; + if (message.tables != null && message.hasOwnProperty("tables")) + if (!$util.isInteger(message.tables) && !(message.tables && $util.isInteger(message.tables.low) && $util.isInteger(message.tables.high))) + return "tables: integer|Long expected"; + if (message.filesets != null && message.hasOwnProperty("filesets")) + if (!$util.isInteger(message.filesets) && !(message.filesets && $util.isInteger(message.filesets.low) && $util.isInteger(message.filesets.high))) + return "filesets: integer|Long expected"; return null; }; /** - * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. + * Creates a Stats message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions} CsvOptions + * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats} Stats */ - CsvOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions) + Stats.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats) return object; - var message = new $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions(); - if (object.headerRows != null) - message.headerRows = object.headerRows | 0; - if (object.delimiter != null) - message.delimiter = String(object.delimiter); - if (object.encoding != null) - message.encoding = String(object.encoding); - if (object.disableTypeInference != null) - message.disableTypeInference = Boolean(object.disableTypeInference); + var message = new $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats(); + if (object.dataItems != null) + if ($util.Long) + (message.dataItems = $util.Long.fromValue(object.dataItems)).unsigned = false; + else if (typeof object.dataItems === "string") + message.dataItems = parseInt(object.dataItems, 10); + else if (typeof object.dataItems === "number") + message.dataItems = object.dataItems; + else if (typeof object.dataItems === "object") + message.dataItems = new $util.LongBits(object.dataItems.low >>> 0, object.dataItems.high >>> 0).toNumber(); + if (object.dataSize != null) + if ($util.Long) + (message.dataSize = $util.Long.fromValue(object.dataSize)).unsigned = false; + else if (typeof object.dataSize === "string") + message.dataSize = parseInt(object.dataSize, 10); + else if (typeof object.dataSize === "number") + message.dataSize = object.dataSize; + else if (typeof object.dataSize === "object") + message.dataSize = new $util.LongBits(object.dataSize.low >>> 0, object.dataSize.high >>> 0).toNumber(); + if (object.tables != null) + if ($util.Long) + (message.tables = $util.Long.fromValue(object.tables)).unsigned = false; + else if (typeof object.tables === "string") + message.tables = parseInt(object.tables, 10); + else if (typeof object.tables === "number") + message.tables = object.tables; + else if (typeof object.tables === "object") + message.tables = new $util.LongBits(object.tables.low >>> 0, object.tables.high >>> 0).toNumber(); + if (object.filesets != null) + if ($util.Long) + (message.filesets = $util.Long.fromValue(object.filesets)).unsigned = false; + else if (typeof object.filesets === "string") + message.filesets = parseInt(object.filesets, 10); + else if (typeof object.filesets === "number") + message.filesets = object.filesets; + else if (typeof object.filesets === "object") + message.filesets = new $util.LongBits(object.filesets.low >>> 0, object.filesets.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. + * Creates a plain object from a Stats message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats * @static - * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions} message CsvOptions + * @param {google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats} message Stats * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CsvOptions.toObject = function toObject(message, options) { + Stats.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.headerRows = 0; - object.delimiter = ""; - object.encoding = ""; - object.disableTypeInference = false; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.dataItems = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.dataItems = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.dataSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.dataSize = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.tables = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.tables = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.filesets = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.filesets = options.longs === String ? "0" : 0; } - if (message.headerRows != null && message.hasOwnProperty("headerRows")) - object.headerRows = message.headerRows; - if (message.delimiter != null && message.hasOwnProperty("delimiter")) - object.delimiter = message.delimiter; - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = message.encoding; - if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) - object.disableTypeInference = message.disableTypeInference; + if (message.dataItems != null && message.hasOwnProperty("dataItems")) + if (typeof message.dataItems === "number") + object.dataItems = options.longs === String ? String(message.dataItems) : message.dataItems; + else + object.dataItems = options.longs === String ? $util.Long.prototype.toString.call(message.dataItems) : options.longs === Number ? new $util.LongBits(message.dataItems.low >>> 0, message.dataItems.high >>> 0).toNumber() : message.dataItems; + if (message.dataSize != null && message.hasOwnProperty("dataSize")) + if (typeof message.dataSize === "number") + object.dataSize = options.longs === String ? String(message.dataSize) : message.dataSize; + else + object.dataSize = options.longs === String ? $util.Long.prototype.toString.call(message.dataSize) : options.longs === Number ? new $util.LongBits(message.dataSize.low >>> 0, message.dataSize.high >>> 0).toNumber() : message.dataSize; + if (message.tables != null && message.hasOwnProperty("tables")) + if (typeof message.tables === "number") + object.tables = options.longs === String ? String(message.tables) : message.tables; + else + object.tables = options.longs === String ? $util.Long.prototype.toString.call(message.tables) : options.longs === Number ? new $util.LongBits(message.tables.low >>> 0, message.tables.high >>> 0).toNumber() : message.tables; + if (message.filesets != null && message.hasOwnProperty("filesets")) + if (typeof message.filesets === "number") + object.filesets = options.longs === String ? String(message.filesets) : message.filesets; + else + object.filesets = options.longs === String ? $util.Long.prototype.toString.call(message.filesets) : options.longs === Number ? new $util.LongBits(message.filesets.low >>> 0, message.filesets.high >>> 0).toNumber() : message.filesets; return object; }; /** - * Converts this CsvOptions to JSON. + * Converts this Stats to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats * @instance * @returns {Object.} JSON object */ - CsvOptions.prototype.toJSON = function toJSON() { + Stats.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CsvOptions; + return Stats; })(); - DiscoverySpec.JsonOptions = (function() { + return DiscoveryStatus; + })(); - /** - * Properties of a JsonOptions. - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec - * @interface IJsonOptions - * @property {string|null} [encoding] JsonOptions encoding - * @property {boolean|null} [disableTypeInference] JsonOptions disableTypeInference - */ + return Asset; + })(); - /** - * Constructs a new JsonOptions. - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec - * @classdesc Represents a JsonOptions. - * @implements IJsonOptions - * @constructor - * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions=} [properties] Properties to set - */ - function JsonOptions(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * State enum. + * @name google.cloud.dataplex.v1.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} CREATING=2 CREATING value + * @property {number} DELETING=3 DELETING value + * @property {number} ACTION_REQUIRED=4 ACTION_REQUIRED value + */ + v1.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "CREATING"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "ACTION_REQUIRED"] = 4; + return values; + })(); - /** - * JsonOptions encoding. - * @member {string} encoding - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions - * @instance - */ - JsonOptions.prototype.encoding = ""; + v1.ContentService = (function() { - /** - * JsonOptions disableTypeInference. - * @member {boolean} disableTypeInference - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions - * @instance - */ - JsonOptions.prototype.disableTypeInference = false; - - /** - * Creates a new JsonOptions instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions - * @static - * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions} JsonOptions instance - */ - JsonOptions.create = function create(properties) { - return new JsonOptions(properties); - }; - - /** - * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions - * @static - * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions} message JsonOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JsonOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.encoding); - if (message.disableTypeInference != null && Object.hasOwnProperty.call(message, "disableTypeInference")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.disableTypeInference); - return writer; - }; - - /** - * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions - * @static - * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions} message JsonOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JsonOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a JsonOptions message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions} JsonOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JsonOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.encoding = reader.string(); - break; - case 2: - message.disableTypeInference = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a JsonOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions} JsonOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JsonOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a JsonOptions message. - * @function verify - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - JsonOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.encoding != null && message.hasOwnProperty("encoding")) - if (!$util.isString(message.encoding)) - return "encoding: string expected"; - if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) - if (typeof message.disableTypeInference !== "boolean") - return "disableTypeInference: boolean expected"; - return null; - }; - - /** - * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions} JsonOptions - */ - JsonOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions) - return object; - var message = new $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions(); - if (object.encoding != null) - message.encoding = String(object.encoding); - if (object.disableTypeInference != null) - message.disableTypeInference = Boolean(object.disableTypeInference); - return message; - }; - - /** - * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions - * @static - * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions} message JsonOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - JsonOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.encoding = ""; - object.disableTypeInference = false; - } - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = message.encoding; - if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) - object.disableTypeInference = message.disableTypeInference; - return object; - }; - - /** - * Converts this JsonOptions to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions - * @instance - * @returns {Object.} JSON object - */ - JsonOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return JsonOptions; - })(); - - return DiscoverySpec; - })(); - - return Zone; - })(); + /** + * Constructs a new ContentService service. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ContentService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function ContentService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } - v1.Action = (function() { + (ContentService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ContentService; /** - * Properties of an Action. - * @memberof google.cloud.dataplex.v1 - * @interface IAction - * @property {google.cloud.dataplex.v1.Action.Category|null} [category] Action category - * @property {string|null} [issue] Action issue - * @property {google.protobuf.ITimestamp|null} [detectTime] Action detectTime - * @property {string|null} [name] Action name - * @property {string|null} [lake] Action lake - * @property {string|null} [zone] Action zone - * @property {string|null} [asset] Action asset - * @property {Array.|null} [dataLocations] Action dataLocations - * @property {google.cloud.dataplex.v1.Action.IInvalidDataFormat|null} [invalidDataFormat] Action invalidDataFormat - * @property {google.cloud.dataplex.v1.Action.IIncompatibleDataSchema|null} [incompatibleDataSchema] Action incompatibleDataSchema - * @property {google.cloud.dataplex.v1.Action.IInvalidDataPartition|null} [invalidDataPartition] Action invalidDataPartition - * @property {google.cloud.dataplex.v1.Action.IMissingData|null} [missingData] Action missingData - * @property {google.cloud.dataplex.v1.Action.IMissingResource|null} [missingResource] Action missingResource - * @property {google.cloud.dataplex.v1.Action.IUnauthorizedResource|null} [unauthorizedResource] Action unauthorizedResource - * @property {google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply|null} [failedSecurityPolicyApply] Action failedSecurityPolicyApply - * @property {google.cloud.dataplex.v1.Action.IInvalidDataOrganization|null} [invalidDataOrganization] Action invalidDataOrganization + * Creates new ContentService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dataplex.v1.ContentService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {ContentService} RPC service. Useful where requests and/or responses are streamed. */ + ContentService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * Constructs a new Action. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an Action. - * @implements IAction - * @constructor - * @param {google.cloud.dataplex.v1.IAction=} [properties] Properties to set + * Callback as used by {@link google.cloud.dataplex.v1.ContentService#createContent}. + * @memberof google.cloud.dataplex.v1.ContentService + * @typedef CreateContentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Content} [response] Content */ - function Action(properties) { - this.dataLocations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } /** - * Action category. - * @member {google.cloud.dataplex.v1.Action.Category} category - * @memberof google.cloud.dataplex.v1.Action + * Calls CreateContent. + * @function createContent + * @memberof google.cloud.dataplex.v1.ContentService * @instance + * @param {google.cloud.dataplex.v1.ICreateContentRequest} request CreateContentRequest message or plain object + * @param {google.cloud.dataplex.v1.ContentService.CreateContentCallback} callback Node-style callback called with the error, if any, and Content + * @returns {undefined} + * @variation 1 */ - Action.prototype.category = 0; + Object.defineProperty(ContentService.prototype.createContent = function createContent(request, callback) { + return this.rpcCall(createContent, $root.google.cloud.dataplex.v1.CreateContentRequest, $root.google.cloud.dataplex.v1.Content, request, callback); + }, "name", { value: "CreateContent" }); /** - * Action issue. - * @member {string} issue - * @memberof google.cloud.dataplex.v1.Action + * Calls CreateContent. + * @function createContent + * @memberof google.cloud.dataplex.v1.ContentService * @instance + * @param {google.cloud.dataplex.v1.ICreateContentRequest} request CreateContentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Action.prototype.issue = ""; /** - * Action detectTime. - * @member {google.protobuf.ITimestamp|null|undefined} detectTime - * @memberof google.cloud.dataplex.v1.Action - * @instance + * Callback as used by {@link google.cloud.dataplex.v1.ContentService#updateContent}. + * @memberof google.cloud.dataplex.v1.ContentService + * @typedef UpdateContentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Content} [response] Content */ - Action.prototype.detectTime = null; /** - * Action name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.Action + * Calls UpdateContent. + * @function updateContent + * @memberof google.cloud.dataplex.v1.ContentService * @instance + * @param {google.cloud.dataplex.v1.IUpdateContentRequest} request UpdateContentRequest message or plain object + * @param {google.cloud.dataplex.v1.ContentService.UpdateContentCallback} callback Node-style callback called with the error, if any, and Content + * @returns {undefined} + * @variation 1 */ - Action.prototype.name = ""; + Object.defineProperty(ContentService.prototype.updateContent = function updateContent(request, callback) { + return this.rpcCall(updateContent, $root.google.cloud.dataplex.v1.UpdateContentRequest, $root.google.cloud.dataplex.v1.Content, request, callback); + }, "name", { value: "UpdateContent" }); /** - * Action lake. - * @member {string} lake - * @memberof google.cloud.dataplex.v1.Action + * Calls UpdateContent. + * @function updateContent + * @memberof google.cloud.dataplex.v1.ContentService * @instance + * @param {google.cloud.dataplex.v1.IUpdateContentRequest} request UpdateContentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Action.prototype.lake = ""; /** - * Action zone. - * @member {string} zone - * @memberof google.cloud.dataplex.v1.Action - * @instance + * Callback as used by {@link google.cloud.dataplex.v1.ContentService#deleteContent}. + * @memberof google.cloud.dataplex.v1.ContentService + * @typedef DeleteContentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty */ - Action.prototype.zone = ""; /** - * Action asset. - * @member {string} asset - * @memberof google.cloud.dataplex.v1.Action + * Calls DeleteContent. + * @function deleteContent + * @memberof google.cloud.dataplex.v1.ContentService * @instance + * @param {google.cloud.dataplex.v1.IDeleteContentRequest} request DeleteContentRequest message or plain object + * @param {google.cloud.dataplex.v1.ContentService.DeleteContentCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 */ - Action.prototype.asset = ""; + Object.defineProperty(ContentService.prototype.deleteContent = function deleteContent(request, callback) { + return this.rpcCall(deleteContent, $root.google.cloud.dataplex.v1.DeleteContentRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteContent" }); /** - * Action dataLocations. - * @member {Array.} dataLocations - * @memberof google.cloud.dataplex.v1.Action + * Calls DeleteContent. + * @function deleteContent + * @memberof google.cloud.dataplex.v1.ContentService * @instance + * @param {google.cloud.dataplex.v1.IDeleteContentRequest} request DeleteContentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Action.prototype.dataLocations = $util.emptyArray; /** - * Action invalidDataFormat. - * @member {google.cloud.dataplex.v1.Action.IInvalidDataFormat|null|undefined} invalidDataFormat - * @memberof google.cloud.dataplex.v1.Action - * @instance + * Callback as used by {@link google.cloud.dataplex.v1.ContentService#getContent}. + * @memberof google.cloud.dataplex.v1.ContentService + * @typedef GetContentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Content} [response] Content */ - Action.prototype.invalidDataFormat = null; /** - * Action incompatibleDataSchema. - * @member {google.cloud.dataplex.v1.Action.IIncompatibleDataSchema|null|undefined} incompatibleDataSchema - * @memberof google.cloud.dataplex.v1.Action + * Calls GetContent. + * @function getContent + * @memberof google.cloud.dataplex.v1.ContentService * @instance + * @param {google.cloud.dataplex.v1.IGetContentRequest} request GetContentRequest message or plain object + * @param {google.cloud.dataplex.v1.ContentService.GetContentCallback} callback Node-style callback called with the error, if any, and Content + * @returns {undefined} + * @variation 1 */ - Action.prototype.incompatibleDataSchema = null; + Object.defineProperty(ContentService.prototype.getContent = function getContent(request, callback) { + return this.rpcCall(getContent, $root.google.cloud.dataplex.v1.GetContentRequest, $root.google.cloud.dataplex.v1.Content, request, callback); + }, "name", { value: "GetContent" }); /** - * Action invalidDataPartition. - * @member {google.cloud.dataplex.v1.Action.IInvalidDataPartition|null|undefined} invalidDataPartition - * @memberof google.cloud.dataplex.v1.Action + * Calls GetContent. + * @function getContent + * @memberof google.cloud.dataplex.v1.ContentService * @instance + * @param {google.cloud.dataplex.v1.IGetContentRequest} request GetContentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Action.prototype.invalidDataPartition = null; /** - * Action missingData. - * @member {google.cloud.dataplex.v1.Action.IMissingData|null|undefined} missingData - * @memberof google.cloud.dataplex.v1.Action - * @instance + * Callback as used by {@link google.cloud.dataplex.v1.ContentService#listContent}. + * @memberof google.cloud.dataplex.v1.ContentService + * @typedef ListContentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListContentResponse} [response] ListContentResponse */ - Action.prototype.missingData = null; /** - * Action missingResource. - * @member {google.cloud.dataplex.v1.Action.IMissingResource|null|undefined} missingResource - * @memberof google.cloud.dataplex.v1.Action + * Calls ListContent. + * @function listContent + * @memberof google.cloud.dataplex.v1.ContentService * @instance + * @param {google.cloud.dataplex.v1.IListContentRequest} request ListContentRequest message or plain object + * @param {google.cloud.dataplex.v1.ContentService.ListContentCallback} callback Node-style callback called with the error, if any, and ListContentResponse + * @returns {undefined} + * @variation 1 */ - Action.prototype.missingResource = null; + Object.defineProperty(ContentService.prototype.listContent = function listContent(request, callback) { + return this.rpcCall(listContent, $root.google.cloud.dataplex.v1.ListContentRequest, $root.google.cloud.dataplex.v1.ListContentResponse, request, callback); + }, "name", { value: "ListContent" }); /** - * Action unauthorizedResource. - * @member {google.cloud.dataplex.v1.Action.IUnauthorizedResource|null|undefined} unauthorizedResource - * @memberof google.cloud.dataplex.v1.Action + * Calls ListContent. + * @function listContent + * @memberof google.cloud.dataplex.v1.ContentService * @instance + * @param {google.cloud.dataplex.v1.IListContentRequest} request ListContentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Action.prototype.unauthorizedResource = null; + + return ContentService; + })(); + + v1.CreateContentRequest = (function() { /** - * Action failedSecurityPolicyApply. - * @member {google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply|null|undefined} failedSecurityPolicyApply - * @memberof google.cloud.dataplex.v1.Action - * @instance + * Properties of a CreateContentRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICreateContentRequest + * @property {string|null} [parent] CreateContentRequest parent + * @property {google.cloud.dataplex.v1.IContent|null} [content] CreateContentRequest content + * @property {boolean|null} [validateOnly] CreateContentRequest validateOnly */ - Action.prototype.failedSecurityPolicyApply = null; /** - * Action invalidDataOrganization. - * @member {google.cloud.dataplex.v1.Action.IInvalidDataOrganization|null|undefined} invalidDataOrganization - * @memberof google.cloud.dataplex.v1.Action + * Constructs a new CreateContentRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CreateContentRequest. + * @implements ICreateContentRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICreateContentRequest=} [properties] Properties to set + */ + function CreateContentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateContentRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreateContentRequest * @instance */ - Action.prototype.invalidDataOrganization = null; + CreateContentRequest.prototype.parent = ""; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * CreateContentRequest content. + * @member {google.cloud.dataplex.v1.IContent|null|undefined} content + * @memberof google.cloud.dataplex.v1.CreateContentRequest + * @instance + */ + CreateContentRequest.prototype.content = null; /** - * Action details. - * @member {"invalidDataFormat"|"incompatibleDataSchema"|"invalidDataPartition"|"missingData"|"missingResource"|"unauthorizedResource"|"failedSecurityPolicyApply"|"invalidDataOrganization"|undefined} details - * @memberof google.cloud.dataplex.v1.Action + * CreateContentRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateContentRequest * @instance */ - Object.defineProperty(Action.prototype, "details", { - get: $util.oneOfGetter($oneOfFields = ["invalidDataFormat", "incompatibleDataSchema", "invalidDataPartition", "missingData", "missingResource", "unauthorizedResource", "failedSecurityPolicyApply", "invalidDataOrganization"]), - set: $util.oneOfSetter($oneOfFields) - }); + CreateContentRequest.prototype.validateOnly = false; /** - * Creates a new Action instance using the specified properties. + * Creates a new CreateContentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.Action + * @memberof google.cloud.dataplex.v1.CreateContentRequest * @static - * @param {google.cloud.dataplex.v1.IAction=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Action} Action instance + * @param {google.cloud.dataplex.v1.ICreateContentRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateContentRequest} CreateContentRequest instance */ - Action.create = function create(properties) { - return new Action(properties); + CreateContentRequest.create = function create(properties) { + return new CreateContentRequest(properties); }; /** - * Encodes the specified Action message. Does not implicitly {@link google.cloud.dataplex.v1.Action.verify|verify} messages. + * Encodes the specified CreateContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateContentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.Action + * @memberof google.cloud.dataplex.v1.CreateContentRequest * @static - * @param {google.cloud.dataplex.v1.IAction} message Action message or plain object to encode + * @param {google.cloud.dataplex.v1.ICreateContentRequest} message CreateContentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Action.encode = function encode(message, writer) { + CreateContentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.category != null && Object.hasOwnProperty.call(message, "category")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.category); - if (message.issue != null && Object.hasOwnProperty.call(message, "issue")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.issue); - if (message.detectTime != null && Object.hasOwnProperty.call(message, "detectTime")) - $root.google.protobuf.Timestamp.encode(message.detectTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); - if (message.lake != null && Object.hasOwnProperty.call(message, "lake")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.lake); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.zone); - if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.asset); - if (message.dataLocations != null && message.dataLocations.length) - for (var i = 0; i < message.dataLocations.length; ++i) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.dataLocations[i]); - if (message.invalidDataFormat != null && Object.hasOwnProperty.call(message, "invalidDataFormat")) - $root.google.cloud.dataplex.v1.Action.InvalidDataFormat.encode(message.invalidDataFormat, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.incompatibleDataSchema != null && Object.hasOwnProperty.call(message, "incompatibleDataSchema")) - $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.encode(message.incompatibleDataSchema, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.invalidDataPartition != null && Object.hasOwnProperty.call(message, "invalidDataPartition")) - $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.encode(message.invalidDataPartition, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.missingData != null && Object.hasOwnProperty.call(message, "missingData")) - $root.google.cloud.dataplex.v1.Action.MissingData.encode(message.missingData, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.missingResource != null && Object.hasOwnProperty.call(message, "missingResource")) - $root.google.cloud.dataplex.v1.Action.MissingResource.encode(message.missingResource, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.unauthorizedResource != null && Object.hasOwnProperty.call(message, "unauthorizedResource")) - $root.google.cloud.dataplex.v1.Action.UnauthorizedResource.encode(message.unauthorizedResource, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.failedSecurityPolicyApply != null && Object.hasOwnProperty.call(message, "failedSecurityPolicyApply")) - $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.encode(message.failedSecurityPolicyApply, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.invalidDataOrganization != null && Object.hasOwnProperty.call(message, "invalidDataOrganization")) - $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization.encode(message.invalidDataOrganization, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + $root.google.cloud.dataplex.v1.Content.encode(message.content, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); return writer; }; /** - * Encodes the specified Action message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.verify|verify} messages. + * Encodes the specified CreateContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateContentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Action + * @memberof google.cloud.dataplex.v1.CreateContentRequest * @static - * @param {google.cloud.dataplex.v1.IAction} message Action message or plain object to encode + * @param {google.cloud.dataplex.v1.ICreateContentRequest} message CreateContentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Action.encodeDelimited = function encodeDelimited(message, writer) { + CreateContentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Action message from the specified reader or buffer. + * Decodes a CreateContentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.Action + * @memberof google.cloud.dataplex.v1.CreateContentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Action} Action + * @returns {google.cloud.dataplex.v1.CreateContentRequest} CreateContentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Action.decode = function decode(reader, length) { + CreateContentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateContentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.category = reader.int32(); + message.parent = reader.string(); break; case 2: - message.issue = reader.string(); - break; - case 4: - message.detectTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 5: - message.name = reader.string(); - break; - case 6: - message.lake = reader.string(); - break; - case 7: - message.zone = reader.string(); - break; - case 8: - message.asset = reader.string(); - break; - case 9: - if (!(message.dataLocations && message.dataLocations.length)) - message.dataLocations = []; - message.dataLocations.push(reader.string()); - break; - case 10: - message.invalidDataFormat = $root.google.cloud.dataplex.v1.Action.InvalidDataFormat.decode(reader, reader.uint32()); - break; - case 11: - message.incompatibleDataSchema = $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.decode(reader, reader.uint32()); - break; - case 12: - message.invalidDataPartition = $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.decode(reader, reader.uint32()); - break; - case 13: - message.missingData = $root.google.cloud.dataplex.v1.Action.MissingData.decode(reader, reader.uint32()); - break; - case 14: - message.missingResource = $root.google.cloud.dataplex.v1.Action.MissingResource.decode(reader, reader.uint32()); + message.content = $root.google.cloud.dataplex.v1.Content.decode(reader, reader.uint32()); break; - case 15: - message.unauthorizedResource = $root.google.cloud.dataplex.v1.Action.UnauthorizedResource.decode(reader, reader.uint32()); - break; - case 21: - message.failedSecurityPolicyApply = $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.decode(reader, reader.uint32()); - break; - case 22: - message.invalidDataOrganization = $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization.decode(reader, reader.uint32()); + case 3: + message.validateOnly = reader.bool(); break; default: reader.skipType(tag & 7); @@ -10773,1842 +11565,8870 @@ }; /** - * Decodes an Action message from the specified reader or buffer, length delimited. + * Decodes a CreateContentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Action + * @memberof google.cloud.dataplex.v1.CreateContentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Action} Action + * @returns {google.cloud.dataplex.v1.CreateContentRequest} CreateContentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Action.decodeDelimited = function decodeDelimited(reader) { + CreateContentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Action message. + * Verifies a CreateContentRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.Action + * @memberof google.cloud.dataplex.v1.CreateContentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Action.verify = function verify(message) { + CreateContentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.category != null && message.hasOwnProperty("category")) - switch (message.category) { - default: - return "category: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.issue != null && message.hasOwnProperty("issue")) - if (!$util.isString(message.issue)) - return "issue: string expected"; - if (message.detectTime != null && message.hasOwnProperty("detectTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.detectTime); + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.content != null && message.hasOwnProperty("content")) { + var error = $root.google.cloud.dataplex.v1.Content.verify(message.content); if (error) - return "detectTime." + error; - } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.lake != null && message.hasOwnProperty("lake")) - if (!$util.isString(message.lake)) - return "lake: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.asset != null && message.hasOwnProperty("asset")) - if (!$util.isString(message.asset)) - return "asset: string expected"; - if (message.dataLocations != null && message.hasOwnProperty("dataLocations")) { - if (!Array.isArray(message.dataLocations)) - return "dataLocations: array expected"; - for (var i = 0; i < message.dataLocations.length; ++i) - if (!$util.isString(message.dataLocations[i])) - return "dataLocations: string[] expected"; - } - if (message.invalidDataFormat != null && message.hasOwnProperty("invalidDataFormat")) { - properties.details = 1; - { - var error = $root.google.cloud.dataplex.v1.Action.InvalidDataFormat.verify(message.invalidDataFormat); - if (error) - return "invalidDataFormat." + error; - } - } - if (message.incompatibleDataSchema != null && message.hasOwnProperty("incompatibleDataSchema")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.verify(message.incompatibleDataSchema); - if (error) - return "incompatibleDataSchema." + error; - } - } - if (message.invalidDataPartition != null && message.hasOwnProperty("invalidDataPartition")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.verify(message.invalidDataPartition); - if (error) - return "invalidDataPartition." + error; - } - } - if (message.missingData != null && message.hasOwnProperty("missingData")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.dataplex.v1.Action.MissingData.verify(message.missingData); - if (error) - return "missingData." + error; - } - } - if (message.missingResource != null && message.hasOwnProperty("missingResource")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.dataplex.v1.Action.MissingResource.verify(message.missingResource); - if (error) - return "missingResource." + error; - } - } - if (message.unauthorizedResource != null && message.hasOwnProperty("unauthorizedResource")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.dataplex.v1.Action.UnauthorizedResource.verify(message.unauthorizedResource); - if (error) - return "unauthorizedResource." + error; - } - } - if (message.failedSecurityPolicyApply != null && message.hasOwnProperty("failedSecurityPolicyApply")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.verify(message.failedSecurityPolicyApply); - if (error) - return "failedSecurityPolicyApply." + error; - } - } - if (message.invalidDataOrganization != null && message.hasOwnProperty("invalidDataOrganization")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization.verify(message.invalidDataOrganization); - if (error) - return "invalidDataOrganization." + error; - } + return "content." + error; } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates an Action message from a plain object. Also converts values to their respective internal types. + * Creates a CreateContentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.Action + * @memberof google.cloud.dataplex.v1.CreateContentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Action} Action + * @returns {google.cloud.dataplex.v1.CreateContentRequest} CreateContentRequest */ - Action.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Action) + CreateContentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateContentRequest) return object; - var message = new $root.google.cloud.dataplex.v1.Action(); - switch (object.category) { - case "CATEGORY_UNSPECIFIED": - case 0: - message.category = 0; - break; - case "RESOURCE_MANAGEMENT": - case 1: - message.category = 1; - break; - case "SECURITY_POLICY": - case 2: - message.category = 2; - break; - case "DATA_DISCOVERY": - case 3: - message.category = 3; - break; - } - if (object.issue != null) - message.issue = String(object.issue); - if (object.detectTime != null) { - if (typeof object.detectTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Action.detectTime: object expected"); - message.detectTime = $root.google.protobuf.Timestamp.fromObject(object.detectTime); - } - if (object.name != null) - message.name = String(object.name); - if (object.lake != null) - message.lake = String(object.lake); - if (object.zone != null) - message.zone = String(object.zone); - if (object.asset != null) - message.asset = String(object.asset); - if (object.dataLocations) { - if (!Array.isArray(object.dataLocations)) - throw TypeError(".google.cloud.dataplex.v1.Action.dataLocations: array expected"); - message.dataLocations = []; - for (var i = 0; i < object.dataLocations.length; ++i) - message.dataLocations[i] = String(object.dataLocations[i]); - } - if (object.invalidDataFormat != null) { - if (typeof object.invalidDataFormat !== "object") - throw TypeError(".google.cloud.dataplex.v1.Action.invalidDataFormat: object expected"); - message.invalidDataFormat = $root.google.cloud.dataplex.v1.Action.InvalidDataFormat.fromObject(object.invalidDataFormat); - } - if (object.incompatibleDataSchema != null) { - if (typeof object.incompatibleDataSchema !== "object") - throw TypeError(".google.cloud.dataplex.v1.Action.incompatibleDataSchema: object expected"); - message.incompatibleDataSchema = $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.fromObject(object.incompatibleDataSchema); - } - if (object.invalidDataPartition != null) { - if (typeof object.invalidDataPartition !== "object") - throw TypeError(".google.cloud.dataplex.v1.Action.invalidDataPartition: object expected"); - message.invalidDataPartition = $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.fromObject(object.invalidDataPartition); - } - if (object.missingData != null) { - if (typeof object.missingData !== "object") - throw TypeError(".google.cloud.dataplex.v1.Action.missingData: object expected"); - message.missingData = $root.google.cloud.dataplex.v1.Action.MissingData.fromObject(object.missingData); - } - if (object.missingResource != null) { - if (typeof object.missingResource !== "object") - throw TypeError(".google.cloud.dataplex.v1.Action.missingResource: object expected"); - message.missingResource = $root.google.cloud.dataplex.v1.Action.MissingResource.fromObject(object.missingResource); - } - if (object.unauthorizedResource != null) { - if (typeof object.unauthorizedResource !== "object") - throw TypeError(".google.cloud.dataplex.v1.Action.unauthorizedResource: object expected"); - message.unauthorizedResource = $root.google.cloud.dataplex.v1.Action.UnauthorizedResource.fromObject(object.unauthorizedResource); - } - if (object.failedSecurityPolicyApply != null) { - if (typeof object.failedSecurityPolicyApply !== "object") - throw TypeError(".google.cloud.dataplex.v1.Action.failedSecurityPolicyApply: object expected"); - message.failedSecurityPolicyApply = $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.fromObject(object.failedSecurityPolicyApply); - } - if (object.invalidDataOrganization != null) { - if (typeof object.invalidDataOrganization !== "object") - throw TypeError(".google.cloud.dataplex.v1.Action.invalidDataOrganization: object expected"); - message.invalidDataOrganization = $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization.fromObject(object.invalidDataOrganization); + var message = new $root.google.cloud.dataplex.v1.CreateContentRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.content != null) { + if (typeof object.content !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateContentRequest.content: object expected"); + message.content = $root.google.cloud.dataplex.v1.Content.fromObject(object.content); } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from an Action message. Also converts values to other types if specified. + * Creates a plain object from a CreateContentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.Action + * @memberof google.cloud.dataplex.v1.CreateContentRequest * @static - * @param {google.cloud.dataplex.v1.Action} message Action + * @param {google.cloud.dataplex.v1.CreateContentRequest} message CreateContentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Action.toObject = function toObject(message, options) { + CreateContentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.dataLocations = []; if (options.defaults) { - object.category = options.enums === String ? "CATEGORY_UNSPECIFIED" : 0; - object.issue = ""; - object.detectTime = null; - object.name = ""; - object.lake = ""; - object.zone = ""; - object.asset = ""; - } - if (message.category != null && message.hasOwnProperty("category")) - object.category = options.enums === String ? $root.google.cloud.dataplex.v1.Action.Category[message.category] : message.category; - if (message.issue != null && message.hasOwnProperty("issue")) - object.issue = message.issue; - if (message.detectTime != null && message.hasOwnProperty("detectTime")) - object.detectTime = $root.google.protobuf.Timestamp.toObject(message.detectTime, options); - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.lake != null && message.hasOwnProperty("lake")) - object.lake = message.lake; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.asset != null && message.hasOwnProperty("asset")) - object.asset = message.asset; - if (message.dataLocations && message.dataLocations.length) { - object.dataLocations = []; - for (var j = 0; j < message.dataLocations.length; ++j) - object.dataLocations[j] = message.dataLocations[j]; - } - if (message.invalidDataFormat != null && message.hasOwnProperty("invalidDataFormat")) { - object.invalidDataFormat = $root.google.cloud.dataplex.v1.Action.InvalidDataFormat.toObject(message.invalidDataFormat, options); - if (options.oneofs) - object.details = "invalidDataFormat"; - } - if (message.incompatibleDataSchema != null && message.hasOwnProperty("incompatibleDataSchema")) { - object.incompatibleDataSchema = $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.toObject(message.incompatibleDataSchema, options); - if (options.oneofs) - object.details = "incompatibleDataSchema"; - } - if (message.invalidDataPartition != null && message.hasOwnProperty("invalidDataPartition")) { - object.invalidDataPartition = $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.toObject(message.invalidDataPartition, options); - if (options.oneofs) - object.details = "invalidDataPartition"; - } - if (message.missingData != null && message.hasOwnProperty("missingData")) { - object.missingData = $root.google.cloud.dataplex.v1.Action.MissingData.toObject(message.missingData, options); - if (options.oneofs) - object.details = "missingData"; - } - if (message.missingResource != null && message.hasOwnProperty("missingResource")) { - object.missingResource = $root.google.cloud.dataplex.v1.Action.MissingResource.toObject(message.missingResource, options); - if (options.oneofs) - object.details = "missingResource"; - } - if (message.unauthorizedResource != null && message.hasOwnProperty("unauthorizedResource")) { - object.unauthorizedResource = $root.google.cloud.dataplex.v1.Action.UnauthorizedResource.toObject(message.unauthorizedResource, options); - if (options.oneofs) - object.details = "unauthorizedResource"; - } - if (message.failedSecurityPolicyApply != null && message.hasOwnProperty("failedSecurityPolicyApply")) { - object.failedSecurityPolicyApply = $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.toObject(message.failedSecurityPolicyApply, options); - if (options.oneofs) - object.details = "failedSecurityPolicyApply"; - } - if (message.invalidDataOrganization != null && message.hasOwnProperty("invalidDataOrganization")) { - object.invalidDataOrganization = $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization.toObject(message.invalidDataOrganization, options); - if (options.oneofs) - object.details = "invalidDataOrganization"; + object.parent = ""; + object.content = null; + object.validateOnly = false; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.content != null && message.hasOwnProperty("content")) + object.content = $root.google.cloud.dataplex.v1.Content.toObject(message.content, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this Action to JSON. + * Converts this CreateContentRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.Action + * @memberof google.cloud.dataplex.v1.CreateContentRequest * @instance * @returns {Object.} JSON object */ - Action.prototype.toJSON = function toJSON() { + CreateContentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + return CreateContentRequest; + })(); + + v1.UpdateContentRequest = (function() { + /** - * Category enum. - * @name google.cloud.dataplex.v1.Action.Category - * @enum {number} - * @property {number} CATEGORY_UNSPECIFIED=0 CATEGORY_UNSPECIFIED value - * @property {number} RESOURCE_MANAGEMENT=1 RESOURCE_MANAGEMENT value - * @property {number} SECURITY_POLICY=2 SECURITY_POLICY value - * @property {number} DATA_DISCOVERY=3 DATA_DISCOVERY value + * Properties of an UpdateContentRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IUpdateContentRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateContentRequest updateMask + * @property {google.cloud.dataplex.v1.IContent|null} [content] UpdateContentRequest content + * @property {boolean|null} [validateOnly] UpdateContentRequest validateOnly */ - Action.Category = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CATEGORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "RESOURCE_MANAGEMENT"] = 1; - values[valuesById[2] = "SECURITY_POLICY"] = 2; - values[valuesById[3] = "DATA_DISCOVERY"] = 3; - return values; - })(); - Action.MissingResource = (function() { + /** + * Constructs a new UpdateContentRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an UpdateContentRequest. + * @implements IUpdateContentRequest + * @constructor + * @param {google.cloud.dataplex.v1.IUpdateContentRequest=} [properties] Properties to set + */ + function UpdateContentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Properties of a MissingResource. - * @memberof google.cloud.dataplex.v1.Action - * @interface IMissingResource - */ + /** + * UpdateContentRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @instance + */ + UpdateContentRequest.prototype.updateMask = null; - /** - * Constructs a new MissingResource. - * @memberof google.cloud.dataplex.v1.Action - * @classdesc Represents a MissingResource. - * @implements IMissingResource - * @constructor - * @param {google.cloud.dataplex.v1.Action.IMissingResource=} [properties] Properties to set - */ - function MissingResource(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * UpdateContentRequest content. + * @member {google.cloud.dataplex.v1.IContent|null|undefined} content + * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @instance + */ + UpdateContentRequest.prototype.content = null; - /** - * Creates a new MissingResource instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Action.MissingResource - * @static - * @param {google.cloud.dataplex.v1.Action.IMissingResource=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Action.MissingResource} MissingResource instance - */ - MissingResource.create = function create(properties) { - return new MissingResource(properties); - }; + /** + * UpdateContentRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @instance + */ + UpdateContentRequest.prototype.validateOnly = false; - /** - * Encodes the specified MissingResource message. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingResource.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Action.MissingResource - * @static - * @param {google.cloud.dataplex.v1.Action.IMissingResource} message MissingResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MissingResource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; + /** + * Creates a new UpdateContentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateContentRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateContentRequest} UpdateContentRequest instance + */ + UpdateContentRequest.create = function create(properties) { + return new UpdateContentRequest(properties); + }; - /** - * Encodes the specified MissingResource message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingResource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Action.MissingResource - * @static - * @param {google.cloud.dataplex.v1.Action.IMissingResource} message MissingResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MissingResource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified UpdateContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateContentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateContentRequest} message UpdateContentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateContentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + $root.google.cloud.dataplex.v1.Content.encode(message.content, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; - /** - * Decodes a MissingResource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Action.MissingResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Action.MissingResource} MissingResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MissingResource.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.MissingResource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } + /** + * Encodes the specified UpdateContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateContentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateContentRequest} message UpdateContentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateContentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateContentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.UpdateContentRequest} UpdateContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateContentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateContentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 2: + message.content = $root.google.cloud.dataplex.v1.Content.decode(reader, reader.uint32()); + break; + case 3: + message.validateOnly = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Decodes a MissingResource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Action.MissingResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Action.MissingResource} MissingResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MissingResource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an UpdateContentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.UpdateContentRequest} UpdateContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateContentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a MissingResource message. - * @function verify - * @memberof google.cloud.dataplex.v1.Action.MissingResource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MissingResource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; + /** + * Verifies an UpdateContentRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateContentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.content != null && message.hasOwnProperty("content")) { + var error = $root.google.cloud.dataplex.v1.Content.verify(message.content); + if (error) + return "content." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; - /** - * Creates a MissingResource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Action.MissingResource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Action.MissingResource} MissingResource - */ - MissingResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Action.MissingResource) - return object; - return new $root.google.cloud.dataplex.v1.Action.MissingResource(); - }; + /** + * Creates an UpdateContentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.UpdateContentRequest} UpdateContentRequest + */ + UpdateContentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateContentRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.UpdateContentRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateContentRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.content != null) { + if (typeof object.content !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateContentRequest.content: object expected"); + message.content = $root.google.cloud.dataplex.v1.Content.fromObject(object.content); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; - /** - * Creates a plain object from a MissingResource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Action.MissingResource - * @static - * @param {google.cloud.dataplex.v1.Action.MissingResource} message MissingResource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MissingResource.toObject = function toObject() { - return {}; - }; + /** + * Creates a plain object from an UpdateContentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @static + * @param {google.cloud.dataplex.v1.UpdateContentRequest} message UpdateContentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateContentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.content = null; + object.validateOnly = false; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.content != null && message.hasOwnProperty("content")) + object.content = $root.google.cloud.dataplex.v1.Content.toObject(message.content, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; - /** - * Converts this MissingResource to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Action.MissingResource - * @instance - * @returns {Object.} JSON object - */ - MissingResource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this UpdateContentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateContentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return MissingResource; - })(); + return UpdateContentRequest; + })(); - Action.UnauthorizedResource = (function() { + v1.DeleteContentRequest = (function() { - /** - * Properties of an UnauthorizedResource. - * @memberof google.cloud.dataplex.v1.Action - * @interface IUnauthorizedResource - */ + /** + * Properties of a DeleteContentRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IDeleteContentRequest + * @property {string|null} [name] DeleteContentRequest name + */ - /** - * Constructs a new UnauthorizedResource. - * @memberof google.cloud.dataplex.v1.Action - * @classdesc Represents an UnauthorizedResource. - * @implements IUnauthorizedResource - * @constructor - * @param {google.cloud.dataplex.v1.Action.IUnauthorizedResource=} [properties] Properties to set - */ - function UnauthorizedResource(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new DeleteContentRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DeleteContentRequest. + * @implements IDeleteContentRequest + * @constructor + * @param {google.cloud.dataplex.v1.IDeleteContentRequest=} [properties] Properties to set + */ + function DeleteContentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a new UnauthorizedResource instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource - * @static - * @param {google.cloud.dataplex.v1.Action.IUnauthorizedResource=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Action.UnauthorizedResource} UnauthorizedResource instance - */ - UnauthorizedResource.create = function create(properties) { - return new UnauthorizedResource(properties); - }; + /** + * DeleteContentRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DeleteContentRequest + * @instance + */ + DeleteContentRequest.prototype.name = ""; - /** - * Encodes the specified UnauthorizedResource message. Does not implicitly {@link google.cloud.dataplex.v1.Action.UnauthorizedResource.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource - * @static - * @param {google.cloud.dataplex.v1.Action.IUnauthorizedResource} message UnauthorizedResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UnauthorizedResource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; + /** + * Creates a new DeleteContentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DeleteContentRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteContentRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteContentRequest} DeleteContentRequest instance + */ + DeleteContentRequest.create = function create(properties) { + return new DeleteContentRequest(properties); + }; - /** - * Encodes the specified UnauthorizedResource message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.UnauthorizedResource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource - * @static - * @param {google.cloud.dataplex.v1.Action.IUnauthorizedResource} message UnauthorizedResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UnauthorizedResource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified DeleteContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteContentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DeleteContentRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteContentRequest} message DeleteContentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteContentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; - /** - * Decodes an UnauthorizedResource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Action.UnauthorizedResource} UnauthorizedResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UnauthorizedResource.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.UnauthorizedResource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified DeleteContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteContentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteContentRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteContentRequest} message DeleteContentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteContentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes an UnauthorizedResource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Action.UnauthorizedResource} UnauthorizedResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UnauthorizedResource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a DeleteContentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DeleteContentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DeleteContentRequest} DeleteContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteContentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteContentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Verifies an UnauthorizedResource message. - * @function verify - * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UnauthorizedResource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; + /** + * Decodes a DeleteContentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteContentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DeleteContentRequest} DeleteContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteContentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates an UnauthorizedResource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Action.UnauthorizedResource} UnauthorizedResource - */ - UnauthorizedResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Action.UnauthorizedResource) - return object; - return new $root.google.cloud.dataplex.v1.Action.UnauthorizedResource(); - }; + /** + * Verifies a DeleteContentRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.DeleteContentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteContentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; - /** - * Creates a plain object from an UnauthorizedResource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource - * @static - * @param {google.cloud.dataplex.v1.Action.UnauthorizedResource} message UnauthorizedResource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UnauthorizedResource.toObject = function toObject() { - return {}; - }; - - /** - * Converts this UnauthorizedResource to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource - * @instance - * @returns {Object.} JSON object - */ - UnauthorizedResource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a DeleteContentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DeleteContentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DeleteContentRequest} DeleteContentRequest + */ + DeleteContentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteContentRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.DeleteContentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - return UnauthorizedResource; - })(); + /** + * Creates a plain object from a DeleteContentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DeleteContentRequest + * @static + * @param {google.cloud.dataplex.v1.DeleteContentRequest} message DeleteContentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteContentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; - Action.FailedSecurityPolicyApply = (function() { + /** + * Converts this DeleteContentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DeleteContentRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteContentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Properties of a FailedSecurityPolicyApply. - * @memberof google.cloud.dataplex.v1.Action - * @interface IFailedSecurityPolicyApply - * @property {string|null} [asset] FailedSecurityPolicyApply asset - */ + return DeleteContentRequest; + })(); - /** - * Constructs a new FailedSecurityPolicyApply. - * @memberof google.cloud.dataplex.v1.Action - * @classdesc Represents a FailedSecurityPolicyApply. - * @implements IFailedSecurityPolicyApply - * @constructor - * @param {google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply=} [properties] Properties to set - */ - function FailedSecurityPolicyApply(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + v1.ListContentRequest = (function() { - /** - * FailedSecurityPolicyApply asset. - * @member {string} asset - * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply - * @instance - */ - FailedSecurityPolicyApply.prototype.asset = ""; + /** + * Properties of a ListContentRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListContentRequest + * @property {string|null} [parent] ListContentRequest parent + * @property {number|null} [pageSize] ListContentRequest pageSize + * @property {string|null} [pageToken] ListContentRequest pageToken + * @property {string|null} [filter] ListContentRequest filter + */ - /** - * Creates a new FailedSecurityPolicyApply instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply - * @static - * @param {google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply} FailedSecurityPolicyApply instance - */ - FailedSecurityPolicyApply.create = function create(properties) { - return new FailedSecurityPolicyApply(properties); - }; + /** + * Constructs a new ListContentRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListContentRequest. + * @implements IListContentRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListContentRequest=} [properties] Properties to set + */ + function ListContentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified FailedSecurityPolicyApply message. Does not implicitly {@link google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply - * @static - * @param {google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply} message FailedSecurityPolicyApply message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FailedSecurityPolicyApply.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.asset); - return writer; - }; + /** + * ListContentRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @instance + */ + ListContentRequest.prototype.parent = ""; - /** - * Encodes the specified FailedSecurityPolicyApply message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply - * @static - * @param {google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply} message FailedSecurityPolicyApply message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FailedSecurityPolicyApply.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * ListContentRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @instance + */ + ListContentRequest.prototype.pageSize = 0; - /** - * Decodes a FailedSecurityPolicyApply message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply} FailedSecurityPolicyApply - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FailedSecurityPolicyApply.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.asset = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * ListContentRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @instance + */ + ListContentRequest.prototype.pageToken = ""; - /** - * Decodes a FailedSecurityPolicyApply message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply} FailedSecurityPolicyApply - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FailedSecurityPolicyApply.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * ListContentRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @instance + */ + ListContentRequest.prototype.filter = ""; - /** - * Verifies a FailedSecurityPolicyApply message. - * @function verify - * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FailedSecurityPolicyApply.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.asset != null && message.hasOwnProperty("asset")) - if (!$util.isString(message.asset)) - return "asset: string expected"; - return null; - }; + /** + * Creates a new ListContentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @static + * @param {google.cloud.dataplex.v1.IListContentRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListContentRequest} ListContentRequest instance + */ + ListContentRequest.create = function create(properties) { + return new ListContentRequest(properties); + }; - /** - * Creates a FailedSecurityPolicyApply message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply} FailedSecurityPolicyApply - */ - FailedSecurityPolicyApply.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply) - return object; - var message = new $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply(); - if (object.asset != null) - message.asset = String(object.asset); - return message; - }; + /** + * Encodes the specified ListContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListContentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @static + * @param {google.cloud.dataplex.v1.IListContentRequest} message ListContentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListContentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + return writer; + }; - /** - * Creates a plain object from a FailedSecurityPolicyApply message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply - * @static - * @param {google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply} message FailedSecurityPolicyApply - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FailedSecurityPolicyApply.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.asset = ""; - if (message.asset != null && message.hasOwnProperty("asset")) - object.asset = message.asset; - return object; - }; + /** + * Encodes the specified ListContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListContentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @static + * @param {google.cloud.dataplex.v1.IListContentRequest} message ListContentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListContentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Converts this FailedSecurityPolicyApply to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply - * @instance - * @returns {Object.} JSON object - */ - FailedSecurityPolicyApply.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a ListContentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListContentRequest} ListContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListContentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListContentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 4: + message.filter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - return FailedSecurityPolicyApply; - })(); + /** + * Decodes a ListContentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListContentRequest} ListContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListContentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - Action.InvalidDataFormat = (function() { + /** + * Verifies a ListContentRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListContentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; - /** - * Properties of an InvalidDataFormat. - * @memberof google.cloud.dataplex.v1.Action - * @interface IInvalidDataFormat - * @property {Array.|null} [sampledDataLocations] InvalidDataFormat sampledDataLocations - * @property {string|null} [expectedFormat] InvalidDataFormat expectedFormat - * @property {string|null} [newFormat] InvalidDataFormat newFormat - */ + /** + * Creates a ListContentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListContentRequest} ListContentRequest + */ + ListContentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListContentRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListContentRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; - /** - * Constructs a new InvalidDataFormat. - * @memberof google.cloud.dataplex.v1.Action - * @classdesc Represents an InvalidDataFormat. - * @implements IInvalidDataFormat - * @constructor - * @param {google.cloud.dataplex.v1.Action.IInvalidDataFormat=} [properties] Properties to set - */ - function InvalidDataFormat(properties) { - this.sampledDataLocations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Creates a plain object from a ListContentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @static + * @param {google.cloud.dataplex.v1.ListContentRequest} message ListContentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListContentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; - /** - * InvalidDataFormat sampledDataLocations. - * @member {Array.} sampledDataLocations - * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat - * @instance - */ - InvalidDataFormat.prototype.sampledDataLocations = $util.emptyArray; + /** + * Converts this ListContentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @instance + * @returns {Object.} JSON object + */ + ListContentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * InvalidDataFormat expectedFormat. - * @member {string} expectedFormat - * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat - * @instance - */ - InvalidDataFormat.prototype.expectedFormat = ""; + return ListContentRequest; + })(); - /** - * InvalidDataFormat newFormat. - * @member {string} newFormat - * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat - * @instance - */ - InvalidDataFormat.prototype.newFormat = ""; + v1.ListContentResponse = (function() { - /** - * Creates a new InvalidDataFormat instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat - * @static - * @param {google.cloud.dataplex.v1.Action.IInvalidDataFormat=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Action.InvalidDataFormat} InvalidDataFormat instance - */ - InvalidDataFormat.create = function create(properties) { - return new InvalidDataFormat(properties); - }; + /** + * Properties of a ListContentResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListContentResponse + * @property {Array.|null} [content] ListContentResponse content + * @property {string|null} [nextPageToken] ListContentResponse nextPageToken + */ - /** - * Encodes the specified InvalidDataFormat message. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataFormat.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat - * @static - * @param {google.cloud.dataplex.v1.Action.IInvalidDataFormat} message InvalidDataFormat message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InvalidDataFormat.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sampledDataLocations != null && message.sampledDataLocations.length) - for (var i = 0; i < message.sampledDataLocations.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sampledDataLocations[i]); - if (message.expectedFormat != null && Object.hasOwnProperty.call(message, "expectedFormat")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.expectedFormat); - if (message.newFormat != null && Object.hasOwnProperty.call(message, "newFormat")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.newFormat); - return writer; - }; + /** + * Constructs a new ListContentResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListContentResponse. + * @implements IListContentResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListContentResponse=} [properties] Properties to set + */ + function ListContentResponse(properties) { + this.content = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified InvalidDataFormat message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataFormat.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat - * @static - * @param {google.cloud.dataplex.v1.Action.IInvalidDataFormat} message InvalidDataFormat message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InvalidDataFormat.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * ListContentResponse content. + * @member {Array.} content + * @memberof google.cloud.dataplex.v1.ListContentResponse + * @instance + */ + ListContentResponse.prototype.content = $util.emptyArray; - /** - * Decodes an InvalidDataFormat message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Action.InvalidDataFormat} InvalidDataFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InvalidDataFormat.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.InvalidDataFormat(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.sampledDataLocations && message.sampledDataLocations.length)) - message.sampledDataLocations = []; - message.sampledDataLocations.push(reader.string()); - break; - case 2: - message.expectedFormat = reader.string(); - break; - case 3: - message.newFormat = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * ListContentResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListContentResponse + * @instance + */ + ListContentResponse.prototype.nextPageToken = ""; - /** - * Decodes an InvalidDataFormat message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Action.InvalidDataFormat} InvalidDataFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InvalidDataFormat.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new ListContentResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListContentResponse + * @static + * @param {google.cloud.dataplex.v1.IListContentResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListContentResponse} ListContentResponse instance + */ + ListContentResponse.create = function create(properties) { + return new ListContentResponse(properties); + }; - /** - * Verifies an InvalidDataFormat message. - * @function verify - * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InvalidDataFormat.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sampledDataLocations != null && message.hasOwnProperty("sampledDataLocations")) { - if (!Array.isArray(message.sampledDataLocations)) - return "sampledDataLocations: array expected"; - for (var i = 0; i < message.sampledDataLocations.length; ++i) - if (!$util.isString(message.sampledDataLocations[i])) - return "sampledDataLocations: string[] expected"; - } - if (message.expectedFormat != null && message.hasOwnProperty("expectedFormat")) - if (!$util.isString(message.expectedFormat)) - return "expectedFormat: string expected"; - if (message.newFormat != null && message.hasOwnProperty("newFormat")) - if (!$util.isString(message.newFormat)) - return "newFormat: string expected"; - return null; - }; + /** + * Encodes the specified ListContentResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListContentResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListContentResponse + * @static + * @param {google.cloud.dataplex.v1.IListContentResponse} message ListContentResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListContentResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.content != null && message.content.length) + for (var i = 0; i < message.content.length; ++i) + $root.google.cloud.dataplex.v1.Content.encode(message.content[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; - /** - * Creates an InvalidDataFormat message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Action.InvalidDataFormat} InvalidDataFormat - */ - InvalidDataFormat.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Action.InvalidDataFormat) - return object; - var message = new $root.google.cloud.dataplex.v1.Action.InvalidDataFormat(); - if (object.sampledDataLocations) { - if (!Array.isArray(object.sampledDataLocations)) - throw TypeError(".google.cloud.dataplex.v1.Action.InvalidDataFormat.sampledDataLocations: array expected"); - message.sampledDataLocations = []; - for (var i = 0; i < object.sampledDataLocations.length; ++i) - message.sampledDataLocations[i] = String(object.sampledDataLocations[i]); - } - if (object.expectedFormat != null) - message.expectedFormat = String(object.expectedFormat); - if (object.newFormat != null) - message.newFormat = String(object.newFormat); - return message; - }; + /** + * Encodes the specified ListContentResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListContentResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListContentResponse + * @static + * @param {google.cloud.dataplex.v1.IListContentResponse} message ListContentResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListContentResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a plain object from an InvalidDataFormat message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat - * @static - * @param {google.cloud.dataplex.v1.Action.InvalidDataFormat} message InvalidDataFormat - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InvalidDataFormat.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.sampledDataLocations = []; - if (options.defaults) { - object.expectedFormat = ""; - object.newFormat = ""; + /** + * Decodes a ListContentResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListContentResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListContentResponse} ListContentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListContentResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListContentResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.content && message.content.length)) + message.content = []; + message.content.push($root.google.cloud.dataplex.v1.Content.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } - if (message.sampledDataLocations && message.sampledDataLocations.length) { - object.sampledDataLocations = []; - for (var j = 0; j < message.sampledDataLocations.length; ++j) - object.sampledDataLocations[j] = message.sampledDataLocations[j]; + } + return message; + }; + + /** + * Decodes a ListContentResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListContentResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListContentResponse} ListContentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListContentResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListContentResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListContentResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListContentResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.content != null && message.hasOwnProperty("content")) { + if (!Array.isArray(message.content)) + return "content: array expected"; + for (var i = 0; i < message.content.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Content.verify(message.content[i]); + if (error) + return "content." + error; } - if (message.expectedFormat != null && message.hasOwnProperty("expectedFormat")) - object.expectedFormat = message.expectedFormat; - if (message.newFormat != null && message.hasOwnProperty("newFormat")) - object.newFormat = message.newFormat; + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListContentResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListContentResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListContentResponse} ListContentResponse + */ + ListContentResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListContentResponse) return object; - }; + var message = new $root.google.cloud.dataplex.v1.ListContentResponse(); + if (object.content) { + if (!Array.isArray(object.content)) + throw TypeError(".google.cloud.dataplex.v1.ListContentResponse.content: array expected"); + message.content = []; + for (var i = 0; i < object.content.length; ++i) { + if (typeof object.content[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListContentResponse.content: object expected"); + message.content[i] = $root.google.cloud.dataplex.v1.Content.fromObject(object.content[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; - /** - * Converts this InvalidDataFormat to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat - * @instance - * @returns {Object.} JSON object - */ - InvalidDataFormat.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a ListContentResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListContentResponse + * @static + * @param {google.cloud.dataplex.v1.ListContentResponse} message ListContentResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListContentResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.content = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.content && message.content.length) { + object.content = []; + for (var j = 0; j < message.content.length; ++j) + object.content[j] = $root.google.cloud.dataplex.v1.Content.toObject(message.content[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; - return InvalidDataFormat; - })(); + /** + * Converts this ListContentResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListContentResponse + * @instance + * @returns {Object.} JSON object + */ + ListContentResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - Action.IncompatibleDataSchema = (function() { + return ListContentResponse; + })(); - /** - * Properties of an IncompatibleDataSchema. - * @memberof google.cloud.dataplex.v1.Action - * @interface IIncompatibleDataSchema - * @property {string|null} [table] IncompatibleDataSchema table - * @property {string|null} [existingSchema] IncompatibleDataSchema existingSchema - * @property {string|null} [newSchema] IncompatibleDataSchema newSchema - * @property {Array.|null} [sampledDataLocations] IncompatibleDataSchema sampledDataLocations - * @property {google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange|null} [schemaChange] IncompatibleDataSchema schemaChange - */ + v1.GetContentRequest = (function() { - /** - * Constructs a new IncompatibleDataSchema. - * @memberof google.cloud.dataplex.v1.Action - * @classdesc Represents an IncompatibleDataSchema. - * @implements IIncompatibleDataSchema - * @constructor - * @param {google.cloud.dataplex.v1.Action.IIncompatibleDataSchema=} [properties] Properties to set - */ - function IncompatibleDataSchema(properties) { - this.sampledDataLocations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a GetContentRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetContentRequest + * @property {string|null} [name] GetContentRequest name + * @property {google.cloud.dataplex.v1.GetContentRequest.ContentView|null} [view] GetContentRequest view + */ - /** - * IncompatibleDataSchema table. - * @member {string} table - * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema - * @instance - */ - IncompatibleDataSchema.prototype.table = ""; + /** + * Constructs a new GetContentRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetContentRequest. + * @implements IGetContentRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetContentRequest=} [properties] Properties to set + */ + function GetContentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * IncompatibleDataSchema existingSchema. - * @member {string} existingSchema - * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema - * @instance - */ - IncompatibleDataSchema.prototype.existingSchema = ""; + /** + * GetContentRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetContentRequest + * @instance + */ + GetContentRequest.prototype.name = ""; - /** - * IncompatibleDataSchema newSchema. - * @member {string} newSchema - * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema - * @instance - */ - IncompatibleDataSchema.prototype.newSchema = ""; + /** + * GetContentRequest view. + * @member {google.cloud.dataplex.v1.GetContentRequest.ContentView} view + * @memberof google.cloud.dataplex.v1.GetContentRequest + * @instance + */ + GetContentRequest.prototype.view = 0; - /** - * IncompatibleDataSchema sampledDataLocations. - * @member {Array.} sampledDataLocations - * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema - * @instance - */ - IncompatibleDataSchema.prototype.sampledDataLocations = $util.emptyArray; + /** + * Creates a new GetContentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetContentRequest + * @static + * @param {google.cloud.dataplex.v1.IGetContentRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetContentRequest} GetContentRequest instance + */ + GetContentRequest.create = function create(properties) { + return new GetContentRequest(properties); + }; - /** - * IncompatibleDataSchema schemaChange. - * @member {google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange} schemaChange - * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema - * @instance - */ - IncompatibleDataSchema.prototype.schemaChange = 0; + /** + * Encodes the specified GetContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetContentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetContentRequest + * @static + * @param {google.cloud.dataplex.v1.IGetContentRequest} message GetContentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetContentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + return writer; + }; - /** - * Creates a new IncompatibleDataSchema instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema - * @static - * @param {google.cloud.dataplex.v1.Action.IIncompatibleDataSchema=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Action.IncompatibleDataSchema} IncompatibleDataSchema instance - */ - IncompatibleDataSchema.create = function create(properties) { - return new IncompatibleDataSchema(properties); - }; + /** + * Encodes the specified GetContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetContentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetContentRequest + * @static + * @param {google.cloud.dataplex.v1.IGetContentRequest} message GetContentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetContentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified IncompatibleDataSchema message. Does not implicitly {@link google.cloud.dataplex.v1.Action.IncompatibleDataSchema.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema - * @static - * @param {google.cloud.dataplex.v1.Action.IIncompatibleDataSchema} message IncompatibleDataSchema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IncompatibleDataSchema.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.table != null && Object.hasOwnProperty.call(message, "table")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.table); - if (message.existingSchema != null && Object.hasOwnProperty.call(message, "existingSchema")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.existingSchema); - if (message.newSchema != null && Object.hasOwnProperty.call(message, "newSchema")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.newSchema); - if (message.sampledDataLocations != null && message.sampledDataLocations.length) - for (var i = 0; i < message.sampledDataLocations.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.sampledDataLocations[i]); - if (message.schemaChange != null && Object.hasOwnProperty.call(message, "schemaChange")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.schemaChange); - return writer; - }; + /** + * Decodes a GetContentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetContentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetContentRequest} GetContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetContentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetContentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.view = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified IncompatibleDataSchema message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.IncompatibleDataSchema.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema - * @static - * @param {google.cloud.dataplex.v1.Action.IIncompatibleDataSchema} message IncompatibleDataSchema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IncompatibleDataSchema.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes a GetContentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetContentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetContentRequest} GetContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetContentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes an IncompatibleDataSchema message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Action.IncompatibleDataSchema} IncompatibleDataSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IncompatibleDataSchema.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.table = reader.string(); - break; - case 2: - message.existingSchema = reader.string(); - break; - case 3: - message.newSchema = reader.string(); - break; - case 4: - if (!(message.sampledDataLocations && message.sampledDataLocations.length)) - message.sampledDataLocations = []; - message.sampledDataLocations.push(reader.string()); - break; - case 5: - message.schemaChange = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Verifies a GetContentRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetContentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetContentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; } - return message; - }; + return null; + }; - /** - * Decodes an IncompatibleDataSchema message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Action.IncompatibleDataSchema} IncompatibleDataSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IncompatibleDataSchema.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an IncompatibleDataSchema message. - * @function verify - * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IncompatibleDataSchema.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.table != null && message.hasOwnProperty("table")) - if (!$util.isString(message.table)) - return "table: string expected"; - if (message.existingSchema != null && message.hasOwnProperty("existingSchema")) - if (!$util.isString(message.existingSchema)) - return "existingSchema: string expected"; - if (message.newSchema != null && message.hasOwnProperty("newSchema")) - if (!$util.isString(message.newSchema)) - return "newSchema: string expected"; - if (message.sampledDataLocations != null && message.hasOwnProperty("sampledDataLocations")) { - if (!Array.isArray(message.sampledDataLocations)) - return "sampledDataLocations: array expected"; - for (var i = 0; i < message.sampledDataLocations.length; ++i) - if (!$util.isString(message.sampledDataLocations[i])) - return "sampledDataLocations: string[] expected"; - } - if (message.schemaChange != null && message.hasOwnProperty("schemaChange")) - switch (message.schemaChange) { - default: - return "schemaChange: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates an IncompatibleDataSchema message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Action.IncompatibleDataSchema} IncompatibleDataSchema - */ - IncompatibleDataSchema.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema) - return object; - var message = new $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema(); - if (object.table != null) - message.table = String(object.table); - if (object.existingSchema != null) - message.existingSchema = String(object.existingSchema); - if (object.newSchema != null) - message.newSchema = String(object.newSchema); - if (object.sampledDataLocations) { - if (!Array.isArray(object.sampledDataLocations)) - throw TypeError(".google.cloud.dataplex.v1.Action.IncompatibleDataSchema.sampledDataLocations: array expected"); - message.sampledDataLocations = []; - for (var i = 0; i < object.sampledDataLocations.length; ++i) - message.sampledDataLocations[i] = String(object.sampledDataLocations[i]); - } - switch (object.schemaChange) { - case "SCHEMA_CHANGE_UNSPECIFIED": - case 0: - message.schemaChange = 0; - break; - case "INCOMPATIBLE": - case 1: - message.schemaChange = 1; - break; - case "MODIFIED": - case 2: - message.schemaChange = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from an IncompatibleDataSchema message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema - * @static - * @param {google.cloud.dataplex.v1.Action.IncompatibleDataSchema} message IncompatibleDataSchema - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IncompatibleDataSchema.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.sampledDataLocations = []; - if (options.defaults) { - object.table = ""; - object.existingSchema = ""; - object.newSchema = ""; - object.schemaChange = options.enums === String ? "SCHEMA_CHANGE_UNSPECIFIED" : 0; - } - if (message.table != null && message.hasOwnProperty("table")) - object.table = message.table; - if (message.existingSchema != null && message.hasOwnProperty("existingSchema")) - object.existingSchema = message.existingSchema; - if (message.newSchema != null && message.hasOwnProperty("newSchema")) - object.newSchema = message.newSchema; - if (message.sampledDataLocations && message.sampledDataLocations.length) { - object.sampledDataLocations = []; - for (var j = 0; j < message.sampledDataLocations.length; ++j) - object.sampledDataLocations[j] = message.sampledDataLocations[j]; - } - if (message.schemaChange != null && message.hasOwnProperty("schemaChange")) - object.schemaChange = options.enums === String ? $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange[message.schemaChange] : message.schemaChange; + /** + * Creates a GetContentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetContentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetContentRequest} GetContentRequest + */ + GetContentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetContentRequest) return object; - }; + var message = new $root.google.cloud.dataplex.v1.GetContentRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.view) { + case "CONTENT_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BASIC": + case 1: + message.view = 1; + break; + case "FULL": + case 2: + message.view = 2; + break; + } + return message; + }; - /** - * Converts this IncompatibleDataSchema to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema - * @instance - * @returns {Object.} JSON object - */ - IncompatibleDataSchema.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a GetContentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetContentRequest + * @static + * @param {google.cloud.dataplex.v1.GetContentRequest} message GetContentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetContentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.view = options.enums === String ? "CONTENT_VIEW_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.dataplex.v1.GetContentRequest.ContentView[message.view] : message.view; + return object; + }; - /** - * SchemaChange enum. - * @name google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange - * @enum {number} - * @property {number} SCHEMA_CHANGE_UNSPECIFIED=0 SCHEMA_CHANGE_UNSPECIFIED value - * @property {number} INCOMPATIBLE=1 INCOMPATIBLE value - * @property {number} MODIFIED=2 MODIFIED value - */ - IncompatibleDataSchema.SchemaChange = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SCHEMA_CHANGE_UNSPECIFIED"] = 0; - values[valuesById[1] = "INCOMPATIBLE"] = 1; - values[valuesById[2] = "MODIFIED"] = 2; - return values; - })(); + /** + * Converts this GetContentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetContentRequest + * @instance + * @returns {Object.} JSON object + */ + GetContentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return IncompatibleDataSchema; + /** + * ContentView enum. + * @name google.cloud.dataplex.v1.GetContentRequest.ContentView + * @enum {number} + * @property {number} CONTENT_VIEW_UNSPECIFIED=0 CONTENT_VIEW_UNSPECIFIED value + * @property {number} BASIC=1 BASIC value + * @property {number} FULL=2 FULL value + */ + GetContentRequest.ContentView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CONTENT_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "BASIC"] = 1; + values[valuesById[2] = "FULL"] = 2; + return values; })(); - Action.InvalidDataPartition = (function() { - - /** - * Properties of an InvalidDataPartition. - * @memberof google.cloud.dataplex.v1.Action - * @interface IInvalidDataPartition - * @property {google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure|null} [expectedStructure] InvalidDataPartition expectedStructure - */ + return GetContentRequest; + })(); - /** - * Constructs a new InvalidDataPartition. - * @memberof google.cloud.dataplex.v1.Action - * @classdesc Represents an InvalidDataPartition. - * @implements IInvalidDataPartition - * @constructor - * @param {google.cloud.dataplex.v1.Action.IInvalidDataPartition=} [properties] Properties to set - */ - function InvalidDataPartition(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + v1.DiscoveryEvent = (function() { - /** - * InvalidDataPartition expectedStructure. - * @member {google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure} expectedStructure - * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition - * @instance - */ - InvalidDataPartition.prototype.expectedStructure = 0; + /** + * Properties of a DiscoveryEvent. + * @memberof google.cloud.dataplex.v1 + * @interface IDiscoveryEvent + * @property {string|null} [message] DiscoveryEvent message + * @property {string|null} [lakeId] DiscoveryEvent lakeId + * @property {string|null} [zoneId] DiscoveryEvent zoneId + * @property {string|null} [assetId] DiscoveryEvent assetId + * @property {string|null} [dataLocation] DiscoveryEvent dataLocation + * @property {google.cloud.dataplex.v1.DiscoveryEvent.EventType|null} [type] DiscoveryEvent type + * @property {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null} [config] DiscoveryEvent config + * @property {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null} [entity] DiscoveryEvent entity + * @property {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null} [partition] DiscoveryEvent partition + * @property {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null} [action] DiscoveryEvent action + */ - /** - * Creates a new InvalidDataPartition instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition - * @static - * @param {google.cloud.dataplex.v1.Action.IInvalidDataPartition=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Action.InvalidDataPartition} InvalidDataPartition instance - */ - InvalidDataPartition.create = function create(properties) { - return new InvalidDataPartition(properties); - }; - - /** - * Encodes the specified InvalidDataPartition message. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataPartition.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition - * @static - * @param {google.cloud.dataplex.v1.Action.IInvalidDataPartition} message InvalidDataPartition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InvalidDataPartition.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.expectedStructure != null && Object.hasOwnProperty.call(message, "expectedStructure")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.expectedStructure); - return writer; - }; - - /** - * Encodes the specified InvalidDataPartition message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataPartition.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition - * @static - * @param {google.cloud.dataplex.v1.Action.IInvalidDataPartition} message InvalidDataPartition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InvalidDataPartition.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Constructs a new DiscoveryEvent. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DiscoveryEvent. + * @implements IDiscoveryEvent + * @constructor + * @param {google.cloud.dataplex.v1.IDiscoveryEvent=} [properties] Properties to set + */ + function DiscoveryEvent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Decodes an InvalidDataPartition message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Action.InvalidDataPartition} InvalidDataPartition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InvalidDataPartition.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.InvalidDataPartition(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.expectedStructure = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * DiscoveryEvent message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.message = ""; - /** - * Decodes an InvalidDataPartition message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Action.InvalidDataPartition} InvalidDataPartition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InvalidDataPartition.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * DiscoveryEvent lakeId. + * @member {string} lakeId + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.lakeId = ""; - /** - * Verifies an InvalidDataPartition message. - * @function verify - * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InvalidDataPartition.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.expectedStructure != null && message.hasOwnProperty("expectedStructure")) - switch (message.expectedStructure) { - default: - return "expectedStructure: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; + /** + * DiscoveryEvent zoneId. + * @member {string} zoneId + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.zoneId = ""; - /** - * Creates an InvalidDataPartition message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Action.InvalidDataPartition} InvalidDataPartition - */ - InvalidDataPartition.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Action.InvalidDataPartition) - return object; - var message = new $root.google.cloud.dataplex.v1.Action.InvalidDataPartition(); - switch (object.expectedStructure) { - case "PARTITION_STRUCTURE_UNSPECIFIED": - case 0: - message.expectedStructure = 0; - break; - case "CONSISTENT_KEYS": - case 1: - message.expectedStructure = 1; - break; - case "HIVE_STYLE_KEYS": - case 2: - message.expectedStructure = 2; - break; - } - return message; - }; + /** + * DiscoveryEvent assetId. + * @member {string} assetId + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.assetId = ""; - /** - * Creates a plain object from an InvalidDataPartition message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition - * @static - * @param {google.cloud.dataplex.v1.Action.InvalidDataPartition} message InvalidDataPartition - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InvalidDataPartition.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.expectedStructure = options.enums === String ? "PARTITION_STRUCTURE_UNSPECIFIED" : 0; - if (message.expectedStructure != null && message.hasOwnProperty("expectedStructure")) - object.expectedStructure = options.enums === String ? $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure[message.expectedStructure] : message.expectedStructure; - return object; - }; + /** + * DiscoveryEvent dataLocation. + * @member {string} dataLocation + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.dataLocation = ""; - /** - * Converts this InvalidDataPartition to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition - * @instance - * @returns {Object.} JSON object - */ - InvalidDataPartition.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * DiscoveryEvent type. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.EventType} type + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.type = 0; - /** - * PartitionStructure enum. - * @name google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure - * @enum {number} - * @property {number} PARTITION_STRUCTURE_UNSPECIFIED=0 PARTITION_STRUCTURE_UNSPECIFIED value - * @property {number} CONSISTENT_KEYS=1 CONSISTENT_KEYS value - * @property {number} HIVE_STYLE_KEYS=2 HIVE_STYLE_KEYS value - */ - InvalidDataPartition.PartitionStructure = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PARTITION_STRUCTURE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CONSISTENT_KEYS"] = 1; - values[valuesById[2] = "HIVE_STYLE_KEYS"] = 2; - return values; - })(); + /** + * DiscoveryEvent config. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null|undefined} config + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.config = null; - return InvalidDataPartition; - })(); + /** + * DiscoveryEvent entity. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null|undefined} entity + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.entity = null; - Action.MissingData = (function() { + /** + * DiscoveryEvent partition. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null|undefined} partition + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.partition = null; - /** - * Properties of a MissingData. - * @memberof google.cloud.dataplex.v1.Action - * @interface IMissingData - */ + /** + * DiscoveryEvent action. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null|undefined} action + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.action = null; - /** - * Constructs a new MissingData. - * @memberof google.cloud.dataplex.v1.Action - * @classdesc Represents a MissingData. - * @implements IMissingData - * @constructor - * @param {google.cloud.dataplex.v1.Action.IMissingData=} [properties] Properties to set - */ - function MissingData(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Creates a new MissingData instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Action.MissingData - * @static - * @param {google.cloud.dataplex.v1.Action.IMissingData=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Action.MissingData} MissingData instance - */ - MissingData.create = function create(properties) { - return new MissingData(properties); - }; + /** + * DiscoveryEvent details. + * @member {"config"|"entity"|"partition"|"action"|undefined} details + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + Object.defineProperty(DiscoveryEvent.prototype, "details", { + get: $util.oneOfGetter($oneOfFields = ["config", "entity", "partition", "action"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Encodes the specified MissingData message. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingData.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Action.MissingData - * @static - * @param {google.cloud.dataplex.v1.Action.IMissingData} message MissingData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MissingData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; + /** + * Creates a new DiscoveryEvent instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {google.cloud.dataplex.v1.IDiscoveryEvent=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent instance + */ + DiscoveryEvent.create = function create(properties) { + return new DiscoveryEvent(properties); + }; - /** - * Encodes the specified MissingData message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingData.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Action.MissingData - * @static - * @param {google.cloud.dataplex.v1.Action.IMissingData} message MissingData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MissingData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified DiscoveryEvent message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {google.cloud.dataplex.v1.IDiscoveryEvent} message DiscoveryEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + if (message.lakeId != null && Object.hasOwnProperty.call(message, "lakeId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.lakeId); + if (message.zoneId != null && Object.hasOwnProperty.call(message, "zoneId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.zoneId); + if (message.assetId != null && Object.hasOwnProperty.call(message, "assetId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.assetId); + if (message.dataLocation != null && Object.hasOwnProperty.call(message, "dataLocation")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.dataLocation); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.type); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.encode(message.config, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) + $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.encode(message.entity, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) + $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.encode(message.partition, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.encode(message.action, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + return writer; + }; - /** - * Decodes a MissingData message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Action.MissingData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Action.MissingData} MissingData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MissingData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.MissingData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified DiscoveryEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {google.cloud.dataplex.v1.IDiscoveryEvent} message DiscoveryEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a MissingData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Action.MissingData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Action.MissingData} MissingData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MissingData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a DiscoveryEvent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.message = reader.string(); + break; + case 2: + message.lakeId = reader.string(); + break; + case 3: + message.zoneId = reader.string(); + break; + case 4: + message.assetId = reader.string(); + break; + case 5: + message.dataLocation = reader.string(); + break; + case 10: + message.type = reader.int32(); + break; + case 20: + message.config = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.decode(reader, reader.uint32()); + break; + case 21: + message.entity = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.decode(reader, reader.uint32()); + break; + case 22: + message.partition = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.decode(reader, reader.uint32()); + break; + case 23: + message.action = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Verifies a MissingData message. - * @function verify - * @memberof google.cloud.dataplex.v1.Action.MissingData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MissingData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; + /** + * Decodes a DiscoveryEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a MissingData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Action.MissingData + /** + * Verifies a DiscoveryEvent message. + * @function verify + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoveryEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.lakeId != null && message.hasOwnProperty("lakeId")) + if (!$util.isString(message.lakeId)) + return "lakeId: string expected"; + if (message.zoneId != null && message.hasOwnProperty("zoneId")) + if (!$util.isString(message.zoneId)) + return "zoneId: string expected"; + if (message.assetId != null && message.hasOwnProperty("assetId")) + if (!$util.isString(message.assetId)) + return "assetId: string expected"; + if (message.dataLocation != null && message.hasOwnProperty("dataLocation")) + if (!$util.isString(message.dataLocation)) + return "dataLocation: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.config != null && message.hasOwnProperty("config")) { + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify(message.config); + if (error) + return "config." + error; + } + } + if (message.entity != null && message.hasOwnProperty("entity")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify(message.entity); + if (error) + return "entity." + error; + } + } + if (message.partition != null && message.hasOwnProperty("partition")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify(message.partition); + if (error) + return "partition." + error; + } + } + if (message.action != null && message.hasOwnProperty("action")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify(message.action); + if (error) + return "action." + error; + } + } + return null; + }; + + /** + * Creates a DiscoveryEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent + */ + DiscoveryEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent) + return object; + var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent(); + if (object.message != null) + message.message = String(object.message); + if (object.lakeId != null) + message.lakeId = String(object.lakeId); + if (object.zoneId != null) + message.zoneId = String(object.zoneId); + if (object.assetId != null) + message.assetId = String(object.assetId); + if (object.dataLocation != null) + message.dataLocation = String(object.dataLocation); + switch (object.type) { + case "EVENT_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "CONFIG": + case 1: + message.type = 1; + break; + case "ENTITY_CREATED": + case 2: + message.type = 2; + break; + case "ENTITY_UPDATED": + case 3: + message.type = 3; + break; + case "ENTITY_DELETED": + case 4: + message.type = 4; + break; + case "PARTITION_CREATED": + case 5: + message.type = 5; + break; + case "PARTITION_UPDATED": + case 6: + message.type = 6; + break; + case "PARTITION_DELETED": + case 7: + message.type = 7; + break; + } + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.config: object expected"); + message.config = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.fromObject(object.config); + } + if (object.entity != null) { + if (typeof object.entity !== "object") + throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.entity: object expected"); + message.entity = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.fromObject(object.entity); + } + if (object.partition != null) { + if (typeof object.partition !== "object") + throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.partition: object expected"); + message.partition = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.fromObject(object.partition); + } + if (object.action != null) { + if (typeof object.action !== "object") + throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.action: object expected"); + message.action = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.fromObject(object.action); + } + return message; + }; + + /** + * Creates a plain object from a DiscoveryEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent} message DiscoveryEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoveryEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.message = ""; + object.lakeId = ""; + object.zoneId = ""; + object.assetId = ""; + object.dataLocation = ""; + object.type = options.enums === String ? "EVENT_TYPE_UNSPECIFIED" : 0; + } + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.lakeId != null && message.hasOwnProperty("lakeId")) + object.lakeId = message.lakeId; + if (message.zoneId != null && message.hasOwnProperty("zoneId")) + object.zoneId = message.zoneId; + if (message.assetId != null && message.hasOwnProperty("assetId")) + object.assetId = message.assetId; + if (message.dataLocation != null && message.hasOwnProperty("dataLocation")) + object.dataLocation = message.dataLocation; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DiscoveryEvent.EventType[message.type] : message.type; + if (message.config != null && message.hasOwnProperty("config")) { + object.config = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.toObject(message.config, options); + if (options.oneofs) + object.details = "config"; + } + if (message.entity != null && message.hasOwnProperty("entity")) { + object.entity = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.toObject(message.entity, options); + if (options.oneofs) + object.details = "entity"; + } + if (message.partition != null && message.hasOwnProperty("partition")) { + object.partition = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.toObject(message.partition, options); + if (options.oneofs) + object.details = "partition"; + } + if (message.action != null && message.hasOwnProperty("action")) { + object.action = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.toObject(message.action, options); + if (options.oneofs) + object.details = "action"; + } + return object; + }; + + /** + * Converts this DiscoveryEvent to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + * @returns {Object.} JSON object + */ + DiscoveryEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * EventType enum. + * @name google.cloud.dataplex.v1.DiscoveryEvent.EventType + * @enum {number} + * @property {number} EVENT_TYPE_UNSPECIFIED=0 EVENT_TYPE_UNSPECIFIED value + * @property {number} CONFIG=1 CONFIG value + * @property {number} ENTITY_CREATED=2 ENTITY_CREATED value + * @property {number} ENTITY_UPDATED=3 ENTITY_UPDATED value + * @property {number} ENTITY_DELETED=4 ENTITY_DELETED value + * @property {number} PARTITION_CREATED=5 PARTITION_CREATED value + * @property {number} PARTITION_UPDATED=6 PARTITION_UPDATED value + * @property {number} PARTITION_DELETED=7 PARTITION_DELETED value + */ + DiscoveryEvent.EventType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EVENT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CONFIG"] = 1; + values[valuesById[2] = "ENTITY_CREATED"] = 2; + values[valuesById[3] = "ENTITY_UPDATED"] = 3; + values[valuesById[4] = "ENTITY_DELETED"] = 4; + values[valuesById[5] = "PARTITION_CREATED"] = 5; + values[valuesById[6] = "PARTITION_UPDATED"] = 6; + values[valuesById[7] = "PARTITION_DELETED"] = 7; + return values; + })(); + + /** + * EntityType enum. + * @name google.cloud.dataplex.v1.DiscoveryEvent.EntityType + * @enum {number} + * @property {number} ENTITY_TYPE_UNSPECIFIED=0 ENTITY_TYPE_UNSPECIFIED value + * @property {number} TABLE=1 TABLE value + * @property {number} FILESET=2 FILESET value + */ + DiscoveryEvent.EntityType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENTITY_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TABLE"] = 1; + values[valuesById[2] = "FILESET"] = 2; + return values; + })(); + + DiscoveryEvent.ConfigDetails = (function() { + + /** + * Properties of a ConfigDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @interface IConfigDetails + * @property {Object.|null} [parameters] ConfigDetails parameters + */ + + /** + * Constructs a new ConfigDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @classdesc Represents a ConfigDetails. + * @implements IConfigDetails + * @constructor + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails=} [properties] Properties to set + */ + function ConfigDetails(properties) { + this.parameters = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConfigDetails parameters. + * @member {Object.} parameters + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @instance + */ + ConfigDetails.prototype.parameters = $util.emptyObject; + + /** + * Creates a new ConfigDetails instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails instance + */ + ConfigDetails.create = function create(properties) { + return new ConfigDetails(properties); + }; + + /** + * Encodes the specified ConfigDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails} message ConfigDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfigDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) + for (var keys = Object.keys(message.parameters), i = 0; i < keys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.parameters[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified ConfigDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails} message ConfigDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfigDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConfigDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfigDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (message.parameters === $util.emptyObject) + message.parameters = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.parameters[key] = value; + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConfigDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfigDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConfigDetails message. + * @function verify + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConfigDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parameters != null && message.hasOwnProperty("parameters")) { + if (!$util.isObject(message.parameters)) + return "parameters: object expected"; + var key = Object.keys(message.parameters); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.parameters[key[i]])) + return "parameters: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a ConfigDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails + */ + ConfigDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails) + return object; + var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails(); + if (object.parameters) { + if (typeof object.parameters !== "object") + throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.parameters: object expected"); + message.parameters = {}; + for (var keys = Object.keys(object.parameters), i = 0; i < keys.length; ++i) + message.parameters[keys[i]] = String(object.parameters[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a ConfigDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} message ConfigDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConfigDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.parameters = {}; + var keys2; + if (message.parameters && (keys2 = Object.keys(message.parameters)).length) { + object.parameters = {}; + for (var j = 0; j < keys2.length; ++j) + object.parameters[keys2[j]] = message.parameters[keys2[j]]; + } + return object; + }; + + /** + * Converts this ConfigDetails to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @instance + * @returns {Object.} JSON object + */ + ConfigDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ConfigDetails; + })(); + + DiscoveryEvent.EntityDetails = (function() { + + /** + * Properties of an EntityDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @interface IEntityDetails + * @property {string|null} [entity] EntityDetails entity + * @property {google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null} [type] EntityDetails type + */ + + /** + * Constructs a new EntityDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @classdesc Represents an EntityDetails. + * @implements IEntityDetails + * @constructor + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails=} [properties] Properties to set + */ + function EntityDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EntityDetails entity. + * @member {string} entity + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @instance + */ + EntityDetails.prototype.entity = ""; + + /** + * EntityDetails type. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.EntityType} type + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @instance + */ + EntityDetails.prototype.type = 0; + + /** + * Creates a new EntityDetails instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails instance + */ + EntityDetails.create = function create(properties) { + return new EntityDetails(properties); + }; + + /** + * Encodes the specified EntityDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails} message EntityDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntityDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.entity); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + return writer; + }; + + /** + * Encodes the specified EntityDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails} message EntityDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntityDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EntityDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntityDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.entity = reader.string(); + break; + case 2: + message.type = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EntityDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntityDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EntityDetails message. + * @function verify + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EntityDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.entity != null && message.hasOwnProperty("entity")) + if (!$util.isString(message.entity)) + return "entity: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an EntityDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails + */ + EntityDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails) + return object; + var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails(); + if (object.entity != null) + message.entity = String(object.entity); + switch (object.type) { + case "ENTITY_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "TABLE": + case 1: + message.type = 1; + break; + case "FILESET": + case 2: + message.type = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an EntityDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} message EntityDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EntityDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.entity = ""; + object.type = options.enums === String ? "ENTITY_TYPE_UNSPECIFIED" : 0; + } + if (message.entity != null && message.hasOwnProperty("entity")) + object.entity = message.entity; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityType[message.type] : message.type; + return object; + }; + + /** + * Converts this EntityDetails to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @instance + * @returns {Object.} JSON object + */ + EntityDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EntityDetails; + })(); + + DiscoveryEvent.PartitionDetails = (function() { + + /** + * Properties of a PartitionDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @interface IPartitionDetails + * @property {string|null} [partition] PartitionDetails partition + * @property {string|null} [entity] PartitionDetails entity + * @property {google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null} [type] PartitionDetails type + */ + + /** + * Constructs a new PartitionDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @classdesc Represents a PartitionDetails. + * @implements IPartitionDetails + * @constructor + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails=} [properties] Properties to set + */ + function PartitionDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PartitionDetails partition. + * @member {string} partition + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @instance + */ + PartitionDetails.prototype.partition = ""; + + /** + * PartitionDetails entity. + * @member {string} entity + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @instance + */ + PartitionDetails.prototype.entity = ""; + + /** + * PartitionDetails type. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.EntityType} type + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @instance + */ + PartitionDetails.prototype.type = 0; + + /** + * Creates a new PartitionDetails instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails instance + */ + PartitionDetails.create = function create(properties) { + return new PartitionDetails(properties); + }; + + /** + * Encodes the specified PartitionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails} message PartitionDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartitionDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.partition); + if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.entity); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type); + return writer; + }; + + /** + * Encodes the specified PartitionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails} message PartitionDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartitionDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PartitionDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartitionDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.partition = reader.string(); + break; + case 2: + message.entity = reader.string(); + break; + case 3: + message.type = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PartitionDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartitionDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PartitionDetails message. + * @function verify + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PartitionDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.partition != null && message.hasOwnProperty("partition")) + if (!$util.isString(message.partition)) + return "partition: string expected"; + if (message.entity != null && message.hasOwnProperty("entity")) + if (!$util.isString(message.entity)) + return "entity: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a PartitionDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails + */ + PartitionDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails) + return object; + var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails(); + if (object.partition != null) + message.partition = String(object.partition); + if (object.entity != null) + message.entity = String(object.entity); + switch (object.type) { + case "ENTITY_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "TABLE": + case 1: + message.type = 1; + break; + case "FILESET": + case 2: + message.type = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a PartitionDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} message PartitionDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PartitionDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.partition = ""; + object.entity = ""; + object.type = options.enums === String ? "ENTITY_TYPE_UNSPECIFIED" : 0; + } + if (message.partition != null && message.hasOwnProperty("partition")) + object.partition = message.partition; + if (message.entity != null && message.hasOwnProperty("entity")) + object.entity = message.entity; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityType[message.type] : message.type; + return object; + }; + + /** + * Converts this PartitionDetails to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @instance + * @returns {Object.} JSON object + */ + PartitionDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PartitionDetails; + })(); + + DiscoveryEvent.ActionDetails = (function() { + + /** + * Properties of an ActionDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @interface IActionDetails + * @property {string|null} [type] ActionDetails type + */ + + /** + * Constructs a new ActionDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @classdesc Represents an ActionDetails. + * @implements IActionDetails + * @constructor + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails=} [properties] Properties to set + */ + function ActionDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ActionDetails type. + * @member {string} type + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @instance + */ + ActionDetails.prototype.type = ""; + + /** + * Creates a new ActionDetails instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails instance + */ + ActionDetails.create = function create(properties) { + return new ActionDetails(properties); + }; + + /** + * Encodes the specified ActionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails} message ActionDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActionDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + return writer; + }; + + /** + * Encodes the specified ActionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails} message ActionDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActionDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ActionDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActionDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ActionDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActionDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ActionDetails message. + * @function verify + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ActionDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + return null; + }; + + /** + * Creates an ActionDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails + */ + ActionDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails) + return object; + var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails(); + if (object.type != null) + message.type = String(object.type); + return message; + }; + + /** + * Creates a plain object from an ActionDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} message ActionDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ActionDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.type = ""; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + return object; + }; + + /** + * Converts this ActionDetails to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @instance + * @returns {Object.} JSON object + */ + ActionDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ActionDetails; + })(); + + return DiscoveryEvent; + })(); + + v1.JobEvent = (function() { + + /** + * Properties of a JobEvent. + * @memberof google.cloud.dataplex.v1 + * @interface IJobEvent + * @property {string|null} [message] JobEvent message + * @property {string|null} [jobId] JobEvent jobId + * @property {google.protobuf.ITimestamp|null} [startTime] JobEvent startTime + * @property {google.protobuf.ITimestamp|null} [endTime] JobEvent endTime + * @property {google.cloud.dataplex.v1.JobEvent.State|null} [state] JobEvent state + * @property {number|null} [retries] JobEvent retries + * @property {google.cloud.dataplex.v1.JobEvent.Type|null} [type] JobEvent type + * @property {google.cloud.dataplex.v1.JobEvent.Service|null} [service] JobEvent service + * @property {string|null} [serviceJob] JobEvent serviceJob + */ + + /** + * Constructs a new JobEvent. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a JobEvent. + * @implements IJobEvent + * @constructor + * @param {google.cloud.dataplex.v1.IJobEvent=} [properties] Properties to set + */ + function JobEvent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JobEvent message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.message = ""; + + /** + * JobEvent jobId. + * @member {string} jobId + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.jobId = ""; + + /** + * JobEvent startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.startTime = null; + + /** + * JobEvent endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.endTime = null; + + /** + * JobEvent state. + * @member {google.cloud.dataplex.v1.JobEvent.State} state + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.state = 0; + + /** + * JobEvent retries. + * @member {number} retries + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.retries = 0; + + /** + * JobEvent type. + * @member {google.cloud.dataplex.v1.JobEvent.Type} type + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.type = 0; + + /** + * JobEvent service. + * @member {google.cloud.dataplex.v1.JobEvent.Service} service + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.service = 0; + + /** + * JobEvent serviceJob. + * @member {string} serviceJob + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.serviceJob = ""; + + /** + * Creates a new JobEvent instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {google.cloud.dataplex.v1.IJobEvent=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent instance + */ + JobEvent.create = function create(properties) { + return new JobEvent(properties); + }; + + /** + * Encodes the specified JobEvent message. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {google.cloud.dataplex.v1.IJobEvent} message JobEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JobEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.jobId); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); + if (message.retries != null && Object.hasOwnProperty.call(message, "retries")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.retries); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.type); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.service); + if (message.serviceJob != null && Object.hasOwnProperty.call(message, "serviceJob")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.serviceJob); + return writer; + }; + + /** + * Encodes the specified JobEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {google.cloud.dataplex.v1.IJobEvent} message JobEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JobEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JobEvent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JobEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.JobEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.message = reader.string(); + break; + case 2: + message.jobId = reader.string(); + break; + case 3: + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.state = reader.int32(); + break; + case 6: + message.retries = reader.int32(); + break; + case 7: + message.type = reader.int32(); + break; + case 8: + message.service = reader.int32(); + break; + case 9: + message.serviceJob = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JobEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JobEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JobEvent message. + * @function verify + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JobEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.jobId != null && message.hasOwnProperty("jobId")) + if (!$util.isString(message.jobId)) + return "jobId: string expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.retries != null && message.hasOwnProperty("retries")) + if (!$util.isInteger(message.retries)) + return "retries: integer expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.service != null && message.hasOwnProperty("service")) + switch (message.service) { + default: + return "service: enum value expected"; + case 0: + case 1: + break; + } + if (message.serviceJob != null && message.hasOwnProperty("serviceJob")) + if (!$util.isString(message.serviceJob)) + return "serviceJob: string expected"; + return null; + }; + + /** + * Creates a JobEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent + */ + JobEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.JobEvent) + return object; + var message = new $root.google.cloud.dataplex.v1.JobEvent(); + if (object.message != null) + message.message = String(object.message); + if (object.jobId != null) + message.jobId = String(object.jobId); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.JobEvent.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.JobEvent.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "SUCCEEDED": + case 1: + message.state = 1; + break; + case "FAILED": + case 2: + message.state = 2; + break; + case "CANCELLED": + case 3: + message.state = 3; + break; + case "ABORTED": + case 4: + message.state = 4; + break; + } + if (object.retries != null) + message.retries = object.retries | 0; + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "SPARK": + case 1: + message.type = 1; + break; + case "NOTEBOOK": + case 2: + message.type = 2; + break; + } + switch (object.service) { + case "SERVICE_UNSPECIFIED": + case 0: + message.service = 0; + break; + case "DATAPROC": + case 1: + message.service = 1; + break; + } + if (object.serviceJob != null) + message.serviceJob = String(object.serviceJob); + return message; + }; + + /** + * Creates a plain object from a JobEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {google.cloud.dataplex.v1.JobEvent} message JobEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JobEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.message = ""; + object.jobId = ""; + object.startTime = null; + object.endTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.retries = 0; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.service = options.enums === String ? "SERVICE_UNSPECIFIED" : 0; + object.serviceJob = ""; + } + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.jobId != null && message.hasOwnProperty("jobId")) + object.jobId = message.jobId; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.JobEvent.State[message.state] : message.state; + if (message.retries != null && message.hasOwnProperty("retries")) + object.retries = message.retries; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.JobEvent.Type[message.type] : message.type; + if (message.service != null && message.hasOwnProperty("service")) + object.service = options.enums === String ? $root.google.cloud.dataplex.v1.JobEvent.Service[message.service] : message.service; + if (message.serviceJob != null && message.hasOwnProperty("serviceJob")) + object.serviceJob = message.serviceJob; + return object; + }; + + /** + * Converts this JobEvent to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + * @returns {Object.} JSON object + */ + JobEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.cloud.dataplex.v1.JobEvent.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} SPARK=1 SPARK value + * @property {number} NOTEBOOK=2 NOTEBOOK value + */ + JobEvent.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SPARK"] = 1; + values[valuesById[2] = "NOTEBOOK"] = 2; + return values; + })(); + + /** + * State enum. + * @name google.cloud.dataplex.v1.JobEvent.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} SUCCEEDED=1 SUCCEEDED value + * @property {number} FAILED=2 FAILED value + * @property {number} CANCELLED=3 CANCELLED value + * @property {number} ABORTED=4 ABORTED value + */ + JobEvent.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SUCCEEDED"] = 1; + values[valuesById[2] = "FAILED"] = 2; + values[valuesById[3] = "CANCELLED"] = 3; + values[valuesById[4] = "ABORTED"] = 4; + return values; + })(); + + /** + * Service enum. + * @name google.cloud.dataplex.v1.JobEvent.Service + * @enum {number} + * @property {number} SERVICE_UNSPECIFIED=0 SERVICE_UNSPECIFIED value + * @property {number} DATAPROC=1 DATAPROC value + */ + JobEvent.Service = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SERVICE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DATAPROC"] = 1; + return values; + })(); + + return JobEvent; + })(); + + v1.SessionEvent = (function() { + + /** + * Properties of a SessionEvent. + * @memberof google.cloud.dataplex.v1 + * @interface ISessionEvent + * @property {string|null} [message] SessionEvent message + * @property {string|null} [userId] SessionEvent userId + * @property {string|null} [sessionId] SessionEvent sessionId + * @property {google.cloud.dataplex.v1.SessionEvent.EventType|null} [type] SessionEvent type + * @property {google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null} [query] SessionEvent query + */ + + /** + * Constructs a new SessionEvent. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a SessionEvent. + * @implements ISessionEvent + * @constructor + * @param {google.cloud.dataplex.v1.ISessionEvent=} [properties] Properties to set + */ + function SessionEvent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SessionEvent message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + SessionEvent.prototype.message = ""; + + /** + * SessionEvent userId. + * @member {string} userId + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + SessionEvent.prototype.userId = ""; + + /** + * SessionEvent sessionId. + * @member {string} sessionId + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + SessionEvent.prototype.sessionId = ""; + + /** + * SessionEvent type. + * @member {google.cloud.dataplex.v1.SessionEvent.EventType} type + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + SessionEvent.prototype.type = 0; + + /** + * SessionEvent query. + * @member {google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null|undefined} query + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + SessionEvent.prototype.query = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SessionEvent detail. + * @member {"query"|undefined} detail + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + Object.defineProperty(SessionEvent.prototype, "detail", { + get: $util.oneOfGetter($oneOfFields = ["query"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SessionEvent instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {google.cloud.dataplex.v1.ISessionEvent=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent instance + */ + SessionEvent.create = function create(properties) { + return new SessionEvent(properties); + }; + + /** + * Encodes the specified SessionEvent message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {google.cloud.dataplex.v1.ISessionEvent} message SessionEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.userId); + if (message.sessionId != null && Object.hasOwnProperty.call(message, "sessionId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.sessionId); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.type); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.encode(message.query, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SessionEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {google.cloud.dataplex.v1.ISessionEvent} message SessionEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SessionEvent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.SessionEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.message = reader.string(); + break; + case 2: + message.userId = reader.string(); + break; + case 3: + message.sessionId = reader.string(); + break; + case 4: + message.type = reader.int32(); + break; + case 5: + message.query = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SessionEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SessionEvent message. + * @function verify + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SessionEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isString(message.userId)) + return "userId: string expected"; + if (message.sessionId != null && message.hasOwnProperty("sessionId")) + if (!$util.isString(message.sessionId)) + return "sessionId: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.query != null && message.hasOwnProperty("query")) { + properties.detail = 1; + { + var error = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify(message.query); + if (error) + return "query." + error; + } + } + return null; + }; + + /** + * Creates a SessionEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent + */ + SessionEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.SessionEvent) + return object; + var message = new $root.google.cloud.dataplex.v1.SessionEvent(); + if (object.message != null) + message.message = String(object.message); + if (object.userId != null) + message.userId = String(object.userId); + if (object.sessionId != null) + message.sessionId = String(object.sessionId); + switch (object.type) { + case "EVENT_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "START": + case 1: + message.type = 1; + break; + case "STOP": + case 2: + message.type = 2; + break; + case "QUERY": + case 3: + message.type = 3; + break; + } + if (object.query != null) { + if (typeof object.query !== "object") + throw TypeError(".google.cloud.dataplex.v1.SessionEvent.query: object expected"); + message.query = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.fromObject(object.query); + } + return message; + }; + + /** + * Creates a plain object from a SessionEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {google.cloud.dataplex.v1.SessionEvent} message SessionEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SessionEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.message = ""; + object.userId = ""; + object.sessionId = ""; + object.type = options.enums === String ? "EVENT_TYPE_UNSPECIFIED" : 0; + } + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.sessionId != null && message.hasOwnProperty("sessionId")) + object.sessionId = message.sessionId; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.SessionEvent.EventType[message.type] : message.type; + if (message.query != null && message.hasOwnProperty("query")) { + object.query = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.toObject(message.query, options); + if (options.oneofs) + object.detail = "query"; + } + return object; + }; + + /** + * Converts this SessionEvent to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + * @returns {Object.} JSON object + */ + SessionEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * EventType enum. + * @name google.cloud.dataplex.v1.SessionEvent.EventType + * @enum {number} + * @property {number} EVENT_TYPE_UNSPECIFIED=0 EVENT_TYPE_UNSPECIFIED value + * @property {number} START=1 START value + * @property {number} STOP=2 STOP value + * @property {number} QUERY=3 QUERY value + */ + SessionEvent.EventType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EVENT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "START"] = 1; + values[valuesById[2] = "STOP"] = 2; + values[valuesById[3] = "QUERY"] = 3; + return values; + })(); + + SessionEvent.QueryDetail = (function() { + + /** + * Properties of a QueryDetail. + * @memberof google.cloud.dataplex.v1.SessionEvent + * @interface IQueryDetail + * @property {string|null} [queryId] QueryDetail queryId + * @property {string|null} [queryText] QueryDetail queryText + * @property {google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|null} [engine] QueryDetail engine + * @property {google.protobuf.IDuration|null} [duration] QueryDetail duration + * @property {number|Long|null} [resultSizeBytes] QueryDetail resultSizeBytes + * @property {number|Long|null} [dataProcessedBytes] QueryDetail dataProcessedBytes + */ + + /** + * Constructs a new QueryDetail. + * @memberof google.cloud.dataplex.v1.SessionEvent + * @classdesc Represents a QueryDetail. + * @implements IQueryDetail + * @constructor + * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail=} [properties] Properties to set + */ + function QueryDetail(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDetail queryId. + * @member {string} queryId + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + */ + QueryDetail.prototype.queryId = ""; + + /** + * QueryDetail queryText. + * @member {string} queryText + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + */ + QueryDetail.prototype.queryText = ""; + + /** + * QueryDetail engine. + * @member {google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine} engine + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + */ + QueryDetail.prototype.engine = 0; + + /** + * QueryDetail duration. + * @member {google.protobuf.IDuration|null|undefined} duration + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + */ + QueryDetail.prototype.duration = null; + + /** + * QueryDetail resultSizeBytes. + * @member {number|Long} resultSizeBytes + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + */ + QueryDetail.prototype.resultSizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * QueryDetail dataProcessedBytes. + * @member {number|Long} dataProcessedBytes + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + */ + QueryDetail.prototype.dataProcessedBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new QueryDetail instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail instance + */ + QueryDetail.create = function create(properties) { + return new QueryDetail(properties); + }; + + /** + * Encodes the specified QueryDetail message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail} message QueryDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDetail.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.queryId != null && Object.hasOwnProperty.call(message, "queryId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.queryId); + if (message.queryText != null && Object.hasOwnProperty.call(message, "queryText")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.queryText); + if (message.engine != null && Object.hasOwnProperty.call(message, "engine")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.engine); + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.resultSizeBytes != null && Object.hasOwnProperty.call(message, "resultSizeBytes")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.resultSizeBytes); + if (message.dataProcessedBytes != null && Object.hasOwnProperty.call(message, "dataProcessedBytes")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.dataProcessedBytes); + return writer; + }; + + /** + * Encodes the specified QueryDetail message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail} message QueryDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDetail.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDetail message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDetail.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.queryId = reader.string(); + break; + case 2: + message.queryText = reader.string(); + break; + case 3: + message.engine = reader.int32(); + break; + case 4: + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 5: + message.resultSizeBytes = reader.int64(); + break; + case 6: + message.dataProcessedBytes = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDetail message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDetail.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDetail message. + * @function verify + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDetail.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.queryId != null && message.hasOwnProperty("queryId")) + if (!$util.isString(message.queryId)) + return "queryId: string expected"; + if (message.queryText != null && message.hasOwnProperty("queryText")) + if (!$util.isString(message.queryText)) + return "queryText: string expected"; + if (message.engine != null && message.hasOwnProperty("engine")) + switch (message.engine) { + default: + return "engine: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.duration != null && message.hasOwnProperty("duration")) { + var error = $root.google.protobuf.Duration.verify(message.duration); + if (error) + return "duration." + error; + } + if (message.resultSizeBytes != null && message.hasOwnProperty("resultSizeBytes")) + if (!$util.isInteger(message.resultSizeBytes) && !(message.resultSizeBytes && $util.isInteger(message.resultSizeBytes.low) && $util.isInteger(message.resultSizeBytes.high))) + return "resultSizeBytes: integer|Long expected"; + if (message.dataProcessedBytes != null && message.hasOwnProperty("dataProcessedBytes")) + if (!$util.isInteger(message.dataProcessedBytes) && !(message.dataProcessedBytes && $util.isInteger(message.dataProcessedBytes.low) && $util.isInteger(message.dataProcessedBytes.high))) + return "dataProcessedBytes: integer|Long expected"; + return null; + }; + + /** + * Creates a QueryDetail message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail + */ + QueryDetail.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail) + return object; + var message = new $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail(); + if (object.queryId != null) + message.queryId = String(object.queryId); + if (object.queryText != null) + message.queryText = String(object.queryText); + switch (object.engine) { + case "ENGINE_UNSPECIFIED": + case 0: + message.engine = 0; + break; + case "SPARK_SQL": + case 1: + message.engine = 1; + break; + case "BIGQUERY": + case 2: + message.engine = 2; + break; + } + if (object.duration != null) { + if (typeof object.duration !== "object") + throw TypeError(".google.cloud.dataplex.v1.SessionEvent.QueryDetail.duration: object expected"); + message.duration = $root.google.protobuf.Duration.fromObject(object.duration); + } + if (object.resultSizeBytes != null) + if ($util.Long) + (message.resultSizeBytes = $util.Long.fromValue(object.resultSizeBytes)).unsigned = false; + else if (typeof object.resultSizeBytes === "string") + message.resultSizeBytes = parseInt(object.resultSizeBytes, 10); + else if (typeof object.resultSizeBytes === "number") + message.resultSizeBytes = object.resultSizeBytes; + else if (typeof object.resultSizeBytes === "object") + message.resultSizeBytes = new $util.LongBits(object.resultSizeBytes.low >>> 0, object.resultSizeBytes.high >>> 0).toNumber(); + if (object.dataProcessedBytes != null) + if ($util.Long) + (message.dataProcessedBytes = $util.Long.fromValue(object.dataProcessedBytes)).unsigned = false; + else if (typeof object.dataProcessedBytes === "string") + message.dataProcessedBytes = parseInt(object.dataProcessedBytes, 10); + else if (typeof object.dataProcessedBytes === "number") + message.dataProcessedBytes = object.dataProcessedBytes; + else if (typeof object.dataProcessedBytes === "object") + message.dataProcessedBytes = new $util.LongBits(object.dataProcessedBytes.low >>> 0, object.dataProcessedBytes.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a QueryDetail message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {google.cloud.dataplex.v1.SessionEvent.QueryDetail} message QueryDetail + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDetail.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.queryId = ""; + object.queryText = ""; + object.engine = options.enums === String ? "ENGINE_UNSPECIFIED" : 0; + object.duration = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.resultSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.resultSizeBytes = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.dataProcessedBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.dataProcessedBytes = options.longs === String ? "0" : 0; + } + if (message.queryId != null && message.hasOwnProperty("queryId")) + object.queryId = message.queryId; + if (message.queryText != null && message.hasOwnProperty("queryText")) + object.queryText = message.queryText; + if (message.engine != null && message.hasOwnProperty("engine")) + object.engine = options.enums === String ? $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine[message.engine] : message.engine; + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); + if (message.resultSizeBytes != null && message.hasOwnProperty("resultSizeBytes")) + if (typeof message.resultSizeBytes === "number") + object.resultSizeBytes = options.longs === String ? String(message.resultSizeBytes) : message.resultSizeBytes; + else + object.resultSizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.resultSizeBytes) : options.longs === Number ? new $util.LongBits(message.resultSizeBytes.low >>> 0, message.resultSizeBytes.high >>> 0).toNumber() : message.resultSizeBytes; + if (message.dataProcessedBytes != null && message.hasOwnProperty("dataProcessedBytes")) + if (typeof message.dataProcessedBytes === "number") + object.dataProcessedBytes = options.longs === String ? String(message.dataProcessedBytes) : message.dataProcessedBytes; + else + object.dataProcessedBytes = options.longs === String ? $util.Long.prototype.toString.call(message.dataProcessedBytes) : options.longs === Number ? new $util.LongBits(message.dataProcessedBytes.low >>> 0, message.dataProcessedBytes.high >>> 0).toNumber() : message.dataProcessedBytes; + return object; + }; + + /** + * Converts this QueryDetail to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + * @returns {Object.} JSON object + */ + QueryDetail.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Engine enum. + * @name google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine + * @enum {number} + * @property {number} ENGINE_UNSPECIFIED=0 ENGINE_UNSPECIFIED value + * @property {number} SPARK_SQL=1 SPARK_SQL value + * @property {number} BIGQUERY=2 BIGQUERY value + */ + QueryDetail.Engine = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENGINE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SPARK_SQL"] = 1; + values[valuesById[2] = "BIGQUERY"] = 2; + return values; + })(); + + return QueryDetail; + })(); + + return SessionEvent; + })(); + + v1.MetadataService = (function() { + + /** + * Constructs a new MetadataService service. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a MetadataService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function MetadataService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (MetadataService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MetadataService; + + /** + * Creates new MetadataService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dataplex.v1.MetadataService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {MetadataService} RPC service. Useful where requests and/or responses are streamed. + */ + MetadataService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#createEntity}. + * @memberof google.cloud.dataplex.v1.MetadataService + * @typedef CreateEntityCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Entity} [response] Entity + */ + + /** + * Calls CreateEntity. + * @function createEntity + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.ICreateEntityRequest} request CreateEntityRequest message or plain object + * @param {google.cloud.dataplex.v1.MetadataService.CreateEntityCallback} callback Node-style callback called with the error, if any, and Entity + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetadataService.prototype.createEntity = function createEntity(request, callback) { + return this.rpcCall(createEntity, $root.google.cloud.dataplex.v1.CreateEntityRequest, $root.google.cloud.dataplex.v1.Entity, request, callback); + }, "name", { value: "CreateEntity" }); + + /** + * Calls CreateEntity. + * @function createEntity + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.ICreateEntityRequest} request CreateEntityRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#updateEntity}. + * @memberof google.cloud.dataplex.v1.MetadataService + * @typedef UpdateEntityCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Entity} [response] Entity + */ + + /** + * Calls UpdateEntity. + * @function updateEntity + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateEntityRequest} request UpdateEntityRequest message or plain object + * @param {google.cloud.dataplex.v1.MetadataService.UpdateEntityCallback} callback Node-style callback called with the error, if any, and Entity + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetadataService.prototype.updateEntity = function updateEntity(request, callback) { + return this.rpcCall(updateEntity, $root.google.cloud.dataplex.v1.UpdateEntityRequest, $root.google.cloud.dataplex.v1.Entity, request, callback); + }, "name", { value: "UpdateEntity" }); + + /** + * Calls UpdateEntity. + * @function updateEntity + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateEntityRequest} request UpdateEntityRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#deleteEntity}. + * @memberof google.cloud.dataplex.v1.MetadataService + * @typedef DeleteEntityCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteEntity. + * @function deleteEntity + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteEntityRequest} request DeleteEntityRequest message or plain object + * @param {google.cloud.dataplex.v1.MetadataService.DeleteEntityCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetadataService.prototype.deleteEntity = function deleteEntity(request, callback) { + return this.rpcCall(deleteEntity, $root.google.cloud.dataplex.v1.DeleteEntityRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteEntity" }); + + /** + * Calls DeleteEntity. + * @function deleteEntity + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteEntityRequest} request DeleteEntityRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#getEntity}. + * @memberof google.cloud.dataplex.v1.MetadataService + * @typedef GetEntityCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Entity} [response] Entity + */ + + /** + * Calls GetEntity. + * @function getEntity + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IGetEntityRequest} request GetEntityRequest message or plain object + * @param {google.cloud.dataplex.v1.MetadataService.GetEntityCallback} callback Node-style callback called with the error, if any, and Entity + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetadataService.prototype.getEntity = function getEntity(request, callback) { + return this.rpcCall(getEntity, $root.google.cloud.dataplex.v1.GetEntityRequest, $root.google.cloud.dataplex.v1.Entity, request, callback); + }, "name", { value: "GetEntity" }); + + /** + * Calls GetEntity. + * @function getEntity + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IGetEntityRequest} request GetEntityRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#listEntities}. + * @memberof google.cloud.dataplex.v1.MetadataService + * @typedef ListEntitiesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListEntitiesResponse} [response] ListEntitiesResponse + */ + + /** + * Calls ListEntities. + * @function listEntities + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IListEntitiesRequest} request ListEntitiesRequest message or plain object + * @param {google.cloud.dataplex.v1.MetadataService.ListEntitiesCallback} callback Node-style callback called with the error, if any, and ListEntitiesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetadataService.prototype.listEntities = function listEntities(request, callback) { + return this.rpcCall(listEntities, $root.google.cloud.dataplex.v1.ListEntitiesRequest, $root.google.cloud.dataplex.v1.ListEntitiesResponse, request, callback); + }, "name", { value: "ListEntities" }); + + /** + * Calls ListEntities. + * @function listEntities + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IListEntitiesRequest} request ListEntitiesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#createPartition}. + * @memberof google.cloud.dataplex.v1.MetadataService + * @typedef CreatePartitionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Partition} [response] Partition + */ + + /** + * Calls CreatePartition. + * @function createPartition + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.ICreatePartitionRequest} request CreatePartitionRequest message or plain object + * @param {google.cloud.dataplex.v1.MetadataService.CreatePartitionCallback} callback Node-style callback called with the error, if any, and Partition + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetadataService.prototype.createPartition = function createPartition(request, callback) { + return this.rpcCall(createPartition, $root.google.cloud.dataplex.v1.CreatePartitionRequest, $root.google.cloud.dataplex.v1.Partition, request, callback); + }, "name", { value: "CreatePartition" }); + + /** + * Calls CreatePartition. + * @function createPartition + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.ICreatePartitionRequest} request CreatePartitionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#deletePartition}. + * @memberof google.cloud.dataplex.v1.MetadataService + * @typedef DeletePartitionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeletePartition. + * @function deletePartition + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IDeletePartitionRequest} request DeletePartitionRequest message or plain object + * @param {google.cloud.dataplex.v1.MetadataService.DeletePartitionCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetadataService.prototype.deletePartition = function deletePartition(request, callback) { + return this.rpcCall(deletePartition, $root.google.cloud.dataplex.v1.DeletePartitionRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeletePartition" }); + + /** + * Calls DeletePartition. + * @function deletePartition + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IDeletePartitionRequest} request DeletePartitionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#getPartition}. + * @memberof google.cloud.dataplex.v1.MetadataService + * @typedef GetPartitionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Partition} [response] Partition + */ + + /** + * Calls GetPartition. + * @function getPartition + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IGetPartitionRequest} request GetPartitionRequest message or plain object + * @param {google.cloud.dataplex.v1.MetadataService.GetPartitionCallback} callback Node-style callback called with the error, if any, and Partition + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetadataService.prototype.getPartition = function getPartition(request, callback) { + return this.rpcCall(getPartition, $root.google.cloud.dataplex.v1.GetPartitionRequest, $root.google.cloud.dataplex.v1.Partition, request, callback); + }, "name", { value: "GetPartition" }); + + /** + * Calls GetPartition. + * @function getPartition + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IGetPartitionRequest} request GetPartitionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#listPartitions}. + * @memberof google.cloud.dataplex.v1.MetadataService + * @typedef ListPartitionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListPartitionsResponse} [response] ListPartitionsResponse + */ + + /** + * Calls ListPartitions. + * @function listPartitions + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IListPartitionsRequest} request ListPartitionsRequest message or plain object + * @param {google.cloud.dataplex.v1.MetadataService.ListPartitionsCallback} callback Node-style callback called with the error, if any, and ListPartitionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetadataService.prototype.listPartitions = function listPartitions(request, callback) { + return this.rpcCall(listPartitions, $root.google.cloud.dataplex.v1.ListPartitionsRequest, $root.google.cloud.dataplex.v1.ListPartitionsResponse, request, callback); + }, "name", { value: "ListPartitions" }); + + /** + * Calls ListPartitions. + * @function listPartitions + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IListPartitionsRequest} request ListPartitionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return MetadataService; + })(); + + v1.CreateEntityRequest = (function() { + + /** + * Properties of a CreateEntityRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICreateEntityRequest + * @property {string|null} [parent] CreateEntityRequest parent + * @property {google.cloud.dataplex.v1.IEntity|null} [entity] CreateEntityRequest entity + * @property {boolean|null} [validateOnly] CreateEntityRequest validateOnly + */ + + /** + * Constructs a new CreateEntityRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CreateEntityRequest. + * @implements ICreateEntityRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICreateEntityRequest=} [properties] Properties to set + */ + function CreateEntityRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateEntityRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreateEntityRequest + * @instance + */ + CreateEntityRequest.prototype.parent = ""; + + /** + * CreateEntityRequest entity. + * @member {google.cloud.dataplex.v1.IEntity|null|undefined} entity + * @memberof google.cloud.dataplex.v1.CreateEntityRequest + * @instance + */ + CreateEntityRequest.prototype.entity = null; + + /** + * CreateEntityRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateEntityRequest + * @instance + */ + CreateEntityRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateEntityRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CreateEntityRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateEntityRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateEntityRequest} CreateEntityRequest instance + */ + CreateEntityRequest.create = function create(properties) { + return new CreateEntityRequest(properties); + }; + + /** + * Encodes the specified CreateEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateEntityRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CreateEntityRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateEntityRequest} message CreateEntityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateEntityRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) + $root.google.cloud.dataplex.v1.Entity.encode(message.entity, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreateEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateEntityRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CreateEntityRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateEntityRequest} message CreateEntityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateEntityRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateEntityRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.CreateEntityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.CreateEntityRequest} CreateEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateEntityRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateEntityRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 3: + message.entity = $root.google.cloud.dataplex.v1.Entity.decode(reader, reader.uint32()); + break; + case 4: + message.validateOnly = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateEntityRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.CreateEntityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.CreateEntityRequest} CreateEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateEntityRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateEntityRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.CreateEntityRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateEntityRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.entity != null && message.hasOwnProperty("entity")) { + var error = $root.google.cloud.dataplex.v1.Entity.verify(message.entity); + if (error) + return "entity." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateEntityRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.CreateEntityRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CreateEntityRequest} CreateEntityRequest + */ + CreateEntityRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateEntityRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.CreateEntityRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.entity != null) { + if (typeof object.entity !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateEntityRequest.entity: object expected"); + message.entity = $root.google.cloud.dataplex.v1.Entity.fromObject(object.entity); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateEntityRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.CreateEntityRequest + * @static + * @param {google.cloud.dataplex.v1.CreateEntityRequest} message CreateEntityRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateEntityRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.entity = null; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.entity != null && message.hasOwnProperty("entity")) + object.entity = $root.google.cloud.dataplex.v1.Entity.toObject(message.entity, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateEntityRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.CreateEntityRequest + * @instance + * @returns {Object.} JSON object + */ + CreateEntityRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateEntityRequest; + })(); + + v1.UpdateEntityRequest = (function() { + + /** + * Properties of an UpdateEntityRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IUpdateEntityRequest + * @property {google.cloud.dataplex.v1.IEntity|null} [entity] UpdateEntityRequest entity + * @property {boolean|null} [validateOnly] UpdateEntityRequest validateOnly + */ + + /** + * Constructs a new UpdateEntityRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an UpdateEntityRequest. + * @implements IUpdateEntityRequest + * @constructor + * @param {google.cloud.dataplex.v1.IUpdateEntityRequest=} [properties] Properties to set + */ + function UpdateEntityRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateEntityRequest entity. + * @member {google.cloud.dataplex.v1.IEntity|null|undefined} entity + * @memberof google.cloud.dataplex.v1.UpdateEntityRequest + * @instance + */ + UpdateEntityRequest.prototype.entity = null; + + /** + * UpdateEntityRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.UpdateEntityRequest + * @instance + */ + UpdateEntityRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateEntityRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.UpdateEntityRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateEntityRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateEntityRequest} UpdateEntityRequest instance + */ + UpdateEntityRequest.create = function create(properties) { + return new UpdateEntityRequest(properties); + }; + + /** + * Encodes the specified UpdateEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEntityRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.UpdateEntityRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateEntityRequest} message UpdateEntityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEntityRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) + $root.google.cloud.dataplex.v1.Entity.encode(message.entity, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified UpdateEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEntityRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateEntityRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateEntityRequest} message UpdateEntityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEntityRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateEntityRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.UpdateEntityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.UpdateEntityRequest} UpdateEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEntityRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateEntityRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.entity = $root.google.cloud.dataplex.v1.Entity.decode(reader, reader.uint32()); + break; + case 3: + message.validateOnly = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateEntityRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateEntityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.UpdateEntityRequest} UpdateEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEntityRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateEntityRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.UpdateEntityRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateEntityRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.entity != null && message.hasOwnProperty("entity")) { + var error = $root.google.cloud.dataplex.v1.Entity.verify(message.entity); + if (error) + return "entity." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates an UpdateEntityRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.UpdateEntityRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.UpdateEntityRequest} UpdateEntityRequest + */ + UpdateEntityRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateEntityRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.UpdateEntityRequest(); + if (object.entity != null) { + if (typeof object.entity !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateEntityRequest.entity: object expected"); + message.entity = $root.google.cloud.dataplex.v1.Entity.fromObject(object.entity); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from an UpdateEntityRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.UpdateEntityRequest + * @static + * @param {google.cloud.dataplex.v1.UpdateEntityRequest} message UpdateEntityRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateEntityRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.entity = null; + object.validateOnly = false; + } + if (message.entity != null && message.hasOwnProperty("entity")) + object.entity = $root.google.cloud.dataplex.v1.Entity.toObject(message.entity, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this UpdateEntityRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.UpdateEntityRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateEntityRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateEntityRequest; + })(); + + v1.DeleteEntityRequest = (function() { + + /** + * Properties of a DeleteEntityRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IDeleteEntityRequest + * @property {string|null} [name] DeleteEntityRequest name + * @property {string|null} [etag] DeleteEntityRequest etag + */ + + /** + * Constructs a new DeleteEntityRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DeleteEntityRequest. + * @implements IDeleteEntityRequest + * @constructor + * @param {google.cloud.dataplex.v1.IDeleteEntityRequest=} [properties] Properties to set + */ + function DeleteEntityRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteEntityRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DeleteEntityRequest + * @instance + */ + DeleteEntityRequest.prototype.name = ""; + + /** + * DeleteEntityRequest etag. + * @member {string} etag + * @memberof google.cloud.dataplex.v1.DeleteEntityRequest + * @instance + */ + DeleteEntityRequest.prototype.etag = ""; + + /** + * Creates a new DeleteEntityRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DeleteEntityRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteEntityRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteEntityRequest} DeleteEntityRequest instance + */ + DeleteEntityRequest.create = function create(properties) { + return new DeleteEntityRequest(properties); + }; + + /** + * Encodes the specified DeleteEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEntityRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DeleteEntityRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteEntityRequest} message DeleteEntityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteEntityRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); + return writer; + }; + + /** + * Encodes the specified DeleteEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEntityRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteEntityRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteEntityRequest} message DeleteEntityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteEntityRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteEntityRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DeleteEntityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DeleteEntityRequest} DeleteEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteEntityRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteEntityRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.etag = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteEntityRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteEntityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DeleteEntityRequest} DeleteEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteEntityRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteEntityRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.DeleteEntityRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteEntityRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; + + /** + * Creates a DeleteEntityRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DeleteEntityRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DeleteEntityRequest} DeleteEntityRequest + */ + DeleteEntityRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteEntityRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.DeleteEntityRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; + + /** + * Creates a plain object from a DeleteEntityRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DeleteEntityRequest + * @static + * @param {google.cloud.dataplex.v1.DeleteEntityRequest} message DeleteEntityRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteEntityRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.etag = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + return object; + }; + + /** + * Converts this DeleteEntityRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DeleteEntityRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteEntityRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteEntityRequest; + })(); + + v1.ListEntitiesRequest = (function() { + + /** + * Properties of a ListEntitiesRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListEntitiesRequest + * @property {string|null} [parent] ListEntitiesRequest parent + * @property {google.cloud.dataplex.v1.ListEntitiesRequest.EntityView|null} [view] ListEntitiesRequest view + * @property {number|null} [pageSize] ListEntitiesRequest pageSize + * @property {string|null} [pageToken] ListEntitiesRequest pageToken + * @property {string|null} [filter] ListEntitiesRequest filter + */ + + /** + * Constructs a new ListEntitiesRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListEntitiesRequest. + * @implements IListEntitiesRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListEntitiesRequest=} [properties] Properties to set + */ + function ListEntitiesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListEntitiesRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @instance + */ + ListEntitiesRequest.prototype.parent = ""; + + /** + * ListEntitiesRequest view. + * @member {google.cloud.dataplex.v1.ListEntitiesRequest.EntityView} view + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @instance + */ + ListEntitiesRequest.prototype.view = 0; + + /** + * ListEntitiesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @instance + */ + ListEntitiesRequest.prototype.pageSize = 0; + + /** + * ListEntitiesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @instance + */ + ListEntitiesRequest.prototype.pageToken = ""; + + /** + * ListEntitiesRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @instance + */ + ListEntitiesRequest.prototype.filter = ""; + + /** + * Creates a new ListEntitiesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @static + * @param {google.cloud.dataplex.v1.IListEntitiesRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListEntitiesRequest} ListEntitiesRequest instance + */ + ListEntitiesRequest.create = function create(properties) { + return new ListEntitiesRequest(properties); + }; + + /** + * Encodes the specified ListEntitiesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @static + * @param {google.cloud.dataplex.v1.IListEntitiesRequest} message ListEntitiesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEntitiesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListEntitiesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @static + * @param {google.cloud.dataplex.v1.IListEntitiesRequest} message ListEntitiesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEntitiesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListEntitiesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListEntitiesRequest} ListEntitiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEntitiesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListEntitiesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.view = reader.int32(); + break; + case 3: + message.pageSize = reader.int32(); + break; + case 4: + message.pageToken = reader.string(); + break; + case 5: + message.filter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListEntitiesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListEntitiesRequest} ListEntitiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEntitiesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListEntitiesRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListEntitiesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListEntitiesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListEntitiesRequest} ListEntitiesRequest + */ + ListEntitiesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListEntitiesRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListEntitiesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + switch (object.view) { + case "ENTITY_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "TABLES": + case 1: + message.view = 1; + break; + case "FILESETS": + case 2: + message.view = 2; + break; + } + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListEntitiesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @static + * @param {google.cloud.dataplex.v1.ListEntitiesRequest} message ListEntitiesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListEntitiesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.view = options.enums === String ? "ENTITY_VIEW_UNSPECIFIED" : 0; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.dataplex.v1.ListEntitiesRequest.EntityView[message.view] : message.view; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListEntitiesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @instance + * @returns {Object.} JSON object + */ + ListEntitiesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * EntityView enum. + * @name google.cloud.dataplex.v1.ListEntitiesRequest.EntityView + * @enum {number} + * @property {number} ENTITY_VIEW_UNSPECIFIED=0 ENTITY_VIEW_UNSPECIFIED value + * @property {number} TABLES=1 TABLES value + * @property {number} FILESETS=2 FILESETS value + */ + ListEntitiesRequest.EntityView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENTITY_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "TABLES"] = 1; + values[valuesById[2] = "FILESETS"] = 2; + return values; + })(); + + return ListEntitiesRequest; + })(); + + v1.ListEntitiesResponse = (function() { + + /** + * Properties of a ListEntitiesResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListEntitiesResponse + * @property {Array.|null} [entities] ListEntitiesResponse entities + * @property {string|null} [nextPageToken] ListEntitiesResponse nextPageToken + */ + + /** + * Constructs a new ListEntitiesResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListEntitiesResponse. + * @implements IListEntitiesResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListEntitiesResponse=} [properties] Properties to set + */ + function ListEntitiesResponse(properties) { + this.entities = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListEntitiesResponse entities. + * @member {Array.} entities + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @instance + */ + ListEntitiesResponse.prototype.entities = $util.emptyArray; + + /** + * ListEntitiesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @instance + */ + ListEntitiesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListEntitiesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @static + * @param {google.cloud.dataplex.v1.IListEntitiesResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListEntitiesResponse} ListEntitiesResponse instance + */ + ListEntitiesResponse.create = function create(properties) { + return new ListEntitiesResponse(properties); + }; + + /** + * Encodes the specified ListEntitiesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @static + * @param {google.cloud.dataplex.v1.IListEntitiesResponse} message ListEntitiesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEntitiesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entities != null && message.entities.length) + for (var i = 0; i < message.entities.length; ++i) + $root.google.cloud.dataplex.v1.Entity.encode(message.entities[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListEntitiesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @static + * @param {google.cloud.dataplex.v1.IListEntitiesResponse} message ListEntitiesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEntitiesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListEntitiesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListEntitiesResponse} ListEntitiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEntitiesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListEntitiesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.entities && message.entities.length)) + message.entities = []; + message.entities.push($root.google.cloud.dataplex.v1.Entity.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListEntitiesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListEntitiesResponse} ListEntitiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEntitiesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListEntitiesResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListEntitiesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.entities != null && message.hasOwnProperty("entities")) { + if (!Array.isArray(message.entities)) + return "entities: array expected"; + for (var i = 0; i < message.entities.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Entity.verify(message.entities[i]); + if (error) + return "entities." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListEntitiesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListEntitiesResponse} ListEntitiesResponse + */ + ListEntitiesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListEntitiesResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListEntitiesResponse(); + if (object.entities) { + if (!Array.isArray(object.entities)) + throw TypeError(".google.cloud.dataplex.v1.ListEntitiesResponse.entities: array expected"); + message.entities = []; + for (var i = 0; i < object.entities.length; ++i) { + if (typeof object.entities[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListEntitiesResponse.entities: object expected"); + message.entities[i] = $root.google.cloud.dataplex.v1.Entity.fromObject(object.entities[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListEntitiesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @static + * @param {google.cloud.dataplex.v1.ListEntitiesResponse} message ListEntitiesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListEntitiesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.entities = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.entities && message.entities.length) { + object.entities = []; + for (var j = 0; j < message.entities.length; ++j) + object.entities[j] = $root.google.cloud.dataplex.v1.Entity.toObject(message.entities[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListEntitiesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @instance + * @returns {Object.} JSON object + */ + ListEntitiesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListEntitiesResponse; + })(); + + v1.GetEntityRequest = (function() { + + /** + * Properties of a GetEntityRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetEntityRequest + * @property {string|null} [name] GetEntityRequest name + * @property {google.cloud.dataplex.v1.GetEntityRequest.EntityView|null} [view] GetEntityRequest view + */ + + /** + * Constructs a new GetEntityRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetEntityRequest. + * @implements IGetEntityRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetEntityRequest=} [properties] Properties to set + */ + function GetEntityRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetEntityRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @instance + */ + GetEntityRequest.prototype.name = ""; + + /** + * GetEntityRequest view. + * @member {google.cloud.dataplex.v1.GetEntityRequest.EntityView} view + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @instance + */ + GetEntityRequest.prototype.view = 0; + + /** + * Creates a new GetEntityRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @static + * @param {google.cloud.dataplex.v1.IGetEntityRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetEntityRequest} GetEntityRequest instance + */ + GetEntityRequest.create = function create(properties) { + return new GetEntityRequest(properties); + }; + + /** + * Encodes the specified GetEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetEntityRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @static + * @param {google.cloud.dataplex.v1.IGetEntityRequest} message GetEntityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEntityRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + return writer; + }; + + /** + * Encodes the specified GetEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetEntityRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @static + * @param {google.cloud.dataplex.v1.IGetEntityRequest} message GetEntityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEntityRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetEntityRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetEntityRequest} GetEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEntityRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetEntityRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.view = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetEntityRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetEntityRequest} GetEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEntityRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetEntityRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetEntityRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + case 4: + break; + } + return null; + }; + + /** + * Creates a GetEntityRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetEntityRequest} GetEntityRequest + */ + GetEntityRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetEntityRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetEntityRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.view) { + case "ENTITY_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BASIC": + case 1: + message.view = 1; + break; + case "SCHEMA": + case 2: + message.view = 2; + break; + case "FULL": + case 4: + message.view = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a GetEntityRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @static + * @param {google.cloud.dataplex.v1.GetEntityRequest} message GetEntityRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetEntityRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.view = options.enums === String ? "ENTITY_VIEW_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.dataplex.v1.GetEntityRequest.EntityView[message.view] : message.view; + return object; + }; + + /** + * Converts this GetEntityRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @instance + * @returns {Object.} JSON object + */ + GetEntityRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * EntityView enum. + * @name google.cloud.dataplex.v1.GetEntityRequest.EntityView + * @enum {number} + * @property {number} ENTITY_VIEW_UNSPECIFIED=0 ENTITY_VIEW_UNSPECIFIED value + * @property {number} BASIC=1 BASIC value + * @property {number} SCHEMA=2 SCHEMA value + * @property {number} FULL=4 FULL value + */ + GetEntityRequest.EntityView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENTITY_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "BASIC"] = 1; + values[valuesById[2] = "SCHEMA"] = 2; + values[valuesById[4] = "FULL"] = 4; + return values; + })(); + + return GetEntityRequest; + })(); + + v1.ListPartitionsRequest = (function() { + + /** + * Properties of a ListPartitionsRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListPartitionsRequest + * @property {string|null} [parent] ListPartitionsRequest parent + * @property {number|null} [pageSize] ListPartitionsRequest pageSize + * @property {string|null} [pageToken] ListPartitionsRequest pageToken + * @property {string|null} [filter] ListPartitionsRequest filter + */ + + /** + * Constructs a new ListPartitionsRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListPartitionsRequest. + * @implements IListPartitionsRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListPartitionsRequest=} [properties] Properties to set + */ + function ListPartitionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListPartitionsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @instance + */ + ListPartitionsRequest.prototype.parent = ""; + + /** + * ListPartitionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @instance + */ + ListPartitionsRequest.prototype.pageSize = 0; + + /** + * ListPartitionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @instance + */ + ListPartitionsRequest.prototype.pageToken = ""; + + /** + * ListPartitionsRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @instance + */ + ListPartitionsRequest.prototype.filter = ""; + + /** + * Creates a new ListPartitionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListPartitionsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListPartitionsRequest} ListPartitionsRequest instance + */ + ListPartitionsRequest.create = function create(properties) { + return new ListPartitionsRequest(properties); + }; + + /** + * Encodes the specified ListPartitionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListPartitionsRequest} message ListPartitionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPartitionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListPartitionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListPartitionsRequest} message ListPartitionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPartitionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPartitionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListPartitionsRequest} ListPartitionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPartitionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListPartitionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 4: + message.filter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPartitionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListPartitionsRequest} ListPartitionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPartitionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPartitionsRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPartitionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListPartitionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListPartitionsRequest} ListPartitionsRequest + */ + ListPartitionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListPartitionsRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListPartitionsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListPartitionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @static + * @param {google.cloud.dataplex.v1.ListPartitionsRequest} message ListPartitionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPartitionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListPartitionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListPartitionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListPartitionsRequest; + })(); + + v1.CreatePartitionRequest = (function() { + + /** + * Properties of a CreatePartitionRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICreatePartitionRequest + * @property {string|null} [parent] CreatePartitionRequest parent + * @property {google.cloud.dataplex.v1.IPartition|null} [partition] CreatePartitionRequest partition + * @property {boolean|null} [validateOnly] CreatePartitionRequest validateOnly + */ + + /** + * Constructs a new CreatePartitionRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CreatePartitionRequest. + * @implements ICreatePartitionRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICreatePartitionRequest=} [properties] Properties to set + */ + function CreatePartitionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreatePartitionRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * @instance + */ + CreatePartitionRequest.prototype.parent = ""; + + /** + * CreatePartitionRequest partition. + * @member {google.cloud.dataplex.v1.IPartition|null|undefined} partition + * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * @instance + */ + CreatePartitionRequest.prototype.partition = null; + + /** + * CreatePartitionRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * @instance + */ + CreatePartitionRequest.prototype.validateOnly = false; + + /** + * Creates a new CreatePartitionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * @static + * @param {google.cloud.dataplex.v1.ICreatePartitionRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreatePartitionRequest} CreatePartitionRequest instance + */ + CreatePartitionRequest.create = function create(properties) { + return new CreatePartitionRequest(properties); + }; + + /** + * Encodes the specified CreatePartitionRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreatePartitionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * @static + * @param {google.cloud.dataplex.v1.ICreatePartitionRequest} message CreatePartitionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePartitionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) + $root.google.cloud.dataplex.v1.Partition.encode(message.partition, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreatePartitionRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreatePartitionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * @static + * @param {google.cloud.dataplex.v1.ICreatePartitionRequest} message CreatePartitionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePartitionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreatePartitionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.CreatePartitionRequest} CreatePartitionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePartitionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreatePartitionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 3: + message.partition = $root.google.cloud.dataplex.v1.Partition.decode(reader, reader.uint32()); + break; + case 4: + message.validateOnly = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreatePartitionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.CreatePartitionRequest} CreatePartitionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePartitionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreatePartitionRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreatePartitionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.partition != null && message.hasOwnProperty("partition")) { + var error = $root.google.cloud.dataplex.v1.Partition.verify(message.partition); + if (error) + return "partition." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreatePartitionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CreatePartitionRequest} CreatePartitionRequest + */ + CreatePartitionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreatePartitionRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.CreatePartitionRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.partition != null) { + if (typeof object.partition !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreatePartitionRequest.partition: object expected"); + message.partition = $root.google.cloud.dataplex.v1.Partition.fromObject(object.partition); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreatePartitionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * @static + * @param {google.cloud.dataplex.v1.CreatePartitionRequest} message CreatePartitionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreatePartitionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.partition = null; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.partition != null && message.hasOwnProperty("partition")) + object.partition = $root.google.cloud.dataplex.v1.Partition.toObject(message.partition, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreatePartitionRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * @instance + * @returns {Object.} JSON object + */ + CreatePartitionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreatePartitionRequest; + })(); + + v1.DeletePartitionRequest = (function() { + + /** + * Properties of a DeletePartitionRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IDeletePartitionRequest + * @property {string|null} [name] DeletePartitionRequest name + * @property {string|null} [etag] DeletePartitionRequest etag + */ + + /** + * Constructs a new DeletePartitionRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DeletePartitionRequest. + * @implements IDeletePartitionRequest + * @constructor + * @param {google.cloud.dataplex.v1.IDeletePartitionRequest=} [properties] Properties to set + */ + function DeletePartitionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeletePartitionRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DeletePartitionRequest + * @instance + */ + DeletePartitionRequest.prototype.name = ""; + + /** + * DeletePartitionRequest etag. + * @member {string} etag + * @memberof google.cloud.dataplex.v1.DeletePartitionRequest + * @instance + */ + DeletePartitionRequest.prototype.etag = ""; + + /** + * Creates a new DeletePartitionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DeletePartitionRequest + * @static + * @param {google.cloud.dataplex.v1.IDeletePartitionRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeletePartitionRequest} DeletePartitionRequest instance + */ + DeletePartitionRequest.create = function create(properties) { + return new DeletePartitionRequest(properties); + }; + + /** + * Encodes the specified DeletePartitionRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeletePartitionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DeletePartitionRequest + * @static + * @param {google.cloud.dataplex.v1.IDeletePartitionRequest} message DeletePartitionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePartitionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); + return writer; + }; + + /** + * Encodes the specified DeletePartitionRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeletePartitionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DeletePartitionRequest + * @static + * @param {google.cloud.dataplex.v1.IDeletePartitionRequest} message DeletePartitionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePartitionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeletePartitionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DeletePartitionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DeletePartitionRequest} DeletePartitionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePartitionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeletePartitionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.etag = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeletePartitionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DeletePartitionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DeletePartitionRequest} DeletePartitionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePartitionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeletePartitionRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.DeletePartitionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeletePartitionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; + + /** + * Creates a DeletePartitionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DeletePartitionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DeletePartitionRequest} DeletePartitionRequest + */ + DeletePartitionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeletePartitionRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.DeletePartitionRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; + + /** + * Creates a plain object from a DeletePartitionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DeletePartitionRequest + * @static + * @param {google.cloud.dataplex.v1.DeletePartitionRequest} message DeletePartitionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeletePartitionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.etag = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + return object; + }; + + /** + * Converts this DeletePartitionRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DeletePartitionRequest + * @instance + * @returns {Object.} JSON object + */ + DeletePartitionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeletePartitionRequest; + })(); + + v1.ListPartitionsResponse = (function() { + + /** + * Properties of a ListPartitionsResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListPartitionsResponse + * @property {Array.|null} [partitions] ListPartitionsResponse partitions + * @property {string|null} [nextPageToken] ListPartitionsResponse nextPageToken + */ + + /** + * Constructs a new ListPartitionsResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListPartitionsResponse. + * @implements IListPartitionsResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListPartitionsResponse=} [properties] Properties to set + */ + function ListPartitionsResponse(properties) { + this.partitions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListPartitionsResponse partitions. + * @member {Array.} partitions + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @instance + */ + ListPartitionsResponse.prototype.partitions = $util.emptyArray; + + /** + * ListPartitionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @instance + */ + ListPartitionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListPartitionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @static + * @param {google.cloud.dataplex.v1.IListPartitionsResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListPartitionsResponse} ListPartitionsResponse instance + */ + ListPartitionsResponse.create = function create(properties) { + return new ListPartitionsResponse(properties); + }; + + /** + * Encodes the specified ListPartitionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @static + * @param {google.cloud.dataplex.v1.IListPartitionsResponse} message ListPartitionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPartitionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.partitions != null && message.partitions.length) + for (var i = 0; i < message.partitions.length; ++i) + $root.google.cloud.dataplex.v1.Partition.encode(message.partitions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListPartitionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @static + * @param {google.cloud.dataplex.v1.IListPartitionsResponse} message ListPartitionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPartitionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPartitionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListPartitionsResponse} ListPartitionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPartitionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListPartitionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.partitions && message.partitions.length)) + message.partitions = []; + message.partitions.push($root.google.cloud.dataplex.v1.Partition.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPartitionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListPartitionsResponse} ListPartitionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPartitionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPartitionsResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPartitionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.partitions != null && message.hasOwnProperty("partitions")) { + if (!Array.isArray(message.partitions)) + return "partitions: array expected"; + for (var i = 0; i < message.partitions.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Partition.verify(message.partitions[i]); + if (error) + return "partitions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListPartitionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListPartitionsResponse} ListPartitionsResponse + */ + ListPartitionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListPartitionsResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListPartitionsResponse(); + if (object.partitions) { + if (!Array.isArray(object.partitions)) + throw TypeError(".google.cloud.dataplex.v1.ListPartitionsResponse.partitions: array expected"); + message.partitions = []; + for (var i = 0; i < object.partitions.length; ++i) { + if (typeof object.partitions[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListPartitionsResponse.partitions: object expected"); + message.partitions[i] = $root.google.cloud.dataplex.v1.Partition.fromObject(object.partitions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListPartitionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @static + * @param {google.cloud.dataplex.v1.ListPartitionsResponse} message ListPartitionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPartitionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.partitions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.partitions && message.partitions.length) { + object.partitions = []; + for (var j = 0; j < message.partitions.length; ++j) + object.partitions[j] = $root.google.cloud.dataplex.v1.Partition.toObject(message.partitions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListPartitionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListPartitionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListPartitionsResponse; + })(); + + v1.GetPartitionRequest = (function() { + + /** + * Properties of a GetPartitionRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetPartitionRequest + * @property {string|null} [name] GetPartitionRequest name + */ + + /** + * Constructs a new GetPartitionRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetPartitionRequest. + * @implements IGetPartitionRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetPartitionRequest=} [properties] Properties to set + */ + function GetPartitionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetPartitionRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @instance + */ + GetPartitionRequest.prototype.name = ""; + + /** + * Creates a new GetPartitionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @static + * @param {google.cloud.dataplex.v1.IGetPartitionRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetPartitionRequest} GetPartitionRequest instance + */ + GetPartitionRequest.create = function create(properties) { + return new GetPartitionRequest(properties); + }; + + /** + * Encodes the specified GetPartitionRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetPartitionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @static + * @param {google.cloud.dataplex.v1.IGetPartitionRequest} message GetPartitionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPartitionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetPartitionRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetPartitionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @static + * @param {google.cloud.dataplex.v1.IGetPartitionRequest} message GetPartitionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPartitionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetPartitionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetPartitionRequest} GetPartitionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPartitionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetPartitionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetPartitionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetPartitionRequest} GetPartitionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPartitionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetPartitionRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPartitionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetPartitionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetPartitionRequest} GetPartitionRequest + */ + GetPartitionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetPartitionRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetPartitionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetPartitionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @static + * @param {google.cloud.dataplex.v1.GetPartitionRequest} message GetPartitionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPartitionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetPartitionRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @instance + * @returns {Object.} JSON object + */ + GetPartitionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetPartitionRequest; + })(); + + v1.Entity = (function() { + + /** + * Properties of an Entity. + * @memberof google.cloud.dataplex.v1 + * @interface IEntity + * @property {string|null} [name] Entity name + * @property {string|null} [displayName] Entity displayName + * @property {string|null} [description] Entity description + * @property {google.protobuf.ITimestamp|null} [createTime] Entity createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Entity updateTime + * @property {string|null} [id] Entity id + * @property {string|null} [etag] Entity etag + * @property {google.cloud.dataplex.v1.Entity.Type|null} [type] Entity type + * @property {string|null} [asset] Entity asset + * @property {string|null} [dataPath] Entity dataPath + * @property {string|null} [dataPathPattern] Entity dataPathPattern + * @property {string|null} [catalogEntry] Entity catalogEntry + * @property {google.cloud.dataplex.v1.StorageSystem|null} [system] Entity system + * @property {google.cloud.dataplex.v1.IStorageFormat|null} [format] Entity format + * @property {google.cloud.dataplex.v1.Entity.ICompatibilityStatus|null} [compatibility] Entity compatibility + * @property {google.cloud.dataplex.v1.ISchema|null} [schema] Entity schema + */ + + /** + * Constructs a new Entity. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an Entity. + * @implements IEntity + * @constructor + * @param {google.cloud.dataplex.v1.IEntity=} [properties] Properties to set + */ + function Entity(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Entity name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.name = ""; + + /** + * Entity displayName. + * @member {string} displayName + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.displayName = ""; + + /** + * Entity description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.description = ""; + + /** + * Entity createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.createTime = null; + + /** + * Entity updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.updateTime = null; + + /** + * Entity id. + * @member {string} id + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.id = ""; + + /** + * Entity etag. + * @member {string} etag + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.etag = ""; + + /** + * Entity type. + * @member {google.cloud.dataplex.v1.Entity.Type} type + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.type = 0; + + /** + * Entity asset. + * @member {string} asset + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.asset = ""; + + /** + * Entity dataPath. + * @member {string} dataPath + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.dataPath = ""; + + /** + * Entity dataPathPattern. + * @member {string} dataPathPattern + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.dataPathPattern = ""; + + /** + * Entity catalogEntry. + * @member {string} catalogEntry + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.catalogEntry = ""; + + /** + * Entity system. + * @member {google.cloud.dataplex.v1.StorageSystem} system + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.system = 0; + + /** + * Entity format. + * @member {google.cloud.dataplex.v1.IStorageFormat|null|undefined} format + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.format = null; + + /** + * Entity compatibility. + * @member {google.cloud.dataplex.v1.Entity.ICompatibilityStatus|null|undefined} compatibility + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.compatibility = null; + + /** + * Entity schema. + * @member {google.cloud.dataplex.v1.ISchema|null|undefined} schema + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.schema = null; + + /** + * Creates a new Entity instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Entity + * @static + * @param {google.cloud.dataplex.v1.IEntity=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Entity} Entity instance + */ + Entity.create = function create(properties) { + return new Entity(properties); + }; + + /** + * Encodes the specified Entity message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Entity + * @static + * @param {google.cloud.dataplex.v1.IEntity} message Entity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.id); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.etag); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.type); + if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.asset); + if (message.dataPath != null && Object.hasOwnProperty.call(message, "dataPath")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.dataPath); + if (message.dataPathPattern != null && Object.hasOwnProperty.call(message, "dataPathPattern")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.dataPathPattern); + if (message.catalogEntry != null && Object.hasOwnProperty.call(message, "catalogEntry")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.catalogEntry); + if (message.system != null && Object.hasOwnProperty.call(message, "system")) + writer.uint32(/* id 15, wireType 0 =*/120).int32(message.system); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + $root.google.cloud.dataplex.v1.StorageFormat.encode(message.format, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.compatibility != null && Object.hasOwnProperty.call(message, "compatibility")) + $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.encode(message.compatibility, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + $root.google.cloud.dataplex.v1.Schema.encode(message.schema, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Entity + * @static + * @param {google.cloud.dataplex.v1.IEntity} message Entity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Entity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Entity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Entity} Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Entity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.displayName = reader.string(); + break; + case 3: + message.description = reader.string(); + break; + case 5: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 7: + message.id = reader.string(); + break; + case 8: + message.etag = reader.string(); + break; + case 10: + message.type = reader.int32(); + break; + case 11: + message.asset = reader.string(); + break; + case 12: + message.dataPath = reader.string(); + break; + case 13: + message.dataPathPattern = reader.string(); + break; + case 14: + message.catalogEntry = reader.string(); + break; + case 15: + message.system = reader.int32(); + break; + case 16: + message.format = $root.google.cloud.dataplex.v1.StorageFormat.decode(reader, reader.uint32()); + break; + case 19: + message.compatibility = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.decode(reader, reader.uint32()); + break; + case 50: + message.schema = $root.google.cloud.dataplex.v1.Schema.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Entity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Entity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Entity} Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Entity message. + * @function verify + * @memberof google.cloud.dataplex.v1.Entity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Entity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.asset != null && message.hasOwnProperty("asset")) + if (!$util.isString(message.asset)) + return "asset: string expected"; + if (message.dataPath != null && message.hasOwnProperty("dataPath")) + if (!$util.isString(message.dataPath)) + return "dataPath: string expected"; + if (message.dataPathPattern != null && message.hasOwnProperty("dataPathPattern")) + if (!$util.isString(message.dataPathPattern)) + return "dataPathPattern: string expected"; + if (message.catalogEntry != null && message.hasOwnProperty("catalogEntry")) + if (!$util.isString(message.catalogEntry)) + return "catalogEntry: string expected"; + if (message.system != null && message.hasOwnProperty("system")) + switch (message.system) { + default: + return "system: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.format != null && message.hasOwnProperty("format")) { + var error = $root.google.cloud.dataplex.v1.StorageFormat.verify(message.format); + if (error) + return "format." + error; + } + if (message.compatibility != null && message.hasOwnProperty("compatibility")) { + var error = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify(message.compatibility); + if (error) + return "compatibility." + error; + } + if (message.schema != null && message.hasOwnProperty("schema")) { + var error = $root.google.cloud.dataplex.v1.Schema.verify(message.schema); + if (error) + return "schema." + error; + } + return null; + }; + + /** + * Creates an Entity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Entity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Entity} Entity + */ + Entity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Entity) + return object; + var message = new $root.google.cloud.dataplex.v1.Entity(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Entity.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Entity.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.id != null) + message.id = String(object.id); + if (object.etag != null) + message.etag = String(object.etag); + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "TABLE": + case 1: + message.type = 1; + break; + case "FILESET": + case 2: + message.type = 2; + break; + } + if (object.asset != null) + message.asset = String(object.asset); + if (object.dataPath != null) + message.dataPath = String(object.dataPath); + if (object.dataPathPattern != null) + message.dataPathPattern = String(object.dataPathPattern); + if (object.catalogEntry != null) + message.catalogEntry = String(object.catalogEntry); + switch (object.system) { + case "STORAGE_SYSTEM_UNSPECIFIED": + case 0: + message.system = 0; + break; + case "CLOUD_STORAGE": + case 1: + message.system = 1; + break; + case "BIGQUERY": + case 2: + message.system = 2; + break; + } + if (object.format != null) { + if (typeof object.format !== "object") + throw TypeError(".google.cloud.dataplex.v1.Entity.format: object expected"); + message.format = $root.google.cloud.dataplex.v1.StorageFormat.fromObject(object.format); + } + if (object.compatibility != null) { + if (typeof object.compatibility !== "object") + throw TypeError(".google.cloud.dataplex.v1.Entity.compatibility: object expected"); + message.compatibility = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.fromObject(object.compatibility); + } + if (object.schema != null) { + if (typeof object.schema !== "object") + throw TypeError(".google.cloud.dataplex.v1.Entity.schema: object expected"); + message.schema = $root.google.cloud.dataplex.v1.Schema.fromObject(object.schema); + } + return message; + }; + + /** + * Creates a plain object from an Entity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Entity + * @static + * @param {google.cloud.dataplex.v1.Entity} message Entity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Entity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.description = ""; + object.createTime = null; + object.updateTime = null; + object.id = ""; + object.etag = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.asset = ""; + object.dataPath = ""; + object.dataPathPattern = ""; + object.catalogEntry = ""; + object.system = options.enums === String ? "STORAGE_SYSTEM_UNSPECIFIED" : 0; + object.format = null; + object.compatibility = null; + object.schema = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Entity.Type[message.type] : message.type; + if (message.asset != null && message.hasOwnProperty("asset")) + object.asset = message.asset; + if (message.dataPath != null && message.hasOwnProperty("dataPath")) + object.dataPath = message.dataPath; + if (message.dataPathPattern != null && message.hasOwnProperty("dataPathPattern")) + object.dataPathPattern = message.dataPathPattern; + if (message.catalogEntry != null && message.hasOwnProperty("catalogEntry")) + object.catalogEntry = message.catalogEntry; + if (message.system != null && message.hasOwnProperty("system")) + object.system = options.enums === String ? $root.google.cloud.dataplex.v1.StorageSystem[message.system] : message.system; + if (message.format != null && message.hasOwnProperty("format")) + object.format = $root.google.cloud.dataplex.v1.StorageFormat.toObject(message.format, options); + if (message.compatibility != null && message.hasOwnProperty("compatibility")) + object.compatibility = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.toObject(message.compatibility, options); + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = $root.google.cloud.dataplex.v1.Schema.toObject(message.schema, options); + return object; + }; + + /** + * Converts this Entity to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Entity + * @instance + * @returns {Object.} JSON object + */ + Entity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.cloud.dataplex.v1.Entity.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} TABLE=1 TABLE value + * @property {number} FILESET=2 FILESET value + */ + Entity.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TABLE"] = 1; + values[valuesById[2] = "FILESET"] = 2; + return values; + })(); + + Entity.CompatibilityStatus = (function() { + + /** + * Properties of a CompatibilityStatus. + * @memberof google.cloud.dataplex.v1.Entity + * @interface ICompatibilityStatus + * @property {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null} [hiveMetastore] CompatibilityStatus hiveMetastore + * @property {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null} [bigquery] CompatibilityStatus bigquery + */ + + /** + * Constructs a new CompatibilityStatus. + * @memberof google.cloud.dataplex.v1.Entity + * @classdesc Represents a CompatibilityStatus. + * @implements ICompatibilityStatus + * @constructor + * @param {google.cloud.dataplex.v1.Entity.ICompatibilityStatus=} [properties] Properties to set + */ + function CompatibilityStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompatibilityStatus hiveMetastore. + * @member {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null|undefined} hiveMetastore + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @instance + */ + CompatibilityStatus.prototype.hiveMetastore = null; + + /** + * CompatibilityStatus bigquery. + * @member {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null|undefined} bigquery + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @instance + */ + CompatibilityStatus.prototype.bigquery = null; + + /** + * Creates a new CompatibilityStatus instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {google.cloud.dataplex.v1.Entity.ICompatibilityStatus=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus} CompatibilityStatus instance + */ + CompatibilityStatus.create = function create(properties) { + return new CompatibilityStatus(properties); + }; + + /** + * Encodes the specified CompatibilityStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {google.cloud.dataplex.v1.Entity.ICompatibilityStatus} message CompatibilityStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompatibilityStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hiveMetastore != null && Object.hasOwnProperty.call(message, "hiveMetastore")) + $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.encode(message.hiveMetastore, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.bigquery != null && Object.hasOwnProperty.call(message, "bigquery")) + $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.encode(message.bigquery, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CompatibilityStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {google.cloud.dataplex.v1.Entity.ICompatibilityStatus} message CompatibilityStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompatibilityStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompatibilityStatus message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus} CompatibilityStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompatibilityStatus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.hiveMetastore = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.decode(reader, reader.uint32()); + break; + case 2: + message.bigquery = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompatibilityStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus} CompatibilityStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompatibilityStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompatibilityStatus message. + * @function verify + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompatibilityStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hiveMetastore != null && message.hasOwnProperty("hiveMetastore")) { + var error = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify(message.hiveMetastore); + if (error) + return "hiveMetastore." + error; + } + if (message.bigquery != null && message.hasOwnProperty("bigquery")) { + var error = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify(message.bigquery); + if (error) + return "bigquery." + error; + } + return null; + }; + + /** + * Creates a CompatibilityStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus} CompatibilityStatus + */ + CompatibilityStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus) + return object; + var message = new $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus(); + if (object.hiveMetastore != null) { + if (typeof object.hiveMetastore !== "object") + throw TypeError(".google.cloud.dataplex.v1.Entity.CompatibilityStatus.hiveMetastore: object expected"); + message.hiveMetastore = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.fromObject(object.hiveMetastore); + } + if (object.bigquery != null) { + if (typeof object.bigquery !== "object") + throw TypeError(".google.cloud.dataplex.v1.Entity.CompatibilityStatus.bigquery: object expected"); + message.bigquery = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.fromObject(object.bigquery); + } + return message; + }; + + /** + * Creates a plain object from a CompatibilityStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus} message CompatibilityStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompatibilityStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.hiveMetastore = null; + object.bigquery = null; + } + if (message.hiveMetastore != null && message.hasOwnProperty("hiveMetastore")) + object.hiveMetastore = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.toObject(message.hiveMetastore, options); + if (message.bigquery != null && message.hasOwnProperty("bigquery")) + object.bigquery = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.toObject(message.bigquery, options); + return object; + }; + + /** + * Converts this CompatibilityStatus to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @instance + * @returns {Object.} JSON object + */ + CompatibilityStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + CompatibilityStatus.Compatibility = (function() { + + /** + * Properties of a Compatibility. + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @interface ICompatibility + * @property {boolean|null} [compatible] Compatibility compatible + * @property {string|null} [reason] Compatibility reason + */ + + /** + * Constructs a new Compatibility. + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @classdesc Represents a Compatibility. + * @implements ICompatibility + * @constructor + * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility=} [properties] Properties to set + */ + function Compatibility(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Compatibility compatible. + * @member {boolean} compatible + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @instance + */ + Compatibility.prototype.compatible = false; + + /** + * Compatibility reason. + * @member {string} reason + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @instance + */ + Compatibility.prototype.reason = ""; + + /** + * Creates a new Compatibility instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @static + * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} Compatibility instance + */ + Compatibility.create = function create(properties) { + return new Compatibility(properties); + }; + + /** + * Encodes the specified Compatibility message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @static + * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility} message Compatibility message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Compatibility.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.compatible != null && Object.hasOwnProperty.call(message, "compatible")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.compatible); + if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.reason); + return writer; + }; + + /** + * Encodes the specified Compatibility message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @static + * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility} message Compatibility message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Compatibility.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Compatibility message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} Compatibility + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Compatibility.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.compatible = reader.bool(); + break; + case 2: + message.reason = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Compatibility message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} Compatibility + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Compatibility.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Compatibility message. + * @function verify + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Compatibility.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.compatible != null && message.hasOwnProperty("compatible")) + if (typeof message.compatible !== "boolean") + return "compatible: boolean expected"; + if (message.reason != null && message.hasOwnProperty("reason")) + if (!$util.isString(message.reason)) + return "reason: string expected"; + return null; + }; + + /** + * Creates a Compatibility message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} Compatibility + */ + Compatibility.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility) + return object; + var message = new $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility(); + if (object.compatible != null) + message.compatible = Boolean(object.compatible); + if (object.reason != null) + message.reason = String(object.reason); + return message; + }; + + /** + * Creates a plain object from a Compatibility message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @static + * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} message Compatibility + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Compatibility.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.compatible = false; + object.reason = ""; + } + if (message.compatible != null && message.hasOwnProperty("compatible")) + object.compatible = message.compatible; + if (message.reason != null && message.hasOwnProperty("reason")) + object.reason = message.reason; + return object; + }; + + /** + * Converts this Compatibility to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @instance + * @returns {Object.} JSON object + */ + Compatibility.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Compatibility; + })(); + + return CompatibilityStatus; + })(); + + return Entity; + })(); + + v1.Partition = (function() { + + /** + * Properties of a Partition. + * @memberof google.cloud.dataplex.v1 + * @interface IPartition + * @property {string|null} [name] Partition name + * @property {Array.|null} [values] Partition values + * @property {string|null} [location] Partition location + * @property {string|null} [etag] Partition etag + */ + + /** + * Constructs a new Partition. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a Partition. + * @implements IPartition + * @constructor + * @param {google.cloud.dataplex.v1.IPartition=} [properties] Properties to set + */ + function Partition(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Partition name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Partition + * @instance + */ + Partition.prototype.name = ""; + + /** + * Partition values. + * @member {Array.} values + * @memberof google.cloud.dataplex.v1.Partition + * @instance + */ + Partition.prototype.values = $util.emptyArray; + + /** + * Partition location. + * @member {string} location + * @memberof google.cloud.dataplex.v1.Partition + * @instance + */ + Partition.prototype.location = ""; + + /** + * Partition etag. + * @member {string} etag + * @memberof google.cloud.dataplex.v1.Partition + * @instance + */ + Partition.prototype.etag = ""; + + /** + * Creates a new Partition instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {google.cloud.dataplex.v1.IPartition=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Partition} Partition instance + */ + Partition.create = function create(properties) { + return new Partition(properties); + }; + + /** + * Encodes the specified Partition message. Does not implicitly {@link google.cloud.dataplex.v1.Partition.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {google.cloud.dataplex.v1.IPartition} message Partition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Partition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.values[i]); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.location); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.etag); + return writer; + }; + + /** + * Encodes the specified Partition message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Partition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {google.cloud.dataplex.v1.IPartition} message Partition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Partition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Partition message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Partition} Partition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Partition.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Partition(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.values && message.values.length)) + message.values = []; + message.values.push(reader.string()); + break; + case 3: + message.location = reader.string(); + break; + case 4: + message.etag = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Partition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Partition} Partition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Partition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Partition message. + * @function verify + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Partition.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) + if (!$util.isString(message.values[i])) + return "values: string[] expected"; + } + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; + + /** + * Creates a Partition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Partition} Partition + */ + Partition.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Partition) + return object; + var message = new $root.google.cloud.dataplex.v1.Partition(); + if (object.name != null) + message.name = String(object.name); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.cloud.dataplex.v1.Partition.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = String(object.values[i]); + } + if (object.location != null) + message.location = String(object.location); + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; + + /** + * Creates a plain object from a Partition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {google.cloud.dataplex.v1.Partition} message Partition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Partition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (options.defaults) { + object.name = ""; + object.location = ""; + object.etag = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = message.values[j]; + } + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + return object; + }; + + /** + * Converts this Partition to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Partition + * @instance + * @returns {Object.} JSON object + */ + Partition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Partition; + })(); + + v1.Schema = (function() { + + /** + * Properties of a Schema. + * @memberof google.cloud.dataplex.v1 + * @interface ISchema + * @property {boolean|null} [userManaged] Schema userManaged + * @property {Array.|null} [fields] Schema fields + * @property {Array.|null} [partitionFields] Schema partitionFields + * @property {google.cloud.dataplex.v1.Schema.PartitionStyle|null} [partitionStyle] Schema partitionStyle + */ + + /** + * Constructs a new Schema. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a Schema. + * @implements ISchema + * @constructor + * @param {google.cloud.dataplex.v1.ISchema=} [properties] Properties to set + */ + function Schema(properties) { + this.fields = []; + this.partitionFields = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Schema userManaged. + * @member {boolean} userManaged + * @memberof google.cloud.dataplex.v1.Schema + * @instance + */ + Schema.prototype.userManaged = false; + + /** + * Schema fields. + * @member {Array.} fields + * @memberof google.cloud.dataplex.v1.Schema + * @instance + */ + Schema.prototype.fields = $util.emptyArray; + + /** + * Schema partitionFields. + * @member {Array.} partitionFields + * @memberof google.cloud.dataplex.v1.Schema + * @instance + */ + Schema.prototype.partitionFields = $util.emptyArray; + + /** + * Schema partitionStyle. + * @member {google.cloud.dataplex.v1.Schema.PartitionStyle} partitionStyle + * @memberof google.cloud.dataplex.v1.Schema + * @instance + */ + Schema.prototype.partitionStyle = 0; + + /** + * Creates a new Schema instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Schema + * @static + * @param {google.cloud.dataplex.v1.ISchema=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Schema} Schema instance + */ + Schema.create = function create(properties) { + return new Schema(properties); + }; + + /** + * Encodes the specified Schema message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Schema + * @static + * @param {google.cloud.dataplex.v1.ISchema} message Schema message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Schema.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userManaged != null && Object.hasOwnProperty.call(message, "userManaged")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.userManaged); + if (message.fields != null && message.fields.length) + for (var i = 0; i < message.fields.length; ++i) + $root.google.cloud.dataplex.v1.Schema.SchemaField.encode(message.fields[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.partitionFields != null && message.partitionFields.length) + for (var i = 0; i < message.partitionFields.length; ++i) + $root.google.cloud.dataplex.v1.Schema.PartitionField.encode(message.partitionFields[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.partitionStyle != null && Object.hasOwnProperty.call(message, "partitionStyle")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.partitionStyle); + return writer; + }; + + /** + * Encodes the specified Schema message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Schema + * @static + * @param {google.cloud.dataplex.v1.ISchema} message Schema message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Schema.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Schema message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Schema + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Schema} Schema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Schema.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Schema(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.userManaged = reader.bool(); + break; + case 2: + if (!(message.fields && message.fields.length)) + message.fields = []; + message.fields.push($root.google.cloud.dataplex.v1.Schema.SchemaField.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.partitionFields && message.partitionFields.length)) + message.partitionFields = []; + message.partitionFields.push($root.google.cloud.dataplex.v1.Schema.PartitionField.decode(reader, reader.uint32())); + break; + case 4: + message.partitionStyle = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Schema message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Schema + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Schema} Schema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Schema.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Schema message. + * @function verify + * @memberof google.cloud.dataplex.v1.Schema + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Schema.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userManaged != null && message.hasOwnProperty("userManaged")) + if (typeof message.userManaged !== "boolean") + return "userManaged: boolean expected"; + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!Array.isArray(message.fields)) + return "fields: array expected"; + for (var i = 0; i < message.fields.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Schema.SchemaField.verify(message.fields[i]); + if (error) + return "fields." + error; + } + } + if (message.partitionFields != null && message.hasOwnProperty("partitionFields")) { + if (!Array.isArray(message.partitionFields)) + return "partitionFields: array expected"; + for (var i = 0; i < message.partitionFields.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Schema.PartitionField.verify(message.partitionFields[i]); + if (error) + return "partitionFields." + error; + } + } + if (message.partitionStyle != null && message.hasOwnProperty("partitionStyle")) + switch (message.partitionStyle) { + default: + return "partitionStyle: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates a Schema message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Schema + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Schema} Schema + */ + Schema.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Schema) + return object; + var message = new $root.google.cloud.dataplex.v1.Schema(); + if (object.userManaged != null) + message.userManaged = Boolean(object.userManaged); + if (object.fields) { + if (!Array.isArray(object.fields)) + throw TypeError(".google.cloud.dataplex.v1.Schema.fields: array expected"); + message.fields = []; + for (var i = 0; i < object.fields.length; ++i) { + if (typeof object.fields[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.Schema.fields: object expected"); + message.fields[i] = $root.google.cloud.dataplex.v1.Schema.SchemaField.fromObject(object.fields[i]); + } + } + if (object.partitionFields) { + if (!Array.isArray(object.partitionFields)) + throw TypeError(".google.cloud.dataplex.v1.Schema.partitionFields: array expected"); + message.partitionFields = []; + for (var i = 0; i < object.partitionFields.length; ++i) { + if (typeof object.partitionFields[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.Schema.partitionFields: object expected"); + message.partitionFields[i] = $root.google.cloud.dataplex.v1.Schema.PartitionField.fromObject(object.partitionFields[i]); + } + } + switch (object.partitionStyle) { + case "PARTITION_STYLE_UNSPECIFIED": + case 0: + message.partitionStyle = 0; + break; + case "HIVE_COMPATIBLE": + case 1: + message.partitionStyle = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a Schema message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Schema + * @static + * @param {google.cloud.dataplex.v1.Schema} message Schema + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Schema.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.fields = []; + object.partitionFields = []; + } + if (options.defaults) { + object.userManaged = false; + object.partitionStyle = options.enums === String ? "PARTITION_STYLE_UNSPECIFIED" : 0; + } + if (message.userManaged != null && message.hasOwnProperty("userManaged")) + object.userManaged = message.userManaged; + if (message.fields && message.fields.length) { + object.fields = []; + for (var j = 0; j < message.fields.length; ++j) + object.fields[j] = $root.google.cloud.dataplex.v1.Schema.SchemaField.toObject(message.fields[j], options); + } + if (message.partitionFields && message.partitionFields.length) { + object.partitionFields = []; + for (var j = 0; j < message.partitionFields.length; ++j) + object.partitionFields[j] = $root.google.cloud.dataplex.v1.Schema.PartitionField.toObject(message.partitionFields[j], options); + } + if (message.partitionStyle != null && message.hasOwnProperty("partitionStyle")) + object.partitionStyle = options.enums === String ? $root.google.cloud.dataplex.v1.Schema.PartitionStyle[message.partitionStyle] : message.partitionStyle; + return object; + }; + + /** + * Converts this Schema to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Schema + * @instance + * @returns {Object.} JSON object + */ + Schema.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.cloud.dataplex.v1.Schema.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} BOOLEAN=1 BOOLEAN value + * @property {number} BYTE=2 BYTE value + * @property {number} INT16=3 INT16 value + * @property {number} INT32=4 INT32 value + * @property {number} INT64=5 INT64 value + * @property {number} FLOAT=6 FLOAT value + * @property {number} DOUBLE=7 DOUBLE value + * @property {number} DECIMAL=8 DECIMAL value + * @property {number} STRING=9 STRING value + * @property {number} BINARY=10 BINARY value + * @property {number} TIMESTAMP=11 TIMESTAMP value + * @property {number} DATE=12 DATE value + * @property {number} TIME=13 TIME value + * @property {number} RECORD=14 RECORD value + * @property {number} NULL=100 NULL value + */ + Schema.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BOOLEAN"] = 1; + values[valuesById[2] = "BYTE"] = 2; + values[valuesById[3] = "INT16"] = 3; + values[valuesById[4] = "INT32"] = 4; + values[valuesById[5] = "INT64"] = 5; + values[valuesById[6] = "FLOAT"] = 6; + values[valuesById[7] = "DOUBLE"] = 7; + values[valuesById[8] = "DECIMAL"] = 8; + values[valuesById[9] = "STRING"] = 9; + values[valuesById[10] = "BINARY"] = 10; + values[valuesById[11] = "TIMESTAMP"] = 11; + values[valuesById[12] = "DATE"] = 12; + values[valuesById[13] = "TIME"] = 13; + values[valuesById[14] = "RECORD"] = 14; + values[valuesById[100] = "NULL"] = 100; + return values; + })(); + + /** + * Mode enum. + * @name google.cloud.dataplex.v1.Schema.Mode + * @enum {number} + * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value + * @property {number} REQUIRED=1 REQUIRED value + * @property {number} NULLABLE=2 NULLABLE value + * @property {number} REPEATED=3 REPEATED value + */ + Schema.Mode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "REQUIRED"] = 1; + values[valuesById[2] = "NULLABLE"] = 2; + values[valuesById[3] = "REPEATED"] = 3; + return values; + })(); + + Schema.SchemaField = (function() { + + /** + * Properties of a SchemaField. + * @memberof google.cloud.dataplex.v1.Schema + * @interface ISchemaField + * @property {string|null} [name] SchemaField name + * @property {string|null} [description] SchemaField description + * @property {google.cloud.dataplex.v1.Schema.Type|null} [type] SchemaField type + * @property {google.cloud.dataplex.v1.Schema.Mode|null} [mode] SchemaField mode + * @property {Array.|null} [fields] SchemaField fields + */ + + /** + * Constructs a new SchemaField. + * @memberof google.cloud.dataplex.v1.Schema + * @classdesc Represents a SchemaField. + * @implements ISchemaField + * @constructor + * @param {google.cloud.dataplex.v1.Schema.ISchemaField=} [properties] Properties to set + */ + function SchemaField(properties) { + this.fields = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SchemaField name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @instance + */ + SchemaField.prototype.name = ""; + + /** + * SchemaField description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @instance + */ + SchemaField.prototype.description = ""; + + /** + * SchemaField type. + * @member {google.cloud.dataplex.v1.Schema.Type} type + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @instance + */ + SchemaField.prototype.type = 0; + + /** + * SchemaField mode. + * @member {google.cloud.dataplex.v1.Schema.Mode} mode + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @instance + */ + SchemaField.prototype.mode = 0; + + /** + * SchemaField fields. + * @member {Array.} fields + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @instance + */ + SchemaField.prototype.fields = $util.emptyArray; + + /** + * Creates a new SchemaField instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @static + * @param {google.cloud.dataplex.v1.Schema.ISchemaField=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Schema.SchemaField} SchemaField instance + */ + SchemaField.create = function create(properties) { + return new SchemaField(properties); + }; + + /** + * Encodes the specified SchemaField message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.SchemaField.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @static + * @param {google.cloud.dataplex.v1.Schema.ISchemaField} message SchemaField message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaField.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.mode); + if (message.fields != null && message.fields.length) + for (var i = 0; i < message.fields.length; ++i) + $root.google.cloud.dataplex.v1.Schema.SchemaField.encode(message.fields[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SchemaField message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.SchemaField.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @static + * @param {google.cloud.dataplex.v1.Schema.ISchemaField} message SchemaField message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaField.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SchemaField message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Schema.SchemaField} SchemaField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaField.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Schema.SchemaField(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.type = reader.int32(); + break; + case 4: + message.mode = reader.int32(); + break; + case 10: + if (!(message.fields && message.fields.length)) + message.fields = []; + message.fields.push($root.google.cloud.dataplex.v1.Schema.SchemaField.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SchemaField message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Schema.SchemaField} SchemaField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaField.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SchemaField message. + * @function verify + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SchemaField.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 100: + break; + } + if (message.mode != null && message.hasOwnProperty("mode")) + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!Array.isArray(message.fields)) + return "fields: array expected"; + for (var i = 0; i < message.fields.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Schema.SchemaField.verify(message.fields[i]); + if (error) + return "fields." + error; + } + } + return null; + }; + + /** + * Creates a SchemaField message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Schema.SchemaField * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Action.MissingData} MissingData + * @returns {google.cloud.dataplex.v1.Schema.SchemaField} SchemaField */ - MissingData.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Action.MissingData) + SchemaField.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Schema.SchemaField) return object; - return new $root.google.cloud.dataplex.v1.Action.MissingData(); + var message = new $root.google.cloud.dataplex.v1.Schema.SchemaField(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "BOOLEAN": + case 1: + message.type = 1; + break; + case "BYTE": + case 2: + message.type = 2; + break; + case "INT16": + case 3: + message.type = 3; + break; + case "INT32": + case 4: + message.type = 4; + break; + case "INT64": + case 5: + message.type = 5; + break; + case "FLOAT": + case 6: + message.type = 6; + break; + case "DOUBLE": + case 7: + message.type = 7; + break; + case "DECIMAL": + case 8: + message.type = 8; + break; + case "STRING": + case 9: + message.type = 9; + break; + case "BINARY": + case 10: + message.type = 10; + break; + case "TIMESTAMP": + case 11: + message.type = 11; + break; + case "DATE": + case 12: + message.type = 12; + break; + case "TIME": + case 13: + message.type = 13; + break; + case "RECORD": + case 14: + message.type = 14; + break; + case "NULL": + case 100: + message.type = 100; + break; + } + switch (object.mode) { + case "MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "REQUIRED": + case 1: + message.mode = 1; + break; + case "NULLABLE": + case 2: + message.mode = 2; + break; + case "REPEATED": + case 3: + message.mode = 3; + break; + } + if (object.fields) { + if (!Array.isArray(object.fields)) + throw TypeError(".google.cloud.dataplex.v1.Schema.SchemaField.fields: array expected"); + message.fields = []; + for (var i = 0; i < object.fields.length; ++i) { + if (typeof object.fields[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.Schema.SchemaField.fields: object expected"); + message.fields[i] = $root.google.cloud.dataplex.v1.Schema.SchemaField.fromObject(object.fields[i]); + } + } + return message; }; /** - * Creates a plain object from a MissingData message. Also converts values to other types if specified. + * Creates a plain object from a SchemaField message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.Action.MissingData + * @memberof google.cloud.dataplex.v1.Schema.SchemaField * @static - * @param {google.cloud.dataplex.v1.Action.MissingData} message MissingData + * @param {google.cloud.dataplex.v1.Schema.SchemaField} message SchemaField * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MissingData.toObject = function toObject() { - return {}; + SchemaField.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.fields = []; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Schema.Type[message.type] : message.type; + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = options.enums === String ? $root.google.cloud.dataplex.v1.Schema.Mode[message.mode] : message.mode; + if (message.fields && message.fields.length) { + object.fields = []; + for (var j = 0; j < message.fields.length; ++j) + object.fields[j] = $root.google.cloud.dataplex.v1.Schema.SchemaField.toObject(message.fields[j], options); + } + return object; }; /** - * Converts this MissingData to JSON. + * Converts this SchemaField to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.Action.MissingData + * @memberof google.cloud.dataplex.v1.Schema.SchemaField * @instance * @returns {Object.} JSON object */ - MissingData.prototype.toJSON = function toJSON() { + SchemaField.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return MissingData; + return SchemaField; })(); - Action.InvalidDataOrganization = (function() { + Schema.PartitionField = (function() { /** - * Properties of an InvalidDataOrganization. - * @memberof google.cloud.dataplex.v1.Action - * @interface IInvalidDataOrganization + * Properties of a PartitionField. + * @memberof google.cloud.dataplex.v1.Schema + * @interface IPartitionField + * @property {string|null} [name] PartitionField name + * @property {google.cloud.dataplex.v1.Schema.Type|null} [type] PartitionField type */ /** - * Constructs a new InvalidDataOrganization. - * @memberof google.cloud.dataplex.v1.Action - * @classdesc Represents an InvalidDataOrganization. - * @implements IInvalidDataOrganization + * Constructs a new PartitionField. + * @memberof google.cloud.dataplex.v1.Schema + * @classdesc Represents a PartitionField. + * @implements IPartitionField * @constructor - * @param {google.cloud.dataplex.v1.Action.IInvalidDataOrganization=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.Schema.IPartitionField=} [properties] Properties to set */ - function InvalidDataOrganization(properties) { + function PartitionField(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12616,63 +20436,89 @@ } /** - * Creates a new InvalidDataOrganization instance using the specified properties. + * PartitionField name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @instance + */ + PartitionField.prototype.name = ""; + + /** + * PartitionField type. + * @member {google.cloud.dataplex.v1.Schema.Type} type + * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @instance + */ + PartitionField.prototype.type = 0; + + /** + * Creates a new PartitionField instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @memberof google.cloud.dataplex.v1.Schema.PartitionField * @static - * @param {google.cloud.dataplex.v1.Action.IInvalidDataOrganization=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Action.InvalidDataOrganization} InvalidDataOrganization instance + * @param {google.cloud.dataplex.v1.Schema.IPartitionField=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Schema.PartitionField} PartitionField instance */ - InvalidDataOrganization.create = function create(properties) { - return new InvalidDataOrganization(properties); + PartitionField.create = function create(properties) { + return new PartitionField(properties); }; /** - * Encodes the specified InvalidDataOrganization message. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataOrganization.verify|verify} messages. + * Encodes the specified PartitionField message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.PartitionField.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @memberof google.cloud.dataplex.v1.Schema.PartitionField * @static - * @param {google.cloud.dataplex.v1.Action.IInvalidDataOrganization} message InvalidDataOrganization message or plain object to encode + * @param {google.cloud.dataplex.v1.Schema.IPartitionField} message PartitionField message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InvalidDataOrganization.encode = function encode(message, writer) { + PartitionField.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); return writer; }; /** - * Encodes the specified InvalidDataOrganization message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataOrganization.verify|verify} messages. + * Encodes the specified PartitionField message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.PartitionField.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @memberof google.cloud.dataplex.v1.Schema.PartitionField * @static - * @param {google.cloud.dataplex.v1.Action.IInvalidDataOrganization} message InvalidDataOrganization message or plain object to encode + * @param {google.cloud.dataplex.v1.Schema.IPartitionField} message PartitionField message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InvalidDataOrganization.encodeDelimited = function encodeDelimited(message, writer) { + PartitionField.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an InvalidDataOrganization message from the specified reader or buffer. + * Decodes a PartitionField message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @memberof google.cloud.dataplex.v1.Schema.PartitionField * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Action.InvalidDataOrganization} InvalidDataOrganization + * @returns {google.cloud.dataplex.v1.Schema.PartitionField} PartitionField * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InvalidDataOrganization.decode = function decode(reader, length) { + PartitionField.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Schema.PartitionField(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.type = reader.int32(); + break; default: reader.skipType(tag & 7); break; @@ -12682,362 +20528,362 @@ }; /** - * Decodes an InvalidDataOrganization message from the specified reader or buffer, length delimited. + * Decodes a PartitionField message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @memberof google.cloud.dataplex.v1.Schema.PartitionField * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Action.InvalidDataOrganization} InvalidDataOrganization + * @returns {google.cloud.dataplex.v1.Schema.PartitionField} PartitionField * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InvalidDataOrganization.decodeDelimited = function decodeDelimited(reader) { + PartitionField.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an InvalidDataOrganization message. + * Verifies a PartitionField message. * @function verify - * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @memberof google.cloud.dataplex.v1.Schema.PartitionField * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - InvalidDataOrganization.verify = function verify(message) { + PartitionField.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 100: + break; + } return null; }; /** - * Creates an InvalidDataOrganization message from a plain object. Also converts values to their respective internal types. + * Creates a PartitionField message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @memberof google.cloud.dataplex.v1.Schema.PartitionField * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Action.InvalidDataOrganization} InvalidDataOrganization + * @returns {google.cloud.dataplex.v1.Schema.PartitionField} PartitionField */ - InvalidDataOrganization.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization) + PartitionField.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Schema.PartitionField) return object; - return new $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization(); + var message = new $root.google.cloud.dataplex.v1.Schema.PartitionField(); + if (object.name != null) + message.name = String(object.name); + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "BOOLEAN": + case 1: + message.type = 1; + break; + case "BYTE": + case 2: + message.type = 2; + break; + case "INT16": + case 3: + message.type = 3; + break; + case "INT32": + case 4: + message.type = 4; + break; + case "INT64": + case 5: + message.type = 5; + break; + case "FLOAT": + case 6: + message.type = 6; + break; + case "DOUBLE": + case 7: + message.type = 7; + break; + case "DECIMAL": + case 8: + message.type = 8; + break; + case "STRING": + case 9: + message.type = 9; + break; + case "BINARY": + case 10: + message.type = 10; + break; + case "TIMESTAMP": + case 11: + message.type = 11; + break; + case "DATE": + case 12: + message.type = 12; + break; + case "TIME": + case 13: + message.type = 13; + break; + case "RECORD": + case 14: + message.type = 14; + break; + case "NULL": + case 100: + message.type = 100; + break; + } + return message; }; /** - * Creates a plain object from an InvalidDataOrganization message. Also converts values to other types if specified. + * Creates a plain object from a PartitionField message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @memberof google.cloud.dataplex.v1.Schema.PartitionField * @static - * @param {google.cloud.dataplex.v1.Action.InvalidDataOrganization} message InvalidDataOrganization + * @param {google.cloud.dataplex.v1.Schema.PartitionField} message PartitionField * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - InvalidDataOrganization.toObject = function toObject() { - return {}; + PartitionField.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Schema.Type[message.type] : message.type; + return object; }; /** - * Converts this InvalidDataOrganization to JSON. + * Converts this PartitionField to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @memberof google.cloud.dataplex.v1.Schema.PartitionField * @instance * @returns {Object.} JSON object */ - InvalidDataOrganization.prototype.toJSON = function toJSON() { + PartitionField.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return InvalidDataOrganization; + return PartitionField; })(); - return Action; - })(); - - v1.Asset = (function() { - - /** - * Properties of an Asset. - * @memberof google.cloud.dataplex.v1 - * @interface IAsset - * @property {string|null} [name] Asset name - * @property {string|null} [displayName] Asset displayName - * @property {string|null} [uid] Asset uid - * @property {google.protobuf.ITimestamp|null} [createTime] Asset createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Asset updateTime - * @property {Object.|null} [labels] Asset labels - * @property {string|null} [description] Asset description - * @property {google.cloud.dataplex.v1.Asset.SecurityStatus.State|null} [state] Asset state - * @property {google.cloud.dataplex.v1.Asset.IResourceSpec|null} [resourceSpec] Asset resourceSpec - * @property {google.cloud.dataplex.v1.Asset.IResourceStatus|null} [resourceStatus] Asset resourceStatus - * @property {google.cloud.dataplex.v1.Asset.ISecurityStatus|null} [securityStatus] Asset securityStatus - * @property {google.cloud.dataplex.v1.Asset.IDiscoverySpec|null} [discoverySpec] Asset discoverySpec - * @property {google.cloud.dataplex.v1.Asset.IDiscoveryStatus|null} [discoveryStatus] Asset discoveryStatus - */ - - /** - * Constructs a new Asset. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an Asset. - * @implements IAsset - * @constructor - * @param {google.cloud.dataplex.v1.IAsset=} [properties] Properties to set - */ - function Asset(properties) { - this.labels = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Asset name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.Asset - * @instance - */ - Asset.prototype.name = ""; - - /** - * Asset displayName. - * @member {string} displayName - * @memberof google.cloud.dataplex.v1.Asset - * @instance - */ - Asset.prototype.displayName = ""; - /** - * Asset uid. - * @member {string} uid - * @memberof google.cloud.dataplex.v1.Asset - * @instance + * PartitionStyle enum. + * @name google.cloud.dataplex.v1.Schema.PartitionStyle + * @enum {number} + * @property {number} PARTITION_STYLE_UNSPECIFIED=0 PARTITION_STYLE_UNSPECIFIED value + * @property {number} HIVE_COMPATIBLE=1 HIVE_COMPATIBLE value */ - Asset.prototype.uid = ""; + Schema.PartitionStyle = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PARTITION_STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "HIVE_COMPATIBLE"] = 1; + return values; + })(); - /** - * Asset createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dataplex.v1.Asset - * @instance - */ - Asset.prototype.createTime = null; + return Schema; + })(); - /** - * Asset updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.Asset - * @instance - */ - Asset.prototype.updateTime = null; + v1.StorageFormat = (function() { /** - * Asset labels. - * @member {Object.} labels - * @memberof google.cloud.dataplex.v1.Asset - * @instance + * Properties of a StorageFormat. + * @memberof google.cloud.dataplex.v1 + * @interface IStorageFormat + * @property {google.cloud.dataplex.v1.StorageFormat.Format|null} [format] StorageFormat format + * @property {google.cloud.dataplex.v1.StorageFormat.CompressionFormat|null} [compressionFormat] StorageFormat compressionFormat + * @property {string|null} [mimeType] StorageFormat mimeType + * @property {google.cloud.dataplex.v1.StorageFormat.ICsvOptions|null} [csv] StorageFormat csv + * @property {google.cloud.dataplex.v1.StorageFormat.IJsonOptions|null} [json] StorageFormat json */ - Asset.prototype.labels = $util.emptyObject; /** - * Asset description. - * @member {string} description - * @memberof google.cloud.dataplex.v1.Asset - * @instance + * Constructs a new StorageFormat. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a StorageFormat. + * @implements IStorageFormat + * @constructor + * @param {google.cloud.dataplex.v1.IStorageFormat=} [properties] Properties to set */ - Asset.prototype.description = ""; + function StorageFormat(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Asset state. - * @member {google.cloud.dataplex.v1.Asset.SecurityStatus.State} state - * @memberof google.cloud.dataplex.v1.Asset + * StorageFormat format. + * @member {google.cloud.dataplex.v1.StorageFormat.Format} format + * @memberof google.cloud.dataplex.v1.StorageFormat * @instance */ - Asset.prototype.state = 0; + StorageFormat.prototype.format = 0; /** - * Asset resourceSpec. - * @member {google.cloud.dataplex.v1.Asset.IResourceSpec|null|undefined} resourceSpec - * @memberof google.cloud.dataplex.v1.Asset + * StorageFormat compressionFormat. + * @member {google.cloud.dataplex.v1.StorageFormat.CompressionFormat} compressionFormat + * @memberof google.cloud.dataplex.v1.StorageFormat * @instance */ - Asset.prototype.resourceSpec = null; + StorageFormat.prototype.compressionFormat = 0; /** - * Asset resourceStatus. - * @member {google.cloud.dataplex.v1.Asset.IResourceStatus|null|undefined} resourceStatus - * @memberof google.cloud.dataplex.v1.Asset + * StorageFormat mimeType. + * @member {string} mimeType + * @memberof google.cloud.dataplex.v1.StorageFormat * @instance */ - Asset.prototype.resourceStatus = null; + StorageFormat.prototype.mimeType = ""; /** - * Asset securityStatus. - * @member {google.cloud.dataplex.v1.Asset.ISecurityStatus|null|undefined} securityStatus - * @memberof google.cloud.dataplex.v1.Asset + * StorageFormat csv. + * @member {google.cloud.dataplex.v1.StorageFormat.ICsvOptions|null|undefined} csv + * @memberof google.cloud.dataplex.v1.StorageFormat * @instance */ - Asset.prototype.securityStatus = null; + StorageFormat.prototype.csv = null; /** - * Asset discoverySpec. - * @member {google.cloud.dataplex.v1.Asset.IDiscoverySpec|null|undefined} discoverySpec - * @memberof google.cloud.dataplex.v1.Asset + * StorageFormat json. + * @member {google.cloud.dataplex.v1.StorageFormat.IJsonOptions|null|undefined} json + * @memberof google.cloud.dataplex.v1.StorageFormat * @instance */ - Asset.prototype.discoverySpec = null; + StorageFormat.prototype.json = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Asset discoveryStatus. - * @member {google.cloud.dataplex.v1.Asset.IDiscoveryStatus|null|undefined} discoveryStatus - * @memberof google.cloud.dataplex.v1.Asset + * StorageFormat options. + * @member {"csv"|"json"|undefined} options + * @memberof google.cloud.dataplex.v1.StorageFormat * @instance */ - Asset.prototype.discoveryStatus = null; + Object.defineProperty(StorageFormat.prototype, "options", { + get: $util.oneOfGetter($oneOfFields = ["csv", "json"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new Asset instance using the specified properties. + * Creates a new StorageFormat instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.Asset + * @memberof google.cloud.dataplex.v1.StorageFormat * @static - * @param {google.cloud.dataplex.v1.IAsset=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Asset} Asset instance + * @param {google.cloud.dataplex.v1.IStorageFormat=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.StorageFormat} StorageFormat instance */ - Asset.create = function create(properties) { - return new Asset(properties); + StorageFormat.create = function create(properties) { + return new StorageFormat(properties); }; /** - * Encodes the specified Asset message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.verify|verify} messages. + * Encodes the specified StorageFormat message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.Asset + * @memberof google.cloud.dataplex.v1.StorageFormat * @static - * @param {google.cloud.dataplex.v1.IAsset} message Asset message or plain object to encode + * @param {google.cloud.dataplex.v1.IStorageFormat} message StorageFormat message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Asset.encode = function encode(message, writer) { + StorageFormat.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.uid); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.description); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); - if (message.resourceSpec != null && Object.hasOwnProperty.call(message, "resourceSpec")) - $root.google.cloud.dataplex.v1.Asset.ResourceSpec.encode(message.resourceSpec, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); - if (message.resourceStatus != null && Object.hasOwnProperty.call(message, "resourceStatus")) - $root.google.cloud.dataplex.v1.Asset.ResourceStatus.encode(message.resourceStatus, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.securityStatus != null && Object.hasOwnProperty.call(message, "securityStatus")) - $root.google.cloud.dataplex.v1.Asset.SecurityStatus.encode(message.securityStatus, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); - if (message.discoverySpec != null && Object.hasOwnProperty.call(message, "discoverySpec")) - $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.encode(message.discoverySpec, writer.uint32(/* id 106, wireType 2 =*/850).fork()).ldelim(); - if (message.discoveryStatus != null && Object.hasOwnProperty.call(message, "discoveryStatus")) - $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.encode(message.discoveryStatus, writer.uint32(/* id 107, wireType 2 =*/858).fork()).ldelim(); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); + if (message.compressionFormat != null && Object.hasOwnProperty.call(message, "compressionFormat")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.compressionFormat); + if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.mimeType); + if (message.csv != null && Object.hasOwnProperty.call(message, "csv")) + $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.encode(message.csv, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.json != null && Object.hasOwnProperty.call(message, "json")) + $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.encode(message.json, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); return writer; }; /** - * Encodes the specified Asset message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.verify|verify} messages. + * Encodes the specified StorageFormat message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Asset + * @memberof google.cloud.dataplex.v1.StorageFormat * @static - * @param {google.cloud.dataplex.v1.IAsset} message Asset message or plain object to encode + * @param {google.cloud.dataplex.v1.IStorageFormat} message StorageFormat message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Asset.encodeDelimited = function encodeDelimited(message, writer) { + StorageFormat.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Asset message from the specified reader or buffer. + * Decodes a StorageFormat message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.Asset + * @memberof google.cloud.dataplex.v1.StorageFormat * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Asset} Asset + * @returns {google.cloud.dataplex.v1.StorageFormat} StorageFormat * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Asset.decode = function decode(reader, length) { + StorageFormat.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.StorageFormat(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.format = reader.int32(); break; case 2: - message.displayName = reader.string(); + message.compressionFormat = reader.int32(); break; case 3: - message.uid = reader.string(); - break; - case 4: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 5: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - case 7: - message.description = reader.string(); - break; - case 8: - message.state = reader.int32(); - break; - case 100: - message.resourceSpec = $root.google.cloud.dataplex.v1.Asset.ResourceSpec.decode(reader, reader.uint32()); - break; - case 101: - message.resourceStatus = $root.google.cloud.dataplex.v1.Asset.ResourceStatus.decode(reader, reader.uint32()); - break; - case 103: - message.securityStatus = $root.google.cloud.dataplex.v1.Asset.SecurityStatus.decode(reader, reader.uint32()); + message.mimeType = reader.string(); break; - case 106: - message.discoverySpec = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.decode(reader, reader.uint32()); + case 10: + message.csv = $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.decode(reader, reader.uint32()); break; - case 107: - message.discoveryStatus = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.decode(reader, reader.uint32()); + case 11: + message.json = $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -13048,276 +20894,500 @@ }; /** - * Decodes an Asset message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Asset - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Asset} Asset - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Asset.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Asset message. - * @function verify - * @memberof google.cloud.dataplex.v1.Asset - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Asset.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { + * Decodes a StorageFormat message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.StorageFormat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.StorageFormat} StorageFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StorageFormat.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StorageFormat message. + * @function verify + * @memberof google.cloud.dataplex.v1.StorageFormat + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StorageFormat.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.format != null && message.hasOwnProperty("format")) + switch (message.format) { default: - return "state: enum value expected"; + return "format: enum value expected"; case 0: case 1: case 2: case 3: + case 100: + case 101: + case 200: + case 201: + case 202: + case 203: + case 204: + case 1000: + case 1001: break; } - if (message.resourceSpec != null && message.hasOwnProperty("resourceSpec")) { - var error = $root.google.cloud.dataplex.v1.Asset.ResourceSpec.verify(message.resourceSpec); - if (error) - return "resourceSpec." + error; - } - if (message.resourceStatus != null && message.hasOwnProperty("resourceStatus")) { - var error = $root.google.cloud.dataplex.v1.Asset.ResourceStatus.verify(message.resourceStatus); - if (error) - return "resourceStatus." + error; - } - if (message.securityStatus != null && message.hasOwnProperty("securityStatus")) { - var error = $root.google.cloud.dataplex.v1.Asset.SecurityStatus.verify(message.securityStatus); - if (error) - return "securityStatus." + error; - } - if (message.discoverySpec != null && message.hasOwnProperty("discoverySpec")) { - var error = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.verify(message.discoverySpec); - if (error) - return "discoverySpec." + error; + if (message.compressionFormat != null && message.hasOwnProperty("compressionFormat")) + switch (message.compressionFormat) { + default: + return "compressionFormat: enum value expected"; + case 0: + case 2: + case 3: + break; + } + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + if (!$util.isString(message.mimeType)) + return "mimeType: string expected"; + if (message.csv != null && message.hasOwnProperty("csv")) { + properties.options = 1; + { + var error = $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify(message.csv); + if (error) + return "csv." + error; + } } - if (message.discoveryStatus != null && message.hasOwnProperty("discoveryStatus")) { - var error = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.verify(message.discoveryStatus); - if (error) - return "discoveryStatus." + error; + if (message.json != null && message.hasOwnProperty("json")) { + if (properties.options === 1) + return "options: multiple values"; + properties.options = 1; + { + var error = $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify(message.json); + if (error) + return "json." + error; + } } return null; }; /** - * Creates an Asset message from a plain object. Also converts values to their respective internal types. + * Creates a StorageFormat message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.Asset + * @memberof google.cloud.dataplex.v1.StorageFormat * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Asset} Asset + * @returns {google.cloud.dataplex.v1.StorageFormat} StorageFormat */ - Asset.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Asset) + StorageFormat.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.StorageFormat) return object; - var message = new $root.google.cloud.dataplex.v1.Asset(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uid != null) - message.uid = String(object.uid); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Asset.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Asset.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.dataplex.v1.Asset.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - if (object.description != null) - message.description = String(object.description); - switch (object.state) { - case "STATE_UNSPECIFIED": + var message = new $root.google.cloud.dataplex.v1.StorageFormat(); + switch (object.format) { + case "FORMAT_UNSPECIFIED": case 0: - message.state = 0; + message.format = 0; break; - case "READY": + case "PARQUET": case 1: - message.state = 1; + message.format = 1; break; - case "APPLYING": + case "AVRO": case 2: - message.state = 2; + message.format = 2; break; - case "ERROR": + case "ORC": case 3: - message.state = 3; + message.format = 3; + break; + case "CSV": + case 100: + message.format = 100; + break; + case "JSON": + case 101: + message.format = 101; + break; + case "IMAGE": + case 200: + message.format = 200; + break; + case "AUDIO": + case 201: + message.format = 201; + break; + case "VIDEO": + case 202: + message.format = 202; + break; + case "TEXT": + case 203: + message.format = 203; + break; + case "TFRECORD": + case 204: + message.format = 204; + break; + case "OTHER": + case 1000: + message.format = 1000; + break; + case "UNKNOWN": + case 1001: + message.format = 1001; break; } - if (object.resourceSpec != null) { - if (typeof object.resourceSpec !== "object") - throw TypeError(".google.cloud.dataplex.v1.Asset.resourceSpec: object expected"); - message.resourceSpec = $root.google.cloud.dataplex.v1.Asset.ResourceSpec.fromObject(object.resourceSpec); - } - if (object.resourceStatus != null) { - if (typeof object.resourceStatus !== "object") - throw TypeError(".google.cloud.dataplex.v1.Asset.resourceStatus: object expected"); - message.resourceStatus = $root.google.cloud.dataplex.v1.Asset.ResourceStatus.fromObject(object.resourceStatus); - } - if (object.securityStatus != null) { - if (typeof object.securityStatus !== "object") - throw TypeError(".google.cloud.dataplex.v1.Asset.securityStatus: object expected"); - message.securityStatus = $root.google.cloud.dataplex.v1.Asset.SecurityStatus.fromObject(object.securityStatus); + switch (object.compressionFormat) { + case "COMPRESSION_FORMAT_UNSPECIFIED": + case 0: + message.compressionFormat = 0; + break; + case "GZIP": + case 2: + message.compressionFormat = 2; + break; + case "BZIP2": + case 3: + message.compressionFormat = 3; + break; } - if (object.discoverySpec != null) { - if (typeof object.discoverySpec !== "object") - throw TypeError(".google.cloud.dataplex.v1.Asset.discoverySpec: object expected"); - message.discoverySpec = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.fromObject(object.discoverySpec); + if (object.mimeType != null) + message.mimeType = String(object.mimeType); + if (object.csv != null) { + if (typeof object.csv !== "object") + throw TypeError(".google.cloud.dataplex.v1.StorageFormat.csv: object expected"); + message.csv = $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.fromObject(object.csv); } - if (object.discoveryStatus != null) { - if (typeof object.discoveryStatus !== "object") - throw TypeError(".google.cloud.dataplex.v1.Asset.discoveryStatus: object expected"); - message.discoveryStatus = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.fromObject(object.discoveryStatus); + if (object.json != null) { + if (typeof object.json !== "object") + throw TypeError(".google.cloud.dataplex.v1.StorageFormat.json: object expected"); + message.json = $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.fromObject(object.json); } return message; }; /** - * Creates a plain object from an Asset message. Also converts values to other types if specified. + * Creates a plain object from a StorageFormat message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.Asset + * @memberof google.cloud.dataplex.v1.StorageFormat * @static - * @param {google.cloud.dataplex.v1.Asset} message Asset + * @param {google.cloud.dataplex.v1.StorageFormat} message StorageFormat * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Asset.toObject = function toObject(message, options) { + StorageFormat.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.labels = {}; if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.uid = ""; - object.createTime = null; - object.updateTime = null; - object.description = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.resourceSpec = null; - object.resourceStatus = null; - object.securityStatus = null; - object.discoverySpec = null; - object.discoveryStatus = null; + object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; + object.compressionFormat = options.enums === String ? "COMPRESSION_FORMAT_UNSPECIFIED" : 0; + object.mimeType = ""; + } + if (message.format != null && message.hasOwnProperty("format")) + object.format = options.enums === String ? $root.google.cloud.dataplex.v1.StorageFormat.Format[message.format] : message.format; + if (message.compressionFormat != null && message.hasOwnProperty("compressionFormat")) + object.compressionFormat = options.enums === String ? $root.google.cloud.dataplex.v1.StorageFormat.CompressionFormat[message.compressionFormat] : message.compressionFormat; + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + object.mimeType = message.mimeType; + if (message.csv != null && message.hasOwnProperty("csv")) { + object.csv = $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.toObject(message.csv, options); + if (options.oneofs) + object.options = "csv"; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; + if (message.json != null && message.hasOwnProperty("json")) { + object.json = $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.toObject(message.json, options); + if (options.oneofs) + object.options = "json"; } - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Asset.SecurityStatus.State[message.state] : message.state; - if (message.resourceSpec != null && message.hasOwnProperty("resourceSpec")) - object.resourceSpec = $root.google.cloud.dataplex.v1.Asset.ResourceSpec.toObject(message.resourceSpec, options); - if (message.resourceStatus != null && message.hasOwnProperty("resourceStatus")) - object.resourceStatus = $root.google.cloud.dataplex.v1.Asset.ResourceStatus.toObject(message.resourceStatus, options); - if (message.securityStatus != null && message.hasOwnProperty("securityStatus")) - object.securityStatus = $root.google.cloud.dataplex.v1.Asset.SecurityStatus.toObject(message.securityStatus, options); - if (message.discoverySpec != null && message.hasOwnProperty("discoverySpec")) - object.discoverySpec = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.toObject(message.discoverySpec, options); - if (message.discoveryStatus != null && message.hasOwnProperty("discoveryStatus")) - object.discoveryStatus = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.toObject(message.discoveryStatus, options); return object; }; - /** - * Converts this Asset to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Asset - * @instance - * @returns {Object.} JSON object - */ - Asset.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this StorageFormat to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.StorageFormat + * @instance + * @returns {Object.} JSON object + */ + StorageFormat.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + StorageFormat.CsvOptions = (function() { + + /** + * Properties of a CsvOptions. + * @memberof google.cloud.dataplex.v1.StorageFormat + * @interface ICsvOptions + * @property {string|null} [encoding] CsvOptions encoding + * @property {number|null} [headerRows] CsvOptions headerRows + * @property {string|null} [delimiter] CsvOptions delimiter + * @property {string|null} [quote] CsvOptions quote + */ + + /** + * Constructs a new CsvOptions. + * @memberof google.cloud.dataplex.v1.StorageFormat + * @classdesc Represents a CsvOptions. + * @implements ICsvOptions + * @constructor + * @param {google.cloud.dataplex.v1.StorageFormat.ICsvOptions=} [properties] Properties to set + */ + function CsvOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CsvOptions encoding. + * @member {string} encoding + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @instance + */ + CsvOptions.prototype.encoding = ""; + + /** + * CsvOptions headerRows. + * @member {number} headerRows + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @instance + */ + CsvOptions.prototype.headerRows = 0; + + /** + * CsvOptions delimiter. + * @member {string} delimiter + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @instance + */ + CsvOptions.prototype.delimiter = ""; + + /** + * CsvOptions quote. + * @member {string} quote + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @instance + */ + CsvOptions.prototype.quote = ""; + + /** + * Creates a new CsvOptions instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.StorageFormat.ICsvOptions=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.StorageFormat.CsvOptions} CsvOptions instance + */ + CsvOptions.create = function create(properties) { + return new CsvOptions(properties); + }; + + /** + * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.StorageFormat.ICsvOptions} message CsvOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CsvOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.encoding); + if (message.headerRows != null && Object.hasOwnProperty.call(message, "headerRows")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.headerRows); + if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.delimiter); + if (message.quote != null && Object.hasOwnProperty.call(message, "quote")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.quote); + return writer; + }; + + /** + * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.StorageFormat.ICsvOptions} message CsvOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CsvOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CsvOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.StorageFormat.CsvOptions} CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CsvOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.encoding = reader.string(); + break; + case 2: + message.headerRows = reader.int32(); + break; + case 3: + message.delimiter = reader.string(); + break; + case 4: + message.quote = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CsvOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.StorageFormat.CsvOptions} CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CsvOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CsvOptions message. + * @function verify + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CsvOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) + if (!$util.isString(message.encoding)) + return "encoding: string expected"; + if (message.headerRows != null && message.hasOwnProperty("headerRows")) + if (!$util.isInteger(message.headerRows)) + return "headerRows: integer expected"; + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + if (!$util.isString(message.delimiter)) + return "delimiter: string expected"; + if (message.quote != null && message.hasOwnProperty("quote")) + if (!$util.isString(message.quote)) + return "quote: string expected"; + return null; + }; + + /** + * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.StorageFormat.CsvOptions} CsvOptions + */ + CsvOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions) + return object; + var message = new $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions(); + if (object.encoding != null) + message.encoding = String(object.encoding); + if (object.headerRows != null) + message.headerRows = object.headerRows | 0; + if (object.delimiter != null) + message.delimiter = String(object.delimiter); + if (object.quote != null) + message.quote = String(object.quote); + return message; + }; + + /** + * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.StorageFormat.CsvOptions} message CsvOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CsvOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.encoding = ""; + object.headerRows = 0; + object.delimiter = ""; + object.quote = ""; + } + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = message.encoding; + if (message.headerRows != null && message.hasOwnProperty("headerRows")) + object.headerRows = message.headerRows; + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + object.delimiter = message.delimiter; + if (message.quote != null && message.hasOwnProperty("quote")) + object.quote = message.quote; + return object; + }; - Asset.SecurityStatus = (function() { + /** + * Converts this CsvOptions to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @instance + * @returns {Object.} JSON object + */ + CsvOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CsvOptions; + })(); + + StorageFormat.JsonOptions = (function() { /** - * Properties of a SecurityStatus. - * @memberof google.cloud.dataplex.v1.Asset - * @interface ISecurityStatus - * @property {google.cloud.dataplex.v1.Asset.SecurityStatus.State|null} [state] SecurityStatus state - * @property {string|null} [message] SecurityStatus message - * @property {google.protobuf.ITimestamp|null} [updateTime] SecurityStatus updateTime + * Properties of a JsonOptions. + * @memberof google.cloud.dataplex.v1.StorageFormat + * @interface IJsonOptions + * @property {string|null} [encoding] JsonOptions encoding */ /** - * Constructs a new SecurityStatus. - * @memberof google.cloud.dataplex.v1.Asset - * @classdesc Represents a SecurityStatus. - * @implements ISecurityStatus + * Constructs a new JsonOptions. + * @memberof google.cloud.dataplex.v1.StorageFormat + * @classdesc Represents a JsonOptions. + * @implements IJsonOptions * @constructor - * @param {google.cloud.dataplex.v1.Asset.ISecurityStatus=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.StorageFormat.IJsonOptions=} [properties] Properties to set */ - function SecurityStatus(properties) { + function JsonOptions(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13325,101 +21395,75 @@ } /** - * SecurityStatus state. - * @member {google.cloud.dataplex.v1.Asset.SecurityStatus.State} state - * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus - * @instance - */ - SecurityStatus.prototype.state = 0; - - /** - * SecurityStatus message. - * @member {string} message - * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus - * @instance - */ - SecurityStatus.prototype.message = ""; - - /** - * SecurityStatus updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * JsonOptions encoding. + * @member {string} encoding + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions * @instance */ - SecurityStatus.prototype.updateTime = null; + JsonOptions.prototype.encoding = ""; /** - * Creates a new SecurityStatus instance using the specified properties. + * Creates a new JsonOptions instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions * @static - * @param {google.cloud.dataplex.v1.Asset.ISecurityStatus=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Asset.SecurityStatus} SecurityStatus instance + * @param {google.cloud.dataplex.v1.StorageFormat.IJsonOptions=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.StorageFormat.JsonOptions} JsonOptions instance */ - SecurityStatus.create = function create(properties) { - return new SecurityStatus(properties); + JsonOptions.create = function create(properties) { + return new JsonOptions(properties); }; /** - * Encodes the specified SecurityStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.SecurityStatus.verify|verify} messages. + * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions * @static - * @param {google.cloud.dataplex.v1.Asset.ISecurityStatus} message SecurityStatus message or plain object to encode + * @param {google.cloud.dataplex.v1.StorageFormat.IJsonOptions} message JsonOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SecurityStatus.encode = function encode(message, writer) { + JsonOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.encoding); return writer; }; /** - * Encodes the specified SecurityStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.SecurityStatus.verify|verify} messages. + * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions * @static - * @param {google.cloud.dataplex.v1.Asset.ISecurityStatus} message SecurityStatus message or plain object to encode + * @param {google.cloud.dataplex.v1.StorageFormat.IJsonOptions} message JsonOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SecurityStatus.encodeDelimited = function encodeDelimited(message, writer) { + JsonOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SecurityStatus message from the specified reader or buffer. + * Decodes a JsonOptions message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Asset.SecurityStatus} SecurityStatus + * @returns {google.cloud.dataplex.v1.StorageFormat.JsonOptions} JsonOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SecurityStatus.decode = function decode(reader, length) { + JsonOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.SecurityStatus(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.state = reader.int32(); - break; - case 2: - message.message = reader.string(); - break; - case 3: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.encoding = reader.string(); break; default: reader.skipType(tag & 7); @@ -13430,3105 +21474,3156 @@ }; /** - * Decodes a SecurityStatus message from the specified reader or buffer, length delimited. + * Decodes a JsonOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Asset.SecurityStatus} SecurityStatus + * @returns {google.cloud.dataplex.v1.StorageFormat.JsonOptions} JsonOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SecurityStatus.decodeDelimited = function decodeDelimited(reader) { + JsonOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SecurityStatus message. + * Verifies a JsonOptions message. * @function verify - * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SecurityStatus.verify = function verify(message) { + JsonOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } + if (message.encoding != null && message.hasOwnProperty("encoding")) + if (!$util.isString(message.encoding)) + return "encoding: string expected"; return null; }; /** - * Creates a SecurityStatus message from a plain object. Also converts values to their respective internal types. + * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Asset.SecurityStatus} SecurityStatus + * @returns {google.cloud.dataplex.v1.StorageFormat.JsonOptions} JsonOptions */ - SecurityStatus.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Asset.SecurityStatus) + JsonOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions) return object; - var message = new $root.google.cloud.dataplex.v1.Asset.SecurityStatus(); - switch (object.state) { - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "READY": - case 1: - message.state = 1; - break; - case "APPLYING": - case 2: - message.state = 2; - break; - case "ERROR": - case 3: - message.state = 3; - break; - } - if (object.message != null) - message.message = String(object.message); - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Asset.SecurityStatus.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } + var message = new $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions(); + if (object.encoding != null) + message.encoding = String(object.encoding); return message; }; /** - * Creates a plain object from a SecurityStatus message. Also converts values to other types if specified. + * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions * @static - * @param {google.cloud.dataplex.v1.Asset.SecurityStatus} message SecurityStatus + * @param {google.cloud.dataplex.v1.StorageFormat.JsonOptions} message JsonOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SecurityStatus.toObject = function toObject(message, options) { + JsonOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.message = ""; - object.updateTime = null; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Asset.SecurityStatus.State[message.state] : message.state; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (options.defaults) + object.encoding = ""; + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = message.encoding; return object; }; /** - * Converts this SecurityStatus to JSON. + * Converts this JsonOptions to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions * @instance * @returns {Object.} JSON object */ - SecurityStatus.prototype.toJSON = function toJSON() { + JsonOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * State enum. - * @name google.cloud.dataplex.v1.Asset.SecurityStatus.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} READY=1 READY value - * @property {number} APPLYING=2 APPLYING value - * @property {number} ERROR=3 ERROR value - */ - SecurityStatus.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "READY"] = 1; - values[valuesById[2] = "APPLYING"] = 2; - values[valuesById[3] = "ERROR"] = 3; - return values; - })(); + return JsonOptions; + })(); - return SecurityStatus; + /** + * Format enum. + * @name google.cloud.dataplex.v1.StorageFormat.Format + * @enum {number} + * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value + * @property {number} PARQUET=1 PARQUET value + * @property {number} AVRO=2 AVRO value + * @property {number} ORC=3 ORC value + * @property {number} CSV=100 CSV value + * @property {number} JSON=101 JSON value + * @property {number} IMAGE=200 IMAGE value + * @property {number} AUDIO=201 AUDIO value + * @property {number} VIDEO=202 VIDEO value + * @property {number} TEXT=203 TEXT value + * @property {number} TFRECORD=204 TFRECORD value + * @property {number} OTHER=1000 OTHER value + * @property {number} UNKNOWN=1001 UNKNOWN value + */ + StorageFormat.Format = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "PARQUET"] = 1; + values[valuesById[2] = "AVRO"] = 2; + values[valuesById[3] = "ORC"] = 3; + values[valuesById[100] = "CSV"] = 100; + values[valuesById[101] = "JSON"] = 101; + values[valuesById[200] = "IMAGE"] = 200; + values[valuesById[201] = "AUDIO"] = 201; + values[valuesById[202] = "VIDEO"] = 202; + values[valuesById[203] = "TEXT"] = 203; + values[valuesById[204] = "TFRECORD"] = 204; + values[valuesById[1000] = "OTHER"] = 1000; + values[valuesById[1001] = "UNKNOWN"] = 1001; + return values; })(); - Asset.DiscoverySpec = (function() { + /** + * CompressionFormat enum. + * @name google.cloud.dataplex.v1.StorageFormat.CompressionFormat + * @enum {number} + * @property {number} COMPRESSION_FORMAT_UNSPECIFIED=0 COMPRESSION_FORMAT_UNSPECIFIED value + * @property {number} GZIP=2 GZIP value + * @property {number} BZIP2=3 BZIP2 value + */ + StorageFormat.CompressionFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COMPRESSION_FORMAT_UNSPECIFIED"] = 0; + values[valuesById[2] = "GZIP"] = 2; + values[valuesById[3] = "BZIP2"] = 3; + return values; + })(); - /** - * Properties of a DiscoverySpec. - * @memberof google.cloud.dataplex.v1.Asset - * @interface IDiscoverySpec - * @property {boolean|null} [enabled] DiscoverySpec enabled - * @property {Array.|null} [includePatterns] DiscoverySpec includePatterns - * @property {Array.|null} [excludePatterns] DiscoverySpec excludePatterns - * @property {google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions|null} [csvOptions] DiscoverySpec csvOptions - * @property {google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions|null} [jsonOptions] DiscoverySpec jsonOptions - * @property {string|null} [schedule] DiscoverySpec schedule - */ + return StorageFormat; + })(); - /** - * Constructs a new DiscoverySpec. - * @memberof google.cloud.dataplex.v1.Asset - * @classdesc Represents a DiscoverySpec. - * @implements IDiscoverySpec - * @constructor - * @param {google.cloud.dataplex.v1.Asset.IDiscoverySpec=} [properties] Properties to set - */ - function DiscoverySpec(properties) { - this.includePatterns = []; - this.excludePatterns = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * StorageSystem enum. + * @name google.cloud.dataplex.v1.StorageSystem + * @enum {number} + * @property {number} STORAGE_SYSTEM_UNSPECIFIED=0 STORAGE_SYSTEM_UNSPECIFIED value + * @property {number} CLOUD_STORAGE=1 CLOUD_STORAGE value + * @property {number} BIGQUERY=2 BIGQUERY value + */ + v1.StorageSystem = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STORAGE_SYSTEM_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD_STORAGE"] = 1; + values[valuesById[2] = "BIGQUERY"] = 2; + return values; + })(); - /** - * DiscoverySpec enabled. - * @member {boolean} enabled - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @instance - */ - DiscoverySpec.prototype.enabled = false; + v1.DataplexService = (function() { - /** - * DiscoverySpec includePatterns. - * @member {Array.} includePatterns - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @instance - */ - DiscoverySpec.prototype.includePatterns = $util.emptyArray; + /** + * Constructs a new DataplexService service. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DataplexService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function DataplexService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } - /** - * DiscoverySpec excludePatterns. - * @member {Array.} excludePatterns - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @instance - */ - DiscoverySpec.prototype.excludePatterns = $util.emptyArray; + (DataplexService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DataplexService; - /** - * DiscoverySpec csvOptions. - * @member {google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions|null|undefined} csvOptions - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @instance - */ - DiscoverySpec.prototype.csvOptions = null; + /** + * Creates new DataplexService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dataplex.v1.DataplexService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {DataplexService} RPC service. Useful where requests and/or responses are streamed. + */ + DataplexService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; - /** - * DiscoverySpec jsonOptions. - * @member {google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions|null|undefined} jsonOptions - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @instance - */ - DiscoverySpec.prototype.jsonOptions = null; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createLake}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef CreateLakeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - /** - * DiscoverySpec schedule. - * @member {string|null|undefined} schedule - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @instance - */ - DiscoverySpec.prototype.schedule = null; + /** + * Calls CreateLake. + * @function createLake + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateLakeRequest} request CreateLakeRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.CreateLakeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.createLake = function createLake(request, callback) { + return this.rpcCall(createLake, $root.google.cloud.dataplex.v1.CreateLakeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateLake" }); + + /** + * Calls CreateLake. + * @function createLake + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateLakeRequest} request CreateLakeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateLake}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef UpdateLakeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateLake. + * @function updateLake + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} request UpdateLakeRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.UpdateLakeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.updateLake = function updateLake(request, callback) { + return this.rpcCall(updateLake, $root.google.cloud.dataplex.v1.UpdateLakeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateLake" }); + + /** + * Calls UpdateLake. + * @function updateLake + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} request UpdateLakeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteLake}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef DeleteLakeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Calls DeleteLake. + * @function deleteLake + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} request DeleteLakeRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.DeleteLakeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.deleteLake = function deleteLake(request, callback) { + return this.rpcCall(deleteLake, $root.google.cloud.dataplex.v1.DeleteLakeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteLake" }); - /** - * DiscoverySpec trigger. - * @member {"schedule"|undefined} trigger - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @instance - */ - Object.defineProperty(DiscoverySpec.prototype, "trigger", { - get: $util.oneOfGetter($oneOfFields = ["schedule"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Calls DeleteLake. + * @function deleteLake + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} request DeleteLakeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Creates a new DiscoverySpec instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @static - * @param {google.cloud.dataplex.v1.Asset.IDiscoverySpec=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec} DiscoverySpec instance - */ - DiscoverySpec.create = function create(properties) { - return new DiscoverySpec(properties); - }; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listLakes}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListLakesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListLakesResponse} [response] ListLakesResponse + */ - /** - * Encodes the specified DiscoverySpec message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @static - * @param {google.cloud.dataplex.v1.Asset.IDiscoverySpec} message DiscoverySpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DiscoverySpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - if (message.includePatterns != null && message.includePatterns.length) - for (var i = 0; i < message.includePatterns.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.includePatterns[i]); - if (message.excludePatterns != null && message.excludePatterns.length) - for (var i = 0; i < message.excludePatterns.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.excludePatterns[i]); - if (message.csvOptions != null && Object.hasOwnProperty.call(message, "csvOptions")) - $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.encode(message.csvOptions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.jsonOptions != null && Object.hasOwnProperty.call(message, "jsonOptions")) - $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.encode(message.jsonOptions, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.schedule != null && Object.hasOwnProperty.call(message, "schedule")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.schedule); - return writer; - }; + /** + * Calls ListLakes. + * @function listLakes + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListLakesRequest} request ListLakesRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListLakesCallback} callback Node-style callback called with the error, if any, and ListLakesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listLakes = function listLakes(request, callback) { + return this.rpcCall(listLakes, $root.google.cloud.dataplex.v1.ListLakesRequest, $root.google.cloud.dataplex.v1.ListLakesResponse, request, callback); + }, "name", { value: "ListLakes" }); - /** - * Encodes the specified DiscoverySpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @static - * @param {google.cloud.dataplex.v1.Asset.IDiscoverySpec} message DiscoverySpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DiscoverySpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Calls ListLakes. + * @function listLakes + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListLakesRequest} request ListLakesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Decodes a DiscoverySpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec} DiscoverySpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DiscoverySpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.DiscoverySpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.enabled = reader.bool(); - break; - case 2: - if (!(message.includePatterns && message.includePatterns.length)) - message.includePatterns = []; - message.includePatterns.push(reader.string()); - break; - case 3: - if (!(message.excludePatterns && message.excludePatterns.length)) - message.excludePatterns = []; - message.excludePatterns.push(reader.string()); - break; - case 4: - message.csvOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.decode(reader, reader.uint32()); - break; - case 5: - message.jsonOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.decode(reader, reader.uint32()); - break; - case 10: - message.schedule = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getLake}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef GetLakeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Lake} [response] Lake + */ - /** - * Decodes a DiscoverySpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec} DiscoverySpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DiscoverySpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Calls GetLake. + * @function getLake + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetLakeRequest} request GetLakeRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.GetLakeCallback} callback Node-style callback called with the error, if any, and Lake + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.getLake = function getLake(request, callback) { + return this.rpcCall(getLake, $root.google.cloud.dataplex.v1.GetLakeRequest, $root.google.cloud.dataplex.v1.Lake, request, callback); + }, "name", { value: "GetLake" }); - /** - * Verifies a DiscoverySpec message. - * @function verify - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DiscoverySpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - if (message.includePatterns != null && message.hasOwnProperty("includePatterns")) { - if (!Array.isArray(message.includePatterns)) - return "includePatterns: array expected"; - for (var i = 0; i < message.includePatterns.length; ++i) - if (!$util.isString(message.includePatterns[i])) - return "includePatterns: string[] expected"; - } - if (message.excludePatterns != null && message.hasOwnProperty("excludePatterns")) { - if (!Array.isArray(message.excludePatterns)) - return "excludePatterns: array expected"; - for (var i = 0; i < message.excludePatterns.length; ++i) - if (!$util.isString(message.excludePatterns[i])) - return "excludePatterns: string[] expected"; - } - if (message.csvOptions != null && message.hasOwnProperty("csvOptions")) { - var error = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.verify(message.csvOptions); - if (error) - return "csvOptions." + error; - } - if (message.jsonOptions != null && message.hasOwnProperty("jsonOptions")) { - var error = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.verify(message.jsonOptions); - if (error) - return "jsonOptions." + error; - } - if (message.schedule != null && message.hasOwnProperty("schedule")) { - properties.trigger = 1; - if (!$util.isString(message.schedule)) - return "schedule: string expected"; - } - return null; - }; + /** + * Calls GetLake. + * @function getLake + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetLakeRequest} request GetLakeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Creates a DiscoverySpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec} DiscoverySpec - */ - DiscoverySpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Asset.DiscoverySpec) - return object; - var message = new $root.google.cloud.dataplex.v1.Asset.DiscoverySpec(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - if (object.includePatterns) { - if (!Array.isArray(object.includePatterns)) - throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoverySpec.includePatterns: array expected"); - message.includePatterns = []; - for (var i = 0; i < object.includePatterns.length; ++i) - message.includePatterns[i] = String(object.includePatterns[i]); - } - if (object.excludePatterns) { - if (!Array.isArray(object.excludePatterns)) - throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoverySpec.excludePatterns: array expected"); - message.excludePatterns = []; - for (var i = 0; i < object.excludePatterns.length; ++i) - message.excludePatterns[i] = String(object.excludePatterns[i]); - } - if (object.csvOptions != null) { - if (typeof object.csvOptions !== "object") - throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoverySpec.csvOptions: object expected"); - message.csvOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.fromObject(object.csvOptions); - } - if (object.jsonOptions != null) { - if (typeof object.jsonOptions !== "object") - throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoverySpec.jsonOptions: object expected"); - message.jsonOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.fromObject(object.jsonOptions); - } - if (object.schedule != null) - message.schedule = String(object.schedule); - return message; - }; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listLakeActions}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListLakeActionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListActionsResponse} [response] ListActionsResponse + */ - /** - * Creates a plain object from a DiscoverySpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @static - * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec} message DiscoverySpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DiscoverySpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.includePatterns = []; - object.excludePatterns = []; - } - if (options.defaults) { - object.enabled = false; - object.csvOptions = null; - object.jsonOptions = null; - } - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - if (message.includePatterns && message.includePatterns.length) { - object.includePatterns = []; - for (var j = 0; j < message.includePatterns.length; ++j) - object.includePatterns[j] = message.includePatterns[j]; - } - if (message.excludePatterns && message.excludePatterns.length) { - object.excludePatterns = []; - for (var j = 0; j < message.excludePatterns.length; ++j) - object.excludePatterns[j] = message.excludePatterns[j]; - } - if (message.csvOptions != null && message.hasOwnProperty("csvOptions")) - object.csvOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.toObject(message.csvOptions, options); - if (message.jsonOptions != null && message.hasOwnProperty("jsonOptions")) - object.jsonOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.toObject(message.jsonOptions, options); - if (message.schedule != null && message.hasOwnProperty("schedule")) { - object.schedule = message.schedule; - if (options.oneofs) - object.trigger = "schedule"; - } - return object; - }; + /** + * Calls ListLakeActions. + * @function listLakeActions + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} request ListLakeActionsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListLakeActionsCallback} callback Node-style callback called with the error, if any, and ListActionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listLakeActions = function listLakeActions(request, callback) { + return this.rpcCall(listLakeActions, $root.google.cloud.dataplex.v1.ListLakeActionsRequest, $root.google.cloud.dataplex.v1.ListActionsResponse, request, callback); + }, "name", { value: "ListLakeActions" }); - /** - * Converts this DiscoverySpec to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @instance - * @returns {Object.} JSON object - */ - DiscoverySpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Calls ListLakeActions. + * @function listLakeActions + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} request ListLakeActionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - DiscoverySpec.CsvOptions = (function() { + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createZone}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef CreateZoneCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - /** - * Properties of a CsvOptions. - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @interface ICsvOptions - * @property {number|null} [headerRows] CsvOptions headerRows - * @property {string|null} [delimiter] CsvOptions delimiter - * @property {string|null} [encoding] CsvOptions encoding - * @property {boolean|null} [disableTypeInference] CsvOptions disableTypeInference - */ + /** + * Calls CreateZone. + * @function createZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateZoneRequest} request CreateZoneRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.CreateZoneCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.createZone = function createZone(request, callback) { + return this.rpcCall(createZone, $root.google.cloud.dataplex.v1.CreateZoneRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateZone" }); - /** - * Constructs a new CsvOptions. - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @classdesc Represents a CsvOptions. - * @implements ICsvOptions - * @constructor - * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions=} [properties] Properties to set - */ - function CsvOptions(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Calls CreateZone. + * @function createZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateZoneRequest} request CreateZoneRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * CsvOptions headerRows. - * @member {number} headerRows - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions - * @instance - */ - CsvOptions.prototype.headerRows = 0; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateZone}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef UpdateZoneCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - /** - * CsvOptions delimiter. - * @member {string} delimiter - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions - * @instance - */ - CsvOptions.prototype.delimiter = ""; + /** + * Calls UpdateZone. + * @function updateZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} request UpdateZoneRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.UpdateZoneCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.updateZone = function updateZone(request, callback) { + return this.rpcCall(updateZone, $root.google.cloud.dataplex.v1.UpdateZoneRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateZone" }); - /** - * CsvOptions encoding. - * @member {string} encoding - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions - * @instance - */ - CsvOptions.prototype.encoding = ""; + /** + * Calls UpdateZone. + * @function updateZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} request UpdateZoneRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * CsvOptions disableTypeInference. - * @member {boolean} disableTypeInference - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions - * @instance - */ - CsvOptions.prototype.disableTypeInference = false; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteZone}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef DeleteZoneCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteZone. + * @function deleteZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} request DeleteZoneRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.DeleteZoneCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.deleteZone = function deleteZone(request, callback) { + return this.rpcCall(deleteZone, $root.google.cloud.dataplex.v1.DeleteZoneRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteZone" }); - /** - * Creates a new CsvOptions instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions - * @static - * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions} CsvOptions instance - */ - CsvOptions.create = function create(properties) { - return new CsvOptions(properties); - }; + /** + * Calls DeleteZone. + * @function deleteZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} request DeleteZoneRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions - * @static - * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions} message CsvOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CsvOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.headerRows != null && Object.hasOwnProperty.call(message, "headerRows")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.headerRows); - if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.delimiter); - if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.encoding); - if (message.disableTypeInference != null && Object.hasOwnProperty.call(message, "disableTypeInference")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disableTypeInference); - return writer; - }; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listZones}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListZonesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListZonesResponse} [response] ListZonesResponse + */ - /** - * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions - * @static - * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions} message CsvOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CsvOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Calls ListZones. + * @function listZones + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListZonesRequest} request ListZonesRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListZonesCallback} callback Node-style callback called with the error, if any, and ListZonesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listZones = function listZones(request, callback) { + return this.rpcCall(listZones, $root.google.cloud.dataplex.v1.ListZonesRequest, $root.google.cloud.dataplex.v1.ListZonesResponse, request, callback); + }, "name", { value: "ListZones" }); - /** - * Decodes a CsvOptions message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions} CsvOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CsvOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.headerRows = reader.int32(); - break; - case 2: - message.delimiter = reader.string(); - break; - case 3: - message.encoding = reader.string(); - break; - case 4: - message.disableTypeInference = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Calls ListZones. + * @function listZones + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListZonesRequest} request ListZonesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Decodes a CsvOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions} CsvOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CsvOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getZone}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef GetZoneCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Zone} [response] Zone + */ - /** - * Verifies a CsvOptions message. - * @function verify - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CsvOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.headerRows != null && message.hasOwnProperty("headerRows")) - if (!$util.isInteger(message.headerRows)) - return "headerRows: integer expected"; - if (message.delimiter != null && message.hasOwnProperty("delimiter")) - if (!$util.isString(message.delimiter)) - return "delimiter: string expected"; - if (message.encoding != null && message.hasOwnProperty("encoding")) - if (!$util.isString(message.encoding)) - return "encoding: string expected"; - if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) - if (typeof message.disableTypeInference !== "boolean") - return "disableTypeInference: boolean expected"; - return null; - }; + /** + * Calls GetZone. + * @function getZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetZoneRequest} request GetZoneRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.GetZoneCallback} callback Node-style callback called with the error, if any, and Zone + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.getZone = function getZone(request, callback) { + return this.rpcCall(getZone, $root.google.cloud.dataplex.v1.GetZoneRequest, $root.google.cloud.dataplex.v1.Zone, request, callback); + }, "name", { value: "GetZone" }); - /** - * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions} CsvOptions - */ - CsvOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions) - return object; - var message = new $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions(); - if (object.headerRows != null) - message.headerRows = object.headerRows | 0; - if (object.delimiter != null) - message.delimiter = String(object.delimiter); - if (object.encoding != null) - message.encoding = String(object.encoding); - if (object.disableTypeInference != null) - message.disableTypeInference = Boolean(object.disableTypeInference); - return message; - }; + /** + * Calls GetZone. + * @function getZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetZoneRequest} request GetZoneRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions - * @static - * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions} message CsvOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CsvOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.headerRows = 0; - object.delimiter = ""; - object.encoding = ""; - object.disableTypeInference = false; - } - if (message.headerRows != null && message.hasOwnProperty("headerRows")) - object.headerRows = message.headerRows; - if (message.delimiter != null && message.hasOwnProperty("delimiter")) - object.delimiter = message.delimiter; - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = message.encoding; - if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) - object.disableTypeInference = message.disableTypeInference; - return object; - }; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listZoneActions}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListZoneActionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListActionsResponse} [response] ListActionsResponse + */ - /** - * Converts this CsvOptions to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions - * @instance - * @returns {Object.} JSON object - */ - CsvOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Calls ListZoneActions. + * @function listZoneActions + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} request ListZoneActionsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListZoneActionsCallback} callback Node-style callback called with the error, if any, and ListActionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listZoneActions = function listZoneActions(request, callback) { + return this.rpcCall(listZoneActions, $root.google.cloud.dataplex.v1.ListZoneActionsRequest, $root.google.cloud.dataplex.v1.ListActionsResponse, request, callback); + }, "name", { value: "ListZoneActions" }); - return CsvOptions; - })(); + /** + * Calls ListZoneActions. + * @function listZoneActions + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} request ListZoneActionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - DiscoverySpec.JsonOptions = (function() { + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createAsset}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef CreateAssetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - /** - * Properties of a JsonOptions. - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @interface IJsonOptions - * @property {string|null} [encoding] JsonOptions encoding - * @property {boolean|null} [disableTypeInference] JsonOptions disableTypeInference - */ + /** + * Calls CreateAsset. + * @function createAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateAssetRequest} request CreateAssetRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.CreateAssetCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.createAsset = function createAsset(request, callback) { + return this.rpcCall(createAsset, $root.google.cloud.dataplex.v1.CreateAssetRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateAsset" }); - /** - * Constructs a new JsonOptions. - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @classdesc Represents a JsonOptions. - * @implements IJsonOptions - * @constructor - * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions=} [properties] Properties to set - */ - function JsonOptions(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Calls CreateAsset. + * @function createAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateAssetRequest} request CreateAssetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * JsonOptions encoding. - * @member {string} encoding - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions - * @instance - */ - JsonOptions.prototype.encoding = ""; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateAsset}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef UpdateAssetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - /** - * JsonOptions disableTypeInference. - * @member {boolean} disableTypeInference - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions - * @instance - */ - JsonOptions.prototype.disableTypeInference = false; + /** + * Calls UpdateAsset. + * @function updateAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} request UpdateAssetRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.UpdateAssetCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.updateAsset = function updateAsset(request, callback) { + return this.rpcCall(updateAsset, $root.google.cloud.dataplex.v1.UpdateAssetRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateAsset" }); - /** - * Creates a new JsonOptions instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions - * @static - * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions} JsonOptions instance - */ - JsonOptions.create = function create(properties) { - return new JsonOptions(properties); - }; + /** + * Calls UpdateAsset. + * @function updateAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} request UpdateAssetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions - * @static - * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions} message JsonOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JsonOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.encoding); - if (message.disableTypeInference != null && Object.hasOwnProperty.call(message, "disableTypeInference")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.disableTypeInference); - return writer; - }; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteAsset}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef DeleteAssetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - /** - * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions - * @static - * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions} message JsonOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JsonOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Calls DeleteAsset. + * @function deleteAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} request DeleteAssetRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.DeleteAssetCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.deleteAsset = function deleteAsset(request, callback) { + return this.rpcCall(deleteAsset, $root.google.cloud.dataplex.v1.DeleteAssetRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteAsset" }); - /** - * Decodes a JsonOptions message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions} JsonOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JsonOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.encoding = reader.string(); - break; - case 2: - message.disableTypeInference = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Calls DeleteAsset. + * @function deleteAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} request DeleteAssetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Decodes a JsonOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions} JsonOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JsonOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listAssets}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListAssetsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListAssetsResponse} [response] ListAssetsResponse + */ - /** - * Verifies a JsonOptions message. - * @function verify - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - JsonOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.encoding != null && message.hasOwnProperty("encoding")) - if (!$util.isString(message.encoding)) - return "encoding: string expected"; - if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) - if (typeof message.disableTypeInference !== "boolean") - return "disableTypeInference: boolean expected"; - return null; - }; + /** + * Calls ListAssets. + * @function listAssets + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListAssetsRequest} request ListAssetsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListAssetsCallback} callback Node-style callback called with the error, if any, and ListAssetsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listAssets = function listAssets(request, callback) { + return this.rpcCall(listAssets, $root.google.cloud.dataplex.v1.ListAssetsRequest, $root.google.cloud.dataplex.v1.ListAssetsResponse, request, callback); + }, "name", { value: "ListAssets" }); - /** - * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions} JsonOptions - */ - JsonOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions) - return object; - var message = new $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions(); - if (object.encoding != null) - message.encoding = String(object.encoding); - if (object.disableTypeInference != null) - message.disableTypeInference = Boolean(object.disableTypeInference); - return message; - }; + /** + * Calls ListAssets. + * @function listAssets + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListAssetsRequest} request ListAssetsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions - * @static - * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions} message JsonOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - JsonOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.encoding = ""; - object.disableTypeInference = false; - } - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = message.encoding; - if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) - object.disableTypeInference = message.disableTypeInference; - return object; - }; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getAsset}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef GetAssetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Asset} [response] Asset + */ - /** - * Converts this JsonOptions to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions - * @instance - * @returns {Object.} JSON object - */ - JsonOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Calls GetAsset. + * @function getAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetAssetRequest} request GetAssetRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.GetAssetCallback} callback Node-style callback called with the error, if any, and Asset + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.getAsset = function getAsset(request, callback) { + return this.rpcCall(getAsset, $root.google.cloud.dataplex.v1.GetAssetRequest, $root.google.cloud.dataplex.v1.Asset, request, callback); + }, "name", { value: "GetAsset" }); - return JsonOptions; - })(); + /** + * Calls GetAsset. + * @function getAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetAssetRequest} request GetAssetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - return DiscoverySpec; - })(); + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listAssetActions}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListAssetActionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListActionsResponse} [response] ListActionsResponse + */ - Asset.ResourceSpec = (function() { + /** + * Calls ListAssetActions. + * @function listAssetActions + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} request ListAssetActionsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListAssetActionsCallback} callback Node-style callback called with the error, if any, and ListActionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listAssetActions = function listAssetActions(request, callback) { + return this.rpcCall(listAssetActions, $root.google.cloud.dataplex.v1.ListAssetActionsRequest, $root.google.cloud.dataplex.v1.ListActionsResponse, request, callback); + }, "name", { value: "ListAssetActions" }); - /** - * Properties of a ResourceSpec. - * @memberof google.cloud.dataplex.v1.Asset - * @interface IResourceSpec - * @property {string|null} [name] ResourceSpec name - * @property {google.cloud.dataplex.v1.Asset.ResourceSpec.Type|null} [type] ResourceSpec type - */ + /** + * Calls ListAssetActions. + * @function listAssetActions + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} request ListAssetActionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Constructs a new ResourceSpec. - * @memberof google.cloud.dataplex.v1.Asset - * @classdesc Represents a ResourceSpec. - * @implements IResourceSpec - * @constructor - * @param {google.cloud.dataplex.v1.Asset.IResourceSpec=} [properties] Properties to set - */ - function ResourceSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createTask}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef CreateTaskCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - /** - * ResourceSpec name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec - * @instance - */ - ResourceSpec.prototype.name = ""; + /** + * Calls CreateTask. + * @function createTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateTaskRequest} request CreateTaskRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.CreateTaskCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.createTask = function createTask(request, callback) { + return this.rpcCall(createTask, $root.google.cloud.dataplex.v1.CreateTaskRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateTask" }); - /** - * ResourceSpec type. - * @member {google.cloud.dataplex.v1.Asset.ResourceSpec.Type} type - * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec - * @instance - */ - ResourceSpec.prototype.type = 0; + /** + * Calls CreateTask. + * @function createTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateTaskRequest} request CreateTaskRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Creates a new ResourceSpec instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec - * @static - * @param {google.cloud.dataplex.v1.Asset.IResourceSpec=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Asset.ResourceSpec} ResourceSpec instance - */ - ResourceSpec.create = function create(properties) { - return new ResourceSpec(properties); - }; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateTask}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef UpdateTaskCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateTask. + * @function updateTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} request UpdateTaskRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.UpdateTaskCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.updateTask = function updateTask(request, callback) { + return this.rpcCall(updateTask, $root.google.cloud.dataplex.v1.UpdateTaskRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateTask" }); - /** - * Encodes the specified ResourceSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec - * @static - * @param {google.cloud.dataplex.v1.Asset.IResourceSpec} message ResourceSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); - return writer; - }; + /** + * Calls UpdateTask. + * @function updateTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} request UpdateTaskRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Encodes the specified ResourceSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec - * @static - * @param {google.cloud.dataplex.v1.Asset.IResourceSpec} message ResourceSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteTask}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef DeleteTaskCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - /** - * Decodes a ResourceSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Asset.ResourceSpec} ResourceSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.ResourceSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.type = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Calls DeleteTask. + * @function deleteTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} request DeleteTaskRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.DeleteTaskCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.deleteTask = function deleteTask(request, callback) { + return this.rpcCall(deleteTask, $root.google.cloud.dataplex.v1.DeleteTaskRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteTask" }); - /** - * Decodes a ResourceSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Asset.ResourceSpec} ResourceSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Calls DeleteTask. + * @function deleteTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} request DeleteTaskRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Verifies a ResourceSpec message. - * @function verify - * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listTasks}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListTasksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListTasksResponse} [response] ListTasksResponse + */ - /** - * Creates a ResourceSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Asset.ResourceSpec} ResourceSpec - */ - ResourceSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Asset.ResourceSpec) - return object; - var message = new $root.google.cloud.dataplex.v1.Asset.ResourceSpec(); - if (object.name != null) - message.name = String(object.name); - switch (object.type) { - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "STORAGE_BUCKET": - case 1: - message.type = 1; - break; - case "BIGQUERY_DATASET": - case 2: - message.type = 2; - break; - } - return message; - }; + /** + * Calls ListTasks. + * @function listTasks + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListTasksRequest} request ListTasksRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListTasksCallback} callback Node-style callback called with the error, if any, and ListTasksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listTasks = function listTasks(request, callback) { + return this.rpcCall(listTasks, $root.google.cloud.dataplex.v1.ListTasksRequest, $root.google.cloud.dataplex.v1.ListTasksResponse, request, callback); + }, "name", { value: "ListTasks" }); - /** - * Creates a plain object from a ResourceSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec - * @static - * @param {google.cloud.dataplex.v1.Asset.ResourceSpec} message ResourceSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Asset.ResourceSpec.Type[message.type] : message.type; - return object; - }; + /** + * Calls ListTasks. + * @function listTasks + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListTasksRequest} request ListTasksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Converts this ResourceSpec to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec - * @instance - * @returns {Object.} JSON object - */ - ResourceSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getTask}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef GetTaskCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Task} [response] Task + */ + + /** + * Calls GetTask. + * @function getTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetTaskRequest} request GetTaskRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.GetTaskCallback} callback Node-style callback called with the error, if any, and Task + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.getTask = function getTask(request, callback) { + return this.rpcCall(getTask, $root.google.cloud.dataplex.v1.GetTaskRequest, $root.google.cloud.dataplex.v1.Task, request, callback); + }, "name", { value: "GetTask" }); - /** - * Type enum. - * @name google.cloud.dataplex.v1.Asset.ResourceSpec.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} STORAGE_BUCKET=1 STORAGE_BUCKET value - * @property {number} BIGQUERY_DATASET=2 BIGQUERY_DATASET value - */ - ResourceSpec.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "STORAGE_BUCKET"] = 1; - values[valuesById[2] = "BIGQUERY_DATASET"] = 2; - return values; - })(); + /** + * Calls GetTask. + * @function getTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetTaskRequest} request GetTaskRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - return ResourceSpec; - })(); + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listJobs}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListJobsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListJobsResponse} [response] ListJobsResponse + */ - Asset.ResourceStatus = (function() { + /** + * Calls ListJobs. + * @function listJobs + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListJobsRequest} request ListJobsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListJobsCallback} callback Node-style callback called with the error, if any, and ListJobsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listJobs = function listJobs(request, callback) { + return this.rpcCall(listJobs, $root.google.cloud.dataplex.v1.ListJobsRequest, $root.google.cloud.dataplex.v1.ListJobsResponse, request, callback); + }, "name", { value: "ListJobs" }); - /** - * Properties of a ResourceStatus. - * @memberof google.cloud.dataplex.v1.Asset - * @interface IResourceStatus - * @property {google.cloud.dataplex.v1.Asset.ResourceStatus.State|null} [state] ResourceStatus state - * @property {string|null} [message] ResourceStatus message - * @property {google.protobuf.ITimestamp|null} [updateTime] ResourceStatus updateTime - */ + /** + * Calls ListJobs. + * @function listJobs + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListJobsRequest} request ListJobsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Constructs a new ResourceStatus. - * @memberof google.cloud.dataplex.v1.Asset - * @classdesc Represents a ResourceStatus. - * @implements IResourceStatus - * @constructor - * @param {google.cloud.dataplex.v1.Asset.IResourceStatus=} [properties] Properties to set - */ - function ResourceStatus(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getJob}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef GetJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Job} [response] Job + */ - /** - * ResourceStatus state. - * @member {google.cloud.dataplex.v1.Asset.ResourceStatus.State} state - * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus - * @instance - */ - ResourceStatus.prototype.state = 0; + /** + * Calls GetJob. + * @function getJob + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetJobRequest} request GetJobRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.GetJobCallback} callback Node-style callback called with the error, if any, and Job + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.getJob = function getJob(request, callback) { + return this.rpcCall(getJob, $root.google.cloud.dataplex.v1.GetJobRequest, $root.google.cloud.dataplex.v1.Job, request, callback); + }, "name", { value: "GetJob" }); - /** - * ResourceStatus message. - * @member {string} message - * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus - * @instance - */ - ResourceStatus.prototype.message = ""; + /** + * Calls GetJob. + * @function getJob + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetJobRequest} request GetJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * ResourceStatus updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus - * @instance - */ - ResourceStatus.prototype.updateTime = null; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#cancelJob}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef CancelJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ - /** - * Creates a new ResourceStatus instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus - * @static - * @param {google.cloud.dataplex.v1.Asset.IResourceStatus=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Asset.ResourceStatus} ResourceStatus instance - */ - ResourceStatus.create = function create(properties) { - return new ResourceStatus(properties); - }; + /** + * Calls CancelJob. + * @function cancelJob + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICancelJobRequest} request CancelJobRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.CancelJobCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.cancelJob = function cancelJob(request, callback) { + return this.rpcCall(cancelJob, $root.google.cloud.dataplex.v1.CancelJobRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelJob" }); - /** - * Encodes the specified ResourceStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceStatus.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus - * @static - * @param {google.cloud.dataplex.v1.Asset.IResourceStatus} message ResourceStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceStatus.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + /** + * Calls CancelJob. + * @function cancelJob + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICancelJobRequest} request CancelJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Encodes the specified ResourceStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceStatus.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus - * @static - * @param {google.cloud.dataplex.v1.Asset.IResourceStatus} message ResourceStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createEnvironment}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef CreateEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - /** - * Decodes a ResourceStatus message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Asset.ResourceStatus} ResourceStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceStatus.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.ResourceStatus(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.state = reader.int32(); - break; - case 2: - message.message = reader.string(); - break; - case 3: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Calls CreateEnvironment. + * @function createEnvironment + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.CreateEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.createEnvironment = function createEnvironment(request, callback) { + return this.rpcCall(createEnvironment, $root.google.cloud.dataplex.v1.CreateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateEnvironment" }); + + /** + * Calls CreateEnvironment. + * @function createEnvironment + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Decodes a ResourceStatus message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Asset.ResourceStatus} ResourceStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceStatus.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateEnvironment}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef UpdateEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - /** - * Verifies a ResourceStatus message. - * @function verify - * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceStatus.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - return null; - }; + /** + * Calls UpdateEnvironment. + * @function updateEnvironment + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.UpdateEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.updateEnvironment = function updateEnvironment(request, callback) { + return this.rpcCall(updateEnvironment, $root.google.cloud.dataplex.v1.UpdateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateEnvironment" }); - /** - * Creates a ResourceStatus message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Asset.ResourceStatus} ResourceStatus - */ - ResourceStatus.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Asset.ResourceStatus) - return object; - var message = new $root.google.cloud.dataplex.v1.Asset.ResourceStatus(); - switch (object.state) { - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "READY": - case 1: - message.state = 1; - break; - case "ERROR": - case 2: - message.state = 2; - break; - } - if (object.message != null) - message.message = String(object.message); - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Asset.ResourceStatus.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - return message; - }; + /** + * Calls UpdateEnvironment. + * @function updateEnvironment + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Creates a plain object from a ResourceStatus message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus - * @static - * @param {google.cloud.dataplex.v1.Asset.ResourceStatus} message ResourceStatus - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceStatus.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.message = ""; - object.updateTime = null; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Asset.ResourceStatus.State[message.state] : message.state; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - return object; - }; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteEnvironment}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef DeleteEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - /** - * Converts this ResourceStatus to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus - * @instance - * @returns {Object.} JSON object - */ - ResourceStatus.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Calls DeleteEnvironment. + * @function deleteEnvironment + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.DeleteEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.deleteEnvironment = function deleteEnvironment(request, callback) { + return this.rpcCall(deleteEnvironment, $root.google.cloud.dataplex.v1.DeleteEnvironmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteEnvironment" }); - /** - * State enum. - * @name google.cloud.dataplex.v1.Asset.ResourceStatus.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} READY=1 READY value - * @property {number} ERROR=2 ERROR value - */ - ResourceStatus.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "READY"] = 1; - values[valuesById[2] = "ERROR"] = 2; - return values; - })(); + /** + * Calls DeleteEnvironment. + * @function deleteEnvironment + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - return ResourceStatus; - })(); + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listEnvironments}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListEnvironmentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListEnvironmentsResponse} [response] ListEnvironmentsResponse + */ - Asset.DiscoveryStatus = (function() { + /** + * Calls ListEnvironments. + * @function listEnvironments + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListEnvironmentsCallback} callback Node-style callback called with the error, if any, and ListEnvironmentsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listEnvironments = function listEnvironments(request, callback) { + return this.rpcCall(listEnvironments, $root.google.cloud.dataplex.v1.ListEnvironmentsRequest, $root.google.cloud.dataplex.v1.ListEnvironmentsResponse, request, callback); + }, "name", { value: "ListEnvironments" }); - /** - * Properties of a DiscoveryStatus. - * @memberof google.cloud.dataplex.v1.Asset - * @interface IDiscoveryStatus - * @property {google.cloud.dataplex.v1.Asset.DiscoveryStatus.State|null} [state] DiscoveryStatus state - * @property {string|null} [message] DiscoveryStatus message - * @property {google.protobuf.ITimestamp|null} [updateTime] DiscoveryStatus updateTime - * @property {google.protobuf.ITimestamp|null} [lastRunTime] DiscoveryStatus lastRunTime - * @property {google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats|null} [stats] DiscoveryStatus stats - * @property {google.protobuf.IDuration|null} [lastRunDuration] DiscoveryStatus lastRunDuration - */ + /** + * Calls ListEnvironments. + * @function listEnvironments + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Constructs a new DiscoveryStatus. - * @memberof google.cloud.dataplex.v1.Asset - * @classdesc Represents a DiscoveryStatus. - * @implements IDiscoveryStatus - * @constructor - * @param {google.cloud.dataplex.v1.Asset.IDiscoveryStatus=} [properties] Properties to set - */ - function DiscoveryStatus(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getEnvironment}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef GetEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Environment} [response] Environment + */ - /** - * DiscoveryStatus state. - * @member {google.cloud.dataplex.v1.Asset.DiscoveryStatus.State} state - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus - * @instance - */ - DiscoveryStatus.prototype.state = 0; + /** + * Calls GetEnvironment. + * @function getEnvironment + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.GetEnvironmentCallback} callback Node-style callback called with the error, if any, and Environment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.getEnvironment = function getEnvironment(request, callback) { + return this.rpcCall(getEnvironment, $root.google.cloud.dataplex.v1.GetEnvironmentRequest, $root.google.cloud.dataplex.v1.Environment, request, callback); + }, "name", { value: "GetEnvironment" }); - /** - * DiscoveryStatus message. - * @member {string} message - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus - * @instance - */ - DiscoveryStatus.prototype.message = ""; + /** + * Calls GetEnvironment. + * @function getEnvironment + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listSessions}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListSessionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListSessionsResponse} [response] ListSessionsResponse + */ + + /** + * Calls ListSessions. + * @function listSessions + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListSessionsRequest} request ListSessionsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListSessionsCallback} callback Node-style callback called with the error, if any, and ListSessionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listSessions = function listSessions(request, callback) { + return this.rpcCall(listSessions, $root.google.cloud.dataplex.v1.ListSessionsRequest, $root.google.cloud.dataplex.v1.ListSessionsResponse, request, callback); + }, "name", { value: "ListSessions" }); + + /** + * Calls ListSessions. + * @function listSessions + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListSessionsRequest} request ListSessionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * DiscoveryStatus updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus - * @instance - */ - DiscoveryStatus.prototype.updateTime = null; + return DataplexService; + })(); - /** - * DiscoveryStatus lastRunTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastRunTime - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus - * @instance - */ - DiscoveryStatus.prototype.lastRunTime = null; + v1.CreateLakeRequest = (function() { - /** - * DiscoveryStatus stats. - * @member {google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats|null|undefined} stats - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus - * @instance - */ - DiscoveryStatus.prototype.stats = null; + /** + * Properties of a CreateLakeRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICreateLakeRequest + * @property {string|null} [parent] CreateLakeRequest parent + * @property {string|null} [lakeId] CreateLakeRequest lakeId + * @property {google.cloud.dataplex.v1.ILake|null} [lake] CreateLakeRequest lake + * @property {boolean|null} [validateOnly] CreateLakeRequest validateOnly + */ - /** - * DiscoveryStatus lastRunDuration. - * @member {google.protobuf.IDuration|null|undefined} lastRunDuration - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus - * @instance - */ - DiscoveryStatus.prototype.lastRunDuration = null; + /** + * Constructs a new CreateLakeRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CreateLakeRequest. + * @implements ICreateLakeRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICreateLakeRequest=} [properties] Properties to set + */ + function CreateLakeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a new DiscoveryStatus instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus - * @static - * @param {google.cloud.dataplex.v1.Asset.IDiscoveryStatus=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus} DiscoveryStatus instance - */ - DiscoveryStatus.create = function create(properties) { - return new DiscoveryStatus(properties); - }; + /** + * CreateLakeRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @instance + */ + CreateLakeRequest.prototype.parent = ""; - /** - * Encodes the specified DiscoveryStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus - * @static - * @param {google.cloud.dataplex.v1.Asset.IDiscoveryStatus} message DiscoveryStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DiscoveryStatus.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.lastRunTime != null && Object.hasOwnProperty.call(message, "lastRunTime")) - $root.google.protobuf.Timestamp.encode(message.lastRunTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.stats != null && Object.hasOwnProperty.call(message, "stats")) - $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.encode(message.stats, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.lastRunDuration != null && Object.hasOwnProperty.call(message, "lastRunDuration")) - $root.google.protobuf.Duration.encode(message.lastRunDuration, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - return writer; - }; + /** + * CreateLakeRequest lakeId. + * @member {string} lakeId + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @instance + */ + CreateLakeRequest.prototype.lakeId = ""; - /** - * Encodes the specified DiscoveryStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus - * @static - * @param {google.cloud.dataplex.v1.Asset.IDiscoveryStatus} message DiscoveryStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DiscoveryStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * CreateLakeRequest lake. + * @member {google.cloud.dataplex.v1.ILake|null|undefined} lake + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @instance + */ + CreateLakeRequest.prototype.lake = null; - /** - * Decodes a DiscoveryStatus message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus} DiscoveryStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DiscoveryStatus.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.state = reader.int32(); - break; - case 2: - message.message = reader.string(); - break; - case 3: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 4: - message.lastRunTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - message.stats = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.decode(reader, reader.uint32()); - break; - case 7: - message.lastRunDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * CreateLakeRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @instance + */ + CreateLakeRequest.prototype.validateOnly = false; - /** - * Decodes a DiscoveryStatus message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus} DiscoveryStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DiscoveryStatus.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new CreateLakeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateLakeRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest instance + */ + CreateLakeRequest.create = function create(properties) { + return new CreateLakeRequest(properties); + }; - /** - * Verifies a DiscoveryStatus message. - * @function verify - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DiscoveryStatus.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 5: - break; - } - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.lastRunTime != null && message.hasOwnProperty("lastRunTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastRunTime); - if (error) - return "lastRunTime." + error; - } - if (message.stats != null && message.hasOwnProperty("stats")) { - var error = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.verify(message.stats); - if (error) - return "stats." + error; - } - if (message.lastRunDuration != null && message.hasOwnProperty("lastRunDuration")) { - var error = $root.google.protobuf.Duration.verify(message.lastRunDuration); - if (error) - return "lastRunDuration." + error; - } - return null; - }; + /** + * Encodes the specified CreateLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateLakeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateLakeRequest} message CreateLakeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateLakeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.lakeId != null && Object.hasOwnProperty.call(message, "lakeId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.lakeId); + if (message.lake != null && Object.hasOwnProperty.call(message, "lake")) + $root.google.cloud.dataplex.v1.Lake.encode(message.lake, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; - /** - * Creates a DiscoveryStatus message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus} DiscoveryStatus - */ - DiscoveryStatus.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus) - return object; - var message = new $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus(); - switch (object.state) { - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "SCHEDULED": + /** + * Encodes the specified CreateLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateLakeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateLakeRequest} message CreateLakeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateLakeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateLakeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateLakeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { case 1: - message.state = 1; + message.parent = reader.string(); break; - case "IN_PROGRESS": case 2: - message.state = 2; + message.lakeId = reader.string(); break; - case "PAUSED": case 3: - message.state = 3; + message.lake = $root.google.cloud.dataplex.v1.Lake.decode(reader, reader.uint32()); break; - case "DISABLED": - case 5: - message.state = 5; + case 4: + message.validateOnly = reader.bool(); + break; + default: + reader.skipType(tag & 7); break; } - if (object.message != null) - message.message = String(object.message); - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoveryStatus.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.lastRunTime != null) { - if (typeof object.lastRunTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoveryStatus.lastRunTime: object expected"); - message.lastRunTime = $root.google.protobuf.Timestamp.fromObject(object.lastRunTime); - } - if (object.stats != null) { - if (typeof object.stats !== "object") - throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoveryStatus.stats: object expected"); - message.stats = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.fromObject(object.stats); - } - if (object.lastRunDuration != null) { - if (typeof object.lastRunDuration !== "object") - throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoveryStatus.lastRunDuration: object expected"); - message.lastRunDuration = $root.google.protobuf.Duration.fromObject(object.lastRunDuration); - } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from a DiscoveryStatus message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus - * @static - * @param {google.cloud.dataplex.v1.Asset.DiscoveryStatus} message DiscoveryStatus - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DiscoveryStatus.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.message = ""; - object.updateTime = null; - object.lastRunTime = null; - object.stats = null; - object.lastRunDuration = null; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.State[message.state] : message.state; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.lastRunTime != null && message.hasOwnProperty("lastRunTime")) - object.lastRunTime = $root.google.protobuf.Timestamp.toObject(message.lastRunTime, options); - if (message.stats != null && message.hasOwnProperty("stats")) - object.stats = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.toObject(message.stats, options); - if (message.lastRunDuration != null && message.hasOwnProperty("lastRunDuration")) - object.lastRunDuration = $root.google.protobuf.Duration.toObject(message.lastRunDuration, options); - return object; - }; + /** + * Decodes a CreateLakeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateLakeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this DiscoveryStatus to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus - * @instance - * @returns {Object.} JSON object - */ - DiscoveryStatus.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies a CreateLakeRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateLakeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.lakeId != null && message.hasOwnProperty("lakeId")) + if (!$util.isString(message.lakeId)) + return "lakeId: string expected"; + if (message.lake != null && message.hasOwnProperty("lake")) { + var error = $root.google.cloud.dataplex.v1.Lake.verify(message.lake); + if (error) + return "lake." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; - /** - * State enum. - * @name google.cloud.dataplex.v1.Asset.DiscoveryStatus.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} SCHEDULED=1 SCHEDULED value - * @property {number} IN_PROGRESS=2 IN_PROGRESS value - * @property {number} PAUSED=3 PAUSED value - * @property {number} DISABLED=5 DISABLED value - */ - DiscoveryStatus.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SCHEDULED"] = 1; - values[valuesById[2] = "IN_PROGRESS"] = 2; - values[valuesById[3] = "PAUSED"] = 3; - values[valuesById[5] = "DISABLED"] = 5; - return values; - })(); + /** + * Creates a CreateLakeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest + */ + CreateLakeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateLakeRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.CreateLakeRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.lakeId != null) + message.lakeId = String(object.lakeId); + if (object.lake != null) { + if (typeof object.lake !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateLakeRequest.lake: object expected"); + message.lake = $root.google.cloud.dataplex.v1.Lake.fromObject(object.lake); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; - DiscoveryStatus.Stats = (function() { + /** + * Creates a plain object from a CreateLakeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @static + * @param {google.cloud.dataplex.v1.CreateLakeRequest} message CreateLakeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateLakeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.lakeId = ""; + object.lake = null; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.lakeId != null && message.hasOwnProperty("lakeId")) + object.lakeId = message.lakeId; + if (message.lake != null && message.hasOwnProperty("lake")) + object.lake = $root.google.cloud.dataplex.v1.Lake.toObject(message.lake, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; - /** - * Properties of a Stats. - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus - * @interface IStats - * @property {number|Long|null} [dataItems] Stats dataItems - * @property {number|Long|null} [dataSize] Stats dataSize - * @property {number|Long|null} [tables] Stats tables - * @property {number|Long|null} [filesets] Stats filesets - */ + /** + * Converts this CreateLakeRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @instance + * @returns {Object.} JSON object + */ + CreateLakeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new Stats. - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus - * @classdesc Represents a Stats. - * @implements IStats - * @constructor - * @param {google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats=} [properties] Properties to set - */ - function Stats(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + return CreateLakeRequest; + })(); - /** - * Stats dataItems. - * @member {number|Long} dataItems - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats - * @instance - */ - Stats.prototype.dataItems = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + v1.UpdateLakeRequest = (function() { - /** - * Stats dataSize. - * @member {number|Long} dataSize - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats - * @instance - */ - Stats.prototype.dataSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Properties of an UpdateLakeRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IUpdateLakeRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateLakeRequest updateMask + * @property {google.cloud.dataplex.v1.ILake|null} [lake] UpdateLakeRequest lake + * @property {boolean|null} [validateOnly] UpdateLakeRequest validateOnly + */ - /** - * Stats tables. - * @member {number|Long} tables - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats - * @instance - */ - Stats.prototype.tables = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Constructs a new UpdateLakeRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an UpdateLakeRequest. + * @implements IUpdateLakeRequest + * @constructor + * @param {google.cloud.dataplex.v1.IUpdateLakeRequest=} [properties] Properties to set + */ + function UpdateLakeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Stats filesets. - * @member {number|Long} filesets - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats - * @instance - */ - Stats.prototype.filesets = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * UpdateLakeRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @instance + */ + UpdateLakeRequest.prototype.updateMask = null; - /** - * Creates a new Stats instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats - * @static - * @param {google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats} Stats instance - */ - Stats.create = function create(properties) { - return new Stats(properties); - }; + /** + * UpdateLakeRequest lake. + * @member {google.cloud.dataplex.v1.ILake|null|undefined} lake + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @instance + */ + UpdateLakeRequest.prototype.lake = null; - /** - * Encodes the specified Stats message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats - * @static - * @param {google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats} message Stats message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Stats.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dataItems != null && Object.hasOwnProperty.call(message, "dataItems")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.dataItems); - if (message.dataSize != null && Object.hasOwnProperty.call(message, "dataSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.dataSize); - if (message.tables != null && Object.hasOwnProperty.call(message, "tables")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.tables); - if (message.filesets != null && Object.hasOwnProperty.call(message, "filesets")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.filesets); - return writer; - }; + /** + * UpdateLakeRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @instance + */ + UpdateLakeRequest.prototype.validateOnly = false; - /** - * Encodes the specified Stats message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats - * @static - * @param {google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats} message Stats message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Stats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new UpdateLakeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateLakeRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest instance + */ + UpdateLakeRequest.create = function create(properties) { + return new UpdateLakeRequest(properties); + }; - /** - * Decodes a Stats message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats} Stats - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Stats.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dataItems = reader.int64(); - break; - case 2: - message.dataSize = reader.int64(); - break; - case 3: - message.tables = reader.int64(); - break; - case 4: - message.filesets = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified UpdateLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateLakeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} message UpdateLakeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateLakeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.lake != null && Object.hasOwnProperty.call(message, "lake")) + $root.google.cloud.dataplex.v1.Lake.encode(message.lake, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; - /** - * Decodes a Stats message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats} Stats - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Stats.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified UpdateLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateLakeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} message UpdateLakeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies a Stats message. - * @function verify - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Stats.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dataItems != null && message.hasOwnProperty("dataItems")) - if (!$util.isInteger(message.dataItems) && !(message.dataItems && $util.isInteger(message.dataItems.low) && $util.isInteger(message.dataItems.high))) - return "dataItems: integer|Long expected"; - if (message.dataSize != null && message.hasOwnProperty("dataSize")) - if (!$util.isInteger(message.dataSize) && !(message.dataSize && $util.isInteger(message.dataSize.low) && $util.isInteger(message.dataSize.high))) - return "dataSize: integer|Long expected"; - if (message.tables != null && message.hasOwnProperty("tables")) - if (!$util.isInteger(message.tables) && !(message.tables && $util.isInteger(message.tables.low) && $util.isInteger(message.tables.high))) - return "tables: integer|Long expected"; - if (message.filesets != null && message.hasOwnProperty("filesets")) - if (!$util.isInteger(message.filesets) && !(message.filesets && $util.isInteger(message.filesets.low) && $util.isInteger(message.filesets.high))) - return "filesets: integer|Long expected"; - return null; - }; + /** + * Decodes an UpdateLakeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateLakeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateLakeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 2: + message.lake = $root.google.cloud.dataplex.v1.Lake.decode(reader, reader.uint32()); + break; + case 3: + message.validateOnly = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a Stats message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats} Stats - */ - Stats.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats) - return object; - var message = new $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats(); - if (object.dataItems != null) - if ($util.Long) - (message.dataItems = $util.Long.fromValue(object.dataItems)).unsigned = false; - else if (typeof object.dataItems === "string") - message.dataItems = parseInt(object.dataItems, 10); - else if (typeof object.dataItems === "number") - message.dataItems = object.dataItems; - else if (typeof object.dataItems === "object") - message.dataItems = new $util.LongBits(object.dataItems.low >>> 0, object.dataItems.high >>> 0).toNumber(); - if (object.dataSize != null) - if ($util.Long) - (message.dataSize = $util.Long.fromValue(object.dataSize)).unsigned = false; - else if (typeof object.dataSize === "string") - message.dataSize = parseInt(object.dataSize, 10); - else if (typeof object.dataSize === "number") - message.dataSize = object.dataSize; - else if (typeof object.dataSize === "object") - message.dataSize = new $util.LongBits(object.dataSize.low >>> 0, object.dataSize.high >>> 0).toNumber(); - if (object.tables != null) - if ($util.Long) - (message.tables = $util.Long.fromValue(object.tables)).unsigned = false; - else if (typeof object.tables === "string") - message.tables = parseInt(object.tables, 10); - else if (typeof object.tables === "number") - message.tables = object.tables; - else if (typeof object.tables === "object") - message.tables = new $util.LongBits(object.tables.low >>> 0, object.tables.high >>> 0).toNumber(); - if (object.filesets != null) - if ($util.Long) - (message.filesets = $util.Long.fromValue(object.filesets)).unsigned = false; - else if (typeof object.filesets === "string") - message.filesets = parseInt(object.filesets, 10); - else if (typeof object.filesets === "number") - message.filesets = object.filesets; - else if (typeof object.filesets === "object") - message.filesets = new $util.LongBits(object.filesets.low >>> 0, object.filesets.high >>> 0).toNumber(); - return message; - }; + /** + * Decodes an UpdateLakeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateLakeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a Stats message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats - * @static - * @param {google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats} message Stats - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Stats.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.dataItems = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.dataItems = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.dataSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.dataSize = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.tables = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.tables = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.filesets = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.filesets = options.longs === String ? "0" : 0; - } - if (message.dataItems != null && message.hasOwnProperty("dataItems")) - if (typeof message.dataItems === "number") - object.dataItems = options.longs === String ? String(message.dataItems) : message.dataItems; - else - object.dataItems = options.longs === String ? $util.Long.prototype.toString.call(message.dataItems) : options.longs === Number ? new $util.LongBits(message.dataItems.low >>> 0, message.dataItems.high >>> 0).toNumber() : message.dataItems; - if (message.dataSize != null && message.hasOwnProperty("dataSize")) - if (typeof message.dataSize === "number") - object.dataSize = options.longs === String ? String(message.dataSize) : message.dataSize; - else - object.dataSize = options.longs === String ? $util.Long.prototype.toString.call(message.dataSize) : options.longs === Number ? new $util.LongBits(message.dataSize.low >>> 0, message.dataSize.high >>> 0).toNumber() : message.dataSize; - if (message.tables != null && message.hasOwnProperty("tables")) - if (typeof message.tables === "number") - object.tables = options.longs === String ? String(message.tables) : message.tables; - else - object.tables = options.longs === String ? $util.Long.prototype.toString.call(message.tables) : options.longs === Number ? new $util.LongBits(message.tables.low >>> 0, message.tables.high >>> 0).toNumber() : message.tables; - if (message.filesets != null && message.hasOwnProperty("filesets")) - if (typeof message.filesets === "number") - object.filesets = options.longs === String ? String(message.filesets) : message.filesets; - else - object.filesets = options.longs === String ? $util.Long.prototype.toString.call(message.filesets) : options.longs === Number ? new $util.LongBits(message.filesets.low >>> 0, message.filesets.high >>> 0).toNumber() : message.filesets; - return object; - }; + /** + * Verifies an UpdateLakeRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateLakeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.lake != null && message.hasOwnProperty("lake")) { + var error = $root.google.cloud.dataplex.v1.Lake.verify(message.lake); + if (error) + return "lake." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; - /** - * Converts this Stats to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats - * @instance - * @returns {Object.} JSON object - */ - Stats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates an UpdateLakeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest + */ + UpdateLakeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateLakeRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.UpdateLakeRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateLakeRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.lake != null) { + if (typeof object.lake !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateLakeRequest.lake: object expected"); + message.lake = $root.google.cloud.dataplex.v1.Lake.fromObject(object.lake); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; - return Stats; - })(); + /** + * Creates a plain object from an UpdateLakeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @static + * @param {google.cloud.dataplex.v1.UpdateLakeRequest} message UpdateLakeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateLakeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.lake = null; + object.validateOnly = false; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.lake != null && message.hasOwnProperty("lake")) + object.lake = $root.google.cloud.dataplex.v1.Lake.toObject(message.lake, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; - return DiscoveryStatus; - })(); + /** + * Converts this UpdateLakeRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateLakeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Asset; + return UpdateLakeRequest; })(); - /** - * State enum. - * @name google.cloud.dataplex.v1.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} CREATING=2 CREATING value - * @property {number} DELETING=3 DELETING value - * @property {number} ACTION_REQUIRED=4 ACTION_REQUIRED value - */ - v1.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "CREATING"] = 2; - values[valuesById[3] = "DELETING"] = 3; - values[valuesById[4] = "ACTION_REQUIRED"] = 4; - return values; - })(); + v1.DeleteLakeRequest = (function() { - v1.DataplexService = (function() { + /** + * Properties of a DeleteLakeRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IDeleteLakeRequest + * @property {string|null} [name] DeleteLakeRequest name + */ /** - * Constructs a new DataplexService service. + * Constructs a new DeleteLakeRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DataplexService - * @extends $protobuf.rpc.Service + * @classdesc Represents a DeleteLakeRequest. + * @implements IDeleteLakeRequest * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @param {google.cloud.dataplex.v1.IDeleteLakeRequest=} [properties] Properties to set */ - function DataplexService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + function DeleteLakeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - (DataplexService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DataplexService; + /** + * DeleteLakeRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @instance + */ + DeleteLakeRequest.prototype.name = ""; /** - * Creates new DataplexService service using the specified rpc implementation. + * Creates a new DeleteLakeRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.DataplexService + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {DataplexService} RPC service. Useful where requests and/or responses are streamed. + * @param {google.cloud.dataplex.v1.IDeleteLakeRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest instance */ - DataplexService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); + DeleteLakeRequest.create = function create(properties) { + return new DeleteLakeRequest(properties); }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createLake}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef CreateLakeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Encodes the specified DeleteLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteLakeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} message DeleteLakeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + DeleteLakeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; /** - * Calls CreateLake. - * @function createLake - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.ICreateLakeRequest} request CreateLakeRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.CreateLakeCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Encodes the specified DeleteLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteLakeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} message DeleteLakeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(DataplexService.prototype.createLake = function createLake(request, callback) { - return this.rpcCall(createLake, $root.google.cloud.dataplex.v1.CreateLakeRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateLake" }); + DeleteLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls CreateLake. - * @function createLake - * @memberof google.cloud.dataplex.v1.DataplexService + * Decodes a DeleteLakeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteLakeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteLakeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteLakeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteLakeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteLakeRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteLakeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteLakeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest + */ + DeleteLakeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteLakeRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.DeleteLakeRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteLakeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {google.cloud.dataplex.v1.DeleteLakeRequest} message DeleteLakeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteLakeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteLakeRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest * @instance - * @param {google.cloud.dataplex.v1.ICreateLakeRequest} request CreateLakeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object + */ + DeleteLakeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteLakeRequest; + })(); + + v1.ListLakesRequest = (function() { + + /** + * Properties of a ListLakesRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListLakesRequest + * @property {string|null} [parent] ListLakesRequest parent + * @property {number|null} [pageSize] ListLakesRequest pageSize + * @property {string|null} [pageToken] ListLakesRequest pageToken + * @property {string|null} [filter] ListLakesRequest filter + * @property {string|null} [orderBy] ListLakesRequest orderBy */ /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateLake}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef UpdateLakeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Constructs a new ListLakesRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListLakesRequest. + * @implements IListLakesRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListLakesRequest=} [properties] Properties to set */ + function ListLakesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls UpdateLake. - * @function updateLake - * @memberof google.cloud.dataplex.v1.DataplexService + * ListLakesRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListLakesRequest * @instance - * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} request UpdateLakeRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.UpdateLakeCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DataplexService.prototype.updateLake = function updateLake(request, callback) { - return this.rpcCall(updateLake, $root.google.cloud.dataplex.v1.UpdateLakeRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateLake" }); + ListLakesRequest.prototype.parent = ""; /** - * Calls UpdateLake. - * @function updateLake - * @memberof google.cloud.dataplex.v1.DataplexService + * ListLakesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListLakesRequest * @instance - * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} request UpdateLakeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + ListLakesRequest.prototype.pageSize = 0; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteLake}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef DeleteLakeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * ListLakesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @instance */ + ListLakesRequest.prototype.pageToken = ""; /** - * Calls DeleteLake. - * @function deleteLake - * @memberof google.cloud.dataplex.v1.DataplexService + * ListLakesRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListLakesRequest * @instance - * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} request DeleteLakeRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.DeleteLakeCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DataplexService.prototype.deleteLake = function deleteLake(request, callback) { - return this.rpcCall(deleteLake, $root.google.cloud.dataplex.v1.DeleteLakeRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteLake" }); + ListLakesRequest.prototype.filter = ""; /** - * Calls DeleteLake. - * @function deleteLake - * @memberof google.cloud.dataplex.v1.DataplexService + * ListLakesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataplex.v1.ListLakesRequest * @instance - * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} request DeleteLakeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + ListLakesRequest.prototype.orderBy = ""; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listLakes}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef ListLakesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListLakesResponse} [response] ListLakesResponse + * Creates a new ListLakesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @static + * @param {google.cloud.dataplex.v1.IListLakesRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest instance */ + ListLakesRequest.create = function create(properties) { + return new ListLakesRequest(properties); + }; /** - * Calls ListLakes. - * @function listLakes - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListLakesRequest} request ListLakesRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.ListLakesCallback} callback Node-style callback called with the error, if any, and ListLakesResponse - * @returns {undefined} - * @variation 1 + * Encodes the specified ListLakesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @static + * @param {google.cloud.dataplex.v1.IListLakesRequest} message ListLakesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(DataplexService.prototype.listLakes = function listLakes(request, callback) { - return this.rpcCall(listLakes, $root.google.cloud.dataplex.v1.ListLakesRequest, $root.google.cloud.dataplex.v1.ListLakesResponse, request, callback); - }, "name", { value: "ListLakes" }); + ListLakesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; /** - * Calls ListLakes. - * @function listLakes - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListLakesRequest} request ListLakesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified ListLakesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @static + * @param {google.cloud.dataplex.v1.IListLakesRequest} message ListLakesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + ListLakesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getLake}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef GetLakeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Lake} [response] Lake + * Decodes a ListLakesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ListLakesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListLakesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 4: + message.filter = reader.string(); + break; + case 5: + message.orderBy = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls GetLake. - * @function getLake - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IGetLakeRequest} request GetLakeRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.GetLakeCallback} callback Node-style callback called with the error, if any, and Lake - * @returns {undefined} - * @variation 1 + * Decodes a ListLakesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(DataplexService.prototype.getLake = function getLake(request, callback) { - return this.rpcCall(getLake, $root.google.cloud.dataplex.v1.GetLakeRequest, $root.google.cloud.dataplex.v1.Lake, request, callback); - }, "name", { value: "GetLake" }); + ListLakesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls GetLake. - * @function getLake - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IGetLakeRequest} request GetLakeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a ListLakesRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + ListLakesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listLakeActions}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef ListLakeActionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListActionsResponse} [response] ListActionsResponse + * Creates a ListLakesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest */ + ListLakesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListLakesRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListLakesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; /** - * Calls ListLakeActions. - * @function listLakeActions - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} request ListLakeActionsRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.ListLakeActionsCallback} callback Node-style callback called with the error, if any, and ListActionsResponse - * @returns {undefined} - * @variation 1 + * Creates a plain object from a ListLakesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @static + * @param {google.cloud.dataplex.v1.ListLakesRequest} message ListLakesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(DataplexService.prototype.listLakeActions = function listLakeActions(request, callback) { - return this.rpcCall(listLakeActions, $root.google.cloud.dataplex.v1.ListLakeActionsRequest, $root.google.cloud.dataplex.v1.ListActionsResponse, request, callback); - }, "name", { value: "ListLakeActions" }); + ListLakesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; /** - * Calls ListLakeActions. - * @function listLakeActions - * @memberof google.cloud.dataplex.v1.DataplexService + * Converts this ListLakesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListLakesRequest * @instance - * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} request ListLakeActionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createZone}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef CreateZoneCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * @returns {Object.} JSON object */ + ListLakesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Calls CreateZone. - * @function createZone - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.ICreateZoneRequest} request CreateZoneRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.CreateZoneCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.createZone = function createZone(request, callback) { - return this.rpcCall(createZone, $root.google.cloud.dataplex.v1.CreateZoneRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateZone" }); + return ListLakesRequest; + })(); - /** - * Calls CreateZone. - * @function createZone - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.ICreateZoneRequest} request CreateZoneRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + v1.ListLakesResponse = (function() { /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateZone}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef UpdateZoneCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Properties of a ListLakesResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListLakesResponse + * @property {Array.|null} [lakes] ListLakesResponse lakes + * @property {string|null} [nextPageToken] ListLakesResponse nextPageToken + * @property {Array.|null} [unreachableLocations] ListLakesResponse unreachableLocations */ /** - * Calls UpdateZone. - * @function updateZone - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} request UpdateZoneRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.UpdateZoneCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Constructs a new ListLakesResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListLakesResponse. + * @implements IListLakesResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListLakesResponse=} [properties] Properties to set */ - Object.defineProperty(DataplexService.prototype.updateZone = function updateZone(request, callback) { - return this.rpcCall(updateZone, $root.google.cloud.dataplex.v1.UpdateZoneRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateZone" }); + function ListLakesResponse(properties) { + this.lakes = []; + this.unreachableLocations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls UpdateZone. - * @function updateZone - * @memberof google.cloud.dataplex.v1.DataplexService + * ListLakesResponse lakes. + * @member {Array.} lakes + * @memberof google.cloud.dataplex.v1.ListLakesResponse * @instance - * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} request UpdateZoneRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteZone}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef DeleteZoneCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation */ + ListLakesResponse.prototype.lakes = $util.emptyArray; /** - * Calls DeleteZone. - * @function deleteZone - * @memberof google.cloud.dataplex.v1.DataplexService + * ListLakesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListLakesResponse * @instance - * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} request DeleteZoneRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.DeleteZoneCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DataplexService.prototype.deleteZone = function deleteZone(request, callback) { - return this.rpcCall(deleteZone, $root.google.cloud.dataplex.v1.DeleteZoneRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteZone" }); + ListLakesResponse.prototype.nextPageToken = ""; /** - * Calls DeleteZone. - * @function deleteZone - * @memberof google.cloud.dataplex.v1.DataplexService + * ListLakesResponse unreachableLocations. + * @member {Array.} unreachableLocations + * @memberof google.cloud.dataplex.v1.ListLakesResponse * @instance - * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} request DeleteZoneRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + ListLakesResponse.prototype.unreachableLocations = $util.emptyArray; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listZones}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef ListZonesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListZonesResponse} [response] ListZonesResponse + * Creates a new ListLakesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {google.cloud.dataplex.v1.IListLakesResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse instance */ + ListLakesResponse.create = function create(properties) { + return new ListLakesResponse(properties); + }; /** - * Calls ListZones. - * @function listZones - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListZonesRequest} request ListZonesRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.ListZonesCallback} callback Node-style callback called with the error, if any, and ListZonesResponse - * @returns {undefined} - * @variation 1 + * Encodes the specified ListLakesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {google.cloud.dataplex.v1.IListLakesResponse} message ListLakesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(DataplexService.prototype.listZones = function listZones(request, callback) { - return this.rpcCall(listZones, $root.google.cloud.dataplex.v1.ListZonesRequest, $root.google.cloud.dataplex.v1.ListZonesResponse, request, callback); - }, "name", { value: "ListZones" }); + ListLakesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lakes != null && message.lakes.length) + for (var i = 0; i < message.lakes.length; ++i) + $root.google.cloud.dataplex.v1.Lake.encode(message.lakes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachableLocations != null && message.unreachableLocations.length) + for (var i = 0; i < message.unreachableLocations.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachableLocations[i]); + return writer; + }; /** - * Calls ListZones. - * @function listZones - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListZonesRequest} request ListZonesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified ListLakesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {google.cloud.dataplex.v1.IListLakesResponse} message ListLakesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + ListLakesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getZone}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef GetZoneCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Zone} [response] Zone + * Decodes a ListLakesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ListLakesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListLakesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.lakes && message.lakes.length)) + message.lakes = []; + message.lakes.push($root.google.cloud.dataplex.v1.Lake.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + case 3: + if (!(message.unreachableLocations && message.unreachableLocations.length)) + message.unreachableLocations = []; + message.unreachableLocations.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls GetZone. - * @function getZone - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IGetZoneRequest} request GetZoneRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.GetZoneCallback} callback Node-style callback called with the error, if any, and Zone - * @returns {undefined} - * @variation 1 + * Decodes a ListLakesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(DataplexService.prototype.getZone = function getZone(request, callback) { - return this.rpcCall(getZone, $root.google.cloud.dataplex.v1.GetZoneRequest, $root.google.cloud.dataplex.v1.Zone, request, callback); - }, "name", { value: "GetZone" }); + ListLakesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls GetZone. - * @function getZone - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IGetZoneRequest} request GetZoneRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a ListLakesResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + ListLakesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.lakes != null && message.hasOwnProperty("lakes")) { + if (!Array.isArray(message.lakes)) + return "lakes: array expected"; + for (var i = 0; i < message.lakes.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Lake.verify(message.lakes[i]); + if (error) + return "lakes." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachableLocations != null && message.hasOwnProperty("unreachableLocations")) { + if (!Array.isArray(message.unreachableLocations)) + return "unreachableLocations: array expected"; + for (var i = 0; i < message.unreachableLocations.length; ++i) + if (!$util.isString(message.unreachableLocations[i])) + return "unreachableLocations: string[] expected"; + } + return null; + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listZoneActions}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef ListZoneActionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListActionsResponse} [response] ListActionsResponse + * Creates a ListLakesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse */ + ListLakesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListLakesResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListLakesResponse(); + if (object.lakes) { + if (!Array.isArray(object.lakes)) + throw TypeError(".google.cloud.dataplex.v1.ListLakesResponse.lakes: array expected"); + message.lakes = []; + for (var i = 0; i < object.lakes.length; ++i) { + if (typeof object.lakes[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListLakesResponse.lakes: object expected"); + message.lakes[i] = $root.google.cloud.dataplex.v1.Lake.fromObject(object.lakes[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachableLocations) { + if (!Array.isArray(object.unreachableLocations)) + throw TypeError(".google.cloud.dataplex.v1.ListLakesResponse.unreachableLocations: array expected"); + message.unreachableLocations = []; + for (var i = 0; i < object.unreachableLocations.length; ++i) + message.unreachableLocations[i] = String(object.unreachableLocations[i]); + } + return message; + }; /** - * Calls ListZoneActions. - * @function listZoneActions - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} request ListZoneActionsRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.ListZoneActionsCallback} callback Node-style callback called with the error, if any, and ListActionsResponse - * @returns {undefined} - * @variation 1 + * Creates a plain object from a ListLakesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {google.cloud.dataplex.v1.ListLakesResponse} message ListLakesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(DataplexService.prototype.listZoneActions = function listZoneActions(request, callback) { - return this.rpcCall(listZoneActions, $root.google.cloud.dataplex.v1.ListZoneActionsRequest, $root.google.cloud.dataplex.v1.ListActionsResponse, request, callback); - }, "name", { value: "ListZoneActions" }); + ListLakesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.lakes = []; + object.unreachableLocations = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.lakes && message.lakes.length) { + object.lakes = []; + for (var j = 0; j < message.lakes.length; ++j) + object.lakes[j] = $root.google.cloud.dataplex.v1.Lake.toObject(message.lakes[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachableLocations && message.unreachableLocations.length) { + object.unreachableLocations = []; + for (var j = 0; j < message.unreachableLocations.length; ++j) + object.unreachableLocations[j] = message.unreachableLocations[j]; + } + return object; + }; /** - * Calls ListZoneActions. - * @function listZoneActions - * @memberof google.cloud.dataplex.v1.DataplexService + * Converts this ListLakesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListLakesResponse * @instance - * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} request ListZoneActionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + ListLakesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createAsset}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef CreateAssetCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ + return ListLakesResponse; + })(); + + v1.ListLakeActionsRequest = (function() { /** - * Calls CreateAsset. - * @function createAsset - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.ICreateAssetRequest} request CreateAssetRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.CreateAssetCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Properties of a ListLakeActionsRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListLakeActionsRequest + * @property {string|null} [parent] ListLakeActionsRequest parent + * @property {number|null} [pageSize] ListLakeActionsRequest pageSize + * @property {string|null} [pageToken] ListLakeActionsRequest pageToken */ - Object.defineProperty(DataplexService.prototype.createAsset = function createAsset(request, callback) { - return this.rpcCall(createAsset, $root.google.cloud.dataplex.v1.CreateAssetRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateAsset" }); /** - * Calls CreateAsset. - * @function createAsset - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.ICreateAssetRequest} request CreateAssetRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Constructs a new ListLakeActionsRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListLakeActionsRequest. + * @implements IListLakeActionsRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListLakeActionsRequest=} [properties] Properties to set */ + function ListLakeActionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateAsset}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef UpdateAssetCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * ListLakeActionsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @instance */ + ListLakeActionsRequest.prototype.parent = ""; /** - * Calls UpdateAsset. - * @function updateAsset - * @memberof google.cloud.dataplex.v1.DataplexService + * ListLakeActionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest * @instance - * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} request UpdateAssetRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.UpdateAssetCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DataplexService.prototype.updateAsset = function updateAsset(request, callback) { - return this.rpcCall(updateAsset, $root.google.cloud.dataplex.v1.UpdateAssetRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateAsset" }); + ListLakeActionsRequest.prototype.pageSize = 0; /** - * Calls UpdateAsset. - * @function updateAsset - * @memberof google.cloud.dataplex.v1.DataplexService + * ListLakeActionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest * @instance - * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} request UpdateAssetRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + ListLakeActionsRequest.prototype.pageToken = ""; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteAsset}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef DeleteAssetCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Creates a new ListLakeActionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListLakeActionsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest instance */ + ListLakeActionsRequest.create = function create(properties) { + return new ListLakeActionsRequest(properties); + }; /** - * Calls DeleteAsset. - * @function deleteAsset - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} request DeleteAssetRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.DeleteAssetCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Encodes the specified ListLakeActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakeActionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} message ListLakeActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(DataplexService.prototype.deleteAsset = function deleteAsset(request, callback) { - return this.rpcCall(deleteAsset, $root.google.cloud.dataplex.v1.DeleteAssetRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteAsset" }); + ListLakeActionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; /** - * Calls DeleteAsset. - * @function deleteAsset - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} request DeleteAssetRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified ListLakeActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakeActionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} message ListLakeActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + ListLakeActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listAssets}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef ListAssetsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListAssetsResponse} [response] ListAssetsResponse + * Decodes a ListLakeActionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ListLakeActionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListLakeActionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls ListAssets. - * @function listAssets - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListAssetsRequest} request ListAssetsRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.ListAssetsCallback} callback Node-style callback called with the error, if any, and ListAssetsResponse - * @returns {undefined} - * @variation 1 + * Decodes a ListLakeActionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(DataplexService.prototype.listAssets = function listAssets(request, callback) { - return this.rpcCall(listAssets, $root.google.cloud.dataplex.v1.ListAssetsRequest, $root.google.cloud.dataplex.v1.ListAssetsResponse, request, callback); - }, "name", { value: "ListAssets" }); + ListLakeActionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls ListAssets. - * @function listAssets - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListAssetsRequest} request ListAssetsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a ListLakeActionsRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + ListLakeActionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getAsset}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef GetAssetCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Asset} [response] Asset + * Creates a ListLakeActionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest */ + ListLakeActionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListLakeActionsRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListLakeActionsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; /** - * Calls GetAsset. - * @function getAsset - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IGetAssetRequest} request GetAssetRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.GetAssetCallback} callback Node-style callback called with the error, if any, and Asset - * @returns {undefined} - * @variation 1 + * Creates a plain object from a ListLakeActionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {google.cloud.dataplex.v1.ListLakeActionsRequest} message ListLakeActionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(DataplexService.prototype.getAsset = function getAsset(request, callback) { - return this.rpcCall(getAsset, $root.google.cloud.dataplex.v1.GetAssetRequest, $root.google.cloud.dataplex.v1.Asset, request, callback); - }, "name", { value: "GetAsset" }); + ListLakeActionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; /** - * Calls GetAsset. - * @function getAsset - * @memberof google.cloud.dataplex.v1.DataplexService + * Converts this ListLakeActionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest * @instance - * @param {google.cloud.dataplex.v1.IGetAssetRequest} request GetAssetRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + ListLakeActionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listAssetActions}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef ListAssetActionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListActionsResponse} [response] ListActionsResponse - */ + return ListLakeActionsRequest; + })(); + + v1.ListActionsResponse = (function() { /** - * Calls ListAssetActions. - * @function listAssetActions - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} request ListAssetActionsRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.ListAssetActionsCallback} callback Node-style callback called with the error, if any, and ListActionsResponse - * @returns {undefined} - * @variation 1 + * Properties of a ListActionsResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListActionsResponse + * @property {Array.|null} [actions] ListActionsResponse actions + * @property {string|null} [nextPageToken] ListActionsResponse nextPageToken */ - Object.defineProperty(DataplexService.prototype.listAssetActions = function listAssetActions(request, callback) { - return this.rpcCall(listAssetActions, $root.google.cloud.dataplex.v1.ListAssetActionsRequest, $root.google.cloud.dataplex.v1.ListActionsResponse, request, callback); - }, "name", { value: "ListAssetActions" }); /** - * Calls ListAssetActions. - * @function listAssetActions - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} request ListAssetActionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Constructs a new ListActionsResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListActionsResponse. + * @implements IListActionsResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListActionsResponse=} [properties] Properties to set */ + function ListActionsResponse(properties) { + this.actions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createTask}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef CreateTaskCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * ListActionsResponse actions. + * @member {Array.} actions + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @instance */ + ListActionsResponse.prototype.actions = $util.emptyArray; /** - * Calls CreateTask. - * @function createTask - * @memberof google.cloud.dataplex.v1.DataplexService + * ListActionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListActionsResponse * @instance - * @param {google.cloud.dataplex.v1.ICreateTaskRequest} request CreateTaskRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.CreateTaskCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DataplexService.prototype.createTask = function createTask(request, callback) { - return this.rpcCall(createTask, $root.google.cloud.dataplex.v1.CreateTaskRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateTask" }); + ListActionsResponse.prototype.nextPageToken = ""; /** - * Calls CreateTask. - * @function createTask - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.ICreateTaskRequest} request CreateTaskRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new ListActionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @static + * @param {google.cloud.dataplex.v1.IListActionsResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse instance */ + ListActionsResponse.create = function create(properties) { + return new ListActionsResponse(properties); + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateTask}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef UpdateTaskCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Encodes the specified ListActionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListActionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @static + * @param {google.cloud.dataplex.v1.IListActionsResponse} message ListActionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + ListActionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.actions != null && message.actions.length) + for (var i = 0; i < message.actions.length; ++i) + $root.google.cloud.dataplex.v1.Action.encode(message.actions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; /** - * Calls UpdateTask. - * @function updateTask - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} request UpdateTaskRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.UpdateTaskCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Encodes the specified ListActionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListActionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @static + * @param {google.cloud.dataplex.v1.IListActionsResponse} message ListActionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(DataplexService.prototype.updateTask = function updateTask(request, callback) { - return this.rpcCall(updateTask, $root.google.cloud.dataplex.v1.UpdateTaskRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateTask" }); + ListActionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls UpdateTask. - * @function updateTask - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} request UpdateTaskRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a ListActionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ListActionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListActionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.actions && message.actions.length)) + message.actions = []; + message.actions.push($root.google.cloud.dataplex.v1.Action.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteTask}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef DeleteTaskCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Decodes a ListActionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ListActionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls DeleteTask. - * @function deleteTask - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} request DeleteTaskRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.DeleteTaskCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Verifies a ListActionsResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(DataplexService.prototype.deleteTask = function deleteTask(request, callback) { - return this.rpcCall(deleteTask, $root.google.cloud.dataplex.v1.DeleteTaskRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteTask" }); + ListActionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.actions != null && message.hasOwnProperty("actions")) { + if (!Array.isArray(message.actions)) + return "actions: array expected"; + for (var i = 0; i < message.actions.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Action.verify(message.actions[i]); + if (error) + return "actions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; /** - * Calls DeleteTask. - * @function deleteTask - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} request DeleteTaskRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a ListActionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse */ + ListActionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListActionsResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListActionsResponse(); + if (object.actions) { + if (!Array.isArray(object.actions)) + throw TypeError(".google.cloud.dataplex.v1.ListActionsResponse.actions: array expected"); + message.actions = []; + for (var i = 0; i < object.actions.length; ++i) { + if (typeof object.actions[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListActionsResponse.actions: object expected"); + message.actions[i] = $root.google.cloud.dataplex.v1.Action.fromObject(object.actions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listTasks}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef ListTasksCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListTasksResponse} [response] ListTasksResponse + * Creates a plain object from a ListActionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @static + * @param {google.cloud.dataplex.v1.ListActionsResponse} message ListActionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + ListActionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.actions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.actions && message.actions.length) { + object.actions = []; + for (var j = 0; j < message.actions.length; ++j) + object.actions[j] = $root.google.cloud.dataplex.v1.Action.toObject(message.actions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; /** - * Calls ListTasks. - * @function listTasks - * @memberof google.cloud.dataplex.v1.DataplexService + * Converts this ListActionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListActionsResponse * @instance - * @param {google.cloud.dataplex.v1.IListTasksRequest} request ListTasksRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.ListTasksCallback} callback Node-style callback called with the error, if any, and ListTasksResponse - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(DataplexService.prototype.listTasks = function listTasks(request, callback) { - return this.rpcCall(listTasks, $root.google.cloud.dataplex.v1.ListTasksRequest, $root.google.cloud.dataplex.v1.ListTasksResponse, request, callback); - }, "name", { value: "ListTasks" }); + ListActionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Calls ListTasks. - * @function listTasks - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListTasksRequest} request ListTasksRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + return ListActionsResponse; + })(); + + v1.GetLakeRequest = (function() { /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getTask}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef GetTaskCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Task} [response] Task + * Properties of a GetLakeRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetLakeRequest + * @property {string|null} [name] GetLakeRequest name */ /** - * Calls GetTask. - * @function getTask - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IGetTaskRequest} request GetTaskRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.GetTaskCallback} callback Node-style callback called with the error, if any, and Task - * @returns {undefined} - * @variation 1 + * Constructs a new GetLakeRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetLakeRequest. + * @implements IGetLakeRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetLakeRequest=} [properties] Properties to set */ - Object.defineProperty(DataplexService.prototype.getTask = function getTask(request, callback) { - return this.rpcCall(getTask, $root.google.cloud.dataplex.v1.GetTaskRequest, $root.google.cloud.dataplex.v1.Task, request, callback); - }, "name", { value: "GetTask" }); + function GetLakeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls GetTask. - * @function getTask - * @memberof google.cloud.dataplex.v1.DataplexService + * GetLakeRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetLakeRequest * @instance - * @param {google.cloud.dataplex.v1.IGetTaskRequest} request GetTaskRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + GetLakeRequest.prototype.name = ""; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listJobs}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef ListJobsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListJobsResponse} [response] ListJobsResponse + * Creates a new GetLakeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @static + * @param {google.cloud.dataplex.v1.IGetLakeRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest instance */ + GetLakeRequest.create = function create(properties) { + return new GetLakeRequest(properties); + }; /** - * Calls ListJobs. - * @function listJobs - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListJobsRequest} request ListJobsRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.ListJobsCallback} callback Node-style callback called with the error, if any, and ListJobsResponse - * @returns {undefined} - * @variation 1 + * Encodes the specified GetLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetLakeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @static + * @param {google.cloud.dataplex.v1.IGetLakeRequest} message GetLakeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(DataplexService.prototype.listJobs = function listJobs(request, callback) { - return this.rpcCall(listJobs, $root.google.cloud.dataplex.v1.ListJobsRequest, $root.google.cloud.dataplex.v1.ListJobsResponse, request, callback); - }, "name", { value: "ListJobs" }); + GetLakeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; /** - * Calls ListJobs. - * @function listJobs - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListJobsRequest} request ListJobsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified GetLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetLakeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @static + * @param {google.cloud.dataplex.v1.IGetLakeRequest} message GetLakeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + GetLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getJob}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef GetJobCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Job} [response] Job + * Decodes a GetLakeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + GetLakeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetLakeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls GetJob. - * @function getJob - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IGetJobRequest} request GetJobRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.GetJobCallback} callback Node-style callback called with the error, if any, and Job - * @returns {undefined} - * @variation 1 + * Decodes a GetLakeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(DataplexService.prototype.getJob = function getJob(request, callback) { - return this.rpcCall(getJob, $root.google.cloud.dataplex.v1.GetJobRequest, $root.google.cloud.dataplex.v1.Job, request, callback); - }, "name", { value: "GetJob" }); + GetLakeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls GetJob. - * @function getJob - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IGetJobRequest} request GetJobRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a GetLakeRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + GetLakeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#cancelJob}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef CancelJobCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Creates a GetLakeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest */ + GetLakeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetLakeRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetLakeRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Calls CancelJob. - * @function cancelJob - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.ICancelJobRequest} request CancelJobRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.CancelJobCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + /** + * Creates a plain object from a GetLakeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @static + * @param {google.cloud.dataplex.v1.GetLakeRequest} message GetLakeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(DataplexService.prototype.cancelJob = function cancelJob(request, callback) { - return this.rpcCall(cancelJob, $root.google.cloud.dataplex.v1.CancelJobRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "CancelJob" }); + GetLakeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; /** - * Calls CancelJob. - * @function cancelJob - * @memberof google.cloud.dataplex.v1.DataplexService + * Converts this GetLakeRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetLakeRequest * @instance - * @param {google.cloud.dataplex.v1.ICancelJobRequest} request CancelJobRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + GetLakeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return DataplexService; + return GetLakeRequest; })(); - v1.CreateLakeRequest = (function() { + v1.CreateZoneRequest = (function() { /** - * Properties of a CreateLakeRequest. + * Properties of a CreateZoneRequest. * @memberof google.cloud.dataplex.v1 - * @interface ICreateLakeRequest - * @property {string|null} [parent] CreateLakeRequest parent - * @property {string|null} [lakeId] CreateLakeRequest lakeId - * @property {google.cloud.dataplex.v1.ILake|null} [lake] CreateLakeRequest lake - * @property {boolean|null} [validateOnly] CreateLakeRequest validateOnly + * @interface ICreateZoneRequest + * @property {string|null} [parent] CreateZoneRequest parent + * @property {string|null} [zoneId] CreateZoneRequest zoneId + * @property {google.cloud.dataplex.v1.IZone|null} [zone] CreateZoneRequest zone + * @property {boolean|null} [validateOnly] CreateZoneRequest validateOnly */ /** - * Constructs a new CreateLakeRequest. + * Constructs a new CreateZoneRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CreateLakeRequest. - * @implements ICreateLakeRequest + * @classdesc Represents a CreateZoneRequest. + * @implements ICreateZoneRequest * @constructor - * @param {google.cloud.dataplex.v1.ICreateLakeRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.ICreateZoneRequest=} [properties] Properties to set */ - function CreateLakeRequest(properties) { + function CreateZoneRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16536,100 +24631,100 @@ } /** - * CreateLakeRequest parent. + * CreateZoneRequest parent. * @member {string} parent - * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @memberof google.cloud.dataplex.v1.CreateZoneRequest * @instance */ - CreateLakeRequest.prototype.parent = ""; + CreateZoneRequest.prototype.parent = ""; /** - * CreateLakeRequest lakeId. - * @member {string} lakeId - * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * CreateZoneRequest zoneId. + * @member {string} zoneId + * @memberof google.cloud.dataplex.v1.CreateZoneRequest * @instance */ - CreateLakeRequest.prototype.lakeId = ""; + CreateZoneRequest.prototype.zoneId = ""; /** - * CreateLakeRequest lake. - * @member {google.cloud.dataplex.v1.ILake|null|undefined} lake - * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * CreateZoneRequest zone. + * @member {google.cloud.dataplex.v1.IZone|null|undefined} zone + * @memberof google.cloud.dataplex.v1.CreateZoneRequest * @instance */ - CreateLakeRequest.prototype.lake = null; + CreateZoneRequest.prototype.zone = null; /** - * CreateLakeRequest validateOnly. + * CreateZoneRequest validateOnly. * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @memberof google.cloud.dataplex.v1.CreateZoneRequest * @instance */ - CreateLakeRequest.prototype.validateOnly = false; + CreateZoneRequest.prototype.validateOnly = false; /** - * Creates a new CreateLakeRequest instance using the specified properties. + * Creates a new CreateZoneRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @memberof google.cloud.dataplex.v1.CreateZoneRequest * @static - * @param {google.cloud.dataplex.v1.ICreateLakeRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest instance + * @param {google.cloud.dataplex.v1.ICreateZoneRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest instance */ - CreateLakeRequest.create = function create(properties) { - return new CreateLakeRequest(properties); + CreateZoneRequest.create = function create(properties) { + return new CreateZoneRequest(properties); }; /** - * Encodes the specified CreateLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateLakeRequest.verify|verify} messages. + * Encodes the specified CreateZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateZoneRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @memberof google.cloud.dataplex.v1.CreateZoneRequest * @static - * @param {google.cloud.dataplex.v1.ICreateLakeRequest} message CreateLakeRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.ICreateZoneRequest} message CreateZoneRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateLakeRequest.encode = function encode(message, writer) { + CreateZoneRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.lakeId != null && Object.hasOwnProperty.call(message, "lakeId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.lakeId); - if (message.lake != null && Object.hasOwnProperty.call(message, "lake")) - $root.google.cloud.dataplex.v1.Lake.encode(message.lake, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.zoneId != null && Object.hasOwnProperty.call(message, "zoneId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zoneId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + $root.google.cloud.dataplex.v1.Zone.encode(message.zone, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); return writer; }; /** - * Encodes the specified CreateLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateLakeRequest.verify|verify} messages. + * Encodes the specified CreateZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateZoneRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @memberof google.cloud.dataplex.v1.CreateZoneRequest * @static - * @param {google.cloud.dataplex.v1.ICreateLakeRequest} message CreateLakeRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.ICreateZoneRequest} message CreateZoneRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateLakeRequest message from the specified reader or buffer. + * Decodes a CreateZoneRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @memberof google.cloud.dataplex.v1.CreateZoneRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest + * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateLakeRequest.decode = function decode(reader, length) { + CreateZoneRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateLakeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateZoneRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -16637,10 +24732,10 @@ message.parent = reader.string(); break; case 2: - message.lakeId = reader.string(); + message.zoneId = reader.string(); break; case 3: - message.lake = $root.google.cloud.dataplex.v1.Lake.decode(reader, reader.uint32()); + message.zone = $root.google.cloud.dataplex.v1.Zone.decode(reader, reader.uint32()); break; case 4: message.validateOnly = reader.bool(); @@ -16654,42 +24749,42 @@ }; /** - * Decodes a CreateLakeRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateZoneRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @memberof google.cloud.dataplex.v1.CreateZoneRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest + * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateLakeRequest.decodeDelimited = function decodeDelimited(reader) { + CreateZoneRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateLakeRequest message. + * Verifies a CreateZoneRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @memberof google.cloud.dataplex.v1.CreateZoneRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateLakeRequest.verify = function verify(message) { + CreateZoneRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.lakeId != null && message.hasOwnProperty("lakeId")) - if (!$util.isString(message.lakeId)) - return "lakeId: string expected"; - if (message.lake != null && message.hasOwnProperty("lake")) { - var error = $root.google.cloud.dataplex.v1.Lake.verify(message.lake); + if (message.zoneId != null && message.hasOwnProperty("zoneId")) + if (!$util.isString(message.zoneId)) + return "zoneId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) { + var error = $root.google.cloud.dataplex.v1.Zone.verify(message.zone); if (error) - return "lake." + error; + return "zone." + error; } if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) if (typeof message.validateOnly !== "boolean") @@ -16698,25 +24793,25 @@ }; /** - * Creates a CreateLakeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateZoneRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @memberof google.cloud.dataplex.v1.CreateZoneRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest + * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest */ - CreateLakeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.CreateLakeRequest) + CreateZoneRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateZoneRequest) return object; - var message = new $root.google.cloud.dataplex.v1.CreateLakeRequest(); + var message = new $root.google.cloud.dataplex.v1.CreateZoneRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.lakeId != null) - message.lakeId = String(object.lakeId); - if (object.lake != null) { - if (typeof object.lake !== "object") - throw TypeError(".google.cloud.dataplex.v1.CreateLakeRequest.lake: object expected"); - message.lake = $root.google.cloud.dataplex.v1.Lake.fromObject(object.lake); + if (object.zoneId != null) + message.zoneId = String(object.zoneId); + if (object.zone != null) { + if (typeof object.zone !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateZoneRequest.zone: object expected"); + message.zone = $root.google.cloud.dataplex.v1.Zone.fromObject(object.zone); } if (object.validateOnly != null) message.validateOnly = Boolean(object.validateOnly); @@ -16724,69 +24819,69 @@ }; /** - * Creates a plain object from a CreateLakeRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateZoneRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @memberof google.cloud.dataplex.v1.CreateZoneRequest * @static - * @param {google.cloud.dataplex.v1.CreateLakeRequest} message CreateLakeRequest + * @param {google.cloud.dataplex.v1.CreateZoneRequest} message CreateZoneRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateLakeRequest.toObject = function toObject(message, options) { + CreateZoneRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.lakeId = ""; - object.lake = null; + object.zoneId = ""; + object.zone = null; object.validateOnly = false; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.lakeId != null && message.hasOwnProperty("lakeId")) - object.lakeId = message.lakeId; - if (message.lake != null && message.hasOwnProperty("lake")) - object.lake = $root.google.cloud.dataplex.v1.Lake.toObject(message.lake, options); + if (message.zoneId != null && message.hasOwnProperty("zoneId")) + object.zoneId = message.zoneId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = $root.google.cloud.dataplex.v1.Zone.toObject(message.zone, options); if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) object.validateOnly = message.validateOnly; return object; }; /** - * Converts this CreateLakeRequest to JSON. + * Converts this CreateZoneRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @memberof google.cloud.dataplex.v1.CreateZoneRequest * @instance * @returns {Object.} JSON object */ - CreateLakeRequest.prototype.toJSON = function toJSON() { + CreateZoneRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateLakeRequest; + return CreateZoneRequest; })(); - v1.UpdateLakeRequest = (function() { + v1.UpdateZoneRequest = (function() { /** - * Properties of an UpdateLakeRequest. + * Properties of an UpdateZoneRequest. * @memberof google.cloud.dataplex.v1 - * @interface IUpdateLakeRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateLakeRequest updateMask - * @property {google.cloud.dataplex.v1.ILake|null} [lake] UpdateLakeRequest lake - * @property {boolean|null} [validateOnly] UpdateLakeRequest validateOnly + * @interface IUpdateZoneRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateZoneRequest updateMask + * @property {google.cloud.dataplex.v1.IZone|null} [zone] UpdateZoneRequest zone + * @property {boolean|null} [validateOnly] UpdateZoneRequest validateOnly */ /** - * Constructs a new UpdateLakeRequest. + * Constructs a new UpdateZoneRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an UpdateLakeRequest. - * @implements IUpdateLakeRequest + * @classdesc Represents an UpdateZoneRequest. + * @implements IUpdateZoneRequest * @constructor - * @param {google.cloud.dataplex.v1.IUpdateLakeRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IUpdateZoneRequest=} [properties] Properties to set */ - function UpdateLakeRequest(properties) { + function UpdateZoneRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16794,90 +24889,90 @@ } /** - * UpdateLakeRequest updateMask. + * UpdateZoneRequest updateMask. * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest * @instance */ - UpdateLakeRequest.prototype.updateMask = null; + UpdateZoneRequest.prototype.updateMask = null; /** - * UpdateLakeRequest lake. - * @member {google.cloud.dataplex.v1.ILake|null|undefined} lake - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * UpdateZoneRequest zone. + * @member {google.cloud.dataplex.v1.IZone|null|undefined} zone + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest * @instance */ - UpdateLakeRequest.prototype.lake = null; + UpdateZoneRequest.prototype.zone = null; /** - * UpdateLakeRequest validateOnly. + * UpdateZoneRequest validateOnly. * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest * @instance */ - UpdateLakeRequest.prototype.validateOnly = false; + UpdateZoneRequest.prototype.validateOnly = false; /** - * Creates a new UpdateLakeRequest instance using the specified properties. + * Creates a new UpdateZoneRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest * @static - * @param {google.cloud.dataplex.v1.IUpdateLakeRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest instance + * @param {google.cloud.dataplex.v1.IUpdateZoneRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest instance */ - UpdateLakeRequest.create = function create(properties) { - return new UpdateLakeRequest(properties); + UpdateZoneRequest.create = function create(properties) { + return new UpdateZoneRequest(properties); }; /** - * Encodes the specified UpdateLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateLakeRequest.verify|verify} messages. + * Encodes the specified UpdateZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateZoneRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest * @static - * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} message UpdateLakeRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} message UpdateZoneRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateLakeRequest.encode = function encode(message, writer) { + UpdateZoneRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.lake != null && Object.hasOwnProperty.call(message, "lake")) - $root.google.cloud.dataplex.v1.Lake.encode(message.lake, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + $root.google.cloud.dataplex.v1.Zone.encode(message.zone, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); return writer; }; /** - * Encodes the specified UpdateLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateLakeRequest.verify|verify} messages. + * Encodes the specified UpdateZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateZoneRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest * @static - * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} message UpdateLakeRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} message UpdateZoneRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateLakeRequest message from the specified reader or buffer. + * Decodes an UpdateZoneRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest + * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateLakeRequest.decode = function decode(reader, length) { + UpdateZoneRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateLakeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateZoneRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -16885,7 +24980,7 @@ message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; case 2: - message.lake = $root.google.cloud.dataplex.v1.Lake.decode(reader, reader.uint32()); + message.zone = $root.google.cloud.dataplex.v1.Zone.decode(reader, reader.uint32()); break; case 3: message.validateOnly = reader.bool(); @@ -16899,30 +24994,30 @@ }; /** - * Decodes an UpdateLakeRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateZoneRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest + * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateLakeRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateZoneRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateLakeRequest message. + * Verifies an UpdateZoneRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateLakeRequest.verify = function verify(message) { + UpdateZoneRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.updateMask != null && message.hasOwnProperty("updateMask")) { @@ -16930,10 +25025,10 @@ if (error) return "updateMask." + error; } - if (message.lake != null && message.hasOwnProperty("lake")) { - var error = $root.google.cloud.dataplex.v1.Lake.verify(message.lake); + if (message.zone != null && message.hasOwnProperty("zone")) { + var error = $root.google.cloud.dataplex.v1.Zone.verify(message.zone); if (error) - return "lake." + error; + return "zone." + error; } if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) if (typeof message.validateOnly !== "boolean") @@ -16942,26 +25037,26 @@ }; /** - * Creates an UpdateLakeRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateZoneRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest + * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest */ - UpdateLakeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.UpdateLakeRequest) + UpdateZoneRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateZoneRequest) return object; - var message = new $root.google.cloud.dataplex.v1.UpdateLakeRequest(); + var message = new $root.google.cloud.dataplex.v1.UpdateZoneRequest(); if (object.updateMask != null) { if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateLakeRequest.updateMask: object expected"); + throw TypeError(".google.cloud.dataplex.v1.UpdateZoneRequest.updateMask: object expected"); message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.lake != null) { - if (typeof object.lake !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateLakeRequest.lake: object expected"); - message.lake = $root.google.cloud.dataplex.v1.Lake.fromObject(object.lake); + if (object.zone != null) { + if (typeof object.zone !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateZoneRequest.zone: object expected"); + message.zone = $root.google.cloud.dataplex.v1.Zone.fromObject(object.zone); } if (object.validateOnly != null) message.validateOnly = Boolean(object.validateOnly); @@ -16969,64 +25064,64 @@ }; /** - * Creates a plain object from an UpdateLakeRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateZoneRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest * @static - * @param {google.cloud.dataplex.v1.UpdateLakeRequest} message UpdateLakeRequest + * @param {google.cloud.dataplex.v1.UpdateZoneRequest} message UpdateZoneRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateLakeRequest.toObject = function toObject(message, options) { + UpdateZoneRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.updateMask = null; - object.lake = null; + object.zone = null; object.validateOnly = false; } if (message.updateMask != null && message.hasOwnProperty("updateMask")) object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.lake != null && message.hasOwnProperty("lake")) - object.lake = $root.google.cloud.dataplex.v1.Lake.toObject(message.lake, options); + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = $root.google.cloud.dataplex.v1.Zone.toObject(message.zone, options); if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) object.validateOnly = message.validateOnly; return object; }; /** - * Converts this UpdateLakeRequest to JSON. + * Converts this UpdateZoneRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest * @instance * @returns {Object.} JSON object */ - UpdateLakeRequest.prototype.toJSON = function toJSON() { + UpdateZoneRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateLakeRequest; + return UpdateZoneRequest; })(); - v1.DeleteLakeRequest = (function() { + v1.DeleteZoneRequest = (function() { /** - * Properties of a DeleteLakeRequest. + * Properties of a DeleteZoneRequest. * @memberof google.cloud.dataplex.v1 - * @interface IDeleteLakeRequest - * @property {string|null} [name] DeleteLakeRequest name + * @interface IDeleteZoneRequest + * @property {string|null} [name] DeleteZoneRequest name */ /** - * Constructs a new DeleteLakeRequest. + * Constructs a new DeleteZoneRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DeleteLakeRequest. - * @implements IDeleteLakeRequest + * @classdesc Represents a DeleteZoneRequest. + * @implements IDeleteZoneRequest * @constructor - * @param {google.cloud.dataplex.v1.IDeleteLakeRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IDeleteZoneRequest=} [properties] Properties to set */ - function DeleteLakeRequest(properties) { + function DeleteZoneRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17034,35 +25129,35 @@ } /** - * DeleteLakeRequest name. + * DeleteZoneRequest name. * @member {string} name - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest * @instance */ - DeleteLakeRequest.prototype.name = ""; + DeleteZoneRequest.prototype.name = ""; /** - * Creates a new DeleteLakeRequest instance using the specified properties. + * Creates a new DeleteZoneRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest * @static - * @param {google.cloud.dataplex.v1.IDeleteLakeRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest instance + * @param {google.cloud.dataplex.v1.IDeleteZoneRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest instance */ - DeleteLakeRequest.create = function create(properties) { - return new DeleteLakeRequest(properties); + DeleteZoneRequest.create = function create(properties) { + return new DeleteZoneRequest(properties); }; /** - * Encodes the specified DeleteLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteLakeRequest.verify|verify} messages. + * Encodes the specified DeleteZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteZoneRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest * @static - * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} message DeleteLakeRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} message DeleteZoneRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteLakeRequest.encode = function encode(message, writer) { + DeleteZoneRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -17071,33 +25166,33 @@ }; /** - * Encodes the specified DeleteLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteLakeRequest.verify|verify} messages. + * Encodes the specified DeleteZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteZoneRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest * @static - * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} message DeleteLakeRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} message DeleteZoneRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteLakeRequest message from the specified reader or buffer. + * Decodes a DeleteZoneRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest + * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteLakeRequest.decode = function decode(reader, length) { + DeleteZoneRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteLakeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteZoneRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -17113,30 +25208,30 @@ }; /** - * Decodes a DeleteLakeRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteZoneRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest + * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteLakeRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteZoneRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteLakeRequest message. + * Verifies a DeleteZoneRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteLakeRequest.verify = function verify(message) { + DeleteZoneRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -17146,32 +25241,32 @@ }; /** - * Creates a DeleteLakeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteZoneRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest + * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest */ - DeleteLakeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DeleteLakeRequest) + DeleteZoneRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteZoneRequest) return object; - var message = new $root.google.cloud.dataplex.v1.DeleteLakeRequest(); + var message = new $root.google.cloud.dataplex.v1.DeleteZoneRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a DeleteLakeRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteZoneRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest * @static - * @param {google.cloud.dataplex.v1.DeleteLakeRequest} message DeleteLakeRequest + * @param {google.cloud.dataplex.v1.DeleteZoneRequest} message DeleteZoneRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteLakeRequest.toObject = function toObject(message, options) { + DeleteZoneRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -17183,41 +25278,41 @@ }; /** - * Converts this DeleteLakeRequest to JSON. + * Converts this DeleteZoneRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest * @instance * @returns {Object.} JSON object */ - DeleteLakeRequest.prototype.toJSON = function toJSON() { + DeleteZoneRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteLakeRequest; + return DeleteZoneRequest; })(); - v1.ListLakesRequest = (function() { + v1.ListZonesRequest = (function() { /** - * Properties of a ListLakesRequest. + * Properties of a ListZonesRequest. * @memberof google.cloud.dataplex.v1 - * @interface IListLakesRequest - * @property {string|null} [parent] ListLakesRequest parent - * @property {number|null} [pageSize] ListLakesRequest pageSize - * @property {string|null} [pageToken] ListLakesRequest pageToken - * @property {string|null} [filter] ListLakesRequest filter - * @property {string|null} [orderBy] ListLakesRequest orderBy + * @interface IListZonesRequest + * @property {string|null} [parent] ListZonesRequest parent + * @property {number|null} [pageSize] ListZonesRequest pageSize + * @property {string|null} [pageToken] ListZonesRequest pageToken + * @property {string|null} [filter] ListZonesRequest filter + * @property {string|null} [orderBy] ListZonesRequest orderBy */ /** - * Constructs a new ListLakesRequest. + * Constructs a new ListZonesRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListLakesRequest. - * @implements IListLakesRequest + * @classdesc Represents a ListZonesRequest. + * @implements IListZonesRequest * @constructor - * @param {google.cloud.dataplex.v1.IListLakesRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IListZonesRequest=} [properties] Properties to set */ - function ListLakesRequest(properties) { + function ListZonesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17225,67 +25320,67 @@ } /** - * ListLakesRequest parent. + * ListZonesRequest parent. * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @instance */ - ListLakesRequest.prototype.parent = ""; + ListZonesRequest.prototype.parent = ""; /** - * ListLakesRequest pageSize. + * ListZonesRequest pageSize. * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @instance */ - ListLakesRequest.prototype.pageSize = 0; + ListZonesRequest.prototype.pageSize = 0; /** - * ListLakesRequest pageToken. + * ListZonesRequest pageToken. * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @instance */ - ListLakesRequest.prototype.pageToken = ""; + ListZonesRequest.prototype.pageToken = ""; /** - * ListLakesRequest filter. + * ListZonesRequest filter. * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @instance */ - ListLakesRequest.prototype.filter = ""; + ListZonesRequest.prototype.filter = ""; /** - * ListLakesRequest orderBy. + * ListZonesRequest orderBy. * @member {string} orderBy - * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @instance */ - ListLakesRequest.prototype.orderBy = ""; + ListZonesRequest.prototype.orderBy = ""; /** - * Creates a new ListLakesRequest instance using the specified properties. + * Creates a new ListZonesRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @static - * @param {google.cloud.dataplex.v1.IListLakesRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest instance + * @param {google.cloud.dataplex.v1.IListZonesRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest instance */ - ListLakesRequest.create = function create(properties) { - return new ListLakesRequest(properties); + ListZonesRequest.create = function create(properties) { + return new ListZonesRequest(properties); }; /** - * Encodes the specified ListLakesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesRequest.verify|verify} messages. + * Encodes the specified ListZonesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @static - * @param {google.cloud.dataplex.v1.IListLakesRequest} message ListLakesRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListZonesRequest} message ListZonesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLakesRequest.encode = function encode(message, writer) { + ListZonesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) @@ -17302,33 +25397,33 @@ }; /** - * Encodes the specified ListLakesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesRequest.verify|verify} messages. + * Encodes the specified ListZonesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @static - * @param {google.cloud.dataplex.v1.IListLakesRequest} message ListLakesRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListZonesRequest} message ListZonesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLakesRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListZonesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListLakesRequest message from the specified reader or buffer. + * Decodes a ListZonesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest + * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLakesRequest.decode = function decode(reader, length) { + ListZonesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListLakesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListZonesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -17356,30 +25451,30 @@ }; /** - * Decodes a ListLakesRequest message from the specified reader or buffer, length delimited. + * Decodes a ListZonesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest + * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLakesRequest.decodeDelimited = function decodeDelimited(reader) { + ListZonesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListLakesRequest message. + * Verifies a ListZonesRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListLakesRequest.verify = function verify(message) { + ListZonesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) @@ -17401,17 +25496,17 @@ }; /** - * Creates a ListLakesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListZonesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest + * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest */ - ListLakesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListLakesRequest) + ListZonesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListZonesRequest) return object; - var message = new $root.google.cloud.dataplex.v1.ListLakesRequest(); + var message = new $root.google.cloud.dataplex.v1.ListZonesRequest(); if (object.parent != null) message.parent = String(object.parent); if (object.pageSize != null) @@ -17426,15 +25521,15 @@ }; /** - * Creates a plain object from a ListLakesRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListZonesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @static - * @param {google.cloud.dataplex.v1.ListLakesRequest} message ListLakesRequest + * @param {google.cloud.dataplex.v1.ListZonesRequest} message ListZonesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListLakesRequest.toObject = function toObject(message, options) { + ListZonesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -17459,41 +25554,39 @@ }; /** - * Converts this ListLakesRequest to JSON. + * Converts this ListZonesRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @instance * @returns {Object.} JSON object */ - ListLakesRequest.prototype.toJSON = function toJSON() { + ListZonesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListLakesRequest; + return ListZonesRequest; })(); - v1.ListLakesResponse = (function() { + v1.ListZonesResponse = (function() { /** - * Properties of a ListLakesResponse. + * Properties of a ListZonesResponse. * @memberof google.cloud.dataplex.v1 - * @interface IListLakesResponse - * @property {Array.|null} [lakes] ListLakesResponse lakes - * @property {string|null} [nextPageToken] ListLakesResponse nextPageToken - * @property {Array.|null} [unreachableLocations] ListLakesResponse unreachableLocations + * @interface IListZonesResponse + * @property {Array.|null} [zones] ListZonesResponse zones + * @property {string|null} [nextPageToken] ListZonesResponse nextPageToken */ /** - * Constructs a new ListLakesResponse. + * Constructs a new ListZonesResponse. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListLakesResponse. - * @implements IListLakesResponse + * @classdesc Represents a ListZonesResponse. + * @implements IListZonesResponse * @constructor - * @param {google.cloud.dataplex.v1.IListLakesResponse=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IListZonesResponse=} [properties] Properties to set */ - function ListLakesResponse(properties) { - this.lakes = []; - this.unreachableLocations = []; + function ListZonesResponse(properties) { + this.zones = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17501,108 +25594,92 @@ } /** - * ListLakesResponse lakes. - * @member {Array.} lakes - * @memberof google.cloud.dataplex.v1.ListLakesResponse + * ListZonesResponse zones. + * @member {Array.} zones + * @memberof google.cloud.dataplex.v1.ListZonesResponse * @instance */ - ListLakesResponse.prototype.lakes = $util.emptyArray; + ListZonesResponse.prototype.zones = $util.emptyArray; /** - * ListLakesResponse nextPageToken. + * ListZonesResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @instance - */ - ListLakesResponse.prototype.nextPageToken = ""; - - /** - * ListLakesResponse unreachableLocations. - * @member {Array.} unreachableLocations - * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @memberof google.cloud.dataplex.v1.ListZonesResponse * @instance */ - ListLakesResponse.prototype.unreachableLocations = $util.emptyArray; + ListZonesResponse.prototype.nextPageToken = ""; /** - * Creates a new ListLakesResponse instance using the specified properties. + * Creates a new ListZonesResponse instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @memberof google.cloud.dataplex.v1.ListZonesResponse * @static - * @param {google.cloud.dataplex.v1.IListLakesResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse instance + * @param {google.cloud.dataplex.v1.IListZonesResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse instance */ - ListLakesResponse.create = function create(properties) { - return new ListLakesResponse(properties); + ListZonesResponse.create = function create(properties) { + return new ListZonesResponse(properties); }; /** - * Encodes the specified ListLakesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesResponse.verify|verify} messages. + * Encodes the specified ListZonesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @memberof google.cloud.dataplex.v1.ListZonesResponse * @static - * @param {google.cloud.dataplex.v1.IListLakesResponse} message ListLakesResponse message or plain object to encode + * @param {google.cloud.dataplex.v1.IListZonesResponse} message ListZonesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLakesResponse.encode = function encode(message, writer) { + ListZonesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.lakes != null && message.lakes.length) - for (var i = 0; i < message.lakes.length; ++i) - $root.google.cloud.dataplex.v1.Lake.encode(message.lakes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.zones != null && message.zones.length) + for (var i = 0; i < message.zones.length; ++i) + $root.google.cloud.dataplex.v1.Zone.encode(message.zones[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachableLocations != null && message.unreachableLocations.length) - for (var i = 0; i < message.unreachableLocations.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachableLocations[i]); return writer; }; /** - * Encodes the specified ListLakesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesResponse.verify|verify} messages. + * Encodes the specified ListZonesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @memberof google.cloud.dataplex.v1.ListZonesResponse * @static - * @param {google.cloud.dataplex.v1.IListLakesResponse} message ListLakesResponse message or plain object to encode + * @param {google.cloud.dataplex.v1.IListZonesResponse} message ListZonesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLakesResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListZonesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListLakesResponse message from the specified reader or buffer. + * Decodes a ListZonesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @memberof google.cloud.dataplex.v1.ListZonesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse + * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLakesResponse.decode = function decode(reader, length) { + ListZonesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListLakesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListZonesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.lakes && message.lakes.length)) - message.lakes = []; - message.lakes.push($root.google.cloud.dataplex.v1.Lake.decode(reader, reader.uint32())); + if (!(message.zones && message.zones.length)) + message.zones = []; + message.zones.push($root.google.cloud.dataplex.v1.Zone.decode(reader, reader.uint32())); break; case 2: message.nextPageToken = reader.string(); break; - case 3: - if (!(message.unreachableLocations && message.unreachableLocations.length)) - message.unreachableLocations = []; - message.unreachableLocations.push(reader.string()); - break; default: reader.skipType(tag & 7); break; @@ -17612,156 +25689,135 @@ }; /** - * Decodes a ListLakesResponse message from the specified reader or buffer, length delimited. + * Decodes a ListZonesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @memberof google.cloud.dataplex.v1.ListZonesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse + * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLakesResponse.decodeDelimited = function decodeDelimited(reader) { + ListZonesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListLakesResponse message. + * Verifies a ListZonesResponse message. * @function verify - * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @memberof google.cloud.dataplex.v1.ListZonesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListLakesResponse.verify = function verify(message) { + ListZonesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.lakes != null && message.hasOwnProperty("lakes")) { - if (!Array.isArray(message.lakes)) - return "lakes: array expected"; - for (var i = 0; i < message.lakes.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Lake.verify(message.lakes[i]); + if (message.zones != null && message.hasOwnProperty("zones")) { + if (!Array.isArray(message.zones)) + return "zones: array expected"; + for (var i = 0; i < message.zones.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Zone.verify(message.zones[i]); if (error) - return "lakes." + error; + return "zones." + error; } } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) if (!$util.isString(message.nextPageToken)) return "nextPageToken: string expected"; - if (message.unreachableLocations != null && message.hasOwnProperty("unreachableLocations")) { - if (!Array.isArray(message.unreachableLocations)) - return "unreachableLocations: array expected"; - for (var i = 0; i < message.unreachableLocations.length; ++i) - if (!$util.isString(message.unreachableLocations[i])) - return "unreachableLocations: string[] expected"; - } return null; }; /** - * Creates a ListLakesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListZonesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @memberof google.cloud.dataplex.v1.ListZonesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse + * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse */ - ListLakesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListLakesResponse) + ListZonesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListZonesResponse) return object; - var message = new $root.google.cloud.dataplex.v1.ListLakesResponse(); - if (object.lakes) { - if (!Array.isArray(object.lakes)) - throw TypeError(".google.cloud.dataplex.v1.ListLakesResponse.lakes: array expected"); - message.lakes = []; - for (var i = 0; i < object.lakes.length; ++i) { - if (typeof object.lakes[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListLakesResponse.lakes: object expected"); - message.lakes[i] = $root.google.cloud.dataplex.v1.Lake.fromObject(object.lakes[i]); + var message = new $root.google.cloud.dataplex.v1.ListZonesResponse(); + if (object.zones) { + if (!Array.isArray(object.zones)) + throw TypeError(".google.cloud.dataplex.v1.ListZonesResponse.zones: array expected"); + message.zones = []; + for (var i = 0; i < object.zones.length; ++i) { + if (typeof object.zones[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListZonesResponse.zones: object expected"); + message.zones[i] = $root.google.cloud.dataplex.v1.Zone.fromObject(object.zones[i]); } } if (object.nextPageToken != null) message.nextPageToken = String(object.nextPageToken); - if (object.unreachableLocations) { - if (!Array.isArray(object.unreachableLocations)) - throw TypeError(".google.cloud.dataplex.v1.ListLakesResponse.unreachableLocations: array expected"); - message.unreachableLocations = []; - for (var i = 0; i < object.unreachableLocations.length; ++i) - message.unreachableLocations[i] = String(object.unreachableLocations[i]); - } return message; }; /** - * Creates a plain object from a ListLakesResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListZonesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @memberof google.cloud.dataplex.v1.ListZonesResponse * @static - * @param {google.cloud.dataplex.v1.ListLakesResponse} message ListLakesResponse + * @param {google.cloud.dataplex.v1.ListZonesResponse} message ListZonesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListLakesResponse.toObject = function toObject(message, options) { + ListZonesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.lakes = []; - object.unreachableLocations = []; - } + if (options.arrays || options.defaults) + object.zones = []; if (options.defaults) object.nextPageToken = ""; - if (message.lakes && message.lakes.length) { - object.lakes = []; - for (var j = 0; j < message.lakes.length; ++j) - object.lakes[j] = $root.google.cloud.dataplex.v1.Lake.toObject(message.lakes[j], options); + if (message.zones && message.zones.length) { + object.zones = []; + for (var j = 0; j < message.zones.length; ++j) + object.zones[j] = $root.google.cloud.dataplex.v1.Zone.toObject(message.zones[j], options); } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; - if (message.unreachableLocations && message.unreachableLocations.length) { - object.unreachableLocations = []; - for (var j = 0; j < message.unreachableLocations.length; ++j) - object.unreachableLocations[j] = message.unreachableLocations[j]; - } return object; }; /** - * Converts this ListLakesResponse to JSON. + * Converts this ListZonesResponse to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @memberof google.cloud.dataplex.v1.ListZonesResponse * @instance * @returns {Object.} JSON object */ - ListLakesResponse.prototype.toJSON = function toJSON() { + ListZonesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListLakesResponse; + return ListZonesResponse; })(); - v1.ListLakeActionsRequest = (function() { + v1.ListZoneActionsRequest = (function() { /** - * Properties of a ListLakeActionsRequest. + * Properties of a ListZoneActionsRequest. * @memberof google.cloud.dataplex.v1 - * @interface IListLakeActionsRequest - * @property {string|null} [parent] ListLakeActionsRequest parent - * @property {number|null} [pageSize] ListLakeActionsRequest pageSize - * @property {string|null} [pageToken] ListLakeActionsRequest pageToken + * @interface IListZoneActionsRequest + * @property {string|null} [parent] ListZoneActionsRequest parent + * @property {number|null} [pageSize] ListZoneActionsRequest pageSize + * @property {string|null} [pageToken] ListZoneActionsRequest pageToken */ /** - * Constructs a new ListLakeActionsRequest. + * Constructs a new ListZoneActionsRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListLakeActionsRequest. - * @implements IListLakeActionsRequest + * @classdesc Represents a ListZoneActionsRequest. + * @implements IListZoneActionsRequest * @constructor - * @param {google.cloud.dataplex.v1.IListLakeActionsRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IListZoneActionsRequest=} [properties] Properties to set */ - function ListLakeActionsRequest(properties) { + function ListZoneActionsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17769,51 +25825,51 @@ } /** - * ListLakeActionsRequest parent. + * ListZoneActionsRequest parent. * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest * @instance */ - ListLakeActionsRequest.prototype.parent = ""; + ListZoneActionsRequest.prototype.parent = ""; /** - * ListLakeActionsRequest pageSize. + * ListZoneActionsRequest pageSize. * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest * @instance */ - ListLakeActionsRequest.prototype.pageSize = 0; + ListZoneActionsRequest.prototype.pageSize = 0; /** - * ListLakeActionsRequest pageToken. + * ListZoneActionsRequest pageToken. * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest * @instance */ - ListLakeActionsRequest.prototype.pageToken = ""; + ListZoneActionsRequest.prototype.pageToken = ""; /** - * Creates a new ListLakeActionsRequest instance using the specified properties. + * Creates a new ListZoneActionsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest * @static - * @param {google.cloud.dataplex.v1.IListLakeActionsRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest instance + * @param {google.cloud.dataplex.v1.IListZoneActionsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest instance */ - ListLakeActionsRequest.create = function create(properties) { - return new ListLakeActionsRequest(properties); + ListZoneActionsRequest.create = function create(properties) { + return new ListZoneActionsRequest(properties); }; /** - * Encodes the specified ListLakeActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakeActionsRequest.verify|verify} messages. + * Encodes the specified ListZoneActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListZoneActionsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest * @static - * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} message ListLakeActionsRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} message ListZoneActionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLakeActionsRequest.encode = function encode(message, writer) { + ListZoneActionsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) @@ -17826,33 +25882,33 @@ }; /** - * Encodes the specified ListLakeActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakeActionsRequest.verify|verify} messages. + * Encodes the specified ListZoneActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZoneActionsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest * @static - * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} message ListLakeActionsRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} message ListZoneActionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLakeActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListZoneActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListLakeActionsRequest message from the specified reader or buffer. + * Decodes a ListZoneActionsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest + * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLakeActionsRequest.decode = function decode(reader, length) { + ListZoneActionsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListLakeActionsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListZoneActionsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -17874,30 +25930,30 @@ }; /** - * Decodes a ListLakeActionsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListZoneActionsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest + * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLakeActionsRequest.decodeDelimited = function decodeDelimited(reader) { + ListZoneActionsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListLakeActionsRequest message. + * Verifies a ListZoneActionsRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListLakeActionsRequest.verify = function verify(message) { + ListZoneActionsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) @@ -17913,17 +25969,17 @@ }; /** - * Creates a ListLakeActionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListZoneActionsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest + * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest */ - ListLakeActionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListLakeActionsRequest) + ListZoneActionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListZoneActionsRequest) return object; - var message = new $root.google.cloud.dataplex.v1.ListLakeActionsRequest(); + var message = new $root.google.cloud.dataplex.v1.ListZoneActionsRequest(); if (object.parent != null) message.parent = String(object.parent); if (object.pageSize != null) @@ -17934,15 +25990,15 @@ }; /** - * Creates a plain object from a ListLakeActionsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListZoneActionsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest * @static - * @param {google.cloud.dataplex.v1.ListLakeActionsRequest} message ListLakeActionsRequest + * @param {google.cloud.dataplex.v1.ListZoneActionsRequest} message ListZoneActionsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListLakeActionsRequest.toObject = function toObject(message, options) { + ListZoneActionsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -17961,39 +26017,37 @@ }; /** - * Converts this ListLakeActionsRequest to JSON. + * Converts this ListZoneActionsRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest * @instance * @returns {Object.} JSON object */ - ListLakeActionsRequest.prototype.toJSON = function toJSON() { + ListZoneActionsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListLakeActionsRequest; + return ListZoneActionsRequest; })(); - v1.ListActionsResponse = (function() { + v1.GetZoneRequest = (function() { /** - * Properties of a ListActionsResponse. + * Properties of a GetZoneRequest. * @memberof google.cloud.dataplex.v1 - * @interface IListActionsResponse - * @property {Array.|null} [actions] ListActionsResponse actions - * @property {string|null} [nextPageToken] ListActionsResponse nextPageToken + * @interface IGetZoneRequest + * @property {string|null} [name] GetZoneRequest name */ /** - * Constructs a new ListActionsResponse. + * Constructs a new GetZoneRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListActionsResponse. - * @implements IListActionsResponse + * @classdesc Represents a GetZoneRequest. + * @implements IGetZoneRequest * @constructor - * @param {google.cloud.dataplex.v1.IListActionsResponse=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IGetZoneRequest=} [properties] Properties to set */ - function ListActionsResponse(properties) { - this.actions = []; + function GetZoneRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18001,91 +26055,75 @@ } /** - * ListActionsResponse actions. - * @member {Array.} actions - * @memberof google.cloud.dataplex.v1.ListActionsResponse - * @instance - */ - ListActionsResponse.prototype.actions = $util.emptyArray; - - /** - * ListActionsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListActionsResponse + * GetZoneRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetZoneRequest * @instance */ - ListActionsResponse.prototype.nextPageToken = ""; + GetZoneRequest.prototype.name = ""; /** - * Creates a new ListActionsResponse instance using the specified properties. + * Creates a new GetZoneRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @memberof google.cloud.dataplex.v1.GetZoneRequest * @static - * @param {google.cloud.dataplex.v1.IListActionsResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse instance + * @param {google.cloud.dataplex.v1.IGetZoneRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest instance */ - ListActionsResponse.create = function create(properties) { - return new ListActionsResponse(properties); + GetZoneRequest.create = function create(properties) { + return new GetZoneRequest(properties); }; /** - * Encodes the specified ListActionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListActionsResponse.verify|verify} messages. + * Encodes the specified GetZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetZoneRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @memberof google.cloud.dataplex.v1.GetZoneRequest * @static - * @param {google.cloud.dataplex.v1.IListActionsResponse} message ListActionsResponse message or plain object to encode + * @param {google.cloud.dataplex.v1.IGetZoneRequest} message GetZoneRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListActionsResponse.encode = function encode(message, writer) { + GetZoneRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.actions != null && message.actions.length) - for (var i = 0; i < message.actions.length; ++i) - $root.google.cloud.dataplex.v1.Action.encode(message.actions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListActionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListActionsResponse.verify|verify} messages. + * Encodes the specified GetZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetZoneRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @memberof google.cloud.dataplex.v1.GetZoneRequest * @static - * @param {google.cloud.dataplex.v1.IListActionsResponse} message ListActionsResponse message or plain object to encode + * @param {google.cloud.dataplex.v1.IGetZoneRequest} message GetZoneRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListActionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListActionsResponse message from the specified reader or buffer. + * Decodes a GetZoneRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @memberof google.cloud.dataplex.v1.GetZoneRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse + * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListActionsResponse.decode = function decode(reader, length) { + GetZoneRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListActionsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.actions && message.actions.length)) - message.actions = []; - message.actions.push($root.google.cloud.dataplex.v1.Action.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetZoneRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -18096,133 +26134,110 @@ }; /** - * Decodes a ListActionsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetZoneRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @memberof google.cloud.dataplex.v1.GetZoneRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse + * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListActionsResponse.decodeDelimited = function decodeDelimited(reader) { + GetZoneRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListActionsResponse message. + * Verifies a GetZoneRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @memberof google.cloud.dataplex.v1.GetZoneRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListActionsResponse.verify = function verify(message) { + GetZoneRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.actions != null && message.hasOwnProperty("actions")) { - if (!Array.isArray(message.actions)) - return "actions: array expected"; - for (var i = 0; i < message.actions.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Action.verify(message.actions[i]); - if (error) - return "actions." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListActionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetZoneRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @memberof google.cloud.dataplex.v1.GetZoneRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse + * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest */ - ListActionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListActionsResponse) + GetZoneRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetZoneRequest) return object; - var message = new $root.google.cloud.dataplex.v1.ListActionsResponse(); - if (object.actions) { - if (!Array.isArray(object.actions)) - throw TypeError(".google.cloud.dataplex.v1.ListActionsResponse.actions: array expected"); - message.actions = []; - for (var i = 0; i < object.actions.length; ++i) { - if (typeof object.actions[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListActionsResponse.actions: object expected"); - message.actions[i] = $root.google.cloud.dataplex.v1.Action.fromObject(object.actions[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.cloud.dataplex.v1.GetZoneRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListActionsResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetZoneRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @memberof google.cloud.dataplex.v1.GetZoneRequest * @static - * @param {google.cloud.dataplex.v1.ListActionsResponse} message ListActionsResponse + * @param {google.cloud.dataplex.v1.GetZoneRequest} message GetZoneRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListActionsResponse.toObject = function toObject(message, options) { + GetZoneRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.actions = []; if (options.defaults) - object.nextPageToken = ""; - if (message.actions && message.actions.length) { - object.actions = []; - for (var j = 0; j < message.actions.length; ++j) - object.actions[j] = $root.google.cloud.dataplex.v1.Action.toObject(message.actions[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListActionsResponse to JSON. + * Converts this GetZoneRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @memberof google.cloud.dataplex.v1.GetZoneRequest * @instance * @returns {Object.} JSON object */ - ListActionsResponse.prototype.toJSON = function toJSON() { + GetZoneRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListActionsResponse; + return GetZoneRequest; })(); - v1.GetLakeRequest = (function() { + v1.CreateAssetRequest = (function() { /** - * Properties of a GetLakeRequest. + * Properties of a CreateAssetRequest. * @memberof google.cloud.dataplex.v1 - * @interface IGetLakeRequest - * @property {string|null} [name] GetLakeRequest name + * @interface ICreateAssetRequest + * @property {string|null} [parent] CreateAssetRequest parent + * @property {string|null} [assetId] CreateAssetRequest assetId + * @property {google.cloud.dataplex.v1.IAsset|null} [asset] CreateAssetRequest asset + * @property {boolean|null} [validateOnly] CreateAssetRequest validateOnly */ /** - * Constructs a new GetLakeRequest. + * Constructs a new CreateAssetRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetLakeRequest. - * @implements IGetLakeRequest + * @classdesc Represents a CreateAssetRequest. + * @implements ICreateAssetRequest * @constructor - * @param {google.cloud.dataplex.v1.IGetLakeRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.ICreateAssetRequest=} [properties] Properties to set */ - function GetLakeRequest(properties) { + function CreateAssetRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18230,75 +26245,114 @@ } /** - * GetLakeRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.GetLakeRequest + * CreateAssetRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreateAssetRequest * @instance */ - GetLakeRequest.prototype.name = ""; + CreateAssetRequest.prototype.parent = ""; /** - * Creates a new GetLakeRequest instance using the specified properties. + * CreateAssetRequest assetId. + * @member {string} assetId + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @instance + */ + CreateAssetRequest.prototype.assetId = ""; + + /** + * CreateAssetRequest asset. + * @member {google.cloud.dataplex.v1.IAsset|null|undefined} asset + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @instance + */ + CreateAssetRequest.prototype.asset = null; + + /** + * CreateAssetRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @instance + */ + CreateAssetRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateAssetRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @memberof google.cloud.dataplex.v1.CreateAssetRequest * @static - * @param {google.cloud.dataplex.v1.IGetLakeRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest instance + * @param {google.cloud.dataplex.v1.ICreateAssetRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest instance */ - GetLakeRequest.create = function create(properties) { - return new GetLakeRequest(properties); + CreateAssetRequest.create = function create(properties) { + return new CreateAssetRequest(properties); }; /** - * Encodes the specified GetLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetLakeRequest.verify|verify} messages. + * Encodes the specified CreateAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateAssetRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @memberof google.cloud.dataplex.v1.CreateAssetRequest * @static - * @param {google.cloud.dataplex.v1.IGetLakeRequest} message GetLakeRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.ICreateAssetRequest} message CreateAssetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetLakeRequest.encode = function encode(message, writer) { + CreateAssetRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.assetId != null && Object.hasOwnProperty.call(message, "assetId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.assetId); + if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) + $root.google.cloud.dataplex.v1.Asset.encode(message.asset, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); return writer; }; /** - * Encodes the specified GetLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetLakeRequest.verify|verify} messages. + * Encodes the specified CreateAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateAssetRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @memberof google.cloud.dataplex.v1.CreateAssetRequest * @static - * @param {google.cloud.dataplex.v1.IGetLakeRequest} message GetLakeRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.ICreateAssetRequest} message CreateAssetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetLakeRequest message from the specified reader or buffer. + * Decodes a CreateAssetRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @memberof google.cloud.dataplex.v1.CreateAssetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest + * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetLakeRequest.decode = function decode(reader, length) { + CreateAssetRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetLakeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateAssetRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.parent = reader.string(); + break; + case 2: + message.assetId = reader.string(); + break; + case 3: + message.asset = $root.google.cloud.dataplex.v1.Asset.decode(reader, reader.uint32()); + break; + case 4: + message.validateOnly = reader.bool(); break; default: reader.skipType(tag & 7); @@ -18309,110 +26363,139 @@ }; /** - * Decodes a GetLakeRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateAssetRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @memberof google.cloud.dataplex.v1.CreateAssetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest + * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetLakeRequest.decodeDelimited = function decodeDelimited(reader) { + CreateAssetRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetLakeRequest message. + * Verifies a CreateAssetRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @memberof google.cloud.dataplex.v1.CreateAssetRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetLakeRequest.verify = function verify(message) { + CreateAssetRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.assetId != null && message.hasOwnProperty("assetId")) + if (!$util.isString(message.assetId)) + return "assetId: string expected"; + if (message.asset != null && message.hasOwnProperty("asset")) { + var error = $root.google.cloud.dataplex.v1.Asset.verify(message.asset); + if (error) + return "asset." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a GetLakeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateAssetRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @memberof google.cloud.dataplex.v1.CreateAssetRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest + * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest */ - GetLakeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetLakeRequest) + CreateAssetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateAssetRequest) return object; - var message = new $root.google.cloud.dataplex.v1.GetLakeRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dataplex.v1.CreateAssetRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.assetId != null) + message.assetId = String(object.assetId); + if (object.asset != null) { + if (typeof object.asset !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateAssetRequest.asset: object expected"); + message.asset = $root.google.cloud.dataplex.v1.Asset.fromObject(object.asset); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a GetLakeRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateAssetRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @memberof google.cloud.dataplex.v1.CreateAssetRequest * @static - * @param {google.cloud.dataplex.v1.GetLakeRequest} message GetLakeRequest + * @param {google.cloud.dataplex.v1.CreateAssetRequest} message CreateAssetRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetLakeRequest.toObject = function toObject(message, options) { + CreateAssetRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.parent = ""; + object.assetId = ""; + object.asset = null; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.assetId != null && message.hasOwnProperty("assetId")) + object.assetId = message.assetId; + if (message.asset != null && message.hasOwnProperty("asset")) + object.asset = $root.google.cloud.dataplex.v1.Asset.toObject(message.asset, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this GetLakeRequest to JSON. + * Converts this CreateAssetRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @memberof google.cloud.dataplex.v1.CreateAssetRequest * @instance * @returns {Object.} JSON object */ - GetLakeRequest.prototype.toJSON = function toJSON() { + CreateAssetRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetLakeRequest; + return CreateAssetRequest; })(); - v1.CreateZoneRequest = (function() { + v1.UpdateAssetRequest = (function() { /** - * Properties of a CreateZoneRequest. + * Properties of an UpdateAssetRequest. * @memberof google.cloud.dataplex.v1 - * @interface ICreateZoneRequest - * @property {string|null} [parent] CreateZoneRequest parent - * @property {string|null} [zoneId] CreateZoneRequest zoneId - * @property {google.cloud.dataplex.v1.IZone|null} [zone] CreateZoneRequest zone - * @property {boolean|null} [validateOnly] CreateZoneRequest validateOnly + * @interface IUpdateAssetRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAssetRequest updateMask + * @property {google.cloud.dataplex.v1.IAsset|null} [asset] UpdateAssetRequest asset + * @property {boolean|null} [validateOnly] UpdateAssetRequest validateOnly */ /** - * Constructs a new CreateZoneRequest. + * Constructs a new UpdateAssetRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CreateZoneRequest. - * @implements ICreateZoneRequest + * @classdesc Represents an UpdateAssetRequest. + * @implements IUpdateAssetRequest * @constructor - * @param {google.cloud.dataplex.v1.ICreateZoneRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IUpdateAssetRequest=} [properties] Properties to set */ - function CreateZoneRequest(properties) { + function UpdateAssetRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18420,113 +26503,100 @@ } /** - * CreateZoneRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.CreateZoneRequest - * @instance - */ - CreateZoneRequest.prototype.parent = ""; - - /** - * CreateZoneRequest zoneId. - * @member {string} zoneId - * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * UpdateAssetRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest * @instance */ - CreateZoneRequest.prototype.zoneId = ""; + UpdateAssetRequest.prototype.updateMask = null; /** - * CreateZoneRequest zone. - * @member {google.cloud.dataplex.v1.IZone|null|undefined} zone - * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * UpdateAssetRequest asset. + * @member {google.cloud.dataplex.v1.IAsset|null|undefined} asset + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest * @instance */ - CreateZoneRequest.prototype.zone = null; + UpdateAssetRequest.prototype.asset = null; /** - * CreateZoneRequest validateOnly. + * UpdateAssetRequest validateOnly. * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest * @instance */ - CreateZoneRequest.prototype.validateOnly = false; + UpdateAssetRequest.prototype.validateOnly = false; /** - * Creates a new CreateZoneRequest instance using the specified properties. + * Creates a new UpdateAssetRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest * @static - * @param {google.cloud.dataplex.v1.ICreateZoneRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest instance + * @param {google.cloud.dataplex.v1.IUpdateAssetRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest instance */ - CreateZoneRequest.create = function create(properties) { - return new CreateZoneRequest(properties); + UpdateAssetRequest.create = function create(properties) { + return new UpdateAssetRequest(properties); }; /** - * Encodes the specified CreateZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateZoneRequest.verify|verify} messages. + * Encodes the specified UpdateAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAssetRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest * @static - * @param {google.cloud.dataplex.v1.ICreateZoneRequest} message CreateZoneRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} message UpdateAssetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateZoneRequest.encode = function encode(message, writer) { + UpdateAssetRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.zoneId != null && Object.hasOwnProperty.call(message, "zoneId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zoneId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - $root.google.cloud.dataplex.v1.Zone.encode(message.zone, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) + $root.google.cloud.dataplex.v1.Asset.encode(message.asset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); return writer; }; /** - * Encodes the specified CreateZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateZoneRequest.verify|verify} messages. + * Encodes the specified UpdateAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAssetRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest * @static - * @param {google.cloud.dataplex.v1.ICreateZoneRequest} message CreateZoneRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} message UpdateAssetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateZoneRequest message from the specified reader or buffer. + * Decodes an UpdateAssetRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest + * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateZoneRequest.decode = function decode(reader, length) { + UpdateAssetRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateZoneRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateAssetRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; case 2: - message.zoneId = reader.string(); + message.asset = $root.google.cloud.dataplex.v1.Asset.decode(reader, reader.uint32()); break; case 3: - message.zone = $root.google.cloud.dataplex.v1.Zone.decode(reader, reader.uint32()); - break; - case 4: message.validateOnly = reader.bool(); break; default: @@ -18538,42 +26608,41 @@ }; /** - * Decodes a CreateZoneRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateAssetRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest + * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateZoneRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateAssetRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateZoneRequest message. + * Verifies an UpdateAssetRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateZoneRequest.verify = function verify(message) { + UpdateAssetRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.zoneId != null && message.hasOwnProperty("zoneId")) - if (!$util.isString(message.zoneId)) - return "zoneId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) { - var error = $root.google.cloud.dataplex.v1.Zone.verify(message.zone); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); if (error) - return "zone." + error; + return "updateMask." + error; + } + if (message.asset != null && message.hasOwnProperty("asset")) { + var error = $root.google.cloud.dataplex.v1.Asset.verify(message.asset); + if (error) + return "asset." + error; } if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) if (typeof message.validateOnly !== "boolean") @@ -18582,25 +26651,26 @@ }; /** - * Creates a CreateZoneRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateAssetRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest + * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest */ - CreateZoneRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.CreateZoneRequest) + UpdateAssetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateAssetRequest) return object; - var message = new $root.google.cloud.dataplex.v1.CreateZoneRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.zoneId != null) - message.zoneId = String(object.zoneId); - if (object.zone != null) { - if (typeof object.zone !== "object") - throw TypeError(".google.cloud.dataplex.v1.CreateZoneRequest.zone: object expected"); - message.zone = $root.google.cloud.dataplex.v1.Zone.fromObject(object.zone); + var message = new $root.google.cloud.dataplex.v1.UpdateAssetRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateAssetRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.asset != null) { + if (typeof object.asset !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateAssetRequest.asset: object expected"); + message.asset = $root.google.cloud.dataplex.v1.Asset.fromObject(object.asset); } if (object.validateOnly != null) message.validateOnly = Boolean(object.validateOnly); @@ -18608,69 +26678,64 @@ }; /** - * Creates a plain object from a CreateZoneRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateAssetRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest * @static - * @param {google.cloud.dataplex.v1.CreateZoneRequest} message CreateZoneRequest + * @param {google.cloud.dataplex.v1.UpdateAssetRequest} message UpdateAssetRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateZoneRequest.toObject = function toObject(message, options) { + UpdateAssetRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.zoneId = ""; - object.zone = null; + object.updateMask = null; + object.asset = null; object.validateOnly = false; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.zoneId != null && message.hasOwnProperty("zoneId")) - object.zoneId = message.zoneId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = $root.google.cloud.dataplex.v1.Zone.toObject(message.zone, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.asset != null && message.hasOwnProperty("asset")) + object.asset = $root.google.cloud.dataplex.v1.Asset.toObject(message.asset, options); if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) object.validateOnly = message.validateOnly; return object; }; /** - * Converts this CreateZoneRequest to JSON. + * Converts this UpdateAssetRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest * @instance * @returns {Object.} JSON object */ - CreateZoneRequest.prototype.toJSON = function toJSON() { + UpdateAssetRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateZoneRequest; + return UpdateAssetRequest; })(); - v1.UpdateZoneRequest = (function() { + v1.DeleteAssetRequest = (function() { /** - * Properties of an UpdateZoneRequest. + * Properties of a DeleteAssetRequest. * @memberof google.cloud.dataplex.v1 - * @interface IUpdateZoneRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateZoneRequest updateMask - * @property {google.cloud.dataplex.v1.IZone|null} [zone] UpdateZoneRequest zone - * @property {boolean|null} [validateOnly] UpdateZoneRequest validateOnly + * @interface IDeleteAssetRequest + * @property {string|null} [name] DeleteAssetRequest name */ /** - * Constructs a new UpdateZoneRequest. + * Constructs a new DeleteAssetRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an UpdateZoneRequest. - * @implements IUpdateZoneRequest + * @classdesc Represents a DeleteAssetRequest. + * @implements IDeleteAssetRequest * @constructor - * @param {google.cloud.dataplex.v1.IUpdateZoneRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IDeleteAssetRequest=} [properties] Properties to set */ - function UpdateZoneRequest(properties) { + function DeleteAssetRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18678,101 +26743,75 @@ } /** - * UpdateZoneRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest - * @instance - */ - UpdateZoneRequest.prototype.updateMask = null; - - /** - * UpdateZoneRequest zone. - * @member {google.cloud.dataplex.v1.IZone|null|undefined} zone - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest - * @instance - */ - UpdateZoneRequest.prototype.zone = null; - - /** - * UpdateZoneRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * DeleteAssetRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest * @instance */ - UpdateZoneRequest.prototype.validateOnly = false; + DeleteAssetRequest.prototype.name = ""; /** - * Creates a new UpdateZoneRequest instance using the specified properties. + * Creates a new DeleteAssetRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest * @static - * @param {google.cloud.dataplex.v1.IUpdateZoneRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest instance + * @param {google.cloud.dataplex.v1.IDeleteAssetRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest instance */ - UpdateZoneRequest.create = function create(properties) { - return new UpdateZoneRequest(properties); + DeleteAssetRequest.create = function create(properties) { + return new DeleteAssetRequest(properties); }; /** - * Encodes the specified UpdateZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateZoneRequest.verify|verify} messages. + * Encodes the specified DeleteAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAssetRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest * @static - * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} message UpdateZoneRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} message DeleteAssetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateZoneRequest.encode = function encode(message, writer) { + DeleteAssetRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - $root.google.cloud.dataplex.v1.Zone.encode(message.zone, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified UpdateZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateZoneRequest.verify|verify} messages. + * Encodes the specified DeleteAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAssetRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest * @static - * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} message UpdateZoneRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} message DeleteAssetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateZoneRequest message from the specified reader or buffer. + * Decodes a DeleteAssetRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest + * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateZoneRequest.decode = function decode(reader, length) { + DeleteAssetRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateZoneRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteAssetRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 2: - message.zone = $root.google.cloud.dataplex.v1.Zone.decode(reader, reader.uint32()); - break; - case 3: - message.validateOnly = reader.bool(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -18783,134 +26822,111 @@ }; /** - * Decodes an UpdateZoneRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteAssetRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest + * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateZoneRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteAssetRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateZoneRequest message. + * Verifies a DeleteAssetRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateZoneRequest.verify = function verify(message) { + DeleteAssetRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.zone != null && message.hasOwnProperty("zone")) { - var error = $root.google.cloud.dataplex.v1.Zone.verify(message.zone); - if (error) - return "zone." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates an UpdateZoneRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteAssetRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest + * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest */ - UpdateZoneRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.UpdateZoneRequest) + DeleteAssetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteAssetRequest) return object; - var message = new $root.google.cloud.dataplex.v1.UpdateZoneRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateZoneRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.zone != null) { - if (typeof object.zone !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateZoneRequest.zone: object expected"); - message.zone = $root.google.cloud.dataplex.v1.Zone.fromObject(object.zone); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); + var message = new $root.google.cloud.dataplex.v1.DeleteAssetRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from an UpdateZoneRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteAssetRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest * @static - * @param {google.cloud.dataplex.v1.UpdateZoneRequest} message UpdateZoneRequest + * @param {google.cloud.dataplex.v1.DeleteAssetRequest} message DeleteAssetRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateZoneRequest.toObject = function toObject(message, options) { + DeleteAssetRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.updateMask = null; - object.zone = null; - object.validateOnly = false; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = $root.google.cloud.dataplex.v1.Zone.toObject(message.zone, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this UpdateZoneRequest to JSON. + * Converts this DeleteAssetRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest * @instance * @returns {Object.} JSON object */ - UpdateZoneRequest.prototype.toJSON = function toJSON() { + DeleteAssetRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateZoneRequest; + return DeleteAssetRequest; })(); - v1.DeleteZoneRequest = (function() { + v1.ListAssetsRequest = (function() { /** - * Properties of a DeleteZoneRequest. + * Properties of a ListAssetsRequest. * @memberof google.cloud.dataplex.v1 - * @interface IDeleteZoneRequest - * @property {string|null} [name] DeleteZoneRequest name + * @interface IListAssetsRequest + * @property {string|null} [parent] ListAssetsRequest parent + * @property {number|null} [pageSize] ListAssetsRequest pageSize + * @property {string|null} [pageToken] ListAssetsRequest pageToken + * @property {string|null} [filter] ListAssetsRequest filter + * @property {string|null} [orderBy] ListAssetsRequest orderBy */ /** - * Constructs a new DeleteZoneRequest. + * Constructs a new ListAssetsRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DeleteZoneRequest. - * @implements IDeleteZoneRequest + * @classdesc Represents a ListAssetsRequest. + * @implements IListAssetsRequest * @constructor - * @param {google.cloud.dataplex.v1.IDeleteZoneRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IListAssetsRequest=} [properties] Properties to set */ - function DeleteZoneRequest(properties) { + function ListAssetsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18918,75 +26934,127 @@ } /** - * DeleteZoneRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * ListAssetsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListAssetsRequest * @instance */ - DeleteZoneRequest.prototype.name = ""; + ListAssetsRequest.prototype.parent = ""; /** - * Creates a new DeleteZoneRequest instance using the specified properties. + * ListAssetsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.pageSize = 0; + + /** + * ListAssetsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.pageToken = ""; + + /** + * ListAssetsRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.filter = ""; + + /** + * ListAssetsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListAssetsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @memberof google.cloud.dataplex.v1.ListAssetsRequest * @static - * @param {google.cloud.dataplex.v1.IDeleteZoneRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest instance + * @param {google.cloud.dataplex.v1.IListAssetsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest instance */ - DeleteZoneRequest.create = function create(properties) { - return new DeleteZoneRequest(properties); + ListAssetsRequest.create = function create(properties) { + return new ListAssetsRequest(properties); }; /** - * Encodes the specified DeleteZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteZoneRequest.verify|verify} messages. + * Encodes the specified ListAssetsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @memberof google.cloud.dataplex.v1.ListAssetsRequest * @static - * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} message DeleteZoneRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListAssetsRequest} message ListAssetsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteZoneRequest.encode = function encode(message, writer) { + ListAssetsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; /** - * Encodes the specified DeleteZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteZoneRequest.verify|verify} messages. + * Encodes the specified ListAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @memberof google.cloud.dataplex.v1.ListAssetsRequest * @static - * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} message DeleteZoneRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListAssetsRequest} message ListAssetsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListAssetsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteZoneRequest message from the specified reader or buffer. + * Decodes a ListAssetsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @memberof google.cloud.dataplex.v1.ListAssetsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest + * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteZoneRequest.decode = function decode(reader, length) { + ListAssetsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteZoneRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListAssetsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 4: + message.filter = reader.string(); + break; + case 5: + message.orderBy = reader.string(); break; default: reader.skipType(tag & 7); @@ -18997,111 +27065,142 @@ }; /** - * Decodes a DeleteZoneRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAssetsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @memberof google.cloud.dataplex.v1.ListAssetsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest + * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteZoneRequest.decodeDelimited = function decodeDelimited(reader) { + ListAssetsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteZoneRequest message. + * Verifies a ListAssetsRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @memberof google.cloud.dataplex.v1.ListAssetsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteZoneRequest.verify = function verify(message) { + ListAssetsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; return null; }; /** - * Creates a DeleteZoneRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListAssetsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @memberof google.cloud.dataplex.v1.ListAssetsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest + * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest */ - DeleteZoneRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DeleteZoneRequest) + ListAssetsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListAssetsRequest) return object; - var message = new $root.google.cloud.dataplex.v1.DeleteZoneRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dataplex.v1.ListAssetsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); return message; }; /** - * Creates a plain object from a DeleteZoneRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListAssetsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @memberof google.cloud.dataplex.v1.ListAssetsRequest * @static - * @param {google.cloud.dataplex.v1.DeleteZoneRequest} message DeleteZoneRequest + * @param {google.cloud.dataplex.v1.ListAssetsRequest} message ListAssetsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteZoneRequest.toObject = function toObject(message, options) { + ListAssetsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; return object; }; /** - * Converts this DeleteZoneRequest to JSON. + * Converts this ListAssetsRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @memberof google.cloud.dataplex.v1.ListAssetsRequest * @instance * @returns {Object.} JSON object */ - DeleteZoneRequest.prototype.toJSON = function toJSON() { + ListAssetsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteZoneRequest; + return ListAssetsRequest; })(); - v1.ListZonesRequest = (function() { + v1.ListAssetsResponse = (function() { /** - * Properties of a ListZonesRequest. + * Properties of a ListAssetsResponse. * @memberof google.cloud.dataplex.v1 - * @interface IListZonesRequest - * @property {string|null} [parent] ListZonesRequest parent - * @property {number|null} [pageSize] ListZonesRequest pageSize - * @property {string|null} [pageToken] ListZonesRequest pageToken - * @property {string|null} [filter] ListZonesRequest filter - * @property {string|null} [orderBy] ListZonesRequest orderBy + * @interface IListAssetsResponse + * @property {Array.|null} [assets] ListAssetsResponse assets + * @property {string|null} [nextPageToken] ListAssetsResponse nextPageToken */ /** - * Constructs a new ListZonesRequest. + * Constructs a new ListAssetsResponse. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListZonesRequest. - * @implements IListZonesRequest + * @classdesc Represents a ListAssetsResponse. + * @implements IListAssetsResponse * @constructor - * @param {google.cloud.dataplex.v1.IListZonesRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IListAssetsResponse=} [properties] Properties to set */ - function ListZonesRequest(properties) { + function ListAssetsResponse(properties) { + this.assets = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19109,127 +27208,91 @@ } /** - * ListZonesRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListZonesRequest - * @instance - */ - ListZonesRequest.prototype.parent = ""; - - /** - * ListZonesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListZonesRequest - * @instance - */ - ListZonesRequest.prototype.pageSize = 0; - - /** - * ListZonesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListZonesRequest - * @instance - */ - ListZonesRequest.prototype.pageToken = ""; - - /** - * ListZonesRequest filter. - * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListZonesRequest + * ListAssetsResponse assets. + * @member {Array.} assets + * @memberof google.cloud.dataplex.v1.ListAssetsResponse * @instance */ - ListZonesRequest.prototype.filter = ""; + ListAssetsResponse.prototype.assets = $util.emptyArray; /** - * ListZonesRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.dataplex.v1.ListZonesRequest + * ListAssetsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListAssetsResponse * @instance */ - ListZonesRequest.prototype.orderBy = ""; + ListAssetsResponse.prototype.nextPageToken = ""; /** - * Creates a new ListZonesRequest instance using the specified properties. + * Creates a new ListAssetsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @memberof google.cloud.dataplex.v1.ListAssetsResponse * @static - * @param {google.cloud.dataplex.v1.IListZonesRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest instance + * @param {google.cloud.dataplex.v1.IListAssetsResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse instance */ - ListZonesRequest.create = function create(properties) { - return new ListZonesRequest(properties); + ListAssetsResponse.create = function create(properties) { + return new ListAssetsResponse(properties); }; /** - * Encodes the specified ListZonesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesRequest.verify|verify} messages. + * Encodes the specified ListAssetsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @memberof google.cloud.dataplex.v1.ListAssetsResponse * @static - * @param {google.cloud.dataplex.v1.IListZonesRequest} message ListZonesRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListAssetsResponse} message ListAssetsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListZonesRequest.encode = function encode(message, writer) { + ListAssetsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + if (message.assets != null && message.assets.length) + for (var i = 0; i < message.assets.length; ++i) + $root.google.cloud.dataplex.v1.Asset.encode(message.assets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified ListZonesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesRequest.verify|verify} messages. + * Encodes the specified ListAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @memberof google.cloud.dataplex.v1.ListAssetsResponse * @static - * @param {google.cloud.dataplex.v1.IListZonesRequest} message ListZonesRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListAssetsResponse} message ListAssetsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListZonesRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListAssetsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListZonesRequest message from the specified reader or buffer. + * Decodes a ListAssetsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @memberof google.cloud.dataplex.v1.ListAssetsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest + * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListZonesRequest.decode = function decode(reader, length) { + ListAssetsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListZonesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListAssetsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - case 4: - message.filter = reader.string(); + case 1: + if (!(message.assets && message.assets.length)) + message.assets = []; + message.assets.push($root.google.cloud.dataplex.v1.Asset.decode(reader, reader.uint32())); break; - case 5: - message.orderBy = reader.string(); + case 2: + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -19240,142 +27303,135 @@ }; /** - * Decodes a ListZonesRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAssetsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @memberof google.cloud.dataplex.v1.ListAssetsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest + * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListZonesRequest.decodeDelimited = function decodeDelimited(reader) { + ListAssetsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListZonesRequest message. + * Verifies a ListAssetsResponse message. * @function verify - * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @memberof google.cloud.dataplex.v1.ListAssetsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListZonesRequest.verify = function verify(message) { + ListAssetsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; + if (message.assets != null && message.hasOwnProperty("assets")) { + if (!Array.isArray(message.assets)) + return "assets: array expected"; + for (var i = 0; i < message.assets.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Asset.verify(message.assets[i]); + if (error) + return "assets." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a ListZonesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListAssetsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @memberof google.cloud.dataplex.v1.ListAssetsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest + * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse */ - ListZonesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListZonesRequest) + ListAssetsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListAssetsResponse) return object; - var message = new $root.google.cloud.dataplex.v1.ListZonesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); + var message = new $root.google.cloud.dataplex.v1.ListAssetsResponse(); + if (object.assets) { + if (!Array.isArray(object.assets)) + throw TypeError(".google.cloud.dataplex.v1.ListAssetsResponse.assets: array expected"); + message.assets = []; + for (var i = 0; i < object.assets.length; ++i) { + if (typeof object.assets[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListAssetsResponse.assets: object expected"); + message.assets[i] = $root.google.cloud.dataplex.v1.Asset.fromObject(object.assets[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListZonesRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListAssetsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @memberof google.cloud.dataplex.v1.ListAssetsResponse * @static - * @param {google.cloud.dataplex.v1.ListZonesRequest} message ListZonesRequest + * @param {google.cloud.dataplex.v1.ListAssetsResponse} message ListAssetsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListZonesRequest.toObject = function toObject(message, options) { + ListAssetsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; + if (options.arrays || options.defaults) + object.assets = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.assets && message.assets.length) { + object.assets = []; + for (var j = 0; j < message.assets.length; ++j) + object.assets[j] = $root.google.cloud.dataplex.v1.Asset.toObject(message.assets[j], options); } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ListZonesRequest to JSON. + * Converts this ListAssetsResponse to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @memberof google.cloud.dataplex.v1.ListAssetsResponse * @instance * @returns {Object.} JSON object */ - ListZonesRequest.prototype.toJSON = function toJSON() { + ListAssetsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListZonesRequest; + return ListAssetsResponse; })(); - v1.ListZonesResponse = (function() { + v1.ListAssetActionsRequest = (function() { /** - * Properties of a ListZonesResponse. + * Properties of a ListAssetActionsRequest. * @memberof google.cloud.dataplex.v1 - * @interface IListZonesResponse - * @property {Array.|null} [zones] ListZonesResponse zones - * @property {string|null} [nextPageToken] ListZonesResponse nextPageToken + * @interface IListAssetActionsRequest + * @property {string|null} [parent] ListAssetActionsRequest parent + * @property {number|null} [pageSize] ListAssetActionsRequest pageSize + * @property {string|null} [pageToken] ListAssetActionsRequest pageToken */ /** - * Constructs a new ListZonesResponse. + * Constructs a new ListAssetActionsRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListZonesResponse. - * @implements IListZonesResponse + * @classdesc Represents a ListAssetActionsRequest. + * @implements IListAssetActionsRequest * @constructor - * @param {google.cloud.dataplex.v1.IListZonesResponse=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IListAssetActionsRequest=} [properties] Properties to set */ - function ListZonesResponse(properties) { - this.zones = []; + function ListAssetActionsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19383,91 +27439,101 @@ } /** - * ListZonesResponse zones. - * @member {Array.} zones - * @memberof google.cloud.dataplex.v1.ListZonesResponse + * ListAssetActionsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest * @instance */ - ListZonesResponse.prototype.zones = $util.emptyArray; + ListAssetActionsRequest.prototype.parent = ""; /** - * ListZonesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListZonesResponse + * ListAssetActionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest * @instance */ - ListZonesResponse.prototype.nextPageToken = ""; + ListAssetActionsRequest.prototype.pageSize = 0; /** - * Creates a new ListZonesResponse instance using the specified properties. + * ListAssetActionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @instance + */ + ListAssetActionsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListAssetActionsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest * @static - * @param {google.cloud.dataplex.v1.IListZonesResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse instance + * @param {google.cloud.dataplex.v1.IListAssetActionsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest instance */ - ListZonesResponse.create = function create(properties) { - return new ListZonesResponse(properties); + ListAssetActionsRequest.create = function create(properties) { + return new ListAssetActionsRequest(properties); }; /** - * Encodes the specified ListZonesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesResponse.verify|verify} messages. + * Encodes the specified ListAssetActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetActionsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest * @static - * @param {google.cloud.dataplex.v1.IListZonesResponse} message ListZonesResponse message or plain object to encode + * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} message ListAssetActionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListZonesResponse.encode = function encode(message, writer) { + ListAssetActionsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.zones != null && message.zones.length) - for (var i = 0; i < message.zones.length; ++i) - $root.google.cloud.dataplex.v1.Zone.encode(message.zones[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified ListZonesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesResponse.verify|verify} messages. + * Encodes the specified ListAssetActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetActionsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest * @static - * @param {google.cloud.dataplex.v1.IListZonesResponse} message ListZonesResponse message or plain object to encode + * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} message ListAssetActionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListZonesResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListAssetActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListZonesResponse message from the specified reader or buffer. + * Decodes a ListAssetActionsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse + * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListZonesResponse.decode = function decode(reader, length) { + ListAssetActionsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListZonesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListAssetActionsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.zones && message.zones.length)) - message.zones = []; - message.zones.push($root.google.cloud.dataplex.v1.Zone.decode(reader, reader.uint32())); + message.parent = reader.string(); break; case 2: - message.nextPageToken = reader.string(); + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -19478,135 +27544,124 @@ }; /** - * Decodes a ListZonesResponse message from the specified reader or buffer, length delimited. + * Decodes a ListAssetActionsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse + * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListZonesResponse.decodeDelimited = function decodeDelimited(reader) { + ListAssetActionsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListZonesResponse message. + * Verifies a ListAssetActionsRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListZonesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.zones != null && message.hasOwnProperty("zones")) { - if (!Array.isArray(message.zones)) - return "zones: array expected"; - for (var i = 0; i < message.zones.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Zone.verify(message.zones[i]); - if (error) - return "zones." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + ListAssetActionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a ListZonesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListAssetActionsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse + * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest */ - ListZonesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListZonesResponse) + ListAssetActionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListAssetActionsRequest) return object; - var message = new $root.google.cloud.dataplex.v1.ListZonesResponse(); - if (object.zones) { - if (!Array.isArray(object.zones)) - throw TypeError(".google.cloud.dataplex.v1.ListZonesResponse.zones: array expected"); - message.zones = []; - for (var i = 0; i < object.zones.length; ++i) { - if (typeof object.zones[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListZonesResponse.zones: object expected"); - message.zones[i] = $root.google.cloud.dataplex.v1.Zone.fromObject(object.zones[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.cloud.dataplex.v1.ListAssetActionsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a ListZonesResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListAssetActionsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest * @static - * @param {google.cloud.dataplex.v1.ListZonesResponse} message ListZonesResponse + * @param {google.cloud.dataplex.v1.ListAssetActionsRequest} message ListAssetActionsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListZonesResponse.toObject = function toObject(message, options) { + ListAssetActionsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.zones = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.zones && message.zones.length) { - object.zones = []; - for (var j = 0; j < message.zones.length; ++j) - object.zones[j] = $root.google.cloud.dataplex.v1.Zone.toObject(message.zones[j], options); + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this ListZonesResponse to JSON. + * Converts this ListAssetActionsRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest * @instance * @returns {Object.} JSON object */ - ListZonesResponse.prototype.toJSON = function toJSON() { + ListAssetActionsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListZonesResponse; + return ListAssetActionsRequest; })(); - v1.ListZoneActionsRequest = (function() { + v1.GetAssetRequest = (function() { /** - * Properties of a ListZoneActionsRequest. + * Properties of a GetAssetRequest. * @memberof google.cloud.dataplex.v1 - * @interface IListZoneActionsRequest - * @property {string|null} [parent] ListZoneActionsRequest parent - * @property {number|null} [pageSize] ListZoneActionsRequest pageSize - * @property {string|null} [pageToken] ListZoneActionsRequest pageToken + * @interface IGetAssetRequest + * @property {string|null} [name] GetAssetRequest name */ /** - * Constructs a new ListZoneActionsRequest. + * Constructs a new GetAssetRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListZoneActionsRequest. - * @implements IListZoneActionsRequest + * @classdesc Represents a GetAssetRequest. + * @implements IGetAssetRequest * @constructor - * @param {google.cloud.dataplex.v1.IListZoneActionsRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IGetAssetRequest=} [properties] Properties to set */ - function ListZoneActionsRequest(properties) { + function GetAssetRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19614,101 +27669,75 @@ } /** - * ListZoneActionsRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest - * @instance - */ - ListZoneActionsRequest.prototype.parent = ""; - - /** - * ListZoneActionsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest - * @instance - */ - ListZoneActionsRequest.prototype.pageSize = 0; - - /** - * ListZoneActionsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * GetAssetRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetAssetRequest * @instance */ - ListZoneActionsRequest.prototype.pageToken = ""; + GetAssetRequest.prototype.name = ""; /** - * Creates a new ListZoneActionsRequest instance using the specified properties. + * Creates a new GetAssetRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @memberof google.cloud.dataplex.v1.GetAssetRequest * @static - * @param {google.cloud.dataplex.v1.IListZoneActionsRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest instance + * @param {google.cloud.dataplex.v1.IGetAssetRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest instance */ - ListZoneActionsRequest.create = function create(properties) { - return new ListZoneActionsRequest(properties); + GetAssetRequest.create = function create(properties) { + return new GetAssetRequest(properties); }; /** - * Encodes the specified ListZoneActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListZoneActionsRequest.verify|verify} messages. + * Encodes the specified GetAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetAssetRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @memberof google.cloud.dataplex.v1.GetAssetRequest * @static - * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} message ListZoneActionsRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IGetAssetRequest} message GetAssetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListZoneActionsRequest.encode = function encode(message, writer) { + GetAssetRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListZoneActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZoneActionsRequest.verify|verify} messages. + * Encodes the specified GetAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetAssetRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @memberof google.cloud.dataplex.v1.GetAssetRequest * @static - * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} message ListZoneActionsRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IGetAssetRequest} message GetAssetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListZoneActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListZoneActionsRequest message from the specified reader or buffer. + * Decodes a GetAssetRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @memberof google.cloud.dataplex.v1.GetAssetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest + * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListZoneActionsRequest.decode = function decode(reader, length) { + GetAssetRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListZoneActionsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetAssetRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -19719,124 +27748,113 @@ }; /** - * Decodes a ListZoneActionsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetAssetRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @memberof google.cloud.dataplex.v1.GetAssetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest + * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListZoneActionsRequest.decodeDelimited = function decodeDelimited(reader) { + GetAssetRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListZoneActionsRequest message. + * Verifies a GetAssetRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @memberof google.cloud.dataplex.v1.GetAssetRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListZoneActionsRequest.verify = function verify(message) { + GetAssetRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListZoneActionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetAssetRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @memberof google.cloud.dataplex.v1.GetAssetRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest + * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest */ - ListZoneActionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListZoneActionsRequest) + GetAssetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetAssetRequest) return object; - var message = new $root.google.cloud.dataplex.v1.ListZoneActionsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); + var message = new $root.google.cloud.dataplex.v1.GetAssetRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListZoneActionsRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetAssetRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @memberof google.cloud.dataplex.v1.GetAssetRequest * @static - * @param {google.cloud.dataplex.v1.ListZoneActionsRequest} message ListZoneActionsRequest + * @param {google.cloud.dataplex.v1.GetAssetRequest} message GetAssetRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListZoneActionsRequest.toObject = function toObject(message, options) { + GetAssetRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListZoneActionsRequest to JSON. + * Converts this GetAssetRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @memberof google.cloud.dataplex.v1.GetAssetRequest * @instance * @returns {Object.} JSON object */ - ListZoneActionsRequest.prototype.toJSON = function toJSON() { + GetAssetRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListZoneActionsRequest; + return GetAssetRequest; })(); - v1.GetZoneRequest = (function() { + v1.OperationMetadata = (function() { /** - * Properties of a GetZoneRequest. + * Properties of an OperationMetadata. * @memberof google.cloud.dataplex.v1 - * @interface IGetZoneRequest - * @property {string|null} [name] GetZoneRequest name + * @interface IOperationMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime + * @property {string|null} [target] OperationMetadata target + * @property {string|null} [verb] OperationMetadata verb + * @property {string|null} [statusMessage] OperationMetadata statusMessage + * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation + * @property {string|null} [apiVersion] OperationMetadata apiVersion */ /** - * Constructs a new GetZoneRequest. + * Constructs a new OperationMetadata. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetZoneRequest. - * @implements IGetZoneRequest + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata * @constructor - * @param {google.cloud.dataplex.v1.IGetZoneRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IOperationMetadata=} [properties] Properties to set */ - function GetZoneRequest(properties) { + function OperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19844,75 +27862,153 @@ } /** - * GetZoneRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.GetZoneRequest + * OperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.OperationMetadata * @instance */ - GetZoneRequest.prototype.name = ""; + OperationMetadata.prototype.createTime = null; /** - * Creates a new GetZoneRequest instance using the specified properties. + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.endTime = null; + + /** + * OperationMetadata target. + * @member {string} target + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.target = ""; + + /** + * OperationMetadata verb. + * @member {string} verb + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.verb = ""; + + /** + * OperationMetadata statusMessage. + * @member {string} statusMessage + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.statusMessage = ""; + + /** + * OperationMetadata requestedCancellation. + * @member {boolean} requestedCancellation + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.requestedCancellation = false; + + /** + * OperationMetadata apiVersion. + * @member {string} apiVersion + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.apiVersion = ""; + + /** + * Creates a new OperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @memberof google.cloud.dataplex.v1.OperationMetadata * @static - * @param {google.cloud.dataplex.v1.IGetZoneRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest instance + * @param {google.cloud.dataplex.v1.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.OperationMetadata} OperationMetadata instance */ - GetZoneRequest.create = function create(properties) { - return new GetZoneRequest(properties); + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); }; /** - * Encodes the specified GetZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetZoneRequest.verify|verify} messages. + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.dataplex.v1.OperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @memberof google.cloud.dataplex.v1.OperationMetadata * @static - * @param {google.cloud.dataplex.v1.IGetZoneRequest} message GetZoneRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IOperationMetadata} message OperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetZoneRequest.encode = function encode(message, writer) { + OperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); + if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); + if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); + if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.requestedCancellation); + if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); return writer; }; /** - * Encodes the specified GetZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetZoneRequest.verify|verify} messages. + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.OperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @memberof google.cloud.dataplex.v1.OperationMetadata * @static - * @param {google.cloud.dataplex.v1.IGetZoneRequest} message GetZoneRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IOperationMetadata} message OperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { + OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetZoneRequest message from the specified reader or buffer. + * Decodes an OperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @memberof google.cloud.dataplex.v1.OperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest + * @returns {google.cloud.dataplex.v1.OperationMetadata} OperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetZoneRequest.decode = function decode(reader, length) { + OperationMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetZoneRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.OperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 2: + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.target = reader.string(); + break; + case 4: + message.verb = reader.string(); + break; + case 5: + message.statusMessage = reader.string(); + break; + case 6: + message.requestedCancellation = reader.bool(); + break; + case 7: + message.apiVersion = reader.string(); break; default: reader.skipType(tag & 7); @@ -19923,110 +28019,169 @@ }; /** - * Decodes a GetZoneRequest message from the specified reader or buffer, length delimited. + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @memberof google.cloud.dataplex.v1.OperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest + * @returns {google.cloud.dataplex.v1.OperationMetadata} OperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetZoneRequest.decodeDelimited = function decodeDelimited(reader) { + OperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetZoneRequest message. + * Verifies an OperationMetadata message. * @function verify - * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @memberof google.cloud.dataplex.v1.OperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetZoneRequest.verify = function verify(message) { + OperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.target != null && message.hasOwnProperty("target")) + if (!$util.isString(message.target)) + return "target: string expected"; + if (message.verb != null && message.hasOwnProperty("verb")) + if (!$util.isString(message.verb)) + return "verb: string expected"; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + if (!$util.isString(message.statusMessage)) + return "statusMessage: string expected"; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + if (typeof message.requestedCancellation !== "boolean") + return "requestedCancellation: boolean expected"; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + if (!$util.isString(message.apiVersion)) + return "apiVersion: string expected"; return null; }; /** - * Creates a GetZoneRequest message from a plain object. Also converts values to their respective internal types. + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @memberof google.cloud.dataplex.v1.OperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest + * @returns {google.cloud.dataplex.v1.OperationMetadata} OperationMetadata */ - GetZoneRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetZoneRequest) + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.OperationMetadata) return object; - var message = new $root.google.cloud.dataplex.v1.GetZoneRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dataplex.v1.OperationMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.OperationMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.OperationMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.target != null) + message.target = String(object.target); + if (object.verb != null) + message.verb = String(object.verb); + if (object.statusMessage != null) + message.statusMessage = String(object.statusMessage); + if (object.requestedCancellation != null) + message.requestedCancellation = Boolean(object.requestedCancellation); + if (object.apiVersion != null) + message.apiVersion = String(object.apiVersion); return message; }; /** - * Creates a plain object from a GetZoneRequest message. Also converts values to other types if specified. + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @memberof google.cloud.dataplex.v1.OperationMetadata * @static - * @param {google.cloud.dataplex.v1.GetZoneRequest} message GetZoneRequest + * @param {google.cloud.dataplex.v1.OperationMetadata} message OperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetZoneRequest.toObject = function toObject(message, options) { + OperationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.target = ""; + object.verb = ""; + object.statusMessage = ""; + object.requestedCancellation = false; + object.apiVersion = ""; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = message.target; + if (message.verb != null && message.hasOwnProperty("verb")) + object.verb = message.verb; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + object.statusMessage = message.statusMessage; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + object.requestedCancellation = message.requestedCancellation; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + object.apiVersion = message.apiVersion; return object; }; /** - * Converts this GetZoneRequest to JSON. + * Converts this OperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @memberof google.cloud.dataplex.v1.OperationMetadata * @instance * @returns {Object.} JSON object */ - GetZoneRequest.prototype.toJSON = function toJSON() { + OperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetZoneRequest; + return OperationMetadata; })(); - v1.CreateAssetRequest = (function() { + v1.CreateTaskRequest = (function() { /** - * Properties of a CreateAssetRequest. + * Properties of a CreateTaskRequest. * @memberof google.cloud.dataplex.v1 - * @interface ICreateAssetRequest - * @property {string|null} [parent] CreateAssetRequest parent - * @property {string|null} [assetId] CreateAssetRequest assetId - * @property {google.cloud.dataplex.v1.IAsset|null} [asset] CreateAssetRequest asset - * @property {boolean|null} [validateOnly] CreateAssetRequest validateOnly + * @interface ICreateTaskRequest + * @property {string|null} [parent] CreateTaskRequest parent + * @property {string|null} [taskId] CreateTaskRequest taskId + * @property {google.cloud.dataplex.v1.ITask|null} [task] CreateTaskRequest task + * @property {boolean|null} [validateOnly] CreateTaskRequest validateOnly */ /** - * Constructs a new CreateAssetRequest. + * Constructs a new CreateTaskRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CreateAssetRequest. - * @implements ICreateAssetRequest + * @classdesc Represents a CreateTaskRequest. + * @implements ICreateTaskRequest * @constructor - * @param {google.cloud.dataplex.v1.ICreateAssetRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.ICreateTaskRequest=} [properties] Properties to set */ - function CreateAssetRequest(properties) { + function CreateTaskRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20034,100 +28189,100 @@ } /** - * CreateAssetRequest parent. + * CreateTaskRequest parent. * @member {string} parent - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @memberof google.cloud.dataplex.v1.CreateTaskRequest * @instance */ - CreateAssetRequest.prototype.parent = ""; + CreateTaskRequest.prototype.parent = ""; /** - * CreateAssetRequest assetId. - * @member {string} assetId - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * CreateTaskRequest taskId. + * @member {string} taskId + * @memberof google.cloud.dataplex.v1.CreateTaskRequest * @instance */ - CreateAssetRequest.prototype.assetId = ""; + CreateTaskRequest.prototype.taskId = ""; /** - * CreateAssetRequest asset. - * @member {google.cloud.dataplex.v1.IAsset|null|undefined} asset - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * CreateTaskRequest task. + * @member {google.cloud.dataplex.v1.ITask|null|undefined} task + * @memberof google.cloud.dataplex.v1.CreateTaskRequest * @instance */ - CreateAssetRequest.prototype.asset = null; + CreateTaskRequest.prototype.task = null; /** - * CreateAssetRequest validateOnly. + * CreateTaskRequest validateOnly. * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @memberof google.cloud.dataplex.v1.CreateTaskRequest * @instance */ - CreateAssetRequest.prototype.validateOnly = false; + CreateTaskRequest.prototype.validateOnly = false; /** - * Creates a new CreateAssetRequest instance using the specified properties. + * Creates a new CreateTaskRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @memberof google.cloud.dataplex.v1.CreateTaskRequest * @static - * @param {google.cloud.dataplex.v1.ICreateAssetRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest instance + * @param {google.cloud.dataplex.v1.ICreateTaskRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest instance */ - CreateAssetRequest.create = function create(properties) { - return new CreateAssetRequest(properties); + CreateTaskRequest.create = function create(properties) { + return new CreateTaskRequest(properties); }; /** - * Encodes the specified CreateAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateAssetRequest.verify|verify} messages. + * Encodes the specified CreateTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateTaskRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @memberof google.cloud.dataplex.v1.CreateTaskRequest * @static - * @param {google.cloud.dataplex.v1.ICreateAssetRequest} message CreateAssetRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.ICreateTaskRequest} message CreateTaskRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateAssetRequest.encode = function encode(message, writer) { + CreateTaskRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.assetId != null && Object.hasOwnProperty.call(message, "assetId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.assetId); - if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) - $root.google.cloud.dataplex.v1.Asset.encode(message.asset, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.taskId != null && Object.hasOwnProperty.call(message, "taskId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.taskId); + if (message.task != null && Object.hasOwnProperty.call(message, "task")) + $root.google.cloud.dataplex.v1.Task.encode(message.task, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); return writer; }; /** - * Encodes the specified CreateAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateAssetRequest.verify|verify} messages. + * Encodes the specified CreateTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateTaskRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @memberof google.cloud.dataplex.v1.CreateTaskRequest * @static - * @param {google.cloud.dataplex.v1.ICreateAssetRequest} message CreateAssetRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.ICreateTaskRequest} message CreateTaskRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateAssetRequest message from the specified reader or buffer. + * Decodes a CreateTaskRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @memberof google.cloud.dataplex.v1.CreateTaskRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest + * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateAssetRequest.decode = function decode(reader, length) { + CreateTaskRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateAssetRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateTaskRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -20135,10 +28290,10 @@ message.parent = reader.string(); break; case 2: - message.assetId = reader.string(); + message.taskId = reader.string(); break; case 3: - message.asset = $root.google.cloud.dataplex.v1.Asset.decode(reader, reader.uint32()); + message.task = $root.google.cloud.dataplex.v1.Task.decode(reader, reader.uint32()); break; case 4: message.validateOnly = reader.bool(); @@ -20152,42 +28307,42 @@ }; /** - * Decodes a CreateAssetRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateTaskRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @memberof google.cloud.dataplex.v1.CreateTaskRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest + * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateAssetRequest.decodeDelimited = function decodeDelimited(reader) { + CreateTaskRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateAssetRequest message. + * Verifies a CreateTaskRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @memberof google.cloud.dataplex.v1.CreateTaskRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateAssetRequest.verify = function verify(message) { + CreateTaskRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.assetId != null && message.hasOwnProperty("assetId")) - if (!$util.isString(message.assetId)) - return "assetId: string expected"; - if (message.asset != null && message.hasOwnProperty("asset")) { - var error = $root.google.cloud.dataplex.v1.Asset.verify(message.asset); + if (message.taskId != null && message.hasOwnProperty("taskId")) + if (!$util.isString(message.taskId)) + return "taskId: string expected"; + if (message.task != null && message.hasOwnProperty("task")) { + var error = $root.google.cloud.dataplex.v1.Task.verify(message.task); if (error) - return "asset." + error; + return "task." + error; } if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) if (typeof message.validateOnly !== "boolean") @@ -20196,25 +28351,25 @@ }; /** - * Creates a CreateAssetRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateTaskRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @memberof google.cloud.dataplex.v1.CreateTaskRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest + * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest */ - CreateAssetRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.CreateAssetRequest) + CreateTaskRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateTaskRequest) return object; - var message = new $root.google.cloud.dataplex.v1.CreateAssetRequest(); + var message = new $root.google.cloud.dataplex.v1.CreateTaskRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.assetId != null) - message.assetId = String(object.assetId); - if (object.asset != null) { - if (typeof object.asset !== "object") - throw TypeError(".google.cloud.dataplex.v1.CreateAssetRequest.asset: object expected"); - message.asset = $root.google.cloud.dataplex.v1.Asset.fromObject(object.asset); + if (object.taskId != null) + message.taskId = String(object.taskId); + if (object.task != null) { + if (typeof object.task !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateTaskRequest.task: object expected"); + message.task = $root.google.cloud.dataplex.v1.Task.fromObject(object.task); } if (object.validateOnly != null) message.validateOnly = Boolean(object.validateOnly); @@ -20222,69 +28377,69 @@ }; /** - * Creates a plain object from a CreateAssetRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateTaskRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @memberof google.cloud.dataplex.v1.CreateTaskRequest * @static - * @param {google.cloud.dataplex.v1.CreateAssetRequest} message CreateAssetRequest + * @param {google.cloud.dataplex.v1.CreateTaskRequest} message CreateTaskRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateAssetRequest.toObject = function toObject(message, options) { + CreateTaskRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.assetId = ""; - object.asset = null; + object.taskId = ""; + object.task = null; object.validateOnly = false; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.assetId != null && message.hasOwnProperty("assetId")) - object.assetId = message.assetId; - if (message.asset != null && message.hasOwnProperty("asset")) - object.asset = $root.google.cloud.dataplex.v1.Asset.toObject(message.asset, options); + if (message.taskId != null && message.hasOwnProperty("taskId")) + object.taskId = message.taskId; + if (message.task != null && message.hasOwnProperty("task")) + object.task = $root.google.cloud.dataplex.v1.Task.toObject(message.task, options); if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) object.validateOnly = message.validateOnly; return object; }; /** - * Converts this CreateAssetRequest to JSON. + * Converts this CreateTaskRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @memberof google.cloud.dataplex.v1.CreateTaskRequest * @instance * @returns {Object.} JSON object */ - CreateAssetRequest.prototype.toJSON = function toJSON() { + CreateTaskRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateAssetRequest; + return CreateTaskRequest; })(); - v1.UpdateAssetRequest = (function() { + v1.UpdateTaskRequest = (function() { /** - * Properties of an UpdateAssetRequest. + * Properties of an UpdateTaskRequest. * @memberof google.cloud.dataplex.v1 - * @interface IUpdateAssetRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAssetRequest updateMask - * @property {google.cloud.dataplex.v1.IAsset|null} [asset] UpdateAssetRequest asset - * @property {boolean|null} [validateOnly] UpdateAssetRequest validateOnly + * @interface IUpdateTaskRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTaskRequest updateMask + * @property {google.cloud.dataplex.v1.ITask|null} [task] UpdateTaskRequest task + * @property {boolean|null} [validateOnly] UpdateTaskRequest validateOnly */ /** - * Constructs a new UpdateAssetRequest. + * Constructs a new UpdateTaskRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an UpdateAssetRequest. - * @implements IUpdateAssetRequest + * @classdesc Represents an UpdateTaskRequest. + * @implements IUpdateTaskRequest * @constructor - * @param {google.cloud.dataplex.v1.IUpdateAssetRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IUpdateTaskRequest=} [properties] Properties to set */ - function UpdateAssetRequest(properties) { + function UpdateTaskRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20292,90 +28447,90 @@ } /** - * UpdateAssetRequest updateMask. + * UpdateTaskRequest updateMask. * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest * @instance */ - UpdateAssetRequest.prototype.updateMask = null; + UpdateTaskRequest.prototype.updateMask = null; /** - * UpdateAssetRequest asset. - * @member {google.cloud.dataplex.v1.IAsset|null|undefined} asset - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * UpdateTaskRequest task. + * @member {google.cloud.dataplex.v1.ITask|null|undefined} task + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest * @instance */ - UpdateAssetRequest.prototype.asset = null; + UpdateTaskRequest.prototype.task = null; /** - * UpdateAssetRequest validateOnly. + * UpdateTaskRequest validateOnly. * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest * @instance */ - UpdateAssetRequest.prototype.validateOnly = false; + UpdateTaskRequest.prototype.validateOnly = false; /** - * Creates a new UpdateAssetRequest instance using the specified properties. + * Creates a new UpdateTaskRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest * @static - * @param {google.cloud.dataplex.v1.IUpdateAssetRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest instance + * @param {google.cloud.dataplex.v1.IUpdateTaskRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest instance */ - UpdateAssetRequest.create = function create(properties) { - return new UpdateAssetRequest(properties); + UpdateTaskRequest.create = function create(properties) { + return new UpdateTaskRequest(properties); }; /** - * Encodes the specified UpdateAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAssetRequest.verify|verify} messages. + * Encodes the specified UpdateTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateTaskRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest * @static - * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} message UpdateAssetRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} message UpdateTaskRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateAssetRequest.encode = function encode(message, writer) { + UpdateTaskRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) - $root.google.cloud.dataplex.v1.Asset.encode(message.asset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.task != null && Object.hasOwnProperty.call(message, "task")) + $root.google.cloud.dataplex.v1.Task.encode(message.task, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); return writer; }; /** - * Encodes the specified UpdateAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAssetRequest.verify|verify} messages. + * Encodes the specified UpdateTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateTaskRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest * @static - * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} message UpdateAssetRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} message UpdateTaskRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateAssetRequest message from the specified reader or buffer. + * Decodes an UpdateTaskRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest + * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateAssetRequest.decode = function decode(reader, length) { + UpdateTaskRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateAssetRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateTaskRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -20383,7 +28538,7 @@ message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; case 2: - message.asset = $root.google.cloud.dataplex.v1.Asset.decode(reader, reader.uint32()); + message.task = $root.google.cloud.dataplex.v1.Task.decode(reader, reader.uint32()); break; case 3: message.validateOnly = reader.bool(); @@ -20397,30 +28552,30 @@ }; /** - * Decodes an UpdateAssetRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateTaskRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest + * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateAssetRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateTaskRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateAssetRequest message. + * Verifies an UpdateTaskRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateAssetRequest.verify = function verify(message) { + UpdateTaskRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.updateMask != null && message.hasOwnProperty("updateMask")) { @@ -20428,10 +28583,10 @@ if (error) return "updateMask." + error; } - if (message.asset != null && message.hasOwnProperty("asset")) { - var error = $root.google.cloud.dataplex.v1.Asset.verify(message.asset); + if (message.task != null && message.hasOwnProperty("task")) { + var error = $root.google.cloud.dataplex.v1.Task.verify(message.task); if (error) - return "asset." + error; + return "task." + error; } if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) if (typeof message.validateOnly !== "boolean") @@ -20440,26 +28595,26 @@ }; /** - * Creates an UpdateAssetRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateTaskRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest + * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest */ - UpdateAssetRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.UpdateAssetRequest) + UpdateTaskRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateTaskRequest) return object; - var message = new $root.google.cloud.dataplex.v1.UpdateAssetRequest(); + var message = new $root.google.cloud.dataplex.v1.UpdateTaskRequest(); if (object.updateMask != null) { if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateAssetRequest.updateMask: object expected"); + throw TypeError(".google.cloud.dataplex.v1.UpdateTaskRequest.updateMask: object expected"); message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.asset != null) { - if (typeof object.asset !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateAssetRequest.asset: object expected"); - message.asset = $root.google.cloud.dataplex.v1.Asset.fromObject(object.asset); + if (object.task != null) { + if (typeof object.task !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateTaskRequest.task: object expected"); + message.task = $root.google.cloud.dataplex.v1.Task.fromObject(object.task); } if (object.validateOnly != null) message.validateOnly = Boolean(object.validateOnly); @@ -20467,64 +28622,64 @@ }; /** - * Creates a plain object from an UpdateAssetRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateTaskRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest * @static - * @param {google.cloud.dataplex.v1.UpdateAssetRequest} message UpdateAssetRequest + * @param {google.cloud.dataplex.v1.UpdateTaskRequest} message UpdateTaskRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateAssetRequest.toObject = function toObject(message, options) { + UpdateTaskRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.updateMask = null; - object.asset = null; + object.task = null; object.validateOnly = false; } if (message.updateMask != null && message.hasOwnProperty("updateMask")) object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.asset != null && message.hasOwnProperty("asset")) - object.asset = $root.google.cloud.dataplex.v1.Asset.toObject(message.asset, options); + if (message.task != null && message.hasOwnProperty("task")) + object.task = $root.google.cloud.dataplex.v1.Task.toObject(message.task, options); if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) object.validateOnly = message.validateOnly; return object; }; /** - * Converts this UpdateAssetRequest to JSON. + * Converts this UpdateTaskRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest * @instance * @returns {Object.} JSON object */ - UpdateAssetRequest.prototype.toJSON = function toJSON() { + UpdateTaskRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateAssetRequest; + return UpdateTaskRequest; })(); - v1.DeleteAssetRequest = (function() { + v1.DeleteTaskRequest = (function() { /** - * Properties of a DeleteAssetRequest. + * Properties of a DeleteTaskRequest. * @memberof google.cloud.dataplex.v1 - * @interface IDeleteAssetRequest - * @property {string|null} [name] DeleteAssetRequest name + * @interface IDeleteTaskRequest + * @property {string|null} [name] DeleteTaskRequest name */ /** - * Constructs a new DeleteAssetRequest. + * Constructs a new DeleteTaskRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DeleteAssetRequest. - * @implements IDeleteAssetRequest + * @classdesc Represents a DeleteTaskRequest. + * @implements IDeleteTaskRequest * @constructor - * @param {google.cloud.dataplex.v1.IDeleteAssetRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IDeleteTaskRequest=} [properties] Properties to set */ - function DeleteAssetRequest(properties) { + function DeleteTaskRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20532,35 +28687,35 @@ } /** - * DeleteAssetRequest name. + * DeleteTaskRequest name. * @member {string} name - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest * @instance */ - DeleteAssetRequest.prototype.name = ""; + DeleteTaskRequest.prototype.name = ""; /** - * Creates a new DeleteAssetRequest instance using the specified properties. + * Creates a new DeleteTaskRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest * @static - * @param {google.cloud.dataplex.v1.IDeleteAssetRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest instance + * @param {google.cloud.dataplex.v1.IDeleteTaskRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest instance */ - DeleteAssetRequest.create = function create(properties) { - return new DeleteAssetRequest(properties); + DeleteTaskRequest.create = function create(properties) { + return new DeleteTaskRequest(properties); }; /** - * Encodes the specified DeleteAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAssetRequest.verify|verify} messages. + * Encodes the specified DeleteTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteTaskRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest * @static - * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} message DeleteAssetRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} message DeleteTaskRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteAssetRequest.encode = function encode(message, writer) { + DeleteTaskRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -20569,33 +28724,33 @@ }; /** - * Encodes the specified DeleteAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAssetRequest.verify|verify} messages. + * Encodes the specified DeleteTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteTaskRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest * @static - * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} message DeleteAssetRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} message DeleteTaskRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteAssetRequest message from the specified reader or buffer. + * Decodes a DeleteTaskRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest + * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteAssetRequest.decode = function decode(reader, length) { + DeleteTaskRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteAssetRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteTaskRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -20611,30 +28766,30 @@ }; /** - * Decodes a DeleteAssetRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteTaskRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest + * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteAssetRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteTaskRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteAssetRequest message. + * Verifies a DeleteTaskRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteAssetRequest.verify = function verify(message) { + DeleteTaskRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -20644,32 +28799,32 @@ }; /** - * Creates a DeleteAssetRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteTaskRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest + * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest */ - DeleteAssetRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DeleteAssetRequest) + DeleteTaskRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteTaskRequest) return object; - var message = new $root.google.cloud.dataplex.v1.DeleteAssetRequest(); + var message = new $root.google.cloud.dataplex.v1.DeleteTaskRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a DeleteAssetRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteTaskRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest * @static - * @param {google.cloud.dataplex.v1.DeleteAssetRequest} message DeleteAssetRequest + * @param {google.cloud.dataplex.v1.DeleteTaskRequest} message DeleteTaskRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteAssetRequest.toObject = function toObject(message, options) { + DeleteTaskRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -20681,41 +28836,41 @@ }; /** - * Converts this DeleteAssetRequest to JSON. + * Converts this DeleteTaskRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest * @instance * @returns {Object.} JSON object */ - DeleteAssetRequest.prototype.toJSON = function toJSON() { + DeleteTaskRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteAssetRequest; + return DeleteTaskRequest; })(); - v1.ListAssetsRequest = (function() { + v1.ListTasksRequest = (function() { /** - * Properties of a ListAssetsRequest. + * Properties of a ListTasksRequest. * @memberof google.cloud.dataplex.v1 - * @interface IListAssetsRequest - * @property {string|null} [parent] ListAssetsRequest parent - * @property {number|null} [pageSize] ListAssetsRequest pageSize - * @property {string|null} [pageToken] ListAssetsRequest pageToken - * @property {string|null} [filter] ListAssetsRequest filter - * @property {string|null} [orderBy] ListAssetsRequest orderBy + * @interface IListTasksRequest + * @property {string|null} [parent] ListTasksRequest parent + * @property {number|null} [pageSize] ListTasksRequest pageSize + * @property {string|null} [pageToken] ListTasksRequest pageToken + * @property {string|null} [filter] ListTasksRequest filter + * @property {string|null} [orderBy] ListTasksRequest orderBy */ /** - * Constructs a new ListAssetsRequest. + * Constructs a new ListTasksRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListAssetsRequest. - * @implements IListAssetsRequest + * @classdesc Represents a ListTasksRequest. + * @implements IListTasksRequest * @constructor - * @param {google.cloud.dataplex.v1.IListAssetsRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IListTasksRequest=} [properties] Properties to set */ - function ListAssetsRequest(properties) { + function ListTasksRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20723,67 +28878,67 @@ } /** - * ListAssetsRequest parent. + * ListTasksRequest parent. * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @memberof google.cloud.dataplex.v1.ListTasksRequest * @instance */ - ListAssetsRequest.prototype.parent = ""; + ListTasksRequest.prototype.parent = ""; /** - * ListAssetsRequest pageSize. + * ListTasksRequest pageSize. * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @memberof google.cloud.dataplex.v1.ListTasksRequest * @instance */ - ListAssetsRequest.prototype.pageSize = 0; + ListTasksRequest.prototype.pageSize = 0; /** - * ListAssetsRequest pageToken. + * ListTasksRequest pageToken. * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @memberof google.cloud.dataplex.v1.ListTasksRequest * @instance */ - ListAssetsRequest.prototype.pageToken = ""; + ListTasksRequest.prototype.pageToken = ""; /** - * ListAssetsRequest filter. + * ListTasksRequest filter. * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @memberof google.cloud.dataplex.v1.ListTasksRequest * @instance */ - ListAssetsRequest.prototype.filter = ""; + ListTasksRequest.prototype.filter = ""; /** - * ListAssetsRequest orderBy. + * ListTasksRequest orderBy. * @member {string} orderBy - * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @memberof google.cloud.dataplex.v1.ListTasksRequest * @instance */ - ListAssetsRequest.prototype.orderBy = ""; + ListTasksRequest.prototype.orderBy = ""; /** - * Creates a new ListAssetsRequest instance using the specified properties. + * Creates a new ListTasksRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @memberof google.cloud.dataplex.v1.ListTasksRequest * @static - * @param {google.cloud.dataplex.v1.IListAssetsRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest instance + * @param {google.cloud.dataplex.v1.IListTasksRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest instance */ - ListAssetsRequest.create = function create(properties) { - return new ListAssetsRequest(properties); + ListTasksRequest.create = function create(properties) { + return new ListTasksRequest(properties); }; /** - * Encodes the specified ListAssetsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsRequest.verify|verify} messages. + * Encodes the specified ListTasksRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @memberof google.cloud.dataplex.v1.ListTasksRequest * @static - * @param {google.cloud.dataplex.v1.IListAssetsRequest} message ListAssetsRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListTasksRequest} message ListTasksRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAssetsRequest.encode = function encode(message, writer) { + ListTasksRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) @@ -20800,33 +28955,33 @@ }; /** - * Encodes the specified ListAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsRequest.verify|verify} messages. + * Encodes the specified ListTasksRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @memberof google.cloud.dataplex.v1.ListTasksRequest * @static - * @param {google.cloud.dataplex.v1.IListAssetsRequest} message ListAssetsRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListTasksRequest} message ListTasksRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAssetsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListTasksRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListAssetsRequest message from the specified reader or buffer. + * Decodes a ListTasksRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @memberof google.cloud.dataplex.v1.ListTasksRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest + * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAssetsRequest.decode = function decode(reader, length) { + ListTasksRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListAssetsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListTasksRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -20854,30 +29009,30 @@ }; /** - * Decodes a ListAssetsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListTasksRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @memberof google.cloud.dataplex.v1.ListTasksRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest + * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAssetsRequest.decodeDelimited = function decodeDelimited(reader) { + ListTasksRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListAssetsRequest message. + * Verifies a ListTasksRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @memberof google.cloud.dataplex.v1.ListTasksRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListAssetsRequest.verify = function verify(message) { + ListTasksRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) @@ -20899,17 +29054,17 @@ }; /** - * Creates a ListAssetsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListTasksRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @memberof google.cloud.dataplex.v1.ListTasksRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest + * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest */ - ListAssetsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListAssetsRequest) + ListTasksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListTasksRequest) return object; - var message = new $root.google.cloud.dataplex.v1.ListAssetsRequest(); + var message = new $root.google.cloud.dataplex.v1.ListTasksRequest(); if (object.parent != null) message.parent = String(object.parent); if (object.pageSize != null) @@ -20924,15 +29079,15 @@ }; /** - * Creates a plain object from a ListAssetsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListTasksRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @memberof google.cloud.dataplex.v1.ListTasksRequest * @static - * @param {google.cloud.dataplex.v1.ListAssetsRequest} message ListAssetsRequest + * @param {google.cloud.dataplex.v1.ListTasksRequest} message ListTasksRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListAssetsRequest.toObject = function toObject(message, options) { + ListTasksRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -20957,39 +29112,41 @@ }; /** - * Converts this ListAssetsRequest to JSON. + * Converts this ListTasksRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @memberof google.cloud.dataplex.v1.ListTasksRequest * @instance * @returns {Object.} JSON object */ - ListAssetsRequest.prototype.toJSON = function toJSON() { + ListTasksRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListAssetsRequest; + return ListTasksRequest; })(); - v1.ListAssetsResponse = (function() { + v1.ListTasksResponse = (function() { /** - * Properties of a ListAssetsResponse. + * Properties of a ListTasksResponse. * @memberof google.cloud.dataplex.v1 - * @interface IListAssetsResponse - * @property {Array.|null} [assets] ListAssetsResponse assets - * @property {string|null} [nextPageToken] ListAssetsResponse nextPageToken + * @interface IListTasksResponse + * @property {Array.|null} [tasks] ListTasksResponse tasks + * @property {string|null} [nextPageToken] ListTasksResponse nextPageToken + * @property {Array.|null} [unreachableLocations] ListTasksResponse unreachableLocations */ /** - * Constructs a new ListAssetsResponse. + * Constructs a new ListTasksResponse. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListAssetsResponse. - * @implements IListAssetsResponse + * @classdesc Represents a ListTasksResponse. + * @implements IListTasksResponse * @constructor - * @param {google.cloud.dataplex.v1.IListAssetsResponse=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IListTasksResponse=} [properties] Properties to set */ - function ListAssetsResponse(properties) { - this.assets = []; + function ListTasksResponse(properties) { + this.tasks = []; + this.unreachableLocations = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20997,92 +29154,108 @@ } /** - * ListAssetsResponse assets. - * @member {Array.} assets - * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * ListTasksResponse tasks. + * @member {Array.} tasks + * @memberof google.cloud.dataplex.v1.ListTasksResponse * @instance */ - ListAssetsResponse.prototype.assets = $util.emptyArray; + ListTasksResponse.prototype.tasks = $util.emptyArray; /** - * ListAssetsResponse nextPageToken. + * ListTasksResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @memberof google.cloud.dataplex.v1.ListTasksResponse * @instance */ - ListAssetsResponse.prototype.nextPageToken = ""; + ListTasksResponse.prototype.nextPageToken = ""; /** - * Creates a new ListAssetsResponse instance using the specified properties. + * ListTasksResponse unreachableLocations. + * @member {Array.} unreachableLocations + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @instance + */ + ListTasksResponse.prototype.unreachableLocations = $util.emptyArray; + + /** + * Creates a new ListTasksResponse instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @memberof google.cloud.dataplex.v1.ListTasksResponse * @static - * @param {google.cloud.dataplex.v1.IListAssetsResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse instance + * @param {google.cloud.dataplex.v1.IListTasksResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse instance */ - ListAssetsResponse.create = function create(properties) { - return new ListAssetsResponse(properties); + ListTasksResponse.create = function create(properties) { + return new ListTasksResponse(properties); }; /** - * Encodes the specified ListAssetsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsResponse.verify|verify} messages. + * Encodes the specified ListTasksResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @memberof google.cloud.dataplex.v1.ListTasksResponse * @static - * @param {google.cloud.dataplex.v1.IListAssetsResponse} message ListAssetsResponse message or plain object to encode + * @param {google.cloud.dataplex.v1.IListTasksResponse} message ListTasksResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAssetsResponse.encode = function encode(message, writer) { + ListTasksResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.assets != null && message.assets.length) - for (var i = 0; i < message.assets.length; ++i) - $root.google.cloud.dataplex.v1.Asset.encode(message.assets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tasks != null && message.tasks.length) + for (var i = 0; i < message.tasks.length; ++i) + $root.google.cloud.dataplex.v1.Task.encode(message.tasks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachableLocations != null && message.unreachableLocations.length) + for (var i = 0; i < message.unreachableLocations.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachableLocations[i]); return writer; }; /** - * Encodes the specified ListAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsResponse.verify|verify} messages. + * Encodes the specified ListTasksResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @memberof google.cloud.dataplex.v1.ListTasksResponse * @static - * @param {google.cloud.dataplex.v1.IListAssetsResponse} message ListAssetsResponse message or plain object to encode + * @param {google.cloud.dataplex.v1.IListTasksResponse} message ListTasksResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAssetsResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListTasksResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListAssetsResponse message from the specified reader or buffer. + * Decodes a ListTasksResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @memberof google.cloud.dataplex.v1.ListTasksResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse + * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAssetsResponse.decode = function decode(reader, length) { + ListTasksResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListAssetsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListTasksResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.assets && message.assets.length)) - message.assets = []; - message.assets.push($root.google.cloud.dataplex.v1.Asset.decode(reader, reader.uint32())); + if (!(message.tasks && message.tasks.length)) + message.tasks = []; + message.tasks.push($root.google.cloud.dataplex.v1.Task.decode(reader, reader.uint32())); break; case 2: message.nextPageToken = reader.string(); break; + case 3: + if (!(message.unreachableLocations && message.unreachableLocations.length)) + message.unreachableLocations = []; + message.unreachableLocations.push(reader.string()); + break; default: reader.skipType(tag & 7); break; @@ -21092,135 +29265,154 @@ }; /** - * Decodes a ListAssetsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListTasksResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @memberof google.cloud.dataplex.v1.ListTasksResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse + * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAssetsResponse.decodeDelimited = function decodeDelimited(reader) { + ListTasksResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListAssetsResponse message. + * Verifies a ListTasksResponse message. * @function verify - * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @memberof google.cloud.dataplex.v1.ListTasksResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListAssetsResponse.verify = function verify(message) { + ListTasksResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.assets != null && message.hasOwnProperty("assets")) { - if (!Array.isArray(message.assets)) - return "assets: array expected"; - for (var i = 0; i < message.assets.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Asset.verify(message.assets[i]); + if (message.tasks != null && message.hasOwnProperty("tasks")) { + if (!Array.isArray(message.tasks)) + return "tasks: array expected"; + for (var i = 0; i < message.tasks.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Task.verify(message.tasks[i]); if (error) - return "assets." + error; + return "tasks." + error; } } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) if (!$util.isString(message.nextPageToken)) return "nextPageToken: string expected"; + if (message.unreachableLocations != null && message.hasOwnProperty("unreachableLocations")) { + if (!Array.isArray(message.unreachableLocations)) + return "unreachableLocations: array expected"; + for (var i = 0; i < message.unreachableLocations.length; ++i) + if (!$util.isString(message.unreachableLocations[i])) + return "unreachableLocations: string[] expected"; + } return null; }; /** - * Creates a ListAssetsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListTasksResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @memberof google.cloud.dataplex.v1.ListTasksResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse + * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse */ - ListAssetsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListAssetsResponse) + ListTasksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListTasksResponse) return object; - var message = new $root.google.cloud.dataplex.v1.ListAssetsResponse(); - if (object.assets) { - if (!Array.isArray(object.assets)) - throw TypeError(".google.cloud.dataplex.v1.ListAssetsResponse.assets: array expected"); - message.assets = []; - for (var i = 0; i < object.assets.length; ++i) { - if (typeof object.assets[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListAssetsResponse.assets: object expected"); - message.assets[i] = $root.google.cloud.dataplex.v1.Asset.fromObject(object.assets[i]); + var message = new $root.google.cloud.dataplex.v1.ListTasksResponse(); + if (object.tasks) { + if (!Array.isArray(object.tasks)) + throw TypeError(".google.cloud.dataplex.v1.ListTasksResponse.tasks: array expected"); + message.tasks = []; + for (var i = 0; i < object.tasks.length; ++i) { + if (typeof object.tasks[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListTasksResponse.tasks: object expected"); + message.tasks[i] = $root.google.cloud.dataplex.v1.Task.fromObject(object.tasks[i]); } } if (object.nextPageToken != null) message.nextPageToken = String(object.nextPageToken); + if (object.unreachableLocations) { + if (!Array.isArray(object.unreachableLocations)) + throw TypeError(".google.cloud.dataplex.v1.ListTasksResponse.unreachableLocations: array expected"); + message.unreachableLocations = []; + for (var i = 0; i < object.unreachableLocations.length; ++i) + message.unreachableLocations[i] = String(object.unreachableLocations[i]); + } return message; }; /** - * Creates a plain object from a ListAssetsResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListTasksResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @memberof google.cloud.dataplex.v1.ListTasksResponse * @static - * @param {google.cloud.dataplex.v1.ListAssetsResponse} message ListAssetsResponse + * @param {google.cloud.dataplex.v1.ListTasksResponse} message ListTasksResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListAssetsResponse.toObject = function toObject(message, options) { + ListTasksResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.assets = []; + if (options.arrays || options.defaults) { + object.tasks = []; + object.unreachableLocations = []; + } if (options.defaults) object.nextPageToken = ""; - if (message.assets && message.assets.length) { - object.assets = []; - for (var j = 0; j < message.assets.length; ++j) - object.assets[j] = $root.google.cloud.dataplex.v1.Asset.toObject(message.assets[j], options); + if (message.tasks && message.tasks.length) { + object.tasks = []; + for (var j = 0; j < message.tasks.length; ++j) + object.tasks[j] = $root.google.cloud.dataplex.v1.Task.toObject(message.tasks[j], options); } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; + if (message.unreachableLocations && message.unreachableLocations.length) { + object.unreachableLocations = []; + for (var j = 0; j < message.unreachableLocations.length; ++j) + object.unreachableLocations[j] = message.unreachableLocations[j]; + } return object; }; /** - * Converts this ListAssetsResponse to JSON. + * Converts this ListTasksResponse to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @memberof google.cloud.dataplex.v1.ListTasksResponse * @instance * @returns {Object.} JSON object */ - ListAssetsResponse.prototype.toJSON = function toJSON() { + ListTasksResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListAssetsResponse; + return ListTasksResponse; })(); - v1.ListAssetActionsRequest = (function() { + v1.GetTaskRequest = (function() { /** - * Properties of a ListAssetActionsRequest. + * Properties of a GetTaskRequest. * @memberof google.cloud.dataplex.v1 - * @interface IListAssetActionsRequest - * @property {string|null} [parent] ListAssetActionsRequest parent - * @property {number|null} [pageSize] ListAssetActionsRequest pageSize - * @property {string|null} [pageToken] ListAssetActionsRequest pageToken + * @interface IGetTaskRequest + * @property {string|null} [name] GetTaskRequest name */ /** - * Constructs a new ListAssetActionsRequest. + * Constructs a new GetTaskRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListAssetActionsRequest. - * @implements IListAssetActionsRequest + * @classdesc Represents a GetTaskRequest. + * @implements IGetTaskRequest * @constructor - * @param {google.cloud.dataplex.v1.IListAssetActionsRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IGetTaskRequest=} [properties] Properties to set */ - function ListAssetActionsRequest(properties) { + function GetTaskRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21228,101 +29420,75 @@ } /** - * ListAssetActionsRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest - * @instance - */ - ListAssetActionsRequest.prototype.parent = ""; - - /** - * ListAssetActionsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest - * @instance - */ - ListAssetActionsRequest.prototype.pageSize = 0; - - /** - * ListAssetActionsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * GetTaskRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetTaskRequest * @instance */ - ListAssetActionsRequest.prototype.pageToken = ""; + GetTaskRequest.prototype.name = ""; /** - * Creates a new ListAssetActionsRequest instance using the specified properties. + * Creates a new GetTaskRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @memberof google.cloud.dataplex.v1.GetTaskRequest * @static - * @param {google.cloud.dataplex.v1.IListAssetActionsRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest instance + * @param {google.cloud.dataplex.v1.IGetTaskRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest instance */ - ListAssetActionsRequest.create = function create(properties) { - return new ListAssetActionsRequest(properties); + GetTaskRequest.create = function create(properties) { + return new GetTaskRequest(properties); }; /** - * Encodes the specified ListAssetActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetActionsRequest.verify|verify} messages. + * Encodes the specified GetTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetTaskRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @memberof google.cloud.dataplex.v1.GetTaskRequest * @static - * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} message ListAssetActionsRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IGetTaskRequest} message GetTaskRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAssetActionsRequest.encode = function encode(message, writer) { + GetTaskRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListAssetActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetActionsRequest.verify|verify} messages. + * Encodes the specified GetTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetTaskRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @memberof google.cloud.dataplex.v1.GetTaskRequest * @static - * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} message ListAssetActionsRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IGetTaskRequest} message GetTaskRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAssetActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListAssetActionsRequest message from the specified reader or buffer. + * Decodes a GetTaskRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @memberof google.cloud.dataplex.v1.GetTaskRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest + * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAssetActionsRequest.decode = function decode(reader, length) { + GetTaskRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListAssetActionsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetTaskRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -21333,124 +29499,107 @@ }; /** - * Decodes a ListAssetActionsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetTaskRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @memberof google.cloud.dataplex.v1.GetTaskRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest + * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAssetActionsRequest.decodeDelimited = function decodeDelimited(reader) { + GetTaskRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListAssetActionsRequest message. + * Verifies a GetTaskRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @memberof google.cloud.dataplex.v1.GetTaskRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListAssetActionsRequest.verify = function verify(message) { + GetTaskRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListAssetActionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetTaskRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @memberof google.cloud.dataplex.v1.GetTaskRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest + * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest */ - ListAssetActionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListAssetActionsRequest) + GetTaskRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetTaskRequest) return object; - var message = new $root.google.cloud.dataplex.v1.ListAssetActionsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); + var message = new $root.google.cloud.dataplex.v1.GetTaskRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListAssetActionsRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetTaskRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @memberof google.cloud.dataplex.v1.GetTaskRequest * @static - * @param {google.cloud.dataplex.v1.ListAssetActionsRequest} message ListAssetActionsRequest + * @param {google.cloud.dataplex.v1.GetTaskRequest} message GetTaskRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListAssetActionsRequest.toObject = function toObject(message, options) { + GetTaskRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListAssetActionsRequest to JSON. + * Converts this GetTaskRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @memberof google.cloud.dataplex.v1.GetTaskRequest * @instance * @returns {Object.} JSON object */ - ListAssetActionsRequest.prototype.toJSON = function toJSON() { + GetTaskRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListAssetActionsRequest; + return GetTaskRequest; })(); - v1.GetAssetRequest = (function() { + v1.GetJobRequest = (function() { /** - * Properties of a GetAssetRequest. + * Properties of a GetJobRequest. * @memberof google.cloud.dataplex.v1 - * @interface IGetAssetRequest - * @property {string|null} [name] GetAssetRequest name + * @interface IGetJobRequest + * @property {string|null} [name] GetJobRequest name */ /** - * Constructs a new GetAssetRequest. + * Constructs a new GetJobRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetAssetRequest. - * @implements IGetAssetRequest + * @classdesc Represents a GetJobRequest. + * @implements IGetJobRequest * @constructor - * @param {google.cloud.dataplex.v1.IGetAssetRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IGetJobRequest=} [properties] Properties to set */ - function GetAssetRequest(properties) { + function GetJobRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21458,35 +29607,35 @@ } /** - * GetAssetRequest name. + * GetJobRequest name. * @member {string} name - * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @memberof google.cloud.dataplex.v1.GetJobRequest * @instance */ - GetAssetRequest.prototype.name = ""; + GetJobRequest.prototype.name = ""; /** - * Creates a new GetAssetRequest instance using the specified properties. + * Creates a new GetJobRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @memberof google.cloud.dataplex.v1.GetJobRequest * @static - * @param {google.cloud.dataplex.v1.IGetAssetRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest instance + * @param {google.cloud.dataplex.v1.IGetJobRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest instance */ - GetAssetRequest.create = function create(properties) { - return new GetAssetRequest(properties); + GetJobRequest.create = function create(properties) { + return new GetJobRequest(properties); }; /** - * Encodes the specified GetAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetAssetRequest.verify|verify} messages. + * Encodes the specified GetJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetJobRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @memberof google.cloud.dataplex.v1.GetJobRequest * @static - * @param {google.cloud.dataplex.v1.IGetAssetRequest} message GetAssetRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IGetJobRequest} message GetJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetAssetRequest.encode = function encode(message, writer) { + GetJobRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -21495,33 +29644,33 @@ }; /** - * Encodes the specified GetAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetAssetRequest.verify|verify} messages. + * Encodes the specified GetJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetJobRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @memberof google.cloud.dataplex.v1.GetJobRequest * @static - * @param {google.cloud.dataplex.v1.IGetAssetRequest} message GetAssetRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IGetJobRequest} message GetJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetJobRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetAssetRequest message from the specified reader or buffer. + * Decodes a GetJobRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @memberof google.cloud.dataplex.v1.GetJobRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest + * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetAssetRequest.decode = function decode(reader, length) { + GetJobRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetAssetRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetJobRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -21537,30 +29686,30 @@ }; /** - * Decodes a GetAssetRequest message from the specified reader or buffer, length delimited. + * Decodes a GetJobRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @memberof google.cloud.dataplex.v1.GetJobRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest + * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetAssetRequest.decodeDelimited = function decodeDelimited(reader) { + GetJobRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetAssetRequest message. + * Verifies a GetJobRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @memberof google.cloud.dataplex.v1.GetJobRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetAssetRequest.verify = function verify(message) { + GetJobRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -21570,32 +29719,32 @@ }; /** - * Creates a GetAssetRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetJobRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @memberof google.cloud.dataplex.v1.GetJobRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest + * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest */ - GetAssetRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetAssetRequest) + GetJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetJobRequest) return object; - var message = new $root.google.cloud.dataplex.v1.GetAssetRequest(); + var message = new $root.google.cloud.dataplex.v1.GetJobRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a GetAssetRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetJobRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @memberof google.cloud.dataplex.v1.GetJobRequest * @static - * @param {google.cloud.dataplex.v1.GetAssetRequest} message GetAssetRequest + * @param {google.cloud.dataplex.v1.GetJobRequest} message GetJobRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetAssetRequest.toObject = function toObject(message, options) { + GetJobRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -21607,43 +29756,39 @@ }; /** - * Converts this GetAssetRequest to JSON. + * Converts this GetJobRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @memberof google.cloud.dataplex.v1.GetJobRequest * @instance * @returns {Object.} JSON object */ - GetAssetRequest.prototype.toJSON = function toJSON() { + GetJobRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetAssetRequest; + return GetJobRequest; })(); - v1.OperationMetadata = (function() { + v1.ListJobsRequest = (function() { /** - * Properties of an OperationMetadata. + * Properties of a ListJobsRequest. * @memberof google.cloud.dataplex.v1 - * @interface IOperationMetadata - * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime - * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime - * @property {string|null} [target] OperationMetadata target - * @property {string|null} [verb] OperationMetadata verb - * @property {string|null} [statusMessage] OperationMetadata statusMessage - * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation - * @property {string|null} [apiVersion] OperationMetadata apiVersion + * @interface IListJobsRequest + * @property {string|null} [parent] ListJobsRequest parent + * @property {number|null} [pageSize] ListJobsRequest pageSize + * @property {string|null} [pageToken] ListJobsRequest pageToken */ /** - * Constructs a new OperationMetadata. + * Constructs a new ListJobsRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an OperationMetadata. - * @implements IOperationMetadata + * @classdesc Represents a ListJobsRequest. + * @implements IListJobsRequest * @constructor - * @param {google.cloud.dataplex.v1.IOperationMetadata=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IListJobsRequest=} [properties] Properties to set */ - function OperationMetadata(properties) { + function ListJobsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21651,153 +29796,101 @@ } /** - * OperationMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dataplex.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.createTime = null; - - /** - * OperationMetadata endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.dataplex.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.endTime = null; - - /** - * OperationMetadata target. - * @member {string} target - * @memberof google.cloud.dataplex.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.target = ""; - - /** - * OperationMetadata verb. - * @member {string} verb - * @memberof google.cloud.dataplex.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.verb = ""; - - /** - * OperationMetadata statusMessage. - * @member {string} statusMessage - * @memberof google.cloud.dataplex.v1.OperationMetadata + * ListJobsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListJobsRequest * @instance */ - OperationMetadata.prototype.statusMessage = ""; + ListJobsRequest.prototype.parent = ""; /** - * OperationMetadata requestedCancellation. - * @member {boolean} requestedCancellation - * @memberof google.cloud.dataplex.v1.OperationMetadata + * ListJobsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListJobsRequest * @instance */ - OperationMetadata.prototype.requestedCancellation = false; + ListJobsRequest.prototype.pageSize = 0; /** - * OperationMetadata apiVersion. - * @member {string} apiVersion - * @memberof google.cloud.dataplex.v1.OperationMetadata + * ListJobsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListJobsRequest * @instance */ - OperationMetadata.prototype.apiVersion = ""; + ListJobsRequest.prototype.pageToken = ""; /** - * Creates a new OperationMetadata instance using the specified properties. + * Creates a new ListJobsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.OperationMetadata + * @memberof google.cloud.dataplex.v1.ListJobsRequest * @static - * @param {google.cloud.dataplex.v1.IOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.OperationMetadata} OperationMetadata instance + * @param {google.cloud.dataplex.v1.IListJobsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest instance */ - OperationMetadata.create = function create(properties) { - return new OperationMetadata(properties); + ListJobsRequest.create = function create(properties) { + return new ListJobsRequest(properties); }; /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.dataplex.v1.OperationMetadata.verify|verify} messages. + * Encodes the specified ListJobsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.OperationMetadata + * @memberof google.cloud.dataplex.v1.ListJobsRequest * @static - * @param {google.cloud.dataplex.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {google.cloud.dataplex.v1.IListJobsRequest} message ListJobsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationMetadata.encode = function encode(message, writer) { + ListJobsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); - if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); - if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); - if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.requestedCancellation); - if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.OperationMetadata.verify|verify} messages. + * Encodes the specified ListJobsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.OperationMetadata + * @memberof google.cloud.dataplex.v1.ListJobsRequest * @static - * @param {google.cloud.dataplex.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {google.cloud.dataplex.v1.IListJobsRequest} message ListJobsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + ListJobsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OperationMetadata message from the specified reader or buffer. + * Decodes a ListJobsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.OperationMetadata + * @memberof google.cloud.dataplex.v1.ListJobsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.OperationMetadata} OperationMetadata + * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OperationMetadata.decode = function decode(reader, length) { + ListJobsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.OperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListJobsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.parent = reader.string(); break; case 2: - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.pageSize = reader.int32(); break; case 3: - message.target = reader.string(); - break; - case 4: - message.verb = reader.string(); - break; - case 5: - message.statusMessage = reader.string(); - break; - case 6: - message.requestedCancellation = reader.bool(); - break; - case 7: - message.apiVersion = reader.string(); + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -21808,169 +29901,126 @@ }; /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a ListJobsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.OperationMetadata + * @memberof google.cloud.dataplex.v1.ListJobsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.OperationMetadata} OperationMetadata + * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OperationMetadata.decodeDelimited = function decodeDelimited(reader) { + ListJobsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OperationMetadata message. + * Verifies a ListJobsRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.OperationMetadata + * @memberof google.cloud.dataplex.v1.ListJobsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OperationMetadata.verify = function verify(message) { + ListJobsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.target != null && message.hasOwnProperty("target")) - if (!$util.isString(message.target)) - return "target: string expected"; - if (message.verb != null && message.hasOwnProperty("verb")) - if (!$util.isString(message.verb)) - return "verb: string expected"; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - if (!$util.isString(message.statusMessage)) - return "statusMessage: string expected"; - if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) - if (typeof message.requestedCancellation !== "boolean") - return "requestedCancellation: boolean expected"; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - if (!$util.isString(message.apiVersion)) - return "apiVersion: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a ListJobsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.OperationMetadata + * @memberof google.cloud.dataplex.v1.ListJobsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.OperationMetadata} OperationMetadata + * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest */ - OperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.OperationMetadata) + ListJobsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListJobsRequest) return object; - var message = new $root.google.cloud.dataplex.v1.OperationMetadata(); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.OperationMetadata.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.OperationMetadata.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - if (object.target != null) - message.target = String(object.target); - if (object.verb != null) - message.verb = String(object.verb); - if (object.statusMessage != null) - message.statusMessage = String(object.statusMessage); - if (object.requestedCancellation != null) - message.requestedCancellation = Boolean(object.requestedCancellation); - if (object.apiVersion != null) - message.apiVersion = String(object.apiVersion); + var message = new $root.google.cloud.dataplex.v1.ListJobsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * Creates a plain object from a ListJobsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.OperationMetadata + * @memberof google.cloud.dataplex.v1.ListJobsRequest * @static - * @param {google.cloud.dataplex.v1.OperationMetadata} message OperationMetadata + * @param {google.cloud.dataplex.v1.ListJobsRequest} message ListJobsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OperationMetadata.toObject = function toObject(message, options) { + ListJobsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.createTime = null; - object.endTime = null; - object.target = ""; - object.verb = ""; - object.statusMessage = ""; - object.requestedCancellation = false; - object.apiVersion = ""; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = message.target; - if (message.verb != null && message.hasOwnProperty("verb")) - object.verb = message.verb; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - object.statusMessage = message.statusMessage; - if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) - object.requestedCancellation = message.requestedCancellation; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - object.apiVersion = message.apiVersion; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this OperationMetadata to JSON. + * Converts this ListJobsRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.OperationMetadata + * @memberof google.cloud.dataplex.v1.ListJobsRequest * @instance * @returns {Object.} JSON object */ - OperationMetadata.prototype.toJSON = function toJSON() { + ListJobsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return OperationMetadata; + return ListJobsRequest; })(); - v1.CreateTaskRequest = (function() { + v1.ListJobsResponse = (function() { /** - * Properties of a CreateTaskRequest. + * Properties of a ListJobsResponse. * @memberof google.cloud.dataplex.v1 - * @interface ICreateTaskRequest - * @property {string|null} [parent] CreateTaskRequest parent - * @property {string|null} [taskId] CreateTaskRequest taskId - * @property {google.cloud.dataplex.v1.ITask|null} [task] CreateTaskRequest task - * @property {boolean|null} [validateOnly] CreateTaskRequest validateOnly + * @interface IListJobsResponse + * @property {Array.|null} [jobs] ListJobsResponse jobs + * @property {string|null} [nextPageToken] ListJobsResponse nextPageToken */ /** - * Constructs a new CreateTaskRequest. + * Constructs a new ListJobsResponse. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CreateTaskRequest. - * @implements ICreateTaskRequest + * @classdesc Represents a ListJobsResponse. + * @implements IListJobsResponse * @constructor - * @param {google.cloud.dataplex.v1.ICreateTaskRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IListJobsResponse=} [properties] Properties to set */ - function CreateTaskRequest(properties) { + function ListJobsResponse(properties) { + this.jobs = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21978,114 +30028,91 @@ } /** - * CreateTaskRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.CreateTaskRequest - * @instance - */ - CreateTaskRequest.prototype.parent = ""; - - /** - * CreateTaskRequest taskId. - * @member {string} taskId - * @memberof google.cloud.dataplex.v1.CreateTaskRequest - * @instance - */ - CreateTaskRequest.prototype.taskId = ""; - - /** - * CreateTaskRequest task. - * @member {google.cloud.dataplex.v1.ITask|null|undefined} task - * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * ListJobsResponse jobs. + * @member {Array.} jobs + * @memberof google.cloud.dataplex.v1.ListJobsResponse * @instance */ - CreateTaskRequest.prototype.task = null; + ListJobsResponse.prototype.jobs = $util.emptyArray; /** - * CreateTaskRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * ListJobsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListJobsResponse * @instance */ - CreateTaskRequest.prototype.validateOnly = false; + ListJobsResponse.prototype.nextPageToken = ""; /** - * Creates a new CreateTaskRequest instance using the specified properties. + * Creates a new ListJobsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @memberof google.cloud.dataplex.v1.ListJobsResponse * @static - * @param {google.cloud.dataplex.v1.ICreateTaskRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest instance + * @param {google.cloud.dataplex.v1.IListJobsResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse instance */ - CreateTaskRequest.create = function create(properties) { - return new CreateTaskRequest(properties); + ListJobsResponse.create = function create(properties) { + return new ListJobsResponse(properties); }; /** - * Encodes the specified CreateTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateTaskRequest.verify|verify} messages. + * Encodes the specified ListJobsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @memberof google.cloud.dataplex.v1.ListJobsResponse * @static - * @param {google.cloud.dataplex.v1.ICreateTaskRequest} message CreateTaskRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListJobsResponse} message ListJobsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTaskRequest.encode = function encode(message, writer) { + ListJobsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.taskId != null && Object.hasOwnProperty.call(message, "taskId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.taskId); - if (message.task != null && Object.hasOwnProperty.call(message, "task")) - $root.google.cloud.dataplex.v1.Task.encode(message.task, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + if (message.jobs != null && message.jobs.length) + for (var i = 0; i < message.jobs.length; ++i) + $root.google.cloud.dataplex.v1.Job.encode(message.jobs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified CreateTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateTaskRequest.verify|verify} messages. + * Encodes the specified ListJobsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @memberof google.cloud.dataplex.v1.ListJobsResponse * @static - * @param {google.cloud.dataplex.v1.ICreateTaskRequest} message CreateTaskRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListJobsResponse} message ListJobsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListJobsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateTaskRequest message from the specified reader or buffer. + * Decodes a ListJobsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @memberof google.cloud.dataplex.v1.ListJobsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest + * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTaskRequest.decode = function decode(reader, length) { + ListJobsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateTaskRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListJobsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + if (!(message.jobs && message.jobs.length)) + message.jobs = []; + message.jobs.push($root.google.cloud.dataplex.v1.Job.decode(reader, reader.uint32())); break; case 2: - message.taskId = reader.string(); - break; - case 3: - message.task = $root.google.cloud.dataplex.v1.Task.decode(reader, reader.uint32()); - break; - case 4: - message.validateOnly = reader.bool(); + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -22096,139 +30123,133 @@ }; /** - * Decodes a CreateTaskRequest message from the specified reader or buffer, length delimited. + * Decodes a ListJobsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @memberof google.cloud.dataplex.v1.ListJobsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest + * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTaskRequest.decodeDelimited = function decodeDelimited(reader) { + ListJobsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateTaskRequest message. + * Verifies a ListJobsResponse message. * @function verify - * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @memberof google.cloud.dataplex.v1.ListJobsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateTaskRequest.verify = function verify(message) { + ListJobsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.taskId != null && message.hasOwnProperty("taskId")) - if (!$util.isString(message.taskId)) - return "taskId: string expected"; - if (message.task != null && message.hasOwnProperty("task")) { - var error = $root.google.cloud.dataplex.v1.Task.verify(message.task); - if (error) - return "task." + error; + if (message.jobs != null && message.hasOwnProperty("jobs")) { + if (!Array.isArray(message.jobs)) + return "jobs: array expected"; + for (var i = 0; i < message.jobs.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Job.verify(message.jobs[i]); + if (error) + return "jobs." + error; + } } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a CreateTaskRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListJobsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @memberof google.cloud.dataplex.v1.ListJobsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest + * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse */ - CreateTaskRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.CreateTaskRequest) + ListJobsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListJobsResponse) return object; - var message = new $root.google.cloud.dataplex.v1.CreateTaskRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.taskId != null) - message.taskId = String(object.taskId); - if (object.task != null) { - if (typeof object.task !== "object") - throw TypeError(".google.cloud.dataplex.v1.CreateTaskRequest.task: object expected"); - message.task = $root.google.cloud.dataplex.v1.Task.fromObject(object.task); + var message = new $root.google.cloud.dataplex.v1.ListJobsResponse(); + if (object.jobs) { + if (!Array.isArray(object.jobs)) + throw TypeError(".google.cloud.dataplex.v1.ListJobsResponse.jobs: array expected"); + message.jobs = []; + for (var i = 0; i < object.jobs.length; ++i) { + if (typeof object.jobs[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListJobsResponse.jobs: object expected"); + message.jobs[i] = $root.google.cloud.dataplex.v1.Job.fromObject(object.jobs[i]); + } } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a CreateTaskRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListJobsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @memberof google.cloud.dataplex.v1.ListJobsResponse * @static - * @param {google.cloud.dataplex.v1.CreateTaskRequest} message CreateTaskRequest + * @param {google.cloud.dataplex.v1.ListJobsResponse} message ListJobsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateTaskRequest.toObject = function toObject(message, options) { + ListJobsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.taskId = ""; - object.task = null; - object.validateOnly = false; + if (options.arrays || options.defaults) + object.jobs = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.jobs && message.jobs.length) { + object.jobs = []; + for (var j = 0; j < message.jobs.length; ++j) + object.jobs[j] = $root.google.cloud.dataplex.v1.Job.toObject(message.jobs[j], options); } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.taskId != null && message.hasOwnProperty("taskId")) - object.taskId = message.taskId; - if (message.task != null && message.hasOwnProperty("task")) - object.task = $root.google.cloud.dataplex.v1.Task.toObject(message.task, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this CreateTaskRequest to JSON. + * Converts this ListJobsResponse to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @memberof google.cloud.dataplex.v1.ListJobsResponse * @instance * @returns {Object.} JSON object */ - CreateTaskRequest.prototype.toJSON = function toJSON() { + ListJobsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateTaskRequest; + return ListJobsResponse; })(); - v1.UpdateTaskRequest = (function() { + v1.CancelJobRequest = (function() { /** - * Properties of an UpdateTaskRequest. + * Properties of a CancelJobRequest. * @memberof google.cloud.dataplex.v1 - * @interface IUpdateTaskRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTaskRequest updateMask - * @property {google.cloud.dataplex.v1.ITask|null} [task] UpdateTaskRequest task - * @property {boolean|null} [validateOnly] UpdateTaskRequest validateOnly + * @interface ICancelJobRequest + * @property {string|null} [name] CancelJobRequest name */ /** - * Constructs a new UpdateTaskRequest. + * Constructs a new CancelJobRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an UpdateTaskRequest. - * @implements IUpdateTaskRequest + * @classdesc Represents a CancelJobRequest. + * @implements ICancelJobRequest * @constructor - * @param {google.cloud.dataplex.v1.IUpdateTaskRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.ICancelJobRequest=} [properties] Properties to set */ - function UpdateTaskRequest(properties) { + function CancelJobRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22236,101 +30257,75 @@ } /** - * UpdateTaskRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest - * @instance - */ - UpdateTaskRequest.prototype.updateMask = null; - - /** - * UpdateTaskRequest task. - * @member {google.cloud.dataplex.v1.ITask|null|undefined} task - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest - * @instance - */ - UpdateTaskRequest.prototype.task = null; - - /** - * UpdateTaskRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * CancelJobRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.CancelJobRequest * @instance */ - UpdateTaskRequest.prototype.validateOnly = false; + CancelJobRequest.prototype.name = ""; /** - * Creates a new UpdateTaskRequest instance using the specified properties. + * Creates a new CancelJobRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @memberof google.cloud.dataplex.v1.CancelJobRequest * @static - * @param {google.cloud.dataplex.v1.IUpdateTaskRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest instance + * @param {google.cloud.dataplex.v1.ICancelJobRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest instance */ - UpdateTaskRequest.create = function create(properties) { - return new UpdateTaskRequest(properties); + CancelJobRequest.create = function create(properties) { + return new CancelJobRequest(properties); }; /** - * Encodes the specified UpdateTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateTaskRequest.verify|verify} messages. + * Encodes the specified CancelJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CancelJobRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @memberof google.cloud.dataplex.v1.CancelJobRequest * @static - * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} message UpdateTaskRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.ICancelJobRequest} message CancelJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateTaskRequest.encode = function encode(message, writer) { + CancelJobRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.task != null && Object.hasOwnProperty.call(message, "task")) - $root.google.cloud.dataplex.v1.Task.encode(message.task, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified UpdateTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateTaskRequest.verify|verify} messages. + * Encodes the specified CancelJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CancelJobRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @memberof google.cloud.dataplex.v1.CancelJobRequest * @static - * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} message UpdateTaskRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.ICancelJobRequest} message CancelJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { + CancelJobRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateTaskRequest message from the specified reader or buffer. + * Decodes a CancelJobRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @memberof google.cloud.dataplex.v1.CancelJobRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest + * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateTaskRequest.decode = function decode(reader, length) { + CancelJobRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateTaskRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CancelJobRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 2: - message.task = $root.google.cloud.dataplex.v1.Task.decode(reader, reader.uint32()); - break; - case 3: - message.validateOnly = reader.bool(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -22341,134 +30336,110 @@ }; /** - * Decodes an UpdateTaskRequest message from the specified reader or buffer, length delimited. + * Decodes a CancelJobRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @memberof google.cloud.dataplex.v1.CancelJobRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest + * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateTaskRequest.decodeDelimited = function decodeDelimited(reader) { + CancelJobRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateTaskRequest message. + * Verifies a CancelJobRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @memberof google.cloud.dataplex.v1.CancelJobRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateTaskRequest.verify = function verify(message) { + CancelJobRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.task != null && message.hasOwnProperty("task")) { - var error = $root.google.cloud.dataplex.v1.Task.verify(message.task); - if (error) - return "task." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates an UpdateTaskRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CancelJobRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @memberof google.cloud.dataplex.v1.CancelJobRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest + * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest */ - UpdateTaskRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.UpdateTaskRequest) + CancelJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CancelJobRequest) return object; - var message = new $root.google.cloud.dataplex.v1.UpdateTaskRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateTaskRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.task != null) { - if (typeof object.task !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateTaskRequest.task: object expected"); - message.task = $root.google.cloud.dataplex.v1.Task.fromObject(object.task); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); + var message = new $root.google.cloud.dataplex.v1.CancelJobRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from an UpdateTaskRequest message. Also converts values to other types if specified. + * Creates a plain object from a CancelJobRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @memberof google.cloud.dataplex.v1.CancelJobRequest * @static - * @param {google.cloud.dataplex.v1.UpdateTaskRequest} message UpdateTaskRequest + * @param {google.cloud.dataplex.v1.CancelJobRequest} message CancelJobRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateTaskRequest.toObject = function toObject(message, options) { + CancelJobRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.updateMask = null; - object.task = null; - object.validateOnly = false; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.task != null && message.hasOwnProperty("task")) - object.task = $root.google.cloud.dataplex.v1.Task.toObject(message.task, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this UpdateTaskRequest to JSON. + * Converts this CancelJobRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @memberof google.cloud.dataplex.v1.CancelJobRequest * @instance * @returns {Object.} JSON object */ - UpdateTaskRequest.prototype.toJSON = function toJSON() { + CancelJobRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateTaskRequest; + return CancelJobRequest; })(); - v1.DeleteTaskRequest = (function() { + v1.CreateEnvironmentRequest = (function() { /** - * Properties of a DeleteTaskRequest. + * Properties of a CreateEnvironmentRequest. * @memberof google.cloud.dataplex.v1 - * @interface IDeleteTaskRequest - * @property {string|null} [name] DeleteTaskRequest name + * @interface ICreateEnvironmentRequest + * @property {string|null} [parent] CreateEnvironmentRequest parent + * @property {string|null} [environmentId] CreateEnvironmentRequest environmentId + * @property {google.cloud.dataplex.v1.IEnvironment|null} [environment] CreateEnvironmentRequest environment + * @property {boolean|null} [validateOnly] CreateEnvironmentRequest validateOnly */ /** - * Constructs a new DeleteTaskRequest. + * Constructs a new CreateEnvironmentRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DeleteTaskRequest. - * @implements IDeleteTaskRequest + * @classdesc Represents a CreateEnvironmentRequest. + * @implements ICreateEnvironmentRequest * @constructor - * @param {google.cloud.dataplex.v1.IDeleteTaskRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest=} [properties] Properties to set */ - function DeleteTaskRequest(properties) { + function CreateEnvironmentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22476,75 +30447,114 @@ } /** - * DeleteTaskRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * CreateEnvironmentRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @instance + */ + CreateEnvironmentRequest.prototype.parent = ""; + + /** + * CreateEnvironmentRequest environmentId. + * @member {string} environmentId + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @instance + */ + CreateEnvironmentRequest.prototype.environmentId = ""; + + /** + * CreateEnvironmentRequest environment. + * @member {google.cloud.dataplex.v1.IEnvironment|null|undefined} environment + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @instance + */ + CreateEnvironmentRequest.prototype.environment = null; + + /** + * CreateEnvironmentRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest * @instance */ - DeleteTaskRequest.prototype.name = ""; + CreateEnvironmentRequest.prototype.validateOnly = false; /** - * Creates a new DeleteTaskRequest instance using the specified properties. + * Creates a new CreateEnvironmentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest * @static - * @param {google.cloud.dataplex.v1.IDeleteTaskRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest instance + * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateEnvironmentRequest} CreateEnvironmentRequest instance */ - DeleteTaskRequest.create = function create(properties) { - return new DeleteTaskRequest(properties); + CreateEnvironmentRequest.create = function create(properties) { + return new CreateEnvironmentRequest(properties); }; /** - * Encodes the specified DeleteTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteTaskRequest.verify|verify} messages. + * Encodes the specified CreateEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateEnvironmentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest * @static - * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} message DeleteTaskRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteTaskRequest.encode = function encode(message, writer) { + CreateEnvironmentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.environmentId != null && Object.hasOwnProperty.call(message, "environmentId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.environmentId); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + $root.google.cloud.dataplex.v1.Environment.encode(message.environment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); return writer; }; /** - * Encodes the specified DeleteTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteTaskRequest.verify|verify} messages. + * Encodes the specified CreateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateEnvironmentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest * @static - * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} message DeleteTaskRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteTaskRequest message from the specified reader or buffer. + * Decodes a CreateEnvironmentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest + * @returns {google.cloud.dataplex.v1.CreateEnvironmentRequest} CreateEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteTaskRequest.decode = function decode(reader, length) { + CreateEnvironmentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteTaskRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateEnvironmentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.parent = reader.string(); + break; + case 2: + message.environmentId = reader.string(); + break; + case 3: + message.environment = $root.google.cloud.dataplex.v1.Environment.decode(reader, reader.uint32()); + break; + case 4: + message.validateOnly = reader.bool(); break; default: reader.skipType(tag & 7); @@ -22555,111 +30565,139 @@ }; /** - * Decodes a DeleteTaskRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateEnvironmentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest + * @returns {google.cloud.dataplex.v1.CreateEnvironmentRequest} CreateEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteTaskRequest.decodeDelimited = function decodeDelimited(reader) { + CreateEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteTaskRequest message. + * Verifies a CreateEnvironmentRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteTaskRequest.verify = function verify(message) { + CreateEnvironmentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.environmentId != null && message.hasOwnProperty("environmentId")) + if (!$util.isString(message.environmentId)) + return "environmentId: string expected"; + if (message.environment != null && message.hasOwnProperty("environment")) { + var error = $root.google.cloud.dataplex.v1.Environment.verify(message.environment); + if (error) + return "environment." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a DeleteTaskRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest + * @returns {google.cloud.dataplex.v1.CreateEnvironmentRequest} CreateEnvironmentRequest */ - DeleteTaskRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DeleteTaskRequest) + CreateEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateEnvironmentRequest) return object; - var message = new $root.google.cloud.dataplex.v1.DeleteTaskRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dataplex.v1.CreateEnvironmentRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.environmentId != null) + message.environmentId = String(object.environmentId); + if (object.environment != null) { + if (typeof object.environment !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateEnvironmentRequest.environment: object expected"); + message.environment = $root.google.cloud.dataplex.v1.Environment.fromObject(object.environment); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a DeleteTaskRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateEnvironmentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest * @static - * @param {google.cloud.dataplex.v1.DeleteTaskRequest} message DeleteTaskRequest + * @param {google.cloud.dataplex.v1.CreateEnvironmentRequest} message CreateEnvironmentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteTaskRequest.toObject = function toObject(message, options) { + CreateEnvironmentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.parent = ""; + object.environmentId = ""; + object.environment = null; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.environmentId != null && message.hasOwnProperty("environmentId")) + object.environmentId = message.environmentId; + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = $root.google.cloud.dataplex.v1.Environment.toObject(message.environment, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this DeleteTaskRequest to JSON. + * Converts this CreateEnvironmentRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest * @instance * @returns {Object.} JSON object */ - DeleteTaskRequest.prototype.toJSON = function toJSON() { + CreateEnvironmentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteTaskRequest; + return CreateEnvironmentRequest; })(); - v1.ListTasksRequest = (function() { + v1.UpdateEnvironmentRequest = (function() { /** - * Properties of a ListTasksRequest. + * Properties of an UpdateEnvironmentRequest. * @memberof google.cloud.dataplex.v1 - * @interface IListTasksRequest - * @property {string|null} [parent] ListTasksRequest parent - * @property {number|null} [pageSize] ListTasksRequest pageSize - * @property {string|null} [pageToken] ListTasksRequest pageToken - * @property {string|null} [filter] ListTasksRequest filter - * @property {string|null} [orderBy] ListTasksRequest orderBy + * @interface IUpdateEnvironmentRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEnvironmentRequest updateMask + * @property {google.cloud.dataplex.v1.IEnvironment|null} [environment] UpdateEnvironmentRequest environment + * @property {boolean|null} [validateOnly] UpdateEnvironmentRequest validateOnly */ /** - * Constructs a new ListTasksRequest. + * Constructs a new UpdateEnvironmentRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListTasksRequest. - * @implements IListTasksRequest + * @classdesc Represents an UpdateEnvironmentRequest. + * @implements IUpdateEnvironmentRequest * @constructor - * @param {google.cloud.dataplex.v1.IListTasksRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest=} [properties] Properties to set */ - function ListTasksRequest(properties) { + function UpdateEnvironmentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22667,127 +30705,101 @@ } /** - * ListTasksRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListTasksRequest - * @instance - */ - ListTasksRequest.prototype.parent = ""; - - /** - * ListTasksRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListTasksRequest - * @instance - */ - ListTasksRequest.prototype.pageSize = 0; - - /** - * ListTasksRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListTasksRequest + * UpdateEnvironmentRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest * @instance */ - ListTasksRequest.prototype.pageToken = ""; + UpdateEnvironmentRequest.prototype.updateMask = null; /** - * ListTasksRequest filter. - * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListTasksRequest + * UpdateEnvironmentRequest environment. + * @member {google.cloud.dataplex.v1.IEnvironment|null|undefined} environment + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest * @instance */ - ListTasksRequest.prototype.filter = ""; + UpdateEnvironmentRequest.prototype.environment = null; /** - * ListTasksRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.dataplex.v1.ListTasksRequest + * UpdateEnvironmentRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest * @instance */ - ListTasksRequest.prototype.orderBy = ""; + UpdateEnvironmentRequest.prototype.validateOnly = false; /** - * Creates a new ListTasksRequest instance using the specified properties. + * Creates a new UpdateEnvironmentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest * @static - * @param {google.cloud.dataplex.v1.IListTasksRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest instance + * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest instance */ - ListTasksRequest.create = function create(properties) { - return new ListTasksRequest(properties); + UpdateEnvironmentRequest.create = function create(properties) { + return new UpdateEnvironmentRequest(properties); }; /** - * Encodes the specified ListTasksRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksRequest.verify|verify} messages. + * Encodes the specified UpdateEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEnvironmentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest * @static - * @param {google.cloud.dataplex.v1.IListTasksRequest} message ListTasksRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTasksRequest.encode = function encode(message, writer) { + UpdateEnvironmentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + $root.google.cloud.dataplex.v1.Environment.encode(message.environment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); return writer; }; /** - * Encodes the specified ListTasksRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksRequest.verify|verify} messages. + * Encodes the specified UpdateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEnvironmentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest * @static - * @param {google.cloud.dataplex.v1.IListTasksRequest} message ListTasksRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTasksRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListTasksRequest message from the specified reader or buffer. + * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest + * @returns {google.cloud.dataplex.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTasksRequest.decode = function decode(reader, length) { + UpdateEnvironmentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListTasksRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateEnvironmentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; case 2: - message.pageSize = reader.int32(); + message.environment = $root.google.cloud.dataplex.v1.Environment.decode(reader, reader.uint32()); break; case 3: - message.pageToken = reader.string(); - break; - case 4: - message.filter = reader.string(); - break; - case 5: - message.orderBy = reader.string(); + message.validateOnly = reader.bool(); break; default: reader.skipType(tag & 7); @@ -22798,144 +30810,134 @@ }; /** - * Decodes a ListTasksRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest + * @returns {google.cloud.dataplex.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTasksRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListTasksRequest message. + * Verifies an UpdateEnvironmentRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListTasksRequest.verify = function verify(message) { + UpdateEnvironmentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.environment != null && message.hasOwnProperty("environment")) { + var error = $root.google.cloud.dataplex.v1.Environment.verify(message.environment); + if (error) + return "environment." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a ListTasksRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest + * @returns {google.cloud.dataplex.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest */ - ListTasksRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListTasksRequest) + UpdateEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateEnvironmentRequest) return object; - var message = new $root.google.cloud.dataplex.v1.ListTasksRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); + var message = new $root.google.cloud.dataplex.v1.UpdateEnvironmentRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateEnvironmentRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.environment != null) { + if (typeof object.environment !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateEnvironmentRequest.environment: object expected"); + message.environment = $root.google.cloud.dataplex.v1.Environment.fromObject(object.environment); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a ListTasksRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateEnvironmentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest * @static - * @param {google.cloud.dataplex.v1.ListTasksRequest} message ListTasksRequest + * @param {google.cloud.dataplex.v1.UpdateEnvironmentRequest} message UpdateEnvironmentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListTasksRequest.toObject = function toObject(message, options) { + UpdateEnvironmentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; + if (options.defaults) { + object.updateMask = null; + object.environment = null; + object.validateOnly = false; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = $root.google.cloud.dataplex.v1.Environment.toObject(message.environment, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this ListTasksRequest to JSON. + * Converts this UpdateEnvironmentRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest * @instance * @returns {Object.} JSON object */ - ListTasksRequest.prototype.toJSON = function toJSON() { + UpdateEnvironmentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListTasksRequest; + return UpdateEnvironmentRequest; })(); - v1.ListTasksResponse = (function() { + v1.DeleteEnvironmentRequest = (function() { /** - * Properties of a ListTasksResponse. + * Properties of a DeleteEnvironmentRequest. * @memberof google.cloud.dataplex.v1 - * @interface IListTasksResponse - * @property {Array.|null} [tasks] ListTasksResponse tasks - * @property {string|null} [nextPageToken] ListTasksResponse nextPageToken - * @property {Array.|null} [unreachableLocations] ListTasksResponse unreachableLocations + * @interface IDeleteEnvironmentRequest + * @property {string|null} [name] DeleteEnvironmentRequest name */ /** - * Constructs a new ListTasksResponse. + * Constructs a new DeleteEnvironmentRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListTasksResponse. - * @implements IListTasksResponse + * @classdesc Represents a DeleteEnvironmentRequest. + * @implements IDeleteEnvironmentRequest * @constructor - * @param {google.cloud.dataplex.v1.IListTasksResponse=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest=} [properties] Properties to set */ - function ListTasksResponse(properties) { - this.tasks = []; - this.unreachableLocations = []; + function DeleteEnvironmentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22943,107 +30945,75 @@ } /** - * ListTasksResponse tasks. - * @member {Array.} tasks - * @memberof google.cloud.dataplex.v1.ListTasksResponse - * @instance - */ - ListTasksResponse.prototype.tasks = $util.emptyArray; - - /** - * ListTasksResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListTasksResponse - * @instance - */ - ListTasksResponse.prototype.nextPageToken = ""; - - /** - * ListTasksResponse unreachableLocations. - * @member {Array.} unreachableLocations - * @memberof google.cloud.dataplex.v1.ListTasksResponse + * DeleteEnvironmentRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest * @instance */ - ListTasksResponse.prototype.unreachableLocations = $util.emptyArray; + DeleteEnvironmentRequest.prototype.name = ""; /** - * Creates a new ListTasksResponse instance using the specified properties. + * Creates a new DeleteEnvironmentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest * @static - * @param {google.cloud.dataplex.v1.IListTasksResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse instance + * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest instance */ - ListTasksResponse.create = function create(properties) { - return new ListTasksResponse(properties); + DeleteEnvironmentRequest.create = function create(properties) { + return new DeleteEnvironmentRequest(properties); }; /** - * Encodes the specified ListTasksResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksResponse.verify|verify} messages. + * Encodes the specified DeleteEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEnvironmentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest * @static - * @param {google.cloud.dataplex.v1.IListTasksResponse} message ListTasksResponse message or plain object to encode + * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTasksResponse.encode = function encode(message, writer) { + DeleteEnvironmentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tasks != null && message.tasks.length) - for (var i = 0; i < message.tasks.length; ++i) - $root.google.cloud.dataplex.v1.Task.encode(message.tasks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachableLocations != null && message.unreachableLocations.length) - for (var i = 0; i < message.unreachableLocations.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachableLocations[i]); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListTasksResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksResponse.verify|verify} messages. + * Encodes the specified DeleteEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEnvironmentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest * @static - * @param {google.cloud.dataplex.v1.IListTasksResponse} message ListTasksResponse message or plain object to encode + * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTasksResponse.encodeDelimited = function encodeDelimited(message, writer) { + DeleteEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListTasksResponse message from the specified reader or buffer. + * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse + * @returns {google.cloud.dataplex.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTasksResponse.decode = function decode(reader, length) { + DeleteEnvironmentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListTasksResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteEnvironmentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.tasks && message.tasks.length)) - message.tasks = []; - message.tasks.push($root.google.cloud.dataplex.v1.Task.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - case 3: - if (!(message.unreachableLocations && message.unreachableLocations.length)) - message.unreachableLocations = []; - message.unreachableLocations.push(reader.string()); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -23054,154 +31024,111 @@ }; /** - * Decodes a ListTasksResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse + * @returns {google.cloud.dataplex.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTasksResponse.decodeDelimited = function decodeDelimited(reader) { + DeleteEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListTasksResponse message. + * Verifies a DeleteEnvironmentRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListTasksResponse.verify = function verify(message) { + DeleteEnvironmentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tasks != null && message.hasOwnProperty("tasks")) { - if (!Array.isArray(message.tasks)) - return "tasks: array expected"; - for (var i = 0; i < message.tasks.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Task.verify(message.tasks[i]); - if (error) - return "tasks." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachableLocations != null && message.hasOwnProperty("unreachableLocations")) { - if (!Array.isArray(message.unreachableLocations)) - return "unreachableLocations: array expected"; - for (var i = 0; i < message.unreachableLocations.length; ++i) - if (!$util.isString(message.unreachableLocations[i])) - return "unreachableLocations: string[] expected"; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListTasksResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteEnvironmentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse + * @returns {google.cloud.dataplex.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest */ - ListTasksResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListTasksResponse) + DeleteEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteEnvironmentRequest) return object; - var message = new $root.google.cloud.dataplex.v1.ListTasksResponse(); - if (object.tasks) { - if (!Array.isArray(object.tasks)) - throw TypeError(".google.cloud.dataplex.v1.ListTasksResponse.tasks: array expected"); - message.tasks = []; - for (var i = 0; i < object.tasks.length; ++i) { - if (typeof object.tasks[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListTasksResponse.tasks: object expected"); - message.tasks[i] = $root.google.cloud.dataplex.v1.Task.fromObject(object.tasks[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachableLocations) { - if (!Array.isArray(object.unreachableLocations)) - throw TypeError(".google.cloud.dataplex.v1.ListTasksResponse.unreachableLocations: array expected"); - message.unreachableLocations = []; - for (var i = 0; i < object.unreachableLocations.length; ++i) - message.unreachableLocations[i] = String(object.unreachableLocations[i]); - } + var message = new $root.google.cloud.dataplex.v1.DeleteEnvironmentRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListTasksResponse message. Also converts values to other types if specified. + * Creates a plain object from a DeleteEnvironmentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest * @static - * @param {google.cloud.dataplex.v1.ListTasksResponse} message ListTasksResponse + * @param {google.cloud.dataplex.v1.DeleteEnvironmentRequest} message DeleteEnvironmentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListTasksResponse.toObject = function toObject(message, options) { + DeleteEnvironmentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.tasks = []; - object.unreachableLocations = []; - } if (options.defaults) - object.nextPageToken = ""; - if (message.tasks && message.tasks.length) { - object.tasks = []; - for (var j = 0; j < message.tasks.length; ++j) - object.tasks[j] = $root.google.cloud.dataplex.v1.Task.toObject(message.tasks[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachableLocations && message.unreachableLocations.length) { - object.unreachableLocations = []; - for (var j = 0; j < message.unreachableLocations.length; ++j) - object.unreachableLocations[j] = message.unreachableLocations[j]; - } + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListTasksResponse to JSON. + * Converts this DeleteEnvironmentRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest * @instance * @returns {Object.} JSON object */ - ListTasksResponse.prototype.toJSON = function toJSON() { + DeleteEnvironmentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListTasksResponse; + return DeleteEnvironmentRequest; })(); - v1.GetTaskRequest = (function() { + v1.ListEnvironmentsRequest = (function() { /** - * Properties of a GetTaskRequest. + * Properties of a ListEnvironmentsRequest. * @memberof google.cloud.dataplex.v1 - * @interface IGetTaskRequest - * @property {string|null} [name] GetTaskRequest name + * @interface IListEnvironmentsRequest + * @property {string|null} [parent] ListEnvironmentsRequest parent + * @property {number|null} [pageSize] ListEnvironmentsRequest pageSize + * @property {string|null} [pageToken] ListEnvironmentsRequest pageToken + * @property {string|null} [filter] ListEnvironmentsRequest filter + * @property {string|null} [orderBy] ListEnvironmentsRequest orderBy */ /** - * Constructs a new GetTaskRequest. + * Constructs a new ListEnvironmentsRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetTaskRequest. - * @implements IGetTaskRequest + * @classdesc Represents a ListEnvironmentsRequest. + * @implements IListEnvironmentsRequest * @constructor - * @param {google.cloud.dataplex.v1.IGetTaskRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest=} [properties] Properties to set */ - function GetTaskRequest(properties) { + function ListEnvironmentsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23209,75 +31136,127 @@ } /** - * GetTaskRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.GetTaskRequest + * ListEnvironmentsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest * @instance */ - GetTaskRequest.prototype.name = ""; + ListEnvironmentsRequest.prototype.parent = ""; /** - * Creates a new GetTaskRequest instance using the specified properties. + * ListEnvironmentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @instance + */ + ListEnvironmentsRequest.prototype.pageSize = 0; + + /** + * ListEnvironmentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @instance + */ + ListEnvironmentsRequest.prototype.pageToken = ""; + + /** + * ListEnvironmentsRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @instance + */ + ListEnvironmentsRequest.prototype.filter = ""; + + /** + * ListEnvironmentsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @instance + */ + ListEnvironmentsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListEnvironmentsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest * @static - * @param {google.cloud.dataplex.v1.IGetTaskRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest instance + * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListEnvironmentsRequest} ListEnvironmentsRequest instance */ - GetTaskRequest.create = function create(properties) { - return new GetTaskRequest(properties); + ListEnvironmentsRequest.create = function create(properties) { + return new ListEnvironmentsRequest(properties); }; /** - * Encodes the specified GetTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetTaskRequest.verify|verify} messages. + * Encodes the specified ListEnvironmentsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest * @static - * @param {google.cloud.dataplex.v1.IGetTaskRequest} message GetTaskRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTaskRequest.encode = function encode(message, writer) { + ListEnvironmentsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; /** - * Encodes the specified GetTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetTaskRequest.verify|verify} messages. + * Encodes the specified ListEnvironmentsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest * @static - * @param {google.cloud.dataplex.v1.IGetTaskRequest} message GetTaskRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListEnvironmentsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetTaskRequest message from the specified reader or buffer. + * Decodes a ListEnvironmentsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest + * @returns {google.cloud.dataplex.v1.ListEnvironmentsRequest} ListEnvironmentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTaskRequest.decode = function decode(reader, length) { + ListEnvironmentsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetTaskRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListEnvironmentsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 4: + message.filter = reader.string(); + break; + case 5: + message.orderBy = reader.string(); break; default: reader.skipType(tag & 7); @@ -23288,107 +31267,142 @@ }; /** - * Decodes a GetTaskRequest message from the specified reader or buffer, length delimited. + * Decodes a ListEnvironmentsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest + * @returns {google.cloud.dataplex.v1.ListEnvironmentsRequest} ListEnvironmentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTaskRequest.decodeDelimited = function decodeDelimited(reader) { + ListEnvironmentsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetTaskRequest message. + * Verifies a ListEnvironmentsRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetTaskRequest.verify = function verify(message) { + ListEnvironmentsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; return null; }; /** - * Creates a GetTaskRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListEnvironmentsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest + * @returns {google.cloud.dataplex.v1.ListEnvironmentsRequest} ListEnvironmentsRequest */ - GetTaskRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetTaskRequest) + ListEnvironmentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListEnvironmentsRequest) return object; - var message = new $root.google.cloud.dataplex.v1.GetTaskRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dataplex.v1.ListEnvironmentsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); return message; }; /** - * Creates a plain object from a GetTaskRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListEnvironmentsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest * @static - * @param {google.cloud.dataplex.v1.GetTaskRequest} message GetTaskRequest + * @param {google.cloud.dataplex.v1.ListEnvironmentsRequest} message ListEnvironmentsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetTaskRequest.toObject = function toObject(message, options) { + ListEnvironmentsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; return object; }; /** - * Converts this GetTaskRequest to JSON. + * Converts this ListEnvironmentsRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest * @instance * @returns {Object.} JSON object */ - GetTaskRequest.prototype.toJSON = function toJSON() { + ListEnvironmentsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetTaskRequest; + return ListEnvironmentsRequest; })(); - v1.GetJobRequest = (function() { + v1.ListEnvironmentsResponse = (function() { /** - * Properties of a GetJobRequest. + * Properties of a ListEnvironmentsResponse. * @memberof google.cloud.dataplex.v1 - * @interface IGetJobRequest - * @property {string|null} [name] GetJobRequest name + * @interface IListEnvironmentsResponse + * @property {Array.|null} [environments] ListEnvironmentsResponse environments + * @property {string|null} [nextPageToken] ListEnvironmentsResponse nextPageToken */ /** - * Constructs a new GetJobRequest. + * Constructs a new ListEnvironmentsResponse. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetJobRequest. - * @implements IGetJobRequest + * @classdesc Represents a ListEnvironmentsResponse. + * @implements IListEnvironmentsResponse * @constructor - * @param {google.cloud.dataplex.v1.IGetJobRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IListEnvironmentsResponse=} [properties] Properties to set */ - function GetJobRequest(properties) { + function ListEnvironmentsResponse(properties) { + this.environments = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23396,75 +31410,91 @@ } /** - * GetJobRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.GetJobRequest + * ListEnvironmentsResponse environments. + * @member {Array.} environments + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse * @instance */ - GetJobRequest.prototype.name = ""; + ListEnvironmentsResponse.prototype.environments = $util.emptyArray; /** - * Creates a new GetJobRequest instance using the specified properties. + * ListEnvironmentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @instance + */ + ListEnvironmentsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListEnvironmentsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.GetJobRequest + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse * @static - * @param {google.cloud.dataplex.v1.IGetJobRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest instance + * @param {google.cloud.dataplex.v1.IListEnvironmentsResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListEnvironmentsResponse} ListEnvironmentsResponse instance */ - GetJobRequest.create = function create(properties) { - return new GetJobRequest(properties); + ListEnvironmentsResponse.create = function create(properties) { + return new ListEnvironmentsResponse(properties); }; /** - * Encodes the specified GetJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetJobRequest.verify|verify} messages. + * Encodes the specified ListEnvironmentsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.GetJobRequest + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse * @static - * @param {google.cloud.dataplex.v1.IGetJobRequest} message GetJobRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetJobRequest.encode = function encode(message, writer) { + ListEnvironmentsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.environments != null && message.environments.length) + for (var i = 0; i < message.environments.length; ++i) + $root.google.cloud.dataplex.v1.Environment.encode(message.environments[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified GetJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetJobRequest.verify|verify} messages. + * Encodes the specified ListEnvironmentsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetJobRequest + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse * @static - * @param {google.cloud.dataplex.v1.IGetJobRequest} message GetJobRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListEnvironmentsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetJobRequest message from the specified reader or buffer. + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.GetJobRequest + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest + * @returns {google.cloud.dataplex.v1.ListEnvironmentsResponse} ListEnvironmentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetJobRequest.decode = function decode(reader, length) { + ListEnvironmentsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetJobRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListEnvironmentsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + if (!(message.environments && message.environments.length)) + message.environments = []; + message.environments.push($root.google.cloud.dataplex.v1.Environment.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -23475,109 +31505,133 @@ }; /** - * Decodes a GetJobRequest message from the specified reader or buffer, length delimited. + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetJobRequest + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest + * @returns {google.cloud.dataplex.v1.ListEnvironmentsResponse} ListEnvironmentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetJobRequest.decodeDelimited = function decodeDelimited(reader) { + ListEnvironmentsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetJobRequest message. + * Verifies a ListEnvironmentsResponse message. * @function verify - * @memberof google.cloud.dataplex.v1.GetJobRequest + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetJobRequest.verify = function verify(message) { + ListEnvironmentsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.environments != null && message.hasOwnProperty("environments")) { + if (!Array.isArray(message.environments)) + return "environments: array expected"; + for (var i = 0; i < message.environments.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Environment.verify(message.environments[i]); + if (error) + return "environments." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a GetJobRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListEnvironmentsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.GetJobRequest + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest + * @returns {google.cloud.dataplex.v1.ListEnvironmentsResponse} ListEnvironmentsResponse */ - GetJobRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetJobRequest) + ListEnvironmentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListEnvironmentsResponse) return object; - var message = new $root.google.cloud.dataplex.v1.GetJobRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dataplex.v1.ListEnvironmentsResponse(); + if (object.environments) { + if (!Array.isArray(object.environments)) + throw TypeError(".google.cloud.dataplex.v1.ListEnvironmentsResponse.environments: array expected"); + message.environments = []; + for (var i = 0; i < object.environments.length; ++i) { + if (typeof object.environments[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListEnvironmentsResponse.environments: object expected"); + message.environments[i] = $root.google.cloud.dataplex.v1.Environment.fromObject(object.environments[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a GetJobRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListEnvironmentsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.GetJobRequest + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse * @static - * @param {google.cloud.dataplex.v1.GetJobRequest} message GetJobRequest + * @param {google.cloud.dataplex.v1.ListEnvironmentsResponse} message ListEnvironmentsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetJobRequest.toObject = function toObject(message, options) { + ListEnvironmentsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.environments = []; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + object.nextPageToken = ""; + if (message.environments && message.environments.length) { + object.environments = []; + for (var j = 0; j < message.environments.length; ++j) + object.environments[j] = $root.google.cloud.dataplex.v1.Environment.toObject(message.environments[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this GetJobRequest to JSON. + * Converts this ListEnvironmentsResponse to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.GetJobRequest + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse * @instance * @returns {Object.} JSON object */ - GetJobRequest.prototype.toJSON = function toJSON() { + ListEnvironmentsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetJobRequest; + return ListEnvironmentsResponse; })(); - v1.ListJobsRequest = (function() { + v1.GetEnvironmentRequest = (function() { /** - * Properties of a ListJobsRequest. + * Properties of a GetEnvironmentRequest. * @memberof google.cloud.dataplex.v1 - * @interface IListJobsRequest - * @property {string|null} [parent] ListJobsRequest parent - * @property {number|null} [pageSize] ListJobsRequest pageSize - * @property {string|null} [pageToken] ListJobsRequest pageToken + * @interface IGetEnvironmentRequest + * @property {string|null} [name] GetEnvironmentRequest name */ /** - * Constructs a new ListJobsRequest. + * Constructs a new GetEnvironmentRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListJobsRequest. - * @implements IListJobsRequest + * @classdesc Represents a GetEnvironmentRequest. + * @implements IGetEnvironmentRequest * @constructor - * @param {google.cloud.dataplex.v1.IListJobsRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest=} [properties] Properties to set */ - function ListJobsRequest(properties) { + function GetEnvironmentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23585,101 +31639,75 @@ } /** - * ListJobsRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListJobsRequest - * @instance - */ - ListJobsRequest.prototype.parent = ""; - - /** - * ListJobsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListJobsRequest - * @instance - */ - ListJobsRequest.prototype.pageSize = 0; - - /** - * ListJobsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListJobsRequest + * GetEnvironmentRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest * @instance */ - ListJobsRequest.prototype.pageToken = ""; + GetEnvironmentRequest.prototype.name = ""; /** - * Creates a new ListJobsRequest instance using the specified properties. + * Creates a new GetEnvironmentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest * @static - * @param {google.cloud.dataplex.v1.IListJobsRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest instance + * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetEnvironmentRequest} GetEnvironmentRequest instance */ - ListJobsRequest.create = function create(properties) { - return new ListJobsRequest(properties); + GetEnvironmentRequest.create = function create(properties) { + return new GetEnvironmentRequest(properties); }; /** - * Encodes the specified ListJobsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsRequest.verify|verify} messages. + * Encodes the specified GetEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetEnvironmentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest * @static - * @param {google.cloud.dataplex.v1.IListJobsRequest} message ListJobsRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListJobsRequest.encode = function encode(message, writer) { + GetEnvironmentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListJobsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsRequest.verify|verify} messages. + * Encodes the specified GetEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetEnvironmentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest * @static - * @param {google.cloud.dataplex.v1.IListJobsRequest} message ListJobsRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListJobsRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListJobsRequest message from the specified reader or buffer. + * Decodes a GetEnvironmentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest + * @returns {google.cloud.dataplex.v1.GetEnvironmentRequest} GetEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListJobsRequest.decode = function decode(reader, length) { + GetEnvironmentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListJobsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetEnvironmentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -23690,126 +31718,109 @@ }; /** - * Decodes a ListJobsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetEnvironmentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest + * @returns {google.cloud.dataplex.v1.GetEnvironmentRequest} GetEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListJobsRequest.decodeDelimited = function decodeDelimited(reader) { + GetEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListJobsRequest message. + * Verifies a GetEnvironmentRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListJobsRequest.verify = function verify(message) { + GetEnvironmentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListJobsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetEnvironmentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest + * @returns {google.cloud.dataplex.v1.GetEnvironmentRequest} GetEnvironmentRequest */ - ListJobsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListJobsRequest) + GetEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetEnvironmentRequest) return object; - var message = new $root.google.cloud.dataplex.v1.ListJobsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); + var message = new $root.google.cloud.dataplex.v1.GetEnvironmentRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListJobsRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetEnvironmentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest * @static - * @param {google.cloud.dataplex.v1.ListJobsRequest} message ListJobsRequest + * @param {google.cloud.dataplex.v1.GetEnvironmentRequest} message GetEnvironmentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListJobsRequest.toObject = function toObject(message, options) { + GetEnvironmentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListJobsRequest to JSON. + * Converts this GetEnvironmentRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest * @instance * @returns {Object.} JSON object */ - ListJobsRequest.prototype.toJSON = function toJSON() { + GetEnvironmentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListJobsRequest; + return GetEnvironmentRequest; })(); - v1.ListJobsResponse = (function() { + v1.ListSessionsRequest = (function() { /** - * Properties of a ListJobsResponse. + * Properties of a ListSessionsRequest. * @memberof google.cloud.dataplex.v1 - * @interface IListJobsResponse - * @property {Array.|null} [jobs] ListJobsResponse jobs - * @property {string|null} [nextPageToken] ListJobsResponse nextPageToken + * @interface IListSessionsRequest + * @property {string|null} [parent] ListSessionsRequest parent + * @property {number|null} [pageSize] ListSessionsRequest pageSize + * @property {string|null} [pageToken] ListSessionsRequest pageToken */ /** - * Constructs a new ListJobsResponse. + * Constructs a new ListSessionsRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListJobsResponse. - * @implements IListJobsResponse + * @classdesc Represents a ListSessionsRequest. + * @implements IListSessionsRequest * @constructor - * @param {google.cloud.dataplex.v1.IListJobsResponse=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IListSessionsRequest=} [properties] Properties to set */ - function ListJobsResponse(properties) { - this.jobs = []; + function ListSessionsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23817,91 +31828,101 @@ } /** - * ListJobsResponse jobs. - * @member {Array.} jobs - * @memberof google.cloud.dataplex.v1.ListJobsResponse + * ListSessionsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListSessionsRequest * @instance */ - ListJobsResponse.prototype.jobs = $util.emptyArray; + ListSessionsRequest.prototype.parent = ""; /** - * ListJobsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListJobsResponse + * ListSessionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListSessionsRequest * @instance */ - ListJobsResponse.prototype.nextPageToken = ""; + ListSessionsRequest.prototype.pageSize = 0; /** - * Creates a new ListJobsResponse instance using the specified properties. + * ListSessionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @instance + */ + ListSessionsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListSessionsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @memberof google.cloud.dataplex.v1.ListSessionsRequest * @static - * @param {google.cloud.dataplex.v1.IListJobsResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse instance + * @param {google.cloud.dataplex.v1.IListSessionsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListSessionsRequest} ListSessionsRequest instance */ - ListJobsResponse.create = function create(properties) { - return new ListJobsResponse(properties); + ListSessionsRequest.create = function create(properties) { + return new ListSessionsRequest(properties); }; /** - * Encodes the specified ListJobsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsResponse.verify|verify} messages. + * Encodes the specified ListSessionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @memberof google.cloud.dataplex.v1.ListSessionsRequest * @static - * @param {google.cloud.dataplex.v1.IListJobsResponse} message ListJobsResponse message or plain object to encode + * @param {google.cloud.dataplex.v1.IListSessionsRequest} message ListSessionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListJobsResponse.encode = function encode(message, writer) { + ListSessionsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.jobs != null && message.jobs.length) - for (var i = 0; i < message.jobs.length; ++i) - $root.google.cloud.dataplex.v1.Job.encode(message.jobs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified ListJobsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsResponse.verify|verify} messages. + * Encodes the specified ListSessionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @memberof google.cloud.dataplex.v1.ListSessionsRequest * @static - * @param {google.cloud.dataplex.v1.IListJobsResponse} message ListJobsResponse message or plain object to encode + * @param {google.cloud.dataplex.v1.IListSessionsRequest} message ListSessionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListJobsResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListSessionsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListJobsResponse message from the specified reader or buffer. + * Decodes a ListSessionsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @memberof google.cloud.dataplex.v1.ListSessionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse + * @returns {google.cloud.dataplex.v1.ListSessionsRequest} ListSessionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListJobsResponse.decode = function decode(reader, length) { + ListSessionsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListJobsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListSessionsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.jobs && message.jobs.length)) - message.jobs = []; - message.jobs.push($root.google.cloud.dataplex.v1.Job.decode(reader, reader.uint32())); + message.parent = reader.string(); break; case 2: - message.nextPageToken = reader.string(); + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -23912,133 +31933,126 @@ }; /** - * Decodes a ListJobsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListSessionsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @memberof google.cloud.dataplex.v1.ListSessionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse + * @returns {google.cloud.dataplex.v1.ListSessionsRequest} ListSessionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListJobsResponse.decodeDelimited = function decodeDelimited(reader) { + ListSessionsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListJobsResponse message. + * Verifies a ListSessionsRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @memberof google.cloud.dataplex.v1.ListSessionsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListJobsResponse.verify = function verify(message) { + ListSessionsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.jobs != null && message.hasOwnProperty("jobs")) { - if (!Array.isArray(message.jobs)) - return "jobs: array expected"; - for (var i = 0; i < message.jobs.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Job.verify(message.jobs[i]); - if (error) - return "jobs." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a ListJobsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListSessionsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @memberof google.cloud.dataplex.v1.ListSessionsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse + * @returns {google.cloud.dataplex.v1.ListSessionsRequest} ListSessionsRequest */ - ListJobsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListJobsResponse) + ListSessionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListSessionsRequest) return object; - var message = new $root.google.cloud.dataplex.v1.ListJobsResponse(); - if (object.jobs) { - if (!Array.isArray(object.jobs)) - throw TypeError(".google.cloud.dataplex.v1.ListJobsResponse.jobs: array expected"); - message.jobs = []; - for (var i = 0; i < object.jobs.length; ++i) { - if (typeof object.jobs[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListJobsResponse.jobs: object expected"); - message.jobs[i] = $root.google.cloud.dataplex.v1.Job.fromObject(object.jobs[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.cloud.dataplex.v1.ListSessionsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a ListJobsResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListSessionsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @memberof google.cloud.dataplex.v1.ListSessionsRequest * @static - * @param {google.cloud.dataplex.v1.ListJobsResponse} message ListJobsResponse + * @param {google.cloud.dataplex.v1.ListSessionsRequest} message ListSessionsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListJobsResponse.toObject = function toObject(message, options) { + ListSessionsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.jobs = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.jobs && message.jobs.length) { - object.jobs = []; - for (var j = 0; j < message.jobs.length; ++j) - object.jobs[j] = $root.google.cloud.dataplex.v1.Job.toObject(message.jobs[j], options); + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this ListJobsResponse to JSON. + * Converts this ListSessionsRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @memberof google.cloud.dataplex.v1.ListSessionsRequest * @instance * @returns {Object.} JSON object */ - ListJobsResponse.prototype.toJSON = function toJSON() { + ListSessionsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListJobsResponse; + return ListSessionsRequest; })(); - v1.CancelJobRequest = (function() { + v1.ListSessionsResponse = (function() { /** - * Properties of a CancelJobRequest. + * Properties of a ListSessionsResponse. * @memberof google.cloud.dataplex.v1 - * @interface ICancelJobRequest - * @property {string|null} [name] CancelJobRequest name + * @interface IListSessionsResponse + * @property {Array.|null} [sessions] ListSessionsResponse sessions + * @property {string|null} [nextPageToken] ListSessionsResponse nextPageToken */ /** - * Constructs a new CancelJobRequest. + * Constructs a new ListSessionsResponse. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CancelJobRequest. - * @implements ICancelJobRequest + * @classdesc Represents a ListSessionsResponse. + * @implements IListSessionsResponse * @constructor - * @param {google.cloud.dataplex.v1.ICancelJobRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IListSessionsResponse=} [properties] Properties to set */ - function CancelJobRequest(properties) { + function ListSessionsResponse(properties) { + this.sessions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24046,75 +32060,91 @@ } /** - * CancelJobRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.CancelJobRequest + * ListSessionsResponse sessions. + * @member {Array.} sessions + * @memberof google.cloud.dataplex.v1.ListSessionsResponse * @instance */ - CancelJobRequest.prototype.name = ""; + ListSessionsResponse.prototype.sessions = $util.emptyArray; /** - * Creates a new CancelJobRequest instance using the specified properties. + * ListSessionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @instance + */ + ListSessionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListSessionsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @memberof google.cloud.dataplex.v1.ListSessionsResponse * @static - * @param {google.cloud.dataplex.v1.ICancelJobRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest instance + * @param {google.cloud.dataplex.v1.IListSessionsResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListSessionsResponse} ListSessionsResponse instance */ - CancelJobRequest.create = function create(properties) { - return new CancelJobRequest(properties); + ListSessionsResponse.create = function create(properties) { + return new ListSessionsResponse(properties); }; /** - * Encodes the specified CancelJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CancelJobRequest.verify|verify} messages. + * Encodes the specified ListSessionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @memberof google.cloud.dataplex.v1.ListSessionsResponse * @static - * @param {google.cloud.dataplex.v1.ICancelJobRequest} message CancelJobRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListSessionsResponse} message ListSessionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CancelJobRequest.encode = function encode(message, writer) { + ListSessionsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.sessions != null && message.sessions.length) + for (var i = 0; i < message.sessions.length; ++i) + $root.google.cloud.dataplex.v1.Session.encode(message.sessions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified CancelJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CancelJobRequest.verify|verify} messages. + * Encodes the specified ListSessionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @memberof google.cloud.dataplex.v1.ListSessionsResponse * @static - * @param {google.cloud.dataplex.v1.ICancelJobRequest} message CancelJobRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListSessionsResponse} message ListSessionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CancelJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListSessionsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CancelJobRequest message from the specified reader or buffer. + * Decodes a ListSessionsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @memberof google.cloud.dataplex.v1.ListSessionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest + * @returns {google.cloud.dataplex.v1.ListSessionsResponse} ListSessionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CancelJobRequest.decode = function decode(reader, length) { + ListSessionsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CancelJobRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListSessionsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + if (!(message.sessions && message.sessions.length)) + message.sessions = []; + message.sessions.push($root.google.cloud.dataplex.v1.Session.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -24125,87 +32155,113 @@ }; /** - * Decodes a CancelJobRequest message from the specified reader or buffer, length delimited. + * Decodes a ListSessionsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @memberof google.cloud.dataplex.v1.ListSessionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest + * @returns {google.cloud.dataplex.v1.ListSessionsResponse} ListSessionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CancelJobRequest.decodeDelimited = function decodeDelimited(reader) { + ListSessionsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CancelJobRequest message. + * Verifies a ListSessionsResponse message. * @function verify - * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @memberof google.cloud.dataplex.v1.ListSessionsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CancelJobRequest.verify = function verify(message) { + ListSessionsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.sessions != null && message.hasOwnProperty("sessions")) { + if (!Array.isArray(message.sessions)) + return "sessions: array expected"; + for (var i = 0; i < message.sessions.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Session.verify(message.sessions[i]); + if (error) + return "sessions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a CancelJobRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListSessionsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @memberof google.cloud.dataplex.v1.ListSessionsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest + * @returns {google.cloud.dataplex.v1.ListSessionsResponse} ListSessionsResponse */ - CancelJobRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.CancelJobRequest) + ListSessionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListSessionsResponse) return object; - var message = new $root.google.cloud.dataplex.v1.CancelJobRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dataplex.v1.ListSessionsResponse(); + if (object.sessions) { + if (!Array.isArray(object.sessions)) + throw TypeError(".google.cloud.dataplex.v1.ListSessionsResponse.sessions: array expected"); + message.sessions = []; + for (var i = 0; i < object.sessions.length; ++i) { + if (typeof object.sessions[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListSessionsResponse.sessions: object expected"); + message.sessions[i] = $root.google.cloud.dataplex.v1.Session.fromObject(object.sessions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a CancelJobRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListSessionsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @memberof google.cloud.dataplex.v1.ListSessionsResponse * @static - * @param {google.cloud.dataplex.v1.CancelJobRequest} message CancelJobRequest + * @param {google.cloud.dataplex.v1.ListSessionsResponse} message ListSessionsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CancelJobRequest.toObject = function toObject(message, options) { + ListSessionsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.sessions = []; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + object.nextPageToken = ""; + if (message.sessions && message.sessions.length) { + object.sessions = []; + for (var j = 0; j < message.sessions.length; ++j) + object.sessions[j] = $root.google.cloud.dataplex.v1.Session.toObject(message.sessions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this CancelJobRequest to JSON. + * Converts this ListSessionsResponse to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @memberof google.cloud.dataplex.v1.ListSessionsResponse * @instance * @returns {Object.} JSON object */ - CancelJobRequest.prototype.toJSON = function toJSON() { + ListSessionsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CancelJobRequest; + return ListSessionsResponse; })(); v1.Task = (function() { diff --git a/packages/google-cloud-dataplex/protos/protos.json b/packages/google-cloud-dataplex/protos/protos.json index 341f4fedee7..98b7eebb9d0 100644 --- a/packages/google-cloud-dataplex/protos/protos.json +++ b/packages/google-cloud-dataplex/protos/protos.json @@ -14,501 +14,563 @@ "java_package": "com.google.cloud.dataplex.v1" }, "nested": { - "DiscoveryEvent": { - "oneofs": { - "details": { - "oneof": [ - "config", - "entity", - "partition", - "action" - ] - } + "Environment": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/Environment", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}" }, "fields": { - "message": { + "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Environment" + } }, - "lakeId": { + "displayName": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, - "zoneId": { + "uid": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "assetId": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", "type": "string", - "id": 4 + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, - "dataLocation": { + "description": { "type": "string", - "id": 5 + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, - "type": { - "type": "EventType", - "id": 10 + "state": { + "type": "State", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "config": { - "type": "ConfigDetails", - "id": 20 + "infrastructureSpec": { + "type": "InfrastructureSpec", + "id": 100, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, - "entity": { - "type": "EntityDetails", - "id": 21 + "sessionSpec": { + "type": "SessionSpec", + "id": 101, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, - "partition": { - "type": "PartitionDetails", - "id": 22 + "sessionStatus": { + "type": "SessionStatus", + "id": 102, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "action": { - "type": "ActionDetails", - "id": 23 + "endpoints": { + "type": "Endpoints", + "id": 200, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { - "EventType": { - "values": { - "EVENT_TYPE_UNSPECIFIED": 0, - "CONFIG": 1, - "ENTITY_CREATED": 2, - "ENTITY_UPDATED": 3, - "ENTITY_DELETED": 4, - "PARTITION_CREATED": 5, - "PARTITION_UPDATED": 6, - "PARTITION_DELETED": 7 - } - }, - "EntityType": { - "values": { - "ENTITY_TYPE_UNSPECIFIED": 0, - "TABLE": 1, - "FILESET": 2 - } - }, - "ConfigDetails": { + "InfrastructureSpec": { + "oneofs": { + "resources": { + "oneof": [ + "compute" + ] + }, + "runtime": { + "oneof": [ + "osImage" + ] + } + }, "fields": { - "parameters": { - "keyType": "string", - "type": "string", - "id": 1 + "compute": { + "type": "ComputeResources", + "id": 50, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "osImage": { + "type": "OsImageRuntime", + "id": 100, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "ComputeResources": { + "fields": { + "diskSizeGb": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "nodeCount": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "maxNodeCount": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "OsImageRuntime": { + "fields": { + "imageVersion": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "javaLibraries": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pythonPackages": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "properties": { + "keyType": "string", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } } } }, - "EntityDetails": { + "SessionSpec": { "fields": { - "entity": { - "type": "string", - "id": 1 + "maxIdleDuration": { + "type": "google.protobuf.Duration", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, - "type": { - "type": "EntityType", - "id": 2 + "enableFastStartup": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, - "PartitionDetails": { + "SessionStatus": { "fields": { - "partition": { - "type": "string", - "id": 1 - }, - "entity": { - "type": "string", - "id": 2 - }, - "type": { - "type": "EntityType", - "id": 3 + "active": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, - "ActionDetails": { + "Endpoints": { "fields": { - "type": { + "notebooks": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "sql": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } } } }, - "JobEvent": { + "Content": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/Content", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/content/{content}" + }, + "oneofs": { + "data": { + "oneof": [ + "dataText" + ] + }, + "content": { + "oneof": [ + "sqlScript", + "notebook" + ] + } + }, "fields": { - "message": { + "name": { "type": "string", - "id": 1 - }, - "jobId": { - "type": "string", - "id": 2 - }, - "startTime": { - "type": "google.protobuf.Timestamp", - "id": 3 - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 4 - }, - "state": { - "type": "State", - "id": 5 - }, - "retries": { - "type": "int32", - "id": 6 - }, - "type": { - "type": "Type", - "id": 7 + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Content" + } }, - "service": { - "type": "Service", - "id": 8 + "uid": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "serviceJob": { + "path": { "type": "string", - "id": 9 - } - }, - "nested": { - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "SPARK": 1, - "NOTEBOOK": 2 + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" } }, - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "SUCCEEDED": 1, - "FAILED": 2, - "CANCELLED": 3, - "ABORTED": 4 + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "Service": { - "values": { - "SERVICE_UNSPECIFIED": 0, - "DATAPROC": 1 + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" } - } - } - }, - "SessionEvent": { - "oneofs": { - "detail": { - "oneof": [ - "query" - ] - } - }, - "fields": { - "message": { + }, + "labels": { + "keyType": "string", "type": "string", - "id": 1 + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, - "userId": { + "description": { "type": "string", - "id": 2 + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, - "sessionId": { + "dataText": { "type": "string", - "id": 3 + "id": 9, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, - "type": { - "type": "EventType", - "id": 4 + "sqlScript": { + "type": "SqlScript", + "id": 100 }, - "query": { - "type": "QueryDetail", - "id": 5 + "notebook": { + "type": "Notebook", + "id": 101 } }, "nested": { - "EventType": { - "values": { - "EVENT_TYPE_UNSPECIFIED": 0, - "START": 1, - "STOP": 2, - "QUERY": 3 - } - }, - "QueryDetail": { + "SqlScript": { "fields": { - "queryId": { - "type": "string", - "id": 1 - }, - "queryText": { - "type": "string", - "id": 2 - }, "engine": { - "type": "Engine", - "id": 3 - }, - "duration": { - "type": "google.protobuf.Duration", - "id": 4 - }, - "resultSizeBytes": { - "type": "int64", - "id": 5 - }, - "dataProcessedBytes": { - "type": "int64", - "id": 6 + "type": "QueryEngine", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } }, "nested": { - "Engine": { + "QueryEngine": { "values": { - "ENGINE_UNSPECIFIED": 0, - "SPARK_SQL": 1, - "BIGQUERY": 2 + "QUERY_ENGINE_UNSPECIFIED": 0, + "SPARK": 2 } } } - } - } - }, - "MetadataService": { - "options": { - "(google.api.default_host)": "dataplex.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "GetEntity": { - "requestType": "GetEntityRequest", - "responseType": "Entity", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListEntities": { - "requestType": "ListEntitiesRequest", - "responseType": "ListEntitiesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/entities", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/entities" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] }, - "GetPartition": { - "requestType": "GetPartitionRequest", - "responseType": "Partition", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*/partitions/**}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*/partitions/**}" + "Notebook": { + "fields": { + "kernelType": { + "type": "KernelType", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" } - }, - { - "(google.api.method_signature)": "name" } - ] - }, - "ListPartitions": { - "requestType": "ListPartitionsRequest", - "responseType": "ListPartitionsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/entities/*}/partitions", - "(google.api.method_signature)": "parent" }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/entities/*}/partitions" + "nested": { + "KernelType": { + "values": { + "KERNEL_TYPE_UNSPECIFIED": 0, + "PYTHON3": 1 } - }, - { - "(google.api.method_signature)": "parent" } - ] + } } } }, - "ListEntitiesRequest": { + "Session": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/Session", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}/sessions/{session}" + }, "fields": { - "parent": { + "name": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Session" } }, - "view": { - "type": "EntityView", + "userId": { + "type": "string", "id": 2, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "pageSize": { - "type": "int32", + "createTime": { + "type": "google.protobuf.Timestamp", "id": 3, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "pageToken": { - "type": "string", + "state": { + "type": "State", "id": 4, "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "EntityView": { - "values": { - "ENTITY_VIEW_UNSPECIFIED": 0, - "TABLES": 1, - "FILESETS": 2 + "(google.api.field_behavior)": "OUTPUT_ONLY" } } } }, - "ListEntitiesResponse": { - "fields": { - "entities": { - "rule": "repeated", - "type": "Entity", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetEntityRequest": { + "Lake": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/Lake", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}" + }, "fields": { "name": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" } }, - "view": { - "type": "EntityView", + "displayName": { + "type": "string", "id": 2, "options": { "(google.api.field_behavior)": "OPTIONAL" } - } - }, - "nested": { - "EntityView": { - "values": { - "ENTITY_VIEW_UNSPECIFIED": 0, - "BASIC": 1, - "SCHEMA": 2, - "FULL": 4 - } - } - } - }, - "ListPartitionsRequest": { - "fields": { - "parent": { + }, + "uid": { "type": "string", - "id": 1, + "id": 3, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "pageSize": { - "type": "int32", - "id": 2, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 6, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "pageToken": { + "description": { "type": "string", - "id": 3, + "id": 7, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "filter": { + "state": { + "type": "State", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "serviceAccount": { "type": "string", - "id": 4, + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "metastore": { + "type": "Metastore", + "id": 102, "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "assetStatus": { + "type": "AssetStatus", + "id": 103, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "metastoreStatus": { + "type": "MetastoreStatus", + "id": 104, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "Metastore": { + "fields": { + "service": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "MetastoreStatus": { + "fields": { + "state": { + "type": "State", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "endpoint": { + "type": "string", + "id": 4 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "NONE": 1, + "READY": 2, + "UPDATING": 3, + "ERROR": 4 + } + } + } } } }, - "ListPartitionsResponse": { + "AssetStatus": { "fields": { - "partitions": { - "rule": "repeated", - "type": "Partition", + "updateTime": { + "type": "google.protobuf.Timestamp", "id": 1 }, - "nextPageToken": { - "type": "string", + "activeAssets": { + "type": "int32", "id": 2 + }, + "securityPolicyApplyingAssets": { + "type": "int32", + "id": 3 } } }, - "GetPartitionRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Partition" - } - } - } - }, - "Entity": { + "Zone": { "options": { - "(google.api.resource).type": "dataplex.googleapis.com/Entity", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}" + "(google.api.resource).type": "dataplex.googleapis.com/Zone", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}" }, "fields": { "name": { @@ -516,7 +578,7 @@ "id": 1, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" + "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" } }, "displayName": { @@ -526,145 +588,207 @@ "(google.api.field_behavior)": "OPTIONAL" } }, - "description": { + "uid": { "type": "string", "id": 3, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, "createTime": { "type": "google.protobuf.Timestamp", - "id": 5, + "id": 4, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, "updateTime": { "type": "google.protobuf.Timestamp", - "id": 6, + "id": 5, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "id": { + "labels": { + "keyType": "string", "type": "string", - "id": 7, + "id": 6, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } }, - "etag": { + "description": { "type": "string", - "id": 8, + "id": 7, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "type": { - "type": "Type", - "id": 10, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "asset": { - "type": "string", - "id": 11, + "state": { + "type": "State", + "id": 8, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "dataPath": { - "type": "string", - "id": 12, + "type": { + "type": "Type", + "id": 9, "options": { "(google.api.field_behavior)": "IMMUTABLE" } }, - "dataPathPattern": { - "type": "string", - "id": 13, + "discoverySpec": { + "type": "DiscoverySpec", + "id": 103, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "catalogEntry": { - "type": "string", - "id": 14, + "resourceSpec": { + "type": "ResourceSpec", + "id": 104, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED" } }, - "system": { - "type": "StorageSystem", - "id": 15, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "format": { - "type": "StorageFormat", - "id": 16, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "compatibility": { - "type": "CompatibilityStatus", - "id": 19, + "assetStatus": { + "type": "AssetStatus", + "id": 105, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } - }, - "schema": { - "type": "Schema", - "id": 50, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } } }, "nested": { "Type": { "values": { "TYPE_UNSPECIFIED": 0, - "TABLE": 1, - "FILESET": 2 + "RAW": 1, + "CURATED": 2 } }, - "CompatibilityStatus": { + "ResourceSpec": { "fields": { - "hiveMetastore": { - "type": "Compatibility", + "locationType": { + "type": "LocationType", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "IMMUTABLE" + } + } + }, + "nested": { + "LocationType": { + "values": { + "LOCATION_TYPE_UNSPECIFIED": 0, + "SINGLE_REGION": 1, + "MULTI_REGION": 2 + } + } + } + }, + "DiscoverySpec": { + "oneofs": { + "trigger": { + "oneof": [ + "schedule" + ] + } + }, + "fields": { + "enabled": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" } }, - "bigquery": { - "type": "Compatibility", + "includePatterns": { + "rule": "repeated", + "type": "string", "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "excludePatterns": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "csvOptions": { + "type": "CsvOptions", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "jsonOptions": { + "type": "JsonOptions", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "schedule": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } } }, "nested": { - "Compatibility": { + "CsvOptions": { "fields": { - "compatible": { - "type": "bool", + "headerRows": { + "type": "int32", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL" } }, - "reason": { + "delimiter": { "type": "string", "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "encoding": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "disableTypeInference": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "JsonOptions": { + "fields": { + "encoding": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "disableTypeInference": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } } } @@ -673,401 +797,309 @@ } } }, - "Partition": { + "Action": { "options": { - "(google.api.resource).type": "dataplex.googleapis.com/Partition", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}" + "(google.api.resource).type": "dataplex.googleapis.com/Action", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}" + }, + "oneofs": { + "details": { + "oneof": [ + "invalidDataFormat", + "incompatibleDataSchema", + "invalidDataPartition", + "missingData", + "missingResource", + "unauthorizedResource", + "failedSecurityPolicyApply", + "invalidDataOrganization" + ] + } }, "fields": { + "category": { + "type": "Category", + "id": 1 + }, + "issue": { + "type": "string", + "id": 2 + }, + "detectTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + }, "name": { "type": "string", - "id": 1, + "id": 5, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Partition" + "(google.api.resource_reference).type": "dataplex.googleapis.com/Action" } }, - "values": { - "rule": "repeated", + "lake": { "type": "string", - "id": 2, + "id": 6, "options": { - "(google.api.field_behavior)": "IMMUTABLE" + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" } }, - "location": { + "zone": { "type": "string", - "id": 3, + "id": 7, "options": { - "(google.api.field_behavior)": "IMMUTABLE" + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" } }, - "etag": { + "asset": { "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "Schema": { - "fields": { - "userManaged": { - "type": "bool", - "id": 1, + "id": 8, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Asset" } }, - "fields": { + "dataLocations": { "rule": "repeated", - "type": "SchemaField", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "type": "string", + "id": 9 }, - "partitionFields": { - "rule": "repeated", - "type": "PartitionField", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "invalidDataFormat": { + "type": "InvalidDataFormat", + "id": 10 }, - "partitionStyle": { - "type": "PartitionStyle", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "BOOLEAN": 1, - "BYTE": 2, - "INT16": 3, - "INT32": 4, - "INT64": 5, - "FLOAT": 6, - "DOUBLE": 7, - "DECIMAL": 8, - "STRING": 9, - "BINARY": 10, - "TIMESTAMP": 11, - "DATE": 12, - "TIME": 13, - "RECORD": 14, - "NULL": 100 - } + "incompatibleDataSchema": { + "type": "IncompatibleDataSchema", + "id": 11 }, - "Mode": { + "invalidDataPartition": { + "type": "InvalidDataPartition", + "id": 12 + }, + "missingData": { + "type": "MissingData", + "id": 13 + }, + "missingResource": { + "type": "MissingResource", + "id": 14 + }, + "unauthorizedResource": { + "type": "UnauthorizedResource", + "id": 15 + }, + "failedSecurityPolicyApply": { + "type": "FailedSecurityPolicyApply", + "id": 21 + }, + "invalidDataOrganization": { + "type": "InvalidDataOrganization", + "id": 22 + } + }, + "nested": { + "Category": { "values": { - "MODE_UNSPECIFIED": 0, - "REQUIRED": 1, - "NULLABLE": 2, - "REPEATED": 3 + "CATEGORY_UNSPECIFIED": 0, + "RESOURCE_MANAGEMENT": 1, + "SECURITY_POLICY": 2, + "DATA_DISCOVERY": 3 } }, - "SchemaField": { + "MissingResource": { + "fields": {} + }, + "UnauthorizedResource": { + "fields": {} + }, + "FailedSecurityPolicyApply": { "fields": { - "name": { + "asset": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "id": 1 + } + } + }, + "InvalidDataFormat": { + "fields": { + "sampledDataLocations": { + "rule": "repeated", + "type": "string", + "id": 1 }, - "description": { + "expectedFormat": { "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "id": 2 }, - "type": { - "type": "Type", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "newFormat": { + "type": "string", + "id": 3 + } + } + }, + "IncompatibleDataSchema": { + "fields": { + "table": { + "type": "string", + "id": 1 }, - "mode": { - "type": "Mode", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "existingSchema": { + "type": "string", + "id": 2 }, - "fields": { + "newSchema": { + "type": "string", + "id": 3 + }, + "sampledDataLocations": { "rule": "repeated", - "type": "SchemaField", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL" + "type": "string", + "id": 4 + }, + "schemaChange": { + "type": "SchemaChange", + "id": 5 + } + }, + "nested": { + "SchemaChange": { + "values": { + "SCHEMA_CHANGE_UNSPECIFIED": 0, + "INCOMPATIBLE": 1, + "MODIFIED": 2 } } } }, - "PartitionField": { + "InvalidDataPartition": { "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "type": { - "type": "Type", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" + "expectedStructure": { + "type": "PartitionStructure", + "id": 1 + } + }, + "nested": { + "PartitionStructure": { + "values": { + "PARTITION_STRUCTURE_UNSPECIFIED": 0, + "CONSISTENT_KEYS": 1, + "HIVE_STYLE_KEYS": 2 } } } }, - "PartitionStyle": { - "values": { - "PARTITION_STYLE_UNSPECIFIED": 0, - "HIVE_COMPATIBLE": 1 - } + "MissingData": { + "fields": {} + }, + "InvalidDataOrganization": { + "fields": {} } } }, - "StorageFormat": { - "oneofs": { - "options": { - "oneof": [ - "csv", - "json" - ] - } + "Asset": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/Asset", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}" }, "fields": { - "format": { - "type": "Format", + "name": { + "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Asset" } }, - "compressionFormat": { - "type": "CompressionFormat", + "displayName": { + "type": "string", "id": 2, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "mimeType": { + "uid": { "type": "string", "id": 3, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "csv": { - "type": "CsvOptions", - "id": 10, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 6, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "json": { - "type": "JsonOptions", - "id": 11, + "description": { + "type": "string", + "id": 7, "options": { "(google.api.field_behavior)": "OPTIONAL" } - } - }, - "nested": { - "CsvOptions": { - "fields": { - "encoding": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "headerRows": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "delimiter": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "quote": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } + }, + "state": { + "type": "State", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "JsonOptions": { - "fields": { - "encoding": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "Format": { - "values": { - "FORMAT_UNSPECIFIED": 0, - "PARQUET": 1, - "AVRO": 2, - "ORC": 3, - "CSV": 100, - "JSON": 101, - "IMAGE": 200, - "AUDIO": 201, - "VIDEO": 202, - "TEXT": 203, - "TFRECORD": 204, - "OTHER": 1000, - "UNKNOWN": 1001 - } - }, - "CompressionFormat": { - "values": { - "COMPRESSION_FORMAT_UNSPECIFIED": 0, - "GZIP": 2, - "BZIP2": 3 - } - } - } - }, - "StorageSystem": { - "values": { - "STORAGE_SYSTEM_UNSPECIFIED": 0, - "CLOUD_STORAGE": 1, - "BIGQUERY": 2 - } - }, - "Lake": { - "options": { - "(google.api.resource).type": "dataplex.googleapis.com/Lake", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" - } - }, - "displayName": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "uid": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "description": { - "type": "string", - "id": 7, + "resourceSpec": { + "type": "ResourceSpec", + "id": 100, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED" } }, - "state": { - "type": "State", - "id": 8, + "resourceStatus": { + "type": "ResourceStatus", + "id": 101, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "serviceAccount": { - "type": "string", - "id": 9, + "securityStatus": { + "type": "SecurityStatus", + "id": 103, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "metastore": { - "type": "Metastore", - "id": 102, + "discoverySpec": { + "type": "DiscoverySpec", + "id": 106, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "assetStatus": { - "type": "AssetStatus", - "id": 103, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "metastoreStatus": { - "type": "MetastoreStatus", - "id": 104, + "discoveryStatus": { + "type": "DiscoveryStatus", + "id": 107, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } } }, "nested": { - "Metastore": { - "fields": { - "service": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "MetastoreStatus": { + "SecurityStatus": { "fields": { "state": { "type": "State", @@ -1080,159 +1112,15 @@ "updateTime": { "type": "google.protobuf.Timestamp", "id": 3 - }, - "endpoint": { - "type": "string", - "id": 4 } }, "nested": { "State": { "values": { "STATE_UNSPECIFIED": 0, - "NONE": 1, - "READY": 2, - "UPDATING": 3, - "ERROR": 4 - } - } - } - } - } - }, - "AssetStatus": { - "fields": { - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 1 - }, - "activeAssets": { - "type": "int32", - "id": 2 - }, - "securityPolicyApplyingAssets": { - "type": "int32", - "id": 3 - } - } - }, - "Zone": { - "options": { - "(google.api.resource).type": "dataplex.googleapis.com/Zone", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" - } - }, - "displayName": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "uid": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "description": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "state": { - "type": "State", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "type": { - "type": "Type", - "id": 9, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - }, - "discoverySpec": { - "type": "DiscoverySpec", - "id": 103, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "resourceSpec": { - "type": "ResourceSpec", - "id": 104, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "assetStatus": { - "type": "AssetStatus", - "id": 105, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "RAW": 1, - "CURATED": 2 - } - }, - "ResourceSpec": { - "fields": { - "locationType": { - "type": "LocationType", - "id": 1, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - } - }, - "nested": { - "LocationType": { - "values": { - "LOCATION_TYPE_UNSPECIFIED": 0, - "SINGLE_REGION": 1, - "MULTI_REGION": 2 + "READY": 1, + "APPLYING": 2, + "ERROR": 3 } } } @@ -1250,7 +1138,7 @@ "type": "bool", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } }, "includePatterns": { @@ -1343,214 +1231,1064 @@ } } } - } - } - }, - "Action": { - "options": { - "(google.api.resource).type": "dataplex.googleapis.com/Action", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}" - }, - "oneofs": { - "details": { - "oneof": [ - "invalidDataFormat", - "incompatibleDataSchema", - "invalidDataPartition", - "missingData", - "missingResource", - "unauthorizedResource", - "failedSecurityPolicyApply", - "invalidDataOrganization" - ] - } - }, - "fields": { - "category": { - "type": "Category", - "id": 1 - }, - "issue": { - "type": "string", - "id": 2 - }, - "detectTime": { - "type": "google.protobuf.Timestamp", - "id": 4 - }, - "name": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Action" - } - }, - "lake": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" - } - }, - "zone": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" - } - }, - "asset": { - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Asset" - } - }, - "dataLocations": { - "rule": "repeated", - "type": "string", - "id": 9 - }, - "invalidDataFormat": { - "type": "InvalidDataFormat", - "id": 10 - }, - "incompatibleDataSchema": { - "type": "IncompatibleDataSchema", - "id": 11 - }, - "invalidDataPartition": { - "type": "InvalidDataPartition", - "id": 12 - }, - "missingData": { - "type": "MissingData", - "id": 13 - }, - "missingResource": { - "type": "MissingResource", - "id": 14 - }, - "unauthorizedResource": { - "type": "UnauthorizedResource", - "id": 15 - }, - "failedSecurityPolicyApply": { - "type": "FailedSecurityPolicyApply", - "id": 21 - }, - "invalidDataOrganization": { - "type": "InvalidDataOrganization", - "id": 22 - } - }, - "nested": { - "Category": { - "values": { - "CATEGORY_UNSPECIFIED": 0, - "RESOURCE_MANAGEMENT": 1, - "SECURITY_POLICY": 2, - "DATA_DISCOVERY": 3 - } - }, - "MissingResource": { - "fields": {} }, - "UnauthorizedResource": { - "fields": {} - }, - "FailedSecurityPolicyApply": { + "ResourceSpec": { "fields": { - "asset": { + "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "type": { + "type": "Type", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "STORAGE_BUCKET": 1, + "BIGQUERY_DATASET": 2 + } } } }, - "InvalidDataFormat": { + "ResourceStatus": { "fields": { - "sampledDataLocations": { - "rule": "repeated", - "type": "string", + "state": { + "type": "State", "id": 1 }, - "expectedFormat": { + "message": { "type": "string", "id": 2 }, - "newFormat": { - "type": "string", + "updateTime": { + "type": "google.protobuf.Timestamp", "id": 3 } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "READY": 1, + "ERROR": 2 + } + } } }, - "IncompatibleDataSchema": { + "DiscoveryStatus": { "fields": { - "table": { - "type": "string", + "state": { + "type": "State", "id": 1 }, - "existingSchema": { + "message": { "type": "string", "id": 2 }, - "newSchema": { - "type": "string", + "updateTime": { + "type": "google.protobuf.Timestamp", "id": 3 }, - "sampledDataLocations": { - "rule": "repeated", - "type": "string", + "lastRunTime": { + "type": "google.protobuf.Timestamp", "id": 4 }, - "schemaChange": { - "type": "SchemaChange", - "id": 5 + "stats": { + "type": "Stats", + "id": 6 + }, + "lastRunDuration": { + "type": "google.protobuf.Duration", + "id": 7 } }, "nested": { - "SchemaChange": { + "State": { "values": { - "SCHEMA_CHANGE_UNSPECIFIED": 0, - "INCOMPATIBLE": 1, - "MODIFIED": 2 + "STATE_UNSPECIFIED": 0, + "SCHEDULED": 1, + "IN_PROGRESS": 2, + "PAUSED": 3, + "DISABLED": 5 } - } - } - }, - "InvalidDataPartition": { - "fields": { - "expectedStructure": { - "type": "PartitionStructure", - "id": 1 - } - }, - "nested": { - "PartitionStructure": { - "values": { - "PARTITION_STRUCTURE_UNSPECIFIED": 0, - "CONSISTENT_KEYS": 1, - "HIVE_STYLE_KEYS": 2 + }, + "Stats": { + "fields": { + "dataItems": { + "type": "int64", + "id": 1 + }, + "dataSize": { + "type": "int64", + "id": 2 + }, + "tables": { + "type": "int64", + "id": 3 + }, + "filesets": { + "type": "int64", + "id": 4 + } + } + } + } + } + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "ACTIVE": 1, + "CREATING": 2, + "DELETING": 3, + "ACTION_REQUIRED": 4 + } + }, + "ContentService": { + "options": { + "(google.api.default_host)": "dataplex.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreateContent": { + "requestType": "CreateContentRequest", + "responseType": "Content", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/lakes/*}/contentitems", + "(google.api.http).body": "content", + "(google.api.method_signature)": "parent,content" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/lakes/*}/contentitems", + "body": "content" + } + }, + { + "(google.api.method_signature)": "parent,content" + } + ] + }, + "UpdateContent": { + "requestType": "UpdateContentRequest", + "responseType": "Content", + "options": { + "(google.api.http).patch": "/v1/{content.name=projects/*/locations/*/lakes/*/contentitems/**}", + "(google.api.http).body": "content", + "(google.api.method_signature)": "content,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{content.name=projects/*/locations/*/lakes/*/contentitems/**}", + "body": "content" + } + }, + { + "(google.api.method_signature)": "content,update_mask" + } + ] + }, + "DeleteContent": { + "requestType": "DeleteContentRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*/contentitems/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/lakes/*/contentitems/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetContent": { + "requestType": "GetContentRequest", + "responseType": "Content", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/contentitems/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/lakes/*/contentitems/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListContent": { + "requestType": "ListContentRequest", + "responseType": "ListContentResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*}/contentitems", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*}/contentitems" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "CreateContentRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } + }, + "content": { + "type": "Content", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateContentRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "content": { + "type": "Content", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteContentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Content" + } + } + } + }, + "ListContentRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListContentResponse": { + "fields": { + "content": { + "rule": "repeated", + "type": "Content", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetContentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Content" + } + }, + "view": { + "type": "ContentView", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "ContentView": { + "values": { + "CONTENT_VIEW_UNSPECIFIED": 0, + "BASIC": 1, + "FULL": 2 + } + } + } + }, + "DiscoveryEvent": { + "oneofs": { + "details": { + "oneof": [ + "config", + "entity", + "partition", + "action" + ] + } + }, + "fields": { + "message": { + "type": "string", + "id": 1 + }, + "lakeId": { + "type": "string", + "id": 2 + }, + "zoneId": { + "type": "string", + "id": 3 + }, + "assetId": { + "type": "string", + "id": 4 + }, + "dataLocation": { + "type": "string", + "id": 5 + }, + "type": { + "type": "EventType", + "id": 10 + }, + "config": { + "type": "ConfigDetails", + "id": 20 + }, + "entity": { + "type": "EntityDetails", + "id": 21 + }, + "partition": { + "type": "PartitionDetails", + "id": 22 + }, + "action": { + "type": "ActionDetails", + "id": 23 + } + }, + "nested": { + "EventType": { + "values": { + "EVENT_TYPE_UNSPECIFIED": 0, + "CONFIG": 1, + "ENTITY_CREATED": 2, + "ENTITY_UPDATED": 3, + "ENTITY_DELETED": 4, + "PARTITION_CREATED": 5, + "PARTITION_UPDATED": 6, + "PARTITION_DELETED": 7 + } + }, + "EntityType": { + "values": { + "ENTITY_TYPE_UNSPECIFIED": 0, + "TABLE": 1, + "FILESET": 2 + } + }, + "ConfigDetails": { + "fields": { + "parameters": { + "keyType": "string", + "type": "string", + "id": 1 + } + } + }, + "EntityDetails": { + "fields": { + "entity": { + "type": "string", + "id": 1 + }, + "type": { + "type": "EntityType", + "id": 2 + } + } + }, + "PartitionDetails": { + "fields": { + "partition": { + "type": "string", + "id": 1 + }, + "entity": { + "type": "string", + "id": 2 + }, + "type": { + "type": "EntityType", + "id": 3 + } + } + }, + "ActionDetails": { + "fields": { + "type": { + "type": "string", + "id": 1 + } + } + } + } + }, + "JobEvent": { + "fields": { + "message": { + "type": "string", + "id": 1 + }, + "jobId": { + "type": "string", + "id": 2 + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + }, + "state": { + "type": "State", + "id": 5 + }, + "retries": { + "type": "int32", + "id": 6 + }, + "type": { + "type": "Type", + "id": 7 + }, + "service": { + "type": "Service", + "id": 8 + }, + "serviceJob": { + "type": "string", + "id": 9 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "SPARK": 1, + "NOTEBOOK": 2 + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "SUCCEEDED": 1, + "FAILED": 2, + "CANCELLED": 3, + "ABORTED": 4 + } + }, + "Service": { + "values": { + "SERVICE_UNSPECIFIED": 0, + "DATAPROC": 1 + } + } + } + }, + "SessionEvent": { + "oneofs": { + "detail": { + "oneof": [ + "query" + ] + } + }, + "fields": { + "message": { + "type": "string", + "id": 1 + }, + "userId": { + "type": "string", + "id": 2 + }, + "sessionId": { + "type": "string", + "id": 3 + }, + "type": { + "type": "EventType", + "id": 4 + }, + "query": { + "type": "QueryDetail", + "id": 5 + } + }, + "nested": { + "EventType": { + "values": { + "EVENT_TYPE_UNSPECIFIED": 0, + "START": 1, + "STOP": 2, + "QUERY": 3 + } + }, + "QueryDetail": { + "fields": { + "queryId": { + "type": "string", + "id": 1 + }, + "queryText": { + "type": "string", + "id": 2 + }, + "engine": { + "type": "Engine", + "id": 3 + }, + "duration": { + "type": "google.protobuf.Duration", + "id": 4 + }, + "resultSizeBytes": { + "type": "int64", + "id": 5 + }, + "dataProcessedBytes": { + "type": "int64", + "id": 6 + } + }, + "nested": { + "Engine": { + "values": { + "ENGINE_UNSPECIFIED": 0, + "SPARK_SQL": 1, + "BIGQUERY": 2 + } + } + } + } + } + }, + "MetadataService": { + "options": { + "(google.api.default_host)": "dataplex.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreateEntity": { + "requestType": "CreateEntityRequest", + "responseType": "Entity", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/entities", + "(google.api.http).body": "entity", + "(google.api.method_signature)": "parent,entity" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/entities", + "body": "entity" + } + }, + { + "(google.api.method_signature)": "parent,entity" + } + ] + }, + "UpdateEntity": { + "requestType": "UpdateEntityRequest", + "responseType": "Entity", + "options": { + "(google.api.http).put": "/v1/{entity.name=projects/*/locations/*/lakes/*/zones/*/entities/*}", + "(google.api.http).body": "entity" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "put": "/v1/{entity.name=projects/*/locations/*/lakes/*/zones/*/entities/*}", + "body": "entity" + } + } + ] + }, + "DeleteEntity": { + "requestType": "DeleteEntityRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetEntity": { + "requestType": "GetEntityRequest", + "responseType": "Entity", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListEntities": { + "requestType": "ListEntitiesRequest", + "responseType": "ListEntitiesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/entities", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/entities" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreatePartition": { + "requestType": "CreatePartitionRequest", + "responseType": "Partition", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/entities/*}/partitions", + "(google.api.http).body": "partition", + "(google.api.method_signature)": "parent,partition" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/entities/*}/partitions", + "body": "partition" + } + }, + { + "(google.api.method_signature)": "parent,partition" + } + ] + }, + "DeletePartition": { + "requestType": "DeletePartitionRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*/partitions/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*/partitions/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetPartition": { + "requestType": "GetPartitionRequest", + "responseType": "Partition", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*/partitions/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*/partitions/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListPartitions": { + "requestType": "ListPartitionsRequest", + "responseType": "ListPartitionsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/entities/*}/partitions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/entities/*}/partitions" } + }, + { + "(google.api.method_signature)": "parent" } + ] + } + } + }, + "CreateEntityRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" + } + }, + "entity": { + "type": "Entity", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateEntityRequest": { + "fields": { + "entity": { + "type": "Entity", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteEntityRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" + } + }, + "etag": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ListEntitiesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" + } + }, + "view": { + "type": "EntityView", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "pageSize": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "EntityView": { + "values": { + "ENTITY_VIEW_UNSPECIFIED": 0, + "TABLES": 1, + "FILESETS": 2 + } + } + } + }, + "ListEntitiesResponse": { + "fields": { + "entities": { + "rule": "repeated", + "type": "Entity", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetEntityRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" + } + }, + "view": { + "type": "EntityView", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "EntityView": { + "values": { + "ENTITY_VIEW_UNSPECIFIED": 0, + "BASIC": 1, + "SCHEMA": 2, + "FULL": 4 + } + } + } + }, + "ListPartitionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CreatePartitionRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" + } + }, + "partition": { + "type": "Partition", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeletePartitionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Partition" + } + }, + "etag": { + "type": "string", + "id": 2, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "OPTIONAL" } + } + } + }, + "ListPartitionsResponse": { + "fields": { + "partitions": { + "rule": "repeated", + "type": "Partition", + "id": 1 }, - "MissingData": { - "fields": {} - }, - "InvalidDataOrganization": { - "fields": {} + "nextPageToken": { + "type": "string", + "id": 2 } } }, - "Asset": { + "GetPartitionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Partition" + } + } + } + }, + "Entity": { "options": { - "(google.api.resource).type": "dataplex.googleapis.com/Asset", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}" + "(google.api.resource).type": "dataplex.googleapis.com/Entity", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}" }, "fields": { "name": { @@ -1558,7 +2296,7 @@ "id": 1, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Asset" + "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" } }, "displayName": { @@ -1568,226 +2306,301 @@ "(google.api.field_behavior)": "OPTIONAL" } }, - "uid": { + "description": { "type": "string", "id": 3, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL" } }, "createTime": { "type": "google.protobuf.Timestamp", - "id": 4, + "id": 5, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, "updateTime": { "type": "google.protobuf.Timestamp", - "id": 5, + "id": 6, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "labels": { - "keyType": "string", + "id": { "type": "string", - "id": 6, + "id": 7, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "etag": { + "type": "string", + "id": 8, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "description": { + "type": { + "type": "Type", + "id": 10, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "asset": { "type": "string", - "id": 7, + "id": 11, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "dataPath": { + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "dataPathPattern": { + "type": "string", + "id": 13, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "state": { - "type": "State", - "id": 8, + "catalogEntry": { + "type": "string", + "id": 14, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "resourceSpec": { - "type": "ResourceSpec", - "id": 100, + "system": { + "type": "StorageSystem", + "id": 15, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "format": { + "type": "StorageFormat", + "id": 16, "options": { "(google.api.field_behavior)": "REQUIRED" } }, - "resourceStatus": { - "type": "ResourceStatus", - "id": 101, + "compatibility": { + "type": "CompatibilityStatus", + "id": 19, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "securityStatus": { - "type": "SecurityStatus", - "id": 103, + "schema": { + "type": "Schema", + "id": 50, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "TABLE": 1, + "FILESET": 2 + } + }, + "CompatibilityStatus": { + "fields": { + "hiveMetastore": { + "type": "Compatibility", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "bigquery": { + "type": "Compatibility", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "Compatibility": { + "fields": { + "compatible": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "reason": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + } + } + } + } + }, + "Partition": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/Partition", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Partition" + } + }, + "values": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "location": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "etag": { + "type": "string", + "id": 4, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Schema": { + "fields": { + "userManaged": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "fields": { + "rule": "repeated", + "type": "SchemaField", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "partitionFields": { + "rule": "repeated", + "type": "PartitionField", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "partitionStyle": { + "type": "PartitionStyle", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "BOOLEAN": 1, + "BYTE": 2, + "INT16": 3, + "INT32": 4, + "INT64": 5, + "FLOAT": 6, + "DOUBLE": 7, + "DECIMAL": 8, + "STRING": 9, + "BINARY": 10, + "TIMESTAMP": 11, + "DATE": 12, + "TIME": 13, + "RECORD": 14, + "NULL": 100 } }, - "discoverySpec": { - "type": "DiscoverySpec", - "id": 106, - "options": { - "(google.api.field_behavior)": "OPTIONAL" + "Mode": { + "values": { + "MODE_UNSPECIFIED": 0, + "REQUIRED": 1, + "NULLABLE": 2, + "REPEATED": 3 } }, - "discoveryStatus": { - "type": "DiscoveryStatus", - "id": 107, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "SecurityStatus": { + "SchemaField": { "fields": { - "state": { - "type": "State", - "id": 1 - }, - "message": { + "name": { "type": "string", - "id": 2 - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 3 - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "READY": 1, - "APPLYING": 2, - "ERROR": 3 - } - } - } - }, - "DiscoverySpec": { - "oneofs": { - "trigger": { - "oneof": [ - "schedule" - ] - } - }, - "fields": { - "enabled": { - "type": "bool", "id": 1, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED" } }, - "includePatterns": { - "rule": "repeated", + "description": { "type": "string", "id": 2, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "excludePatterns": { - "rule": "repeated", - "type": "string", + "type": { + "type": "Type", "id": 3, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED" } }, - "csvOptions": { - "type": "CsvOptions", + "mode": { + "type": "Mode", "id": 4, "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "jsonOptions": { - "type": "JsonOptions", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED" } }, - "schedule": { - "type": "string", + "fields": { + "rule": "repeated", + "type": "SchemaField", "id": 10, "options": { "(google.api.field_behavior)": "OPTIONAL" } } - }, - "nested": { - "CsvOptions": { - "fields": { - "headerRows": { - "type": "int32", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "delimiter": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "encoding": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "disableTypeInference": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "JsonOptions": { - "fields": { - "encoding": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "disableTypeInference": { - "type": "bool", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - } } }, - "ResourceSpec": { + "PartitionField": { "fields": { "name": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "IMMUTABLE" + "(google.api.field_behavior)": "REQUIRED" } }, "type": { @@ -1797,110 +2610,137 @@ "(google.api.field_behavior)": "IMMUTABLE" } } - }, - "nested": { - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "STORAGE_BUCKET": 1, - "BIGQUERY_DATASET": 2 - } - } } }, - "ResourceStatus": { - "fields": { - "state": { - "type": "State", - "id": 1 - }, - "message": { - "type": "string", - "id": 2 - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 3 - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "READY": 1, - "ERROR": 2 - } - } + "PartitionStyle": { + "values": { + "PARTITION_STYLE_UNSPECIFIED": 0, + "HIVE_COMPATIBLE": 1 + } + } + } + }, + "StorageFormat": { + "oneofs": { + "options": { + "oneof": [ + "csv", + "json" + ] + } + }, + "fields": { + "format": { + "type": "Format", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "DiscoveryStatus": { + "compressionFormat": { + "type": "CompressionFormat", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "mimeType": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "csv": { + "type": "CsvOptions", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "json": { + "type": "JsonOptions", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "CsvOptions": { "fields": { - "state": { - "type": "State", - "id": 1 - }, - "message": { + "encoding": { "type": "string", - "id": 2 - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 3 - }, - "lastRunTime": { - "type": "google.protobuf.Timestamp", - "id": 4 + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, - "stats": { - "type": "Stats", - "id": 6 + "headerRows": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, - "lastRunDuration": { - "type": "google.protobuf.Duration", - "id": 7 - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "SCHEDULED": 1, - "IN_PROGRESS": 2, - "PAUSED": 3, - "DISABLED": 5 + "delimiter": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } }, - "Stats": { - "fields": { - "dataItems": { - "type": "int64", - "id": 1 - }, - "dataSize": { - "type": "int64", - "id": 2 - }, - "tables": { - "type": "int64", - "id": 3 - }, - "filesets": { - "type": "int64", - "id": 4 - } + "quote": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "JsonOptions": { + "fields": { + "encoding": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } } } + }, + "Format": { + "values": { + "FORMAT_UNSPECIFIED": 0, + "PARQUET": 1, + "AVRO": 2, + "ORC": 3, + "CSV": 100, + "JSON": 101, + "IMAGE": 200, + "AUDIO": 201, + "VIDEO": 202, + "TEXT": 203, + "TFRECORD": 204, + "OTHER": 1000, + "UNKNOWN": 1001 + } + }, + "CompressionFormat": { + "values": { + "COMPRESSION_FORMAT_UNSPECIFIED": 0, + "GZIP": 2, + "BZIP2": 3 + } } } }, - "State": { + "StorageSystem": { "values": { - "STATE_UNSPECIFIED": 0, - "ACTIVE": 1, - "CREATING": 2, - "DELETING": 3, - "ACTION_REQUIRED": 4 + "STORAGE_SYSTEM_UNSPECIFIED": 0, + "CLOUD_STORAGE": 1, + "BIGQUERY": 2 } }, "DataplexService": { @@ -2335,49 +3175,223 @@ } }, { - "(google.api.method_signature)": "parent,task,task_id" + "(google.api.method_signature)": "parent,task,task_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Task", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateTask": { + "requestType": "UpdateTaskRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{task.name=projects/*/locations/*/lakes/*/tasks/*}", + "(google.api.http).body": "task", + "(google.api.method_signature)": "task,update_mask", + "(google.longrunning.operation_info).response_type": "Task", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{task.name=projects/*/locations/*/lakes/*/tasks/*}", + "body": "task" + } + }, + { + "(google.api.method_signature)": "task,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Task", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteTask": { + "requestType": "DeleteTaskRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListTasks": { + "requestType": "ListTasksRequest", + "responseType": "ListTasksResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*}/tasks", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*}/tasks" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetTask": { + "requestType": "GetTaskRequest", + "responseType": "Task", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListJobs": { + "requestType": "ListJobsRequest", + "responseType": "ListJobsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/tasks/*}/jobs", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*/tasks/*}/jobs" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetJob": { + "requestType": "GetJobRequest", + "responseType": "Job", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CancelJob": { + "requestType": "CancelJobRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}:cancel", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}:cancel", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateEnvironment": { + "requestType": "CreateEnvironmentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/lakes/*}/environments", + "(google.api.http).body": "environment", + "(google.api.method_signature)": "parent,environment,environment_id", + "(google.longrunning.operation_info).response_type": "Environment", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/lakes/*}/environments", + "body": "environment" + } + }, + { + "(google.api.method_signature)": "parent,environment,environment_id" }, { "(google.longrunning.operation_info)": { - "response_type": "Task", + "response_type": "Environment", "metadata_type": "OperationMetadata" } } ] }, - "UpdateTask": { - "requestType": "UpdateTaskRequest", + "UpdateEnvironment": { + "requestType": "UpdateEnvironmentRequest", "responseType": "google.longrunning.Operation", "options": { - "(google.api.http).patch": "/v1/{task.name=projects/*/locations/*/lakes/*/tasks/*}", - "(google.api.http).body": "task", - "(google.api.method_signature)": "task,update_mask", - "(google.longrunning.operation_info).response_type": "Task", + "(google.api.http).patch": "/v1/{environment.name=projects/*/locations/*/lakes/*/environments/*}", + "(google.api.http).body": "environment", + "(google.api.method_signature)": "environment,update_mask", + "(google.longrunning.operation_info).response_type": "Environment", "(google.longrunning.operation_info).metadata_type": "OperationMetadata" }, "parsedOptions": [ { "(google.api.http)": { - "patch": "/v1/{task.name=projects/*/locations/*/lakes/*/tasks/*}", - "body": "task" + "patch": "/v1/{environment.name=projects/*/locations/*/lakes/*/environments/*}", + "body": "environment" } }, { - "(google.api.method_signature)": "task,update_mask" + "(google.api.method_signature)": "environment,update_mask" }, { "(google.longrunning.operation_info)": { - "response_type": "Task", + "response_type": "Environment", "metadata_type": "OperationMetadata" } } ] }, - "DeleteTask": { - "requestType": "DeleteTaskRequest", + "DeleteEnvironment": { + "requestType": "DeleteEnvironmentRequest", "responseType": "google.longrunning.Operation", "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}", + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*/environments/*}", "(google.api.method_signature)": "name", "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", "(google.longrunning.operation_info).metadata_type": "OperationMetadata" @@ -2385,7 +3399,7 @@ "parsedOptions": [ { "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}" + "delete": "/v1/{name=projects/*/locations/*/lakes/*/environments/*}" } }, { @@ -2399,17 +3413,17 @@ } ] }, - "ListTasks": { - "requestType": "ListTasksRequest", - "responseType": "ListTasksResponse", + "ListEnvironments": { + "requestType": "ListEnvironmentsRequest", + "responseType": "ListEnvironmentsResponse", "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*}/tasks", + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*}/environments", "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/lakes/*}/tasks" + "get": "/v1/{parent=projects/*/locations/*/lakes/*}/environments" } }, { @@ -2417,17 +3431,17 @@ } ] }, - "GetTask": { - "requestType": "GetTaskRequest", - "responseType": "Task", + "GetEnvironment": { + "requestType": "GetEnvironmentRequest", + "responseType": "Environment", "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}", + "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/environments/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}" + "get": "/v1/{name=projects/*/locations/*/lakes/*/environments/*}" } }, { @@ -2435,61 +3449,23 @@ } ] }, - "ListJobs": { - "requestType": "ListJobsRequest", - "responseType": "ListJobsResponse", + "ListSessions": { + "requestType": "ListSessionsRequest", + "responseType": "ListSessionsResponse", "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/tasks/*}/jobs", + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/environments/*}/sessions", "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/lakes/*/tasks/*}/jobs" + "get": "/v1/{parent=projects/*/locations/*/lakes/*/environments/*}/sessions" } }, { "(google.api.method_signature)": "parent" } ] - }, - "GetJob": { - "requestType": "GetJobRequest", - "responseType": "Job", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CancelJob": { - "requestType": "CancelJobRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}:cancel", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}:cancel", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name" - } - ] } } }, @@ -3250,6 +4226,180 @@ } } }, + "CreateEnvironmentRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } + }, + "environmentId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "environment": { + "type": "Environment", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateEnvironmentRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "environment": { + "type": "Environment", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteEnvironmentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Environment" + } + } + } + }, + "ListEnvironmentsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListEnvironmentsResponse": { + "fields": { + "environments": { + "rule": "repeated", + "type": "Environment", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetEnvironmentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Environment" + } + } + } + }, + "ListSessionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Environment" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListSessionsResponse": { + "fields": { + "sessions": { + "rule": "repeated", + "type": "Session", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, "Task": { "options": { "(google.api.resource).type": "dataplex.googleapis.com/Task", @@ -3698,7 +4848,7 @@ "options": { "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", "java_multiple_files": true, - "java_outer_classname": "ResourceProto", + "java_outer_classname": "ClientProto", "java_package": "com.google.api", "objc_class_prefix": "GAPI", "cc_enable_arenas": true @@ -3791,22 +4941,6 @@ } } }, - "methodSignature": { - "rule": "repeated", - "type": "string", - "id": 1051, - "extend": "google.protobuf.MethodOptions" - }, - "defaultHost": { - "type": "string", - "id": 1049, - "extend": "google.protobuf.ServiceOptions" - }, - "oauthScopes": { - "type": "string", - "id": 1050, - "extend": "google.protobuf.ServiceOptions" - }, "fieldBehavior": { "rule": "repeated", "type": "google.api.FieldBehavior", @@ -3901,6 +5035,22 @@ "id": 2 } } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" } } }, diff --git a/packages/google-cloud-dataplex/samples/generated/v1/content_service.create_content.js b/packages/google-cloud-dataplex/samples/generated/v1/content_service.create_content.js new file mode 100644 index 00000000000..812254c5ff4 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/content_service.create_content.js @@ -0,0 +1,64 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(parent, content) { + // [START dataplex_v1_generated_ContentService_CreateContent_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent lake: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id} + */ + // const parent = 'abc123' + /** + * Required. Content resource. + */ + // const content = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {ContentServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new ContentServiceClient(); + + async function callCreateContent() { + // Construct request + const request = { + parent, + content, + }; + + // Run request + const response = await dataplexClient.createContent(request); + console.log(response); + } + + callCreateContent(); + // [END dataplex_v1_generated_ContentService_CreateContent_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/content_service.delete_content.js b/packages/google-cloud-dataplex/samples/generated/v1/content_service.delete_content.js new file mode 100644 index 00000000000..6b079eff400 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/content_service.delete_content.js @@ -0,0 +1,54 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_ContentService_DeleteContent_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the content: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {ContentServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new ContentServiceClient(); + + async function callDeleteContent() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.deleteContent(request); + console.log(response); + } + + callDeleteContent(); + // [END dataplex_v1_generated_ContentService_DeleteContent_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/content_service.get_content.js b/packages/google-cloud-dataplex/samples/generated/v1/content_service.get_content.js new file mode 100644 index 00000000000..3a91031cb01 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/content_service.get_content.js @@ -0,0 +1,58 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_ContentService_GetContent_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the content: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} + */ + // const name = 'abc123' + /** + * Optional. Specify content view to make a partial request. + */ + // const view = {} + + // Imports the Dataplex library + const {ContentServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new ContentServiceClient(); + + async function callGetContent() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.getContent(request); + console.log(response); + } + + callGetContent(); + // [END dataplex_v1_generated_ContentService_GetContent_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/content_service.list_content.js b/packages/google-cloud-dataplex/samples/generated/v1/content_service.list_content.js new file mode 100644 index 00000000000..3b9837c11f5 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/content_service.list_content.js @@ -0,0 +1,79 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_ContentService_ListContent_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent lake: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id} + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of content to return. The service may return fewer than + * this value. If unspecified, at most 10 content will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListContent` call. Provide this + * to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListContent` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter request. Filters are case-sensitive. + * The following formats are supported: + * labels.key1 = "value1" + * labels:key1 + * type = "NOTEBOOK" + * type = "SQL_SCRIPT" + * These restrictions can be coinjoined with AND, OR and NOT conjunctions. + */ + // const filter = 'abc123' + + // Imports the Dataplex library + const {ContentServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new ContentServiceClient(); + + async function callListContent() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataplexClient.listContentAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListContent(); + // [END dataplex_v1_generated_ContentService_ListContent_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/content_service.update_content.js b/packages/google-cloud-dataplex/samples/generated/v1/content_service.update_content.js new file mode 100644 index 00000000000..d62ad3ed272 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/content_service.update_content.js @@ -0,0 +1,64 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(updateMask, content) { + // [START dataplex_v1_generated_ContentService_UpdateContent_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Mask of fields to update. + */ + // const updateMask = {} + /** + * Required. Update description. + * Only fields specified in `update_mask` are updated. + */ + // const content = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {ContentServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new ContentServiceClient(); + + async function callUpdateContent() { + // Construct request + const request = { + updateMask, + content, + }; + + // Run request + const response = await dataplexClient.updateContent(request); + console.log(response); + } + + callUpdateContent(); + // [END dataplex_v1_generated_ContentService_UpdateContent_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_environment.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_environment.js new file mode 100644 index 00000000000..8b3fd3f1088 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_environment.js @@ -0,0 +1,75 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(parent, environmentId, environment) { + // [START dataplex_v1_generated_DataplexService_CreateEnvironment_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent lake: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id} + */ + // const parent = 'abc123' + /** + * Required. Environment identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the lake. + */ + // const environmentId = 'abc123' + /** + * Required. Environment resource. + */ + // const environment = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callCreateEnvironment() { + // Construct request + const request = { + parent, + environmentId, + environment, + }; + + // Run request + const [operation] = await dataplexClient.createEnvironment(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateEnvironment(); + // [END dataplex_v1_generated_DataplexService_CreateEnvironment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_lake.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_lake.js index 277557d813a..2a220f4f5ae 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_lake.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_lake.js @@ -22,7 +22,7 @@ function main(parent, lakeId, lake) { */ /** * Required. The resource name of the lake location, of the form: - * `projects/{project_number}/locations/{location_id}` + * projects/{project_number}/locations/{location_id} * where `location_id` refers to a GCP region. */ // const parent = 'abc123' diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_environment.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_environment.js new file mode 100644 index 00000000000..b435e84064c --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_environment.js @@ -0,0 +1,55 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataplexService_DeleteEnvironment_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the environment: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}` + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callDeleteEnvironment() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await dataplexClient.deleteEnvironment(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteEnvironment(); + // [END dataplex_v1_generated_DataplexService_DeleteEnvironment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_environment.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_environment.js new file mode 100644 index 00000000000..58c1880d7bd --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_environment.js @@ -0,0 +1,54 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataplexService_GetEnvironment_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the environment: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id} + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callGetEnvironment() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.getEnvironment(request); + console.log(response); + } + + callGetEnvironment(); + // [END dataplex_v1_generated_DataplexService_GetEnvironment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_environments.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_environments.js new file mode 100644 index 00000000000..64167f857bb --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_environments.js @@ -0,0 +1,77 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_DataplexService_ListEnvironments_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent lake: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id} + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of environments to return. The service may return fewer than + * this value. If unspecified, at most 10 environments will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListEnvironments` call. Provide this + * to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListEnvironments` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter request. + */ + // const filter = 'abc123' + /** + * Optional. Order by fields for the result. + */ + // const orderBy = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callListEnvironments() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataplexClient.listEnvironmentsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListEnvironments(); + // [END dataplex_v1_generated_DataplexService_ListEnvironments_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_sessions.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_sessions.js new file mode 100644 index 00000000000..b8f215df097 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_sessions.js @@ -0,0 +1,69 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_DataplexService_ListSessions_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent environment: + * projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id} + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of sessions to return. The service may return fewer than + * this value. If unspecified, at most 10 sessions will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListSessions` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListSessions` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callListSessions() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataplexClient.listSessionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListSessions(); + // [END dataplex_v1_generated_DataplexService_ListSessions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_environment.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_environment.js new file mode 100644 index 00000000000..c397cc3b300 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_environment.js @@ -0,0 +1,65 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(updateMask, environment) { + // [START dataplex_v1_generated_DataplexService_UpdateEnvironment_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Mask of fields to update. + */ + // const updateMask = {} + /** + * Required. Update description. + * Only fields specified in `update_mask` are updated. + */ + // const environment = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callUpdateEnvironment() { + // Construct request + const request = { + updateMask, + environment, + }; + + // Run request + const [operation] = await dataplexClient.updateEnvironment(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateEnvironment(); + // [END dataplex_v1_generated_DataplexService_UpdateEnvironment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.create_entity.js b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.create_entity.js new file mode 100644 index 00000000000..106b439b5be --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.create_entity.js @@ -0,0 +1,64 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(parent, entity) { + // [START dataplex_v1_generated_MetadataService_CreateEntity_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + */ + // const parent = 'abc123' + /** + * Required. Entity resource. + */ + // const entity = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {MetadataServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new MetadataServiceClient(); + + async function callCreateEntity() { + // Construct request + const request = { + parent, + entity, + }; + + // Run request + const response = await dataplexClient.createEntity(request); + console.log(response); + } + + callCreateEntity(); + // [END dataplex_v1_generated_MetadataService_CreateEntity_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.create_partition.js b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.create_partition.js new file mode 100644 index 00000000000..7356d100e14 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.create_partition.js @@ -0,0 +1,64 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(parent, partition) { + // [START dataplex_v1_generated_MetadataService_CreatePartition_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + */ + // const parent = 'abc123' + /** + * Required. Partition resource. + */ + // const partition = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {MetadataServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new MetadataServiceClient(); + + async function callCreatePartition() { + // Construct request + const request = { + parent, + partition, + }; + + // Run request + const response = await dataplexClient.createPartition(request); + console.log(response); + } + + callCreatePartition(); + // [END dataplex_v1_generated_MetadataService_CreatePartition_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.delete_entity.js b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.delete_entity.js new file mode 100644 index 00000000000..4f6299f6c82 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.delete_entity.js @@ -0,0 +1,59 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(name, etag) { + // [START dataplex_v1_generated_MetadataService_DeleteEntity_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + */ + // const name = 'abc123' + /** + * Required. The etag associated with the partition if it was previously retrieved. + */ + // const etag = 'abc123' + + // Imports the Dataplex library + const {MetadataServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new MetadataServiceClient(); + + async function callDeleteEntity() { + // Construct request + const request = { + name, + etag, + }; + + // Run request + const response = await dataplexClient.deleteEntity(request); + console.log(response); + } + + callDeleteEntity(); + // [END dataplex_v1_generated_MetadataService_DeleteEntity_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.delete_partition.js b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.delete_partition.js new file mode 100644 index 00000000000..67a30f7cd65 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.delete_partition.js @@ -0,0 +1,61 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_MetadataService_DeletePartition_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the partition. + * format: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. + * The {partition_value_path} segment consists of an ordered sequence of + * partition values separated by "/". All values must be provided. + */ + // const name = 'abc123' + /** + * Optional. The etag associated with the partition if it was previously retrieved. + */ + // const etag = 'abc123' + + // Imports the Dataplex library + const {MetadataServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new MetadataServiceClient(); + + async function callDeletePartition() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.deletePartition(request); + console.log(response); + } + + callDeletePartition(); + // [END dataplex_v1_generated_MetadataService_DeletePartition_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_partition.js b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_partition.js index 955eaa0b85d..a9aa2366736 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_partition.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_partition.js @@ -22,7 +22,9 @@ function main(name) { */ /** * Required. The resource name of the partition: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_id}`. + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. + * The {partition_value_path} segment consists of an ordered sequence of + * partition values separated by "/". All values must be provided. */ // const name = 'abc123' diff --git a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_entities.js b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_entities.js index 7c2f5211b1b..32394b6a8a3 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_entities.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_entities.js @@ -31,8 +31,8 @@ function main(parent, view) { // const view = {} /** * Optional. Maximum number of entities to return. The service may return fewer than - * this value. If unspecified, at most 10 entities will be returned. The - * maximum value is 1000; values above 1000 are set to 1000. + * this value. If unspecified, 100 entities will be returned by default. The + * maximum value is 500; larger values will will be truncated to 500. */ // const pageSize = 1234 /** @@ -43,7 +43,13 @@ function main(parent, view) { */ // const pageToken = 'abc123' /** - * Optional. Filter request by name prefix. + * Optional. The following filter parameters can be added to the URL to limit the + * entities returned by the API: + * - Entity ID: ?filter="id=entityID" + * - Asset ID: ?filter="asset=assetID" + * - Data path ?filter="data_path=gs://my-bucket" + * - Is HIVE compatible: ?filter=”hive_compatible=true” + * - Is BigQuery compatible: ?filter=”bigquery_compatible=true” */ // const filter = 'abc123' diff --git a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_partitions.js b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_partitions.js index 233476471a8..0d3ac79c32c 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_partitions.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_partitions.js @@ -27,8 +27,8 @@ function main(parent) { // const parent = 'abc123' /** * Optional. Maximum number of partitions to return. The service may return fewer than - * this value. If unspecified, at most 10 partitions will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. + * this value. If unspecified, 100 partitions will be returned by default. The + * maximum page size is 500; larger values will will be truncated to 500. */ // const pageSize = 1234 /** @@ -39,7 +39,21 @@ function main(parent) { */ // const pageToken = 'abc123' /** - * Optional. Filter request. + * Optional. Filter the partitions returned to the caller using a key vslue pair + * expression. The filter expression supports: + * - logical operators: AND, OR + * - comparison operators: <, >, >=, <= ,=, != + * - LIKE operators: + * - The right hand of a LIKE operator supports “.” and + * “*” for wildcard searches, for example "value1 LIKE ".*oo.*" + * - parenthetical grouping: ( ) + * Sample filter expression: `?filter="key1 < value1 OR key2 > value2" + * **Notes:** + * - Keys to the left of operators are case insensitive. + * - Partition results are sorted first by creation time, then by + * lexicographic order. + * - Up to 20 key value filter pairs are allowed, but due to performance + * considerations, only the first 10 will be used as a filter. */ // const filter = 'abc123' diff --git a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.update_entity.js b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.update_entity.js new file mode 100644 index 00000000000..7fcbec4a7a7 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.update_entity.js @@ -0,0 +1,58 @@ +// Copyright 2021 Google LLC +// +// 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. + + +'use strict'; + +function main(entity) { + // [START dataplex_v1_generated_MetadataService_UpdateEntity_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Update description. + */ + // const entity = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {MetadataServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new MetadataServiceClient(); + + async function callUpdateEntity() { + // Construct request + const request = { + entity, + }; + + // Run request + const response = await dataplexClient.updateEntity(request); + console.log(response); + } + + callUpdateEntity(); + // [END dataplex_v1_generated_MetadataService_UpdateEntity_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/src/index.ts b/packages/google-cloud-dataplex/src/index.ts index b43c86f4bc8..ca4e274c1be 100644 --- a/packages/google-cloud-dataplex/src/index.ts +++ b/packages/google-cloud-dataplex/src/index.ts @@ -18,12 +18,19 @@ import * as v1 from './v1'; +const ContentServiceClient = v1.ContentServiceClient; +type ContentServiceClient = v1.ContentServiceClient; const DataplexServiceClient = v1.DataplexServiceClient; type DataplexServiceClient = v1.DataplexServiceClient; const MetadataServiceClient = v1.MetadataServiceClient; type MetadataServiceClient = v1.MetadataServiceClient; -export {v1, DataplexServiceClient, MetadataServiceClient}; -export default {v1, DataplexServiceClient, MetadataServiceClient}; +export {v1, ContentServiceClient, DataplexServiceClient, MetadataServiceClient}; +export default { + v1, + ContentServiceClient, + DataplexServiceClient, + MetadataServiceClient, +}; import * as protos from '../protos/protos'; export {protos}; diff --git a/packages/google-cloud-dataplex/src/v1/content_service_client.ts b/packages/google-cloud-dataplex/src/v1/content_service_client.ts new file mode 100644 index 00000000000..56055d8621d --- /dev/null +++ b/packages/google-cloud-dataplex/src/v1/content_service_client.ts @@ -0,0 +1,2003 @@ +// Copyright 2022 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import * as gax from 'google-gax'; +import { + Callback, + CallOptions, + Descriptors, + ClientOptions, + PaginationCallback, + GaxCall, +} from 'google-gax'; + +import {Transform} from 'stream'; +import {RequestType} from 'google-gax/build/src/apitypes'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1/content_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './content_service_client_config.json'; + +const version = require('../../../package.json').version; + +/** + * ContentService manages Notebook and SQL Scripts for Dataplex. + * @class + * @memberof v1 + */ +export class ContentServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + contentServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ContentServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. + * In fallback mode, a special browser-compatible transport implementation is used + * instead of gRPC transport. In browser context (if the `window` object is defined) + * the fallback mode is enabled automatically; set `options.fallback` to `false` + * if you need to override this behavior. + */ + constructor(opts?: ClientOptions) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof ContentServiceClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gax.fallback : gax; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + assetPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}' + ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/content/{content}' + ), + entityPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}' + ), + environmentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}' + ), + jobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}' + ), + lakePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}' + ), + partitionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}' + ), + projectLocationLakeActionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/actions/{action}' + ), + projectLocationLakeZoneActionPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}' + ), + projectLocationLakeZoneAssetActionPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}' + ), + sessionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}/sessions/{session}' + ), + taskPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}' + ), + zonePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listContent: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'content' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.dataplex.v1.ContentService', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = gax.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.contentServiceStub) { + return this.contentServiceStub; + } + + // Put together the "service stub" for + // google.cloud.dataplex.v1.ContentService. + this.contentServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.dataplex.v1.ContentService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.dataplex.v1.ContentService, + this._opts, + this._providedCustomServicePath + ) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const contentServiceStubMethods = [ + 'createContent', + 'updateContent', + 'deleteContent', + 'getContent', + 'listContent', + ]; + for (const methodName of contentServiceStubMethods) { + const callPromise = this.contentServiceStub.then( + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const descriptor = this.descriptors.page[methodName] || undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.contentServiceStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'dataplex.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'dataplex.googleapis.com'; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return ['https://www.googleapis.com/auth/cloud-platform']; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + /** + * Create a content. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent lake: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id} + * @param {google.cloud.dataplex.v1.Content} request.content + * Required. Content resource. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Content]{@link google.cloud.dataplex.v1.Content}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/content_service.create_content.js + * region_tag:dataplex_v1_generated_ContentService_CreateContent_async + */ + createContent( + request?: protos.google.cloud.dataplex.v1.ICreateContentRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IContent, + protos.google.cloud.dataplex.v1.ICreateContentRequest | undefined, + {} | undefined + ] + >; + createContent( + request: protos.google.cloud.dataplex.v1.ICreateContentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IContent, + protos.google.cloud.dataplex.v1.ICreateContentRequest | null | undefined, + {} | null | undefined + > + ): void; + createContent( + request: protos.google.cloud.dataplex.v1.ICreateContentRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IContent, + protos.google.cloud.dataplex.v1.ICreateContentRequest | null | undefined, + {} | null | undefined + > + ): void; + createContent( + request?: protos.google.cloud.dataplex.v1.ICreateContentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataplex.v1.IContent, + | protos.google.cloud.dataplex.v1.ICreateContentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataplex.v1.IContent, + protos.google.cloud.dataplex.v1.ICreateContentRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IContent, + protos.google.cloud.dataplex.v1.ICreateContentRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createContent(request, options, callback); + } + /** + * Update a content. Only supports full resource update. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. + * @param {google.cloud.dataplex.v1.Content} request.content + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Content]{@link google.cloud.dataplex.v1.Content}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/content_service.update_content.js + * region_tag:dataplex_v1_generated_ContentService_UpdateContent_async + */ + updateContent( + request?: protos.google.cloud.dataplex.v1.IUpdateContentRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IContent, + protos.google.cloud.dataplex.v1.IUpdateContentRequest | undefined, + {} | undefined + ] + >; + updateContent( + request: protos.google.cloud.dataplex.v1.IUpdateContentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IContent, + protos.google.cloud.dataplex.v1.IUpdateContentRequest | null | undefined, + {} | null | undefined + > + ): void; + updateContent( + request: protos.google.cloud.dataplex.v1.IUpdateContentRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IContent, + protos.google.cloud.dataplex.v1.IUpdateContentRequest | null | undefined, + {} | null | undefined + > + ): void; + updateContent( + request?: protos.google.cloud.dataplex.v1.IUpdateContentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataplex.v1.IContent, + | protos.google.cloud.dataplex.v1.IUpdateContentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataplex.v1.IContent, + protos.google.cloud.dataplex.v1.IUpdateContentRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IContent, + protos.google.cloud.dataplex.v1.IUpdateContentRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'content.name': request.content!.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateContent(request, options, callback); + } + /** + * Delete a content. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the content: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/content_service.delete_content.js + * region_tag:dataplex_v1_generated_ContentService_DeleteContent_async + */ + deleteContent( + request?: protos.google.cloud.dataplex.v1.IDeleteContentRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IDeleteContentRequest | undefined, + {} | undefined + ] + >; + deleteContent( + request: protos.google.cloud.dataplex.v1.IDeleteContentRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IDeleteContentRequest | null | undefined, + {} | null | undefined + > + ): void; + deleteContent( + request: protos.google.cloud.dataplex.v1.IDeleteContentRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IDeleteContentRequest | null | undefined, + {} | null | undefined + > + ): void; + deleteContent( + request?: protos.google.cloud.dataplex.v1.IDeleteContentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataplex.v1.IDeleteContentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IDeleteContentRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IDeleteContentRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deleteContent(request, options, callback); + } + /** + * Get a content resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the content: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} + * @param {google.cloud.dataplex.v1.GetContentRequest.ContentView} [request.view] + * Optional. Specify content view to make a partial request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Content]{@link google.cloud.dataplex.v1.Content}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/content_service.get_content.js + * region_tag:dataplex_v1_generated_ContentService_GetContent_async + */ + getContent( + request?: protos.google.cloud.dataplex.v1.IGetContentRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IContent, + protos.google.cloud.dataplex.v1.IGetContentRequest | undefined, + {} | undefined + ] + >; + getContent( + request: protos.google.cloud.dataplex.v1.IGetContentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IContent, + protos.google.cloud.dataplex.v1.IGetContentRequest | null | undefined, + {} | null | undefined + > + ): void; + getContent( + request: protos.google.cloud.dataplex.v1.IGetContentRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IContent, + protos.google.cloud.dataplex.v1.IGetContentRequest | null | undefined, + {} | null | undefined + > + ): void; + getContent( + request?: protos.google.cloud.dataplex.v1.IGetContentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataplex.v1.IContent, + protos.google.cloud.dataplex.v1.IGetContentRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataplex.v1.IContent, + protos.google.cloud.dataplex.v1.IGetContentRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IContent, + protos.google.cloud.dataplex.v1.IGetContentRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getContent(request, options, callback); + } + + /** + * List content. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent lake: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id} + * @param {number} [request.pageSize] + * Optional. Maximum number of content to return. The service may return fewer than + * this value. If unspecified, at most 10 content will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListContent` call. Provide this + * to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListContent` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Filter request. Filters are case-sensitive. + * The following formats are supported: + * + * labels.key1 = "value1" + * labels:key1 + * type = "NOTEBOOK" + * type = "SQL_SCRIPT" + * + * These restrictions can be coinjoined with AND, OR and NOT conjunctions. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Content]{@link google.cloud.dataplex.v1.Content}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listContentAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listContent( + request?: protos.google.cloud.dataplex.v1.IListContentRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IContent[], + protos.google.cloud.dataplex.v1.IListContentRequest | null, + protos.google.cloud.dataplex.v1.IListContentResponse + ] + >; + listContent( + request: protos.google.cloud.dataplex.v1.IListContentRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListContentRequest, + protos.google.cloud.dataplex.v1.IListContentResponse | null | undefined, + protos.google.cloud.dataplex.v1.IContent + > + ): void; + listContent( + request: protos.google.cloud.dataplex.v1.IListContentRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListContentRequest, + protos.google.cloud.dataplex.v1.IListContentResponse | null | undefined, + protos.google.cloud.dataplex.v1.IContent + > + ): void; + listContent( + request?: protos.google.cloud.dataplex.v1.IListContentRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataplex.v1.IListContentRequest, + | protos.google.cloud.dataplex.v1.IListContentResponse + | null + | undefined, + protos.google.cloud.dataplex.v1.IContent + >, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListContentRequest, + protos.google.cloud.dataplex.v1.IListContentResponse | null | undefined, + protos.google.cloud.dataplex.v1.IContent + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IContent[], + protos.google.cloud.dataplex.v1.IListContentRequest | null, + protos.google.cloud.dataplex.v1.IListContentResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listContent(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent lake: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id} + * @param {number} [request.pageSize] + * Optional. Maximum number of content to return. The service may return fewer than + * this value. If unspecified, at most 10 content will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListContent` call. Provide this + * to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListContent` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Filter request. Filters are case-sensitive. + * The following formats are supported: + * + * labels.key1 = "value1" + * labels:key1 + * type = "NOTEBOOK" + * type = "SQL_SCRIPT" + * + * These restrictions can be coinjoined with AND, OR and NOT conjunctions. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [Content]{@link google.cloud.dataplex.v1.Content} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listContentAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listContentStream( + request?: protos.google.cloud.dataplex.v1.IListContentRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listContent']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listContent.createStream( + this.innerApiCalls.listContent as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listContent`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent lake: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id} + * @param {number} [request.pageSize] + * Optional. Maximum number of content to return. The service may return fewer than + * this value. If unspecified, at most 10 content will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListContent` call. Provide this + * to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListContent` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Filter request. Filters are case-sensitive. + * The following formats are supported: + * + * labels.key1 = "value1" + * labels:key1 + * type = "NOTEBOOK" + * type = "SQL_SCRIPT" + * + * These restrictions can be coinjoined with AND, OR and NOT conjunctions. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Content]{@link google.cloud.dataplex.v1.Content}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/content_service.list_content.js + * region_tag:dataplex_v1_generated_ContentService_ListContent_async + */ + listContentAsync( + request?: protos.google.cloud.dataplex.v1.IListContentRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listContent']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listContent.asyncIterate( + this.innerApiCalls['listContent'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified asset resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} asset + * @returns {string} Resource name string. + */ + assetPath( + project: string, + location: string, + lake: string, + zone: string, + asset: string + ) { + return this.pathTemplates.assetPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + asset: asset, + }); + } + + /** + * Parse the project from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).project; + } + + /** + * Parse the location from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).location; + } + + /** + * Parse the lake from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).lake; + } + + /** + * Parse the zone from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).zone; + } + + /** + * Parse the asset from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the asset. + */ + matchAssetFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).asset; + } + + /** + * Return a fully-qualified content resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath( + project: string, + location: string, + lake: string, + content: string + ) { + return this.pathTemplates.contentPathTemplate.render({ + project: project, + location: location, + lake: lake, + content: content, + }); + } + + /** + * Parse the project from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the project. + */ + matchProjectFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).project; + } + + /** + * Parse the location from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the location. + */ + matchLocationFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).location; + } + + /** + * Parse the lake from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).lake; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified entity resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} entity + * @returns {string} Resource name string. + */ + entityPath( + project: string, + location: string, + lake: string, + zone: string, + entity: string + ) { + return this.pathTemplates.entityPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + entity: entity, + }); + } + + /** + * Parse the project from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).project; + } + + /** + * Parse the location from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).location; + } + + /** + * Parse the lake from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).lake; + } + + /** + * Parse the zone from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).zone; + } + + /** + * Parse the entity from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the entity. + */ + matchEntityFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).entity; + } + + /** + * Return a fully-qualified environment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} environment + * @returns {string} Resource name string. + */ + environmentPath( + project: string, + location: string, + lake: string, + environment: string + ) { + return this.pathTemplates.environmentPathTemplate.render({ + project: project, + location: location, + lake: lake, + environment: environment, + }); + } + + /** + * Parse the project from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .project; + } + + /** + * Parse the location from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .location; + } + + /** + * Parse the lake from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .lake; + } + + /** + * Parse the environment from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .environment; + } + + /** + * Return a fully-qualified job resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} task + * @param {string} job + * @returns {string} Resource name string. + */ + jobPath( + project: string, + location: string, + lake: string, + task: string, + job: string + ) { + return this.pathTemplates.jobPathTemplate.render({ + project: project, + location: location, + lake: lake, + task: task, + job: job, + }); + } + + /** + * Parse the project from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the project. + */ + matchProjectFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).project; + } + + /** + * Parse the location from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the location. + */ + matchLocationFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).location; + } + + /** + * Parse the lake from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).lake; + } + + /** + * Parse the task from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the task. + */ + matchTaskFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).task; + } + + /** + * Parse the job from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the job. + */ + matchJobFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).job; + } + + /** + * Return a fully-qualified lake resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @returns {string} Resource name string. + */ + lakePath(project: string, location: string, lake: string) { + return this.pathTemplates.lakePathTemplate.render({ + project: project, + location: location, + lake: lake, + }); + } + + /** + * Parse the project from Lake resource. + * + * @param {string} lakeName + * A fully-qualified path representing Lake resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLakeName(lakeName: string) { + return this.pathTemplates.lakePathTemplate.match(lakeName).project; + } + + /** + * Parse the location from Lake resource. + * + * @param {string} lakeName + * A fully-qualified path representing Lake resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLakeName(lakeName: string) { + return this.pathTemplates.lakePathTemplate.match(lakeName).location; + } + + /** + * Parse the lake from Lake resource. + * + * @param {string} lakeName + * A fully-qualified path representing Lake resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromLakeName(lakeName: string) { + return this.pathTemplates.lakePathTemplate.match(lakeName).lake; + } + + /** + * Return a fully-qualified partition resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} entity + * @param {string} partition + * @returns {string} Resource name string. + */ + partitionPath( + project: string, + location: string, + lake: string, + zone: string, + entity: string, + partition: string + ) { + return this.pathTemplates.partitionPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + entity: entity, + partition: partition, + }); + } + + /** + * Parse the project from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName) + .project; + } + + /** + * Parse the location from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName) + .location; + } + + /** + * Parse the lake from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).lake; + } + + /** + * Parse the zone from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).zone; + } + + /** + * Parse the entity from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the entity. + */ + matchEntityFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).entity; + } + + /** + * Parse the partition from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the partition. + */ + matchPartitionFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName) + .partition; + } + + /** + * Return a fully-qualified projectLocationLakeAction resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} action + * @returns {string} Resource name string. + */ + projectLocationLakeActionPath( + project: string, + location: string, + lake: string, + action: string + ) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.render({ + project: project, + location: location, + lake: lake, + action: action, + }); + } + + /** + * Parse the project from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationLakeActionName( + projectLocationLakeActionName: string + ) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match( + projectLocationLakeActionName + ).project; + } + + /** + * Parse the location from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationLakeActionName( + projectLocationLakeActionName: string + ) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match( + projectLocationLakeActionName + ).location; + } + + /** + * Parse the lake from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromProjectLocationLakeActionName( + projectLocationLakeActionName: string + ) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match( + projectLocationLakeActionName + ).lake; + } + + /** + * Parse the action from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the action. + */ + matchActionFromProjectLocationLakeActionName( + projectLocationLakeActionName: string + ) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match( + projectLocationLakeActionName + ).action; + } + + /** + * Return a fully-qualified projectLocationLakeZoneAction resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} action + * @returns {string} Resource name string. + */ + projectLocationLakeZoneActionPath( + project: string, + location: string, + lake: string, + zone: string, + action: string + ) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + action: action, + }); + } + + /** + * Parse the project from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationLakeZoneActionName( + projectLocationLakeZoneActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match( + projectLocationLakeZoneActionName + ).project; + } + + /** + * Parse the location from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationLakeZoneActionName( + projectLocationLakeZoneActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match( + projectLocationLakeZoneActionName + ).location; + } + + /** + * Parse the lake from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromProjectLocationLakeZoneActionName( + projectLocationLakeZoneActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match( + projectLocationLakeZoneActionName + ).lake; + } + + /** + * Parse the zone from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromProjectLocationLakeZoneActionName( + projectLocationLakeZoneActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match( + projectLocationLakeZoneActionName + ).zone; + } + + /** + * Parse the action from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the action. + */ + matchActionFromProjectLocationLakeZoneActionName( + projectLocationLakeZoneActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match( + projectLocationLakeZoneActionName + ).action; + } + + /** + * Return a fully-qualified projectLocationLakeZoneAssetAction resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} asset + * @param {string} action + * @returns {string} Resource name string. + */ + projectLocationLakeZoneAssetActionPath( + project: string, + location: string, + lake: string, + zone: string, + asset: string, + action: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render( + { + project: project, + location: location, + lake: lake, + zone: zone, + asset: asset, + action: action, + } + ); + } + + /** + * Parse the project from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationLakeZoneAssetActionName( + projectLocationLakeZoneAssetActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match( + projectLocationLakeZoneAssetActionName + ).project; + } + + /** + * Parse the location from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationLakeZoneAssetActionName( + projectLocationLakeZoneAssetActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match( + projectLocationLakeZoneAssetActionName + ).location; + } + + /** + * Parse the lake from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromProjectLocationLakeZoneAssetActionName( + projectLocationLakeZoneAssetActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match( + projectLocationLakeZoneAssetActionName + ).lake; + } + + /** + * Parse the zone from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromProjectLocationLakeZoneAssetActionName( + projectLocationLakeZoneAssetActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match( + projectLocationLakeZoneAssetActionName + ).zone; + } + + /** + * Parse the asset from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the asset. + */ + matchAssetFromProjectLocationLakeZoneAssetActionName( + projectLocationLakeZoneAssetActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match( + projectLocationLakeZoneAssetActionName + ).asset; + } + + /** + * Parse the action from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the action. + */ + matchActionFromProjectLocationLakeZoneAssetActionName( + projectLocationLakeZoneAssetActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match( + projectLocationLakeZoneAssetActionName + ).action; + } + + /** + * Return a fully-qualified session resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} environment + * @param {string} session + * @returns {string} Resource name string. + */ + sessionPath( + project: string, + location: string, + lake: string, + environment: string, + session: string + ) { + return this.pathTemplates.sessionPathTemplate.render({ + project: project, + location: location, + lake: lake, + environment: environment, + session: session, + }); + } + + /** + * Parse the project from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).project; + } + + /** + * Parse the location from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the location. + */ + matchLocationFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).location; + } + + /** + * Parse the lake from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).lake; + } + + /** + * Parse the environment from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName) + .environment; + } + + /** + * Parse the session from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the session. + */ + matchSessionFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).session; + } + + /** + * Return a fully-qualified task resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} task + * @returns {string} Resource name string. + */ + taskPath(project: string, location: string, lake: string, task: string) { + return this.pathTemplates.taskPathTemplate.render({ + project: project, + location: location, + lake: lake, + task: task, + }); + } + + /** + * Parse the project from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).project; + } + + /** + * Parse the location from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).location; + } + + /** + * Parse the lake from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).lake; + } + + /** + * Parse the task from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the task. + */ + matchTaskFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).task; + } + + /** + * Return a fully-qualified zone resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @returns {string} Resource name string. + */ + zonePath(project: string, location: string, lake: string, zone: string) { + return this.pathTemplates.zonePathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + }); + } + + /** + * Parse the project from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the project. + */ + matchProjectFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).project; + } + + /** + * Parse the location from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the location. + */ + matchLocationFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).location; + } + + /** + * Parse the lake from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).lake; + } + + /** + * Parse the zone from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).zone; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + this.initialize(); + if (!this._terminated) { + return this.contentServiceStub!.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-dataplex/src/v1/content_service_client_config.json b/packages/google-cloud-dataplex/src/v1/content_service_client_config.json new file mode 100644 index 00000000000..abfbef17bb1 --- /dev/null +++ b/packages/google-cloud-dataplex/src/v1/content_service_client_config.json @@ -0,0 +1,46 @@ +{ + "interfaces": { + "google.cloud.dataplex.v1.ContentService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "CreateContent": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateContent": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteContent": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetContent": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListContent": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-dataplex/src/v1/content_service_proto_list.json b/packages/google-cloud-dataplex/src/v1/content_service_proto_list.json new file mode 100644 index 00000000000..37d1b351085 --- /dev/null +++ b/packages/google-cloud-dataplex/src/v1/content_service_proto_list.json @@ -0,0 +1,9 @@ +[ + "../../protos/google/cloud/dataplex/v1/analyze.proto", + "../../protos/google/cloud/dataplex/v1/content.proto", + "../../protos/google/cloud/dataplex/v1/logs.proto", + "../../protos/google/cloud/dataplex/v1/metadata.proto", + "../../protos/google/cloud/dataplex/v1/resources.proto", + "../../protos/google/cloud/dataplex/v1/service.proto", + "../../protos/google/cloud/dataplex/v1/tasks.proto" +] diff --git a/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts b/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts index 792f44008ad..49e34f950b1 100644 --- a/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts +++ b/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts @@ -173,9 +173,15 @@ export class DataplexServiceClient { assetPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}' ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/content/{content}' + ), entityPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}' ), + environmentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}' + ), jobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}' ), @@ -199,6 +205,9 @@ export class DataplexServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}' ), + sessionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}/sessions/{session}' + ), taskPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}' ), @@ -251,6 +260,16 @@ export class DataplexServiceClient { 'nextPageToken', 'jobs' ), + listEnvironments: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'environments' + ), + listSessions: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'sessions' + ), }; const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); @@ -337,6 +356,24 @@ export class DataplexServiceClient { const deleteTaskMetadata = protoFilesRoot.lookup( '.google.cloud.dataplex.v1.OperationMetadata' ) as gax.protobuf.Type; + const createEnvironmentResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.Environment' + ) as gax.protobuf.Type; + const createEnvironmentMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updateEnvironmentResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.Environment' + ) as gax.protobuf.Type; + const updateEnvironmentMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteEnvironmentResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteEnvironmentMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata' + ) as gax.protobuf.Type; this.descriptors.longrunning = { createLake: new this._gaxModule.LongrunningDescriptor( @@ -399,6 +436,21 @@ export class DataplexServiceClient { deleteTaskResponse.decode.bind(deleteTaskResponse), deleteTaskMetadata.decode.bind(deleteTaskMetadata) ), + createEnvironment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createEnvironmentResponse.decode.bind(createEnvironmentResponse), + createEnvironmentMetadata.decode.bind(createEnvironmentMetadata) + ), + updateEnvironment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateEnvironmentResponse.decode.bind(updateEnvironmentResponse), + updateEnvironmentMetadata.decode.bind(updateEnvironmentMetadata) + ), + deleteEnvironment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteEnvironmentResponse.decode.bind(deleteEnvironmentResponse), + deleteEnvironmentMetadata.decode.bind(deleteEnvironmentMetadata) + ), }; // Put together the default options sent with requests. @@ -477,6 +529,12 @@ export class DataplexServiceClient { 'listJobs', 'getJob', 'cancelJob', + 'createEnvironment', + 'updateEnvironment', + 'deleteEnvironment', + 'listEnvironments', + 'getEnvironment', + 'listSessions', ]; for (const methodName of dataplexServiceStubMethods) { const callPromise = this.dataplexServiceStub.then( @@ -1066,6 +1124,92 @@ export class DataplexServiceClient { this.initialize(); return this.innerApiCalls.cancelJob(request, options, callback); } + /** + * Get environment resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the environment: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id} + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Environment]{@link google.cloud.dataplex.v1.Environment}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.get_environment.js + * region_tag:dataplex_v1_generated_DataplexService_GetEnvironment_async + */ + getEnvironment( + request?: protos.google.cloud.dataplex.v1.IGetEnvironmentRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IEnvironment, + protos.google.cloud.dataplex.v1.IGetEnvironmentRequest | undefined, + {} | undefined + ] + >; + getEnvironment( + request: protos.google.cloud.dataplex.v1.IGetEnvironmentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IEnvironment, + protos.google.cloud.dataplex.v1.IGetEnvironmentRequest | null | undefined, + {} | null | undefined + > + ): void; + getEnvironment( + request: protos.google.cloud.dataplex.v1.IGetEnvironmentRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IEnvironment, + protos.google.cloud.dataplex.v1.IGetEnvironmentRequest | null | undefined, + {} | null | undefined + > + ): void; + getEnvironment( + request?: protos.google.cloud.dataplex.v1.IGetEnvironmentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataplex.v1.IEnvironment, + | protos.google.cloud.dataplex.v1.IGetEnvironmentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataplex.v1.IEnvironment, + protos.google.cloud.dataplex.v1.IGetEnvironmentRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IEnvironment, + protos.google.cloud.dataplex.v1.IGetEnvironmentRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getEnvironment(request, options, callback); + } /** * Creates a lake resource. @@ -1074,7 +1218,7 @@ export class DataplexServiceClient { * The request object that will be sent. * @param {string} request.parent * Required. The resource name of the lake location, of the form: - * `projects/{project_number}/locations/{location_id}` + * projects/{project_number}/locations/{location_id} * where `location_id` refers to a GCP region. * @param {string} request.lakeId * Required. Lake identifier. @@ -2798,85 +2942,101 @@ export class DataplexServiceClient { >; } /** - * Lists lake resources in a project and location. + * Create an environment resource. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name of the lake location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * @param {number} [request.pageSize] - * Optional. Maximum number of Lakes to return. The service may return fewer than this - * value. If unspecified, at most 10 lakes will be returned. The maximum - * value is 1000; values above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListLakes` call. Provide this to - * retrieve the subsequent page. When paginating, all other parameters - * provided to `ListLakes` must match the call that provided the page token. - * @param {string} [request.filter] - * Optional. Filter request. - * @param {string} [request.orderBy] - * Optional. Order by fields for the result. + * Required. The resource name of the parent lake: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id} + * @param {string} request.environmentId + * Required. Environment identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the lake. + * @param {google.cloud.dataplex.v1.Environment} request.environment + * Required. Environment resource. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [Lake]{@link google.cloud.dataplex.v1.Lake}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listLakesAsync()` - * method described below for async iteration which you can stop as needed. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.create_environment.js + * region_tag:dataplex_v1_generated_DataplexService_CreateEnvironment_async */ - listLakes( - request?: protos.google.cloud.dataplex.v1.IListLakesRequest, + createEnvironment( + request?: protos.google.cloud.dataplex.v1.ICreateEnvironmentRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.dataplex.v1.ILake[], - protos.google.cloud.dataplex.v1.IListLakesRequest | null, - protos.google.cloud.dataplex.v1.IListLakesResponse + LROperation< + protos.google.cloud.dataplex.v1.IEnvironment, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined ] >; - listLakes( - request: protos.google.cloud.dataplex.v1.IListLakesRequest, + createEnvironment( + request: protos.google.cloud.dataplex.v1.ICreateEnvironmentRequest, options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListLakesRequest, - protos.google.cloud.dataplex.v1.IListLakesResponse | null | undefined, - protos.google.cloud.dataplex.v1.ILake + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.IEnvironment, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined > ): void; - listLakes( - request: protos.google.cloud.dataplex.v1.IListLakesRequest, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListLakesRequest, - protos.google.cloud.dataplex.v1.IListLakesResponse | null | undefined, - protos.google.cloud.dataplex.v1.ILake + createEnvironment( + request: protos.google.cloud.dataplex.v1.ICreateEnvironmentRequest, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.IEnvironment, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined > ): void; - listLakes( - request?: protos.google.cloud.dataplex.v1.IListLakesRequest, + createEnvironment( + request?: protos.google.cloud.dataplex.v1.ICreateEnvironmentRequest, optionsOrCallback?: | CallOptions - | PaginationCallback< - protos.google.cloud.dataplex.v1.IListLakesRequest, - protos.google.cloud.dataplex.v1.IListLakesResponse | null | undefined, - protos.google.cloud.dataplex.v1.ILake + | Callback< + LROperation< + protos.google.cloud.dataplex.v1.IEnvironment, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined >, - callback?: PaginationCallback< - protos.google.cloud.dataplex.v1.IListLakesRequest, - protos.google.cloud.dataplex.v1.IListLakesResponse | null | undefined, - protos.google.cloud.dataplex.v1.ILake + callback?: Callback< + LROperation< + protos.google.cloud.dataplex.v1.IEnvironment, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined > ): Promise< [ - protos.google.cloud.dataplex.v1.ILake[], - protos.google.cloud.dataplex.v1.IListLakesRequest | null, - protos.google.cloud.dataplex.v1.IListLakesResponse + LROperation< + protos.google.cloud.dataplex.v1.IEnvironment, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined ] > | void { request = request || {}; @@ -2895,81 +3055,906 @@ export class DataplexServiceClient { parent: request.parent || '', }); this.initialize(); - return this.innerApiCalls.listLakes(request, options, callback); + return this.innerApiCalls.createEnvironment(request, options, callback); } - /** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * Check the status of the long running operation returned by `createEnvironment()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.create_environment.js + * region_tag:dataplex_v1_generated_DataplexService_CreateEnvironment_async + */ + async checkCreateEnvironmentProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.dataplex.v1.Environment, + protos.google.cloud.dataplex.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.createEnvironment, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.dataplex.v1.Environment, + protos.google.cloud.dataplex.v1.OperationMetadata + >; + } + /** + * Update the environment resource. + * * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the lake location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * @param {number} [request.pageSize] - * Optional. Maximum number of Lakes to return. The service may return fewer than this - * value. If unspecified, at most 10 lakes will be returned. The maximum - * value is 1000; values above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListLakes` call. Provide this to - * retrieve the subsequent page. When paginating, all other parameters - * provided to `ListLakes` must match the call that provided the page token. - * @param {string} [request.filter] - * Optional. Filter request. - * @param {string} [request.orderBy] - * Optional. Order by fields for the result. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. + * @param {google.cloud.dataplex.v1.Environment} request.environment + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing [Lake]{@link google.cloud.dataplex.v1.Lake} on 'data' event. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed. Note that it can affect your quota. - * We recommend using `listLakesAsync()` - * method described below for async iteration which you can stop as needed. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.update_environment.js + * region_tag:dataplex_v1_generated_DataplexService_UpdateEnvironment_async */ - listLakesStream( - request?: protos.google.cloud.dataplex.v1.IListLakesRequest, + updateEnvironment( + request?: protos.google.cloud.dataplex.v1.IUpdateEnvironmentRequest, options?: CallOptions - ): Transform { - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; + ): Promise< + [ + LROperation< + protos.google.cloud.dataplex.v1.IEnvironment, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateEnvironment( + request: protos.google.cloud.dataplex.v1.IUpdateEnvironmentRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.IEnvironment, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateEnvironment( + request: protos.google.cloud.dataplex.v1.IUpdateEnvironmentRequest, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.IEnvironment, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateEnvironment( + request?: protos.google.cloud.dataplex.v1.IUpdateEnvironmentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.dataplex.v1.IEnvironment, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.dataplex.v1.IEnvironment, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.dataplex.v1.IEnvironment, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'environment.name': request.environment!.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateEnvironment(request, options, callback); + } + /** + * Check the status of the long running operation returned by `updateEnvironment()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.update_environment.js + * region_tag:dataplex_v1_generated_DataplexService_UpdateEnvironment_async + */ + async checkUpdateEnvironmentProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.dataplex.v1.Environment, + protos.google.cloud.dataplex.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.updateEnvironment, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.dataplex.v1.Environment, + protos.google.cloud.dataplex.v1.OperationMetadata + >; + } + /** + * Delete the environment resource. All the child resources must have been + * deleted before environment deletion can be initiated. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the environment: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.delete_environment.js + * region_tag:dataplex_v1_generated_DataplexService_DeleteEnvironment_async + */ + deleteEnvironment( + request?: protos.google.cloud.dataplex.v1.IDeleteEnvironmentRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteEnvironment( + request: protos.google.cloud.dataplex.v1.IDeleteEnvironmentRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteEnvironment( + request: protos.google.cloud.dataplex.v1.IDeleteEnvironmentRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteEnvironment( + request?: protos.google.cloud.dataplex.v1.IDeleteEnvironmentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deleteEnvironment(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteEnvironment()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.delete_environment.js + * region_tag:dataplex_v1_generated_DataplexService_DeleteEnvironment_async + */ + async checkDeleteEnvironmentProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.dataplex.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.deleteEnvironment, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.dataplex.v1.OperationMetadata + >; + } + /** + * Lists lake resources in a project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the lake location, of the form: + * `projects/{project_number}/locations/{location_id}` + * where `location_id` refers to a GCP region. + * @param {number} [request.pageSize] + * Optional. Maximum number of Lakes to return. The service may return fewer than this + * value. If unspecified, at most 10 lakes will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListLakes` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListLakes` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Lake]{@link google.cloud.dataplex.v1.Lake}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listLakesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listLakes( + request?: protos.google.cloud.dataplex.v1.IListLakesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.ILake[], + protos.google.cloud.dataplex.v1.IListLakesRequest | null, + protos.google.cloud.dataplex.v1.IListLakesResponse + ] + >; + listLakes( + request: protos.google.cloud.dataplex.v1.IListLakesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListLakesRequest, + protos.google.cloud.dataplex.v1.IListLakesResponse | null | undefined, + protos.google.cloud.dataplex.v1.ILake + > + ): void; + listLakes( + request: protos.google.cloud.dataplex.v1.IListLakesRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListLakesRequest, + protos.google.cloud.dataplex.v1.IListLakesResponse | null | undefined, + protos.google.cloud.dataplex.v1.ILake + > + ): void; + listLakes( + request?: protos.google.cloud.dataplex.v1.IListLakesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataplex.v1.IListLakesRequest, + protos.google.cloud.dataplex.v1.IListLakesResponse | null | undefined, + protos.google.cloud.dataplex.v1.ILake + >, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListLakesRequest, + protos.google.cloud.dataplex.v1.IListLakesResponse | null | undefined, + protos.google.cloud.dataplex.v1.ILake + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.ILake[], + protos.google.cloud.dataplex.v1.IListLakesRequest | null, + protos.google.cloud.dataplex.v1.IListLakesResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listLakes(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the lake location, of the form: + * `projects/{project_number}/locations/{location_id}` + * where `location_id` refers to a GCP region. + * @param {number} [request.pageSize] + * Optional. Maximum number of Lakes to return. The service may return fewer than this + * value. If unspecified, at most 10 lakes will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListLakes` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListLakes` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [Lake]{@link google.cloud.dataplex.v1.Lake} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listLakesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listLakesStream( + request?: protos.google.cloud.dataplex.v1.IListLakesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listLakes']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listLakes.createStream( + this.innerApiCalls.listLakes as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listLakes`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the lake location, of the form: + * `projects/{project_number}/locations/{location_id}` + * where `location_id` refers to a GCP region. + * @param {number} [request.pageSize] + * Optional. Maximum number of Lakes to return. The service may return fewer than this + * value. If unspecified, at most 10 lakes will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListLakes` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListLakes` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Lake]{@link google.cloud.dataplex.v1.Lake}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.list_lakes.js + * region_tag:dataplex_v1_generated_DataplexService_ListLakes_async + */ + listLakesAsync( + request?: protos.google.cloud.dataplex.v1.IListLakesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listLakes']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listLakes.asyncIterate( + this.innerApiCalls['listLakes'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Lists action resources in a lake. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}` + * @param {number} [request.pageSize] + * Optional. Maximum number of actions to return. The service may return fewer than this + * value. If unspecified, at most 10 actions will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListLakeActions` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListLakeActions` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Action]{@link google.cloud.dataplex.v1.Action}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listLakeActionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listLakeActions( + request?: protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IAction[], + protos.google.cloud.dataplex.v1.IListLakeActionsRequest | null, + protos.google.cloud.dataplex.v1.IListActionsResponse + ] + >; + listLakeActions( + request: protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + protos.google.cloud.dataplex.v1.IListActionsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IAction + > + ): void; + listLakeActions( + request: protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + protos.google.cloud.dataplex.v1.IListActionsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IAction + > + ): void; + listLakeActions( + request?: protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + | protos.google.cloud.dataplex.v1.IListActionsResponse + | null + | undefined, + protos.google.cloud.dataplex.v1.IAction + >, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + protos.google.cloud.dataplex.v1.IListActionsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IAction + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IAction[], + protos.google.cloud.dataplex.v1.IListLakeActionsRequest | null, + protos.google.cloud.dataplex.v1.IListActionsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listLakeActions(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}` + * @param {number} [request.pageSize] + * Optional. Maximum number of actions to return. The service may return fewer than this + * value. If unspecified, at most 10 actions will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListLakeActions` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListLakeActions` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [Action]{@link google.cloud.dataplex.v1.Action} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listLakeActionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listLakeActionsStream( + request?: protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listLakeActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listLakeActions.createStream( + this.innerApiCalls.listLakeActions as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listLakeActions`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}` + * @param {number} [request.pageSize] + * Optional. Maximum number of actions to return. The service may return fewer than this + * value. If unspecified, at most 10 actions will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListLakeActions` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListLakeActions` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Action]{@link google.cloud.dataplex.v1.Action}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.list_lake_actions.js + * region_tag:dataplex_v1_generated_DataplexService_ListLakeActions_async + */ + listLakeActionsAsync( + request?: protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listLakeActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listLakeActions.asyncIterate( + this.innerApiCalls['listLakeActions'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Lists zone resources in a lake. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of zones to return. The service may return fewer than this + * value. If unspecified, at most 10 zones will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListZones` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZones` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Zone]{@link google.cloud.dataplex.v1.Zone}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listZonesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listZones( + request?: protos.google.cloud.dataplex.v1.IListZonesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IZone[], + protos.google.cloud.dataplex.v1.IListZonesRequest | null, + protos.google.cloud.dataplex.v1.IListZonesResponse + ] + >; + listZones( + request: protos.google.cloud.dataplex.v1.IListZonesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListZonesRequest, + protos.google.cloud.dataplex.v1.IListZonesResponse | null | undefined, + protos.google.cloud.dataplex.v1.IZone + > + ): void; + listZones( + request: protos.google.cloud.dataplex.v1.IListZonesRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListZonesRequest, + protos.google.cloud.dataplex.v1.IListZonesResponse | null | undefined, + protos.google.cloud.dataplex.v1.IZone + > + ): void; + listZones( + request?: protos.google.cloud.dataplex.v1.IListZonesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataplex.v1.IListZonesRequest, + protos.google.cloud.dataplex.v1.IListZonesResponse | null | undefined, + protos.google.cloud.dataplex.v1.IZone + >, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListZonesRequest, + protos.google.cloud.dataplex.v1.IListZonesResponse | null | undefined, + protos.google.cloud.dataplex.v1.IZone + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IZone[], + protos.google.cloud.dataplex.v1.IListZonesRequest | null, + protos.google.cloud.dataplex.v1.IListZonesResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ parent: request.parent || '', }); - const defaultCallSettings = this._defaults['listLakes']; + this.initialize(); + return this.innerApiCalls.listZones(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of zones to return. The service may return fewer than this + * value. If unspecified, at most 10 zones will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListZones` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZones` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [Zone]{@link google.cloud.dataplex.v1.Zone} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listZonesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listZonesStream( + request?: protos.google.cloud.dataplex.v1.IListZonesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listZones']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listLakes.createStream( - this.innerApiCalls.listLakes as gax.GaxCall, + return this.descriptors.page.listZones.createStream( + this.innerApiCalls.listZones as gax.GaxCall, request, callSettings ); } /** - * Equivalent to `listLakes`, but returns an iterable object. + * Equivalent to `listZones`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name of the lake location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. * @param {number} [request.pageSize] - * Optional. Maximum number of Lakes to return. The service may return fewer than this - * value. If unspecified, at most 10 lakes will be returned. The maximum + * Optional. Maximum number of zones to return. The service may return fewer than this + * value. If unspecified, at most 10 zones will be returned. The maximum * value is 1000; values above 1000 will be coerced to 1000. * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListLakes` call. Provide this to + * Optional. Page token received from a previous `ListZones` call. Provide this to * retrieve the subsequent page. When paginating, all other parameters - * provided to `ListLakes` must match the call that provided the page token. + * provided to `ListZones` must match the call that provided the page token. * @param {string} [request.filter] * Optional. Filter request. * @param {string} [request.orderBy] @@ -2979,18 +3964,18 @@ export class DataplexServiceClient { * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * [Lake]{@link google.cloud.dataplex.v1.Lake}. The API will be called under the hood as needed, once per the page, + * [Zone]{@link google.cloud.dataplex.v1.Zone}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1/dataplex_service.list_lakes.js - * region_tag:dataplex_v1_generated_DataplexService_ListLakes_async + * @example include:samples/generated/v1/dataplex_service.list_zones.js + * region_tag:dataplex_v1_generated_DataplexService_ListZones_async */ - listLakesAsync( - request?: protos.google.cloud.dataplex.v1.IListLakesRequest, + listZonesAsync( + request?: protos.google.cloud.dataplex.v1.IListZonesRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -2999,31 +3984,31 @@ export class DataplexServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const defaultCallSettings = this._defaults['listLakes']; + const defaultCallSettings = this._defaults['listZones']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listLakes.asyncIterate( - this.innerApiCalls['listLakes'] as GaxCall, + return this.descriptors.page.listZones.asyncIterate( + this.innerApiCalls['listZones'] as GaxCall, request as unknown as RequestType, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists action resources in a lake. + * Lists action resources in a zone. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}` + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. * @param {number} [request.pageSize] * Optional. Maximum number of actions to return. The service may return fewer than this * value. If unspecified, at most 10 actions will be returned. The maximum * value is 1000; values above 1000 will be coerced to 1000. * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListLakeActions` call. Provide this to + * Optional. Page token received from a previous `ListZoneActions` call. Provide this to * retrieve the subsequent page. When paginating, all other parameters - * provided to `ListLakeActions` must match the call that provided the page + * provided to `ListZoneActions` must match the call that provided the page * token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -3032,59 +4017,59 @@ export class DataplexServiceClient { * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. - * We recommend using `listLakeActionsAsync()` + * We recommend using `listZoneActionsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listLakeActions( - request?: protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + listZoneActions( + request?: protos.google.cloud.dataplex.v1.IListZoneActionsRequest, options?: CallOptions ): Promise< [ protos.google.cloud.dataplex.v1.IAction[], - protos.google.cloud.dataplex.v1.IListLakeActionsRequest | null, + protos.google.cloud.dataplex.v1.IListZoneActionsRequest | null, protos.google.cloud.dataplex.v1.IListActionsResponse ] >; - listLakeActions( - request: protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + listZoneActions( + request: protos.google.cloud.dataplex.v1.IListZoneActionsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + protos.google.cloud.dataplex.v1.IListZoneActionsRequest, protos.google.cloud.dataplex.v1.IListActionsResponse | null | undefined, protos.google.cloud.dataplex.v1.IAction > ): void; - listLakeActions( - request: protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + listZoneActions( + request: protos.google.cloud.dataplex.v1.IListZoneActionsRequest, callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + protos.google.cloud.dataplex.v1.IListZoneActionsRequest, protos.google.cloud.dataplex.v1.IListActionsResponse | null | undefined, protos.google.cloud.dataplex.v1.IAction > ): void; - listLakeActions( - request?: protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + listZoneActions( + request?: protos.google.cloud.dataplex.v1.IListZoneActionsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + protos.google.cloud.dataplex.v1.IListZoneActionsRequest, | protos.google.cloud.dataplex.v1.IListActionsResponse | null | undefined, protos.google.cloud.dataplex.v1.IAction >, callback?: PaginationCallback< - protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + protos.google.cloud.dataplex.v1.IListZoneActionsRequest, protos.google.cloud.dataplex.v1.IListActionsResponse | null | undefined, protos.google.cloud.dataplex.v1.IAction > ): Promise< [ protos.google.cloud.dataplex.v1.IAction[], - protos.google.cloud.dataplex.v1.IListLakeActionsRequest | null, + protos.google.cloud.dataplex.v1.IListZoneActionsRequest | null, protos.google.cloud.dataplex.v1.IListActionsResponse ] > | void { @@ -3104,7 +4089,7 @@ export class DataplexServiceClient { parent: request.parent || '', }); this.initialize(); - return this.innerApiCalls.listLakeActions(request, options, callback); + return this.innerApiCalls.listZoneActions(request, options, callback); } /** @@ -3112,16 +4097,16 @@ export class DataplexServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}` + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. * @param {number} [request.pageSize] * Optional. Maximum number of actions to return. The service may return fewer than this * value. If unspecified, at most 10 actions will be returned. The maximum * value is 1000; values above 1000 will be coerced to 1000. * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListLakeActions` call. Provide this to + * Optional. Page token received from a previous `ListZoneActions` call. Provide this to * retrieve the subsequent page. When paginating, all other parameters - * provided to `ListLakeActions` must match the call that provided the page + * provided to `ListZoneActions` must match the call that provided the page * token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -3129,14 +4114,14 @@ export class DataplexServiceClient { * An object stream which emits an object representing [Action]{@link google.cloud.dataplex.v1.Action} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. - * We recommend using `listLakeActionsAsync()` + * We recommend using `listZoneActionsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listLakeActionsStream( - request?: protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + listZoneActionsStream( + request?: protos.google.cloud.dataplex.v1.IListZoneActionsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -3147,33 +4132,33 @@ export class DataplexServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const defaultCallSettings = this._defaults['listLakeActions']; + const defaultCallSettings = this._defaults['listZoneActions']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listLakeActions.createStream( - this.innerApiCalls.listLakeActions as gax.GaxCall, + return this.descriptors.page.listZoneActions.createStream( + this.innerApiCalls.listZoneActions as gax.GaxCall, request, callSettings ); } /** - * Equivalent to `listLakeActions`, but returns an iterable object. + * Equivalent to `listZoneActions`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}` + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. * @param {number} [request.pageSize] * Optional. Maximum number of actions to return. The service may return fewer than this * value. If unspecified, at most 10 actions will be returned. The maximum * value is 1000; values above 1000 will be coerced to 1000. * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListLakeActions` call. Provide this to + * Optional. Page token received from a previous `ListZoneActions` call. Provide this to * retrieve the subsequent page. When paginating, all other parameters - * provided to `ListLakeActions` must match the call that provided the page + * provided to `ListZoneActions` must match the call that provided the page * token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -3185,11 +4170,11 @@ export class DataplexServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1/dataplex_service.list_lake_actions.js - * region_tag:dataplex_v1_generated_DataplexService_ListLakeActions_async + * @example include:samples/generated/v1/dataplex_service.list_zone_actions.js + * region_tag:dataplex_v1_generated_DataplexService_ListZoneActions_async */ - listLakeActionsAsync( - request?: protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + listZoneActionsAsync( + request?: protos.google.cloud.dataplex.v1.IListZoneActionsRequest, options?: CallOptions ): AsyncIterable { request = request || {}; @@ -3200,31 +4185,32 @@ export class DataplexServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const defaultCallSettings = this._defaults['listLakeActions']; + const defaultCallSettings = this._defaults['listZoneActions']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listLakeActions.asyncIterate( - this.innerApiCalls['listLakeActions'] as GaxCall, + return this.descriptors.page.listZoneActions.asyncIterate( + this.innerApiCalls['listZoneActions'] as GaxCall, request as unknown as RequestType, callSettings ) as AsyncIterable; } /** - * Lists zone resources in a lake. + * Lists asset resources in a zone. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. * @param {number} [request.pageSize] - * Optional. Maximum number of zones to return. The service may return fewer than this - * value. If unspecified, at most 10 zones will be returned. The maximum - * value is 1000; values above 1000 will be coerced to 1000. + * Optional. Maximum number of asset to return. The service may return fewer than + * this value. If unspecified, at most 10 assets will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListZones` call. Provide this to + * Optional. Page token received from a previous `ListAssets` call. Provide this to * retrieve the subsequent page. When paginating, all other parameters - * provided to `ListZones` must match the call that provided the page token. + * provided to `ListAssets` must match the call that provided the page + * token. * @param {string} [request.filter] * Optional. Filter request. * @param {string} [request.orderBy] @@ -3232,62 +4218,64 @@ export class DataplexServiceClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [Zone]{@link google.cloud.dataplex.v1.Zone}. + * The first element of the array is Array of [Asset]{@link google.cloud.dataplex.v1.Asset}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. - * We recommend using `listZonesAsync()` + * We recommend using `listAssetsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listZones( - request?: protos.google.cloud.dataplex.v1.IListZonesRequest, + listAssets( + request?: protos.google.cloud.dataplex.v1.IListAssetsRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.dataplex.v1.IZone[], - protos.google.cloud.dataplex.v1.IListZonesRequest | null, - protos.google.cloud.dataplex.v1.IListZonesResponse + protos.google.cloud.dataplex.v1.IAsset[], + protos.google.cloud.dataplex.v1.IListAssetsRequest | null, + protos.google.cloud.dataplex.v1.IListAssetsResponse ] - >; - listZones( - request: protos.google.cloud.dataplex.v1.IListZonesRequest, + >; + listAssets( + request: protos.google.cloud.dataplex.v1.IListAssetsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListZonesRequest, - protos.google.cloud.dataplex.v1.IListZonesResponse | null | undefined, - protos.google.cloud.dataplex.v1.IZone + protos.google.cloud.dataplex.v1.IListAssetsRequest, + protos.google.cloud.dataplex.v1.IListAssetsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IAsset > ): void; - listZones( - request: protos.google.cloud.dataplex.v1.IListZonesRequest, + listAssets( + request: protos.google.cloud.dataplex.v1.IListAssetsRequest, callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListZonesRequest, - protos.google.cloud.dataplex.v1.IListZonesResponse | null | undefined, - protos.google.cloud.dataplex.v1.IZone + protos.google.cloud.dataplex.v1.IListAssetsRequest, + protos.google.cloud.dataplex.v1.IListAssetsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IAsset > ): void; - listZones( - request?: protos.google.cloud.dataplex.v1.IListZonesRequest, + listAssets( + request?: protos.google.cloud.dataplex.v1.IListAssetsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.cloud.dataplex.v1.IListZonesRequest, - protos.google.cloud.dataplex.v1.IListZonesResponse | null | undefined, - protos.google.cloud.dataplex.v1.IZone + protos.google.cloud.dataplex.v1.IListAssetsRequest, + | protos.google.cloud.dataplex.v1.IListAssetsResponse + | null + | undefined, + protos.google.cloud.dataplex.v1.IAsset >, callback?: PaginationCallback< - protos.google.cloud.dataplex.v1.IListZonesRequest, - protos.google.cloud.dataplex.v1.IListZonesResponse | null | undefined, - protos.google.cloud.dataplex.v1.IZone + protos.google.cloud.dataplex.v1.IListAssetsRequest, + protos.google.cloud.dataplex.v1.IListAssetsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IAsset > ): Promise< [ - protos.google.cloud.dataplex.v1.IZone[], - protos.google.cloud.dataplex.v1.IListZonesRequest | null, - protos.google.cloud.dataplex.v1.IListZonesResponse + protos.google.cloud.dataplex.v1.IAsset[], + protos.google.cloud.dataplex.v1.IListAssetsRequest | null, + protos.google.cloud.dataplex.v1.IListAssetsResponse ] > | void { request = request || {}; @@ -3306,7 +4294,7 @@ export class DataplexServiceClient { parent: request.parent || '', }); this.initialize(); - return this.innerApiCalls.listZones(request, options, callback); + return this.innerApiCalls.listAssets(request, options, callback); } /** @@ -3314,16 +4302,17 @@ export class DataplexServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. * @param {number} [request.pageSize] - * Optional. Maximum number of zones to return. The service may return fewer than this - * value. If unspecified, at most 10 zones will be returned. The maximum - * value is 1000; values above 1000 will be coerced to 1000. + * Optional. Maximum number of asset to return. The service may return fewer than + * this value. If unspecified, at most 10 assets will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListZones` call. Provide this to + * Optional. Page token received from a previous `ListAssets` call. Provide this to * retrieve the subsequent page. When paginating, all other parameters - * provided to `ListZones` must match the call that provided the page token. + * provided to `ListAssets` must match the call that provided the page + * token. * @param {string} [request.filter] * Optional. Filter request. * @param {string} [request.orderBy] @@ -3331,17 +4320,17 @@ export class DataplexServiceClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing [Zone]{@link google.cloud.dataplex.v1.Zone} on 'data' event. + * An object stream which emits an object representing [Asset]{@link google.cloud.dataplex.v1.Asset} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. - * We recommend using `listZonesAsync()` + * We recommend using `listAssetsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listZonesStream( - request?: protos.google.cloud.dataplex.v1.IListZonesRequest, + listAssetsStream( + request?: protos.google.cloud.dataplex.v1.IListAssetsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -3352,33 +4341,34 @@ export class DataplexServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const defaultCallSettings = this._defaults['listZones']; + const defaultCallSettings = this._defaults['listAssets']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listZones.createStream( - this.innerApiCalls.listZones as gax.GaxCall, + return this.descriptors.page.listAssets.createStream( + this.innerApiCalls.listAssets as gax.GaxCall, request, callSettings ); } /** - * Equivalent to `listZones`, but returns an iterable object. + * Equivalent to `listAssets`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. * @param {number} [request.pageSize] - * Optional. Maximum number of zones to return. The service may return fewer than this - * value. If unspecified, at most 10 zones will be returned. The maximum - * value is 1000; values above 1000 will be coerced to 1000. + * Optional. Maximum number of asset to return. The service may return fewer than + * this value. If unspecified, at most 10 assets will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListZones` call. Provide this to + * Optional. Page token received from a previous `ListAssets` call. Provide this to * retrieve the subsequent page. When paginating, all other parameters - * provided to `ListZones` must match the call that provided the page token. + * provided to `ListAssets` must match the call that provided the page + * token. * @param {string} [request.filter] * Optional. Filter request. * @param {string} [request.orderBy] @@ -3388,18 +4378,18 @@ export class DataplexServiceClient { * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * [Zone]{@link google.cloud.dataplex.v1.Zone}. The API will be called under the hood as needed, once per the page, + * [Asset]{@link google.cloud.dataplex.v1.Asset}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1/dataplex_service.list_zones.js - * region_tag:dataplex_v1_generated_DataplexService_ListZones_async + * @example include:samples/generated/v1/dataplex_service.list_assets.js + * region_tag:dataplex_v1_generated_DataplexService_ListAssets_async */ - listZonesAsync( - request?: protos.google.cloud.dataplex.v1.IListZonesRequest, + listAssetsAsync( + request?: protos.google.cloud.dataplex.v1.IListAssetsRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -3408,31 +4398,31 @@ export class DataplexServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const defaultCallSettings = this._defaults['listZones']; + const defaultCallSettings = this._defaults['listAssets']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listZones.asyncIterate( - this.innerApiCalls['listZones'] as GaxCall, + return this.descriptors.page.listAssets.asyncIterate( + this.innerApiCalls['listAssets'] as GaxCall, request as unknown as RequestType, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists action resources in a zone. + * Lists action resources in an asset. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * Required. The resource name of the parent asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. * @param {number} [request.pageSize] * Optional. Maximum number of actions to return. The service may return fewer than this * value. If unspecified, at most 10 actions will be returned. The maximum * value is 1000; values above 1000 will be coerced to 1000. * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListZoneActions` call. Provide this to - * retrieve the subsequent page. When paginating, all other parameters - * provided to `ListZoneActions` must match the call that provided the page + * Optional. Page token received from a previous `ListAssetActions` call. Provide this + * to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListAssetActions` must match the call that provided the page * token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -3441,59 +4431,59 @@ export class DataplexServiceClient { * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. - * We recommend using `listZoneActionsAsync()` + * We recommend using `listAssetActionsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listZoneActions( - request?: protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + listAssetActions( + request?: protos.google.cloud.dataplex.v1.IListAssetActionsRequest, options?: CallOptions ): Promise< [ protos.google.cloud.dataplex.v1.IAction[], - protos.google.cloud.dataplex.v1.IListZoneActionsRequest | null, + protos.google.cloud.dataplex.v1.IListAssetActionsRequest | null, protos.google.cloud.dataplex.v1.IListActionsResponse ] >; - listZoneActions( - request: protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + listAssetActions( + request: protos.google.cloud.dataplex.v1.IListAssetActionsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + protos.google.cloud.dataplex.v1.IListAssetActionsRequest, protos.google.cloud.dataplex.v1.IListActionsResponse | null | undefined, protos.google.cloud.dataplex.v1.IAction > ): void; - listZoneActions( - request: protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + listAssetActions( + request: protos.google.cloud.dataplex.v1.IListAssetActionsRequest, callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + protos.google.cloud.dataplex.v1.IListAssetActionsRequest, protos.google.cloud.dataplex.v1.IListActionsResponse | null | undefined, protos.google.cloud.dataplex.v1.IAction > ): void; - listZoneActions( - request?: protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + listAssetActions( + request?: protos.google.cloud.dataplex.v1.IListAssetActionsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + protos.google.cloud.dataplex.v1.IListAssetActionsRequest, | protos.google.cloud.dataplex.v1.IListActionsResponse | null | undefined, protos.google.cloud.dataplex.v1.IAction >, callback?: PaginationCallback< - protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + protos.google.cloud.dataplex.v1.IListAssetActionsRequest, protos.google.cloud.dataplex.v1.IListActionsResponse | null | undefined, protos.google.cloud.dataplex.v1.IAction > ): Promise< [ protos.google.cloud.dataplex.v1.IAction[], - protos.google.cloud.dataplex.v1.IListZoneActionsRequest | null, + protos.google.cloud.dataplex.v1.IListAssetActionsRequest | null, protos.google.cloud.dataplex.v1.IListActionsResponse ] > | void { @@ -3513,7 +4503,7 @@ export class DataplexServiceClient { parent: request.parent || '', }); this.initialize(); - return this.innerApiCalls.listZoneActions(request, options, callback); + return this.innerApiCalls.listAssetActions(request, options, callback); } /** @@ -3521,16 +4511,16 @@ export class DataplexServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * Required. The resource name of the parent asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. * @param {number} [request.pageSize] * Optional. Maximum number of actions to return. The service may return fewer than this * value. If unspecified, at most 10 actions will be returned. The maximum * value is 1000; values above 1000 will be coerced to 1000. * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListZoneActions` call. Provide this to - * retrieve the subsequent page. When paginating, all other parameters - * provided to `ListZoneActions` must match the call that provided the page + * Optional. Page token received from a previous `ListAssetActions` call. Provide this + * to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListAssetActions` must match the call that provided the page * token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -3538,14 +4528,14 @@ export class DataplexServiceClient { * An object stream which emits an object representing [Action]{@link google.cloud.dataplex.v1.Action} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. - * We recommend using `listZoneActionsAsync()` + * We recommend using `listAssetActionsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listZoneActionsStream( - request?: protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + listAssetActionsStream( + request?: protos.google.cloud.dataplex.v1.IListAssetActionsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -3556,33 +4546,33 @@ export class DataplexServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const defaultCallSettings = this._defaults['listZoneActions']; + const defaultCallSettings = this._defaults['listAssetActions']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listZoneActions.createStream( - this.innerApiCalls.listZoneActions as gax.GaxCall, + return this.descriptors.page.listAssetActions.createStream( + this.innerApiCalls.listAssetActions as gax.GaxCall, request, callSettings ); } /** - * Equivalent to `listZoneActions`, but returns an iterable object. + * Equivalent to `listAssetActions`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * Required. The resource name of the parent asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. * @param {number} [request.pageSize] * Optional. Maximum number of actions to return. The service may return fewer than this * value. If unspecified, at most 10 actions will be returned. The maximum * value is 1000; values above 1000 will be coerced to 1000. * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListZoneActions` call. Provide this to - * retrieve the subsequent page. When paginating, all other parameters - * provided to `ListZoneActions` must match the call that provided the page + * Optional. Page token received from a previous `ListAssetActions` call. Provide this + * to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListAssetActions` must match the call that provided the page * token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -3594,11 +4584,11 @@ export class DataplexServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1/dataplex_service.list_zone_actions.js - * region_tag:dataplex_v1_generated_DataplexService_ListZoneActions_async + * @example include:samples/generated/v1/dataplex_service.list_asset_actions.js + * region_tag:dataplex_v1_generated_DataplexService_ListAssetActions_async */ - listZoneActionsAsync( - request?: protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + listAssetActionsAsync( + request?: protos.google.cloud.dataplex.v1.IListAssetActionsRequest, options?: CallOptions ): AsyncIterable { request = request || {}; @@ -3609,32 +4599,31 @@ export class DataplexServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const defaultCallSettings = this._defaults['listZoneActions']; + const defaultCallSettings = this._defaults['listAssetActions']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listZoneActions.asyncIterate( - this.innerApiCalls['listZoneActions'] as GaxCall, + return this.descriptors.page.listAssetActions.asyncIterate( + this.innerApiCalls['listAssetActions'] as GaxCall, request as unknown as RequestType, callSettings ) as AsyncIterable; } /** - * Lists asset resources in a zone. + * Lists tasks under the given lake. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. * @param {number} [request.pageSize] - * Optional. Maximum number of asset to return. The service may return fewer than - * this value. If unspecified, at most 10 assets will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. + * Optional. Maximum number of tasks to return. The service may return fewer than this + * value. If unspecified, at most 10 tasks will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListAssets` call. Provide this to + * Optional. Page token received from a previous `ListZones` call. Provide this to * retrieve the subsequent page. When paginating, all other parameters - * provided to `ListAssets` must match the call that provided the page - * token. + * provided to `ListZones` must match the call that provided the page token. * @param {string} [request.filter] * Optional. Filter request. * @param {string} [request.orderBy] @@ -3642,64 +4631,62 @@ export class DataplexServiceClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [Asset]{@link google.cloud.dataplex.v1.Asset}. + * The first element of the array is Array of [Task]{@link google.cloud.dataplex.v1.Task}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. - * We recommend using `listAssetsAsync()` + * We recommend using `listTasksAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listAssets( - request?: protos.google.cloud.dataplex.v1.IListAssetsRequest, + listTasks( + request?: protos.google.cloud.dataplex.v1.IListTasksRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.dataplex.v1.IAsset[], - protos.google.cloud.dataplex.v1.IListAssetsRequest | null, - protos.google.cloud.dataplex.v1.IListAssetsResponse + protos.google.cloud.dataplex.v1.ITask[], + protos.google.cloud.dataplex.v1.IListTasksRequest | null, + protos.google.cloud.dataplex.v1.IListTasksResponse ] >; - listAssets( - request: protos.google.cloud.dataplex.v1.IListAssetsRequest, + listTasks( + request: protos.google.cloud.dataplex.v1.IListTasksRequest, options: CallOptions, callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListAssetsRequest, - protos.google.cloud.dataplex.v1.IListAssetsResponse | null | undefined, - protos.google.cloud.dataplex.v1.IAsset + protos.google.cloud.dataplex.v1.IListTasksRequest, + protos.google.cloud.dataplex.v1.IListTasksResponse | null | undefined, + protos.google.cloud.dataplex.v1.ITask > ): void; - listAssets( - request: protos.google.cloud.dataplex.v1.IListAssetsRequest, + listTasks( + request: protos.google.cloud.dataplex.v1.IListTasksRequest, callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListAssetsRequest, - protos.google.cloud.dataplex.v1.IListAssetsResponse | null | undefined, - protos.google.cloud.dataplex.v1.IAsset + protos.google.cloud.dataplex.v1.IListTasksRequest, + protos.google.cloud.dataplex.v1.IListTasksResponse | null | undefined, + protos.google.cloud.dataplex.v1.ITask > ): void; - listAssets( - request?: protos.google.cloud.dataplex.v1.IListAssetsRequest, + listTasks( + request?: protos.google.cloud.dataplex.v1.IListTasksRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.cloud.dataplex.v1.IListAssetsRequest, - | protos.google.cloud.dataplex.v1.IListAssetsResponse - | null - | undefined, - protos.google.cloud.dataplex.v1.IAsset + protos.google.cloud.dataplex.v1.IListTasksRequest, + protos.google.cloud.dataplex.v1.IListTasksResponse | null | undefined, + protos.google.cloud.dataplex.v1.ITask >, callback?: PaginationCallback< - protos.google.cloud.dataplex.v1.IListAssetsRequest, - protos.google.cloud.dataplex.v1.IListAssetsResponse | null | undefined, - protos.google.cloud.dataplex.v1.IAsset + protos.google.cloud.dataplex.v1.IListTasksRequest, + protos.google.cloud.dataplex.v1.IListTasksResponse | null | undefined, + protos.google.cloud.dataplex.v1.ITask > ): Promise< [ - protos.google.cloud.dataplex.v1.IAsset[], - protos.google.cloud.dataplex.v1.IListAssetsRequest | null, - protos.google.cloud.dataplex.v1.IListAssetsResponse + protos.google.cloud.dataplex.v1.ITask[], + protos.google.cloud.dataplex.v1.IListTasksRequest | null, + protos.google.cloud.dataplex.v1.IListTasksResponse ] > | void { request = request || {}; @@ -3718,7 +4705,7 @@ export class DataplexServiceClient { parent: request.parent || '', }); this.initialize(); - return this.innerApiCalls.listAssets(request, options, callback); + return this.innerApiCalls.listTasks(request, options, callback); } /** @@ -3726,17 +4713,16 @@ export class DataplexServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. * @param {number} [request.pageSize] - * Optional. Maximum number of asset to return. The service may return fewer than - * this value. If unspecified, at most 10 assets will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. + * Optional. Maximum number of tasks to return. The service may return fewer than this + * value. If unspecified, at most 10 tasks will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListAssets` call. Provide this to + * Optional. Page token received from a previous `ListZones` call. Provide this to * retrieve the subsequent page. When paginating, all other parameters - * provided to `ListAssets` must match the call that provided the page - * token. + * provided to `ListZones` must match the call that provided the page token. * @param {string} [request.filter] * Optional. Filter request. * @param {string} [request.orderBy] @@ -3744,17 +4730,17 @@ export class DataplexServiceClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing [Asset]{@link google.cloud.dataplex.v1.Asset} on 'data' event. + * An object stream which emits an object representing [Task]{@link google.cloud.dataplex.v1.Task} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. - * We recommend using `listAssetsAsync()` + * We recommend using `listTasksAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listAssetsStream( - request?: protos.google.cloud.dataplex.v1.IListAssetsRequest, + listTasksStream( + request?: protos.google.cloud.dataplex.v1.IListTasksRequest, options?: CallOptions ): Transform { request = request || {}; @@ -3765,34 +4751,33 @@ export class DataplexServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const defaultCallSettings = this._defaults['listAssets']; + const defaultCallSettings = this._defaults['listTasks']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listAssets.createStream( - this.innerApiCalls.listAssets as gax.GaxCall, + return this.descriptors.page.listTasks.createStream( + this.innerApiCalls.listTasks as gax.GaxCall, request, callSettings ); } /** - * Equivalent to `listAssets`, but returns an iterable object. + * Equivalent to `listTasks`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. * @param {number} [request.pageSize] - * Optional. Maximum number of asset to return. The service may return fewer than - * this value. If unspecified, at most 10 assets will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. + * Optional. Maximum number of tasks to return. The service may return fewer than this + * value. If unspecified, at most 10 tasks will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListAssets` call. Provide this to + * Optional. Page token received from a previous `ListZones` call. Provide this to * retrieve the subsequent page. When paginating, all other parameters - * provided to `ListAssets` must match the call that provided the page - * token. + * provided to `ListZones` must match the call that provided the page token. * @param {string} [request.filter] * Optional. Filter request. * @param {string} [request.orderBy] @@ -3802,18 +4787,18 @@ export class DataplexServiceClient { * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * [Asset]{@link google.cloud.dataplex.v1.Asset}. The API will be called under the hood as needed, once per the page, + * [Task]{@link google.cloud.dataplex.v1.Task}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1/dataplex_service.list_assets.js - * region_tag:dataplex_v1_generated_DataplexService_ListAssets_async + * @example include:samples/generated/v1/dataplex_service.list_tasks.js + * region_tag:dataplex_v1_generated_DataplexService_ListTasks_async */ - listAssetsAsync( - request?: protos.google.cloud.dataplex.v1.IListAssetsRequest, + listTasksAsync( + request?: protos.google.cloud.dataplex.v1.IListTasksRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -3822,93 +4807,91 @@ export class DataplexServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const defaultCallSettings = this._defaults['listAssets']; + const defaultCallSettings = this._defaults['listTasks']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listAssets.asyncIterate( - this.innerApiCalls['listAssets'] as GaxCall, + return this.descriptors.page.listTasks.asyncIterate( + this.innerApiCalls['listTasks'] as GaxCall, request as unknown as RequestType, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists action resources in an asset. + * Lists Jobs under the given task. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name of the parent asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + * Required. The resource name of the parent environment: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. * @param {number} [request.pageSize] - * Optional. Maximum number of actions to return. The service may return fewer than this - * value. If unspecified, at most 10 actions will be returned. The maximum - * value is 1000; values above 1000 will be coerced to 1000. + * Optional. Maximum number of jobs to return. The service may return fewer than + * this value. If unspecified, at most 10 jobs will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListAssetActions` call. Provide this - * to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListAssetActions` must match the call that provided the page + * Optional. Page token received from a previous `ListJobs` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListJobs` must match the call that provided the page * token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [Action]{@link google.cloud.dataplex.v1.Action}. + * The first element of the array is Array of [Job]{@link google.cloud.dataplex.v1.Job}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. - * We recommend using `listAssetActionsAsync()` + * We recommend using `listJobsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listAssetActions( - request?: protos.google.cloud.dataplex.v1.IListAssetActionsRequest, + listJobs( + request?: protos.google.cloud.dataplex.v1.IListJobsRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.dataplex.v1.IAction[], - protos.google.cloud.dataplex.v1.IListAssetActionsRequest | null, - protos.google.cloud.dataplex.v1.IListActionsResponse + protos.google.cloud.dataplex.v1.IJob[], + protos.google.cloud.dataplex.v1.IListJobsRequest | null, + protos.google.cloud.dataplex.v1.IListJobsResponse ] >; - listAssetActions( - request: protos.google.cloud.dataplex.v1.IListAssetActionsRequest, + listJobs( + request: protos.google.cloud.dataplex.v1.IListJobsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListAssetActionsRequest, - protos.google.cloud.dataplex.v1.IListActionsResponse | null | undefined, - protos.google.cloud.dataplex.v1.IAction + protos.google.cloud.dataplex.v1.IListJobsRequest, + protos.google.cloud.dataplex.v1.IListJobsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IJob > ): void; - listAssetActions( - request: protos.google.cloud.dataplex.v1.IListAssetActionsRequest, + listJobs( + request: protos.google.cloud.dataplex.v1.IListJobsRequest, callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListAssetActionsRequest, - protos.google.cloud.dataplex.v1.IListActionsResponse | null | undefined, - protos.google.cloud.dataplex.v1.IAction + protos.google.cloud.dataplex.v1.IListJobsRequest, + protos.google.cloud.dataplex.v1.IListJobsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IJob > ): void; - listAssetActions( - request?: protos.google.cloud.dataplex.v1.IListAssetActionsRequest, + listJobs( + request?: protos.google.cloud.dataplex.v1.IListJobsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.cloud.dataplex.v1.IListAssetActionsRequest, - | protos.google.cloud.dataplex.v1.IListActionsResponse - | null - | undefined, - protos.google.cloud.dataplex.v1.IAction + protos.google.cloud.dataplex.v1.IListJobsRequest, + protos.google.cloud.dataplex.v1.IListJobsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IJob >, callback?: PaginationCallback< - protos.google.cloud.dataplex.v1.IListAssetActionsRequest, - protos.google.cloud.dataplex.v1.IListActionsResponse | null | undefined, - protos.google.cloud.dataplex.v1.IAction + protos.google.cloud.dataplex.v1.IListJobsRequest, + protos.google.cloud.dataplex.v1.IListJobsResponse | null | undefined, + protos.google.cloud.dataplex.v1.IJob > ): Promise< [ - protos.google.cloud.dataplex.v1.IAction[], - protos.google.cloud.dataplex.v1.IListAssetActionsRequest | null, - protos.google.cloud.dataplex.v1.IListActionsResponse + protos.google.cloud.dataplex.v1.IJob[], + protos.google.cloud.dataplex.v1.IListJobsRequest | null, + protos.google.cloud.dataplex.v1.IListJobsResponse ] > | void { request = request || {}; @@ -3927,7 +4910,7 @@ export class DataplexServiceClient { parent: request.parent || '', }); this.initialize(); - return this.innerApiCalls.listAssetActions(request, options, callback); + return this.innerApiCalls.listJobs(request, options, callback); } /** @@ -3935,31 +4918,31 @@ export class DataplexServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name of the parent asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + * Required. The resource name of the parent environment: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. * @param {number} [request.pageSize] - * Optional. Maximum number of actions to return. The service may return fewer than this - * value. If unspecified, at most 10 actions will be returned. The maximum - * value is 1000; values above 1000 will be coerced to 1000. + * Optional. Maximum number of jobs to return. The service may return fewer than + * this value. If unspecified, at most 10 jobs will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListAssetActions` call. Provide this - * to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListAssetActions` must match the call that provided the page + * Optional. Page token received from a previous `ListJobs` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListJobs` must match the call that provided the page * token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing [Action]{@link google.cloud.dataplex.v1.Action} on 'data' event. + * An object stream which emits an object representing [Job]{@link google.cloud.dataplex.v1.Job} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. - * We recommend using `listAssetActionsAsync()` + * We recommend using `listJobsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listAssetActionsStream( - request?: protos.google.cloud.dataplex.v1.IListAssetActionsRequest, + listJobsStream( + request?: protos.google.cloud.dataplex.v1.IListJobsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -3970,51 +4953,51 @@ export class DataplexServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const defaultCallSettings = this._defaults['listAssetActions']; + const defaultCallSettings = this._defaults['listJobs']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listAssetActions.createStream( - this.innerApiCalls.listAssetActions as gax.GaxCall, + return this.descriptors.page.listJobs.createStream( + this.innerApiCalls.listJobs as gax.GaxCall, request, callSettings ); } /** - * Equivalent to `listAssetActions`, but returns an iterable object. + * Equivalent to `listJobs`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name of the parent asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + * Required. The resource name of the parent environment: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. * @param {number} [request.pageSize] - * Optional. Maximum number of actions to return. The service may return fewer than this - * value. If unspecified, at most 10 actions will be returned. The maximum - * value is 1000; values above 1000 will be coerced to 1000. + * Optional. Maximum number of jobs to return. The service may return fewer than + * this value. If unspecified, at most 10 jobs will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListAssetActions` call. Provide this - * to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListAssetActions` must match the call that provided the page + * Optional. Page token received from a previous `ListJobs` call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters + * provided to `ListJobs` must match the call that provided the page * token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * [Action]{@link google.cloud.dataplex.v1.Action}. The API will be called under the hood as needed, once per the page, + * [Job]{@link google.cloud.dataplex.v1.Job}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1/dataplex_service.list_asset_actions.js - * region_tag:dataplex_v1_generated_DataplexService_ListAssetActions_async + * @example include:samples/generated/v1/dataplex_service.list_jobs.js + * region_tag:dataplex_v1_generated_DataplexService_ListJobs_async */ - listAssetActionsAsync( - request?: protos.google.cloud.dataplex.v1.IListAssetActionsRequest, + listJobsAsync( + request?: protos.google.cloud.dataplex.v1.IListJobsRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -4023,31 +5006,32 @@ export class DataplexServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const defaultCallSettings = this._defaults['listAssetActions']; + const defaultCallSettings = this._defaults['listJobs']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listAssetActions.asyncIterate( - this.innerApiCalls['listAssetActions'] as GaxCall, + return this.descriptors.page.listJobs.asyncIterate( + this.innerApiCalls['listJobs'] as GaxCall, request as unknown as RequestType, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists tasks under the given lake. + * Lists environments under the given lake. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * projects/{project_id}/locations/{location_id}/lakes/{lake_id} * @param {number} [request.pageSize] - * Optional. Maximum number of tasks to return. The service may return fewer than this - * value. If unspecified, at most 10 tasks will be returned. The maximum - * value is 1000; values above 1000 will be coerced to 1000. + * Optional. Maximum number of environments to return. The service may return fewer than + * this value. If unspecified, at most 10 environments will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListZones` call. Provide this to - * retrieve the subsequent page. When paginating, all other parameters - * provided to `ListZones` must match the call that provided the page token. + * Optional. Page token received from a previous `ListEnvironments` call. Provide this + * to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListEnvironments` must match the call that provided the page + * token. * @param {string} [request.filter] * Optional. Filter request. * @param {string} [request.orderBy] @@ -4055,62 +5039,70 @@ export class DataplexServiceClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [Task]{@link google.cloud.dataplex.v1.Task}. + * The first element of the array is Array of [Environment]{@link google.cloud.dataplex.v1.Environment}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. - * We recommend using `listTasksAsync()` + * We recommend using `listEnvironmentsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listTasks( - request?: protos.google.cloud.dataplex.v1.IListTasksRequest, + listEnvironments( + request?: protos.google.cloud.dataplex.v1.IListEnvironmentsRequest, options?: CallOptions - ): Promise< - [ - protos.google.cloud.dataplex.v1.ITask[], - protos.google.cloud.dataplex.v1.IListTasksRequest | null, - protos.google.cloud.dataplex.v1.IListTasksResponse + ): Promise< + [ + protos.google.cloud.dataplex.v1.IEnvironment[], + protos.google.cloud.dataplex.v1.IListEnvironmentsRequest | null, + protos.google.cloud.dataplex.v1.IListEnvironmentsResponse ] >; - listTasks( - request: protos.google.cloud.dataplex.v1.IListTasksRequest, + listEnvironments( + request: protos.google.cloud.dataplex.v1.IListEnvironmentsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListTasksRequest, - protos.google.cloud.dataplex.v1.IListTasksResponse | null | undefined, - protos.google.cloud.dataplex.v1.ITask + protos.google.cloud.dataplex.v1.IListEnvironmentsRequest, + | protos.google.cloud.dataplex.v1.IListEnvironmentsResponse + | null + | undefined, + protos.google.cloud.dataplex.v1.IEnvironment > ): void; - listTasks( - request: protos.google.cloud.dataplex.v1.IListTasksRequest, + listEnvironments( + request: protos.google.cloud.dataplex.v1.IListEnvironmentsRequest, callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListTasksRequest, - protos.google.cloud.dataplex.v1.IListTasksResponse | null | undefined, - protos.google.cloud.dataplex.v1.ITask + protos.google.cloud.dataplex.v1.IListEnvironmentsRequest, + | protos.google.cloud.dataplex.v1.IListEnvironmentsResponse + | null + | undefined, + protos.google.cloud.dataplex.v1.IEnvironment > ): void; - listTasks( - request?: protos.google.cloud.dataplex.v1.IListTasksRequest, + listEnvironments( + request?: protos.google.cloud.dataplex.v1.IListEnvironmentsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.cloud.dataplex.v1.IListTasksRequest, - protos.google.cloud.dataplex.v1.IListTasksResponse | null | undefined, - protos.google.cloud.dataplex.v1.ITask + protos.google.cloud.dataplex.v1.IListEnvironmentsRequest, + | protos.google.cloud.dataplex.v1.IListEnvironmentsResponse + | null + | undefined, + protos.google.cloud.dataplex.v1.IEnvironment >, callback?: PaginationCallback< - protos.google.cloud.dataplex.v1.IListTasksRequest, - protos.google.cloud.dataplex.v1.IListTasksResponse | null | undefined, - protos.google.cloud.dataplex.v1.ITask + protos.google.cloud.dataplex.v1.IListEnvironmentsRequest, + | protos.google.cloud.dataplex.v1.IListEnvironmentsResponse + | null + | undefined, + protos.google.cloud.dataplex.v1.IEnvironment > ): Promise< [ - protos.google.cloud.dataplex.v1.ITask[], - protos.google.cloud.dataplex.v1.IListTasksRequest | null, - protos.google.cloud.dataplex.v1.IListTasksResponse + protos.google.cloud.dataplex.v1.IEnvironment[], + protos.google.cloud.dataplex.v1.IListEnvironmentsRequest | null, + protos.google.cloud.dataplex.v1.IListEnvironmentsResponse ] > | void { request = request || {}; @@ -4129,7 +5121,7 @@ export class DataplexServiceClient { parent: request.parent || '', }); this.initialize(); - return this.innerApiCalls.listTasks(request, options, callback); + return this.innerApiCalls.listEnvironments(request, options, callback); } /** @@ -4138,15 +5130,16 @@ export class DataplexServiceClient { * The request object that will be sent. * @param {string} request.parent * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * projects/{project_id}/locations/{location_id}/lakes/{lake_id} * @param {number} [request.pageSize] - * Optional. Maximum number of tasks to return. The service may return fewer than this - * value. If unspecified, at most 10 tasks will be returned. The maximum - * value is 1000; values above 1000 will be coerced to 1000. + * Optional. Maximum number of environments to return. The service may return fewer than + * this value. If unspecified, at most 10 environments will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListZones` call. Provide this to - * retrieve the subsequent page. When paginating, all other parameters - * provided to `ListZones` must match the call that provided the page token. + * Optional. Page token received from a previous `ListEnvironments` call. Provide this + * to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListEnvironments` must match the call that provided the page + * token. * @param {string} [request.filter] * Optional. Filter request. * @param {string} [request.orderBy] @@ -4154,17 +5147,17 @@ export class DataplexServiceClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing [Task]{@link google.cloud.dataplex.v1.Task} on 'data' event. + * An object stream which emits an object representing [Environment]{@link google.cloud.dataplex.v1.Environment} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. - * We recommend using `listTasksAsync()` + * We recommend using `listEnvironmentsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listTasksStream( - request?: protos.google.cloud.dataplex.v1.IListTasksRequest, + listEnvironmentsStream( + request?: protos.google.cloud.dataplex.v1.IListEnvironmentsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -4175,33 +5168,34 @@ export class DataplexServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const defaultCallSettings = this._defaults['listTasks']; + const defaultCallSettings = this._defaults['listEnvironments']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listTasks.createStream( - this.innerApiCalls.listTasks as gax.GaxCall, + return this.descriptors.page.listEnvironments.createStream( + this.innerApiCalls.listEnvironments as gax.GaxCall, request, callSettings ); } /** - * Equivalent to `listTasks`, but returns an iterable object. + * Equivalent to `listEnvironments`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * projects/{project_id}/locations/{location_id}/lakes/{lake_id} * @param {number} [request.pageSize] - * Optional. Maximum number of tasks to return. The service may return fewer than this - * value. If unspecified, at most 10 tasks will be returned. The maximum - * value is 1000; values above 1000 will be coerced to 1000. + * Optional. Maximum number of environments to return. The service may return fewer than + * this value. If unspecified, at most 10 environments will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListZones` call. Provide this to - * retrieve the subsequent page. When paginating, all other parameters - * provided to `ListZones` must match the call that provided the page token. + * Optional. Page token received from a previous `ListEnvironments` call. Provide this + * to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListEnvironments` must match the call that provided the page + * token. * @param {string} [request.filter] * Optional. Filter request. * @param {string} [request.orderBy] @@ -4211,18 +5205,18 @@ export class DataplexServiceClient { * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * [Task]{@link google.cloud.dataplex.v1.Task}. The API will be called under the hood as needed, once per the page, + * [Environment]{@link google.cloud.dataplex.v1.Environment}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1/dataplex_service.list_tasks.js - * region_tag:dataplex_v1_generated_DataplexService_ListTasks_async + * @example include:samples/generated/v1/dataplex_service.list_environments.js + * region_tag:dataplex_v1_generated_DataplexService_ListEnvironments_async */ - listTasksAsync( - request?: protos.google.cloud.dataplex.v1.IListTasksRequest, + listEnvironmentsAsync( + request?: protos.google.cloud.dataplex.v1.IListEnvironmentsRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -4231,91 +5225,93 @@ export class DataplexServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const defaultCallSettings = this._defaults['listTasks']; + const defaultCallSettings = this._defaults['listEnvironments']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listTasks.asyncIterate( - this.innerApiCalls['listTasks'] as GaxCall, + return this.descriptors.page.listEnvironments.asyncIterate( + this.innerApiCalls['listEnvironments'] as GaxCall, request as unknown as RequestType, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists Jobs under the given task. + * Lists session resources in an environment. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The resource name of the parent environment: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + * projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id} * @param {number} [request.pageSize] - * Optional. Maximum number of jobs to return. The service may return fewer than - * this value. If unspecified, at most 10 jobs will be returned. The + * Optional. Maximum number of sessions to return. The service may return fewer than + * this value. If unspecified, at most 10 sessions will be returned. The * maximum value is 1000; values above 1000 will be coerced to 1000. * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListJobs` call. Provide this to + * Optional. Page token received from a previous `ListSessions` call. Provide this to * retrieve the subsequent page. When paginating, all other parameters - * provided to `ListJobs` must match the call that provided the page + * provided to `ListSessions` must match the call that provided the page * token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [Job]{@link google.cloud.dataplex.v1.Job}. + * The first element of the array is Array of [Session]{@link google.cloud.dataplex.v1.Session}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. - * We recommend using `listJobsAsync()` + * We recommend using `listSessionsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listJobs( - request?: protos.google.cloud.dataplex.v1.IListJobsRequest, + listSessions( + request?: protos.google.cloud.dataplex.v1.IListSessionsRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.dataplex.v1.IJob[], - protos.google.cloud.dataplex.v1.IListJobsRequest | null, - protos.google.cloud.dataplex.v1.IListJobsResponse + protos.google.cloud.dataplex.v1.ISession[], + protos.google.cloud.dataplex.v1.IListSessionsRequest | null, + protos.google.cloud.dataplex.v1.IListSessionsResponse ] >; - listJobs( - request: protos.google.cloud.dataplex.v1.IListJobsRequest, + listSessions( + request: protos.google.cloud.dataplex.v1.IListSessionsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListJobsRequest, - protos.google.cloud.dataplex.v1.IListJobsResponse | null | undefined, - protos.google.cloud.dataplex.v1.IJob + protos.google.cloud.dataplex.v1.IListSessionsRequest, + protos.google.cloud.dataplex.v1.IListSessionsResponse | null | undefined, + protos.google.cloud.dataplex.v1.ISession > ): void; - listJobs( - request: protos.google.cloud.dataplex.v1.IListJobsRequest, + listSessions( + request: protos.google.cloud.dataplex.v1.IListSessionsRequest, callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListJobsRequest, - protos.google.cloud.dataplex.v1.IListJobsResponse | null | undefined, - protos.google.cloud.dataplex.v1.IJob + protos.google.cloud.dataplex.v1.IListSessionsRequest, + protos.google.cloud.dataplex.v1.IListSessionsResponse | null | undefined, + protos.google.cloud.dataplex.v1.ISession > ): void; - listJobs( - request?: protos.google.cloud.dataplex.v1.IListJobsRequest, + listSessions( + request?: protos.google.cloud.dataplex.v1.IListSessionsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.cloud.dataplex.v1.IListJobsRequest, - protos.google.cloud.dataplex.v1.IListJobsResponse | null | undefined, - protos.google.cloud.dataplex.v1.IJob + protos.google.cloud.dataplex.v1.IListSessionsRequest, + | protos.google.cloud.dataplex.v1.IListSessionsResponse + | null + | undefined, + protos.google.cloud.dataplex.v1.ISession >, callback?: PaginationCallback< - protos.google.cloud.dataplex.v1.IListJobsRequest, - protos.google.cloud.dataplex.v1.IListJobsResponse | null | undefined, - protos.google.cloud.dataplex.v1.IJob + protos.google.cloud.dataplex.v1.IListSessionsRequest, + protos.google.cloud.dataplex.v1.IListSessionsResponse | null | undefined, + protos.google.cloud.dataplex.v1.ISession > ): Promise< [ - protos.google.cloud.dataplex.v1.IJob[], - protos.google.cloud.dataplex.v1.IListJobsRequest | null, - protos.google.cloud.dataplex.v1.IListJobsResponse + protos.google.cloud.dataplex.v1.ISession[], + protos.google.cloud.dataplex.v1.IListSessionsRequest | null, + protos.google.cloud.dataplex.v1.IListSessionsResponse ] > | void { request = request || {}; @@ -4334,7 +5330,7 @@ export class DataplexServiceClient { parent: request.parent || '', }); this.initialize(); - return this.innerApiCalls.listJobs(request, options, callback); + return this.innerApiCalls.listSessions(request, options, callback); } /** @@ -4343,30 +5339,30 @@ export class DataplexServiceClient { * The request object that will be sent. * @param {string} request.parent * Required. The resource name of the parent environment: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + * projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id} * @param {number} [request.pageSize] - * Optional. Maximum number of jobs to return. The service may return fewer than - * this value. If unspecified, at most 10 jobs will be returned. The + * Optional. Maximum number of sessions to return. The service may return fewer than + * this value. If unspecified, at most 10 sessions will be returned. The * maximum value is 1000; values above 1000 will be coerced to 1000. * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListJobs` call. Provide this to + * Optional. Page token received from a previous `ListSessions` call. Provide this to * retrieve the subsequent page. When paginating, all other parameters - * provided to `ListJobs` must match the call that provided the page + * provided to `ListSessions` must match the call that provided the page * token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing [Job]{@link google.cloud.dataplex.v1.Job} on 'data' event. + * An object stream which emits an object representing [Session]{@link google.cloud.dataplex.v1.Session} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. - * We recommend using `listJobsAsync()` + * We recommend using `listSessionsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listJobsStream( - request?: protos.google.cloud.dataplex.v1.IListJobsRequest, + listSessionsStream( + request?: protos.google.cloud.dataplex.v1.IListSessionsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -4377,51 +5373,51 @@ export class DataplexServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const defaultCallSettings = this._defaults['listJobs']; + const defaultCallSettings = this._defaults['listSessions']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listJobs.createStream( - this.innerApiCalls.listJobs as gax.GaxCall, + return this.descriptors.page.listSessions.createStream( + this.innerApiCalls.listSessions as gax.GaxCall, request, callSettings ); } /** - * Equivalent to `listJobs`, but returns an iterable object. + * Equivalent to `listSessions`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The resource name of the parent environment: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + * projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id} * @param {number} [request.pageSize] - * Optional. Maximum number of jobs to return. The service may return fewer than - * this value. If unspecified, at most 10 jobs will be returned. The + * Optional. Maximum number of sessions to return. The service may return fewer than + * this value. If unspecified, at most 10 sessions will be returned. The * maximum value is 1000; values above 1000 will be coerced to 1000. * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListJobs` call. Provide this to + * Optional. Page token received from a previous `ListSessions` call. Provide this to * retrieve the subsequent page. When paginating, all other parameters - * provided to `ListJobs` must match the call that provided the page + * provided to `ListSessions` must match the call that provided the page * token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * [Job]{@link google.cloud.dataplex.v1.Job}. The API will be called under the hood as needed, once per the page, + * [Session]{@link google.cloud.dataplex.v1.Session}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1/dataplex_service.list_jobs.js - * region_tag:dataplex_v1_generated_DataplexService_ListJobs_async + * @example include:samples/generated/v1/dataplex_service.list_sessions.js + * region_tag:dataplex_v1_generated_DataplexService_ListSessions_async */ - listJobsAsync( - request?: protos.google.cloud.dataplex.v1.IListJobsRequest, + listSessionsAsync( + request?: protos.google.cloud.dataplex.v1.IListSessionsRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -4430,14 +5426,14 @@ export class DataplexServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const defaultCallSettings = this._defaults['listJobs']; + const defaultCallSettings = this._defaults['listSessions']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listJobs.asyncIterate( - this.innerApiCalls['listJobs'] as GaxCall, + return this.descriptors.page.listSessions.asyncIterate( + this.innerApiCalls['listSessions'] as GaxCall, request as unknown as RequestType, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } // -------------------- // -- Path templates -- @@ -4524,6 +5520,73 @@ export class DataplexServiceClient { return this.pathTemplates.assetPathTemplate.match(assetName).asset; } + /** + * Return a fully-qualified content resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath( + project: string, + location: string, + lake: string, + content: string + ) { + return this.pathTemplates.contentPathTemplate.render({ + project: project, + location: location, + lake: lake, + content: content, + }); + } + + /** + * Parse the project from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the project. + */ + matchProjectFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).project; + } + + /** + * Parse the location from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the location. + */ + matchLocationFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).location; + } + + /** + * Parse the lake from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).lake; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + /** * Return a fully-qualified entity resource name string. * @@ -4605,6 +5668,77 @@ export class DataplexServiceClient { return this.pathTemplates.entityPathTemplate.match(entityName).entity; } + /** + * Return a fully-qualified environment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} environment + * @returns {string} Resource name string. + */ + environmentPath( + project: string, + location: string, + lake: string, + environment: string + ) { + return this.pathTemplates.environmentPathTemplate.render({ + project: project, + location: location, + lake: lake, + environment: environment, + }); + } + + /** + * Parse the project from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .project; + } + + /** + * Parse the location from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .location; + } + + /** + * Parse the lake from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .lake; + } + + /** + * Parse the environment from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .environment; + } + /** * Return a fully-qualified job resource name string. * @@ -5174,6 +6308,88 @@ export class DataplexServiceClient { ).action; } + /** + * Return a fully-qualified session resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} environment + * @param {string} session + * @returns {string} Resource name string. + */ + sessionPath( + project: string, + location: string, + lake: string, + environment: string, + session: string + ) { + return this.pathTemplates.sessionPathTemplate.render({ + project: project, + location: location, + lake: lake, + environment: environment, + session: session, + }); + } + + /** + * Parse the project from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).project; + } + + /** + * Parse the location from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the location. + */ + matchLocationFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).location; + } + + /** + * Parse the lake from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).lake; + } + + /** + * Parse the environment from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName) + .environment; + } + + /** + * Parse the session from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the session. + */ + matchSessionFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).session; + } + /** * Return a fully-qualified task resource name string. * diff --git a/packages/google-cloud-dataplex/src/v1/dataplex_service_client_config.json b/packages/google-cloud-dataplex/src/v1/dataplex_service_client_config.json index f28861f96c6..58a91c8cb74 100644 --- a/packages/google-cloud-dataplex/src/v1/dataplex_service_client_config.json +++ b/packages/google-cloud-dataplex/src/v1/dataplex_service_client_config.json @@ -161,6 +161,30 @@ "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" + }, + "CreateEnvironment": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateEnvironment": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteEnvironment": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListEnvironments": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetEnvironment": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListSessions": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" } } } diff --git a/packages/google-cloud-dataplex/src/v1/dataplex_service_proto_list.json b/packages/google-cloud-dataplex/src/v1/dataplex_service_proto_list.json index 2f2fea78052..37d1b351085 100644 --- a/packages/google-cloud-dataplex/src/v1/dataplex_service_proto_list.json +++ b/packages/google-cloud-dataplex/src/v1/dataplex_service_proto_list.json @@ -1,4 +1,6 @@ [ + "../../protos/google/cloud/dataplex/v1/analyze.proto", + "../../protos/google/cloud/dataplex/v1/content.proto", "../../protos/google/cloud/dataplex/v1/logs.proto", "../../protos/google/cloud/dataplex/v1/metadata.proto", "../../protos/google/cloud/dataplex/v1/resources.proto", diff --git a/packages/google-cloud-dataplex/src/v1/gapic_metadata.json b/packages/google-cloud-dataplex/src/v1/gapic_metadata.json index 2ae53e6b9be..20dbc501a8a 100644 --- a/packages/google-cloud-dataplex/src/v1/gapic_metadata.json +++ b/packages/google-cloud-dataplex/src/v1/gapic_metadata.json @@ -5,6 +5,74 @@ "protoPackage": "google.cloud.dataplex.v1", "libraryPackage": "@google-cloud/dataplex", "services": { + "ContentService": { + "clients": { + "grpc": { + "libraryClient": "ContentServiceClient", + "rpcs": { + "CreateContent": { + "methods": [ + "createContent" + ] + }, + "UpdateContent": { + "methods": [ + "updateContent" + ] + }, + "DeleteContent": { + "methods": [ + "deleteContent" + ] + }, + "GetContent": { + "methods": [ + "getContent" + ] + }, + "ListContent": { + "methods": [ + "listContent", + "listContentStream", + "listContentAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "ContentServiceClient", + "rpcs": { + "CreateContent": { + "methods": [ + "createContent" + ] + }, + "UpdateContent": { + "methods": [ + "updateContent" + ] + }, + "DeleteContent": { + "methods": [ + "deleteContent" + ] + }, + "GetContent": { + "methods": [ + "getContent" + ] + }, + "ListContent": { + "methods": [ + "listContent", + "listContentStream", + "listContentAsync" + ] + } + } + } + } + }, "DataplexService": { "clients": { "grpc": { @@ -40,6 +108,11 @@ "cancelJob" ] }, + "GetEnvironment": { + "methods": [ + "getEnvironment" + ] + }, "CreateLake": { "methods": [ "createLake" @@ -100,6 +173,21 @@ "deleteTask" ] }, + "CreateEnvironment": { + "methods": [ + "createEnvironment" + ] + }, + "UpdateEnvironment": { + "methods": [ + "updateEnvironment" + ] + }, + "DeleteEnvironment": { + "methods": [ + "deleteEnvironment" + ] + }, "ListLakes": { "methods": [ "listLakes", @@ -155,6 +243,20 @@ "listJobsStream", "listJobsAsync" ] + }, + "ListEnvironments": { + "methods": [ + "listEnvironments", + "listEnvironmentsStream", + "listEnvironmentsAsync" + ] + }, + "ListSessions": { + "methods": [ + "listSessions", + "listSessionsStream", + "listSessionsAsync" + ] } } }, @@ -191,6 +293,11 @@ "cancelJob" ] }, + "GetEnvironment": { + "methods": [ + "getEnvironment" + ] + }, "CreateLake": { "methods": [ "createLake" @@ -251,6 +358,21 @@ "deleteTask" ] }, + "CreateEnvironment": { + "methods": [ + "createEnvironment" + ] + }, + "UpdateEnvironment": { + "methods": [ + "updateEnvironment" + ] + }, + "DeleteEnvironment": { + "methods": [ + "deleteEnvironment" + ] + }, "ListLakes": { "methods": [ "listLakes", @@ -306,6 +428,20 @@ "listJobsStream", "listJobsAsync" ] + }, + "ListEnvironments": { + "methods": [ + "listEnvironments", + "listEnvironmentsStream", + "listEnvironmentsAsync" + ] + }, + "ListSessions": { + "methods": [ + "listSessions", + "listSessionsStream", + "listSessionsAsync" + ] } } } @@ -316,11 +452,36 @@ "grpc": { "libraryClient": "MetadataServiceClient", "rpcs": { + "CreateEntity": { + "methods": [ + "createEntity" + ] + }, + "UpdateEntity": { + "methods": [ + "updateEntity" + ] + }, + "DeleteEntity": { + "methods": [ + "deleteEntity" + ] + }, "GetEntity": { "methods": [ "getEntity" ] }, + "CreatePartition": { + "methods": [ + "createPartition" + ] + }, + "DeletePartition": { + "methods": [ + "deletePartition" + ] + }, "GetPartition": { "methods": [ "getPartition" @@ -345,11 +506,36 @@ "grpc-fallback": { "libraryClient": "MetadataServiceClient", "rpcs": { + "CreateEntity": { + "methods": [ + "createEntity" + ] + }, + "UpdateEntity": { + "methods": [ + "updateEntity" + ] + }, + "DeleteEntity": { + "methods": [ + "deleteEntity" + ] + }, "GetEntity": { "methods": [ "getEntity" ] }, + "CreatePartition": { + "methods": [ + "createPartition" + ] + }, + "DeletePartition": { + "methods": [ + "deletePartition" + ] + }, "GetPartition": { "methods": [ "getPartition" diff --git a/packages/google-cloud-dataplex/src/v1/index.ts b/packages/google-cloud-dataplex/src/v1/index.ts index 9312f69f1fc..3806c719115 100644 --- a/packages/google-cloud-dataplex/src/v1/index.ts +++ b/packages/google-cloud-dataplex/src/v1/index.ts @@ -16,5 +16,6 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** +export {ContentServiceClient} from './content_service_client'; export {DataplexServiceClient} from './dataplex_service_client'; export {MetadataServiceClient} from './metadata_service_client'; diff --git a/packages/google-cloud-dataplex/src/v1/metadata_service_client.ts b/packages/google-cloud-dataplex/src/v1/metadata_service_client.ts index 603a2fa5283..86cabc92d40 100644 --- a/packages/google-cloud-dataplex/src/v1/metadata_service_client.ts +++ b/packages/google-cloud-dataplex/src/v1/metadata_service_client.ts @@ -168,9 +168,15 @@ export class MetadataServiceClient { assetPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}' ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/content/{content}' + ), entityPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}' ), + environmentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}' + ), jobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}' ), @@ -191,6 +197,9 @@ export class MetadataServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}' ), + sessionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}/sessions/{session}' + ), taskPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}' ), @@ -265,8 +274,13 @@ export class MetadataServiceClient { // Iterate over each of the methods that the service provides // and create an API call method for each. const metadataServiceStubMethods = [ + 'createEntity', + 'updateEntity', + 'deleteEntity', 'getEntity', 'listEntities', + 'createPartition', + 'deletePartition', 'getPartition', 'listPartitions', ]; @@ -351,6 +365,273 @@ export class MetadataServiceClient { // ------------------- // -- Service calls -- // ------------------- + /** + * Create a metadata entity. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param {google.cloud.dataplex.v1.Entity} request.entity + * Required. Entity resource. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Entity]{@link google.cloud.dataplex.v1.Entity}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/metadata_service.create_entity.js + * region_tag:dataplex_v1_generated_MetadataService_CreateEntity_async + */ + createEntity( + request?: protos.google.cloud.dataplex.v1.ICreateEntityRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.ICreateEntityRequest | undefined, + {} | undefined + ] + >; + createEntity( + request: protos.google.cloud.dataplex.v1.ICreateEntityRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.ICreateEntityRequest | null | undefined, + {} | null | undefined + > + ): void; + createEntity( + request: protos.google.cloud.dataplex.v1.ICreateEntityRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.ICreateEntityRequest | null | undefined, + {} | null | undefined + > + ): void; + createEntity( + request?: protos.google.cloud.dataplex.v1.ICreateEntityRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataplex.v1.IEntity, + | protos.google.cloud.dataplex.v1.ICreateEntityRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.ICreateEntityRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.ICreateEntityRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createEntity(request, options, callback); + } + /** + * Update a metadata entity. Only supports full resource update. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.dataplex.v1.Entity} request.entity + * Required. Update description. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Entity]{@link google.cloud.dataplex.v1.Entity}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/metadata_service.update_entity.js + * region_tag:dataplex_v1_generated_MetadataService_UpdateEntity_async + */ + updateEntity( + request?: protos.google.cloud.dataplex.v1.IUpdateEntityRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.IUpdateEntityRequest | undefined, + {} | undefined + ] + >; + updateEntity( + request: protos.google.cloud.dataplex.v1.IUpdateEntityRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.IUpdateEntityRequest | null | undefined, + {} | null | undefined + > + ): void; + updateEntity( + request: protos.google.cloud.dataplex.v1.IUpdateEntityRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.IUpdateEntityRequest | null | undefined, + {} | null | undefined + > + ): void; + updateEntity( + request?: protos.google.cloud.dataplex.v1.IUpdateEntityRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataplex.v1.IEntity, + | protos.google.cloud.dataplex.v1.IUpdateEntityRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.IUpdateEntityRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.IUpdateEntityRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'entity.name': request.entity!.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateEntity(request, options, callback); + } + /** + * Delete a metadata entity. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + * @param {string} request.etag + * Required. The etag associated with the partition if it was previously retrieved. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/metadata_service.delete_entity.js + * region_tag:dataplex_v1_generated_MetadataService_DeleteEntity_async + */ + deleteEntity( + request?: protos.google.cloud.dataplex.v1.IDeleteEntityRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IDeleteEntityRequest | undefined, + {} | undefined + ] + >; + deleteEntity( + request: protos.google.cloud.dataplex.v1.IDeleteEntityRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IDeleteEntityRequest | null | undefined, + {} | null | undefined + > + ): void; + deleteEntity( + request: protos.google.cloud.dataplex.v1.IDeleteEntityRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IDeleteEntityRequest | null | undefined, + {} | null | undefined + > + ): void; + deleteEntity( + request?: protos.google.cloud.dataplex.v1.IDeleteEntityRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataplex.v1.IDeleteEntityRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IDeleteEntityRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IDeleteEntityRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deleteEntity(request, options, callback); + } /** * Get a metadata entity. * @@ -438,6 +719,200 @@ export class MetadataServiceClient { this.initialize(); return this.innerApiCalls.getEntity(request, options, callback); } + /** + * Create a metadata partition. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + * @param {google.cloud.dataplex.v1.Partition} request.partition + * Required. Partition resource. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Partition]{@link google.cloud.dataplex.v1.Partition}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/metadata_service.create_partition.js + * region_tag:dataplex_v1_generated_MetadataService_CreatePartition_async + */ + createPartition( + request?: protos.google.cloud.dataplex.v1.ICreatePartitionRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IPartition, + protos.google.cloud.dataplex.v1.ICreatePartitionRequest | undefined, + {} | undefined + ] + >; + createPartition( + request: protos.google.cloud.dataplex.v1.ICreatePartitionRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IPartition, + | protos.google.cloud.dataplex.v1.ICreatePartitionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createPartition( + request: protos.google.cloud.dataplex.v1.ICreatePartitionRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IPartition, + | protos.google.cloud.dataplex.v1.ICreatePartitionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createPartition( + request?: protos.google.cloud.dataplex.v1.ICreatePartitionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataplex.v1.IPartition, + | protos.google.cloud.dataplex.v1.ICreatePartitionRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataplex.v1.IPartition, + | protos.google.cloud.dataplex.v1.ICreatePartitionRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IPartition, + protos.google.cloud.dataplex.v1.ICreatePartitionRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createPartition(request, options, callback); + } + /** + * Delete a metadata partition. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the partition. + * format: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. + * The {partition_value_path} segment consists of an ordered sequence of + * partition values separated by "/". All values must be provided. + * @param {string} [request.etag] + * Optional. The etag associated with the partition if it was previously retrieved. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/metadata_service.delete_partition.js + * region_tag:dataplex_v1_generated_MetadataService_DeletePartition_async + */ + deletePartition( + request?: protos.google.cloud.dataplex.v1.IDeletePartitionRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IDeletePartitionRequest | undefined, + {} | undefined + ] + >; + deletePartition( + request: protos.google.cloud.dataplex.v1.IDeletePartitionRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataplex.v1.IDeletePartitionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deletePartition( + request: protos.google.cloud.dataplex.v1.IDeletePartitionRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataplex.v1.IDeletePartitionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deletePartition( + request?: protos.google.cloud.dataplex.v1.IDeletePartitionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataplex.v1.IDeletePartitionRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataplex.v1.IDeletePartitionRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IDeletePartitionRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deletePartition(request, options, callback); + } /** * Get a metadata partition of an entity. * @@ -445,7 +920,9 @@ export class MetadataServiceClient { * The request object that will be sent. * @param {string} request.name * Required. The resource name of the partition: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_id}`. + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. + * The {partition_value_path} segment consists of an ordered sequence of + * partition values separated by "/". All values must be provided. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -537,15 +1014,22 @@ export class MetadataServiceClient { * Required. Specify the entity view to make a partial list request. * @param {number} [request.pageSize] * Optional. Maximum number of entities to return. The service may return fewer than - * this value. If unspecified, at most 10 entities will be returned. The - * maximum value is 1000; values above 1000 are set to 1000. + * this value. If unspecified, 100 entities will be returned by default. The + * maximum value is 500; larger values will will be truncated to 500. * @param {string} [request.pageToken] * Optional. Page token received from a previous `ListEntities` call. Provide * this to retrieve the subsequent page. When paginating, all other parameters * provided to `ListEntities` must match the call that provided the * page token. * @param {string} [request.filter] - * Optional. Filter request by name prefix. + * Optional. The following filter parameters can be added to the URL to limit the + * entities returned by the API: + * + * - Entity ID: ?filter="id=entityID" + * - Asset ID: ?filter="asset=assetID" + * - Data path ?filter="data_path=gs://my-bucket" + * - Is HIVE compatible: ?filter=”hive_compatible=true” + * - Is BigQuery compatible: ?filter=”bigquery_compatible=true” * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -639,15 +1123,22 @@ export class MetadataServiceClient { * Required. Specify the entity view to make a partial list request. * @param {number} [request.pageSize] * Optional. Maximum number of entities to return. The service may return fewer than - * this value. If unspecified, at most 10 entities will be returned. The - * maximum value is 1000; values above 1000 are set to 1000. + * this value. If unspecified, 100 entities will be returned by default. The + * maximum value is 500; larger values will will be truncated to 500. * @param {string} [request.pageToken] * Optional. Page token received from a previous `ListEntities` call. Provide * this to retrieve the subsequent page. When paginating, all other parameters * provided to `ListEntities` must match the call that provided the * page token. * @param {string} [request.filter] - * Optional. Filter request by name prefix. + * Optional. The following filter parameters can be added to the URL to limit the + * entities returned by the API: + * + * - Entity ID: ?filter="id=entityID" + * - Asset ID: ?filter="asset=assetID" + * - Data path ?filter="data_path=gs://my-bucket" + * - Is HIVE compatible: ?filter=”hive_compatible=true” + * - Is BigQuery compatible: ?filter=”bigquery_compatible=true” * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -695,15 +1186,22 @@ export class MetadataServiceClient { * Required. Specify the entity view to make a partial list request. * @param {number} [request.pageSize] * Optional. Maximum number of entities to return. The service may return fewer than - * this value. If unspecified, at most 10 entities will be returned. The - * maximum value is 1000; values above 1000 are set to 1000. + * this value. If unspecified, 100 entities will be returned by default. The + * maximum value is 500; larger values will will be truncated to 500. * @param {string} [request.pageToken] * Optional. Page token received from a previous `ListEntities` call. Provide * this to retrieve the subsequent page. When paginating, all other parameters * provided to `ListEntities` must match the call that provided the * page token. * @param {string} [request.filter] - * Optional. Filter request by name prefix. + * Optional. The following filter parameters can be added to the URL to limit the + * entities returned by the API: + * + * - Entity ID: ?filter="id=entityID" + * - Asset ID: ?filter="asset=assetID" + * - Data path ?filter="data_path=gs://my-bucket" + * - Is HIVE compatible: ?filter=”hive_compatible=true” + * - Is BigQuery compatible: ?filter=”bigquery_compatible=true” * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} @@ -748,15 +1246,33 @@ export class MetadataServiceClient { * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. * @param {number} [request.pageSize] * Optional. Maximum number of partitions to return. The service may return fewer than - * this value. If unspecified, at most 10 partitions will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. + * this value. If unspecified, 100 partitions will be returned by default. The + * maximum page size is 500; larger values will will be truncated to 500. * @param {string} [request.pageToken] * Optional. Page token received from a previous `ListPartitions` call. Provide * this to retrieve the subsequent page. When paginating, all other parameters * provided to `ListPartitions` must match the call that provided the * page token. * @param {string} [request.filter] - * Optional. Filter request. + * Optional. Filter the partitions returned to the caller using a key vslue pair + * expression. The filter expression supports: + * + * - logical operators: AND, OR + * - comparison operators: <, >, >=, <= ,=, != + * - LIKE operators: + * - The right hand of a LIKE operator supports “.” and + * “*” for wildcard searches, for example "value1 LIKE ".*oo.*" + * - parenthetical grouping: ( ) + * + * Sample filter expression: `?filter="key1 < value1 OR key2 > value2" + * + * **Notes:** + * + * - Keys to the left of operators are case insensitive. + * - Partition results are sorted first by creation time, then by + * lexicographic order. + * - Up to 20 key value filter pairs are allowed, but due to performance + * considerations, only the first 10 will be used as a filter. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -854,15 +1370,33 @@ export class MetadataServiceClient { * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. * @param {number} [request.pageSize] * Optional. Maximum number of partitions to return. The service may return fewer than - * this value. If unspecified, at most 10 partitions will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. + * this value. If unspecified, 100 partitions will be returned by default. The + * maximum page size is 500; larger values will will be truncated to 500. * @param {string} [request.pageToken] * Optional. Page token received from a previous `ListPartitions` call. Provide * this to retrieve the subsequent page. When paginating, all other parameters * provided to `ListPartitions` must match the call that provided the * page token. * @param {string} [request.filter] - * Optional. Filter request. + * Optional. Filter the partitions returned to the caller using a key vslue pair + * expression. The filter expression supports: + * + * - logical operators: AND, OR + * - comparison operators: <, >, >=, <= ,=, != + * - LIKE operators: + * - The right hand of a LIKE operator supports “.” and + * “*” for wildcard searches, for example "value1 LIKE ".*oo.*" + * - parenthetical grouping: ( ) + * + * Sample filter expression: `?filter="key1 < value1 OR key2 > value2" + * + * **Notes:** + * + * - Keys to the left of operators are case insensitive. + * - Partition results are sorted first by creation time, then by + * lexicographic order. + * - Up to 20 key value filter pairs are allowed, but due to performance + * considerations, only the first 10 will be used as a filter. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -908,15 +1442,33 @@ export class MetadataServiceClient { * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. * @param {number} [request.pageSize] * Optional. Maximum number of partitions to return. The service may return fewer than - * this value. If unspecified, at most 10 partitions will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. + * this value. If unspecified, 100 partitions will be returned by default. The + * maximum page size is 500; larger values will will be truncated to 500. * @param {string} [request.pageToken] * Optional. Page token received from a previous `ListPartitions` call. Provide * this to retrieve the subsequent page. When paginating, all other parameters * provided to `ListPartitions` must match the call that provided the * page token. * @param {string} [request.filter] - * Optional. Filter request. + * Optional. Filter the partitions returned to the caller using a key vslue pair + * expression. The filter expression supports: + * + * - logical operators: AND, OR + * - comparison operators: <, >, >=, <= ,=, != + * - LIKE operators: + * - The right hand of a LIKE operator supports “.” and + * “*” for wildcard searches, for example "value1 LIKE ".*oo.*" + * - parenthetical grouping: ( ) + * + * Sample filter expression: `?filter="key1 < value1 OR key2 > value2" + * + * **Notes:** + * + * - Keys to the left of operators are case insensitive. + * - Partition results are sorted first by creation time, then by + * lexicographic order. + * - Up to 20 key value filter pairs are allowed, but due to performance + * considerations, only the first 10 will be used as a filter. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} @@ -1036,6 +1588,73 @@ export class MetadataServiceClient { return this.pathTemplates.assetPathTemplate.match(assetName).asset; } + /** + * Return a fully-qualified content resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath( + project: string, + location: string, + lake: string, + content: string + ) { + return this.pathTemplates.contentPathTemplate.render({ + project: project, + location: location, + lake: lake, + content: content, + }); + } + + /** + * Parse the project from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the project. + */ + matchProjectFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).project; + } + + /** + * Parse the location from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the location. + */ + matchLocationFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).location; + } + + /** + * Parse the lake from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).lake; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + /** * Return a fully-qualified entity resource name string. * @@ -1117,6 +1736,77 @@ export class MetadataServiceClient { return this.pathTemplates.entityPathTemplate.match(entityName).entity; } + /** + * Return a fully-qualified environment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} environment + * @returns {string} Resource name string. + */ + environmentPath( + project: string, + location: string, + lake: string, + environment: string + ) { + return this.pathTemplates.environmentPathTemplate.render({ + project: project, + location: location, + lake: lake, + environment: environment, + }); + } + + /** + * Parse the project from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .project; + } + + /** + * Parse the location from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .location; + } + + /** + * Parse the lake from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .lake; + } + + /** + * Parse the environment from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .environment; + } + /** * Return a fully-qualified job resource name string. * @@ -1650,6 +2340,88 @@ export class MetadataServiceClient { ).action; } + /** + * Return a fully-qualified session resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} environment + * @param {string} session + * @returns {string} Resource name string. + */ + sessionPath( + project: string, + location: string, + lake: string, + environment: string, + session: string + ) { + return this.pathTemplates.sessionPathTemplate.render({ + project: project, + location: location, + lake: lake, + environment: environment, + session: session, + }); + } + + /** + * Parse the project from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).project; + } + + /** + * Parse the location from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the location. + */ + matchLocationFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).location; + } + + /** + * Parse the lake from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).lake; + } + + /** + * Parse the environment from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName) + .environment; + } + + /** + * Parse the session from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the session. + */ + matchSessionFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).session; + } + /** * Return a fully-qualified task resource name string. * diff --git a/packages/google-cloud-dataplex/src/v1/metadata_service_client_config.json b/packages/google-cloud-dataplex/src/v1/metadata_service_client_config.json index 0afecc05d1f..f588dd54b21 100644 --- a/packages/google-cloud-dataplex/src/v1/metadata_service_client_config.json +++ b/packages/google-cloud-dataplex/src/v1/metadata_service_client_config.json @@ -32,6 +32,21 @@ } }, "methods": { + "CreateEntity": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateEntity": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteEntity": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "GetEntity": { "timeout_millis": 60000, "retry_codes_name": "unavailable", @@ -42,6 +57,16 @@ "retry_codes_name": "unavailable", "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" }, + "CreatePartition": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeletePartition": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "GetPartition": { "timeout_millis": 60000, "retry_codes_name": "unavailable", diff --git a/packages/google-cloud-dataplex/src/v1/metadata_service_proto_list.json b/packages/google-cloud-dataplex/src/v1/metadata_service_proto_list.json index 2f2fea78052..37d1b351085 100644 --- a/packages/google-cloud-dataplex/src/v1/metadata_service_proto_list.json +++ b/packages/google-cloud-dataplex/src/v1/metadata_service_proto_list.json @@ -1,4 +1,6 @@ [ + "../../protos/google/cloud/dataplex/v1/analyze.proto", + "../../protos/google/cloud/dataplex/v1/content.proto", "../../protos/google/cloud/dataplex/v1/logs.proto", "../../protos/google/cloud/dataplex/v1/metadata.proto", "../../protos/google/cloud/dataplex/v1/resources.proto", diff --git a/packages/google-cloud-dataplex/system-test/fixtures/sample/src/index.js b/packages/google-cloud-dataplex/system-test/fixtures/sample/src/index.js index c6a9214b916..a52c6d6d867 100644 --- a/packages/google-cloud-dataplex/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-dataplex/system-test/fixtures/sample/src/index.js @@ -20,6 +20,7 @@ const dataplex = require('@google-cloud/dataplex'); function main() { + const contentServiceClient = new dataplex.ContentServiceClient(); const dataplexServiceClient = new dataplex.DataplexServiceClient(); const metadataServiceClient = new dataplex.MetadataServiceClient(); } diff --git a/packages/google-cloud-dataplex/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-dataplex/system-test/fixtures/sample/src/index.ts index 81f502bd559..c2dc9e474ac 100644 --- a/packages/google-cloud-dataplex/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-dataplex/system-test/fixtures/sample/src/index.ts @@ -17,11 +17,15 @@ // ** All changes to this file may be overwritten. ** import { + ContentServiceClient, DataplexServiceClient, MetadataServiceClient, } from '@google-cloud/dataplex'; // check that the client class type name can be used +function doStuffWithContentServiceClient(client: ContentServiceClient) { + client.close(); +} function doStuffWithDataplexServiceClient(client: DataplexServiceClient) { client.close(); } @@ -30,6 +34,9 @@ function doStuffWithMetadataServiceClient(client: MetadataServiceClient) { } function main() { + // check that the client instance can be created + const contentServiceClient = new ContentServiceClient(); + doStuffWithContentServiceClient(contentServiceClient); // check that the client instance can be created const dataplexServiceClient = new DataplexServiceClient(); doStuffWithDataplexServiceClient(dataplexServiceClient); diff --git a/packages/google-cloud-dataplex/test/gapic_content_service_v1.ts b/packages/google-cloud-dataplex/test/gapic_content_service_v1.ts new file mode 100644 index 00000000000..f3aac99b7ee --- /dev/null +++ b/packages/google-cloud-dataplex/test/gapic_content_service_v1.ts @@ -0,0 +1,2086 @@ +// Copyright 2022 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as contentserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf} from 'google-gax'; + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.ContentServiceClient', () => { + it('has servicePath', () => { + const servicePath = + contentserviceModule.v1.ContentServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + contentserviceModule.v1.ContentServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = contentserviceModule.v1.ContentServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new contentserviceModule.v1.ContentServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.contentServiceStub, undefined); + await client.initialize(); + assert(client.contentServiceStub); + }); + + it('has close method', () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + + describe('createContent', () => { + it('invokes createContent without error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateContentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Content() + ); + client.innerApiCalls.createContent = stubSimpleCall(expectedResponse); + const [response] = await client.createContent(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createContent as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createContent without error using callback', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateContentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Content() + ); + client.innerApiCalls.createContent = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createContent( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IContent | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createContent as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createContent with error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateContentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createContent = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createContent(request), expectedError); + assert( + (client.innerApiCalls.createContent as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('updateContent', () => { + it('invokes updateContent without error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateContentRequest() + ); + request.content = {}; + request.content.name = ''; + const expectedHeaderRequestParams = 'content.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Content() + ); + client.innerApiCalls.updateContent = stubSimpleCall(expectedResponse); + const [response] = await client.updateContent(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateContent as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateContent without error using callback', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateContentRequest() + ); + request.content = {}; + request.content.name = ''; + const expectedHeaderRequestParams = 'content.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Content() + ); + client.innerApiCalls.updateContent = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateContent( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IContent | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateContent as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateContent with error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateContentRequest() + ); + request.content = {}; + request.content.name = ''; + const expectedHeaderRequestParams = 'content.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateContent = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateContent(request), expectedError); + assert( + (client.innerApiCalls.updateContent as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('deleteContent', () => { + it('invokes deleteContent without error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteContentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteContent = stubSimpleCall(expectedResponse); + const [response] = await client.deleteContent(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteContent as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteContent without error using callback', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteContentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteContent = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteContent( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteContent as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteContent with error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteContentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteContent = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteContent(request), expectedError); + assert( + (client.innerApiCalls.deleteContent as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getContent', () => { + it('invokes getContent without error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetContentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Content() + ); + client.innerApiCalls.getContent = stubSimpleCall(expectedResponse); + const [response] = await client.getContent(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getContent as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getContent without error using callback', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetContentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Content() + ); + client.innerApiCalls.getContent = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getContent( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IContent | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getContent as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getContent with error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetContentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getContent = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getContent(request), expectedError); + assert( + (client.innerApiCalls.getContent as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('listContent', () => { + it('invokes listContent without error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListContentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), + ]; + client.innerApiCalls.listContent = stubSimpleCall(expectedResponse); + const [response] = await client.listContent(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listContent as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listContent without error using callback', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListContentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), + ]; + client.innerApiCalls.listContent = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listContent( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IContent[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listContent as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listContent with error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListContentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listContent = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listContent(request), expectedError); + assert( + (client.innerApiCalls.listContent as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listContentStream without error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListContentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), + ]; + client.descriptors.page.listContent.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listContentStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Content[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataplex.v1.Content) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listContent.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listContent, request) + ); + assert.strictEqual( + (client.descriptors.page.listContent.createStream as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listContentStream with error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListContentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listContent.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listContentStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Content[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataplex.v1.Content) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listContent.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listContent, request) + ); + assert.strictEqual( + (client.descriptors.page.listContent.createStream as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listContent without error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListContentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), + ]; + client.descriptors.page.listContent.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.IContent[] = []; + const iterable = client.listContentAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listContent.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listContent.asyncIterate as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listContent with error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListContentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listContent.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listContentAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.IContent[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listContent.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listContent.asyncIterate as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('Path templates', () => { + describe('asset', () => { + const fakePath = '/rendered/path/asset'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + zone: 'zoneValue', + asset: 'assetValue', + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.assetPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.assetPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('assetPath', () => { + const result = client.assetPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'zoneValue', + 'assetValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.assetPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromAssetName', () => { + const result = client.matchProjectFromAssetName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromAssetName', () => { + const result = client.matchLocationFromAssetName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromAssetName', () => { + const result = client.matchLakeFromAssetName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchZoneFromAssetName', () => { + const result = client.matchZoneFromAssetName(fakePath); + assert.strictEqual(result, 'zoneValue'); + assert( + (client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAssetFromAssetName', () => { + const result = client.matchAssetFromAssetName(fakePath); + assert.strictEqual(result, 'assetValue'); + assert( + (client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('content', () => { + const fakePath = '/rendered/path/content'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + content: 'contentValue', + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.contentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.contentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'contentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromContentName', () => { + const result = client.matchProjectFromContentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromContentName', () => { + const result = client.matchLocationFromContentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromContentName', () => { + const result = client.matchLakeFromContentName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, 'contentValue'); + assert( + (client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('entity', () => { + const fakePath = '/rendered/path/entity'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + zone: 'zoneValue', + entity: 'entityValue', + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.entityPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.entityPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('entityPath', () => { + const result = client.entityPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'zoneValue', + 'entityValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.entityPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromEntityName', () => { + const result = client.matchProjectFromEntityName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromEntityName', () => { + const result = client.matchLocationFromEntityName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromEntityName', () => { + const result = client.matchLakeFromEntityName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchZoneFromEntityName', () => { + const result = client.matchZoneFromEntityName(fakePath); + assert.strictEqual(result, 'zoneValue'); + assert( + (client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEntityFromEntityName', () => { + const result = client.matchEntityFromEntityName(fakePath); + assert.strictEqual(result, 'entityValue'); + assert( + (client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('environment', () => { + const fakePath = '/rendered/path/environment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + environment: 'environmentValue', + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.environmentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.environmentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('environmentPath', () => { + const result = client.environmentPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'environmentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.environmentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromEnvironmentName', () => { + const result = client.matchProjectFromEnvironmentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromEnvironmentName', () => { + const result = client.matchLocationFromEnvironmentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromEnvironmentName', () => { + const result = client.matchLakeFromEnvironmentName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromEnvironmentName', () => { + const result = client.matchEnvironmentFromEnvironmentName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('job', () => { + const fakePath = '/rendered/path/job'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + task: 'taskValue', + job: 'jobValue', + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.jobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.jobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('jobPath', () => { + const result = client.jobPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'taskValue', + 'jobValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.jobPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromJobName', () => { + const result = client.matchProjectFromJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromJobName', () => { + const result = client.matchLocationFromJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromJobName', () => { + const result = client.matchLakeFromJobName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTaskFromJobName', () => { + const result = client.matchTaskFromJobName(fakePath); + assert.strictEqual(result, 'taskValue'); + assert( + (client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchJobFromJobName', () => { + const result = client.matchJobFromJobName(fakePath); + assert.strictEqual(result, 'jobValue'); + assert( + (client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('lake', () => { + const fakePath = '/rendered/path/lake'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.lakePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.lakePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('lakePath', () => { + const result = client.lakePath( + 'projectValue', + 'locationValue', + 'lakeValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.lakePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromLakeName', () => { + const result = client.matchProjectFromLakeName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.lakePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromLakeName', () => { + const result = client.matchLocationFromLakeName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.lakePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromLakeName', () => { + const result = client.matchLakeFromLakeName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.lakePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('partition', () => { + const fakePath = '/rendered/path/partition'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + zone: 'zoneValue', + entity: 'entityValue', + partition: 'partitionValue', + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.partitionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.partitionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('partitionPath', () => { + const result = client.partitionPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'zoneValue', + 'entityValue', + 'partitionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.partitionPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPartitionName', () => { + const result = client.matchProjectFromPartitionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromPartitionName', () => { + const result = client.matchLocationFromPartitionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromPartitionName', () => { + const result = client.matchLakeFromPartitionName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchZoneFromPartitionName', () => { + const result = client.matchZoneFromPartitionName(fakePath); + assert.strictEqual(result, 'zoneValue'); + assert( + (client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEntityFromPartitionName', () => { + const result = client.matchEntityFromPartitionName(fakePath); + assert.strictEqual(result, 'entityValue'); + assert( + (client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPartitionFromPartitionName', () => { + const result = client.matchPartitionFromPartitionName(fakePath); + assert.strictEqual(result, 'partitionValue'); + assert( + (client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationLakeAction', () => { + const fakePath = '/rendered/path/projectLocationLakeAction'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + action: 'actionValue', + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationLakeActionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationLakeActionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationLakeActionPath', () => { + const result = client.projectLocationLakeActionPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'actionValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationLakeActionPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationLakeActionName', () => { + const result = + client.matchProjectFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationLakeActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationLakeActionName', () => { + const result = + client.matchLocationFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationLakeActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromProjectLocationLakeActionName', () => { + const result = + client.matchLakeFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + ( + client.pathTemplates.projectLocationLakeActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchActionFromProjectLocationLakeActionName', () => { + const result = + client.matchActionFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, 'actionValue'); + assert( + ( + client.pathTemplates.projectLocationLakeActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationLakeZoneAction', () => { + const fakePath = '/rendered/path/projectLocationLakeZoneAction'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + zone: 'zoneValue', + action: 'actionValue', + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationLakeZoneActionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationLakeZoneActionPath', () => { + const result = client.projectLocationLakeZoneActionPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'zoneValue', + 'actionValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationLakeZoneActionPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationLakeZoneActionName', () => { + const result = + client.matchProjectFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationLakeZoneActionName', () => { + const result = + client.matchLocationFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromProjectLocationLakeZoneActionName', () => { + const result = + client.matchLakeFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchZoneFromProjectLocationLakeZoneActionName', () => { + const result = + client.matchZoneFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, 'zoneValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchActionFromProjectLocationLakeZoneActionName', () => { + const result = + client.matchActionFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, 'actionValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationLakeZoneAssetAction', () => { + const fakePath = '/rendered/path/projectLocationLakeZoneAssetAction'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + zone: 'zoneValue', + asset: 'assetValue', + action: 'actionValue', + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationLakeZoneAssetActionPath', () => { + const result = client.projectLocationLakeZoneAssetActionPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'zoneValue', + 'assetValue', + 'actionValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationLakeZoneAssetActionName', () => { + const result = + client.matchProjectFromProjectLocationLakeZoneAssetActionName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationLakeZoneAssetActionName', () => { + const result = + client.matchLocationFromProjectLocationLakeZoneAssetActionName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromProjectLocationLakeZoneAssetActionName', () => { + const result = + client.matchLakeFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchZoneFromProjectLocationLakeZoneAssetActionName', () => { + const result = + client.matchZoneFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, 'zoneValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAssetFromProjectLocationLakeZoneAssetActionName', () => { + const result = + client.matchAssetFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, 'assetValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchActionFromProjectLocationLakeZoneAssetActionName', () => { + const result = + client.matchActionFromProjectLocationLakeZoneAssetActionName( + fakePath + ); + assert.strictEqual(result, 'actionValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('session', () => { + const fakePath = '/rendered/path/session'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + environment: 'environmentValue', + session: 'sessionValue', + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.sessionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.sessionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('sessionPath', () => { + const result = client.sessionPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'environmentValue', + 'sessionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.sessionPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromSessionName', () => { + const result = client.matchProjectFromSessionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromSessionName', () => { + const result = client.matchLocationFromSessionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromSessionName', () => { + const result = client.matchLakeFromSessionName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromSessionName', () => { + const result = client.matchEnvironmentFromSessionName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSessionFromSessionName', () => { + const result = client.matchSessionFromSessionName(fakePath); + assert.strictEqual(result, 'sessionValue'); + assert( + (client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('task', () => { + const fakePath = '/rendered/path/task'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + task: 'taskValue', + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.taskPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.taskPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('taskPath', () => { + const result = client.taskPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'taskValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.taskPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromTaskName', () => { + const result = client.matchProjectFromTaskName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromTaskName', () => { + const result = client.matchLocationFromTaskName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromTaskName', () => { + const result = client.matchLakeFromTaskName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTaskFromTaskName', () => { + const result = client.matchTaskFromTaskName(fakePath); + assert.strictEqual(result, 'taskValue'); + assert( + (client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('zone', () => { + const fakePath = '/rendered/path/zone'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + zone: 'zoneValue', + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.zonePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.zonePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('zonePath', () => { + const result = client.zonePath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'zoneValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.zonePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromZoneName', () => { + const result = client.matchProjectFromZoneName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromZoneName', () => { + const result = client.matchLocationFromZoneName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromZoneName', () => { + const result = client.matchLakeFromZoneName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchZoneFromZoneName', () => { + const result = client.matchZoneFromZoneName(fakePath); + assert.strictEqual(result, 'zoneValue'); + assert( + (client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts b/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts index a573dce9786..53d92ad2fc5 100644 --- a/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts +++ b/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts @@ -875,6 +875,117 @@ describe('v1.DataplexServiceClient', () => { }); }); + describe('getEnvironment', () => { + it('invokes getEnvironment without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Environment() + ); + client.innerApiCalls.getEnvironment = stubSimpleCall(expectedResponse); + const [response] = await client.getEnvironment(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getEnvironment without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Environment() + ); + client.innerApiCalls.getEnvironment = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getEnvironment( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IEnvironment | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getEnvironment with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getEnvironment = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getEnvironment(request), expectedError); + assert( + (client.innerApiCalls.getEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('createLake', () => { it('invokes createLake without error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ @@ -3171,15 +3282,15 @@ describe('v1.DataplexServiceClient', () => { }); }); - describe('listLakes', () => { - it('invokes listLakes without error', async () => { + describe('createEnvironment', () => { + it('invokes createEnvironment without error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListLakesRequest() + new protos.google.cloud.dataplex.v1.CreateEnvironmentRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; @@ -3190,29 +3301,29 @@ describe('v1.DataplexServiceClient', () => { }, }, }; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), - ]; - client.innerApiCalls.listLakes = stubSimpleCall(expectedResponse); - const [response] = await client.listLakes(request); + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createEnvironment = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createEnvironment(request); + const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listLakes as SinonStub) + (client.innerApiCalls.createEnvironment as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes listLakes without error using callback', async () => { + it('invokes createEnvironment without error using callback', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListLakesRequest() + new protos.google.cloud.dataplex.v1.CreateEnvironmentRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; @@ -3223,19 +3334,20 @@ describe('v1.DataplexServiceClient', () => { }, }, }; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), - ]; - client.innerApiCalls.listLakes = - stubSimpleCallWithCallback(expectedResponse); + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createEnvironment = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listLakes( + client.createEnvironment( request, ( err?: Error | null, - result?: protos.google.cloud.dataplex.v1.ILake[] | null + result?: LROperation< + protos.google.cloud.dataplex.v1.IEnvironment, + protos.google.cloud.dataplex.v1.IOperationMetadata + > | null ) => { if (err) { reject(err); @@ -3245,23 +3357,27 @@ describe('v1.DataplexServiceClient', () => { } ); }); - const response = await promise; + const operation = (await promise) as LROperation< + protos.google.cloud.dataplex.v1.IEnvironment, + protos.google.cloud.dataplex.v1.IOperationMetadata + >; + const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listLakes as SinonStub) + (client.innerApiCalls.createEnvironment as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); }); - it('invokes listLakes with error', async () => { + it('invokes createEnvironment with call error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListLakesRequest() + new protos.google.cloud.dataplex.v1.CreateEnvironmentRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; @@ -3273,183 +3389,1315 @@ describe('v1.DataplexServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.listLakes = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listLakes(request), expectedError); + client.innerApiCalls.createEnvironment = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createEnvironment(request), expectedError); assert( - (client.innerApiCalls.listLakes as SinonStub) + (client.innerApiCalls.createEnvironment as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes listLakesStream without error', async () => { + it('invokes createEnvironment with LRO error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListLakesRequest() + new protos.google.cloud.dataplex.v1.CreateEnvironmentRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), - ]; - client.descriptors.page.listLakes.createStream = - stubPageStreamingCall(expectedResponse); - const stream = client.listLakesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.Lake[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.Lake) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - const responses = await promise; - assert.deepStrictEqual(responses, expectedResponse); + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createEnvironment = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createEnvironment(request); + await assert.rejects(operation.promise(), expectedError); assert( - (client.descriptors.page.listLakes.createStream as SinonStub) + (client.innerApiCalls.createEnvironment as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listLakes, request) - ); - assert.strictEqual( - (client.descriptors.page.listLakes.createStream as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + .calledWith(request, expectedOptions, undefined) ); }); - it('invokes listLakesStream with error', async () => { + it('invokes checkCreateEnvironmentProgress without error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListLakesRequest() + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateEnvironmentProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateEnvironmentProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); const expectedError = new Error('expected'); - client.descriptors.page.listLakes.createStream = stubPageStreamingCall( + + client.operationsClient.getOperation = stubSimpleCall( undefined, expectedError ); - const stream = client.listLakesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.Lake[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.Lake) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert( - (client.descriptors.page.listLakes.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listLakes, request) - ); - assert.strictEqual( - (client.descriptors.page.listLakes.createStream as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + await assert.rejects( + client.checkCreateEnvironmentProgress(''), + expectedError ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); + }); - it('uses async iteration with listLakes without error', async () => { + describe('updateEnvironment', () => { + it('invokes updateEnvironment without error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListLakesRequest() + new protos.google.cloud.dataplex.v1.UpdateEnvironmentRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), - ]; - client.descriptors.page.listLakes.asyncIterate = - stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.dataplex.v1.ILake[] = []; - const iterable = client.listLakesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listLakes.asyncIterate as SinonStub).getCall(0) + request.environment = {}; + request.environment.name = ''; + const expectedHeaderRequestParams = 'environment.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateEnvironment = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateEnvironment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateEnvironment without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateEnvironmentRequest() + ); + request.environment = {}; + request.environment.name = ''; + const expectedHeaderRequestParams = 'environment.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateEnvironment = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateEnvironment( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.dataplex.v1.IEnvironment, + protos.google.cloud.dataplex.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.dataplex.v1.IEnvironment, + protos.google.cloud.dataplex.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateEnvironment with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateEnvironmentRequest() + ); + request.environment = {}; + request.environment.name = ''; + const expectedHeaderRequestParams = 'environment.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateEnvironment = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updateEnvironment(request), expectedError); + assert( + (client.innerApiCalls.updateEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateEnvironment with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateEnvironmentRequest() + ); + request.environment = {}; + request.environment.name = ''; + const expectedHeaderRequestParams = 'environment.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateEnvironment = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateEnvironment(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.updateEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkUpdateEnvironmentProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateEnvironmentProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateEnvironmentProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkUpdateEnvironmentProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteEnvironment', () => { + it('invokes deleteEnvironment without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteEnvironment = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteEnvironment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteEnvironment without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteEnvironment = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteEnvironment( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteEnvironment with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteEnvironment = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteEnvironment(request), expectedError); + assert( + (client.innerApiCalls.deleteEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteEnvironment with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteEnvironment = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteEnvironment(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.deleteEnvironment as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkDeleteEnvironmentProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteEnvironmentProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteEnvironmentProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkDeleteEnvironmentProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listLakes', () => { + it('invokes listLakes without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + ]; + client.innerApiCalls.listLakes = stubSimpleCall(expectedResponse); + const [response] = await client.listLakes(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listLakes as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listLakes without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + ]; + client.innerApiCalls.listLakes = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listLakes( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.ILake[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listLakes as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listLakes with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listLakes = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listLakes(request), expectedError); + assert( + (client.innerApiCalls.listLakes as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listLakesStream without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + ]; + client.descriptors.page.listLakes.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listLakesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Lake[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Lake) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listLakes.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listLakes, request) + ); + assert.strictEqual( + (client.descriptors.page.listLakes.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listLakesStream with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listLakes.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listLakesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Lake[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Lake) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listLakes.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listLakes, request) + ); + assert.strictEqual( + (client.descriptors.page.listLakes.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listLakes without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + ]; + client.descriptors.page.listLakes.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.ILake[] = []; + const iterable = client.listLakesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listLakes.asyncIterate as SinonStub).getCall(0) + .args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listLakes.asyncIterate as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listLakes with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listLakes.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listLakesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.ILake[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listLakes.asyncIterate as SinonStub).getCall(0) + .args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listLakes.asyncIterate as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listLakeActions', () => { + it('invokes listLakeActions without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.innerApiCalls.listLakeActions = stubSimpleCall(expectedResponse); + const [response] = await client.listLakeActions(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listLakeActions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listLakeActions without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.innerApiCalls.listLakeActions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listLakeActions( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IAction[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listLakeActions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listLakeActions with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listLakeActions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listLakeActions(request), expectedError); + assert( + (client.innerApiCalls.listLakeActions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listLakeActionsStream without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.descriptors.page.listLakeActions.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listLakeActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Action[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataplex.v1.Action) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listLakeActions.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listLakeActions, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listLakeActions.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listLakeActionsStream with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listLakeActions.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listLakeActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Action[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataplex.v1.Action) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listLakeActions.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listLakeActions, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listLakeActions.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listLakeActions without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.descriptors.page.listLakeActions.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.IAction[] = []; + const iterable = client.listLakeActionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listLakeActions.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listLakeActions.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listLakeActions with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listLakeActions.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLakeActionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.IAction[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listLakeActions.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listLakeActions.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listZones', () => { + it('invokes listZones without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZonesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + ]; + client.innerApiCalls.listZones = stubSimpleCall(expectedResponse); + const [response] = await client.listZones(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listZones as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listZones without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZonesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + ]; + client.innerApiCalls.listZones = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listZones( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IZone[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listZones as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listZones with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZonesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listZones = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listZones(request), expectedError); + assert( + (client.innerApiCalls.listZones as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listZonesStream without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZonesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + ]; + client.descriptors.page.listZones.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listZonesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Zone[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Zone) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listZones.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listZones, request) + ); + assert.strictEqual( + (client.descriptors.page.listZones.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listZonesStream with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZonesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listZones.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listZonesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Zone[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Zone) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listZones.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listZones, request) + ); + assert.strictEqual( + (client.descriptors.page.listZones.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listZones without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZonesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + ]; + client.descriptors.page.listZones.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.IZone[] = []; + const iterable = client.listZonesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listZones.asyncIterate as SinonStub).getCall(0) .args[1], request ); assert.strictEqual( - (client.descriptors.page.listLakes.asyncIterate as SinonStub).getCall(0) + (client.descriptors.page.listZones.asyncIterate as SinonStub).getCall(0) .args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); - it('uses async iteration with listLakes with error', async () => { + it('uses async iteration with listZones with error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListLakesRequest() + new protos.google.cloud.dataplex.v1.ListZonesRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listLakes.asyncIterate = stubAsyncIterationCall( + client.descriptors.page.listZones.asyncIterate = stubAsyncIterationCall( undefined, expectedError ); - const iterable = client.listLakesAsync(request); + const iterable = client.listZonesAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.dataplex.v1.ILake[] = []; + const responses: protos.google.cloud.dataplex.v1.IZone[] = []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - (client.descriptors.page.listLakes.asyncIterate as SinonStub).getCall(0) + (client.descriptors.page.listZones.asyncIterate as SinonStub).getCall(0) .args[1], request ); assert.strictEqual( - (client.descriptors.page.listLakes.asyncIterate as SinonStub).getCall(0) + (client.descriptors.page.listZones.asyncIterate as SinonStub).getCall(0) .args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); }); - describe('listLakeActions', () => { - it('invokes listLakeActions without error', async () => { + describe('listZoneActions', () => { + it('invokes listZoneActions without error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() + new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; @@ -3465,24 +4713,24 @@ describe('v1.DataplexServiceClient', () => { generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), ]; - client.innerApiCalls.listLakeActions = stubSimpleCall(expectedResponse); - const [response] = await client.listLakeActions(request); + client.innerApiCalls.listZoneActions = stubSimpleCall(expectedResponse); + const [response] = await client.listZoneActions(request); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listLakeActions as SinonStub) + (client.innerApiCalls.listZoneActions as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes listLakeActions without error using callback', async () => { + it('invokes listZoneActions without error using callback', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() + new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; @@ -3498,10 +4746,10 @@ describe('v1.DataplexServiceClient', () => { generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), ]; - client.innerApiCalls.listLakeActions = + client.innerApiCalls.listZoneActions = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listLakeActions( + client.listZoneActions( request, ( err?: Error | null, @@ -3518,20 +4766,20 @@ describe('v1.DataplexServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listLakeActions as SinonStub) + (client.innerApiCalls.listZoneActions as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); }); - it('invokes listLakeActions with error', async () => { + it('invokes listZoneActions with error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() + new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; @@ -3543,26 +4791,26 @@ describe('v1.DataplexServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.listLakeActions = stubSimpleCall( + client.innerApiCalls.listZoneActions = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listLakeActions(request), expectedError); + await assert.rejects(client.listZoneActions(request), expectedError); assert( - (client.innerApiCalls.listLakeActions as SinonStub) + (client.innerApiCalls.listZoneActions as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes listLakeActionsStream without error', async () => { + it('invokes listZoneActionsStream without error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() + new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; @@ -3571,9 +4819,9 @@ describe('v1.DataplexServiceClient', () => { generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), ]; - client.descriptors.page.listLakeActions.createStream = + client.descriptors.page.listZoneActions.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listLakeActionsStream(request); + const stream = client.listZoneActionsStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.cloud.dataplex.v1.Action[] = []; stream.on( @@ -3592,33 +4840,33 @@ describe('v1.DataplexServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listLakeActions.createStream as SinonStub) + (client.descriptors.page.listZoneActions.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listLakeActions, request) + .calledWith(client.innerApiCalls.listZoneActions, request) ); assert.strictEqual( ( - client.descriptors.page.listLakeActions.createStream as SinonStub + client.descriptors.page.listZoneActions.createStream as SinonStub ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); - it('invokes listLakeActionsStream with error', async () => { + it('invokes listZoneActionsStream with error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() + new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listLakeActions.createStream = + client.descriptors.page.listZoneActions.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listLakeActionsStream(request); + const stream = client.listZoneActionsStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.cloud.dataplex.v1.Action[] = []; stream.on( @@ -3636,26 +4884,26 @@ describe('v1.DataplexServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listLakeActions.createStream as SinonStub) + (client.descriptors.page.listZoneActions.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listLakeActions, request) + .calledWith(client.innerApiCalls.listZoneActions, request) ); assert.strictEqual( ( - client.descriptors.page.listLakeActions.createStream as SinonStub + client.descriptors.page.listZoneActions.createStream as SinonStub ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); - it('uses async iteration with listLakeActions without error', async () => { + it('uses async iteration with listZoneActions without error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() + new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; @@ -3664,43 +4912,43 @@ describe('v1.DataplexServiceClient', () => { generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), ]; - client.descriptors.page.listLakeActions.asyncIterate = + client.descriptors.page.listZoneActions.asyncIterate = stubAsyncIterationCall(expectedResponse); const responses: protos.google.cloud.dataplex.v1.IAction[] = []; - const iterable = client.listLakeActionsAsync(request); + const iterable = client.listZoneActionsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listLakeActions.asyncIterate as SinonStub + client.descriptors.page.listZoneActions.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert.strictEqual( ( - client.descriptors.page.listLakeActions.asyncIterate as SinonStub + client.descriptors.page.listZoneActions.asyncIterate as SinonStub ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); - it('uses async iteration with listLakeActions with error', async () => { + it('uses async iteration with listZoneActions with error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() + new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listLakeActions.asyncIterate = + client.descriptors.page.listZoneActions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listLakeActionsAsync(request); + const iterable = client.listZoneActionsAsync(request); await assert.rejects(async () => { const responses: protos.google.cloud.dataplex.v1.IAction[] = []; for await (const resource of iterable) { @@ -3709,28 +4957,28 @@ describe('v1.DataplexServiceClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.listLakeActions.asyncIterate as SinonStub + client.descriptors.page.listZoneActions.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert.strictEqual( ( - client.descriptors.page.listLakeActions.asyncIterate as SinonStub + client.descriptors.page.listZoneActions.asyncIterate as SinonStub ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); }); - describe('listZones', () => { - it('invokes listZones without error', async () => { + describe('listAssets', () => { + it('invokes listAssets without error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListZonesRequest() + new protos.google.cloud.dataplex.v1.ListAssetsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; @@ -3742,28 +4990,28 @@ describe('v1.DataplexServiceClient', () => { }, }; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), ]; - client.innerApiCalls.listZones = stubSimpleCall(expectedResponse); - const [response] = await client.listZones(request); + client.innerApiCalls.listAssets = stubSimpleCall(expectedResponse); + const [response] = await client.listAssets(request); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listZones as SinonStub) + (client.innerApiCalls.listAssets as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes listZones without error using callback', async () => { + it('invokes listAssets without error using callback', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListZonesRequest() + new protos.google.cloud.dataplex.v1.ListAssetsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; @@ -3775,18 +5023,18 @@ describe('v1.DataplexServiceClient', () => { }, }; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), ]; - client.innerApiCalls.listZones = + client.innerApiCalls.listAssets = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listZones( + client.listAssets( request, ( err?: Error | null, - result?: protos.google.cloud.dataplex.v1.IZone[] | null + result?: protos.google.cloud.dataplex.v1.IAsset[] | null ) => { if (err) { reject(err); @@ -3799,20 +5047,20 @@ describe('v1.DataplexServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listZones as SinonStub) + (client.innerApiCalls.listAssets as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); }); - it('invokes listZones with error', async () => { + it('invokes listAssets with error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListZonesRequest() + new protos.google.cloud.dataplex.v1.ListAssetsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; @@ -3824,37 +5072,40 @@ describe('v1.DataplexServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.listZones = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listZones(request), expectedError); + client.innerApiCalls.listAssets = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listAssets(request), expectedError); assert( - (client.innerApiCalls.listZones as SinonStub) + (client.innerApiCalls.listAssets as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes listZonesStream without error', async () => { + it('invokes listAssetsStream without error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListZonesRequest() + new protos.google.cloud.dataplex.v1.ListAssetsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), ]; - client.descriptors.page.listZones.createStream = + client.descriptors.page.listAssets.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listZonesStream(request); + const stream = client.listAssetsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.Zone[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.Zone) => { + const responses: protos.google.cloud.dataplex.v1.Asset[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Asset) => { responses.push(response); }); stream.on('end', () => { @@ -3867,37 +5118,38 @@ describe('v1.DataplexServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listZones.createStream as SinonStub) + (client.descriptors.page.listAssets.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listZones, request) + .calledWith(client.innerApiCalls.listAssets, request) ); assert.strictEqual( - (client.descriptors.page.listZones.createStream as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], + (client.descriptors.page.listAssets.createStream as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); - it('invokes listZonesStream with error', async () => { + it('invokes listAssetsStream with error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListZonesRequest() + new protos.google.cloud.dataplex.v1.ListAssetsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listZones.createStream = stubPageStreamingCall( + client.descriptors.page.listAssets.createStream = stubPageStreamingCall( undefined, expectedError ); - const stream = client.listZonesStream(request); + const stream = client.listAssetsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.Zone[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.Zone) => { + const responses: protos.google.cloud.dataplex.v1.Asset[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Asset) => { responses.push(response); }); stream.on('end', () => { @@ -3909,98 +5161,103 @@ describe('v1.DataplexServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listZones.createStream as SinonStub) + (client.descriptors.page.listAssets.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listZones, request) + .calledWith(client.innerApiCalls.listAssets, request) ); assert.strictEqual( - (client.descriptors.page.listZones.createStream as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], + (client.descriptors.page.listAssets.createStream as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); - it('uses async iteration with listZones without error', async () => { + it('uses async iteration with listAssets without error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListZonesRequest() + new protos.google.cloud.dataplex.v1.ListAssetsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), ]; - client.descriptors.page.listZones.asyncIterate = + client.descriptors.page.listAssets.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.dataplex.v1.IZone[] = []; - const iterable = client.listZonesAsync(request); + const responses: protos.google.cloud.dataplex.v1.IAsset[] = []; + const iterable = client.listAssetsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listZones.asyncIterate as SinonStub).getCall(0) - .args[1], + (client.descriptors.page.listAssets.asyncIterate as SinonStub).getCall( + 0 + ).args[1], request ); assert.strictEqual( - (client.descriptors.page.listZones.asyncIterate as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], + (client.descriptors.page.listAssets.asyncIterate as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); - it('uses async iteration with listZones with error', async () => { + it('uses async iteration with listAssets with error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListZonesRequest() + new protos.google.cloud.dataplex.v1.ListAssetsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listZones.asyncIterate = stubAsyncIterationCall( + client.descriptors.page.listAssets.asyncIterate = stubAsyncIterationCall( undefined, expectedError ); - const iterable = client.listZonesAsync(request); + const iterable = client.listAssetsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.dataplex.v1.IZone[] = []; + const responses: protos.google.cloud.dataplex.v1.IAsset[] = []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - (client.descriptors.page.listZones.asyncIterate as SinonStub).getCall(0) - .args[1], + (client.descriptors.page.listAssets.asyncIterate as SinonStub).getCall( + 0 + ).args[1], request ); assert.strictEqual( - (client.descriptors.page.listZones.asyncIterate as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], + (client.descriptors.page.listAssets.asyncIterate as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); }); - describe('listZoneActions', () => { - it('invokes listZoneActions without error', async () => { + describe('listAssetActions', () => { + it('invokes listAssetActions without error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() + new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; @@ -4016,24 +5273,24 @@ describe('v1.DataplexServiceClient', () => { generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), ]; - client.innerApiCalls.listZoneActions = stubSimpleCall(expectedResponse); - const [response] = await client.listZoneActions(request); + client.innerApiCalls.listAssetActions = stubSimpleCall(expectedResponse); + const [response] = await client.listAssetActions(request); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listZoneActions as SinonStub) + (client.innerApiCalls.listAssetActions as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes listZoneActions without error using callback', async () => { + it('invokes listAssetActions without error using callback', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() + new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; @@ -4049,10 +5306,10 @@ describe('v1.DataplexServiceClient', () => { generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), ]; - client.innerApiCalls.listZoneActions = + client.innerApiCalls.listAssetActions = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listZoneActions( + client.listAssetActions( request, ( err?: Error | null, @@ -4069,20 +5326,20 @@ describe('v1.DataplexServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listZoneActions as SinonStub) + (client.innerApiCalls.listAssetActions as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); }); - it('invokes listZoneActions with error', async () => { + it('invokes listAssetActions with error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() + new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; @@ -4094,26 +5351,26 @@ describe('v1.DataplexServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.listZoneActions = stubSimpleCall( + client.innerApiCalls.listAssetActions = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listZoneActions(request), expectedError); + await assert.rejects(client.listAssetActions(request), expectedError); assert( - (client.innerApiCalls.listZoneActions as SinonStub) + (client.innerApiCalls.listAssetActions as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes listZoneActionsStream without error', async () => { + it('invokes listAssetActionsStream without error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() + new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; @@ -4122,9 +5379,9 @@ describe('v1.DataplexServiceClient', () => { generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), ]; - client.descriptors.page.listZoneActions.createStream = + client.descriptors.page.listAssetActions.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listZoneActionsStream(request); + const stream = client.listAssetActionsStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.cloud.dataplex.v1.Action[] = []; stream.on( @@ -4143,33 +5400,33 @@ describe('v1.DataplexServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listZoneActions.createStream as SinonStub) + (client.descriptors.page.listAssetActions.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listZoneActions, request) + .calledWith(client.innerApiCalls.listAssetActions, request) ); assert.strictEqual( ( - client.descriptors.page.listZoneActions.createStream as SinonStub + client.descriptors.page.listAssetActions.createStream as SinonStub ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); - it('invokes listZoneActionsStream with error', async () => { + it('invokes listAssetActionsStream with error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() + new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listZoneActions.createStream = + client.descriptors.page.listAssetActions.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listZoneActionsStream(request); + const stream = client.listAssetActionsStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.cloud.dataplex.v1.Action[] = []; stream.on( @@ -4187,26 +5444,26 @@ describe('v1.DataplexServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listZoneActions.createStream as SinonStub) + (client.descriptors.page.listAssetActions.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listZoneActions, request) + .calledWith(client.innerApiCalls.listAssetActions, request) ); assert.strictEqual( ( - client.descriptors.page.listZoneActions.createStream as SinonStub + client.descriptors.page.listAssetActions.createStream as SinonStub ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); - it('uses async iteration with listZoneActions without error', async () => { + it('uses async iteration with listAssetActions without error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() + new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; @@ -4215,43 +5472,43 @@ describe('v1.DataplexServiceClient', () => { generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), ]; - client.descriptors.page.listZoneActions.asyncIterate = + client.descriptors.page.listAssetActions.asyncIterate = stubAsyncIterationCall(expectedResponse); const responses: protos.google.cloud.dataplex.v1.IAction[] = []; - const iterable = client.listZoneActionsAsync(request); + const iterable = client.listAssetActionsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listZoneActions.asyncIterate as SinonStub + client.descriptors.page.listAssetActions.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert.strictEqual( ( - client.descriptors.page.listZoneActions.asyncIterate as SinonStub + client.descriptors.page.listAssetActions.asyncIterate as SinonStub ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); - it('uses async iteration with listZoneActions with error', async () => { + it('uses async iteration with listAssetActions with error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() + new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listZoneActions.asyncIterate = + client.descriptors.page.listAssetActions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listZoneActionsAsync(request); + const iterable = client.listAssetActionsAsync(request); await assert.rejects(async () => { const responses: protos.google.cloud.dataplex.v1.IAction[] = []; for await (const resource of iterable) { @@ -4260,28 +5517,28 @@ describe('v1.DataplexServiceClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.listZoneActions.asyncIterate as SinonStub + client.descriptors.page.listAssetActions.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert.strictEqual( ( - client.descriptors.page.listZoneActions.asyncIterate as SinonStub + client.descriptors.page.listAssetActions.asyncIterate as SinonStub ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); }); - describe('listAssets', () => { - it('invokes listAssets without error', async () => { + describe('listTasks', () => { + it('invokes listTasks without error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListAssetsRequest() + new protos.google.cloud.dataplex.v1.ListTasksRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; @@ -4293,28 +5550,28 @@ describe('v1.DataplexServiceClient', () => { }, }; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), ]; - client.innerApiCalls.listAssets = stubSimpleCall(expectedResponse); - const [response] = await client.listAssets(request); + client.innerApiCalls.listTasks = stubSimpleCall(expectedResponse); + const [response] = await client.listTasks(request); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listAssets as SinonStub) + (client.innerApiCalls.listTasks as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes listAssets without error using callback', async () => { + it('invokes listTasks without error using callback', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListAssetsRequest() + new protos.google.cloud.dataplex.v1.ListTasksRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; @@ -4326,18 +5583,18 @@ describe('v1.DataplexServiceClient', () => { }, }; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), ]; - client.innerApiCalls.listAssets = + client.innerApiCalls.listTasks = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listAssets( + client.listTasks( request, ( err?: Error | null, - result?: protos.google.cloud.dataplex.v1.IAsset[] | null + result?: protos.google.cloud.dataplex.v1.ITask[] | null ) => { if (err) { reject(err); @@ -4350,20 +5607,20 @@ describe('v1.DataplexServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listAssets as SinonStub) + (client.innerApiCalls.listTasks as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); }); - it('invokes listAssets with error', async () => { + it('invokes listTasks with error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListAssetsRequest() + new protos.google.cloud.dataplex.v1.ListTasksRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; @@ -4375,40 +5632,37 @@ describe('v1.DataplexServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.listAssets = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.listAssets(request), expectedError); + client.innerApiCalls.listTasks = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listTasks(request), expectedError); assert( - (client.innerApiCalls.listAssets as SinonStub) + (client.innerApiCalls.listTasks as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes listAssetsStream without error', async () => { + it('invokes listTasksStream without error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListAssetsRequest() + new protos.google.cloud.dataplex.v1.ListTasksRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), ]; - client.descriptors.page.listAssets.createStream = + client.descriptors.page.listTasks.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listAssetsStream(request); + const stream = client.listTasksStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.Asset[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.Asset) => { + const responses: protos.google.cloud.dataplex.v1.Task[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Task) => { responses.push(response); }); stream.on('end', () => { @@ -4421,38 +5675,37 @@ describe('v1.DataplexServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listAssets.createStream as SinonStub) + (client.descriptors.page.listTasks.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listAssets, request) + .calledWith(client.innerApiCalls.listTasks, request) ); assert.strictEqual( - (client.descriptors.page.listAssets.createStream as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], + (client.descriptors.page.listTasks.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); - it('invokes listAssetsStream with error', async () => { + it('invokes listTasksStream with error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListAssetsRequest() + new protos.google.cloud.dataplex.v1.ListTasksRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listAssets.createStream = stubPageStreamingCall( + client.descriptors.page.listTasks.createStream = stubPageStreamingCall( undefined, expectedError ); - const stream = client.listAssetsStream(request); + const stream = client.listTasksStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.Asset[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.Asset) => { + const responses: protos.google.cloud.dataplex.v1.Task[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Task) => { responses.push(response); }); stream.on('end', () => { @@ -4464,103 +5717,98 @@ describe('v1.DataplexServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listAssets.createStream as SinonStub) + (client.descriptors.page.listTasks.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listAssets, request) + .calledWith(client.innerApiCalls.listTasks, request) ); assert.strictEqual( - (client.descriptors.page.listAssets.createStream as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], + (client.descriptors.page.listTasks.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); - it('uses async iteration with listAssets without error', async () => { + it('uses async iteration with listTasks without error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListAssetsRequest() + new protos.google.cloud.dataplex.v1.ListTasksRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), ]; - client.descriptors.page.listAssets.asyncIterate = + client.descriptors.page.listTasks.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.dataplex.v1.IAsset[] = []; - const iterable = client.listAssetsAsync(request); + const responses: protos.google.cloud.dataplex.v1.ITask[] = []; + const iterable = client.listTasksAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listAssets.asyncIterate as SinonStub).getCall( - 0 - ).args[1], + (client.descriptors.page.listTasks.asyncIterate as SinonStub).getCall(0) + .args[1], request ); assert.strictEqual( - (client.descriptors.page.listAssets.asyncIterate as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], + (client.descriptors.page.listTasks.asyncIterate as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); - it('uses async iteration with listAssets with error', async () => { + it('uses async iteration with listTasks with error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListAssetsRequest() + new protos.google.cloud.dataplex.v1.ListTasksRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listAssets.asyncIterate = stubAsyncIterationCall( + client.descriptors.page.listTasks.asyncIterate = stubAsyncIterationCall( undefined, expectedError ); - const iterable = client.listAssetsAsync(request); + const iterable = client.listTasksAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.dataplex.v1.IAsset[] = []; + const responses: protos.google.cloud.dataplex.v1.ITask[] = []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - (client.descriptors.page.listAssets.asyncIterate as SinonStub).getCall( - 0 - ).args[1], + (client.descriptors.page.listTasks.asyncIterate as SinonStub).getCall(0) + .args[1], request ); assert.strictEqual( - (client.descriptors.page.listAssets.asyncIterate as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], + (client.descriptors.page.listTasks.asyncIterate as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); }); - describe('listAssetActions', () => { - it('invokes listAssetActions without error', async () => { + describe('listJobs', () => { + it('invokes listJobs without error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() + new protos.google.cloud.dataplex.v1.ListJobsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; @@ -4572,28 +5820,28 @@ describe('v1.DataplexServiceClient', () => { }, }; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), ]; - client.innerApiCalls.listAssetActions = stubSimpleCall(expectedResponse); - const [response] = await client.listAssetActions(request); + client.innerApiCalls.listJobs = stubSimpleCall(expectedResponse); + const [response] = await client.listJobs(request); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listAssetActions as SinonStub) + (client.innerApiCalls.listJobs as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes listAssetActions without error using callback', async () => { + it('invokes listJobs without error using callback', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() + new protos.google.cloud.dataplex.v1.ListJobsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; @@ -4605,18 +5853,18 @@ describe('v1.DataplexServiceClient', () => { }, }; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), ]; - client.innerApiCalls.listAssetActions = + client.innerApiCalls.listJobs = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listAssetActions( + client.listJobs( request, ( err?: Error | null, - result?: protos.google.cloud.dataplex.v1.IAction[] | null + result?: protos.google.cloud.dataplex.v1.IJob[] | null ) => { if (err) { reject(err); @@ -4629,20 +5877,20 @@ describe('v1.DataplexServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listAssetActions as SinonStub) + (client.innerApiCalls.listJobs as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); }); - it('invokes listAssetActions with error', async () => { + it('invokes listJobs with error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() + new protos.google.cloud.dataplex.v1.ListJobsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; @@ -4654,45 +5902,39 @@ describe('v1.DataplexServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.listAssetActions = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.listAssetActions(request), expectedError); + client.innerApiCalls.listJobs = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listJobs(request), expectedError); assert( - (client.innerApiCalls.listAssetActions as SinonStub) + (client.innerApiCalls.listJobs as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes listAssetActionsStream without error', async () => { + it('invokes listJobsStream without error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() + new protos.google.cloud.dataplex.v1.ListJobsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), ]; - client.descriptors.page.listAssetActions.createStream = + client.descriptors.page.listJobs.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listAssetActionsStream(request); + const stream = client.listJobsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.Action[] = []; - stream.on( - 'data', - (response: protos.google.cloud.dataplex.v1.Action) => { - responses.push(response); - } - ); + const responses: protos.google.cloud.dataplex.v1.Job[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Job) => { + responses.push(response); + }); stream.on('end', () => { resolve(responses); }); @@ -4703,41 +5945,39 @@ describe('v1.DataplexServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listAssetActions.createStream as SinonStub) + (client.descriptors.page.listJobs.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listAssetActions, request) + .calledWith(client.innerApiCalls.listJobs, request) ); assert.strictEqual( - ( - client.descriptors.page.listAssetActions.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + (client.descriptors.page.listJobs.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); - it('invokes listAssetActionsStream with error', async () => { + it('invokes listJobsStream with error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() + new protos.google.cloud.dataplex.v1.ListJobsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listAssetActions.createStream = - stubPageStreamingCall(undefined, expectedError); - const stream = client.listAssetActionsStream(request); + client.descriptors.page.listJobs.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listJobsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.Action[] = []; - stream.on( - 'data', - (response: protos.google.cloud.dataplex.v1.Action) => { - responses.push(response); - } - ); + const responses: protos.google.cloud.dataplex.v1.Job[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Job) => { + responses.push(response); + }); stream.on('end', () => { resolve(responses); }); @@ -4747,101 +5987,98 @@ describe('v1.DataplexServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listAssetActions.createStream as SinonStub) + (client.descriptors.page.listJobs.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listAssetActions, request) + .calledWith(client.innerApiCalls.listJobs, request) ); assert.strictEqual( - ( - client.descriptors.page.listAssetActions.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + (client.descriptors.page.listJobs.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); - it('uses async iteration with listAssetActions without error', async () => { + it('uses async iteration with listJobs without error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() + new protos.google.cloud.dataplex.v1.ListJobsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), ]; - client.descriptors.page.listAssetActions.asyncIterate = + client.descriptors.page.listJobs.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.dataplex.v1.IAction[] = []; - const iterable = client.listAssetActionsAsync(request); + const responses: protos.google.cloud.dataplex.v1.IJob[] = []; + const iterable = client.listJobsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - ( - client.descriptors.page.listAssetActions.asyncIterate as SinonStub - ).getCall(0).args[1], + (client.descriptors.page.listJobs.asyncIterate as SinonStub).getCall(0) + .args[1], request ); assert.strictEqual( - ( - client.descriptors.page.listAssetActions.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + (client.descriptors.page.listJobs.asyncIterate as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); - it('uses async iteration with listAssetActions with error', async () => { + it('uses async iteration with listJobs with error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() + new protos.google.cloud.dataplex.v1.ListJobsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listAssetActions.asyncIterate = - stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listAssetActionsAsync(request); + client.descriptors.page.listJobs.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listJobsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.dataplex.v1.IAction[] = []; + const responses: protos.google.cloud.dataplex.v1.IJob[] = []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - ( - client.descriptors.page.listAssetActions.asyncIterate as SinonStub - ).getCall(0).args[1], + (client.descriptors.page.listJobs.asyncIterate as SinonStub).getCall(0) + .args[1], request ); assert.strictEqual( - ( - client.descriptors.page.listAssetActions.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + (client.descriptors.page.listJobs.asyncIterate as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); }); - describe('listTasks', () => { - it('invokes listTasks without error', async () => { + describe('listEnvironments', () => { + it('invokes listEnvironments without error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListTasksRequest() + new protos.google.cloud.dataplex.v1.ListEnvironmentsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; @@ -4853,28 +6090,34 @@ describe('v1.DataplexServiceClient', () => { }, }; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + generateSampleMessage( + new protos.google.cloud.dataplex.v1.Environment() + ), + generateSampleMessage( + new protos.google.cloud.dataplex.v1.Environment() + ), + generateSampleMessage( + new protos.google.cloud.dataplex.v1.Environment() + ), ]; - client.innerApiCalls.listTasks = stubSimpleCall(expectedResponse); - const [response] = await client.listTasks(request); + client.innerApiCalls.listEnvironments = stubSimpleCall(expectedResponse); + const [response] = await client.listEnvironments(request); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listTasks as SinonStub) + (client.innerApiCalls.listEnvironments as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes listTasks without error using callback', async () => { + it('invokes listEnvironments without error using callback', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListTasksRequest() + new protos.google.cloud.dataplex.v1.ListEnvironmentsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; @@ -4886,18 +6129,24 @@ describe('v1.DataplexServiceClient', () => { }, }; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + generateSampleMessage( + new protos.google.cloud.dataplex.v1.Environment() + ), + generateSampleMessage( + new protos.google.cloud.dataplex.v1.Environment() + ), + generateSampleMessage( + new protos.google.cloud.dataplex.v1.Environment() + ), ]; - client.innerApiCalls.listTasks = + client.innerApiCalls.listEnvironments = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listTasks( + client.listEnvironments( request, ( err?: Error | null, - result?: protos.google.cloud.dataplex.v1.ITask[] | null + result?: protos.google.cloud.dataplex.v1.IEnvironment[] | null ) => { if (err) { reject(err); @@ -4910,20 +6159,20 @@ describe('v1.DataplexServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listTasks as SinonStub) + (client.innerApiCalls.listEnvironments as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); }); - it('invokes listTasks with error', async () => { + it('invokes listEnvironments with error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListTasksRequest() + new protos.google.cloud.dataplex.v1.ListEnvironmentsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; @@ -4935,39 +6184,51 @@ describe('v1.DataplexServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.listTasks = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listTasks(request), expectedError); + client.innerApiCalls.listEnvironments = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listEnvironments(request), expectedError); assert( - (client.innerApiCalls.listTasks as SinonStub) + (client.innerApiCalls.listEnvironments as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes listTasksStream without error', async () => { + it('invokes listEnvironmentsStream without error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListTasksRequest() + new protos.google.cloud.dataplex.v1.ListEnvironmentsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + generateSampleMessage( + new protos.google.cloud.dataplex.v1.Environment() + ), + generateSampleMessage( + new protos.google.cloud.dataplex.v1.Environment() + ), + generateSampleMessage( + new protos.google.cloud.dataplex.v1.Environment() + ), ]; - client.descriptors.page.listTasks.createStream = + client.descriptors.page.listEnvironments.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listTasksStream(request); + const stream = client.listEnvironmentsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.Task[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.Task) => { - responses.push(response); - }); + const responses: protos.google.cloud.dataplex.v1.Environment[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataplex.v1.Environment) => { + responses.push(response); + } + ); stream.on('end', () => { resolve(responses); }); @@ -4978,39 +6239,41 @@ describe('v1.DataplexServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listTasks.createStream as SinonStub) + (client.descriptors.page.listEnvironments.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listTasks, request) + .calledWith(client.innerApiCalls.listEnvironments, request) ); assert.strictEqual( - (client.descriptors.page.listTasks.createStream as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], + ( + client.descriptors.page.listEnvironments.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); - it('invokes listTasksStream with error', async () => { + it('invokes listEnvironmentsStream with error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListTasksRequest() + new protos.google.cloud.dataplex.v1.ListEnvironmentsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listTasks.createStream = stubPageStreamingCall( - undefined, - expectedError - ); - const stream = client.listTasksStream(request); + client.descriptors.page.listEnvironments.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listEnvironmentsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.Task[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.Task) => { - responses.push(response); - }); + const responses: protos.google.cloud.dataplex.v1.Environment[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataplex.v1.Environment) => { + responses.push(response); + } + ); stream.on('end', () => { resolve(responses); }); @@ -5020,98 +6283,107 @@ describe('v1.DataplexServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listTasks.createStream as SinonStub) + (client.descriptors.page.listEnvironments.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listTasks, request) + .calledWith(client.innerApiCalls.listEnvironments, request) ); assert.strictEqual( - (client.descriptors.page.listTasks.createStream as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], + ( + client.descriptors.page.listEnvironments.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); - it('uses async iteration with listTasks without error', async () => { + it('uses async iteration with listEnvironments without error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListTasksRequest() + new protos.google.cloud.dataplex.v1.ListEnvironmentsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + generateSampleMessage( + new protos.google.cloud.dataplex.v1.Environment() + ), + generateSampleMessage( + new protos.google.cloud.dataplex.v1.Environment() + ), + generateSampleMessage( + new protos.google.cloud.dataplex.v1.Environment() + ), ]; - client.descriptors.page.listTasks.asyncIterate = + client.descriptors.page.listEnvironments.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.dataplex.v1.ITask[] = []; - const iterable = client.listTasksAsync(request); + const responses: protos.google.cloud.dataplex.v1.IEnvironment[] = []; + const iterable = client.listEnvironmentsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listTasks.asyncIterate as SinonStub).getCall(0) - .args[1], + ( + client.descriptors.page.listEnvironments.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listTasks.asyncIterate as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], + ( + client.descriptors.page.listEnvironments.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); - it('uses async iteration with listTasks with error', async () => { + it('uses async iteration with listEnvironments with error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListTasksRequest() + new protos.google.cloud.dataplex.v1.ListEnvironmentsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listTasks.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); - const iterable = client.listTasksAsync(request); + client.descriptors.page.listEnvironments.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listEnvironmentsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.dataplex.v1.ITask[] = []; + const responses: protos.google.cloud.dataplex.v1.IEnvironment[] = []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - (client.descriptors.page.listTasks.asyncIterate as SinonStub).getCall(0) - .args[1], + ( + client.descriptors.page.listEnvironments.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listTasks.asyncIterate as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], + ( + client.descriptors.page.listEnvironments.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); }); - describe('listJobs', () => { - it('invokes listJobs without error', async () => { + describe('listSessions', () => { + it('invokes listSessions without error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListJobsRequest() + new protos.google.cloud.dataplex.v1.ListSessionsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; @@ -5123,28 +6395,28 @@ describe('v1.DataplexServiceClient', () => { }, }; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), ]; - client.innerApiCalls.listJobs = stubSimpleCall(expectedResponse); - const [response] = await client.listJobs(request); + client.innerApiCalls.listSessions = stubSimpleCall(expectedResponse); + const [response] = await client.listSessions(request); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listJobs as SinonStub) + (client.innerApiCalls.listSessions as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes listJobs without error using callback', async () => { + it('invokes listSessions without error using callback', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListJobsRequest() + new protos.google.cloud.dataplex.v1.ListSessionsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; @@ -5154,20 +6426,20 @@ describe('v1.DataplexServiceClient', () => { 'x-goog-request-params': expectedHeaderRequestParams, }, }, - }; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), ]; - client.innerApiCalls.listJobs = + client.innerApiCalls.listSessions = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listJobs( + client.listSessions( request, ( err?: Error | null, - result?: protos.google.cloud.dataplex.v1.IJob[] | null + result?: protos.google.cloud.dataplex.v1.ISession[] | null ) => { if (err) { reject(err); @@ -5180,20 +6452,20 @@ describe('v1.DataplexServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listJobs as SinonStub) + (client.innerApiCalls.listSessions as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); }); - it('invokes listJobs with error', async () => { + it('invokes listSessions with error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListJobsRequest() + new protos.google.cloud.dataplex.v1.ListSessionsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; @@ -5205,39 +6477,45 @@ describe('v1.DataplexServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.listJobs = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listJobs(request), expectedError); + client.innerApiCalls.listSessions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listSessions(request), expectedError); assert( - (client.innerApiCalls.listJobs as SinonStub) + (client.innerApiCalls.listSessions as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes listJobsStream without error', async () => { + it('invokes listSessionsStream without error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListJobsRequest() + new protos.google.cloud.dataplex.v1.ListSessionsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), ]; - client.descriptors.page.listJobs.createStream = + client.descriptors.page.listSessions.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listJobsStream(request); + const stream = client.listSessionsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.Job[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.Job) => { - responses.push(response); - }); + const responses: protos.google.cloud.dataplex.v1.Session[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataplex.v1.Session) => { + responses.push(response); + } + ); stream.on('end', () => { resolve(responses); }); @@ -5248,39 +6526,43 @@ describe('v1.DataplexServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listJobs.createStream as SinonStub) + (client.descriptors.page.listSessions.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listJobs, request) + .calledWith(client.innerApiCalls.listSessions, request) ); assert.strictEqual( - (client.descriptors.page.listJobs.createStream as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], + ( + client.descriptors.page.listSessions.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); - it('invokes listJobsStream with error', async () => { + it('invokes listSessionsStream with error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListJobsRequest() + new protos.google.cloud.dataplex.v1.ListSessionsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listJobs.createStream = stubPageStreamingCall( + client.descriptors.page.listSessions.createStream = stubPageStreamingCall( undefined, expectedError ); - const stream = client.listJobsStream(request); + const stream = client.listSessionsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.Job[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.Job) => { - responses.push(response); - }); + const responses: protos.google.cloud.dataplex.v1.Session[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataplex.v1.Session) => { + responses.push(response); + } + ); stream.on('end', () => { resolve(responses); }); @@ -5290,84 +6572,87 @@ describe('v1.DataplexServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listJobs.createStream as SinonStub) + (client.descriptors.page.listSessions.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listJobs, request) + .calledWith(client.innerApiCalls.listSessions, request) ); assert.strictEqual( - (client.descriptors.page.listJobs.createStream as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], + ( + client.descriptors.page.listSessions.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); - it('uses async iteration with listJobs without error', async () => { + it('uses async iteration with listSessions without error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListJobsRequest() + new protos.google.cloud.dataplex.v1.ListSessionsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), ]; - client.descriptors.page.listJobs.asyncIterate = + client.descriptors.page.listSessions.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.dataplex.v1.IJob[] = []; - const iterable = client.listJobsAsync(request); + const responses: protos.google.cloud.dataplex.v1.ISession[] = []; + const iterable = client.listSessionsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listJobs.asyncIterate as SinonStub).getCall(0) - .args[1], + ( + client.descriptors.page.listSessions.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listJobs.asyncIterate as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], + ( + client.descriptors.page.listSessions.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); - it('uses async iteration with listJobs with error', async () => { + it('uses async iteration with listSessions with error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListJobsRequest() + new protos.google.cloud.dataplex.v1.ListSessionsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listJobs.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); - const iterable = client.listJobsAsync(request); + client.descriptors.page.listSessions.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listSessionsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.dataplex.v1.IJob[] = []; + const responses: protos.google.cloud.dataplex.v1.ISession[] = []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - (client.descriptors.page.listJobs.asyncIterate as SinonStub).getCall(0) - .args[1], + ( + client.descriptors.page.listSessions.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listJobs.asyncIterate as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], + ( + client.descriptors.page.listSessions.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -5462,6 +6747,82 @@ describe('v1.DataplexServiceClient', () => { }); }); + describe('content', () => { + const fakePath = '/rendered/path/content'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + content: 'contentValue', + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.contentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.contentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'contentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromContentName', () => { + const result = client.matchProjectFromContentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromContentName', () => { + const result = client.matchLocationFromContentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromContentName', () => { + const result = client.matchLakeFromContentName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, 'contentValue'); + assert( + (client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('entity', () => { const fakePath = '/rendered/path/entity'; const expectedParameters = { @@ -5550,6 +6911,82 @@ describe('v1.DataplexServiceClient', () => { }); }); + describe('environment', () => { + const fakePath = '/rendered/path/environment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + environment: 'environmentValue', + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.environmentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.environmentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('environmentPath', () => { + const result = client.environmentPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'environmentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.environmentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromEnvironmentName', () => { + const result = client.matchProjectFromEnvironmentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromEnvironmentName', () => { + const result = client.matchLocationFromEnvironmentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromEnvironmentName', () => { + const result = client.matchLakeFromEnvironmentName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromEnvironmentName', () => { + const result = client.matchEnvironmentFromEnvironmentName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('job', () => { const fakePath = '/rendered/path/job'; const expectedParameters = { @@ -6186,6 +7623,94 @@ describe('v1.DataplexServiceClient', () => { }); }); + describe('session', () => { + const fakePath = '/rendered/path/session'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + environment: 'environmentValue', + session: 'sessionValue', + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.sessionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.sessionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('sessionPath', () => { + const result = client.sessionPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'environmentValue', + 'sessionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.sessionPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromSessionName', () => { + const result = client.matchProjectFromSessionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromSessionName', () => { + const result = client.matchLocationFromSessionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromSessionName', () => { + const result = client.matchLakeFromSessionName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromSessionName', () => { + const result = client.matchEnvironmentFromSessionName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSessionFromSessionName', () => { + const result = client.matchSessionFromSessionName(fakePath); + assert.strictEqual(result, 'sessionValue'); + assert( + (client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('task', () => { const fakePath = '/rendered/path/task'; const expectedParameters = { diff --git a/packages/google-cloud-dataplex/test/gapic_metadata_service_v1.ts b/packages/google-cloud-dataplex/test/gapic_metadata_service_v1.ts index 56decc46b4c..97499b0b572 100644 --- a/packages/google-cloud-dataplex/test/gapic_metadata_service_v1.ts +++ b/packages/google-cloud-dataplex/test/gapic_metadata_service_v1.ts @@ -195,6 +195,342 @@ describe('v1.MetadataServiceClient', () => { assert.strictEqual(result, fakeProjectId); }); + describe('createEntity', () => { + it('invokes createEntity without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateEntityRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Entity() + ); + client.innerApiCalls.createEntity = stubSimpleCall(expectedResponse); + const [response] = await client.createEntity(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createEntity as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createEntity without error using callback', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateEntityRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Entity() + ); + client.innerApiCalls.createEntity = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createEntity( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IEntity | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createEntity as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createEntity with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateEntityRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createEntity = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createEntity(request), expectedError); + assert( + (client.innerApiCalls.createEntity as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('updateEntity', () => { + it('invokes updateEntity without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateEntityRequest() + ); + request.entity = {}; + request.entity.name = ''; + const expectedHeaderRequestParams = 'entity.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Entity() + ); + client.innerApiCalls.updateEntity = stubSimpleCall(expectedResponse); + const [response] = await client.updateEntity(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateEntity as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateEntity without error using callback', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateEntityRequest() + ); + request.entity = {}; + request.entity.name = ''; + const expectedHeaderRequestParams = 'entity.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Entity() + ); + client.innerApiCalls.updateEntity = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateEntity( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IEntity | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateEntity as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateEntity with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateEntityRequest() + ); + request.entity = {}; + request.entity.name = ''; + const expectedHeaderRequestParams = 'entity.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateEntity = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateEntity(request), expectedError); + assert( + (client.innerApiCalls.updateEntity as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('deleteEntity', () => { + it('invokes deleteEntity without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteEntityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteEntity = stubSimpleCall(expectedResponse); + const [response] = await client.deleteEntity(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteEntity as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteEntity without error using callback', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteEntityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteEntity = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteEntity( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteEntity as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteEntity with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteEntityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteEntity = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteEntity(request), expectedError); + assert( + (client.innerApiCalls.deleteEntity as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('getEntity', () => { it('invokes getEntity without error', async () => { const client = new metadataserviceModule.v1.MetadataServiceClient({ @@ -203,7 +539,226 @@ describe('v1.MetadataServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetEntityRequest() + new protos.google.cloud.dataplex.v1.GetEntityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Entity() + ); + client.innerApiCalls.getEntity = stubSimpleCall(expectedResponse); + const [response] = await client.getEntity(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getEntity as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getEntity without error using callback', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetEntityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Entity() + ); + client.innerApiCalls.getEntity = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getEntity( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IEntity | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getEntity as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getEntity with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetEntityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getEntity = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getEntity(request), expectedError); + assert( + (client.innerApiCalls.getEntity as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('createPartition', () => { + it('invokes createPartition without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreatePartitionRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Partition() + ); + client.innerApiCalls.createPartition = stubSimpleCall(expectedResponse); + const [response] = await client.createPartition(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createPartition as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createPartition without error using callback', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreatePartitionRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Partition() + ); + client.innerApiCalls.createPartition = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createPartition( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IPartition | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createPartition as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createPartition with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreatePartitionRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createPartition = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createPartition(request), expectedError); + assert( + (client.innerApiCalls.createPartition as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('deletePartition', () => { + it('invokes deletePartition without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeletePartitionRequest() ); request.name = ''; const expectedHeaderRequestParams = 'name='; @@ -215,26 +770,26 @@ describe('v1.MetadataServiceClient', () => { }, }; const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.Entity() + new protos.google.protobuf.Empty() ); - client.innerApiCalls.getEntity = stubSimpleCall(expectedResponse); - const [response] = await client.getEntity(request); + client.innerApiCalls.deletePartition = stubSimpleCall(expectedResponse); + const [response] = await client.deletePartition(request); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.getEntity as SinonStub) + (client.innerApiCalls.deletePartition as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes getEntity without error using callback', async () => { + it('invokes deletePartition without error using callback', async () => { const client = new metadataserviceModule.v1.MetadataServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetEntityRequest() + new protos.google.cloud.dataplex.v1.DeletePartitionRequest() ); request.name = ''; const expectedHeaderRequestParams = 'name='; @@ -246,16 +801,16 @@ describe('v1.MetadataServiceClient', () => { }, }; const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.Entity() + new protos.google.protobuf.Empty() ); - client.innerApiCalls.getEntity = + client.innerApiCalls.deletePartition = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.getEntity( + client.deletePartition( request, ( err?: Error | null, - result?: protos.google.cloud.dataplex.v1.IEntity | null + result?: protos.google.protobuf.IEmpty | null ) => { if (err) { reject(err); @@ -268,20 +823,20 @@ describe('v1.MetadataServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.getEntity as SinonStub) + (client.innerApiCalls.deletePartition as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); }); - it('invokes getEntity with error', async () => { + it('invokes deletePartition with error', async () => { const client = new metadataserviceModule.v1.MetadataServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetEntityRequest() + new protos.google.cloud.dataplex.v1.DeletePartitionRequest() ); request.name = ''; const expectedHeaderRequestParams = 'name='; @@ -293,10 +848,13 @@ describe('v1.MetadataServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.getEntity = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getEntity(request), expectedError); + client.innerApiCalls.deletePartition = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deletePartition(request), expectedError); assert( - (client.innerApiCalls.getEntity as SinonStub) + (client.innerApiCalls.deletePartition as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -1067,6 +1625,82 @@ describe('v1.MetadataServiceClient', () => { }); }); + describe('content', () => { + const fakePath = '/rendered/path/content'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + content: 'contentValue', + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.contentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.contentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'contentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromContentName', () => { + const result = client.matchProjectFromContentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromContentName', () => { + const result = client.matchLocationFromContentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromContentName', () => { + const result = client.matchLakeFromContentName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, 'contentValue'); + assert( + (client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('entity', () => { const fakePath = '/rendered/path/entity'; const expectedParameters = { @@ -1155,6 +1789,82 @@ describe('v1.MetadataServiceClient', () => { }); }); + describe('environment', () => { + const fakePath = '/rendered/path/environment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + environment: 'environmentValue', + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.environmentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.environmentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('environmentPath', () => { + const result = client.environmentPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'environmentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.environmentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromEnvironmentName', () => { + const result = client.matchProjectFromEnvironmentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromEnvironmentName', () => { + const result = client.matchLocationFromEnvironmentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromEnvironmentName', () => { + const result = client.matchLakeFromEnvironmentName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromEnvironmentName', () => { + const result = client.matchEnvironmentFromEnvironmentName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('job', () => { const fakePath = '/rendered/path/job'; const expectedParameters = { @@ -1742,6 +2452,94 @@ describe('v1.MetadataServiceClient', () => { }); }); + describe('session', () => { + const fakePath = '/rendered/path/session'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + environment: 'environmentValue', + session: 'sessionValue', + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.sessionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.sessionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('sessionPath', () => { + const result = client.sessionPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'environmentValue', + 'sessionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.sessionPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromSessionName', () => { + const result = client.matchProjectFromSessionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromSessionName', () => { + const result = client.matchLocationFromSessionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromSessionName', () => { + const result = client.matchLakeFromSessionName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromSessionName', () => { + const result = client.matchEnvironmentFromSessionName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSessionFromSessionName', () => { + const result = client.matchSessionFromSessionName(fakePath); + assert.strictEqual(result, 'sessionValue'); + assert( + (client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('task', () => { const fakePath = '/rendered/path/task'; const expectedParameters = { diff --git a/packages/google-cloud-dataplex/webpack.config.js b/packages/google-cloud-dataplex/webpack.config.js index 6967b216cde..becf895bc79 100644 --- a/packages/google-cloud-dataplex/webpack.config.js +++ b/packages/google-cloud-dataplex/webpack.config.js @@ -17,8 +17,8 @@ const path = require('path'); module.exports = { entry: './src/index.ts', output: { - library: 'DataplexService', - filename: './dataplex-service.js', + library: 'ContentService', + filename: './content-service.js', }, node: { child_process: 'empty', From bb48829736f1bbeb012e05be0879174e4ddeeadd Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 16 Feb 2022 23:27:05 +0000 Subject: [PATCH 151/254] chore(main): release 1.1.0 (#12) :robot: I have created a release *beep* *boop* --- ## [1.1.0](https://github.com/googleapis/nodejs-dataplex/compare/v1.0.0...v1.1.0) (2022-02-16) ### Features * add Content APIs ([#11](https://github.com/googleapis/nodejs-dataplex/issues/11)) ([09ea109](https://github.com/googleapis/nodejs-dataplex/commit/09ea109f0e9a6edc5e6eefa345833689422785eb)) * add Create|Update|Delete Metadata APIs (e.g. Entity and/or Partition). ([09ea109](https://github.com/googleapis/nodejs-dataplex/commit/09ea109f0e9a6edc5e6eefa345833689422785eb)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-dataplex/CHANGELOG.md | 8 ++++++++ packages/google-cloud-dataplex/package.json | 2 +- packages/google-cloud-dataplex/samples/package.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-dataplex/CHANGELOG.md b/packages/google-cloud-dataplex/CHANGELOG.md index 301c4fec87f..7dceac53d21 100644 --- a/packages/google-cloud-dataplex/CHANGELOG.md +++ b/packages/google-cloud-dataplex/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [1.1.0](https://github.com/googleapis/nodejs-dataplex/compare/v1.0.0...v1.1.0) (2022-02-16) + + +### Features + +* add Content APIs ([#11](https://github.com/googleapis/nodejs-dataplex/issues/11)) ([09ea109](https://github.com/googleapis/nodejs-dataplex/commit/09ea109f0e9a6edc5e6eefa345833689422785eb)) +* add Create|Update|Delete Metadata APIs (e.g. Entity and/or Partition). ([09ea109](https://github.com/googleapis/nodejs-dataplex/commit/09ea109f0e9a6edc5e6eefa345833689422785eb)) + ## 1.0.0 (2022-02-07) diff --git a/packages/google-cloud-dataplex/package.json b/packages/google-cloud-dataplex/package.json index a9c5fed0558..eac1be48a30 100644 --- a/packages/google-cloud-dataplex/package.json +++ b/packages/google-cloud-dataplex/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/dataplex", - "version": "1.0.0", + "version": "1.1.0", "description": "dataplex client for Node.js", "repository": "googleapis/nodejs-dataplex", "license": "Apache-2.0", diff --git a/packages/google-cloud-dataplex/samples/package.json b/packages/google-cloud-dataplex/samples/package.json index ea0c0b9ef7a..1cced7f99de 100644 --- a/packages/google-cloud-dataplex/samples/package.json +++ b/packages/google-cloud-dataplex/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/dataplex": "^1.0.0" + "@google-cloud/dataplex": "^1.1.0" }, "devDependencies": { "c8": "^7.1.0", From c937f4a4d186df6945aec955af2fc59fa6442354 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 18 Feb 2022 02:00:48 +0000 Subject: [PATCH 152/254] docs(samples): include metadata file, add exclusions for samples to handwritten libraries (#106) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 429395631 Source-Link: https://github.com/googleapis/googleapis/commit/84594b35af0c38efcd6967e8179d801702ad96ff Source-Link: https://github.com/googleapis/googleapis-gen/commit/ed74f970fd82914874e6b27b04763cfa66bafe9b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWQ3NGY5NzBmZDgyOTE0ODc0ZTZiMjdiMDQ3NjNjZmE2NmJhZmU5YiJ9 --- .../v1/iam_checker.troubleshoot_iam_policy.js | 9 ++- ....google.cloud.policytroubleshooter.v1.json | 55 +++++++++++++++++++ .../src/v1/iam_checker_client.ts | 5 +- .../test/gapic_iam_checker_v1.ts | 36 +++++++++++- 4 files changed, 98 insertions(+), 7 deletions(-) create mode 100644 packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata.google.cloud.policytroubleshooter.v1.json diff --git a/packages/google-cloud-policytroubleshooter/samples/generated/v1/iam_checker.troubleshoot_iam_policy.js b/packages/google-cloud-policytroubleshooter/samples/generated/v1/iam_checker.troubleshoot_iam_policy.js index 82676c5b5c6..6206ea3e548 100644 --- a/packages/google-cloud-policytroubleshooter/samples/generated/v1/iam_checker.troubleshoot_iam_policy.js +++ b/packages/google-cloud-policytroubleshooter/samples/generated/v1/iam_checker.troubleshoot_iam_policy.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata.google.cloud.policytroubleshooter.v1.json b/packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata.google.cloud.policytroubleshooter.v1.json new file mode 100644 index 00000000000..4f4183725eb --- /dev/null +++ b/packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata.google.cloud.policytroubleshooter.v1.json @@ -0,0 +1,55 @@ +{ + "clientLibrary": { + "name": "nodejs-policytroubleshooter", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.policytroubleshooter.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "policytroubleshooter_v1_generated_IamChecker_TroubleshootIamPolicy_async", + "title": "IamChecker troubleshootIamPolicy Sample", + "origin": "API_DEFINITION", + "description": " Checks whether a member has a specific permission for a specific resource, and explains why the member does or does not have that permission.", + "canonical": true, + "file": "iam_checker.troubleshoot_iam_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "TroubleshootIamPolicy", + "fullName": "google.cloud.policytroubleshooter.v1.IamChecker.TroubleshootIamPolicy", + "async": true, + "parameters": [ + { + "name": "access_tuple", + "type": ".google.cloud.policytroubleshooter.v1.AccessTuple" + } + ], + "resultType": ".google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse", + "client": { + "shortName": "IamCheckerClient", + "fullName": "google.cloud.policytroubleshooter.v1.IamCheckerClient" + }, + "method": { + "shortName": "TroubleshootIamPolicy", + "fullName": "google.cloud.policytroubleshooter.v1.IamChecker.TroubleshootIamPolicy", + "service": { + "shortName": "IamChecker", + "fullName": "google.cloud.policytroubleshooter.v1.IamChecker" + } + } + } + } + ] +} diff --git a/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts b/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts index 6df1fdd1996..6623db13b1d 100644 --- a/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts +++ b/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts @@ -386,9 +386,8 @@ export class IamCheckerClient { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.iamCheckerStub!.then(stub => { + if (this.iamCheckerStub && !this._terminated) { + return this.iamCheckerStub.then(stub => { this._terminated = true; stub.close(); }); diff --git a/packages/google-cloud-policytroubleshooter/test/gapic_iam_checker_v1.ts b/packages/google-cloud-policytroubleshooter/test/gapic_iam_checker_v1.ts index fbd7f64d1eb..884da56d4fb 100644 --- a/packages/google-cloud-policytroubleshooter/test/gapic_iam_checker_v1.ts +++ b/packages/google-cloud-policytroubleshooter/test/gapic_iam_checker_v1.ts @@ -88,12 +88,27 @@ describe('v1.IamCheckerClient', () => { assert(client.iamCheckerStub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new iamcheckerModule.v1.IamCheckerClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.close(); + client.initialize(); + assert(client.iamCheckerStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new iamcheckerModule.v1.IamCheckerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.iamCheckerStub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -219,5 +234,22 @@ describe('v1.IamCheckerClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes troubleshootIamPolicy with closed client', async () => { + const client = new iamcheckerModule.v1.IamCheckerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.troubleshootIamPolicy(request), + expectedError + ); + }); }); }); From f78a6bbb3a635e7021ca47ca0b480139960a8fe2 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 18 Feb 2022 02:01:00 +0000 Subject: [PATCH 153/254] docs(samples): include metadata file, add exclusions for samples to handwritten libraries (#55) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 429395631 Source-Link: https://github.com/googleapis/googleapis/commit/84594b35af0c38efcd6967e8179d801702ad96ff Source-Link: https://github.com/googleapis/googleapis-gen/commit/ed74f970fd82914874e6b27b04763cfa66bafe9b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWQ3NGY5NzBmZDgyOTE0ODc0ZTZiMjdiMDQ3NjNjZmE2NmJhZmU5YiJ9 --- .../gateway_service.delete_resource.js | 9 +- .../v1beta1/gateway_service.get_resource.js | 9 +- .../v1beta1/gateway_service.patch_resource.js | 9 +- .../v1beta1/gateway_service.post_resource.js | 9 +- .../v1beta1/gateway_service.put_resource.js | 9 +- ...ogle.cloud.gkeconnect.gateway.v1beta1.json | 255 ++++++++++++++++++ .../src/v1beta1/gateway_service_client.ts | 5 +- .../test/gapic_gateway_service_v1beta1.ts | 79 +++++- 8 files changed, 369 insertions(+), 15 deletions(-) create mode 100644 packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/snippet_metadata.google.cloud.gkeconnect.gateway.v1beta1.json diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.delete_resource.js b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.delete_resource.js index efc3f9de82f..175c0b63c30 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.delete_resource.js +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.delete_resource.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.get_resource.js b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.get_resource.js index 785db18697b..0fa94673477 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.get_resource.js +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.get_resource.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.patch_resource.js b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.patch_resource.js index ce00bce9d93..b317496df66 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.patch_resource.js +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.patch_resource.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.post_resource.js b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.post_resource.js index 530e6f22a87..e707127b774 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.post_resource.js +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.post_resource.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.put_resource.js b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.put_resource.js index bb7b27c6348..2326f91bdca 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.put_resource.js +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.put_resource.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/snippet_metadata.google.cloud.gkeconnect.gateway.v1beta1.json b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/snippet_metadata.google.cloud.gkeconnect.gateway.v1beta1.json new file mode 100644 index 00000000000..e326d26df55 --- /dev/null +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/snippet_metadata.google.cloud.gkeconnect.gateway.v1beta1.json @@ -0,0 +1,255 @@ +{ + "clientLibrary": { + "name": "nodejs-gateway", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.gkeconnect.gateway.v1beta1", + "version": "v1beta1" + } + ] + }, + "snippets": [ + { + "regionTag": "connectgateway_v1beta1_generated_GatewayService_GetResource_async", + "title": "GatewayService getResource Sample", + "origin": "API_DEFINITION", + "description": " GetResource performs an HTTP GET request on the Kubernetes API Server.", + "canonical": true, + "file": "gateway_service.get_resource.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetResource", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.GetResource", + "async": true, + "parameters": [ + { + "name": "content_type", + "type": "TYPE_STRING" + }, + { + "name": "data", + "type": "TYPE_BYTES" + }, + { + "name": "extensions", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.api.HttpBody", + "client": { + "shortName": "GatewayServiceClient", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayServiceClient" + }, + "method": { + "shortName": "GetResource", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.GetResource", + "service": { + "shortName": "GatewayService", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService" + } + } + } + }, + { + "regionTag": "connectgateway_v1beta1_generated_GatewayService_PostResource_async", + "title": "GatewayService postResource Sample", + "origin": "API_DEFINITION", + "description": " PostResource performs an HTTP POST on the Kubernetes API Server.", + "canonical": true, + "file": "gateway_service.post_resource.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "PostResource", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.PostResource", + "async": true, + "parameters": [ + { + "name": "content_type", + "type": "TYPE_STRING" + }, + { + "name": "data", + "type": "TYPE_BYTES" + }, + { + "name": "extensions", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.api.HttpBody", + "client": { + "shortName": "GatewayServiceClient", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayServiceClient" + }, + "method": { + "shortName": "PostResource", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.PostResource", + "service": { + "shortName": "GatewayService", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService" + } + } + } + }, + { + "regionTag": "connectgateway_v1beta1_generated_GatewayService_DeleteResource_async", + "title": "GatewayService deleteResource Sample", + "origin": "API_DEFINITION", + "description": " DeleteResource performs an HTTP DELETE on the Kubernetes API Server.", + "canonical": true, + "file": "gateway_service.delete_resource.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteResource", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.DeleteResource", + "async": true, + "parameters": [ + { + "name": "content_type", + "type": "TYPE_STRING" + }, + { + "name": "data", + "type": "TYPE_BYTES" + }, + { + "name": "extensions", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.api.HttpBody", + "client": { + "shortName": "GatewayServiceClient", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayServiceClient" + }, + "method": { + "shortName": "DeleteResource", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.DeleteResource", + "service": { + "shortName": "GatewayService", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService" + } + } + } + }, + { + "regionTag": "connectgateway_v1beta1_generated_GatewayService_PutResource_async", + "title": "GatewayService putResource Sample", + "origin": "API_DEFINITION", + "description": " PutResource performs an HTTP PUT on the Kubernetes API Server.", + "canonical": true, + "file": "gateway_service.put_resource.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "PutResource", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.PutResource", + "async": true, + "parameters": [ + { + "name": "content_type", + "type": "TYPE_STRING" + }, + { + "name": "data", + "type": "TYPE_BYTES" + }, + { + "name": "extensions", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.api.HttpBody", + "client": { + "shortName": "GatewayServiceClient", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayServiceClient" + }, + "method": { + "shortName": "PutResource", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.PutResource", + "service": { + "shortName": "GatewayService", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService" + } + } + } + }, + { + "regionTag": "connectgateway_v1beta1_generated_GatewayService_PatchResource_async", + "title": "GatewayService patchResource Sample", + "origin": "API_DEFINITION", + "description": " PatchResource performs an HTTP PATCH on the Kubernetes API Server.", + "canonical": true, + "file": "gateway_service.patch_resource.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "PatchResource", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.PatchResource", + "async": true, + "parameters": [ + { + "name": "content_type", + "type": "TYPE_STRING" + }, + { + "name": "data", + "type": "TYPE_BYTES" + }, + { + "name": "extensions", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.api.HttpBody", + "client": { + "shortName": "GatewayServiceClient", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayServiceClient" + }, + "method": { + "shortName": "PatchResource", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.PatchResource", + "service": { + "shortName": "GatewayService", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService" + } + } + } + } + ] +} diff --git a/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts b/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts index 2eadc1d29f6..95f66c072b8 100644 --- a/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts +++ b/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts @@ -720,9 +720,8 @@ export class GatewayServiceClient { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.gatewayServiceStub!.then(stub => { + if (this.gatewayServiceStub && !this._terminated) { + return this.gatewayServiceStub.then(stub => { this._terminated = true; stub.close(); }); diff --git a/packages/google-cloud-gkeconnect-gateway/test/gapic_gateway_service_v1beta1.ts b/packages/google-cloud-gkeconnect-gateway/test/gapic_gateway_service_v1beta1.ts index 8dac7c810b7..41665ef55d6 100644 --- a/packages/google-cloud-gkeconnect-gateway/test/gapic_gateway_service_v1beta1.ts +++ b/packages/google-cloud-gkeconnect-gateway/test/gapic_gateway_service_v1beta1.ts @@ -90,12 +90,27 @@ describe('v1beta1.GatewayServiceClient', () => { assert(client.gatewayServiceStub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new gatewayserviceModule.v1beta1.GatewayServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.close(); + client.initialize(); + assert(client.gatewayServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new gatewayserviceModule.v1beta1.GatewayServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.gatewayServiceStub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -208,6 +223,18 @@ describe('v1beta1.GatewayServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getResource with closed client', async () => { + const client = new gatewayserviceModule.v1beta1.GatewayServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.api.HttpBody()); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getResource(request), expectedError); + }); }); describe('postResource', () => { @@ -286,6 +313,18 @@ describe('v1beta1.GatewayServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes postResource with closed client', async () => { + const client = new gatewayserviceModule.v1beta1.GatewayServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.api.HttpBody()); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.postResource(request), expectedError); + }); }); describe('deleteResource', () => { @@ -364,6 +403,18 @@ describe('v1beta1.GatewayServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deleteResource with closed client', async () => { + const client = new gatewayserviceModule.v1beta1.GatewayServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.api.HttpBody()); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteResource(request), expectedError); + }); }); describe('putResource', () => { @@ -442,6 +493,18 @@ describe('v1beta1.GatewayServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes putResource with closed client', async () => { + const client = new gatewayserviceModule.v1beta1.GatewayServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.api.HttpBody()); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.putResource(request), expectedError); + }); }); describe('patchResource', () => { @@ -520,5 +583,17 @@ describe('v1beta1.GatewayServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes patchResource with closed client', async () => { + const client = new gatewayserviceModule.v1beta1.GatewayServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage(new protos.google.api.HttpBody()); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.patchResource(request), expectedError); + }); }); }); From bd546df99eb39e4d89c9d93069d6383547b46721 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 18 Feb 2022 02:04:55 +0000 Subject: [PATCH 154/254] docs(samples): include metadata file, add exclusions for samples to handwritten libraries (#31) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 429395631 Source-Link: https://github.com/googleapis/googleapis/commit/84594b35af0c38efcd6967e8179d801702ad96ff Source-Link: https://github.com/googleapis/googleapis-gen/commit/ed74f970fd82914874e6b27b04763cfa66bafe9b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWQ3NGY5NzBmZDgyOTE0ODc0ZTZiMjdiMDQ3NjNjZmE2NmJhZmU5YiJ9 --- .../v1/cloud_deploy.approve_rollout.js | 9 +- .../cloud_deploy.create_delivery_pipeline.js | 9 +- .../v1/cloud_deploy.create_release.js | 9 +- .../v1/cloud_deploy.create_rollout.js | 9 +- .../v1/cloud_deploy.create_target.js | 9 +- .../cloud_deploy.delete_delivery_pipeline.js | 9 +- .../v1/cloud_deploy.delete_target.js | 9 +- .../generated/v1/cloud_deploy.get_config.js | 9 +- .../v1/cloud_deploy.get_delivery_pipeline.js | 9 +- .../generated/v1/cloud_deploy.get_release.js | 9 +- .../generated/v1/cloud_deploy.get_rollout.js | 9 +- .../generated/v1/cloud_deploy.get_target.js | 9 +- .../cloud_deploy.list_delivery_pipelines.js | 9 +- .../v1/cloud_deploy.list_releases.js | 9 +- .../v1/cloud_deploy.list_rollouts.js | 9 +- .../generated/v1/cloud_deploy.list_targets.js | 9 +- .../cloud_deploy.update_delivery_pipeline.js | 9 +- .../v1/cloud_deploy.update_target.js | 9 +- ...ippet_metadata.google.cloud.deploy.v1.json | 935 ++++++++++++++++++ .../src/v1/cloud_deploy_client.ts | 5 +- .../test/gapic_cloud_deploy_v1.ts | 115 ++- 21 files changed, 1176 insertions(+), 41 deletions(-) create mode 100644 packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.approve_rollout.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.approve_rollout.js index 44dcda6e1a7..1f974d6911a 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.approve_rollout.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.approve_rollout.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js index c0c039a830e..eb65c284a08 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_release.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_release.js index 8a26f9fb03b..36053ee4611 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_release.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_release.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_rollout.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_rollout.js index 360433d1e20..a9625ceb710 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_rollout.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_rollout.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_target.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_target.js index 600c8f47a67..744e4f37698 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_target.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_target.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js index 945f997f12d..7901a961a23 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_target.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_target.js index c31e61bde65..b21c995b394 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_target.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_target.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_config.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_config.js index 5b62830c0df..26cc2632ca4 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_config.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_config.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_delivery_pipeline.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_delivery_pipeline.js index e56bd3fb9bb..2ba4d0b906f 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_delivery_pipeline.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_delivery_pipeline.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_release.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_release.js index 16a68b5e91c..4401fabdb5d 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_release.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_release.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_rollout.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_rollout.js index 5074cb1b92d..434c0e4ecc1 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_rollout.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_rollout.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_target.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_target.js index 608c0279ae3..075d179db0a 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_target.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_target.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js index cf4745f3900..8e151552b10 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_releases.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_releases.js index 009fb644915..40505734af7 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_releases.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_releases.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_rollouts.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_rollouts.js index 8f25061073c..303cc8c0111 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_rollouts.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_rollouts.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_targets.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_targets.js index 1ce2ea1140e..7fcabb476de 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_targets.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_targets.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js index c676b52e7dd..19e8637291c 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_target.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_target.js index 733f9288e45..f49504f3fe4 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_target.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_target.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json b/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json new file mode 100644 index 00000000000..a5461a41d08 --- /dev/null +++ b/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json @@ -0,0 +1,935 @@ +{ + "clientLibrary": { + "name": "nodejs-deploy", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.deploy.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_ListDeliveryPipelines_async", + "title": "CloudDeploy listDeliveryPipelines Sample", + "origin": "API_DEFINITION", + "description": " Lists DeliveryPipelines in a given project and location.", + "canonical": true, + "file": "cloud_deploy.list_delivery_pipelines.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDeliveryPipelines", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ListDeliveryPipelines", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.ListDeliveryPipelinesResponse", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "ListDeliveryPipelines", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ListDeliveryPipelines", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_GetDeliveryPipeline_async", + "title": "CloudDeploy getDeliveryPipeline Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single DeliveryPipeline.", + "canonical": true, + "file": "cloud_deploy.get_delivery_pipeline.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetDeliveryPipeline", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetDeliveryPipeline", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.DeliveryPipeline", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "GetDeliveryPipeline", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetDeliveryPipeline", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_CreateDeliveryPipeline_async", + "title": "CloudDeploy createDeliveryPipeline Sample", + "origin": "API_DEFINITION", + "description": " Creates a new DeliveryPipeline in a given project and location.", + "canonical": true, + "file": "cloud_deploy.create_delivery_pipeline.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 81, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateDeliveryPipeline", + "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateDeliveryPipeline", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "delivery_pipeline_id", + "type": "TYPE_STRING" + }, + { + "name": "delivery_pipeline", + "type": ".google.cloud.deploy.v1.DeliveryPipeline" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "CreateDeliveryPipeline", + "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateDeliveryPipeline", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_UpdateDeliveryPipeline_async", + "title": "CloudDeploy updateDeliveryPipeline Sample", + "origin": "API_DEFINITION", + "description": " Updates the parameters of a single DeliveryPipeline.", + "canonical": true, + "file": "cloud_deploy.update_delivery_pipeline.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 84, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateDeliveryPipeline", + "fullName": "google.cloud.deploy.v1.CloudDeploy.UpdateDeliveryPipeline", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "delivery_pipeline", + "type": ".google.cloud.deploy.v1.DeliveryPipeline" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "UpdateDeliveryPipeline", + "fullName": "google.cloud.deploy.v1.CloudDeploy.UpdateDeliveryPipeline", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_DeleteDeliveryPipeline_async", + "title": "CloudDeploy deleteDeliveryPipeline Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single DeliveryPipeline.", + "canonical": true, + "file": "cloud_deploy.delete_delivery_pipeline.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 88, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteDeliveryPipeline", + "fullName": "google.cloud.deploy.v1.CloudDeploy.DeleteDeliveryPipeline", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + }, + { + "name": "force", + "type": "TYPE_BOOL" + }, + { + "name": "etag", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "DeleteDeliveryPipeline", + "fullName": "google.cloud.deploy.v1.CloudDeploy.DeleteDeliveryPipeline", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_ListTargets_async", + "title": "CloudDeploy listTargets Sample", + "origin": "API_DEFINITION", + "description": " Lists Targets in a given project and location.", + "canonical": true, + "file": "cloud_deploy.list_targets.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListTargets", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ListTargets", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.ListTargetsResponse", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "ListTargets", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ListTargets", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_GetTarget_async", + "title": "CloudDeploy getTarget Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single Target.", + "canonical": true, + "file": "cloud_deploy.get_target.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetTarget", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetTarget", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.Target", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "GetTarget", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetTarget", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_CreateTarget_async", + "title": "CloudDeploy createTarget Sample", + "origin": "API_DEFINITION", + "description": " Creates a new Target in a given project and location.", + "canonical": true, + "file": "cloud_deploy.create_target.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 82, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateTarget", + "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateTarget", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "target_id", + "type": "TYPE_STRING" + }, + { + "name": "target", + "type": ".google.cloud.deploy.v1.Target" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "CreateTarget", + "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateTarget", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_UpdateTarget_async", + "title": "CloudDeploy updateTarget Sample", + "origin": "API_DEFINITION", + "description": " Updates the parameters of a single Target.", + "canonical": true, + "file": "cloud_deploy.update_target.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 84, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateTarget", + "fullName": "google.cloud.deploy.v1.CloudDeploy.UpdateTarget", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "target", + "type": ".google.cloud.deploy.v1.Target" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "UpdateTarget", + "fullName": "google.cloud.deploy.v1.CloudDeploy.UpdateTarget", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_DeleteTarget_async", + "title": "CloudDeploy deleteTarget Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single Target.", + "canonical": true, + "file": "cloud_deploy.delete_target.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 82, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteTarget", + "fullName": "google.cloud.deploy.v1.CloudDeploy.DeleteTarget", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + }, + { + "name": "etag", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "DeleteTarget", + "fullName": "google.cloud.deploy.v1.CloudDeploy.DeleteTarget", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_ListReleases_async", + "title": "CloudDeploy listReleases Sample", + "origin": "API_DEFINITION", + "description": " Lists Releases in a given project and location.", + "canonical": true, + "file": "cloud_deploy.list_releases.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListReleases", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ListReleases", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.ListReleasesResponse", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "ListReleases", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ListReleases", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_GetRelease_async", + "title": "CloudDeploy getRelease Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single Release.", + "canonical": true, + "file": "cloud_deploy.get_release.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetRelease", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetRelease", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.Release", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "GetRelease", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetRelease", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_CreateRelease_async", + "title": "CloudDeploy createRelease Sample", + "origin": "API_DEFINITION", + "description": " Creates a new Release in a given project and location.", + "canonical": true, + "file": "cloud_deploy.create_release.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 82, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateRelease", + "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateRelease", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "release_id", + "type": "TYPE_STRING" + }, + { + "name": "release", + "type": ".google.cloud.deploy.v1.Release" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "CreateRelease", + "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateRelease", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_ApproveRollout_async", + "title": "CloudDeploy approveRollout Sample", + "origin": "API_DEFINITION", + "description": " Approves a Rollout.", + "canonical": true, + "file": "cloud_deploy.approve_rollout.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ApproveRollout", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ApproveRollout", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "approved", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.deploy.v1.ApproveRolloutResponse", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "ApproveRollout", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ApproveRollout", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_ListRollouts_async", + "title": "CloudDeploy listRollouts Sample", + "origin": "API_DEFINITION", + "description": " Lists Rollouts in a given project and location.", + "canonical": true, + "file": "cloud_deploy.list_rollouts.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListRollouts", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ListRollouts", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.ListRolloutsResponse", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "ListRollouts", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ListRollouts", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_GetRollout_async", + "title": "CloudDeploy getRollout Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single Rollout.", + "canonical": true, + "file": "cloud_deploy.get_rollout.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetRollout", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetRollout", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.Rollout", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "GetRollout", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetRollout", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_CreateRollout_async", + "title": "CloudDeploy createRollout Sample", + "origin": "API_DEFINITION", + "description": " Creates a new Rollout in a given project and location.", + "canonical": true, + "file": "cloud_deploy.create_rollout.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 82, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateRollout", + "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateRollout", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "rollout_id", + "type": "TYPE_STRING" + }, + { + "name": "rollout", + "type": ".google.cloud.deploy.v1.Rollout" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "CreateRollout", + "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateRollout", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_GetConfig_async", + "title": "CloudDeploy getConfig Sample", + "origin": "API_DEFINITION", + "description": " Gets the configuration for a location.", + "canonical": true, + "file": "cloud_deploy.get_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetConfig", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetConfig", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.Config", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "GetConfig", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetConfig", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + } + ] +} diff --git a/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts b/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts index 5e588c3bca7..b653dd3e2b7 100644 --- a/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts +++ b/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts @@ -3707,9 +3707,8 @@ export class CloudDeployClient { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.cloudDeployStub!.then(stub => { + if (this.cloudDeployStub && !this._terminated) { + return this.cloudDeployStub.then(stub => { this._terminated = true; stub.close(); this.operationsClient.close(); diff --git a/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts b/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts index 7bf386774fb..6cfc96623f1 100644 --- a/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts +++ b/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts @@ -183,12 +183,27 @@ describe('v1.CloudDeployClient', () => { assert(client.cloudDeployStub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.close(); + client.initialize(); + assert(client.cloudDeployStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.cloudDeployStub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -335,6 +350,22 @@ describe('v1.CloudDeployClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getDeliveryPipeline with closed client', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetDeliveryPipelineRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getDeliveryPipeline(request), expectedError); + }); }); describe('getTarget', () => { @@ -443,6 +474,22 @@ describe('v1.CloudDeployClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getTarget with closed client', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetTargetRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getTarget(request), expectedError); + }); }); describe('getRelease', () => { @@ -554,6 +601,22 @@ describe('v1.CloudDeployClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getRelease with closed client', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetReleaseRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getRelease(request), expectedError); + }); }); describe('approveRollout', () => { @@ -665,6 +728,22 @@ describe('v1.CloudDeployClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes approveRollout with closed client', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ApproveRolloutRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.approveRollout(request), expectedError); + }); }); describe('getRollout', () => { @@ -776,6 +855,22 @@ describe('v1.CloudDeployClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getRollout with closed client', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetRolloutRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getRollout(request), expectedError); + }); }); describe('getConfig', () => { @@ -884,6 +979,22 @@ describe('v1.CloudDeployClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getConfig with closed client', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetConfigRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getConfig(request), expectedError); + }); }); describe('createDeliveryPipeline', () => { From 803238386eb7b0ca565075708238380c469333c7 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 18 Feb 2022 02:04:55 +0000 Subject: [PATCH 155/254] docs(samples): include metadata file, add exclusions for samples to handwritten libraries (#13) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 429395631 Source-Link: https://github.com/googleapis/googleapis/commit/84594b35af0c38efcd6967e8179d801702ad96ff Source-Link: https://github.com/googleapis/googleapis-gen/commit/ed74f970fd82914874e6b27b04763cfa66bafe9b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWQ3NGY5NzBmZDgyOTE0ODc0ZTZiMjdiMDQ3NjNjZmE2NmJhZmU5YiJ9 --- .../v1/content_service.create_content.js | 9 +- .../v1/content_service.delete_content.js | 9 +- .../v1/content_service.get_content.js | 9 +- .../v1/content_service.list_content.js | 9 +- .../v1/content_service.update_content.js | 9 +- .../v1/dataplex_service.cancel_job.js | 9 +- .../v1/dataplex_service.create_asset.js | 9 +- .../v1/dataplex_service.create_environment.js | 9 +- .../v1/dataplex_service.create_lake.js | 9 +- .../v1/dataplex_service.create_task.js | 9 +- .../v1/dataplex_service.create_zone.js | 9 +- .../v1/dataplex_service.delete_asset.js | 9 +- .../v1/dataplex_service.delete_environment.js | 9 +- .../v1/dataplex_service.delete_lake.js | 9 +- .../v1/dataplex_service.delete_task.js | 9 +- .../v1/dataplex_service.delete_zone.js | 9 +- .../v1/dataplex_service.get_asset.js | 9 +- .../v1/dataplex_service.get_environment.js | 9 +- .../generated/v1/dataplex_service.get_job.js | 9 +- .../generated/v1/dataplex_service.get_lake.js | 9 +- .../generated/v1/dataplex_service.get_task.js | 9 +- .../generated/v1/dataplex_service.get_zone.js | 9 +- .../v1/dataplex_service.list_asset_actions.js | 9 +- .../v1/dataplex_service.list_assets.js | 9 +- .../v1/dataplex_service.list_environments.js | 9 +- .../v1/dataplex_service.list_jobs.js | 9 +- .../v1/dataplex_service.list_lake_actions.js | 9 +- .../v1/dataplex_service.list_lakes.js | 9 +- .../v1/dataplex_service.list_sessions.js | 9 +- .../v1/dataplex_service.list_tasks.js | 9 +- .../v1/dataplex_service.list_zone_actions.js | 9 +- .../v1/dataplex_service.list_zones.js | 9 +- .../v1/dataplex_service.update_asset.js | 9 +- .../v1/dataplex_service.update_environment.js | 9 +- .../v1/dataplex_service.update_lake.js | 9 +- .../v1/dataplex_service.update_task.js | 9 +- .../v1/dataplex_service.update_zone.js | 9 +- .../v1/metadata_service.create_entity.js | 9 +- .../v1/metadata_service.create_partition.js | 9 +- .../v1/metadata_service.delete_entity.js | 9 +- .../v1/metadata_service.delete_partition.js | 9 +- .../v1/metadata_service.get_entity.js | 9 +- .../v1/metadata_service.get_partition.js | 9 +- .../v1/metadata_service.list_entities.js | 9 +- .../v1/metadata_service.list_partitions.js | 9 +- .../v1/metadata_service.update_entity.js | 9 +- ...pet_metadata.google.cloud.dataplex.v1.json | 2167 +++++++++++++++++ .../src/v1/content_service_client.ts | 5 +- .../src/v1/dataplex_service_client.ts | 5 +- .../src/v1/metadata_service_client.ts | 5 +- .../test/gapic_content_service_v1.ts | 84 +- .../test/gapic_dataplex_service_v1.ts | 131 +- .../test/gapic_metadata_service_v1.ts | 132 +- 53 files changed, 2836 insertions(+), 107 deletions(-) create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json diff --git a/packages/google-cloud-dataplex/samples/generated/v1/content_service.create_content.js b/packages/google-cloud-dataplex/samples/generated/v1/content_service.create_content.js index 812254c5ff4..ea0b0bea127 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/content_service.create_content.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/content_service.create_content.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/content_service.delete_content.js b/packages/google-cloud-dataplex/samples/generated/v1/content_service.delete_content.js index 6b079eff400..fcfd8557fc5 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/content_service.delete_content.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/content_service.delete_content.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/content_service.get_content.js b/packages/google-cloud-dataplex/samples/generated/v1/content_service.get_content.js index 3a91031cb01..f764da78cf3 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/content_service.get_content.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/content_service.get_content.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/content_service.list_content.js b/packages/google-cloud-dataplex/samples/generated/v1/content_service.list_content.js index 3b9837c11f5..b2d9b3012cf 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/content_service.list_content.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/content_service.list_content.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/content_service.update_content.js b/packages/google-cloud-dataplex/samples/generated/v1/content_service.update_content.js index d62ad3ed272..ec422bd66dc 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/content_service.update_content.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/content_service.update_content.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.cancel_job.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.cancel_job.js index 571a9e7d004..23751532a41 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.cancel_job.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.cancel_job.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_asset.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_asset.js index 9f6b6fe17dc..a86586e13d1 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_asset.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_asset.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_environment.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_environment.js index 8b3fd3f1088..200ca0e2ae1 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_environment.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_environment.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_lake.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_lake.js index 2a220f4f5ae..8d861479ac7 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_lake.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_lake.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_task.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_task.js index 3a1d0f39baf..c5fc710ee7f 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_task.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_task.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_zone.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_zone.js index fa5a28f442c..d97fbd3f8ce 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_zone.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_zone.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_asset.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_asset.js index 34d11856550..9123efaab5e 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_asset.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_asset.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_environment.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_environment.js index b435e84064c..a69276fa96f 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_environment.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_environment.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_lake.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_lake.js index 108970521fe..801282553f6 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_lake.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_lake.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_task.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_task.js index c50e0e9f176..1d9f516fa4c 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_task.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_task.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_zone.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_zone.js index b82b3de916f..7119523710a 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_zone.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_zone.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_asset.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_asset.js index ee6bc13b0e4..c53e3d0b7e8 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_asset.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_asset.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_environment.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_environment.js index 58c1880d7bd..deb017ff68e 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_environment.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_environment.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_job.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_job.js index 92512f727cc..387b871eef6 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_job.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_job.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_lake.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_lake.js index dca3aad3666..5d16908eef0 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_lake.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_lake.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_task.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_task.js index 2ec07de5925..2a3a831d1d7 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_task.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_task.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_zone.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_zone.js index 79cb650b73a..578f2e6d29d 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_zone.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_zone.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_asset_actions.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_asset_actions.js index db2dd765c8a..c000841dc75 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_asset_actions.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_asset_actions.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_assets.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_assets.js index c6622647c4c..832ea7f92ed 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_assets.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_assets.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_environments.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_environments.js index 64167f857bb..5b2414766fe 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_environments.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_environments.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_jobs.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_jobs.js index edef9580927..fbadfe5df23 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_jobs.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_jobs.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lake_actions.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lake_actions.js index ebf6bcd4aaf..7f62261c7b7 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lake_actions.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lake_actions.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lakes.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lakes.js index 0c9b5b51d3d..c0663d5ff04 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lakes.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lakes.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_sessions.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_sessions.js index b8f215df097..66b3b38cc26 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_sessions.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_sessions.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_tasks.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_tasks.js index a52d7c8d820..543cc975515 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_tasks.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_tasks.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zone_actions.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zone_actions.js index f1eb3d166e7..43c286aedf8 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zone_actions.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zone_actions.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zones.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zones.js index 7d439497c8f..8bb2e9385e6 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zones.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zones.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_asset.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_asset.js index 88a58559c22..8c487e03abe 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_asset.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_asset.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_environment.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_environment.js index c397cc3b300..785a5321d67 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_environment.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_environment.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_lake.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_lake.js index d4fb25c6bfe..f95b7d70e40 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_lake.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_lake.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_task.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_task.js index e6de0b6d2d2..b839272f3bf 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_task.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_task.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_zone.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_zone.js index 6243dd9f770..7b9c53f740b 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_zone.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_zone.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.create_entity.js b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.create_entity.js index 106b439b5be..0383927d8c5 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.create_entity.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.create_entity.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.create_partition.js b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.create_partition.js index 7356d100e14..c4e18644908 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.create_partition.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.create_partition.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.delete_entity.js b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.delete_entity.js index 4f6299f6c82..c3bfc47340a 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.delete_entity.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.delete_entity.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.delete_partition.js b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.delete_partition.js index 67a30f7cd65..2a99d9720a8 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.delete_partition.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.delete_partition.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_entity.js b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_entity.js index 1dcf6ebecfc..88e563fd11a 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_entity.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_entity.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_partition.js b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_partition.js index a9aa2366736..e10c8834d86 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_partition.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_partition.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_entities.js b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_entities.js index 32394b6a8a3..3606de8c730 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_entities.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_entities.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_partitions.js b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_partitions.js index 0d3ac79c32c..b6fb79daa94 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_partitions.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_partitions.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.update_entity.js b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.update_entity.js index 7fcbec4a7a7..5096d58c95a 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.update_entity.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.update_entity.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // 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 +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json b/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json new file mode 100644 index 00000000000..4dc356f23f9 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json @@ -0,0 +1,2167 @@ +{ + "clientLibrary": { + "name": "nodejs-dataplex", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.dataplex.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "dataplex_v1_generated_ContentService_CreateContent_async", + "title": "ContentService createContent Sample", + "origin": "API_DEFINITION", + "description": " Create a content.", + "canonical": true, + "file": "content_service.create_content.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateContent", + "fullName": "google.cloud.dataplex.v1.ContentService.CreateContent", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "content", + "type": ".google.cloud.dataplex.v1.Content" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.dataplex.v1.Content", + "client": { + "shortName": "ContentServiceClient", + "fullName": "google.cloud.dataplex.v1.ContentServiceClient" + }, + "method": { + "shortName": "CreateContent", + "fullName": "google.cloud.dataplex.v1.ContentService.CreateContent", + "service": { + "shortName": "ContentService", + "fullName": "google.cloud.dataplex.v1.ContentService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_ContentService_UpdateContent_async", + "title": "ContentService updateContent Sample", + "origin": "API_DEFINITION", + "description": " Update a content. Only supports full resource update.", + "canonical": true, + "file": "content_service.update_content.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateContent", + "fullName": "google.cloud.dataplex.v1.ContentService.UpdateContent", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "content", + "type": ".google.cloud.dataplex.v1.Content" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.dataplex.v1.Content", + "client": { + "shortName": "ContentServiceClient", + "fullName": "google.cloud.dataplex.v1.ContentServiceClient" + }, + "method": { + "shortName": "UpdateContent", + "fullName": "google.cloud.dataplex.v1.ContentService.UpdateContent", + "service": { + "shortName": "ContentService", + "fullName": "google.cloud.dataplex.v1.ContentService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_ContentService_DeleteContent_async", + "title": "ContentService deleteContent Sample", + "origin": "API_DEFINITION", + "description": " Delete a content.", + "canonical": true, + "file": "content_service.delete_content.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteContent", + "fullName": "google.cloud.dataplex.v1.ContentService.DeleteContent", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ContentServiceClient", + "fullName": "google.cloud.dataplex.v1.ContentServiceClient" + }, + "method": { + "shortName": "DeleteContent", + "fullName": "google.cloud.dataplex.v1.ContentService.DeleteContent", + "service": { + "shortName": "ContentService", + "fullName": "google.cloud.dataplex.v1.ContentService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_ContentService_GetContent_async", + "title": "ContentService getContent Sample", + "origin": "API_DEFINITION", + "description": " Get a content resource.", + "canonical": true, + "file": "content_service.get_content.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetContent", + "fullName": "google.cloud.dataplex.v1.ContentService.GetContent", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.cloud.dataplex.v1.GetContentRequest.ContentView" + } + ], + "resultType": ".google.cloud.dataplex.v1.Content", + "client": { + "shortName": "ContentServiceClient", + "fullName": "google.cloud.dataplex.v1.ContentServiceClient" + }, + "method": { + "shortName": "GetContent", + "fullName": "google.cloud.dataplex.v1.ContentService.GetContent", + "service": { + "shortName": "ContentService", + "fullName": "google.cloud.dataplex.v1.ContentService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_ContentService_ListContent_async", + "title": "ContentService listContent Sample", + "origin": "API_DEFINITION", + "description": " List content.", + "canonical": true, + "file": "content_service.list_content.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListContent", + "fullName": "google.cloud.dataplex.v1.ContentService.ListContent", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListContentResponse", + "client": { + "shortName": "ContentServiceClient", + "fullName": "google.cloud.dataplex.v1.ContentServiceClient" + }, + "method": { + "shortName": "ListContent", + "fullName": "google.cloud.dataplex.v1.ContentService.ListContent", + "service": { + "shortName": "ContentService", + "fullName": "google.cloud.dataplex.v1.ContentService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_CreateLake_async", + "title": "ContentService createLake Sample", + "origin": "API_DEFINITION", + "description": " Creates a lake resource.", + "canonical": true, + "file": "dataplex_service.create_lake.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateLake", + "fullName": "google.cloud.dataplex.v1.DataplexService.CreateLake", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "lake_id", + "type": "TYPE_STRING" + }, + { + "name": "lake", + "type": ".google.cloud.dataplex.v1.Lake" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "CreateLake", + "fullName": "google.cloud.dataplex.v1.DataplexService.CreateLake", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_UpdateLake_async", + "title": "ContentService updateLake Sample", + "origin": "API_DEFINITION", + "description": " Updates a lake resource.", + "canonical": true, + "file": "dataplex_service.update_lake.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateLake", + "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateLake", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "lake", + "type": ".google.cloud.dataplex.v1.Lake" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "UpdateLake", + "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateLake", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_DeleteLake_async", + "title": "ContentService deleteLake Sample", + "origin": "API_DEFINITION", + "description": " Deletes a lake resource. All zones within the lake must be deleted before the lake can be deleted.", + "canonical": true, + "file": "dataplex_service.delete_lake.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteLake", + "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteLake", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "DeleteLake", + "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteLake", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_ListLakes_async", + "title": "ContentService listLakes Sample", + "origin": "API_DEFINITION", + "description": " Lists lake resources in a project and location.", + "canonical": true, + "file": "dataplex_service.list_lakes.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListLakes", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListLakes", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListLakesResponse", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "ListLakes", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListLakes", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_GetLake_async", + "title": "ContentService getLake Sample", + "origin": "API_DEFINITION", + "description": " Retrieves a lake resource.", + "canonical": true, + "file": "dataplex_service.get_lake.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetLake", + "fullName": "google.cloud.dataplex.v1.DataplexService.GetLake", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.Lake", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "GetLake", + "fullName": "google.cloud.dataplex.v1.DataplexService.GetLake", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_ListLakeActions_async", + "title": "ContentService listLakeActions Sample", + "origin": "API_DEFINITION", + "description": " Lists action resources in a lake.", + "canonical": true, + "file": "dataplex_service.list_lake_actions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListLakeActions", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListLakeActions", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListActionsResponse", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "ListLakeActions", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListLakeActions", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_CreateZone_async", + "title": "ContentService createZone Sample", + "origin": "API_DEFINITION", + "description": " Creates a zone resource within a lake.", + "canonical": true, + "file": "dataplex_service.create_zone.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateZone", + "fullName": "google.cloud.dataplex.v1.DataplexService.CreateZone", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "zone_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": ".google.cloud.dataplex.v1.Zone" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "CreateZone", + "fullName": "google.cloud.dataplex.v1.DataplexService.CreateZone", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_UpdateZone_async", + "title": "ContentService updateZone Sample", + "origin": "API_DEFINITION", + "description": " Updates a zone resource.", + "canonical": true, + "file": "dataplex_service.update_zone.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateZone", + "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateZone", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "zone", + "type": ".google.cloud.dataplex.v1.Zone" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "UpdateZone", + "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateZone", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_DeleteZone_async", + "title": "ContentService deleteZone Sample", + "origin": "API_DEFINITION", + "description": " Deletes a zone resource. All assets within a zone must be deleted before the zone can be deleted.", + "canonical": true, + "file": "dataplex_service.delete_zone.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteZone", + "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteZone", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "DeleteZone", + "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteZone", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_ListZones_async", + "title": "ContentService listZones Sample", + "origin": "API_DEFINITION", + "description": " Lists zone resources in a lake.", + "canonical": true, + "file": "dataplex_service.list_zones.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 73, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListZones", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListZones", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListZonesResponse", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "ListZones", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListZones", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_GetZone_async", + "title": "ContentService getZone Sample", + "origin": "API_DEFINITION", + "description": " Retrieves a zone resource.", + "canonical": true, + "file": "dataplex_service.get_zone.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetZone", + "fullName": "google.cloud.dataplex.v1.DataplexService.GetZone", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.Zone", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "GetZone", + "fullName": "google.cloud.dataplex.v1.DataplexService.GetZone", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_ListZoneActions_async", + "title": "ContentService listZoneActions Sample", + "origin": "API_DEFINITION", + "description": " Lists action resources in a zone.", + "canonical": true, + "file": "dataplex_service.list_zone_actions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListZoneActions", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListZoneActions", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListActionsResponse", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "ListZoneActions", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListZoneActions", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_CreateAsset_async", + "title": "ContentService createAsset Sample", + "origin": "API_DEFINITION", + "description": " Creates an asset resource.", + "canonical": true, + "file": "dataplex_service.create_asset.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateAsset", + "fullName": "google.cloud.dataplex.v1.DataplexService.CreateAsset", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "asset_id", + "type": "TYPE_STRING" + }, + { + "name": "asset", + "type": ".google.cloud.dataplex.v1.Asset" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "CreateAsset", + "fullName": "google.cloud.dataplex.v1.DataplexService.CreateAsset", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_UpdateAsset_async", + "title": "ContentService updateAsset Sample", + "origin": "API_DEFINITION", + "description": " Updates an asset resource.", + "canonical": true, + "file": "dataplex_service.update_asset.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateAsset", + "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateAsset", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "asset", + "type": ".google.cloud.dataplex.v1.Asset" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "UpdateAsset", + "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateAsset", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_DeleteAsset_async", + "title": "ContentService deleteAsset Sample", + "origin": "API_DEFINITION", + "description": " Deletes an asset resource. The referenced storage resource is detached (default) or deleted based on the associated Lifecycle policy.", + "canonical": true, + "file": "dataplex_service.delete_asset.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteAsset", + "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteAsset", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "DeleteAsset", + "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteAsset", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_ListAssets_async", + "title": "ContentService listAssets Sample", + "origin": "API_DEFINITION", + "description": " Lists asset resources in a zone.", + "canonical": true, + "file": "dataplex_service.list_assets.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAssets", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListAssets", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListAssetsResponse", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "ListAssets", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListAssets", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_GetAsset_async", + "title": "ContentService getAsset Sample", + "origin": "API_DEFINITION", + "description": " Retrieves an asset resource.", + "canonical": true, + "file": "dataplex_service.get_asset.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAsset", + "fullName": "google.cloud.dataplex.v1.DataplexService.GetAsset", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.Asset", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "GetAsset", + "fullName": "google.cloud.dataplex.v1.DataplexService.GetAsset", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_ListAssetActions_async", + "title": "ContentService listAssetActions Sample", + "origin": "API_DEFINITION", + "description": " Lists action resources in an asset.", + "canonical": true, + "file": "dataplex_service.list_asset_actions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAssetActions", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListAssetActions", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListActionsResponse", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "ListAssetActions", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListAssetActions", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_CreateTask_async", + "title": "ContentService createTask Sample", + "origin": "API_DEFINITION", + "description": " Creates a task resource within a lake.", + "canonical": true, + "file": "dataplex_service.create_task.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateTask", + "fullName": "google.cloud.dataplex.v1.DataplexService.CreateTask", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "task_id", + "type": "TYPE_STRING" + }, + { + "name": "task", + "type": ".google.cloud.dataplex.v1.Task" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "CreateTask", + "fullName": "google.cloud.dataplex.v1.DataplexService.CreateTask", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_UpdateTask_async", + "title": "ContentService updateTask Sample", + "origin": "API_DEFINITION", + "description": " Update the task resource.", + "canonical": true, + "file": "dataplex_service.update_task.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateTask", + "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateTask", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "task", + "type": ".google.cloud.dataplex.v1.Task" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "UpdateTask", + "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateTask", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_DeleteTask_async", + "title": "ContentService deleteTask Sample", + "origin": "API_DEFINITION", + "description": " Delete the task resource.", + "canonical": true, + "file": "dataplex_service.delete_task.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteTask", + "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteTask", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "DeleteTask", + "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteTask", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_ListTasks_async", + "title": "ContentService listTasks Sample", + "origin": "API_DEFINITION", + "description": " Lists tasks under the given lake.", + "canonical": true, + "file": "dataplex_service.list_tasks.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 73, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListTasks", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListTasks", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListTasksResponse", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "ListTasks", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListTasks", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_GetTask_async", + "title": "ContentService getTask Sample", + "origin": "API_DEFINITION", + "description": " Get task resource.", + "canonical": true, + "file": "dataplex_service.get_task.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetTask", + "fullName": "google.cloud.dataplex.v1.DataplexService.GetTask", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.Task", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "GetTask", + "fullName": "google.cloud.dataplex.v1.DataplexService.GetTask", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_ListJobs_async", + "title": "ContentService listJobs Sample", + "origin": "API_DEFINITION", + "description": " Lists Jobs under the given task.", + "canonical": true, + "file": "dataplex_service.list_jobs.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListJobs", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListJobs", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListJobsResponse", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "ListJobs", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListJobs", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_GetJob_async", + "title": "ContentService getJob Sample", + "origin": "API_DEFINITION", + "description": " Get job resource.", + "canonical": true, + "file": "dataplex_service.get_job.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetJob", + "fullName": "google.cloud.dataplex.v1.DataplexService.GetJob", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.Job", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "GetJob", + "fullName": "google.cloud.dataplex.v1.DataplexService.GetJob", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_CancelJob_async", + "title": "ContentService cancelJob Sample", + "origin": "API_DEFINITION", + "description": " Cancel jobs running for the task resource.", + "canonical": true, + "file": "dataplex_service.cancel_job.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CancelJob", + "fullName": "google.cloud.dataplex.v1.DataplexService.CancelJob", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "CancelJob", + "fullName": "google.cloud.dataplex.v1.DataplexService.CancelJob", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_CreateEnvironment_async", + "title": "ContentService createEnvironment Sample", + "origin": "API_DEFINITION", + "description": " Create an environment resource.", + "canonical": true, + "file": "dataplex_service.create_environment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateEnvironment", + "fullName": "google.cloud.dataplex.v1.DataplexService.CreateEnvironment", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "environment_id", + "type": "TYPE_STRING" + }, + { + "name": "environment", + "type": ".google.cloud.dataplex.v1.Environment" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "CreateEnvironment", + "fullName": "google.cloud.dataplex.v1.DataplexService.CreateEnvironment", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_UpdateEnvironment_async", + "title": "ContentService updateEnvironment Sample", + "origin": "API_DEFINITION", + "description": " Update the environment resource.", + "canonical": true, + "file": "dataplex_service.update_environment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateEnvironment", + "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateEnvironment", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "environment", + "type": ".google.cloud.dataplex.v1.Environment" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "UpdateEnvironment", + "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateEnvironment", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_DeleteEnvironment_async", + "title": "ContentService deleteEnvironment Sample", + "origin": "API_DEFINITION", + "description": " Delete the environment resource. All the child resources must have been deleted before environment deletion can be initiated.", + "canonical": true, + "file": "dataplex_service.delete_environment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteEnvironment", + "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteEnvironment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "DeleteEnvironment", + "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteEnvironment", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_ListEnvironments_async", + "title": "ContentService listEnvironments Sample", + "origin": "API_DEFINITION", + "description": " Lists environments under the given lake.", + "canonical": true, + "file": "dataplex_service.list_environments.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListEnvironments", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListEnvironments", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListEnvironmentsResponse", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "ListEnvironments", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListEnvironments", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_GetEnvironment_async", + "title": "ContentService getEnvironment Sample", + "origin": "API_DEFINITION", + "description": " Get environment resource.", + "canonical": true, + "file": "dataplex_service.get_environment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetEnvironment", + "fullName": "google.cloud.dataplex.v1.DataplexService.GetEnvironment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.Environment", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "GetEnvironment", + "fullName": "google.cloud.dataplex.v1.DataplexService.GetEnvironment", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_ListSessions_async", + "title": "ContentService listSessions Sample", + "origin": "API_DEFINITION", + "description": " Lists session resources in an environment.", + "canonical": true, + "file": "dataplex_service.list_sessions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListSessions", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListSessions", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListSessionsResponse", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "ListSessions", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListSessions", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_MetadataService_CreateEntity_async", + "title": "ContentService createEntity Sample", + "origin": "API_DEFINITION", + "description": " Create a metadata entity.", + "canonical": true, + "file": "metadata_service.create_entity.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateEntity", + "fullName": "google.cloud.dataplex.v1.MetadataService.CreateEntity", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "entity", + "type": ".google.cloud.dataplex.v1.Entity" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.dataplex.v1.Entity", + "client": { + "shortName": "MetadataServiceClient", + "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" + }, + "method": { + "shortName": "CreateEntity", + "fullName": "google.cloud.dataplex.v1.MetadataService.CreateEntity", + "service": { + "shortName": "MetadataService", + "fullName": "google.cloud.dataplex.v1.MetadataService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_MetadataService_UpdateEntity_async", + "title": "ContentService updateEntity Sample", + "origin": "API_DEFINITION", + "description": " Update a metadata entity. Only supports full resource update.", + "canonical": true, + "file": "metadata_service.update_entity.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateEntity", + "fullName": "google.cloud.dataplex.v1.MetadataService.UpdateEntity", + "async": true, + "parameters": [ + { + "name": "entity", + "type": ".google.cloud.dataplex.v1.Entity" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.dataplex.v1.Entity", + "client": { + "shortName": "MetadataServiceClient", + "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" + }, + "method": { + "shortName": "UpdateEntity", + "fullName": "google.cloud.dataplex.v1.MetadataService.UpdateEntity", + "service": { + "shortName": "MetadataService", + "fullName": "google.cloud.dataplex.v1.MetadataService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_MetadataService_DeleteEntity_async", + "title": "ContentService deleteEntity Sample", + "origin": "API_DEFINITION", + "description": " Delete a metadata entity.", + "canonical": true, + "file": "metadata_service.delete_entity.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteEntity", + "fullName": "google.cloud.dataplex.v1.MetadataService.DeleteEntity", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "etag", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "MetadataServiceClient", + "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" + }, + "method": { + "shortName": "DeleteEntity", + "fullName": "google.cloud.dataplex.v1.MetadataService.DeleteEntity", + "service": { + "shortName": "MetadataService", + "fullName": "google.cloud.dataplex.v1.MetadataService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_MetadataService_GetEntity_async", + "title": "ContentService getEntity Sample", + "origin": "API_DEFINITION", + "description": " Get a metadata entity.", + "canonical": true, + "file": "metadata_service.get_entity.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetEntity", + "fullName": "google.cloud.dataplex.v1.MetadataService.GetEntity", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.cloud.dataplex.v1.GetEntityRequest.EntityView" + } + ], + "resultType": ".google.cloud.dataplex.v1.Entity", + "client": { + "shortName": "MetadataServiceClient", + "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" + }, + "method": { + "shortName": "GetEntity", + "fullName": "google.cloud.dataplex.v1.MetadataService.GetEntity", + "service": { + "shortName": "MetadataService", + "fullName": "google.cloud.dataplex.v1.MetadataService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_MetadataService_ListEntities_async", + "title": "ContentService listEntities Sample", + "origin": "API_DEFINITION", + "description": " List metadata entities in a zone.", + "canonical": true, + "file": "metadata_service.list_entities.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 81, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListEntities", + "fullName": "google.cloud.dataplex.v1.MetadataService.ListEntities", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.cloud.dataplex.v1.ListEntitiesRequest.EntityView" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListEntitiesResponse", + "client": { + "shortName": "MetadataServiceClient", + "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" + }, + "method": { + "shortName": "ListEntities", + "fullName": "google.cloud.dataplex.v1.MetadataService.ListEntities", + "service": { + "shortName": "MetadataService", + "fullName": "google.cloud.dataplex.v1.MetadataService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_MetadataService_CreatePartition_async", + "title": "ContentService createPartition Sample", + "origin": "API_DEFINITION", + "description": " Create a metadata partition.", + "canonical": true, + "file": "metadata_service.create_partition.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreatePartition", + "fullName": "google.cloud.dataplex.v1.MetadataService.CreatePartition", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "partition", + "type": ".google.cloud.dataplex.v1.Partition" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.dataplex.v1.Partition", + "client": { + "shortName": "MetadataServiceClient", + "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" + }, + "method": { + "shortName": "CreatePartition", + "fullName": "google.cloud.dataplex.v1.MetadataService.CreatePartition", + "service": { + "shortName": "MetadataService", + "fullName": "google.cloud.dataplex.v1.MetadataService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_MetadataService_DeletePartition_async", + "title": "ContentService deletePartition Sample", + "origin": "API_DEFINITION", + "description": " Delete a metadata partition.", + "canonical": true, + "file": "metadata_service.delete_partition.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeletePartition", + "fullName": "google.cloud.dataplex.v1.MetadataService.DeletePartition", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "etag", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "MetadataServiceClient", + "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" + }, + "method": { + "shortName": "DeletePartition", + "fullName": "google.cloud.dataplex.v1.MetadataService.DeletePartition", + "service": { + "shortName": "MetadataService", + "fullName": "google.cloud.dataplex.v1.MetadataService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_MetadataService_GetPartition_async", + "title": "ContentService getPartition Sample", + "origin": "API_DEFINITION", + "description": " Get a metadata partition of an entity.", + "canonical": true, + "file": "metadata_service.get_partition.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetPartition", + "fullName": "google.cloud.dataplex.v1.MetadataService.GetPartition", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.Partition", + "client": { + "shortName": "MetadataServiceClient", + "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" + }, + "method": { + "shortName": "GetPartition", + "fullName": "google.cloud.dataplex.v1.MetadataService.GetPartition", + "service": { + "shortName": "MetadataService", + "fullName": "google.cloud.dataplex.v1.MetadataService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_MetadataService_ListPartitions_async", + "title": "ContentService listPartitions Sample", + "origin": "API_DEFINITION", + "description": " List metadata partitions of an entity.", + "canonical": true, + "file": "metadata_service.list_partitions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 84, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListPartitions", + "fullName": "google.cloud.dataplex.v1.MetadataService.ListPartitions", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListPartitionsResponse", + "client": { + "shortName": "MetadataServiceClient", + "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" + }, + "method": { + "shortName": "ListPartitions", + "fullName": "google.cloud.dataplex.v1.MetadataService.ListPartitions", + "service": { + "shortName": "MetadataService", + "fullName": "google.cloud.dataplex.v1.MetadataService" + } + } + } + } + ] +} diff --git a/packages/google-cloud-dataplex/src/v1/content_service_client.ts b/packages/google-cloud-dataplex/src/v1/content_service_client.ts index 56055d8621d..9d0f0334c94 100644 --- a/packages/google-cloud-dataplex/src/v1/content_service_client.ts +++ b/packages/google-cloud-dataplex/src/v1/content_service_client.ts @@ -1991,9 +1991,8 @@ export class ContentServiceClient { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.contentServiceStub!.then(stub => { + if (this.contentServiceStub && !this._terminated) { + return this.contentServiceStub.then(stub => { this._terminated = true; stub.close(); }); diff --git a/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts b/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts index 49e34f950b1..bd7b2655390 100644 --- a/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts +++ b/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts @@ -6521,9 +6521,8 @@ export class DataplexServiceClient { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.dataplexServiceStub!.then(stub => { + if (this.dataplexServiceStub && !this._terminated) { + return this.dataplexServiceStub.then(stub => { this._terminated = true; stub.close(); this.operationsClient.close(); diff --git a/packages/google-cloud-dataplex/src/v1/metadata_service_client.ts b/packages/google-cloud-dataplex/src/v1/metadata_service_client.ts index 86cabc92d40..402d1b31046 100644 --- a/packages/google-cloud-dataplex/src/v1/metadata_service_client.ts +++ b/packages/google-cloud-dataplex/src/v1/metadata_service_client.ts @@ -2553,9 +2553,8 @@ export class MetadataServiceClient { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.metadataServiceStub!.then(stub => { + if (this.metadataServiceStub && !this._terminated) { + return this.metadataServiceStub.then(stub => { this._terminated = true; stub.close(); }); diff --git a/packages/google-cloud-dataplex/test/gapic_content_service_v1.ts b/packages/google-cloud-dataplex/test/gapic_content_service_v1.ts index f3aac99b7ee..ef2cb294ea6 100644 --- a/packages/google-cloud-dataplex/test/gapic_content_service_v1.ts +++ b/packages/google-cloud-dataplex/test/gapic_content_service_v1.ts @@ -153,12 +153,27 @@ describe('v1.ContentServiceClient', () => { assert(client.contentServiceStub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new contentserviceModule.v1.ContentServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.close(); + client.initialize(); + assert(client.contentServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.contentServiceStub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -304,6 +319,22 @@ describe('v1.ContentServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes createContent with closed client', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateContentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createContent(request), expectedError); + }); }); describe('updateContent', () => { @@ -418,6 +449,23 @@ describe('v1.ContentServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes updateContent with closed client', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateContentRequest() + ); + request.content = {}; + request.content.name = ''; + const expectedHeaderRequestParams = 'content.name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateContent(request), expectedError); + }); }); describe('deleteContent', () => { @@ -529,6 +577,22 @@ describe('v1.ContentServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deleteContent with closed client', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteContentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteContent(request), expectedError); + }); }); describe('getContent', () => { @@ -640,6 +704,22 @@ describe('v1.ContentServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getContent with closed client', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetContentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getContent(request), expectedError); + }); }); describe('listContent', () => { diff --git a/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts b/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts index 53d92ad2fc5..8e91b73b603 100644 --- a/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts +++ b/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts @@ -185,12 +185,27 @@ describe('v1.DataplexServiceClient', () => { assert(client.dataplexServiceStub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.close(); + client.initialize(); + assert(client.dataplexServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dataplexServiceStub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -333,6 +348,22 @@ describe('v1.DataplexServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getLake with closed client', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetLakeRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getLake(request), expectedError); + }); }); describe('getZone', () => { @@ -441,6 +472,22 @@ describe('v1.DataplexServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getZone with closed client', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetZoneRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getZone(request), expectedError); + }); }); describe('getAsset', () => { @@ -549,6 +596,22 @@ describe('v1.DataplexServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getAsset with closed client', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetAssetRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getAsset(request), expectedError); + }); }); describe('getTask', () => { @@ -657,6 +720,22 @@ describe('v1.DataplexServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getTask with closed client', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetTaskRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getTask(request), expectedError); + }); }); describe('getJob', () => { @@ -765,6 +844,22 @@ describe('v1.DataplexServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getJob with closed client', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getJob(request), expectedError); + }); }); describe('cancelJob', () => { @@ -873,6 +968,22 @@ describe('v1.DataplexServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes cancelJob with closed client', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CancelJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.cancelJob(request), expectedError); + }); }); describe('getEnvironment', () => { @@ -984,6 +1095,22 @@ describe('v1.DataplexServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getEnvironment with closed client', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetEnvironmentRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getEnvironment(request), expectedError); + }); }); describe('createLake', () => { diff --git a/packages/google-cloud-dataplex/test/gapic_metadata_service_v1.ts b/packages/google-cloud-dataplex/test/gapic_metadata_service_v1.ts index 97499b0b572..9d74ad3a436 100644 --- a/packages/google-cloud-dataplex/test/gapic_metadata_service_v1.ts +++ b/packages/google-cloud-dataplex/test/gapic_metadata_service_v1.ts @@ -153,12 +153,27 @@ describe('v1.MetadataServiceClient', () => { assert(client.metadataServiceStub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new metadataserviceModule.v1.MetadataServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.close(); + client.initialize(); + assert(client.metadataServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.metadataServiceStub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -304,6 +319,22 @@ describe('v1.MetadataServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes createEntity with closed client', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateEntityRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createEntity(request), expectedError); + }); }); describe('updateEntity', () => { @@ -418,6 +449,23 @@ describe('v1.MetadataServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes updateEntity with closed client', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateEntityRequest() + ); + request.entity = {}; + request.entity.name = ''; + const expectedHeaderRequestParams = 'entity.name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateEntity(request), expectedError); + }); }); describe('deleteEntity', () => { @@ -529,6 +577,22 @@ describe('v1.MetadataServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deleteEntity with closed client', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteEntityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteEntity(request), expectedError); + }); }); describe('getEntity', () => { @@ -637,6 +701,22 @@ describe('v1.MetadataServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getEntity with closed client', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetEntityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getEntity(request), expectedError); + }); }); describe('createPartition', () => { @@ -748,6 +828,22 @@ describe('v1.MetadataServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes createPartition with closed client', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreatePartitionRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createPartition(request), expectedError); + }); }); describe('deletePartition', () => { @@ -859,6 +955,22 @@ describe('v1.MetadataServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deletePartition with closed client', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeletePartitionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deletePartition(request), expectedError); + }); }); describe('getPartition', () => { @@ -970,6 +1082,22 @@ describe('v1.MetadataServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getPartition with closed client', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetPartitionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getPartition(request), expectedError); + }); }); describe('listEntities', () => { From 0908fe8fd562c13c3fc05944de9ad0a026e80ea0 Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Wed, 2 Mar 2022 15:08:43 -0800 Subject: [PATCH 156/254] feat: upgrade library to ga (#69) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: upgrade library to ga * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- packages/google-cloud-shell/.repo-metadata.json | 2 +- packages/google-cloud-shell/README.md | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-shell/.repo-metadata.json b/packages/google-cloud-shell/.repo-metadata.json index 28783c45638..16c7b6a3f0b 100644 --- a/packages/google-cloud-shell/.repo-metadata.json +++ b/packages/google-cloud-shell/.repo-metadata.json @@ -4,7 +4,7 @@ "product_documentation": "https://cloud.google.com/shell/", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/shell/latest", "issue_tracker": "https://github.com/googleapis/nodejs-cloud-shell/issues", - "release_level": "stable", + "release_level": "ga", "language": "nodejs", "repo": "googleapis/nodejs-cloud-shell", "distribution_name": "@google-cloud/shell", diff --git a/packages/google-cloud-shell/README.md b/packages/google-cloud-shell/README.md index 9df0f4b74c8..341b85f07b8 100644 --- a/packages/google-cloud-shell/README.md +++ b/packages/google-cloud-shell/README.md @@ -4,7 +4,7 @@ # [Cloud Shell: Node.js Client](https://github.com/googleapis/nodejs-cloud-shell) -[![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/shell.svg)](https://www.npmjs.org/package/@google-cloud/shell) @@ -120,10 +120,10 @@ for versions compatible with Node.js 8. This library follows [Semantic Versioning](http://semver.org/). - -This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways +This library is considered to be **General Availability (GA)**. This means it +is stable; the code surface will not change in backwards-incompatible ways unless absolutely necessary (e.g. because of critical security issues) or with -an extensive deprecation period. Issues and requests against **stable** libraries +an extensive deprecation period. Issues and requests against **GA** libraries are addressed with the highest priority. @@ -131,6 +131,7 @@ are addressed with the highest priority. + More Information: [Google Cloud Platform Launch Stages][launch_stages] [launch_stages]: https://cloud.google.com/terms/launch-stages From 5675feb2fb32d8d50a42f0d652edc0bd43282249 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 16 Mar 2022 21:34:22 +0000 Subject: [PATCH 157/254] chore: update v2.14.2 gapic-generator-typescript (#35) - [ ] Regenerate this pull request now. Committer: @summer-ji-eng PiperOrigin-RevId: 434859890 Source-Link: https://github.com/googleapis/googleapis/commit/bc2432d50cba657e95212122e3fa112591b5bec2 Source-Link: https://github.com/googleapis/googleapis-gen/commit/930b673103e92523f8cfed38decd7d3afae8ebe7 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTMwYjY3MzEwM2U5MjUyM2Y4Y2ZlZDM4ZGVjZDdkM2FmYWU4ZWJlNyJ9 --- packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts b/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts index 6cfc96623f1..d31e863fdd9 100644 --- a/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts +++ b/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts @@ -361,7 +361,6 @@ describe('v1.CloudDeployClient', () => { new protos.google.cloud.deploy.v1.GetDeliveryPipelineRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getDeliveryPipeline(request), expectedError); @@ -485,7 +484,6 @@ describe('v1.CloudDeployClient', () => { new protos.google.cloud.deploy.v1.GetTargetRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getTarget(request), expectedError); @@ -612,7 +610,6 @@ describe('v1.CloudDeployClient', () => { new protos.google.cloud.deploy.v1.GetReleaseRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getRelease(request), expectedError); @@ -739,7 +736,6 @@ describe('v1.CloudDeployClient', () => { new protos.google.cloud.deploy.v1.ApproveRolloutRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.approveRollout(request), expectedError); @@ -866,7 +862,6 @@ describe('v1.CloudDeployClient', () => { new protos.google.cloud.deploy.v1.GetRolloutRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getRollout(request), expectedError); @@ -990,7 +985,6 @@ describe('v1.CloudDeployClient', () => { new protos.google.cloud.deploy.v1.GetConfigRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getConfig(request), expectedError); From 284e9b653fb79ff05d8b2fc8bed8d86eed988715 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 17 Mar 2022 01:50:12 +0000 Subject: [PATCH 158/254] chore: update v2.14.2 gapic-generator-typescript (#17) - [ ] Regenerate this pull request now. Committer: @summer-ji-eng PiperOrigin-RevId: 434859890 Source-Link: https://github.com/googleapis/googleapis/commit/bc2432d50cba657e95212122e3fa112591b5bec2 Source-Link: https://github.com/googleapis/googleapis-gen/commit/930b673103e92523f8cfed38decd7d3afae8ebe7 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTMwYjY3MzEwM2U5MjUyM2Y4Y2ZlZDM4ZGVjZDdkM2FmYWU4ZWJlNyJ9 --- .../google-cloud-dataplex/test/gapic_content_service_v1.ts | 4 ---- .../test/gapic_dataplex_service_v1.ts | 7 ------- .../test/gapic_metadata_service_v1.ts | 7 ------- 3 files changed, 18 deletions(-) diff --git a/packages/google-cloud-dataplex/test/gapic_content_service_v1.ts b/packages/google-cloud-dataplex/test/gapic_content_service_v1.ts index ef2cb294ea6..a974e92287d 100644 --- a/packages/google-cloud-dataplex/test/gapic_content_service_v1.ts +++ b/packages/google-cloud-dataplex/test/gapic_content_service_v1.ts @@ -330,7 +330,6 @@ describe('v1.ContentServiceClient', () => { new protos.google.cloud.dataplex.v1.CreateContentRequest() ); request.parent = ''; - const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createContent(request), expectedError); @@ -461,7 +460,6 @@ describe('v1.ContentServiceClient', () => { ); request.content = {}; request.content.name = ''; - const expectedHeaderRequestParams = 'content.name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.updateContent(request), expectedError); @@ -588,7 +586,6 @@ describe('v1.ContentServiceClient', () => { new protos.google.cloud.dataplex.v1.DeleteContentRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.deleteContent(request), expectedError); @@ -715,7 +712,6 @@ describe('v1.ContentServiceClient', () => { new protos.google.cloud.dataplex.v1.GetContentRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getContent(request), expectedError); diff --git a/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts b/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts index 8e91b73b603..1371958796e 100644 --- a/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts +++ b/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts @@ -359,7 +359,6 @@ describe('v1.DataplexServiceClient', () => { new protos.google.cloud.dataplex.v1.GetLakeRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getLake(request), expectedError); @@ -483,7 +482,6 @@ describe('v1.DataplexServiceClient', () => { new protos.google.cloud.dataplex.v1.GetZoneRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getZone(request), expectedError); @@ -607,7 +605,6 @@ describe('v1.DataplexServiceClient', () => { new protos.google.cloud.dataplex.v1.GetAssetRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getAsset(request), expectedError); @@ -731,7 +728,6 @@ describe('v1.DataplexServiceClient', () => { new protos.google.cloud.dataplex.v1.GetTaskRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getTask(request), expectedError); @@ -855,7 +851,6 @@ describe('v1.DataplexServiceClient', () => { new protos.google.cloud.dataplex.v1.GetJobRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getJob(request), expectedError); @@ -979,7 +974,6 @@ describe('v1.DataplexServiceClient', () => { new protos.google.cloud.dataplex.v1.CancelJobRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.cancelJob(request), expectedError); @@ -1106,7 +1100,6 @@ describe('v1.DataplexServiceClient', () => { new protos.google.cloud.dataplex.v1.GetEnvironmentRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getEnvironment(request), expectedError); diff --git a/packages/google-cloud-dataplex/test/gapic_metadata_service_v1.ts b/packages/google-cloud-dataplex/test/gapic_metadata_service_v1.ts index 9d74ad3a436..023b2824e83 100644 --- a/packages/google-cloud-dataplex/test/gapic_metadata_service_v1.ts +++ b/packages/google-cloud-dataplex/test/gapic_metadata_service_v1.ts @@ -330,7 +330,6 @@ describe('v1.MetadataServiceClient', () => { new protos.google.cloud.dataplex.v1.CreateEntityRequest() ); request.parent = ''; - const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createEntity(request), expectedError); @@ -461,7 +460,6 @@ describe('v1.MetadataServiceClient', () => { ); request.entity = {}; request.entity.name = ''; - const expectedHeaderRequestParams = 'entity.name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.updateEntity(request), expectedError); @@ -588,7 +586,6 @@ describe('v1.MetadataServiceClient', () => { new protos.google.cloud.dataplex.v1.DeleteEntityRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.deleteEntity(request), expectedError); @@ -712,7 +709,6 @@ describe('v1.MetadataServiceClient', () => { new protos.google.cloud.dataplex.v1.GetEntityRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getEntity(request), expectedError); @@ -839,7 +835,6 @@ describe('v1.MetadataServiceClient', () => { new protos.google.cloud.dataplex.v1.CreatePartitionRequest() ); request.parent = ''; - const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createPartition(request), expectedError); @@ -966,7 +961,6 @@ describe('v1.MetadataServiceClient', () => { new protos.google.cloud.dataplex.v1.DeletePartitionRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.deletePartition(request), expectedError); @@ -1093,7 +1087,6 @@ describe('v1.MetadataServiceClient', () => { new protos.google.cloud.dataplex.v1.GetPartitionRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getPartition(request), expectedError); From e7c8233713c2aa8571ac3babef34a1c803db6545 Mon Sep 17 00:00:00 2001 From: Averi Kitsch Date: Thu, 17 Mar 2022 12:08:49 -0700 Subject: [PATCH 159/254] chore: update repo metadata (#76) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: update repo metadata * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- packages/google-cloud-shell/.repo-metadata.json | 2 +- packages/google-cloud-shell/README.md | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-shell/.repo-metadata.json b/packages/google-cloud-shell/.repo-metadata.json index 16c7b6a3f0b..28783c45638 100644 --- a/packages/google-cloud-shell/.repo-metadata.json +++ b/packages/google-cloud-shell/.repo-metadata.json @@ -4,7 +4,7 @@ "product_documentation": "https://cloud.google.com/shell/", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/shell/latest", "issue_tracker": "https://github.com/googleapis/nodejs-cloud-shell/issues", - "release_level": "ga", + "release_level": "stable", "language": "nodejs", "repo": "googleapis/nodejs-cloud-shell", "distribution_name": "@google-cloud/shell", diff --git a/packages/google-cloud-shell/README.md b/packages/google-cloud-shell/README.md index 341b85f07b8..9df0f4b74c8 100644 --- a/packages/google-cloud-shell/README.md +++ b/packages/google-cloud-shell/README.md @@ -4,7 +4,7 @@ # [Cloud Shell: Node.js Client](https://github.com/googleapis/nodejs-cloud-shell) -[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/shell.svg)](https://www.npmjs.org/package/@google-cloud/shell) @@ -120,10 +120,10 @@ for versions compatible with Node.js 8. This library follows [Semantic Versioning](http://semver.org/). -This library is considered to be **General Availability (GA)**. This means it -is stable; the code surface will not change in backwards-incompatible ways + +This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways unless absolutely necessary (e.g. because of critical security issues) or with -an extensive deprecation period. Issues and requests against **GA** libraries +an extensive deprecation period. Issues and requests against **stable** libraries are addressed with the highest priority. @@ -131,7 +131,6 @@ are addressed with the highest priority. - More Information: [Google Cloud Platform Launch Stages][launch_stages] [launch_stages]: https://cloud.google.com/terms/launch-stages From 3197872900572965560274c545466b1d7c0b65a2 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Wed, 23 Mar 2022 13:50:13 -0700 Subject: [PATCH 160/254] feat: promote to stable (#36) Release-As: 1.0.0 --- packages/google-cloud-deploy/.repo-metadata.json | 2 +- packages/google-cloud-deploy/README.md | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-deploy/.repo-metadata.json b/packages/google-cloud-deploy/.repo-metadata.json index c25ac44b699..75202e31889 100644 --- a/packages/google-cloud-deploy/.repo-metadata.json +++ b/packages/google-cloud-deploy/.repo-metadata.json @@ -4,7 +4,7 @@ "product_documentation": "https://cloud.google.com/deploy/", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/deploy/latest", "issue_tracker": "https://github.com/googleapis/nodejs-deploy/issues", - "release_level": "preview", + "release_level": "stable", "language": "nodejs", "repo": "googleapis/nodejs-deploy", "distribution_name": "@google-cloud/deploy", diff --git a/packages/google-cloud-deploy/README.md b/packages/google-cloud-deploy/README.md index 6ac60296661..4bfa59f4398 100644 --- a/packages/google-cloud-deploy/README.md +++ b/packages/google-cloud-deploy/README.md @@ -4,7 +4,7 @@ # [Google Cloud Deploy: Node.js Client](https://github.com/googleapis/nodejs-deploy) -[![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/deploy.svg)](https://www.npmjs.org/package/@google-cloud/deploy) @@ -154,13 +154,14 @@ This library follows [Semantic Versioning](http://semver.org/). +This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways +unless absolutely necessary (e.g. because of critical security issues) or with +an extensive deprecation period. Issues and requests against **stable** libraries +are addressed with the highest priority. -This library is considered to be in **preview**. This means it is still a -work-in-progress and under active development. Any release is subject to -backwards-incompatible changes at any time. More Information: [Google Cloud Platform Launch Stages][launch_stages] From 64b53910b098fdd703b192e571a116e8b4fea493 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 23 Mar 2022 20:58:20 +0000 Subject: [PATCH 161/254] chore(main): release 1.0.0 (#37) :robot: I have created a release *beep* *boop* --- ## [1.0.0](https://github.com/googleapis/nodejs-deploy/compare/v0.2.0...v1.0.0) (2022-03-23) ### Features * promote to stable ([#36](https://github.com/googleapis/nodejs-deploy/issues/36)) ([00960ff](https://github.com/googleapis/nodejs-deploy/commit/00960ff75a3d40e9f4a81efb868e56642937e49f)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-deploy/CHANGELOG.md | 7 +++++++ packages/google-cloud-deploy/package.json | 2 +- packages/google-cloud-deploy/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-deploy/CHANGELOG.md b/packages/google-cloud-deploy/CHANGELOG.md index ad49ada49fd..0898e1c638c 100644 --- a/packages/google-cloud-deploy/CHANGELOG.md +++ b/packages/google-cloud-deploy/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.0.0](https://github.com/googleapis/nodejs-deploy/compare/v0.2.0...v1.0.0) (2022-03-23) + + +### Features + +* promote to stable ([#36](https://github.com/googleapis/nodejs-deploy/issues/36)) ([00960ff](https://github.com/googleapis/nodejs-deploy/commit/00960ff75a3d40e9f4a81efb868e56642937e49f)) + ## 0.2.0 (2021-10-07) diff --git a/packages/google-cloud-deploy/package.json b/packages/google-cloud-deploy/package.json index b5f9ffa003d..1a858c178f2 100644 --- a/packages/google-cloud-deploy/package.json +++ b/packages/google-cloud-deploy/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/deploy", - "version": "0.2.0", + "version": "1.0.0", "description": "clouddeploy client for Node.js", "repository": "googleapis/nodejs-deploy", "license": "Apache-2.0", diff --git a/packages/google-cloud-deploy/samples/package.json b/packages/google-cloud-deploy/samples/package.json index 984f9b1ed15..56569c4f434 100644 --- a/packages/google-cloud-deploy/samples/package.json +++ b/packages/google-cloud-deploy/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/deploy": "^0.2.0" + "@google-cloud/deploy": "^1.0.0" }, "devDependencies": { "c8": "^7.1.0", From 5a89e8b9d4603056575372bd6e93fe2b044b174d Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Thu, 24 Mar 2022 14:14:34 -0700 Subject: [PATCH 162/254] feat: promote to stable (#18) Fixes #6 --- packages/google-cloud-dataplex/.repo-metadata.json | 6 +++--- packages/google-cloud-dataplex/README.md | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/google-cloud-dataplex/.repo-metadata.json b/packages/google-cloud-dataplex/.repo-metadata.json index d9314a6a5d7..27a8ce63e91 100644 --- a/packages/google-cloud-dataplex/.repo-metadata.json +++ b/packages/google-cloud-dataplex/.repo-metadata.json @@ -4,12 +4,12 @@ "product_documentation": "https://cloud.google.com/dataplex/", "client_documentation": "https://cloud.google.com/dataplex", "issue_tracker": "https://github.com/googleapis/nodejs-dataplex/issues", - "release_level": "beta", + "release_level": "stable", "language": "nodejs", "repo": "googleapis/nodejs-dataplex", "distribution_name": "@google-cloud/dataplex", "api_id": "dataplex.googleapis.com", "default_version": "v1", - "requires_billing": true + "requires_billing": true, + "library_type": "GAPIC_AUTO" } - diff --git a/packages/google-cloud-dataplex/README.md b/packages/google-cloud-dataplex/README.md index e9b39bcaac5..cff34e25d08 100644 --- a/packages/google-cloud-dataplex/README.md +++ b/packages/google-cloud-dataplex/README.md @@ -4,7 +4,7 @@ # [Cloud Dataplex: Node.js Client](https://github.com/googleapis/nodejs-dataplex) -[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/dataplex.svg)](https://www.npmjs.org/package/@google-cloud/dataplex) @@ -122,11 +122,11 @@ This library follows [Semantic Versioning](http://semver.org/). +This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways +unless absolutely necessary (e.g. because of critical security issues) or with +an extensive deprecation period. Issues and requests against **stable** libraries +are addressed with the highest priority. -This library is considered to be in **beta**. This means it is expected to be -mostly stable while we work toward a general availability release; however, -complete stability is not guaranteed. We will address issues and requests -against beta libraries with a high priority. From 3c70fd4d4999f9e81c6034b747c902e2891ab971 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 25 Mar 2022 16:02:13 +0000 Subject: [PATCH 163/254] chore(main): release 1.2.0 (#19) :robot: I have created a release *beep* *boop* --- ## [1.2.0](https://github.com/googleapis/nodejs-dataplex/compare/v1.1.0...v1.2.0) (2022-03-24) ### Features * promote to stable ([#18](https://github.com/googleapis/nodejs-dataplex/issues/18)) ([a66995c](https://github.com/googleapis/nodejs-dataplex/commit/a66995c55005f941e1d43ca2befca1b497c6d9d4)), closes [#6](https://github.com/googleapis/nodejs-dataplex/issues/6) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-dataplex/CHANGELOG.md | 7 +++++++ packages/google-cloud-dataplex/package.json | 2 +- packages/google-cloud-dataplex/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-dataplex/CHANGELOG.md b/packages/google-cloud-dataplex/CHANGELOG.md index 7dceac53d21..b94ae6ff375 100644 --- a/packages/google-cloud-dataplex/CHANGELOG.md +++ b/packages/google-cloud-dataplex/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.2.0](https://github.com/googleapis/nodejs-dataplex/compare/v1.1.0...v1.2.0) (2022-03-24) + + +### Features + +* promote to stable ([#18](https://github.com/googleapis/nodejs-dataplex/issues/18)) ([a66995c](https://github.com/googleapis/nodejs-dataplex/commit/a66995c55005f941e1d43ca2befca1b497c6d9d4)), closes [#6](https://github.com/googleapis/nodejs-dataplex/issues/6) + ## [1.1.0](https://github.com/googleapis/nodejs-dataplex/compare/v1.0.0...v1.1.0) (2022-02-16) diff --git a/packages/google-cloud-dataplex/package.json b/packages/google-cloud-dataplex/package.json index eac1be48a30..97ba96fb86e 100644 --- a/packages/google-cloud-dataplex/package.json +++ b/packages/google-cloud-dataplex/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/dataplex", - "version": "1.1.0", + "version": "1.2.0", "description": "dataplex client for Node.js", "repository": "googleapis/nodejs-dataplex", "license": "Apache-2.0", diff --git a/packages/google-cloud-dataplex/samples/package.json b/packages/google-cloud-dataplex/samples/package.json index 1cced7f99de..e346e7ee2ce 100644 --- a/packages/google-cloud-dataplex/samples/package.json +++ b/packages/google-cloud-dataplex/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/dataplex": "^1.1.0" + "@google-cloud/dataplex": "^1.2.0" }, "devDependencies": { "c8": "^7.1.0", From b82ec36d281d31bd2a25737bda27710657aad319 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Fri, 25 Mar 2022 09:38:30 -0700 Subject: [PATCH 164/254] chore: fix api_shortname in repo-metadata (#22) --- packages/google-cloud-dataplex/.repo-metadata.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-dataplex/.repo-metadata.json b/packages/google-cloud-dataplex/.repo-metadata.json index 27a8ce63e91..9c3f4dcabb9 100644 --- a/packages/google-cloud-dataplex/.repo-metadata.json +++ b/packages/google-cloud-dataplex/.repo-metadata.json @@ -11,5 +11,6 @@ "api_id": "dataplex.googleapis.com", "default_version": "v1", "requires_billing": true, - "library_type": "GAPIC_AUTO" + "library_type": "GAPIC_AUTO", + "api_shortname": "dataplex" } From 4b2593c824d2f95fd0337f8fc5ff1d3eac5a5f23 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 8 Apr 2022 11:19:00 -0700 Subject: [PATCH 165/254] docs: Cloud Deploy API Platform Logging documentation (#39) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs:Cloud Deploy API Platform Logging documentation feat: Add support for Anthos worker pool. PiperOrigin-RevId: 439623824 Source-Link: https://github.com/googleapis/googleapis/commit/43184df871e92765241e32402d67fd970bc97773 Source-Link: https://github.com/googleapis/googleapis-gen/commit/a6ce41a8759c6618f1df9b631a200c54a12c71d5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYTZjZTQxYTg3NTljNjYxOGYxZGY5YjYzMWEyMDBjNTRhMTJjNzFkNSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot Co-authored-by: Jeffrey Rennie --- .../google/cloud/deploy/v1/cloud_deploy.proto | 199 +- ...eliverypipeline_notification_payload.proto | 38 + .../google/cloud/deploy/v1/log_enums.proto | 34 + .../v1/release_notification_payload.proto | 38 + .../deploy/v1/release_render_payload.proto | 33 + .../v1/rollout_notification_payload.proto | 47 + .../v1/target_notification_payload.proto | 38 + .../google-cloud-deploy/protos/protos.d.ts | 693 ++++++- packages/google-cloud-deploy/protos/protos.js | 1782 ++++++++++++++++- .../google-cloud-deploy/protos/protos.json | 194 +- .../cloud_deploy.list_delivery_pipelines.js | 2 +- .../v1/cloud_deploy.list_releases.js | 2 +- .../v1/cloud_deploy.list_rollouts.js | 2 +- .../generated/v1/cloud_deploy.list_targets.js | 2 +- .../src/v1/cloud_deploy_client.ts | 79 +- .../src/v1/cloud_deploy_proto_list.json | 8 +- .../test/gapic_cloud_deploy_v1.ts | 64 + 17 files changed, 3151 insertions(+), 104 deletions(-) create mode 100644 packages/google-cloud-deploy/protos/google/cloud/deploy/v1/deliverypipeline_notification_payload.proto create mode 100644 packages/google-cloud-deploy/protos/google/cloud/deploy/v1/log_enums.proto create mode 100644 packages/google-cloud-deploy/protos/google/cloud/deploy/v1/release_notification_payload.proto create mode 100644 packages/google-cloud-deploy/protos/google/cloud/deploy/v1/release_render_payload.proto create mode 100644 packages/google-cloud-deploy/protos/google/cloud/deploy/v1/rollout_notification_payload.proto create mode 100644 packages/google-cloud-deploy/protos/google/cloud/deploy/v1/target_notification_payload.proto diff --git a/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/cloud_deploy.proto b/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/cloud_deploy.proto index ebdfb8891a3..cf3ebcbe1de 100644 --- a/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/cloud_deploy.proto +++ b/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/cloud_deploy.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -45,6 +45,10 @@ option (google.api.resource_definition) = { type: "cloudbuild.googleapis.com/WorkerPool" pattern: "projects/{project}/locations/{location}/workerPools/{worker_pool}" }; +option (google.api.resource_definition) = { + type: "gkehub.googleapis.com/Membership" + pattern: "projects/{project}/locations/{location}/memberships/{membership}" +}; // CloudDeploy service creates and manages Continuous Delivery operations // on Google Cloud Platform via Skaffold (https://skaffold.dev). @@ -264,10 +268,16 @@ message DeliveryPipeline { // Labels are attributes that can be set and used by both the // user and by Google Cloud Deploy. Labels must meet the following - // constraints: Each resource is limited to 64 labels. Keys must conform to - // the regexp: `[a-zA-Z][a-zA-Z0-9_-]{0,62}`. Values must conform to the - // regexp: `[a-zA-Z0-9_-]{0,63}`. Both keys and values are additionally - // constrained to be <= 128 bytes in size. + // constraints: + // + // * Keys and values can contain only lowercase letters, numeric characters, + // underscores, and dashes. + // * All characters must use UTF-8 encoding, and international characters are + // allowed. + // * Keys must start with a lowercase letter or international character. + // * Each resource is limited to a maximum of 64 labels. + // + // Both keys and values are additionally constrained to be <= 128 bytes. map labels = 5; // Output only. Time at which the pipeline was created. @@ -304,9 +314,9 @@ message Stage { // The target_id to which this stage points. This field refers exclusively to // the last segment of a target name. For example, this field would just be // `my-target` (rather than - // `projects/project/deliveryPipelines/pipeline/targets/my-target`). The - // parent `DeliveryPipeline` of the `Target` is inferred to be the parent - // `DeliveryPipeline` of the `Release` in which this `Stage` lives. + // `projects/project/locations/location/targets/my-target`). The location of + // the `Target` is inferred to be the same as the location of the + // `DeliveryPipeline` that contains this `Stage`. string target_id = 1; // Skaffold profiles to use when rendering the manifest for this stage's @@ -376,7 +386,7 @@ message ListDeliveryPipelinesRequest { // the call that provided the page token. string page_token = 3; - // Filter builds to be returned. See https://google.aip.dev/160 for more + // Filter pipelines to be returned. See https://google.aip.dev/160 for more // details. string filter = 4; @@ -537,8 +547,8 @@ message Target { pattern: "projects/{project}/locations/{location}/targets/{target}" }; - // Optional. Name of the `Target`. Format is projects/{project}/locations/{location}/ - // deliveryPipelines/{deliveryPipeline}/targets/[a-z][a-z0-9\-]{0,62}. + // Optional. Name of the `Target`. Format is + // projects/{project}/locations/{location}/targets/[a-z][a-z0-9\-]{0,62}. string name = 1 [(google.api.field_behavior) = OPTIONAL]; // Output only. Resource id of the `Target`. @@ -558,10 +568,16 @@ message Target { // Optional. Labels are attributes that can be set and used by both the // user and by Google Cloud Deploy. Labels must meet the following - // constraints: Each resource is limited to 64 labels. Keys must conform to - // the regexp: `[a-zA-Z][a-zA-Z0-9_-]{0,62}`. Values must conform to the - // regexp: `[a-zA-Z0-9_-]{0,63}`. Both keys and values are additionally - // constrained to be <= 128 bytes in size. + // constraints: + // + // * Keys and values can contain only lowercase letters, numeric characters, + // underscores, and dashes. + // * All characters must use UTF-8 encoding, and international characters are + // allowed. + // * Keys must start with a lowercase letter or international character. + // * Each resource is limited to a maximum of 64 labels. + // + // Both keys and values are additionally constrained to be <= 128 bytes. map labels = 6 [(google.api.field_behavior) = OPTIONAL]; // Optional. Whether or not the `Target` requires approval. @@ -578,6 +594,9 @@ message Target { oneof deployment_target { // Information specifying a GKE Cluster. GkeCluster gke = 15; + + // Information specifying an Anthos Cluster. + AnthosCluster anthos_cluster = 17; } // Optional. This checksum is computed by the server based on the value of other @@ -620,6 +639,28 @@ message ExecutionConfig { // Optional. Use private Cloud Build pool. PrivatePool private_pool = 3 [(google.api.field_behavior) = OPTIONAL]; } + + // Optional. The resource name of the `WorkerPool`, with the format + // `projects/{project}/locations/{location}/workerPools/{worker_pool}`. + // If this optional field is unspecified, the default Cloud Build pool will be + // used. + string worker_pool = 4 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/WorkerPool" + } + ]; + + // Optional. Google service account to use for execution. If unspecified, + // the project execution service account + // (-compute@developer.gserviceaccount.com) is used. + string service_account = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Cloud Storage location in which to store execution outputs. This can + // either be a bucket ("gs://my-bucket") or a path within a bucket + // ("gs://my-bucket/my-dir"). + // If unspecified, a default bucket located in the same region will be used. + string artifact_storage = 6 [(google.api.field_behavior) = OPTIONAL]; } // Execution using the default Cloud Build pool. @@ -666,6 +707,26 @@ message GkeCluster { string cluster = 1 [(google.api.resource_reference) = { type: "container.googleapis.com/Cluster" }]; + + // Optional. If true, `cluster` is accessed using the private IP address of the control + // plane endpoint. Otherwise, the default IP address of the control plane + // endpoint is used. The default IP address is the private IP address for + // clusters with private control-plane endpoints and the public IP address + // otherwise. + // + // Only specify this option when `cluster` is a [private GKE + // cluster](https://cloud.google.com/kubernetes-engine/docs/concepts/private-cluster-concept). + bool internal_ip = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Information specifying an Anthos Cluster. +message AnthosCluster { + // Membership of the GKE Hub-registered cluster to which to apply the Skaffold + // configuration. Format is + // `projects/{project}/locations/{location}/memberships/{membership_name}`. + string membership = 1 [(google.api.resource_reference) = { + type: "gkehub.googleapis.com/Membership" + }]; } // The request object for `ListTargets`. @@ -691,7 +752,7 @@ message ListTargetsRequest { // the call that provided the page token. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Filter builds to be returned. See https://google.aip.dev/160 for more + // Optional. Filter targets to be returned. See https://google.aip.dev/160 for more // details. string filter = 4 [(google.api.field_behavior) = OPTIONAL]; @@ -848,6 +909,21 @@ message Release { pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}" }; + // Valid states of the render operation. + enum RenderState { + // The render state is unspecified. + RENDER_STATE_UNSPECIFIED = 0; + + // All rendering operations have completed successfully. + SUCCEEDED = 1; + + // All rendering operations have completed, and one or more have failed. + FAILED = 2; + + // Rendering has started and is not complete. + IN_PROGRESS = 3; + } + // Details of rendering for a single target. message TargetRender { // Valid states of the render operation. @@ -865,6 +941,21 @@ message Release { IN_PROGRESS = 3; } + // Well-known rendering failures. + enum FailureCause { + // No reason for failure is specified. + FAILURE_CAUSE_UNSPECIFIED = 0; + + // Cloud Build is not available, either because it is not enabled or + // because Cloud Deploy has insufficient permissions. See [required + // permission](/deploy/docs/cloud-deploy-service-account#required_permissions). + CLOUD_BUILD_UNAVAILABLE = 1; + + // The render operation did not complete successfully; check Cloud Build + // logs. + EXECUTION_FAILED = 2; + } + // Output only. The resource name of the Cloud Build `Build` object that is used to // render the manifest for this target. Format is // `projects/{project}/locations/{location}/builds/{build}`. @@ -877,21 +968,10 @@ message Release { // Output only. Current state of the render operation for this Target. TargetRenderState rendering_state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // Valid states of the render operation. - enum RenderState { - // The render state is unspecified. - RENDER_STATE_UNSPECIFIED = 0; - - // All rendering operations have completed successfully. - SUCCEEDED = 1; - // All rendering operations have completed, and one or more have failed. - FAILED = 2; - - // Rendering has started and is not complete. - IN_PROGRESS = 3; + // Output only. Reason this render failed. This will always be unspecified while the + // render in progress. + FailureCause failure_cause = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Optional. Name of the `Release`. Format is projects/{project}/ @@ -913,10 +993,16 @@ message Release { // Labels are attributes that can be set and used by both the // user and by Google Cloud Deploy. Labels must meet the following - // constraints: Each resource is limited to 64 labels. Keys must conform to - // the regexp: `[a-zA-Z][a-zA-Z0-9_-]{0,62}`. Values must conform to the - // regexp: `[a-zA-Z0-9_-]{0,63}`. Both keys and values are additionally - // constrained to be <= 128 bytes in size. + // constraints: + // + // * Keys and values can contain only lowercase letters, numeric characters, + // underscores, and dashes. + // * All characters must use UTF-8 encoding, and international characters are + // allowed. + // * Keys must start with a lowercase letter or international character. + // * Each resource is limited to a maximum of 64 labels. + // + // Both keys and values are additionally constrained to be <= 128 bytes. map labels = 5; // Output only. Time at which the `Release` was created. @@ -940,7 +1026,7 @@ message Release { // Output only. Snapshot of the parent pipeline taken at release creation time. DeliveryPipeline delivery_pipeline_snapshot = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Snapshot of the parent pipeline's targets taken at release creation time. + // Output only. Snapshot of the targets taken at release creation time. repeated Target target_snapshots = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Current state of the render operation. @@ -1015,7 +1101,7 @@ message ListReleasesRequest { // the call that provided the page token. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Filter builds to be returned. See https://google.aip.dev/160 for more + // Optional. Filter releases to be returned. See https://google.aip.dev/160 for more // details. string filter = 4 [(google.api.field_behavior) = OPTIONAL]; @@ -1141,6 +1227,27 @@ message Rollout { PENDING_RELEASE = 7; } + // Well-known deployment failures. + enum FailureCause { + // No reason for failure is specified. + FAILURE_CAUSE_UNSPECIFIED = 0; + + // Cloud Build is not available, either because it is not enabled or because + // Cloud Deploy has insufficient permissions. See [required + // permission](/deploy/docs/cloud-deploy-service-account#required_permissions). + CLOUD_BUILD_UNAVAILABLE = 1; + + // The deploy operation did not complete successfully; check Cloud Build + // logs. + EXECUTION_FAILED = 2; + + // Deployment did not complete within the alloted time. + DEADLINE_EXCEEDED = 3; + + // Release is in a failed state. + RELEASE_FAILED = 4; + } + // Optional. Name of the `Rollout`. Format is projects/{project}/ // locations/{location}/deliveryPipelines/{deliveryPipeline}/ // releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}. @@ -1161,10 +1268,16 @@ message Rollout { // Labels are attributes that can be set and used by both the // user and by Google Cloud Deploy. Labels must meet the following - // constraints: Each resource is limited to 64 labels. Keys must conform to - // the regexp: `[a-zA-Z][a-zA-Z0-9_-]{0,62}`. Values must conform to the - // regexp: `[a-zA-Z0-9_-]{0,63}`. Both keys and values are additionally - // constrained to be <= 128 bytes in size. + // constraints: + // + // * Keys and values can contain only lowercase letters, numeric characters, + // underscores, and dashes. + // * All characters must use UTF-8 encoding, and international characters are + // allowed. + // * Keys must start with a lowercase letter or international character. + // * Each resource is limited to a maximum of 64 labels. + // + // Both keys and values are additionally constrained to be <= 128 bytes. map labels = 5; // Output only. Time at which the `Rollout` was created. @@ -1208,6 +1321,10 @@ message Rollout { // fields, and may be sent on update and delete requests to ensure the // client has an up-to-date value before proceeding. string etag = 16; + + // Output only. The reason this deploy failed. This will always be unspecified while the + // deploy in progress. + FailureCause deploy_failure_cause = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; } // ListRolloutsRequest is the request object used by `ListRollouts`. @@ -1232,7 +1349,7 @@ message ListRolloutsRequest { // the call that provided the page token. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Filter builds to be returned. See https://google.aip.dev/160 for more + // Optional. Filter rollouts to be returned. See https://google.aip.dev/160 for more // details. string filter = 4 [(google.api.field_behavior) = OPTIONAL]; diff --git a/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/deliverypipeline_notification_payload.proto b/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/deliverypipeline_notification_payload.proto new file mode 100644 index 00000000000..5fff2d0876c --- /dev/null +++ b/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/deliverypipeline_notification_payload.proto @@ -0,0 +1,38 @@ +// Copyright 2022 Google LLC +// +// 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. + +syntax = "proto3"; + +package google.cloud.deploy.v1; + +import "google/cloud/deploy/v1/log_enums.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/deploy/v1;deploy"; +option java_multiple_files = true; +option java_outer_classname = "DeliveryPipelineNotificationPayloadProto"; +option java_package = "com.google.cloud.deploy.v1"; + +// Payload proto for "clouddeploy.googleapis.com/deliverypipeline_notification" +// Platform Log event that describes the failure to send delivery pipeline +// status change Pub/Sub notification. +message DeliveryPipelineNotificationEvent { + // Debug message for when a notification fails to send. + string message = 1; + + // The name of the `Delivery Pipeline`. + string delivery_pipeline = 2; + + // Type of this notification, e.g. for a Pub/Sub failure. + Type type = 3; +} diff --git a/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/log_enums.proto b/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/log_enums.proto new file mode 100644 index 00000000000..cd6a32ea4b4 --- /dev/null +++ b/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/log_enums.proto @@ -0,0 +1,34 @@ +// Copyright 2022 Google LLC +// +// 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. + +syntax = "proto3"; + +package google.cloud.deploy.v1; + +option go_package = "google.golang.org/genproto/googleapis/cloud/deploy/v1;deploy"; +option java_multiple_files = true; +option java_outer_classname = "LogEnumsProto"; +option java_package = "com.google.cloud.deploy.v1"; + +// Type indicates the type of the log entry and can be used as a filter. +enum Type { + // Type is unspecified. + TYPE_UNSPECIFIED = 0; + + // A Pub/Sub notification failed to be sent. + TYPE_PUBSUB_NOTIFICATION_FAILURE = 1; + + // Release render status changed notification. + TYPE_RENDER_STATUES_CHANGE = 2; +} diff --git a/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/release_notification_payload.proto b/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/release_notification_payload.proto new file mode 100644 index 00000000000..0383b8e566b --- /dev/null +++ b/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/release_notification_payload.proto @@ -0,0 +1,38 @@ +// Copyright 2022 Google LLC +// +// 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. + +syntax = "proto3"; + +package google.cloud.deploy.v1; + +import "google/cloud/deploy/v1/log_enums.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/deploy/v1;deploy"; +option java_multiple_files = true; +option java_outer_classname = "ReleaseNotificationPayloadProto"; +option java_package = "com.google.cloud.deploy.v1"; + +// Payload proto for "clouddeploy.googleapis.com/release_notification" +// Platform Log event that describes the failure to send release status change +// Pub/Sub notification. +message ReleaseNotificationEvent { + // Debug message for when a notification fails to send. + string message = 1; + + // The name of the `Release`. + string release = 2; + + // Type of this notification, e.g. for a Pub/Sub failure. + Type type = 3; +} diff --git a/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/release_render_payload.proto b/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/release_render_payload.proto new file mode 100644 index 00000000000..414e72ded34 --- /dev/null +++ b/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/release_render_payload.proto @@ -0,0 +1,33 @@ +// Copyright 2022 Google LLC +// +// 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. + +syntax = "proto3"; + +package google.cloud.deploy.v1; + +option go_package = "google.golang.org/genproto/googleapis/cloud/deploy/v1;deploy"; +option java_multiple_files = true; +option java_outer_classname = "ReleaseRenderPayloadProto"; +option java_package = "com.google.cloud.deploy.v1"; + +// Payload proto for "clouddeploy.googleapis.com/release_render" +// Platform Log event that describes the render status change. +message ReleaseRenderEvent { + // Debug message for when a render transition occurs. Provides further + // details as rendering progresses through render states. + string message = 1; + + // The name of the `Release`. + string release = 2; +} diff --git a/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/rollout_notification_payload.proto b/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/rollout_notification_payload.proto new file mode 100644 index 00000000000..10f6864f97c --- /dev/null +++ b/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/rollout_notification_payload.proto @@ -0,0 +1,47 @@ +// Copyright 2022 Google LLC +// +// 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. + +syntax = "proto3"; + +package google.cloud.deploy.v1; + +import "google/cloud/deploy/v1/log_enums.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/deploy/v1;deploy"; +option java_multiple_files = true; +option java_outer_classname = "RolloutNotificationPayloadProto"; +option java_package = "com.google.cloud.deploy.v1"; + +// Payload proto for "clouddeploy.googleapis.com/rollout_notification" +// Platform Log event that describes the failure to send rollout status change +// Pub/Sub notification. +message RolloutNotificationEvent { + // Debug message for when a notification fails to send. + string message = 1; + + // Unique identifier of the `DeliveryPipeline`. + string pipeline_uid = 2; + + // Unique identifier of the `Release`. + string release_uid = 3; + + // The name of the `Rollout`. + string rollout = 4; + + // Type of this notification, e.g. for a Pub/Sub failure. + Type type = 5; + + // ID of the `Target` that the rollout is deployed to. + string target_id = 6; +} diff --git a/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/target_notification_payload.proto b/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/target_notification_payload.proto new file mode 100644 index 00000000000..d121cdb8ded --- /dev/null +++ b/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/target_notification_payload.proto @@ -0,0 +1,38 @@ +// Copyright 2022 Google LLC +// +// 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. + +syntax = "proto3"; + +package google.cloud.deploy.v1; + +import "google/cloud/deploy/v1/log_enums.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/deploy/v1;deploy"; +option java_multiple_files = true; +option java_outer_classname = "TargetNotificationPayloadProto"; +option java_package = "com.google.cloud.deploy.v1"; + +// Payload proto for "clouddeploy.googleapis.com/target_notification" +// Platform Log event that describes the failure to send target status change +// Pub/Sub notification. +message TargetNotificationEvent { + // Debug message for when a notification fails to send. + string message = 1; + + // The name of the `Target`. + string target = 2; + + // Type of this notification, e.g. for a Pub/Sub failure. + Type type = 3; +} diff --git a/packages/google-cloud-deploy/protos/protos.d.ts b/packages/google-cloud-deploy/protos/protos.d.ts index 152c473f28c..510d9277f59 100644 --- a/packages/google-cloud-deploy/protos/protos.d.ts +++ b/packages/google-cloud-deploy/protos/protos.d.ts @@ -1742,6 +1742,9 @@ export namespace google { /** Target gke */ gke?: (google.cloud.deploy.v1.IGkeCluster|null); + /** Target anthosCluster */ + anthosCluster?: (google.cloud.deploy.v1.IAnthosCluster|null); + /** Target etag */ etag?: (string|null); @@ -1788,6 +1791,9 @@ export namespace google { /** Target gke. */ public gke?: (google.cloud.deploy.v1.IGkeCluster|null); + /** Target anthosCluster. */ + public anthosCluster?: (google.cloud.deploy.v1.IAnthosCluster|null); + /** Target etag. */ public etag: string; @@ -1795,7 +1801,7 @@ export namespace google { public executionConfigs: google.cloud.deploy.v1.IExecutionConfig[]; /** Target deploymentTarget. */ - public deploymentTarget?: "gke"; + public deploymentTarget?: ("gke"|"anthosCluster"); /** * Creates a new Target instance using the specified properties. @@ -1879,6 +1885,15 @@ export namespace google { /** ExecutionConfig privatePool */ privatePool?: (google.cloud.deploy.v1.IPrivatePool|null); + + /** ExecutionConfig workerPool */ + workerPool?: (string|null); + + /** ExecutionConfig serviceAccount */ + serviceAccount?: (string|null); + + /** ExecutionConfig artifactStorage */ + artifactStorage?: (string|null); } /** Represents an ExecutionConfig. */ @@ -1899,6 +1914,15 @@ export namespace google { /** ExecutionConfig privatePool. */ public privatePool?: (google.cloud.deploy.v1.IPrivatePool|null); + /** ExecutionConfig workerPool. */ + public workerPool: string; + + /** ExecutionConfig serviceAccount. */ + public serviceAccount: string; + + /** ExecutionConfig artifactStorage. */ + public artifactStorage: string; + /** ExecutionConfig executionEnvironment. */ public executionEnvironment?: ("defaultPool"|"privatePool"); @@ -2186,6 +2210,9 @@ export namespace google { /** GkeCluster cluster */ cluster?: (string|null); + + /** GkeCluster internalIp */ + internalIp?: (boolean|null); } /** Represents a GkeCluster. */ @@ -2200,6 +2227,9 @@ export namespace google { /** GkeCluster cluster. */ public cluster: string; + /** GkeCluster internalIp. */ + public internalIp: boolean; + /** * Creates a new GkeCluster instance using the specified properties. * @param [properties] Properties to set @@ -2271,6 +2301,96 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** Properties of an AnthosCluster. */ + interface IAnthosCluster { + + /** AnthosCluster membership */ + membership?: (string|null); + } + + /** Represents an AnthosCluster. */ + class AnthosCluster implements IAnthosCluster { + + /** + * Constructs a new AnthosCluster. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IAnthosCluster); + + /** AnthosCluster membership. */ + public membership: string; + + /** + * Creates a new AnthosCluster instance using the specified properties. + * @param [properties] Properties to set + * @returns AnthosCluster instance + */ + public static create(properties?: google.cloud.deploy.v1.IAnthosCluster): google.cloud.deploy.v1.AnthosCluster; + + /** + * Encodes the specified AnthosCluster message. Does not implicitly {@link google.cloud.deploy.v1.AnthosCluster.verify|verify} messages. + * @param message AnthosCluster message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IAnthosCluster, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnthosCluster message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AnthosCluster.verify|verify} messages. + * @param message AnthosCluster message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IAnthosCluster, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnthosCluster message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnthosCluster + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.AnthosCluster; + + /** + * Decodes an AnthosCluster message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnthosCluster + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.AnthosCluster; + + /** + * Verifies an AnthosCluster message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AnthosCluster message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnthosCluster + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.AnthosCluster; + + /** + * Creates a plain object from an AnthosCluster message. Also converts values to other types if specified. + * @param message AnthosCluster + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.AnthosCluster, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnthosCluster to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a ListTargetsRequest. */ interface IListTargetsRequest { @@ -3113,6 +3233,14 @@ export namespace google { namespace Release { + /** RenderState enum. */ + enum RenderState { + RENDER_STATE_UNSPECIFIED = 0, + SUCCEEDED = 1, + FAILED = 2, + IN_PROGRESS = 3 + } + /** Properties of a TargetRender. */ interface ITargetRender { @@ -3121,6 +3249,9 @@ export namespace google { /** TargetRender renderingState */ renderingState?: (google.cloud.deploy.v1.Release.TargetRender.TargetRenderState|keyof typeof google.cloud.deploy.v1.Release.TargetRender.TargetRenderState|null); + + /** TargetRender failureCause */ + failureCause?: (google.cloud.deploy.v1.Release.TargetRender.FailureCause|keyof typeof google.cloud.deploy.v1.Release.TargetRender.FailureCause|null); } /** Represents a TargetRender. */ @@ -3138,6 +3269,9 @@ export namespace google { /** TargetRender renderingState. */ public renderingState: (google.cloud.deploy.v1.Release.TargetRender.TargetRenderState|keyof typeof google.cloud.deploy.v1.Release.TargetRender.TargetRenderState); + /** TargetRender failureCause. */ + public failureCause: (google.cloud.deploy.v1.Release.TargetRender.FailureCause|keyof typeof google.cloud.deploy.v1.Release.TargetRender.FailureCause); + /** * Creates a new TargetRender instance using the specified properties. * @param [properties] Properties to set @@ -3218,14 +3352,13 @@ export namespace google { FAILED = 2, IN_PROGRESS = 3 } - } - /** RenderState enum. */ - enum RenderState { - RENDER_STATE_UNSPECIFIED = 0, - SUCCEEDED = 1, - FAILED = 2, - IN_PROGRESS = 3 + /** FailureCause enum. */ + enum FailureCause { + FAILURE_CAUSE_UNSPECIFIED = 0, + CLOUD_BUILD_UNAVAILABLE = 1, + EXECUTION_FAILED = 2 + } } } @@ -3900,6 +4033,9 @@ export namespace google { /** Rollout etag */ etag?: (string|null); + + /** Rollout deployFailureCause */ + deployFailureCause?: (google.cloud.deploy.v1.Rollout.FailureCause|keyof typeof google.cloud.deploy.v1.Rollout.FailureCause|null); } /** Represents a Rollout. */ @@ -3959,6 +4095,9 @@ export namespace google { /** Rollout etag. */ public etag: string; + /** Rollout deployFailureCause. */ + public deployFailureCause: (google.cloud.deploy.v1.Rollout.FailureCause|keyof typeof google.cloud.deploy.v1.Rollout.FailureCause); + /** * Creates a new Rollout instance using the specified properties. * @param [properties] Properties to set @@ -4052,6 +4191,15 @@ export namespace google { PENDING = 6, PENDING_RELEASE = 7 } + + /** FailureCause enum. */ + enum FailureCause { + FAILURE_CAUSE_UNSPECIFIED = 0, + CLOUD_BUILD_UNAVAILABLE = 1, + EXECUTION_FAILED = 2, + DEADLINE_EXCEEDED = 3, + RELEASE_FAILED = 4 + } } /** Properties of a ListRolloutsRequest. */ @@ -5067,6 +5215,535 @@ export namespace google { */ public toJSON(): { [k: string]: any }; } + + /** Properties of a DeliveryPipelineNotificationEvent. */ + interface IDeliveryPipelineNotificationEvent { + + /** DeliveryPipelineNotificationEvent message */ + message?: (string|null); + + /** DeliveryPipelineNotificationEvent deliveryPipeline */ + deliveryPipeline?: (string|null); + + /** DeliveryPipelineNotificationEvent type */ + type?: (google.cloud.deploy.v1.Type|keyof typeof google.cloud.deploy.v1.Type|null); + } + + /** Represents a DeliveryPipelineNotificationEvent. */ + class DeliveryPipelineNotificationEvent implements IDeliveryPipelineNotificationEvent { + + /** + * Constructs a new DeliveryPipelineNotificationEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IDeliveryPipelineNotificationEvent); + + /** DeliveryPipelineNotificationEvent message. */ + public message: string; + + /** DeliveryPipelineNotificationEvent deliveryPipeline. */ + public deliveryPipeline: string; + + /** DeliveryPipelineNotificationEvent type. */ + public type: (google.cloud.deploy.v1.Type|keyof typeof google.cloud.deploy.v1.Type); + + /** + * Creates a new DeliveryPipelineNotificationEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns DeliveryPipelineNotificationEvent instance + */ + public static create(properties?: google.cloud.deploy.v1.IDeliveryPipelineNotificationEvent): google.cloud.deploy.v1.DeliveryPipelineNotificationEvent; + + /** + * Encodes the specified DeliveryPipelineNotificationEvent message. Does not implicitly {@link google.cloud.deploy.v1.DeliveryPipelineNotificationEvent.verify|verify} messages. + * @param message DeliveryPipelineNotificationEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IDeliveryPipelineNotificationEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeliveryPipelineNotificationEvent message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeliveryPipelineNotificationEvent.verify|verify} messages. + * @param message DeliveryPipelineNotificationEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IDeliveryPipelineNotificationEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeliveryPipelineNotificationEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeliveryPipelineNotificationEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.DeliveryPipelineNotificationEvent; + + /** + * Decodes a DeliveryPipelineNotificationEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeliveryPipelineNotificationEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.DeliveryPipelineNotificationEvent; + + /** + * Verifies a DeliveryPipelineNotificationEvent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeliveryPipelineNotificationEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeliveryPipelineNotificationEvent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.DeliveryPipelineNotificationEvent; + + /** + * Creates a plain object from a DeliveryPipelineNotificationEvent message. Also converts values to other types if specified. + * @param message DeliveryPipelineNotificationEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.DeliveryPipelineNotificationEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeliveryPipelineNotificationEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + TYPE_PUBSUB_NOTIFICATION_FAILURE = 1, + TYPE_RENDER_STATUES_CHANGE = 2 + } + + /** Properties of a ReleaseNotificationEvent. */ + interface IReleaseNotificationEvent { + + /** ReleaseNotificationEvent message */ + message?: (string|null); + + /** ReleaseNotificationEvent release */ + release?: (string|null); + + /** ReleaseNotificationEvent type */ + type?: (google.cloud.deploy.v1.Type|keyof typeof google.cloud.deploy.v1.Type|null); + } + + /** Represents a ReleaseNotificationEvent. */ + class ReleaseNotificationEvent implements IReleaseNotificationEvent { + + /** + * Constructs a new ReleaseNotificationEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IReleaseNotificationEvent); + + /** ReleaseNotificationEvent message. */ + public message: string; + + /** ReleaseNotificationEvent release. */ + public release: string; + + /** ReleaseNotificationEvent type. */ + public type: (google.cloud.deploy.v1.Type|keyof typeof google.cloud.deploy.v1.Type); + + /** + * Creates a new ReleaseNotificationEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns ReleaseNotificationEvent instance + */ + public static create(properties?: google.cloud.deploy.v1.IReleaseNotificationEvent): google.cloud.deploy.v1.ReleaseNotificationEvent; + + /** + * Encodes the specified ReleaseNotificationEvent message. Does not implicitly {@link google.cloud.deploy.v1.ReleaseNotificationEvent.verify|verify} messages. + * @param message ReleaseNotificationEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IReleaseNotificationEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReleaseNotificationEvent message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ReleaseNotificationEvent.verify|verify} messages. + * @param message ReleaseNotificationEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IReleaseNotificationEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReleaseNotificationEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReleaseNotificationEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.ReleaseNotificationEvent; + + /** + * Decodes a ReleaseNotificationEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReleaseNotificationEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.ReleaseNotificationEvent; + + /** + * Verifies a ReleaseNotificationEvent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReleaseNotificationEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReleaseNotificationEvent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.ReleaseNotificationEvent; + + /** + * Creates a plain object from a ReleaseNotificationEvent message. Also converts values to other types if specified. + * @param message ReleaseNotificationEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.ReleaseNotificationEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReleaseNotificationEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ReleaseRenderEvent. */ + interface IReleaseRenderEvent { + + /** ReleaseRenderEvent message */ + message?: (string|null); + + /** ReleaseRenderEvent release */ + release?: (string|null); + } + + /** Represents a ReleaseRenderEvent. */ + class ReleaseRenderEvent implements IReleaseRenderEvent { + + /** + * Constructs a new ReleaseRenderEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IReleaseRenderEvent); + + /** ReleaseRenderEvent message. */ + public message: string; + + /** ReleaseRenderEvent release. */ + public release: string; + + /** + * Creates a new ReleaseRenderEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns ReleaseRenderEvent instance + */ + public static create(properties?: google.cloud.deploy.v1.IReleaseRenderEvent): google.cloud.deploy.v1.ReleaseRenderEvent; + + /** + * Encodes the specified ReleaseRenderEvent message. Does not implicitly {@link google.cloud.deploy.v1.ReleaseRenderEvent.verify|verify} messages. + * @param message ReleaseRenderEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IReleaseRenderEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReleaseRenderEvent message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ReleaseRenderEvent.verify|verify} messages. + * @param message ReleaseRenderEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IReleaseRenderEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReleaseRenderEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReleaseRenderEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.ReleaseRenderEvent; + + /** + * Decodes a ReleaseRenderEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReleaseRenderEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.ReleaseRenderEvent; + + /** + * Verifies a ReleaseRenderEvent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReleaseRenderEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReleaseRenderEvent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.ReleaseRenderEvent; + + /** + * Creates a plain object from a ReleaseRenderEvent message. Also converts values to other types if specified. + * @param message ReleaseRenderEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.ReleaseRenderEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReleaseRenderEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RolloutNotificationEvent. */ + interface IRolloutNotificationEvent { + + /** RolloutNotificationEvent message */ + message?: (string|null); + + /** RolloutNotificationEvent pipelineUid */ + pipelineUid?: (string|null); + + /** RolloutNotificationEvent releaseUid */ + releaseUid?: (string|null); + + /** RolloutNotificationEvent rollout */ + rollout?: (string|null); + + /** RolloutNotificationEvent type */ + type?: (google.cloud.deploy.v1.Type|keyof typeof google.cloud.deploy.v1.Type|null); + + /** RolloutNotificationEvent targetId */ + targetId?: (string|null); + } + + /** Represents a RolloutNotificationEvent. */ + class RolloutNotificationEvent implements IRolloutNotificationEvent { + + /** + * Constructs a new RolloutNotificationEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IRolloutNotificationEvent); + + /** RolloutNotificationEvent message. */ + public message: string; + + /** RolloutNotificationEvent pipelineUid. */ + public pipelineUid: string; + + /** RolloutNotificationEvent releaseUid. */ + public releaseUid: string; + + /** RolloutNotificationEvent rollout. */ + public rollout: string; + + /** RolloutNotificationEvent type. */ + public type: (google.cloud.deploy.v1.Type|keyof typeof google.cloud.deploy.v1.Type); + + /** RolloutNotificationEvent targetId. */ + public targetId: string; + + /** + * Creates a new RolloutNotificationEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns RolloutNotificationEvent instance + */ + public static create(properties?: google.cloud.deploy.v1.IRolloutNotificationEvent): google.cloud.deploy.v1.RolloutNotificationEvent; + + /** + * Encodes the specified RolloutNotificationEvent message. Does not implicitly {@link google.cloud.deploy.v1.RolloutNotificationEvent.verify|verify} messages. + * @param message RolloutNotificationEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IRolloutNotificationEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RolloutNotificationEvent message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.RolloutNotificationEvent.verify|verify} messages. + * @param message RolloutNotificationEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IRolloutNotificationEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RolloutNotificationEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RolloutNotificationEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.RolloutNotificationEvent; + + /** + * Decodes a RolloutNotificationEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RolloutNotificationEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.RolloutNotificationEvent; + + /** + * Verifies a RolloutNotificationEvent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RolloutNotificationEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RolloutNotificationEvent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.RolloutNotificationEvent; + + /** + * Creates a plain object from a RolloutNotificationEvent message. Also converts values to other types if specified. + * @param message RolloutNotificationEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.RolloutNotificationEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RolloutNotificationEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a TargetNotificationEvent. */ + interface ITargetNotificationEvent { + + /** TargetNotificationEvent message */ + message?: (string|null); + + /** TargetNotificationEvent target */ + target?: (string|null); + + /** TargetNotificationEvent type */ + type?: (google.cloud.deploy.v1.Type|keyof typeof google.cloud.deploy.v1.Type|null); + } + + /** Represents a TargetNotificationEvent. */ + class TargetNotificationEvent implements ITargetNotificationEvent { + + /** + * Constructs a new TargetNotificationEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.ITargetNotificationEvent); + + /** TargetNotificationEvent message. */ + public message: string; + + /** TargetNotificationEvent target. */ + public target: string; + + /** TargetNotificationEvent type. */ + public type: (google.cloud.deploy.v1.Type|keyof typeof google.cloud.deploy.v1.Type); + + /** + * Creates a new TargetNotificationEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns TargetNotificationEvent instance + */ + public static create(properties?: google.cloud.deploy.v1.ITargetNotificationEvent): google.cloud.deploy.v1.TargetNotificationEvent; + + /** + * Encodes the specified TargetNotificationEvent message. Does not implicitly {@link google.cloud.deploy.v1.TargetNotificationEvent.verify|verify} messages. + * @param message TargetNotificationEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.ITargetNotificationEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TargetNotificationEvent message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.TargetNotificationEvent.verify|verify} messages. + * @param message TargetNotificationEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.ITargetNotificationEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TargetNotificationEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TargetNotificationEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.TargetNotificationEvent; + + /** + * Decodes a TargetNotificationEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TargetNotificationEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.TargetNotificationEvent; + + /** + * Verifies a TargetNotificationEvent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TargetNotificationEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TargetNotificationEvent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.TargetNotificationEvent; + + /** + * Creates a plain object from a TargetNotificationEvent message. Also converts values to other types if specified. + * @param message TargetNotificationEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.TargetNotificationEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TargetNotificationEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } } } diff --git a/packages/google-cloud-deploy/protos/protos.js b/packages/google-cloud-deploy/protos/protos.js index 860307cfa0a..39b25002725 100644 --- a/packages/google-cloud-deploy/protos/protos.js +++ b/packages/google-cloud-deploy/protos/protos.js @@ -3929,6 +3929,7 @@ * @property {google.protobuf.ITimestamp|null} [createTime] Target createTime * @property {google.protobuf.ITimestamp|null} [updateTime] Target updateTime * @property {google.cloud.deploy.v1.IGkeCluster|null} [gke] Target gke + * @property {google.cloud.deploy.v1.IAnthosCluster|null} [anthosCluster] Target anthosCluster * @property {string|null} [etag] Target etag * @property {Array.|null} [executionConfigs] Target executionConfigs */ @@ -4031,6 +4032,14 @@ */ Target.prototype.gke = null; + /** + * Target anthosCluster. + * @member {google.cloud.deploy.v1.IAnthosCluster|null|undefined} anthosCluster + * @memberof google.cloud.deploy.v1.Target + * @instance + */ + Target.prototype.anthosCluster = null; + /** * Target etag. * @member {string} etag @@ -4052,12 +4061,12 @@ /** * Target deploymentTarget. - * @member {"gke"|undefined} deploymentTarget + * @member {"gke"|"anthosCluster"|undefined} deploymentTarget * @memberof google.cloud.deploy.v1.Target * @instance */ Object.defineProperty(Target.prototype, "deploymentTarget", { - get: $util.oneOfGetter($oneOfFields = ["gke"]), + get: $util.oneOfGetter($oneOfFields = ["gke", "anthosCluster"]), set: $util.oneOfSetter($oneOfFields) }); @@ -4112,6 +4121,8 @@ if (message.executionConfigs != null && message.executionConfigs.length) for (var i = 0; i < message.executionConfigs.length; ++i) $root.google.cloud.deploy.v1.ExecutionConfig.encode(message.executionConfigs[i], writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.anthosCluster != null && Object.hasOwnProperty.call(message, "anthosCluster")) + $root.google.cloud.deploy.v1.AnthosCluster.encode(message.anthosCluster, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); return writer; }; @@ -4214,6 +4225,9 @@ case 15: message.gke = $root.google.cloud.deploy.v1.GkeCluster.decode(reader, reader.uint32()); break; + case 17: + message.anthosCluster = $root.google.cloud.deploy.v1.AnthosCluster.decode(reader, reader.uint32()); + break; case 12: message.etag = reader.string(); break; @@ -4307,6 +4321,16 @@ return "gke." + error; } } + if (message.anthosCluster != null && message.hasOwnProperty("anthosCluster")) { + if (properties.deploymentTarget === 1) + return "deploymentTarget: multiple values"; + properties.deploymentTarget = 1; + { + var error = $root.google.cloud.deploy.v1.AnthosCluster.verify(message.anthosCluster); + if (error) + return "anthosCluster." + error; + } + } if (message.etag != null && message.hasOwnProperty("etag")) if (!$util.isString(message.etag)) return "etag: string expected"; @@ -4373,6 +4397,11 @@ throw TypeError(".google.cloud.deploy.v1.Target.gke: object expected"); message.gke = $root.google.cloud.deploy.v1.GkeCluster.fromObject(object.gke); } + if (object.anthosCluster != null) { + if (typeof object.anthosCluster !== "object") + throw TypeError(".google.cloud.deploy.v1.Target.anthosCluster: object expected"); + message.anthosCluster = $root.google.cloud.deploy.v1.AnthosCluster.fromObject(object.anthosCluster); + } if (object.etag != null) message.etag = String(object.etag); if (object.executionConfigs) { @@ -4454,6 +4483,11 @@ for (var j = 0; j < message.executionConfigs.length; ++j) object.executionConfigs[j] = $root.google.cloud.deploy.v1.ExecutionConfig.toObject(message.executionConfigs[j], options); } + if (message.anthosCluster != null && message.hasOwnProperty("anthosCluster")) { + object.anthosCluster = $root.google.cloud.deploy.v1.AnthosCluster.toObject(message.anthosCluster, options); + if (options.oneofs) + object.deploymentTarget = "anthosCluster"; + } return object; }; @@ -4480,6 +4514,9 @@ * @property {Array.|null} [usages] ExecutionConfig usages * @property {google.cloud.deploy.v1.IDefaultPool|null} [defaultPool] ExecutionConfig defaultPool * @property {google.cloud.deploy.v1.IPrivatePool|null} [privatePool] ExecutionConfig privatePool + * @property {string|null} [workerPool] ExecutionConfig workerPool + * @property {string|null} [serviceAccount] ExecutionConfig serviceAccount + * @property {string|null} [artifactStorage] ExecutionConfig artifactStorage */ /** @@ -4522,6 +4559,30 @@ */ ExecutionConfig.prototype.privatePool = null; + /** + * ExecutionConfig workerPool. + * @member {string} workerPool + * @memberof google.cloud.deploy.v1.ExecutionConfig + * @instance + */ + ExecutionConfig.prototype.workerPool = ""; + + /** + * ExecutionConfig serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.deploy.v1.ExecutionConfig + * @instance + */ + ExecutionConfig.prototype.serviceAccount = ""; + + /** + * ExecutionConfig artifactStorage. + * @member {string} artifactStorage + * @memberof google.cloud.deploy.v1.ExecutionConfig + * @instance + */ + ExecutionConfig.prototype.artifactStorage = ""; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -4570,6 +4631,12 @@ $root.google.cloud.deploy.v1.DefaultPool.encode(message.defaultPool, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.privatePool != null && Object.hasOwnProperty.call(message, "privatePool")) $root.google.cloud.deploy.v1.PrivatePool.encode(message.privatePool, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.workerPool != null && Object.hasOwnProperty.call(message, "workerPool")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.workerPool); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.serviceAccount); + if (message.artifactStorage != null && Object.hasOwnProperty.call(message, "artifactStorage")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.artifactStorage); return writer; }; @@ -4620,6 +4687,15 @@ case 3: message.privatePool = $root.google.cloud.deploy.v1.PrivatePool.decode(reader, reader.uint32()); break; + case 4: + message.workerPool = reader.string(); + break; + case 5: + message.serviceAccount = reader.string(); + break; + case 6: + message.artifactStorage = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -4687,6 +4763,15 @@ return "privatePool." + error; } } + if (message.workerPool != null && message.hasOwnProperty("workerPool")) + if (!$util.isString(message.workerPool)) + return "workerPool: string expected"; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.artifactStorage != null && message.hasOwnProperty("artifactStorage")) + if (!$util.isString(message.artifactStorage)) + return "artifactStorage: string expected"; return null; }; @@ -4733,6 +4818,12 @@ throw TypeError(".google.cloud.deploy.v1.ExecutionConfig.privatePool: object expected"); message.privatePool = $root.google.cloud.deploy.v1.PrivatePool.fromObject(object.privatePool); } + if (object.workerPool != null) + message.workerPool = String(object.workerPool); + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.artifactStorage != null) + message.artifactStorage = String(object.artifactStorage); return message; }; @@ -4751,6 +4842,11 @@ var object = {}; if (options.arrays || options.defaults) object.usages = []; + if (options.defaults) { + object.workerPool = ""; + object.serviceAccount = ""; + object.artifactStorage = ""; + } if (message.usages && message.usages.length) { object.usages = []; for (var j = 0; j < message.usages.length; ++j) @@ -4766,6 +4862,12 @@ if (options.oneofs) object.executionEnvironment = "privatePool"; } + if (message.workerPool != null && message.hasOwnProperty("workerPool")) + object.workerPool = message.workerPool; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.artifactStorage != null && message.hasOwnProperty("artifactStorage")) + object.artifactStorage = message.artifactStorage; return object; }; @@ -5248,6 +5350,7 @@ * @memberof google.cloud.deploy.v1 * @interface IGkeCluster * @property {string|null} [cluster] GkeCluster cluster + * @property {boolean|null} [internalIp] GkeCluster internalIp */ /** @@ -5273,6 +5376,14 @@ */ GkeCluster.prototype.cluster = ""; + /** + * GkeCluster internalIp. + * @member {boolean} internalIp + * @memberof google.cloud.deploy.v1.GkeCluster + * @instance + */ + GkeCluster.prototype.internalIp = false; + /** * Creates a new GkeCluster instance using the specified properties. * @function create @@ -5299,6 +5410,8 @@ writer = $Writer.create(); if (message.cluster != null && Object.hasOwnProperty.call(message, "cluster")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.cluster); + if (message.internalIp != null && Object.hasOwnProperty.call(message, "internalIp")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.internalIp); return writer; }; @@ -5336,6 +5449,9 @@ case 1: message.cluster = reader.string(); break; + case 2: + message.internalIp = reader.bool(); + break; default: reader.skipType(tag & 7); break; @@ -5374,6 +5490,9 @@ if (message.cluster != null && message.hasOwnProperty("cluster")) if (!$util.isString(message.cluster)) return "cluster: string expected"; + if (message.internalIp != null && message.hasOwnProperty("internalIp")) + if (typeof message.internalIp !== "boolean") + return "internalIp: boolean expected"; return null; }; @@ -5391,6 +5510,8 @@ var message = new $root.google.cloud.deploy.v1.GkeCluster(); if (object.cluster != null) message.cluster = String(object.cluster); + if (object.internalIp != null) + message.internalIp = Boolean(object.internalIp); return message; }; @@ -5407,10 +5528,14 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.cluster = ""; + object.internalIp = false; + } if (message.cluster != null && message.hasOwnProperty("cluster")) object.cluster = message.cluster; + if (message.internalIp != null && message.hasOwnProperty("internalIp")) + object.internalIp = message.internalIp; return object; }; @@ -5428,6 +5553,193 @@ return GkeCluster; })(); + v1.AnthosCluster = (function() { + + /** + * Properties of an AnthosCluster. + * @memberof google.cloud.deploy.v1 + * @interface IAnthosCluster + * @property {string|null} [membership] AnthosCluster membership + */ + + /** + * Constructs a new AnthosCluster. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents an AnthosCluster. + * @implements IAnthosCluster + * @constructor + * @param {google.cloud.deploy.v1.IAnthosCluster=} [properties] Properties to set + */ + function AnthosCluster(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnthosCluster membership. + * @member {string} membership + * @memberof google.cloud.deploy.v1.AnthosCluster + * @instance + */ + AnthosCluster.prototype.membership = ""; + + /** + * Creates a new AnthosCluster instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.AnthosCluster + * @static + * @param {google.cloud.deploy.v1.IAnthosCluster=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.AnthosCluster} AnthosCluster instance + */ + AnthosCluster.create = function create(properties) { + return new AnthosCluster(properties); + }; + + /** + * Encodes the specified AnthosCluster message. Does not implicitly {@link google.cloud.deploy.v1.AnthosCluster.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.AnthosCluster + * @static + * @param {google.cloud.deploy.v1.IAnthosCluster} message AnthosCluster message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnthosCluster.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.membership != null && Object.hasOwnProperty.call(message, "membership")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.membership); + return writer; + }; + + /** + * Encodes the specified AnthosCluster message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AnthosCluster.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.AnthosCluster + * @static + * @param {google.cloud.deploy.v1.IAnthosCluster} message AnthosCluster message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnthosCluster.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnthosCluster message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.AnthosCluster + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.AnthosCluster} AnthosCluster + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnthosCluster.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.AnthosCluster(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.membership = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnthosCluster message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.AnthosCluster + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.AnthosCluster} AnthosCluster + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnthosCluster.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnthosCluster message. + * @function verify + * @memberof google.cloud.deploy.v1.AnthosCluster + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnthosCluster.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.membership != null && message.hasOwnProperty("membership")) + if (!$util.isString(message.membership)) + return "membership: string expected"; + return null; + }; + + /** + * Creates an AnthosCluster message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.AnthosCluster + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.AnthosCluster} AnthosCluster + */ + AnthosCluster.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.AnthosCluster) + return object; + var message = new $root.google.cloud.deploy.v1.AnthosCluster(); + if (object.membership != null) + message.membership = String(object.membership); + return message; + }; + + /** + * Creates a plain object from an AnthosCluster message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.AnthosCluster + * @static + * @param {google.cloud.deploy.v1.AnthosCluster} message AnthosCluster + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnthosCluster.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.membership = ""; + if (message.membership != null && message.hasOwnProperty("membership")) + object.membership = message.membership; + return object; + }; + + /** + * Converts this AnthosCluster to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.AnthosCluster + * @instance + * @returns {Object.} JSON object + */ + AnthosCluster.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AnthosCluster; + })(); + v1.ListTargetsRequest = (function() { /** @@ -7803,6 +8115,24 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * RenderState enum. + * @name google.cloud.deploy.v1.Release.RenderState + * @enum {number} + * @property {number} RENDER_STATE_UNSPECIFIED=0 RENDER_STATE_UNSPECIFIED value + * @property {number} SUCCEEDED=1 SUCCEEDED value + * @property {number} FAILED=2 FAILED value + * @property {number} IN_PROGRESS=3 IN_PROGRESS value + */ + Release.RenderState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RENDER_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SUCCEEDED"] = 1; + values[valuesById[2] = "FAILED"] = 2; + values[valuesById[3] = "IN_PROGRESS"] = 3; + return values; + })(); + Release.TargetRender = (function() { /** @@ -7811,6 +8141,7 @@ * @interface ITargetRender * @property {string|null} [renderingBuild] TargetRender renderingBuild * @property {google.cloud.deploy.v1.Release.TargetRender.TargetRenderState|null} [renderingState] TargetRender renderingState + * @property {google.cloud.deploy.v1.Release.TargetRender.FailureCause|null} [failureCause] TargetRender failureCause */ /** @@ -7844,6 +8175,14 @@ */ TargetRender.prototype.renderingState = 0; + /** + * TargetRender failureCause. + * @member {google.cloud.deploy.v1.Release.TargetRender.FailureCause} failureCause + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @instance + */ + TargetRender.prototype.failureCause = 0; + /** * Creates a new TargetRender instance using the specified properties. * @function create @@ -7872,6 +8211,8 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.renderingBuild); if (message.renderingState != null && Object.hasOwnProperty.call(message, "renderingState")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.renderingState); + if (message.failureCause != null && Object.hasOwnProperty.call(message, "failureCause")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.failureCause); return writer; }; @@ -7912,6 +8253,9 @@ case 2: message.renderingState = reader.int32(); break; + case 4: + message.failureCause = reader.int32(); + break; default: reader.skipType(tag & 7); break; @@ -7960,6 +8304,15 @@ case 3: break; } + if (message.failureCause != null && message.hasOwnProperty("failureCause")) + switch (message.failureCause) { + default: + return "failureCause: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -7995,6 +8348,20 @@ message.renderingState = 3; break; } + switch (object.failureCause) { + case "FAILURE_CAUSE_UNSPECIFIED": + case 0: + message.failureCause = 0; + break; + case "CLOUD_BUILD_UNAVAILABLE": + case 1: + message.failureCause = 1; + break; + case "EXECUTION_FAILED": + case 2: + message.failureCause = 2; + break; + } return message; }; @@ -8014,11 +8381,14 @@ if (options.defaults) { object.renderingBuild = ""; object.renderingState = options.enums === String ? "TARGET_RENDER_STATE_UNSPECIFIED" : 0; + object.failureCause = options.enums === String ? "FAILURE_CAUSE_UNSPECIFIED" : 0; } if (message.renderingBuild != null && message.hasOwnProperty("renderingBuild")) object.renderingBuild = message.renderingBuild; if (message.renderingState != null && message.hasOwnProperty("renderingState")) object.renderingState = options.enums === String ? $root.google.cloud.deploy.v1.Release.TargetRender.TargetRenderState[message.renderingState] : message.renderingState; + if (message.failureCause != null && message.hasOwnProperty("failureCause")) + object.failureCause = options.enums === String ? $root.google.cloud.deploy.v1.Release.TargetRender.FailureCause[message.failureCause] : message.failureCause; return object; }; @@ -8051,32 +8421,30 @@ return values; })(); + /** + * FailureCause enum. + * @name google.cloud.deploy.v1.Release.TargetRender.FailureCause + * @enum {number} + * @property {number} FAILURE_CAUSE_UNSPECIFIED=0 FAILURE_CAUSE_UNSPECIFIED value + * @property {number} CLOUD_BUILD_UNAVAILABLE=1 CLOUD_BUILD_UNAVAILABLE value + * @property {number} EXECUTION_FAILED=2 EXECUTION_FAILED value + */ + TargetRender.FailureCause = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FAILURE_CAUSE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD_BUILD_UNAVAILABLE"] = 1; + values[valuesById[2] = "EXECUTION_FAILED"] = 2; + return values; + })(); + return TargetRender; })(); - /** - * RenderState enum. - * @name google.cloud.deploy.v1.Release.RenderState - * @enum {number} - * @property {number} RENDER_STATE_UNSPECIFIED=0 RENDER_STATE_UNSPECIFIED value - * @property {number} SUCCEEDED=1 SUCCEEDED value - * @property {number} FAILED=2 FAILED value - * @property {number} IN_PROGRESS=3 IN_PROGRESS value - */ - Release.RenderState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RENDER_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SUCCEEDED"] = 1; - values[valuesById[2] = "FAILED"] = 2; - values[valuesById[3] = "IN_PROGRESS"] = 3; - return values; - })(); - - return Release; - })(); - - v1.BuildArtifact = (function() { - + return Release; + })(); + + v1.BuildArtifact = (function() { + /** * Properties of a BuildArtifact. * @memberof google.cloud.deploy.v1 @@ -9572,6 +9940,7 @@ * @property {string|null} [failureReason] Rollout failureReason * @property {string|null} [deployingBuild] Rollout deployingBuild * @property {string|null} [etag] Rollout etag + * @property {google.cloud.deploy.v1.Rollout.FailureCause|null} [deployFailureCause] Rollout deployFailureCause */ /** @@ -9719,6 +10088,14 @@ */ Rollout.prototype.etag = ""; + /** + * Rollout deployFailureCause. + * @member {google.cloud.deploy.v1.Rollout.FailureCause} deployFailureCause + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.deployFailureCause = 0; + /** * Creates a new Rollout instance using the specified properties. * @function create @@ -9777,6 +10154,8 @@ writer.uint32(/* id 17, wireType 2 =*/138).string(message.deployingBuild); if (message.targetId != null && Object.hasOwnProperty.call(message, "targetId")) writer.uint32(/* id 18, wireType 2 =*/146).string(message.targetId); + if (message.deployFailureCause != null && Object.hasOwnProperty.call(message, "deployFailureCause")) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.deployFailureCause); return writer; }; @@ -9897,6 +10276,9 @@ case 16: message.etag = reader.string(); break; + case 19: + message.deployFailureCause = reader.int32(); + break; default: reader.skipType(tag & 7); break; @@ -10019,6 +10401,17 @@ if (message.etag != null && message.hasOwnProperty("etag")) if (!$util.isString(message.etag)) return "etag: string expected"; + if (message.deployFailureCause != null && message.hasOwnProperty("deployFailureCause")) + switch (message.deployFailureCause) { + default: + return "deployFailureCause: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } return null; }; @@ -10143,6 +10536,28 @@ message.deployingBuild = String(object.deployingBuild); if (object.etag != null) message.etag = String(object.etag); + switch (object.deployFailureCause) { + case "FAILURE_CAUSE_UNSPECIFIED": + case 0: + message.deployFailureCause = 0; + break; + case "CLOUD_BUILD_UNAVAILABLE": + case 1: + message.deployFailureCause = 1; + break; + case "EXECUTION_FAILED": + case 2: + message.deployFailureCause = 2; + break; + case "DEADLINE_EXCEEDED": + case 3: + message.deployFailureCause = 3; + break; + case "RELEASE_FAILED": + case 4: + message.deployFailureCause = 4; + break; + } return message; }; @@ -10178,6 +10593,7 @@ object.etag = ""; object.deployingBuild = ""; object.targetId = ""; + object.deployFailureCause = options.enums === String ? "FAILURE_CAUSE_UNSPECIFIED" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -10218,6 +10634,8 @@ object.deployingBuild = message.deployingBuild; if (message.targetId != null && message.hasOwnProperty("targetId")) object.targetId = message.targetId; + if (message.deployFailureCause != null && message.hasOwnProperty("deployFailureCause")) + object.deployFailureCause = options.enums === String ? $root.google.cloud.deploy.v1.Rollout.FailureCause[message.deployFailureCause] : message.deployFailureCause; return object; }; @@ -10278,6 +10696,26 @@ return values; })(); + /** + * FailureCause enum. + * @name google.cloud.deploy.v1.Rollout.FailureCause + * @enum {number} + * @property {number} FAILURE_CAUSE_UNSPECIFIED=0 FAILURE_CAUSE_UNSPECIFIED value + * @property {number} CLOUD_BUILD_UNAVAILABLE=1 CLOUD_BUILD_UNAVAILABLE value + * @property {number} EXECUTION_FAILED=2 EXECUTION_FAILED value + * @property {number} DEADLINE_EXCEEDED=3 DEADLINE_EXCEEDED value + * @property {number} RELEASE_FAILED=4 RELEASE_FAILED value + */ + Rollout.FailureCause = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FAILURE_CAUSE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD_BUILD_UNAVAILABLE"] = 1; + values[valuesById[2] = "EXECUTION_FAILED"] = 2; + values[valuesById[3] = "DEADLINE_EXCEEDED"] = 3; + values[valuesById[4] = "RELEASE_FAILED"] = 4; + return values; + })(); + return Rollout; })(); @@ -12651,6 +13089,1298 @@ return GetConfigRequest; })(); + v1.DeliveryPipelineNotificationEvent = (function() { + + /** + * Properties of a DeliveryPipelineNotificationEvent. + * @memberof google.cloud.deploy.v1 + * @interface IDeliveryPipelineNotificationEvent + * @property {string|null} [message] DeliveryPipelineNotificationEvent message + * @property {string|null} [deliveryPipeline] DeliveryPipelineNotificationEvent deliveryPipeline + * @property {google.cloud.deploy.v1.Type|null} [type] DeliveryPipelineNotificationEvent type + */ + + /** + * Constructs a new DeliveryPipelineNotificationEvent. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a DeliveryPipelineNotificationEvent. + * @implements IDeliveryPipelineNotificationEvent + * @constructor + * @param {google.cloud.deploy.v1.IDeliveryPipelineNotificationEvent=} [properties] Properties to set + */ + function DeliveryPipelineNotificationEvent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeliveryPipelineNotificationEvent message. + * @member {string} message + * @memberof google.cloud.deploy.v1.DeliveryPipelineNotificationEvent + * @instance + */ + DeliveryPipelineNotificationEvent.prototype.message = ""; + + /** + * DeliveryPipelineNotificationEvent deliveryPipeline. + * @member {string} deliveryPipeline + * @memberof google.cloud.deploy.v1.DeliveryPipelineNotificationEvent + * @instance + */ + DeliveryPipelineNotificationEvent.prototype.deliveryPipeline = ""; + + /** + * DeliveryPipelineNotificationEvent type. + * @member {google.cloud.deploy.v1.Type} type + * @memberof google.cloud.deploy.v1.DeliveryPipelineNotificationEvent + * @instance + */ + DeliveryPipelineNotificationEvent.prototype.type = 0; + + /** + * Creates a new DeliveryPipelineNotificationEvent instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.DeliveryPipelineNotificationEvent + * @static + * @param {google.cloud.deploy.v1.IDeliveryPipelineNotificationEvent=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.DeliveryPipelineNotificationEvent} DeliveryPipelineNotificationEvent instance + */ + DeliveryPipelineNotificationEvent.create = function create(properties) { + return new DeliveryPipelineNotificationEvent(properties); + }; + + /** + * Encodes the specified DeliveryPipelineNotificationEvent message. Does not implicitly {@link google.cloud.deploy.v1.DeliveryPipelineNotificationEvent.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.DeliveryPipelineNotificationEvent + * @static + * @param {google.cloud.deploy.v1.IDeliveryPipelineNotificationEvent} message DeliveryPipelineNotificationEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeliveryPipelineNotificationEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + if (message.deliveryPipeline != null && Object.hasOwnProperty.call(message, "deliveryPipeline")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.deliveryPipeline); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type); + return writer; + }; + + /** + * Encodes the specified DeliveryPipelineNotificationEvent message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeliveryPipelineNotificationEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.DeliveryPipelineNotificationEvent + * @static + * @param {google.cloud.deploy.v1.IDeliveryPipelineNotificationEvent} message DeliveryPipelineNotificationEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeliveryPipelineNotificationEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeliveryPipelineNotificationEvent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.DeliveryPipelineNotificationEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.DeliveryPipelineNotificationEvent} DeliveryPipelineNotificationEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeliveryPipelineNotificationEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.DeliveryPipelineNotificationEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.message = reader.string(); + break; + case 2: + message.deliveryPipeline = reader.string(); + break; + case 3: + message.type = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeliveryPipelineNotificationEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.DeliveryPipelineNotificationEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.DeliveryPipelineNotificationEvent} DeliveryPipelineNotificationEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeliveryPipelineNotificationEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeliveryPipelineNotificationEvent message. + * @function verify + * @memberof google.cloud.deploy.v1.DeliveryPipelineNotificationEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeliveryPipelineNotificationEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.deliveryPipeline != null && message.hasOwnProperty("deliveryPipeline")) + if (!$util.isString(message.deliveryPipeline)) + return "deliveryPipeline: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a DeliveryPipelineNotificationEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.DeliveryPipelineNotificationEvent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.DeliveryPipelineNotificationEvent} DeliveryPipelineNotificationEvent + */ + DeliveryPipelineNotificationEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.DeliveryPipelineNotificationEvent) + return object; + var message = new $root.google.cloud.deploy.v1.DeliveryPipelineNotificationEvent(); + if (object.message != null) + message.message = String(object.message); + if (object.deliveryPipeline != null) + message.deliveryPipeline = String(object.deliveryPipeline); + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "TYPE_PUBSUB_NOTIFICATION_FAILURE": + case 1: + message.type = 1; + break; + case "TYPE_RENDER_STATUES_CHANGE": + case 2: + message.type = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a DeliveryPipelineNotificationEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.DeliveryPipelineNotificationEvent + * @static + * @param {google.cloud.deploy.v1.DeliveryPipelineNotificationEvent} message DeliveryPipelineNotificationEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeliveryPipelineNotificationEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.message = ""; + object.deliveryPipeline = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + } + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.deliveryPipeline != null && message.hasOwnProperty("deliveryPipeline")) + object.deliveryPipeline = message.deliveryPipeline; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.deploy.v1.Type[message.type] : message.type; + return object; + }; + + /** + * Converts this DeliveryPipelineNotificationEvent to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.DeliveryPipelineNotificationEvent + * @instance + * @returns {Object.} JSON object + */ + DeliveryPipelineNotificationEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeliveryPipelineNotificationEvent; + })(); + + /** + * Type enum. + * @name google.cloud.deploy.v1.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} TYPE_PUBSUB_NOTIFICATION_FAILURE=1 TYPE_PUBSUB_NOTIFICATION_FAILURE value + * @property {number} TYPE_RENDER_STATUES_CHANGE=2 TYPE_RENDER_STATUES_CHANGE value + */ + v1.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TYPE_PUBSUB_NOTIFICATION_FAILURE"] = 1; + values[valuesById[2] = "TYPE_RENDER_STATUES_CHANGE"] = 2; + return values; + })(); + + v1.ReleaseNotificationEvent = (function() { + + /** + * Properties of a ReleaseNotificationEvent. + * @memberof google.cloud.deploy.v1 + * @interface IReleaseNotificationEvent + * @property {string|null} [message] ReleaseNotificationEvent message + * @property {string|null} [release] ReleaseNotificationEvent release + * @property {google.cloud.deploy.v1.Type|null} [type] ReleaseNotificationEvent type + */ + + /** + * Constructs a new ReleaseNotificationEvent. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a ReleaseNotificationEvent. + * @implements IReleaseNotificationEvent + * @constructor + * @param {google.cloud.deploy.v1.IReleaseNotificationEvent=} [properties] Properties to set + */ + function ReleaseNotificationEvent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReleaseNotificationEvent message. + * @member {string} message + * @memberof google.cloud.deploy.v1.ReleaseNotificationEvent + * @instance + */ + ReleaseNotificationEvent.prototype.message = ""; + + /** + * ReleaseNotificationEvent release. + * @member {string} release + * @memberof google.cloud.deploy.v1.ReleaseNotificationEvent + * @instance + */ + ReleaseNotificationEvent.prototype.release = ""; + + /** + * ReleaseNotificationEvent type. + * @member {google.cloud.deploy.v1.Type} type + * @memberof google.cloud.deploy.v1.ReleaseNotificationEvent + * @instance + */ + ReleaseNotificationEvent.prototype.type = 0; + + /** + * Creates a new ReleaseNotificationEvent instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.ReleaseNotificationEvent + * @static + * @param {google.cloud.deploy.v1.IReleaseNotificationEvent=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ReleaseNotificationEvent} ReleaseNotificationEvent instance + */ + ReleaseNotificationEvent.create = function create(properties) { + return new ReleaseNotificationEvent(properties); + }; + + /** + * Encodes the specified ReleaseNotificationEvent message. Does not implicitly {@link google.cloud.deploy.v1.ReleaseNotificationEvent.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.ReleaseNotificationEvent + * @static + * @param {google.cloud.deploy.v1.IReleaseNotificationEvent} message ReleaseNotificationEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReleaseNotificationEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + if (message.release != null && Object.hasOwnProperty.call(message, "release")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.release); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type); + return writer; + }; + + /** + * Encodes the specified ReleaseNotificationEvent message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ReleaseNotificationEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.ReleaseNotificationEvent + * @static + * @param {google.cloud.deploy.v1.IReleaseNotificationEvent} message ReleaseNotificationEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReleaseNotificationEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReleaseNotificationEvent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.ReleaseNotificationEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.ReleaseNotificationEvent} ReleaseNotificationEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReleaseNotificationEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ReleaseNotificationEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.message = reader.string(); + break; + case 2: + message.release = reader.string(); + break; + case 3: + message.type = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReleaseNotificationEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.ReleaseNotificationEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.ReleaseNotificationEvent} ReleaseNotificationEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReleaseNotificationEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReleaseNotificationEvent message. + * @function verify + * @memberof google.cloud.deploy.v1.ReleaseNotificationEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReleaseNotificationEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.release != null && message.hasOwnProperty("release")) + if (!$util.isString(message.release)) + return "release: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a ReleaseNotificationEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.ReleaseNotificationEvent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.ReleaseNotificationEvent} ReleaseNotificationEvent + */ + ReleaseNotificationEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ReleaseNotificationEvent) + return object; + var message = new $root.google.cloud.deploy.v1.ReleaseNotificationEvent(); + if (object.message != null) + message.message = String(object.message); + if (object.release != null) + message.release = String(object.release); + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "TYPE_PUBSUB_NOTIFICATION_FAILURE": + case 1: + message.type = 1; + break; + case "TYPE_RENDER_STATUES_CHANGE": + case 2: + message.type = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a ReleaseNotificationEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.ReleaseNotificationEvent + * @static + * @param {google.cloud.deploy.v1.ReleaseNotificationEvent} message ReleaseNotificationEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReleaseNotificationEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.message = ""; + object.release = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + } + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.release != null && message.hasOwnProperty("release")) + object.release = message.release; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.deploy.v1.Type[message.type] : message.type; + return object; + }; + + /** + * Converts this ReleaseNotificationEvent to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.ReleaseNotificationEvent + * @instance + * @returns {Object.} JSON object + */ + ReleaseNotificationEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ReleaseNotificationEvent; + })(); + + v1.ReleaseRenderEvent = (function() { + + /** + * Properties of a ReleaseRenderEvent. + * @memberof google.cloud.deploy.v1 + * @interface IReleaseRenderEvent + * @property {string|null} [message] ReleaseRenderEvent message + * @property {string|null} [release] ReleaseRenderEvent release + */ + + /** + * Constructs a new ReleaseRenderEvent. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a ReleaseRenderEvent. + * @implements IReleaseRenderEvent + * @constructor + * @param {google.cloud.deploy.v1.IReleaseRenderEvent=} [properties] Properties to set + */ + function ReleaseRenderEvent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReleaseRenderEvent message. + * @member {string} message + * @memberof google.cloud.deploy.v1.ReleaseRenderEvent + * @instance + */ + ReleaseRenderEvent.prototype.message = ""; + + /** + * ReleaseRenderEvent release. + * @member {string} release + * @memberof google.cloud.deploy.v1.ReleaseRenderEvent + * @instance + */ + ReleaseRenderEvent.prototype.release = ""; + + /** + * Creates a new ReleaseRenderEvent instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.ReleaseRenderEvent + * @static + * @param {google.cloud.deploy.v1.IReleaseRenderEvent=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ReleaseRenderEvent} ReleaseRenderEvent instance + */ + ReleaseRenderEvent.create = function create(properties) { + return new ReleaseRenderEvent(properties); + }; + + /** + * Encodes the specified ReleaseRenderEvent message. Does not implicitly {@link google.cloud.deploy.v1.ReleaseRenderEvent.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.ReleaseRenderEvent + * @static + * @param {google.cloud.deploy.v1.IReleaseRenderEvent} message ReleaseRenderEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReleaseRenderEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + if (message.release != null && Object.hasOwnProperty.call(message, "release")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.release); + return writer; + }; + + /** + * Encodes the specified ReleaseRenderEvent message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ReleaseRenderEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.ReleaseRenderEvent + * @static + * @param {google.cloud.deploy.v1.IReleaseRenderEvent} message ReleaseRenderEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReleaseRenderEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReleaseRenderEvent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.ReleaseRenderEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.ReleaseRenderEvent} ReleaseRenderEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReleaseRenderEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ReleaseRenderEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.message = reader.string(); + break; + case 2: + message.release = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReleaseRenderEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.ReleaseRenderEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.ReleaseRenderEvent} ReleaseRenderEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReleaseRenderEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReleaseRenderEvent message. + * @function verify + * @memberof google.cloud.deploy.v1.ReleaseRenderEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReleaseRenderEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.release != null && message.hasOwnProperty("release")) + if (!$util.isString(message.release)) + return "release: string expected"; + return null; + }; + + /** + * Creates a ReleaseRenderEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.ReleaseRenderEvent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.ReleaseRenderEvent} ReleaseRenderEvent + */ + ReleaseRenderEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ReleaseRenderEvent) + return object; + var message = new $root.google.cloud.deploy.v1.ReleaseRenderEvent(); + if (object.message != null) + message.message = String(object.message); + if (object.release != null) + message.release = String(object.release); + return message; + }; + + /** + * Creates a plain object from a ReleaseRenderEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.ReleaseRenderEvent + * @static + * @param {google.cloud.deploy.v1.ReleaseRenderEvent} message ReleaseRenderEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReleaseRenderEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.message = ""; + object.release = ""; + } + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.release != null && message.hasOwnProperty("release")) + object.release = message.release; + return object; + }; + + /** + * Converts this ReleaseRenderEvent to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.ReleaseRenderEvent + * @instance + * @returns {Object.} JSON object + */ + ReleaseRenderEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ReleaseRenderEvent; + })(); + + v1.RolloutNotificationEvent = (function() { + + /** + * Properties of a RolloutNotificationEvent. + * @memberof google.cloud.deploy.v1 + * @interface IRolloutNotificationEvent + * @property {string|null} [message] RolloutNotificationEvent message + * @property {string|null} [pipelineUid] RolloutNotificationEvent pipelineUid + * @property {string|null} [releaseUid] RolloutNotificationEvent releaseUid + * @property {string|null} [rollout] RolloutNotificationEvent rollout + * @property {google.cloud.deploy.v1.Type|null} [type] RolloutNotificationEvent type + * @property {string|null} [targetId] RolloutNotificationEvent targetId + */ + + /** + * Constructs a new RolloutNotificationEvent. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a RolloutNotificationEvent. + * @implements IRolloutNotificationEvent + * @constructor + * @param {google.cloud.deploy.v1.IRolloutNotificationEvent=} [properties] Properties to set + */ + function RolloutNotificationEvent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RolloutNotificationEvent message. + * @member {string} message + * @memberof google.cloud.deploy.v1.RolloutNotificationEvent + * @instance + */ + RolloutNotificationEvent.prototype.message = ""; + + /** + * RolloutNotificationEvent pipelineUid. + * @member {string} pipelineUid + * @memberof google.cloud.deploy.v1.RolloutNotificationEvent + * @instance + */ + RolloutNotificationEvent.prototype.pipelineUid = ""; + + /** + * RolloutNotificationEvent releaseUid. + * @member {string} releaseUid + * @memberof google.cloud.deploy.v1.RolloutNotificationEvent + * @instance + */ + RolloutNotificationEvent.prototype.releaseUid = ""; + + /** + * RolloutNotificationEvent rollout. + * @member {string} rollout + * @memberof google.cloud.deploy.v1.RolloutNotificationEvent + * @instance + */ + RolloutNotificationEvent.prototype.rollout = ""; + + /** + * RolloutNotificationEvent type. + * @member {google.cloud.deploy.v1.Type} type + * @memberof google.cloud.deploy.v1.RolloutNotificationEvent + * @instance + */ + RolloutNotificationEvent.prototype.type = 0; + + /** + * RolloutNotificationEvent targetId. + * @member {string} targetId + * @memberof google.cloud.deploy.v1.RolloutNotificationEvent + * @instance + */ + RolloutNotificationEvent.prototype.targetId = ""; + + /** + * Creates a new RolloutNotificationEvent instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.RolloutNotificationEvent + * @static + * @param {google.cloud.deploy.v1.IRolloutNotificationEvent=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.RolloutNotificationEvent} RolloutNotificationEvent instance + */ + RolloutNotificationEvent.create = function create(properties) { + return new RolloutNotificationEvent(properties); + }; + + /** + * Encodes the specified RolloutNotificationEvent message. Does not implicitly {@link google.cloud.deploy.v1.RolloutNotificationEvent.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.RolloutNotificationEvent + * @static + * @param {google.cloud.deploy.v1.IRolloutNotificationEvent} message RolloutNotificationEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RolloutNotificationEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + if (message.pipelineUid != null && Object.hasOwnProperty.call(message, "pipelineUid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pipelineUid); + if (message.releaseUid != null && Object.hasOwnProperty.call(message, "releaseUid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.releaseUid); + if (message.rollout != null && Object.hasOwnProperty.call(message, "rollout")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.rollout); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.targetId != null && Object.hasOwnProperty.call(message, "targetId")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.targetId); + return writer; + }; + + /** + * Encodes the specified RolloutNotificationEvent message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.RolloutNotificationEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.RolloutNotificationEvent + * @static + * @param {google.cloud.deploy.v1.IRolloutNotificationEvent} message RolloutNotificationEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RolloutNotificationEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RolloutNotificationEvent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.RolloutNotificationEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.RolloutNotificationEvent} RolloutNotificationEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RolloutNotificationEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.RolloutNotificationEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.message = reader.string(); + break; + case 2: + message.pipelineUid = reader.string(); + break; + case 3: + message.releaseUid = reader.string(); + break; + case 4: + message.rollout = reader.string(); + break; + case 5: + message.type = reader.int32(); + break; + case 6: + message.targetId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RolloutNotificationEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.RolloutNotificationEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.RolloutNotificationEvent} RolloutNotificationEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RolloutNotificationEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RolloutNotificationEvent message. + * @function verify + * @memberof google.cloud.deploy.v1.RolloutNotificationEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RolloutNotificationEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.pipelineUid != null && message.hasOwnProperty("pipelineUid")) + if (!$util.isString(message.pipelineUid)) + return "pipelineUid: string expected"; + if (message.releaseUid != null && message.hasOwnProperty("releaseUid")) + if (!$util.isString(message.releaseUid)) + return "releaseUid: string expected"; + if (message.rollout != null && message.hasOwnProperty("rollout")) + if (!$util.isString(message.rollout)) + return "rollout: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.targetId != null && message.hasOwnProperty("targetId")) + if (!$util.isString(message.targetId)) + return "targetId: string expected"; + return null; + }; + + /** + * Creates a RolloutNotificationEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.RolloutNotificationEvent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.RolloutNotificationEvent} RolloutNotificationEvent + */ + RolloutNotificationEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.RolloutNotificationEvent) + return object; + var message = new $root.google.cloud.deploy.v1.RolloutNotificationEvent(); + if (object.message != null) + message.message = String(object.message); + if (object.pipelineUid != null) + message.pipelineUid = String(object.pipelineUid); + if (object.releaseUid != null) + message.releaseUid = String(object.releaseUid); + if (object.rollout != null) + message.rollout = String(object.rollout); + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "TYPE_PUBSUB_NOTIFICATION_FAILURE": + case 1: + message.type = 1; + break; + case "TYPE_RENDER_STATUES_CHANGE": + case 2: + message.type = 2; + break; + } + if (object.targetId != null) + message.targetId = String(object.targetId); + return message; + }; + + /** + * Creates a plain object from a RolloutNotificationEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.RolloutNotificationEvent + * @static + * @param {google.cloud.deploy.v1.RolloutNotificationEvent} message RolloutNotificationEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RolloutNotificationEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.message = ""; + object.pipelineUid = ""; + object.releaseUid = ""; + object.rollout = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.targetId = ""; + } + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.pipelineUid != null && message.hasOwnProperty("pipelineUid")) + object.pipelineUid = message.pipelineUid; + if (message.releaseUid != null && message.hasOwnProperty("releaseUid")) + object.releaseUid = message.releaseUid; + if (message.rollout != null && message.hasOwnProperty("rollout")) + object.rollout = message.rollout; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.deploy.v1.Type[message.type] : message.type; + if (message.targetId != null && message.hasOwnProperty("targetId")) + object.targetId = message.targetId; + return object; + }; + + /** + * Converts this RolloutNotificationEvent to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.RolloutNotificationEvent + * @instance + * @returns {Object.} JSON object + */ + RolloutNotificationEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RolloutNotificationEvent; + })(); + + v1.TargetNotificationEvent = (function() { + + /** + * Properties of a TargetNotificationEvent. + * @memberof google.cloud.deploy.v1 + * @interface ITargetNotificationEvent + * @property {string|null} [message] TargetNotificationEvent message + * @property {string|null} [target] TargetNotificationEvent target + * @property {google.cloud.deploy.v1.Type|null} [type] TargetNotificationEvent type + */ + + /** + * Constructs a new TargetNotificationEvent. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a TargetNotificationEvent. + * @implements ITargetNotificationEvent + * @constructor + * @param {google.cloud.deploy.v1.ITargetNotificationEvent=} [properties] Properties to set + */ + function TargetNotificationEvent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TargetNotificationEvent message. + * @member {string} message + * @memberof google.cloud.deploy.v1.TargetNotificationEvent + * @instance + */ + TargetNotificationEvent.prototype.message = ""; + + /** + * TargetNotificationEvent target. + * @member {string} target + * @memberof google.cloud.deploy.v1.TargetNotificationEvent + * @instance + */ + TargetNotificationEvent.prototype.target = ""; + + /** + * TargetNotificationEvent type. + * @member {google.cloud.deploy.v1.Type} type + * @memberof google.cloud.deploy.v1.TargetNotificationEvent + * @instance + */ + TargetNotificationEvent.prototype.type = 0; + + /** + * Creates a new TargetNotificationEvent instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.TargetNotificationEvent + * @static + * @param {google.cloud.deploy.v1.ITargetNotificationEvent=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.TargetNotificationEvent} TargetNotificationEvent instance + */ + TargetNotificationEvent.create = function create(properties) { + return new TargetNotificationEvent(properties); + }; + + /** + * Encodes the specified TargetNotificationEvent message. Does not implicitly {@link google.cloud.deploy.v1.TargetNotificationEvent.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.TargetNotificationEvent + * @static + * @param {google.cloud.deploy.v1.ITargetNotificationEvent} message TargetNotificationEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TargetNotificationEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.target); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type); + return writer; + }; + + /** + * Encodes the specified TargetNotificationEvent message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.TargetNotificationEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.TargetNotificationEvent + * @static + * @param {google.cloud.deploy.v1.ITargetNotificationEvent} message TargetNotificationEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TargetNotificationEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TargetNotificationEvent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.TargetNotificationEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.TargetNotificationEvent} TargetNotificationEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetNotificationEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.TargetNotificationEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.message = reader.string(); + break; + case 2: + message.target = reader.string(); + break; + case 3: + message.type = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TargetNotificationEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.TargetNotificationEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.TargetNotificationEvent} TargetNotificationEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetNotificationEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TargetNotificationEvent message. + * @function verify + * @memberof google.cloud.deploy.v1.TargetNotificationEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TargetNotificationEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.target != null && message.hasOwnProperty("target")) + if (!$util.isString(message.target)) + return "target: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a TargetNotificationEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.TargetNotificationEvent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.TargetNotificationEvent} TargetNotificationEvent + */ + TargetNotificationEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.TargetNotificationEvent) + return object; + var message = new $root.google.cloud.deploy.v1.TargetNotificationEvent(); + if (object.message != null) + message.message = String(object.message); + if (object.target != null) + message.target = String(object.target); + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "TYPE_PUBSUB_NOTIFICATION_FAILURE": + case 1: + message.type = 1; + break; + case "TYPE_RENDER_STATUES_CHANGE": + case 2: + message.type = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a TargetNotificationEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.TargetNotificationEvent + * @static + * @param {google.cloud.deploy.v1.TargetNotificationEvent} message TargetNotificationEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TargetNotificationEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.message = ""; + object.target = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + } + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.target != null && message.hasOwnProperty("target")) + object.target = message.target; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.deploy.v1.Type[message.type] : message.type; + return object; + }; + + /** + * Converts this TargetNotificationEvent to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.TargetNotificationEvent + * @instance + * @returns {Object.} JSON object + */ + TargetNotificationEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TargetNotificationEvent; + })(); + return v1; })(); diff --git a/packages/google-cloud-deploy/protos/protos.json b/packages/google-cloud-deploy/protos/protos.json index b1382894c5d..0420b65e04e 100644 --- a/packages/google-cloud-deploy/protos/protos.json +++ b/packages/google-cloud-deploy/protos/protos.json @@ -10,10 +10,10 @@ "options": { "go_package": "google.golang.org/genproto/googleapis/cloud/deploy/v1;deploy", "java_multiple_files": true, - "java_outer_classname": "CloudDeployProto", + "java_outer_classname": "TargetNotificationPayloadProto", "java_package": "com.google.cloud.deploy.v1", - "(google.api.resource_definition).type": "cloudbuild.googleapis.com/WorkerPool", - "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/workerPools/{worker_pool}" + "(google.api.resource_definition).type": "gkehub.googleapis.com/Membership", + "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/memberships/{membership}" }, "nested": { "CloudDeploy": { @@ -756,7 +756,8 @@ "oneofs": { "deploymentTarget": { "oneof": [ - "gke" + "gke", + "anthosCluster" ] } }, @@ -830,6 +831,10 @@ "type": "GkeCluster", "id": 15 }, + "anthosCluster": { + "type": "AnthosCluster", + "id": 17 + }, "etag": { "type": "string", "id": 12, @@ -875,6 +880,28 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "workerPool": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "cloudbuild.googleapis.com/WorkerPool" + } + }, + "serviceAccount": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "artifactStorage": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -939,6 +966,24 @@ "options": { "(google.api.resource_reference).type": "container.googleapis.com/Cluster" } + }, + "internalIp": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "AnthosCluster": { + "fields": { + "membership": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "gkehub.googleapis.com/Membership" + } } } }, @@ -1247,6 +1292,14 @@ } }, "nested": { + "RenderState": { + "values": { + "RENDER_STATE_UNSPECIFIED": 0, + "SUCCEEDED": 1, + "FAILED": 2, + "IN_PROGRESS": 3 + } + }, "TargetRender": { "fields": { "renderingBuild": { @@ -1263,6 +1316,13 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "failureCause": { + "type": "FailureCause", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { @@ -1273,16 +1333,15 @@ "FAILED": 2, "IN_PROGRESS": 3 } + }, + "FailureCause": { + "values": { + "FAILURE_CAUSE_UNSPECIFIED": 0, + "CLOUD_BUILD_UNAVAILABLE": 1, + "EXECUTION_FAILED": 2 + } } } - }, - "RenderState": { - "values": { - "RENDER_STATE_UNSPECIFIED": 0, - "SUCCEEDED": 1, - "FAILED": 2, - "IN_PROGRESS": 3 - } } } }, @@ -1548,6 +1607,13 @@ "etag": { "type": "string", "id": 16 + }, + "deployFailureCause": { + "type": "FailureCause", + "id": 19, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { @@ -1571,6 +1637,15 @@ "PENDING": 6, "PENDING_RELEASE": 7 } + }, + "FailureCause": { + "values": { + "FAILURE_CAUSE_UNSPECIFIED": 0, + "CLOUD_BUILD_UNAVAILABLE": 1, + "EXECUTION_FAILED": 2, + "DEADLINE_EXCEEDED": 3, + "RELEASE_FAILED": 4 + } } } }, @@ -1809,6 +1884,101 @@ } } } + }, + "DeliveryPipelineNotificationEvent": { + "fields": { + "message": { + "type": "string", + "id": 1 + }, + "deliveryPipeline": { + "type": "string", + "id": 2 + }, + "type": { + "type": "Type", + "id": 3 + } + } + }, + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "TYPE_PUBSUB_NOTIFICATION_FAILURE": 1, + "TYPE_RENDER_STATUES_CHANGE": 2 + } + }, + "ReleaseNotificationEvent": { + "fields": { + "message": { + "type": "string", + "id": 1 + }, + "release": { + "type": "string", + "id": 2 + }, + "type": { + "type": "Type", + "id": 3 + } + } + }, + "ReleaseRenderEvent": { + "fields": { + "message": { + "type": "string", + "id": 1 + }, + "release": { + "type": "string", + "id": 2 + } + } + }, + "RolloutNotificationEvent": { + "fields": { + "message": { + "type": "string", + "id": 1 + }, + "pipelineUid": { + "type": "string", + "id": 2 + }, + "releaseUid": { + "type": "string", + "id": 3 + }, + "rollout": { + "type": "string", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "targetId": { + "type": "string", + "id": 6 + } + } + }, + "TargetNotificationEvent": { + "fields": { + "message": { + "type": "string", + "id": 1 + }, + "target": { + "type": "string", + "id": 2 + }, + "type": { + "type": "Type", + "id": 3 + } + } } } } diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js index 8e151552b10..d9f7580b298 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js @@ -45,7 +45,7 @@ function main(parent) { */ // const pageToken = 'abc123' /** - * Filter builds to be returned. See https://google.aip.dev/160 for more + * Filter pipelines to be returned. See https://google.aip.dev/160 for more * details. */ // const filter = 'abc123' diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_releases.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_releases.js index 40505734af7..3141ea20cf6 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_releases.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_releases.js @@ -43,7 +43,7 @@ function main(parent) { */ // const pageToken = 'abc123' /** - * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more + * Optional. Filter releases to be returned. See https://google.aip.dev/160 for more * details. */ // const filter = 'abc123' diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_rollouts.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_rollouts.js index 303cc8c0111..51aa3fccbcf 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_rollouts.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_rollouts.js @@ -43,7 +43,7 @@ function main(parent) { */ // const pageToken = 'abc123' /** - * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more + * Optional. Filter rollouts to be returned. See https://google.aip.dev/160 for more * details. */ // const filter = 'abc123' diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_targets.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_targets.js index 7fcabb476de..c64be81b37e 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_targets.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_targets.js @@ -44,7 +44,7 @@ function main(parent) { */ // const pageToken = 'abc123' /** - * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more + * Optional. Filter targets to be returned. See https://google.aip.dev/160 for more * details. */ // const filter = 'abc123' diff --git a/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts b/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts index b653dd3e2b7..4340ea34823 100644 --- a/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts +++ b/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts @@ -182,6 +182,9 @@ export class CloudDeployClient { locationPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}' ), + membershipPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/memberships/{membership}' + ), projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), @@ -2336,7 +2339,7 @@ export class CloudDeployClient { * When paginating, all other provided parameters match * the call that provided the page token. * @param {string} request.filter - * Filter builds to be returned. See https://google.aip.dev/160 for more + * Filter pipelines to be returned. See https://google.aip.dev/160 for more * details. * @param {string} request.orderBy * Field to sort by. See https://google.aip.dev/132#ordering for more details. @@ -2447,7 +2450,7 @@ export class CloudDeployClient { * When paginating, all other provided parameters match * the call that provided the page token. * @param {string} request.filter - * Filter builds to be returned. See https://google.aip.dev/160 for more + * Filter pipelines to be returned. See https://google.aip.dev/160 for more * details. * @param {string} request.orderBy * Field to sort by. See https://google.aip.dev/132#ordering for more details. @@ -2506,7 +2509,7 @@ export class CloudDeployClient { * When paginating, all other provided parameters match * the call that provided the page token. * @param {string} request.filter - * Filter builds to be returned. See https://google.aip.dev/160 for more + * Filter pipelines to be returned. See https://google.aip.dev/160 for more * details. * @param {string} request.orderBy * Field to sort by. See https://google.aip.dev/132#ordering for more details. @@ -2563,7 +2566,7 @@ export class CloudDeployClient { * When paginating, all other provided parameters match * the call that provided the page token. * @param {string} [request.filter] - * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more + * Optional. Filter targets to be returned. See https://google.aip.dev/160 for more * details. * @param {string} [request.orderBy] * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details. @@ -2665,7 +2668,7 @@ export class CloudDeployClient { * When paginating, all other provided parameters match * the call that provided the page token. * @param {string} [request.filter] - * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more + * Optional. Filter targets to be returned. See https://google.aip.dev/160 for more * details. * @param {string} [request.orderBy] * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details. @@ -2723,7 +2726,7 @@ export class CloudDeployClient { * When paginating, all other provided parameters match * the call that provided the page token. * @param {string} [request.filter] - * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more + * Optional. Filter targets to be returned. See https://google.aip.dev/160 for more * details. * @param {string} [request.orderBy] * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details. @@ -2779,7 +2782,7 @@ export class CloudDeployClient { * When paginating, all other provided parameters match * the call that provided the page token. * @param {string} [request.filter] - * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more + * Optional. Filter releases to be returned. See https://google.aip.dev/160 for more * details. * @param {string} [request.orderBy] * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details. @@ -2882,7 +2885,7 @@ export class CloudDeployClient { * When paginating, all other provided parameters match * the call that provided the page token. * @param {string} [request.filter] - * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more + * Optional. Filter releases to be returned. See https://google.aip.dev/160 for more * details. * @param {string} [request.orderBy] * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details. @@ -2939,7 +2942,7 @@ export class CloudDeployClient { * When paginating, all other provided parameters match * the call that provided the page token. * @param {string} [request.filter] - * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more + * Optional. Filter releases to be returned. See https://google.aip.dev/160 for more * details. * @param {string} [request.orderBy] * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details. @@ -2995,7 +2998,7 @@ export class CloudDeployClient { * When paginating, all other provided parameters match * the call that provided the page token. * @param {string} [request.filter] - * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more + * Optional. Filter rollouts to be returned. See https://google.aip.dev/160 for more * details. * @param {string} [request.orderBy] * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details. @@ -3098,7 +3101,7 @@ export class CloudDeployClient { * When paginating, all other provided parameters match * the call that provided the page token. * @param {string} [request.filter] - * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more + * Optional. Filter rollouts to be returned. See https://google.aip.dev/160 for more * details. * @param {string} [request.orderBy] * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details. @@ -3155,7 +3158,7 @@ export class CloudDeployClient { * When paginating, all other provided parameters match * the call that provided the page token. * @param {string} [request.filter] - * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more + * Optional. Filter rollouts to be returned. See https://google.aip.dev/160 for more * details. * @param {string} [request.orderBy] * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details. @@ -3426,6 +3429,58 @@ export class CloudDeployClient { return this.pathTemplates.locationPathTemplate.match(locationName).location; } + /** + * Return a fully-qualified membership resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} membership + * @returns {string} Resource name string. + */ + membershipPath(project: string, location: string, membership: string) { + return this.pathTemplates.membershipPathTemplate.render({ + project: project, + location: location, + membership: membership, + }); + } + + /** + * Parse the project from Membership resource. + * + * @param {string} membershipName + * A fully-qualified path representing Membership resource. + * @returns {string} A string representing the project. + */ + matchProjectFromMembershipName(membershipName: string) { + return this.pathTemplates.membershipPathTemplate.match(membershipName) + .project; + } + + /** + * Parse the location from Membership resource. + * + * @param {string} membershipName + * A fully-qualified path representing Membership resource. + * @returns {string} A string representing the location. + */ + matchLocationFromMembershipName(membershipName: string) { + return this.pathTemplates.membershipPathTemplate.match(membershipName) + .location; + } + + /** + * Parse the membership from Membership resource. + * + * @param {string} membershipName + * A fully-qualified path representing Membership resource. + * @returns {string} A string representing the membership. + */ + matchMembershipFromMembershipName(membershipName: string) { + return this.pathTemplates.membershipPathTemplate.match(membershipName) + .membership; + } + /** * Return a fully-qualified project resource name string. * diff --git a/packages/google-cloud-deploy/src/v1/cloud_deploy_proto_list.json b/packages/google-cloud-deploy/src/v1/cloud_deploy_proto_list.json index 3b48250d236..11f13dd4f69 100644 --- a/packages/google-cloud-deploy/src/v1/cloud_deploy_proto_list.json +++ b/packages/google-cloud-deploy/src/v1/cloud_deploy_proto_list.json @@ -1,3 +1,9 @@ [ - "../../protos/google/cloud/deploy/v1/cloud_deploy.proto" + "../../protos/google/cloud/deploy/v1/cloud_deploy.proto", + "../../protos/google/cloud/deploy/v1/deliverypipeline_notification_payload.proto", + "../../protos/google/cloud/deploy/v1/log_enums.proto", + "../../protos/google/cloud/deploy/v1/release_notification_payload.proto", + "../../protos/google/cloud/deploy/v1/release_render_payload.proto", + "../../protos/google/cloud/deploy/v1/rollout_notification_payload.proto", + "../../protos/google/cloud/deploy/v1/target_notification_payload.proto" ] diff --git a/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts b/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts index d31e863fdd9..7207c05c09a 100644 --- a/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts +++ b/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts @@ -3997,6 +3997,70 @@ describe('v1.CloudDeployClient', () => { }); }); + describe('membership', () => { + const fakePath = '/rendered/path/membership'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + membership: 'membershipValue', + }; + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.membershipPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.membershipPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('membershipPath', () => { + const result = client.membershipPath( + 'projectValue', + 'locationValue', + 'membershipValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.membershipPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromMembershipName', () => { + const result = client.matchProjectFromMembershipName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.membershipPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromMembershipName', () => { + const result = client.matchLocationFromMembershipName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.membershipPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMembershipFromMembershipName', () => { + const result = client.matchMembershipFromMembershipName(fakePath); + assert.strictEqual(result, 'membershipValue'); + assert( + (client.pathTemplates.membershipPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('project', () => { const fakePath = '/rendered/path/project'; const expectedParameters = { From 4089a5ecc7e47727dd8843a46a30c3744fc98898 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 20 Apr 2022 12:35:15 -0700 Subject: [PATCH 166/254] build(node): update client library version in samples metadata (#1356) (#116) * build(node): add feat in node post-processor to add client library version number in snippet metadata Co-authored-by: Benjamin E. Coe Source-Link: https://github.com/googleapis/synthtool/commit/d337b88dd1494365183718a2de0b7b4056b6fdfe Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:d106724ad2a96daa1b8d88de101ba50bdb30b8df62ffa0aa2b451d93b4556641 Co-authored-by: Owl Bot Co-authored-by: Benjamin E. Coe --- ....google.cloud.policytroubleshooter.v1.json | 104 +++++++++--------- 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata.google.cloud.policytroubleshooter.v1.json b/packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata.google.cloud.policytroubleshooter.v1.json index 4f4183725eb..1cf73d2a465 100644 --- a/packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata.google.cloud.policytroubleshooter.v1.json +++ b/packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata.google.cloud.policytroubleshooter.v1.json @@ -1,55 +1,55 @@ { - "clientLibrary": { - "name": "nodejs-policytroubleshooter", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.cloud.policytroubleshooter.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "regionTag": "policytroubleshooter_v1_generated_IamChecker_TroubleshootIamPolicy_async", - "title": "IamChecker troubleshootIamPolicy Sample", - "origin": "API_DEFINITION", - "description": " Checks whether a member has a specific permission for a specific resource, and explains why the member does or does not have that permission.", - "canonical": true, - "file": "iam_checker.troubleshoot_iam_policy.js", - "language": "JAVASCRIPT", - "segments": [ + "clientLibrary": { + "name": "nodejs-policytroubleshooter", + "version": "1.1.1", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.policytroubleshooter.v1", + "version": "v1" + } + ] + }, + "snippets": [ { - "start": 25, - "end": 50, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "TroubleshootIamPolicy", - "fullName": "google.cloud.policytroubleshooter.v1.IamChecker.TroubleshootIamPolicy", - "async": true, - "parameters": [ - { - "name": "access_tuple", - "type": ".google.cloud.policytroubleshooter.v1.AccessTuple" - } - ], - "resultType": ".google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse", - "client": { - "shortName": "IamCheckerClient", - "fullName": "google.cloud.policytroubleshooter.v1.IamCheckerClient" - }, - "method": { - "shortName": "TroubleshootIamPolicy", - "fullName": "google.cloud.policytroubleshooter.v1.IamChecker.TroubleshootIamPolicy", - "service": { - "shortName": "IamChecker", - "fullName": "google.cloud.policytroubleshooter.v1.IamChecker" - } + "regionTag": "policytroubleshooter_v1_generated_IamChecker_TroubleshootIamPolicy_async", + "title": "IamChecker troubleshootIamPolicy Sample", + "origin": "API_DEFINITION", + "description": " Checks whether a member has a specific permission for a specific resource, and explains why the member does or does not have that permission.", + "canonical": true, + "file": "iam_checker.troubleshoot_iam_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "TroubleshootIamPolicy", + "fullName": "google.cloud.policytroubleshooter.v1.IamChecker.TroubleshootIamPolicy", + "async": true, + "parameters": [ + { + "name": "access_tuple", + "type": ".google.cloud.policytroubleshooter.v1.AccessTuple" + } + ], + "resultType": ".google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse", + "client": { + "shortName": "IamCheckerClient", + "fullName": "google.cloud.policytroubleshooter.v1.IamCheckerClient" + }, + "method": { + "shortName": "TroubleshootIamPolicy", + "fullName": "google.cloud.policytroubleshooter.v1.IamChecker.TroubleshootIamPolicy", + "service": { + "shortName": "IamChecker", + "fullName": "google.cloud.policytroubleshooter.v1.IamChecker" + } + } + } } - } - } - ] -} + ] +} \ No newline at end of file From ef47a2ebd5b805d6d20697987e86f1d928aa6e96 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 20 Apr 2022 12:42:56 -0700 Subject: [PATCH 167/254] build(node): update client library version in samples metadata (#1356) (#29) * build(node): add feat in node post-processor to add client library version number in snippet metadata Co-authored-by: Benjamin E. Coe Source-Link: https://github.com/googleapis/synthtool/commit/d337b88dd1494365183718a2de0b7b4056b6fdfe Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:d106724ad2a96daa1b8d88de101ba50bdb30b8df62ffa0aa2b451d93b4556641 Co-authored-by: Owl Bot Co-authored-by: Benjamin E. Coe --- ...pet_metadata.google.cloud.dataplex.v1.json | 4148 ++++++++--------- 1 file changed, 2074 insertions(+), 2074 deletions(-) diff --git a/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json b/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json index 4dc356f23f9..7e52c6deecb 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json +++ b/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json @@ -1,2167 +1,2167 @@ { - "clientLibrary": { - "name": "nodejs-dataplex", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.cloud.dataplex.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "regionTag": "dataplex_v1_generated_ContentService_CreateContent_async", - "title": "ContentService createContent Sample", - "origin": "API_DEFINITION", - "description": " Create a content.", - "canonical": true, - "file": "content_service.create_content.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateContent", - "fullName": "google.cloud.dataplex.v1.ContentService.CreateContent", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "content", - "type": ".google.cloud.dataplex.v1.Content" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.cloud.dataplex.v1.Content", - "client": { - "shortName": "ContentServiceClient", - "fullName": "google.cloud.dataplex.v1.ContentServiceClient" - }, - "method": { - "shortName": "CreateContent", - "fullName": "google.cloud.dataplex.v1.ContentService.CreateContent", - "service": { - "shortName": "ContentService", - "fullName": "google.cloud.dataplex.v1.ContentService" - } - } - } + "clientLibrary": { + "name": "nodejs-dataplex", + "version": "1.2.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.dataplex.v1", + "version": "v1" + } + ] }, - { - "regionTag": "dataplex_v1_generated_ContentService_UpdateContent_async", - "title": "ContentService updateContent Sample", - "origin": "API_DEFINITION", - "description": " Update a content. Only supports full resource update.", - "canonical": true, - "file": "content_service.update_content.js", - "language": "JAVASCRIPT", - "segments": [ + "snippets": [ { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateContent", - "fullName": "google.cloud.dataplex.v1.ContentService.UpdateContent", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "content", - "type": ".google.cloud.dataplex.v1.Content" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.cloud.dataplex.v1.Content", - "client": { - "shortName": "ContentServiceClient", - "fullName": "google.cloud.dataplex.v1.ContentServiceClient" + "regionTag": "dataplex_v1_generated_ContentService_CreateContent_async", + "title": "ContentService createContent Sample", + "origin": "API_DEFINITION", + "description": " Create a content.", + "canonical": true, + "file": "content_service.create_content.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateContent", + "fullName": "google.cloud.dataplex.v1.ContentService.CreateContent", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "content", + "type": ".google.cloud.dataplex.v1.Content" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.dataplex.v1.Content", + "client": { + "shortName": "ContentServiceClient", + "fullName": "google.cloud.dataplex.v1.ContentServiceClient" + }, + "method": { + "shortName": "CreateContent", + "fullName": "google.cloud.dataplex.v1.ContentService.CreateContent", + "service": { + "shortName": "ContentService", + "fullName": "google.cloud.dataplex.v1.ContentService" + } + } + } }, - "method": { - "shortName": "UpdateContent", - "fullName": "google.cloud.dataplex.v1.ContentService.UpdateContent", - "service": { - "shortName": "ContentService", - "fullName": "google.cloud.dataplex.v1.ContentService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_ContentService_DeleteContent_async", - "title": "ContentService deleteContent Sample", - "origin": "API_DEFINITION", - "description": " Delete a content.", - "canonical": true, - "file": "content_service.delete_content.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 51, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteContent", - "fullName": "google.cloud.dataplex.v1.ContentService.DeleteContent", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "ContentServiceClient", - "fullName": "google.cloud.dataplex.v1.ContentServiceClient" + "regionTag": "dataplex_v1_generated_ContentService_UpdateContent_async", + "title": "ContentService updateContent Sample", + "origin": "API_DEFINITION", + "description": " Update a content. Only supports full resource update.", + "canonical": true, + "file": "content_service.update_content.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateContent", + "fullName": "google.cloud.dataplex.v1.ContentService.UpdateContent", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "content", + "type": ".google.cloud.dataplex.v1.Content" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.dataplex.v1.Content", + "client": { + "shortName": "ContentServiceClient", + "fullName": "google.cloud.dataplex.v1.ContentServiceClient" + }, + "method": { + "shortName": "UpdateContent", + "fullName": "google.cloud.dataplex.v1.ContentService.UpdateContent", + "service": { + "shortName": "ContentService", + "fullName": "google.cloud.dataplex.v1.ContentService" + } + } + } }, - "method": { - "shortName": "DeleteContent", - "fullName": "google.cloud.dataplex.v1.ContentService.DeleteContent", - "service": { - "shortName": "ContentService", - "fullName": "google.cloud.dataplex.v1.ContentService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_ContentService_GetContent_async", - "title": "ContentService getContent Sample", - "origin": "API_DEFINITION", - "description": " Get a content resource.", - "canonical": true, - "file": "content_service.get_content.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetContent", - "fullName": "google.cloud.dataplex.v1.ContentService.GetContent", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "view", - "type": ".google.cloud.dataplex.v1.GetContentRequest.ContentView" - } - ], - "resultType": ".google.cloud.dataplex.v1.Content", - "client": { - "shortName": "ContentServiceClient", - "fullName": "google.cloud.dataplex.v1.ContentServiceClient" + "regionTag": "dataplex_v1_generated_ContentService_DeleteContent_async", + "title": "ContentService deleteContent Sample", + "origin": "API_DEFINITION", + "description": " Delete a content.", + "canonical": true, + "file": "content_service.delete_content.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteContent", + "fullName": "google.cloud.dataplex.v1.ContentService.DeleteContent", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ContentServiceClient", + "fullName": "google.cloud.dataplex.v1.ContentServiceClient" + }, + "method": { + "shortName": "DeleteContent", + "fullName": "google.cloud.dataplex.v1.ContentService.DeleteContent", + "service": { + "shortName": "ContentService", + "fullName": "google.cloud.dataplex.v1.ContentService" + } + } + } }, - "method": { - "shortName": "GetContent", - "fullName": "google.cloud.dataplex.v1.ContentService.GetContent", - "service": { - "shortName": "ContentService", - "fullName": "google.cloud.dataplex.v1.ContentService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_ContentService_ListContent_async", - "title": "ContentService listContent Sample", - "origin": "API_DEFINITION", - "description": " List content.", - "canonical": true, - "file": "content_service.list_content.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 76, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListContent", - "fullName": "google.cloud.dataplex.v1.ContentService.ListContent", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.ListContentResponse", - "client": { - "shortName": "ContentServiceClient", - "fullName": "google.cloud.dataplex.v1.ContentServiceClient" + "regionTag": "dataplex_v1_generated_ContentService_GetContent_async", + "title": "ContentService getContent Sample", + "origin": "API_DEFINITION", + "description": " Get a content resource.", + "canonical": true, + "file": "content_service.get_content.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetContent", + "fullName": "google.cloud.dataplex.v1.ContentService.GetContent", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.cloud.dataplex.v1.GetContentRequest.ContentView" + } + ], + "resultType": ".google.cloud.dataplex.v1.Content", + "client": { + "shortName": "ContentServiceClient", + "fullName": "google.cloud.dataplex.v1.ContentServiceClient" + }, + "method": { + "shortName": "GetContent", + "fullName": "google.cloud.dataplex.v1.ContentService.GetContent", + "service": { + "shortName": "ContentService", + "fullName": "google.cloud.dataplex.v1.ContentService" + } + } + } }, - "method": { - "shortName": "ListContent", - "fullName": "google.cloud.dataplex.v1.ContentService.ListContent", - "service": { - "shortName": "ContentService", - "fullName": "google.cloud.dataplex.v1.ContentService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_CreateLake_async", - "title": "ContentService createLake Sample", - "origin": "API_DEFINITION", - "description": " Creates a lake resource.", - "canonical": true, - "file": "dataplex_service.create_lake.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 75, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateLake", - "fullName": "google.cloud.dataplex.v1.DataplexService.CreateLake", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "lake_id", - "type": "TYPE_STRING" - }, - { - "name": "lake", - "type": ".google.cloud.dataplex.v1.Lake" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + "regionTag": "dataplex_v1_generated_ContentService_ListContent_async", + "title": "ContentService listContent Sample", + "origin": "API_DEFINITION", + "description": " List content.", + "canonical": true, + "file": "content_service.list_content.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListContent", + "fullName": "google.cloud.dataplex.v1.ContentService.ListContent", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListContentResponse", + "client": { + "shortName": "ContentServiceClient", + "fullName": "google.cloud.dataplex.v1.ContentServiceClient" + }, + "method": { + "shortName": "ListContent", + "fullName": "google.cloud.dataplex.v1.ContentService.ListContent", + "service": { + "shortName": "ContentService", + "fullName": "google.cloud.dataplex.v1.ContentService" + } + } + } }, - "method": { - "shortName": "CreateLake", - "fullName": "google.cloud.dataplex.v1.DataplexService.CreateLake", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_UpdateLake_async", - "title": "ContentService updateLake Sample", - "origin": "API_DEFINITION", - "description": " Updates a lake resource.", - "canonical": true, - "file": "dataplex_service.update_lake.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateLake", - "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateLake", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "lake", - "type": ".google.cloud.dataplex.v1.Lake" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + "regionTag": "dataplex_v1_generated_DataplexService_CreateLake_async", + "title": "ContentService createLake Sample", + "origin": "API_DEFINITION", + "description": " Creates a lake resource.", + "canonical": true, + "file": "dataplex_service.create_lake.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateLake", + "fullName": "google.cloud.dataplex.v1.DataplexService.CreateLake", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "lake_id", + "type": "TYPE_STRING" + }, + { + "name": "lake", + "type": ".google.cloud.dataplex.v1.Lake" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "CreateLake", + "fullName": "google.cloud.dataplex.v1.DataplexService.CreateLake", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } }, - "method": { - "shortName": "UpdateLake", - "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateLake", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_DeleteLake_async", - "title": "ContentService deleteLake Sample", - "origin": "API_DEFINITION", - "description": " Deletes a lake resource. All zones within the lake must be deleted before the lake can be deleted.", - "canonical": true, - "file": "dataplex_service.delete_lake.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 52, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteLake", - "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteLake", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + "regionTag": "dataplex_v1_generated_DataplexService_UpdateLake_async", + "title": "ContentService updateLake Sample", + "origin": "API_DEFINITION", + "description": " Updates a lake resource.", + "canonical": true, + "file": "dataplex_service.update_lake.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateLake", + "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateLake", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "lake", + "type": ".google.cloud.dataplex.v1.Lake" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "UpdateLake", + "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateLake", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } }, - "method": { - "shortName": "DeleteLake", - "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteLake", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_ListLakes_async", - "title": "ContentService listLakes Sample", - "origin": "API_DEFINITION", - "description": " Lists lake resources in a project and location.", - "canonical": true, - "file": "dataplex_service.list_lakes.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 74, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListLakes", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListLakes", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.ListLakesResponse", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + "regionTag": "dataplex_v1_generated_DataplexService_DeleteLake_async", + "title": "ContentService deleteLake Sample", + "origin": "API_DEFINITION", + "description": " Deletes a lake resource. All zones within the lake must be deleted before the lake can be deleted.", + "canonical": true, + "file": "dataplex_service.delete_lake.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteLake", + "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteLake", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "DeleteLake", + "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteLake", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } }, - "method": { - "shortName": "ListLakes", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListLakes", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_GetLake_async", - "title": "ContentService getLake Sample", - "origin": "API_DEFINITION", - "description": " Retrieves a lake resource.", - "canonical": true, - "file": "dataplex_service.get_lake.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 51, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetLake", - "fullName": "google.cloud.dataplex.v1.DataplexService.GetLake", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.Lake", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + "regionTag": "dataplex_v1_generated_DataplexService_ListLakes_async", + "title": "ContentService listLakes Sample", + "origin": "API_DEFINITION", + "description": " Lists lake resources in a project and location.", + "canonical": true, + "file": "dataplex_service.list_lakes.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListLakes", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListLakes", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListLakesResponse", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "ListLakes", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListLakes", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } }, - "method": { - "shortName": "GetLake", - "fullName": "google.cloud.dataplex.v1.DataplexService.GetLake", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_ListLakeActions_async", - "title": "ContentService listLakeActions Sample", - "origin": "API_DEFINITION", - "description": " Lists action resources in a lake.", - "canonical": true, - "file": "dataplex_service.list_lake_actions.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListLakeActions", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListLakeActions", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.ListActionsResponse", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + "regionTag": "dataplex_v1_generated_DataplexService_GetLake_async", + "title": "ContentService getLake Sample", + "origin": "API_DEFINITION", + "description": " Retrieves a lake resource.", + "canonical": true, + "file": "dataplex_service.get_lake.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetLake", + "fullName": "google.cloud.dataplex.v1.DataplexService.GetLake", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.Lake", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "GetLake", + "fullName": "google.cloud.dataplex.v1.DataplexService.GetLake", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } }, - "method": { - "shortName": "ListLakeActions", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListLakeActions", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_CreateZone_async", - "title": "ContentService createZone Sample", - "origin": "API_DEFINITION", - "description": " Creates a zone resource within a lake.", - "canonical": true, - "file": "dataplex_service.create_zone.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 75, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateZone", - "fullName": "google.cloud.dataplex.v1.DataplexService.CreateZone", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "zone_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": ".google.cloud.dataplex.v1.Zone" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + "regionTag": "dataplex_v1_generated_DataplexService_ListLakeActions_async", + "title": "ContentService listLakeActions Sample", + "origin": "API_DEFINITION", + "description": " Lists action resources in a lake.", + "canonical": true, + "file": "dataplex_service.list_lake_actions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListLakeActions", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListLakeActions", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListActionsResponse", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "ListLakeActions", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListLakeActions", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } }, - "method": { - "shortName": "CreateZone", - "fullName": "google.cloud.dataplex.v1.DataplexService.CreateZone", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_UpdateZone_async", - "title": "ContentService updateZone Sample", - "origin": "API_DEFINITION", - "description": " Updates a zone resource.", - "canonical": true, - "file": "dataplex_service.update_zone.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateZone", - "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateZone", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "zone", - "type": ".google.cloud.dataplex.v1.Zone" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + "regionTag": "dataplex_v1_generated_DataplexService_CreateZone_async", + "title": "ContentService createZone Sample", + "origin": "API_DEFINITION", + "description": " Creates a zone resource within a lake.", + "canonical": true, + "file": "dataplex_service.create_zone.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateZone", + "fullName": "google.cloud.dataplex.v1.DataplexService.CreateZone", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "zone_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": ".google.cloud.dataplex.v1.Zone" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "CreateZone", + "fullName": "google.cloud.dataplex.v1.DataplexService.CreateZone", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } }, - "method": { - "shortName": "UpdateZone", - "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateZone", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_DeleteZone_async", - "title": "ContentService deleteZone Sample", - "origin": "API_DEFINITION", - "description": " Deletes a zone resource. All assets within a zone must be deleted before the zone can be deleted.", - "canonical": true, - "file": "dataplex_service.delete_zone.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 52, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteZone", - "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteZone", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + "regionTag": "dataplex_v1_generated_DataplexService_UpdateZone_async", + "title": "ContentService updateZone Sample", + "origin": "API_DEFINITION", + "description": " Updates a zone resource.", + "canonical": true, + "file": "dataplex_service.update_zone.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateZone", + "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateZone", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "zone", + "type": ".google.cloud.dataplex.v1.Zone" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "UpdateZone", + "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateZone", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } }, - "method": { - "shortName": "DeleteZone", - "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteZone", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_ListZones_async", - "title": "ContentService listZones Sample", - "origin": "API_DEFINITION", - "description": " Lists zone resources in a lake.", - "canonical": true, - "file": "dataplex_service.list_zones.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 73, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListZones", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListZones", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.ListZonesResponse", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + "regionTag": "dataplex_v1_generated_DataplexService_DeleteZone_async", + "title": "ContentService deleteZone Sample", + "origin": "API_DEFINITION", + "description": " Deletes a zone resource. All assets within a zone must be deleted before the zone can be deleted.", + "canonical": true, + "file": "dataplex_service.delete_zone.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteZone", + "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteZone", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "DeleteZone", + "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteZone", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } }, - "method": { - "shortName": "ListZones", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListZones", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_GetZone_async", - "title": "ContentService getZone Sample", - "origin": "API_DEFINITION", - "description": " Retrieves a zone resource.", - "canonical": true, - "file": "dataplex_service.get_zone.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 51, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetZone", - "fullName": "google.cloud.dataplex.v1.DataplexService.GetZone", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.Zone", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + "regionTag": "dataplex_v1_generated_DataplexService_ListZones_async", + "title": "ContentService listZones Sample", + "origin": "API_DEFINITION", + "description": " Lists zone resources in a lake.", + "canonical": true, + "file": "dataplex_service.list_zones.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 73, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListZones", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListZones", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListZonesResponse", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "ListZones", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListZones", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } }, - "method": { - "shortName": "GetZone", - "fullName": "google.cloud.dataplex.v1.DataplexService.GetZone", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_ListZoneActions_async", - "title": "ContentService listZoneActions Sample", - "origin": "API_DEFINITION", - "description": " Lists action resources in a zone.", - "canonical": true, - "file": "dataplex_service.list_zone_actions.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListZoneActions", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListZoneActions", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.ListActionsResponse", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + "regionTag": "dataplex_v1_generated_DataplexService_GetZone_async", + "title": "ContentService getZone Sample", + "origin": "API_DEFINITION", + "description": " Retrieves a zone resource.", + "canonical": true, + "file": "dataplex_service.get_zone.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetZone", + "fullName": "google.cloud.dataplex.v1.DataplexService.GetZone", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.Zone", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "GetZone", + "fullName": "google.cloud.dataplex.v1.DataplexService.GetZone", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } }, - "method": { - "shortName": "ListZoneActions", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListZoneActions", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_CreateAsset_async", - "title": "ContentService createAsset Sample", - "origin": "API_DEFINITION", - "description": " Creates an asset resource.", - "canonical": true, - "file": "dataplex_service.create_asset.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 74, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateAsset", - "fullName": "google.cloud.dataplex.v1.DataplexService.CreateAsset", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "asset_id", - "type": "TYPE_STRING" - }, - { - "name": "asset", - "type": ".google.cloud.dataplex.v1.Asset" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + "regionTag": "dataplex_v1_generated_DataplexService_ListZoneActions_async", + "title": "ContentService listZoneActions Sample", + "origin": "API_DEFINITION", + "description": " Lists action resources in a zone.", + "canonical": true, + "file": "dataplex_service.list_zone_actions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListZoneActions", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListZoneActions", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListActionsResponse", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "ListZoneActions", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListZoneActions", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } }, - "method": { - "shortName": "CreateAsset", - "fullName": "google.cloud.dataplex.v1.DataplexService.CreateAsset", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_UpdateAsset_async", - "title": "ContentService updateAsset Sample", - "origin": "API_DEFINITION", - "description": " Updates an asset resource.", - "canonical": true, - "file": "dataplex_service.update_asset.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateAsset", - "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateAsset", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "asset", - "type": ".google.cloud.dataplex.v1.Asset" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + "regionTag": "dataplex_v1_generated_DataplexService_CreateAsset_async", + "title": "ContentService createAsset Sample", + "origin": "API_DEFINITION", + "description": " Creates an asset resource.", + "canonical": true, + "file": "dataplex_service.create_asset.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateAsset", + "fullName": "google.cloud.dataplex.v1.DataplexService.CreateAsset", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "asset_id", + "type": "TYPE_STRING" + }, + { + "name": "asset", + "type": ".google.cloud.dataplex.v1.Asset" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "CreateAsset", + "fullName": "google.cloud.dataplex.v1.DataplexService.CreateAsset", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } }, - "method": { - "shortName": "UpdateAsset", - "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateAsset", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_DeleteAsset_async", - "title": "ContentService deleteAsset Sample", - "origin": "API_DEFINITION", - "description": " Deletes an asset resource. The referenced storage resource is detached (default) or deleted based on the associated Lifecycle policy.", - "canonical": true, - "file": "dataplex_service.delete_asset.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 52, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteAsset", - "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteAsset", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + "regionTag": "dataplex_v1_generated_DataplexService_UpdateAsset_async", + "title": "ContentService updateAsset Sample", + "origin": "API_DEFINITION", + "description": " Updates an asset resource.", + "canonical": true, + "file": "dataplex_service.update_asset.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateAsset", + "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateAsset", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "asset", + "type": ".google.cloud.dataplex.v1.Asset" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "UpdateAsset", + "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateAsset", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } }, - "method": { - "shortName": "DeleteAsset", - "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteAsset", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_ListAssets_async", - "title": "ContentService listAssets Sample", - "origin": "API_DEFINITION", - "description": " Lists asset resources in a zone.", - "canonical": true, - "file": "dataplex_service.list_assets.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 74, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListAssets", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListAssets", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.ListAssetsResponse", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + "regionTag": "dataplex_v1_generated_DataplexService_DeleteAsset_async", + "title": "ContentService deleteAsset Sample", + "origin": "API_DEFINITION", + "description": " Deletes an asset resource. The referenced storage resource is detached (default) or deleted based on the associated Lifecycle policy.", + "canonical": true, + "file": "dataplex_service.delete_asset.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteAsset", + "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteAsset", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "DeleteAsset", + "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteAsset", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } }, - "method": { - "shortName": "ListAssets", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListAssets", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_GetAsset_async", - "title": "ContentService getAsset Sample", - "origin": "API_DEFINITION", - "description": " Retrieves an asset resource.", - "canonical": true, - "file": "dataplex_service.get_asset.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 51, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetAsset", - "fullName": "google.cloud.dataplex.v1.DataplexService.GetAsset", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.Asset", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + "regionTag": "dataplex_v1_generated_DataplexService_ListAssets_async", + "title": "ContentService listAssets Sample", + "origin": "API_DEFINITION", + "description": " Lists asset resources in a zone.", + "canonical": true, + "file": "dataplex_service.list_assets.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAssets", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListAssets", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListAssetsResponse", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "ListAssets", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListAssets", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } }, - "method": { - "shortName": "GetAsset", - "fullName": "google.cloud.dataplex.v1.DataplexService.GetAsset", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_ListAssetActions_async", - "title": "ContentService listAssetActions Sample", - "origin": "API_DEFINITION", - "description": " Lists action resources in an asset.", - "canonical": true, - "file": "dataplex_service.list_asset_actions.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListAssetActions", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListAssetActions", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.ListActionsResponse", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + "regionTag": "dataplex_v1_generated_DataplexService_GetAsset_async", + "title": "ContentService getAsset Sample", + "origin": "API_DEFINITION", + "description": " Retrieves an asset resource.", + "canonical": true, + "file": "dataplex_service.get_asset.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAsset", + "fullName": "google.cloud.dataplex.v1.DataplexService.GetAsset", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.Asset", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "GetAsset", + "fullName": "google.cloud.dataplex.v1.DataplexService.GetAsset", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } }, - "method": { - "shortName": "ListAssetActions", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListAssetActions", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_CreateTask_async", - "title": "ContentService createTask Sample", - "origin": "API_DEFINITION", - "description": " Creates a task resource within a lake.", - "canonical": true, - "file": "dataplex_service.create_task.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 67, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateTask", - "fullName": "google.cloud.dataplex.v1.DataplexService.CreateTask", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "task_id", - "type": "TYPE_STRING" - }, - { - "name": "task", - "type": ".google.cloud.dataplex.v1.Task" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + "regionTag": "dataplex_v1_generated_DataplexService_ListAssetActions_async", + "title": "ContentService listAssetActions Sample", + "origin": "API_DEFINITION", + "description": " Lists action resources in an asset.", + "canonical": true, + "file": "dataplex_service.list_asset_actions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAssetActions", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListAssetActions", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListActionsResponse", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "ListAssetActions", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListAssetActions", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } }, - "method": { - "shortName": "CreateTask", - "fullName": "google.cloud.dataplex.v1.DataplexService.CreateTask", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_UpdateTask_async", - "title": "ContentService updateTask Sample", - "origin": "API_DEFINITION", - "description": " Update the task resource.", - "canonical": true, - "file": "dataplex_service.update_task.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateTask", - "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateTask", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "task", - "type": ".google.cloud.dataplex.v1.Task" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + "regionTag": "dataplex_v1_generated_DataplexService_CreateTask_async", + "title": "ContentService createTask Sample", + "origin": "API_DEFINITION", + "description": " Creates a task resource within a lake.", + "canonical": true, + "file": "dataplex_service.create_task.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateTask", + "fullName": "google.cloud.dataplex.v1.DataplexService.CreateTask", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "task_id", + "type": "TYPE_STRING" + }, + { + "name": "task", + "type": ".google.cloud.dataplex.v1.Task" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "CreateTask", + "fullName": "google.cloud.dataplex.v1.DataplexService.CreateTask", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } }, - "method": { - "shortName": "UpdateTask", - "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateTask", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_DeleteTask_async", - "title": "ContentService deleteTask Sample", - "origin": "API_DEFINITION", - "description": " Delete the task resource.", - "canonical": true, - "file": "dataplex_service.delete_task.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 52, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteTask", - "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteTask", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + "regionTag": "dataplex_v1_generated_DataplexService_UpdateTask_async", + "title": "ContentService updateTask Sample", + "origin": "API_DEFINITION", + "description": " Update the task resource.", + "canonical": true, + "file": "dataplex_service.update_task.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateTask", + "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateTask", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "task", + "type": ".google.cloud.dataplex.v1.Task" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "UpdateTask", + "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateTask", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } }, - "method": { - "shortName": "DeleteTask", - "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteTask", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_ListTasks_async", - "title": "ContentService listTasks Sample", - "origin": "API_DEFINITION", - "description": " Lists tasks under the given lake.", - "canonical": true, - "file": "dataplex_service.list_tasks.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 73, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListTasks", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListTasks", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.ListTasksResponse", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + "regionTag": "dataplex_v1_generated_DataplexService_DeleteTask_async", + "title": "ContentService deleteTask Sample", + "origin": "API_DEFINITION", + "description": " Delete the task resource.", + "canonical": true, + "file": "dataplex_service.delete_task.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteTask", + "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteTask", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "DeleteTask", + "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteTask", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } }, - "method": { - "shortName": "ListTasks", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListTasks", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_GetTask_async", - "title": "ContentService getTask Sample", - "origin": "API_DEFINITION", - "description": " Get task resource.", - "canonical": true, - "file": "dataplex_service.get_task.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 51, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetTask", - "fullName": "google.cloud.dataplex.v1.DataplexService.GetTask", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.Task", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + "regionTag": "dataplex_v1_generated_DataplexService_ListTasks_async", + "title": "ContentService listTasks Sample", + "origin": "API_DEFINITION", + "description": " Lists tasks under the given lake.", + "canonical": true, + "file": "dataplex_service.list_tasks.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 73, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListTasks", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListTasks", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListTasksResponse", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "ListTasks", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListTasks", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } }, - "method": { - "shortName": "GetTask", - "fullName": "google.cloud.dataplex.v1.DataplexService.GetTask", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_ListJobs_async", - "title": "ContentService listJobs Sample", - "origin": "API_DEFINITION", - "description": " Lists Jobs under the given task.", - "canonical": true, - "file": "dataplex_service.list_jobs.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListJobs", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListJobs", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.ListJobsResponse", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + "regionTag": "dataplex_v1_generated_DataplexService_GetTask_async", + "title": "ContentService getTask Sample", + "origin": "API_DEFINITION", + "description": " Get task resource.", + "canonical": true, + "file": "dataplex_service.get_task.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetTask", + "fullName": "google.cloud.dataplex.v1.DataplexService.GetTask", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.Task", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "GetTask", + "fullName": "google.cloud.dataplex.v1.DataplexService.GetTask", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } }, - "method": { - "shortName": "ListJobs", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListJobs", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_GetJob_async", - "title": "ContentService getJob Sample", - "origin": "API_DEFINITION", - "description": " Get job resource.", - "canonical": true, - "file": "dataplex_service.get_job.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 51, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetJob", - "fullName": "google.cloud.dataplex.v1.DataplexService.GetJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.Job", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + "regionTag": "dataplex_v1_generated_DataplexService_ListJobs_async", + "title": "ContentService listJobs Sample", + "origin": "API_DEFINITION", + "description": " Lists Jobs under the given task.", + "canonical": true, + "file": "dataplex_service.list_jobs.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListJobs", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListJobs", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListJobsResponse", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "ListJobs", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListJobs", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } }, - "method": { - "shortName": "GetJob", - "fullName": "google.cloud.dataplex.v1.DataplexService.GetJob", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_CancelJob_async", - "title": "ContentService cancelJob Sample", - "origin": "API_DEFINITION", - "description": " Cancel jobs running for the task resource.", - "canonical": true, - "file": "dataplex_service.cancel_job.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 51, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CancelJob", - "fullName": "google.cloud.dataplex.v1.DataplexService.CancelJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + "regionTag": "dataplex_v1_generated_DataplexService_GetJob_async", + "title": "ContentService getJob Sample", + "origin": "API_DEFINITION", + "description": " Get job resource.", + "canonical": true, + "file": "dataplex_service.get_job.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetJob", + "fullName": "google.cloud.dataplex.v1.DataplexService.GetJob", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.Job", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "GetJob", + "fullName": "google.cloud.dataplex.v1.DataplexService.GetJob", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } }, - "method": { - "shortName": "CancelJob", - "fullName": "google.cloud.dataplex.v1.DataplexService.CancelJob", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_CreateEnvironment_async", - "title": "ContentService createEnvironment Sample", - "origin": "API_DEFINITION", - "description": " Create an environment resource.", - "canonical": true, - "file": "dataplex_service.create_environment.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 72, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateEnvironment", - "fullName": "google.cloud.dataplex.v1.DataplexService.CreateEnvironment", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "environment_id", - "type": "TYPE_STRING" - }, - { - "name": "environment", - "type": ".google.cloud.dataplex.v1.Environment" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + "regionTag": "dataplex_v1_generated_DataplexService_CancelJob_async", + "title": "ContentService cancelJob Sample", + "origin": "API_DEFINITION", + "description": " Cancel jobs running for the task resource.", + "canonical": true, + "file": "dataplex_service.cancel_job.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CancelJob", + "fullName": "google.cloud.dataplex.v1.DataplexService.CancelJob", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "CancelJob", + "fullName": "google.cloud.dataplex.v1.DataplexService.CancelJob", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } }, - "method": { - "shortName": "CreateEnvironment", - "fullName": "google.cloud.dataplex.v1.DataplexService.CreateEnvironment", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_UpdateEnvironment_async", - "title": "ContentService updateEnvironment Sample", - "origin": "API_DEFINITION", - "description": " Update the environment resource.", - "canonical": true, - "file": "dataplex_service.update_environment.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateEnvironment", - "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateEnvironment", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "environment", - "type": ".google.cloud.dataplex.v1.Environment" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + "regionTag": "dataplex_v1_generated_DataplexService_CreateEnvironment_async", + "title": "ContentService createEnvironment Sample", + "origin": "API_DEFINITION", + "description": " Create an environment resource.", + "canonical": true, + "file": "dataplex_service.create_environment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateEnvironment", + "fullName": "google.cloud.dataplex.v1.DataplexService.CreateEnvironment", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "environment_id", + "type": "TYPE_STRING" + }, + { + "name": "environment", + "type": ".google.cloud.dataplex.v1.Environment" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "CreateEnvironment", + "fullName": "google.cloud.dataplex.v1.DataplexService.CreateEnvironment", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } }, - "method": { - "shortName": "UpdateEnvironment", - "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateEnvironment", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_DeleteEnvironment_async", - "title": "ContentService deleteEnvironment Sample", - "origin": "API_DEFINITION", - "description": " Delete the environment resource. All the child resources must have been deleted before environment deletion can be initiated.", - "canonical": true, - "file": "dataplex_service.delete_environment.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 52, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteEnvironment", - "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteEnvironment", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + "regionTag": "dataplex_v1_generated_DataplexService_UpdateEnvironment_async", + "title": "ContentService updateEnvironment Sample", + "origin": "API_DEFINITION", + "description": " Update the environment resource.", + "canonical": true, + "file": "dataplex_service.update_environment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateEnvironment", + "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateEnvironment", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "environment", + "type": ".google.cloud.dataplex.v1.Environment" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "UpdateEnvironment", + "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateEnvironment", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } }, - "method": { - "shortName": "DeleteEnvironment", - "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteEnvironment", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_ListEnvironments_async", - "title": "ContentService listEnvironments Sample", - "origin": "API_DEFINITION", - "description": " Lists environments under the given lake.", - "canonical": true, - "file": "dataplex_service.list_environments.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 74, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListEnvironments", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListEnvironments", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.ListEnvironmentsResponse", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + "regionTag": "dataplex_v1_generated_DataplexService_DeleteEnvironment_async", + "title": "ContentService deleteEnvironment Sample", + "origin": "API_DEFINITION", + "description": " Delete the environment resource. All the child resources must have been deleted before environment deletion can be initiated.", + "canonical": true, + "file": "dataplex_service.delete_environment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteEnvironment", + "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteEnvironment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "DeleteEnvironment", + "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteEnvironment", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } }, - "method": { - "shortName": "ListEnvironments", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListEnvironments", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_GetEnvironment_async", - "title": "ContentService getEnvironment Sample", - "origin": "API_DEFINITION", - "description": " Get environment resource.", - "canonical": true, - "file": "dataplex_service.get_environment.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 51, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetEnvironment", - "fullName": "google.cloud.dataplex.v1.DataplexService.GetEnvironment", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.Environment", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + "regionTag": "dataplex_v1_generated_DataplexService_ListEnvironments_async", + "title": "ContentService listEnvironments Sample", + "origin": "API_DEFINITION", + "description": " Lists environments under the given lake.", + "canonical": true, + "file": "dataplex_service.list_environments.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListEnvironments", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListEnvironments", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListEnvironmentsResponse", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "ListEnvironments", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListEnvironments", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } }, - "method": { - "shortName": "GetEnvironment", - "fullName": "google.cloud.dataplex.v1.DataplexService.GetEnvironment", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_ListSessions_async", - "title": "ContentService listSessions Sample", - "origin": "API_DEFINITION", - "description": " Lists session resources in an environment.", - "canonical": true, - "file": "dataplex_service.list_sessions.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListSessions", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListSessions", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.ListSessionsResponse", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + "regionTag": "dataplex_v1_generated_DataplexService_GetEnvironment_async", + "title": "ContentService getEnvironment Sample", + "origin": "API_DEFINITION", + "description": " Get environment resource.", + "canonical": true, + "file": "dataplex_service.get_environment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetEnvironment", + "fullName": "google.cloud.dataplex.v1.DataplexService.GetEnvironment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.Environment", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "GetEnvironment", + "fullName": "google.cloud.dataplex.v1.DataplexService.GetEnvironment", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } }, - "method": { - "shortName": "ListSessions", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListSessions", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_MetadataService_CreateEntity_async", - "title": "ContentService createEntity Sample", - "origin": "API_DEFINITION", - "description": " Create a metadata entity.", - "canonical": true, - "file": "metadata_service.create_entity.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateEntity", - "fullName": "google.cloud.dataplex.v1.MetadataService.CreateEntity", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "entity", - "type": ".google.cloud.dataplex.v1.Entity" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.cloud.dataplex.v1.Entity", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" + "regionTag": "dataplex_v1_generated_DataplexService_ListSessions_async", + "title": "ContentService listSessions Sample", + "origin": "API_DEFINITION", + "description": " Lists session resources in an environment.", + "canonical": true, + "file": "dataplex_service.list_sessions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListSessions", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListSessions", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListSessionsResponse", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "ListSessions", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListSessions", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } }, - "method": { - "shortName": "CreateEntity", - "fullName": "google.cloud.dataplex.v1.MetadataService.CreateEntity", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.dataplex.v1.MetadataService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_MetadataService_UpdateEntity_async", - "title": "ContentService updateEntity Sample", - "origin": "API_DEFINITION", - "description": " Update a metadata entity. Only supports full resource update.", - "canonical": true, - "file": "metadata_service.update_entity.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateEntity", - "fullName": "google.cloud.dataplex.v1.MetadataService.UpdateEntity", - "async": true, - "parameters": [ - { - "name": "entity", - "type": ".google.cloud.dataplex.v1.Entity" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.cloud.dataplex.v1.Entity", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" + "regionTag": "dataplex_v1_generated_MetadataService_CreateEntity_async", + "title": "ContentService createEntity Sample", + "origin": "API_DEFINITION", + "description": " Create a metadata entity.", + "canonical": true, + "file": "metadata_service.create_entity.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateEntity", + "fullName": "google.cloud.dataplex.v1.MetadataService.CreateEntity", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "entity", + "type": ".google.cloud.dataplex.v1.Entity" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.dataplex.v1.Entity", + "client": { + "shortName": "MetadataServiceClient", + "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" + }, + "method": { + "shortName": "CreateEntity", + "fullName": "google.cloud.dataplex.v1.MetadataService.CreateEntity", + "service": { + "shortName": "MetadataService", + "fullName": "google.cloud.dataplex.v1.MetadataService" + } + } + } }, - "method": { - "shortName": "UpdateEntity", - "fullName": "google.cloud.dataplex.v1.MetadataService.UpdateEntity", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.dataplex.v1.MetadataService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_MetadataService_DeleteEntity_async", - "title": "ContentService deleteEntity Sample", - "origin": "API_DEFINITION", - "description": " Delete a metadata entity.", - "canonical": true, - "file": "metadata_service.delete_entity.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteEntity", - "fullName": "google.cloud.dataplex.v1.MetadataService.DeleteEntity", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "etag", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" + "regionTag": "dataplex_v1_generated_MetadataService_UpdateEntity_async", + "title": "ContentService updateEntity Sample", + "origin": "API_DEFINITION", + "description": " Update a metadata entity. Only supports full resource update.", + "canonical": true, + "file": "metadata_service.update_entity.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateEntity", + "fullName": "google.cloud.dataplex.v1.MetadataService.UpdateEntity", + "async": true, + "parameters": [ + { + "name": "entity", + "type": ".google.cloud.dataplex.v1.Entity" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.dataplex.v1.Entity", + "client": { + "shortName": "MetadataServiceClient", + "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" + }, + "method": { + "shortName": "UpdateEntity", + "fullName": "google.cloud.dataplex.v1.MetadataService.UpdateEntity", + "service": { + "shortName": "MetadataService", + "fullName": "google.cloud.dataplex.v1.MetadataService" + } + } + } }, - "method": { - "shortName": "DeleteEntity", - "fullName": "google.cloud.dataplex.v1.MetadataService.DeleteEntity", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.dataplex.v1.MetadataService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_MetadataService_GetEntity_async", - "title": "ContentService getEntity Sample", - "origin": "API_DEFINITION", - "description": " Get a metadata entity.", - "canonical": true, - "file": "metadata_service.get_entity.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetEntity", - "fullName": "google.cloud.dataplex.v1.MetadataService.GetEntity", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "view", - "type": ".google.cloud.dataplex.v1.GetEntityRequest.EntityView" - } - ], - "resultType": ".google.cloud.dataplex.v1.Entity", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" + "regionTag": "dataplex_v1_generated_MetadataService_DeleteEntity_async", + "title": "ContentService deleteEntity Sample", + "origin": "API_DEFINITION", + "description": " Delete a metadata entity.", + "canonical": true, + "file": "metadata_service.delete_entity.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteEntity", + "fullName": "google.cloud.dataplex.v1.MetadataService.DeleteEntity", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "etag", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "MetadataServiceClient", + "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" + }, + "method": { + "shortName": "DeleteEntity", + "fullName": "google.cloud.dataplex.v1.MetadataService.DeleteEntity", + "service": { + "shortName": "MetadataService", + "fullName": "google.cloud.dataplex.v1.MetadataService" + } + } + } }, - "method": { - "shortName": "GetEntity", - "fullName": "google.cloud.dataplex.v1.MetadataService.GetEntity", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.dataplex.v1.MetadataService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_MetadataService_ListEntities_async", - "title": "ContentService listEntities Sample", - "origin": "API_DEFINITION", - "description": " List metadata entities in a zone.", - "canonical": true, - "file": "metadata_service.list_entities.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 81, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListEntities", - "fullName": "google.cloud.dataplex.v1.MetadataService.ListEntities", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "view", - "type": ".google.cloud.dataplex.v1.ListEntitiesRequest.EntityView" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.ListEntitiesResponse", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" + "regionTag": "dataplex_v1_generated_MetadataService_GetEntity_async", + "title": "ContentService getEntity Sample", + "origin": "API_DEFINITION", + "description": " Get a metadata entity.", + "canonical": true, + "file": "metadata_service.get_entity.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetEntity", + "fullName": "google.cloud.dataplex.v1.MetadataService.GetEntity", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.cloud.dataplex.v1.GetEntityRequest.EntityView" + } + ], + "resultType": ".google.cloud.dataplex.v1.Entity", + "client": { + "shortName": "MetadataServiceClient", + "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" + }, + "method": { + "shortName": "GetEntity", + "fullName": "google.cloud.dataplex.v1.MetadataService.GetEntity", + "service": { + "shortName": "MetadataService", + "fullName": "google.cloud.dataplex.v1.MetadataService" + } + } + } }, - "method": { - "shortName": "ListEntities", - "fullName": "google.cloud.dataplex.v1.MetadataService.ListEntities", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.dataplex.v1.MetadataService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_MetadataService_CreatePartition_async", - "title": "ContentService createPartition Sample", - "origin": "API_DEFINITION", - "description": " Create a metadata partition.", - "canonical": true, - "file": "metadata_service.create_partition.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreatePartition", - "fullName": "google.cloud.dataplex.v1.MetadataService.CreatePartition", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "partition", - "type": ".google.cloud.dataplex.v1.Partition" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.cloud.dataplex.v1.Partition", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" + "regionTag": "dataplex_v1_generated_MetadataService_ListEntities_async", + "title": "ContentService listEntities Sample", + "origin": "API_DEFINITION", + "description": " List metadata entities in a zone.", + "canonical": true, + "file": "metadata_service.list_entities.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 81, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListEntities", + "fullName": "google.cloud.dataplex.v1.MetadataService.ListEntities", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.cloud.dataplex.v1.ListEntitiesRequest.EntityView" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListEntitiesResponse", + "client": { + "shortName": "MetadataServiceClient", + "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" + }, + "method": { + "shortName": "ListEntities", + "fullName": "google.cloud.dataplex.v1.MetadataService.ListEntities", + "service": { + "shortName": "MetadataService", + "fullName": "google.cloud.dataplex.v1.MetadataService" + } + } + } }, - "method": { - "shortName": "CreatePartition", - "fullName": "google.cloud.dataplex.v1.MetadataService.CreatePartition", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.dataplex.v1.MetadataService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_MetadataService_DeletePartition_async", - "title": "ContentService deletePartition Sample", - "origin": "API_DEFINITION", - "description": " Delete a metadata partition.", - "canonical": true, - "file": "metadata_service.delete_partition.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeletePartition", - "fullName": "google.cloud.dataplex.v1.MetadataService.DeletePartition", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "etag", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" + "regionTag": "dataplex_v1_generated_MetadataService_CreatePartition_async", + "title": "ContentService createPartition Sample", + "origin": "API_DEFINITION", + "description": " Create a metadata partition.", + "canonical": true, + "file": "metadata_service.create_partition.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreatePartition", + "fullName": "google.cloud.dataplex.v1.MetadataService.CreatePartition", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "partition", + "type": ".google.cloud.dataplex.v1.Partition" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.dataplex.v1.Partition", + "client": { + "shortName": "MetadataServiceClient", + "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" + }, + "method": { + "shortName": "CreatePartition", + "fullName": "google.cloud.dataplex.v1.MetadataService.CreatePartition", + "service": { + "shortName": "MetadataService", + "fullName": "google.cloud.dataplex.v1.MetadataService" + } + } + } }, - "method": { - "shortName": "DeletePartition", - "fullName": "google.cloud.dataplex.v1.MetadataService.DeletePartition", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.dataplex.v1.MetadataService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_MetadataService_GetPartition_async", - "title": "ContentService getPartition Sample", - "origin": "API_DEFINITION", - "description": " Get a metadata partition of an entity.", - "canonical": true, - "file": "metadata_service.get_partition.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetPartition", - "fullName": "google.cloud.dataplex.v1.MetadataService.GetPartition", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.Partition", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" + "regionTag": "dataplex_v1_generated_MetadataService_DeletePartition_async", + "title": "ContentService deletePartition Sample", + "origin": "API_DEFINITION", + "description": " Delete a metadata partition.", + "canonical": true, + "file": "metadata_service.delete_partition.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeletePartition", + "fullName": "google.cloud.dataplex.v1.MetadataService.DeletePartition", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "etag", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "MetadataServiceClient", + "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" + }, + "method": { + "shortName": "DeletePartition", + "fullName": "google.cloud.dataplex.v1.MetadataService.DeletePartition", + "service": { + "shortName": "MetadataService", + "fullName": "google.cloud.dataplex.v1.MetadataService" + } + } + } }, - "method": { - "shortName": "GetPartition", - "fullName": "google.cloud.dataplex.v1.MetadataService.GetPartition", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.dataplex.v1.MetadataService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_MetadataService_ListPartitions_async", - "title": "ContentService listPartitions Sample", - "origin": "API_DEFINITION", - "description": " List metadata partitions of an entity.", - "canonical": true, - "file": "metadata_service.list_partitions.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 84, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListPartitions", - "fullName": "google.cloud.dataplex.v1.MetadataService.ListPartitions", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.ListPartitionsResponse", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" + "regionTag": "dataplex_v1_generated_MetadataService_GetPartition_async", + "title": "ContentService getPartition Sample", + "origin": "API_DEFINITION", + "description": " Get a metadata partition of an entity.", + "canonical": true, + "file": "metadata_service.get_partition.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetPartition", + "fullName": "google.cloud.dataplex.v1.MetadataService.GetPartition", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.Partition", + "client": { + "shortName": "MetadataServiceClient", + "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" + }, + "method": { + "shortName": "GetPartition", + "fullName": "google.cloud.dataplex.v1.MetadataService.GetPartition", + "service": { + "shortName": "MetadataService", + "fullName": "google.cloud.dataplex.v1.MetadataService" + } + } + } }, - "method": { - "shortName": "ListPartitions", - "fullName": "google.cloud.dataplex.v1.MetadataService.ListPartitions", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.dataplex.v1.MetadataService" - } + { + "regionTag": "dataplex_v1_generated_MetadataService_ListPartitions_async", + "title": "ContentService listPartitions Sample", + "origin": "API_DEFINITION", + "description": " List metadata partitions of an entity.", + "canonical": true, + "file": "metadata_service.list_partitions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 84, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListPartitions", + "fullName": "google.cloud.dataplex.v1.MetadataService.ListPartitions", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListPartitionsResponse", + "client": { + "shortName": "MetadataServiceClient", + "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" + }, + "method": { + "shortName": "ListPartitions", + "fullName": "google.cloud.dataplex.v1.MetadataService.ListPartitions", + "service": { + "shortName": "MetadataService", + "fullName": "google.cloud.dataplex.v1.MetadataService" + } + } + } } - } - } - ] -} + ] +} \ No newline at end of file From fafc919ac81276b28edf51e6ca3249d4efacd5a3 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 20 Apr 2022 12:43:58 -0700 Subject: [PATCH 168/254] build(node): update client library version in samples metadata (#1356) (#45) * build(node): add feat in node post-processor to add client library version number in snippet metadata Co-authored-by: Benjamin E. Coe Source-Link: https://github.com/googleapis/synthtool/commit/d337b88dd1494365183718a2de0b7b4056b6fdfe Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:d106724ad2a96daa1b8d88de101ba50bdb30b8df62ffa0aa2b451d93b4556641 Co-authored-by: Owl Bot Co-authored-by: Benjamin E. Coe --- ...ippet_metadata.google.cloud.deploy.v1.json | 1796 ++++++++--------- 1 file changed, 898 insertions(+), 898 deletions(-) diff --git a/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json b/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json index a5461a41d08..2f144b3ee0f 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json +++ b/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json @@ -1,935 +1,935 @@ { - "clientLibrary": { - "name": "nodejs-deploy", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.cloud.deploy.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_ListDeliveryPipelines_async", - "title": "CloudDeploy listDeliveryPipelines Sample", - "origin": "API_DEFINITION", - "description": " Lists DeliveryPipelines in a given project and location.", - "canonical": true, - "file": "cloud_deploy.list_delivery_pipelines.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 76, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListDeliveryPipelines", - "fullName": "google.cloud.deploy.v1.CloudDeploy.ListDeliveryPipelines", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.deploy.v1.ListDeliveryPipelinesResponse", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" - }, - "method": { - "shortName": "ListDeliveryPipelines", - "fullName": "google.cloud.deploy.v1.CloudDeploy.ListDeliveryPipelines", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } + "clientLibrary": { + "name": "nodejs-deploy", + "version": "1.0.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.deploy.v1", + "version": "v1" + } + ] }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_GetDeliveryPipeline_async", - "title": "CloudDeploy getDeliveryPipeline Sample", - "origin": "API_DEFINITION", - "description": " Gets details of a single DeliveryPipeline.", - "canonical": true, - "file": "cloud_deploy.get_delivery_pipeline.js", - "language": "JAVASCRIPT", - "segments": [ + "snippets": [ { - "start": 25, - "end": 51, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetDeliveryPipeline", - "fullName": "google.cloud.deploy.v1.CloudDeploy.GetDeliveryPipeline", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.deploy.v1.DeliveryPipeline", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" + "regionTag": "clouddeploy_v1_generated_CloudDeploy_ListDeliveryPipelines_async", + "title": "CloudDeploy listDeliveryPipelines Sample", + "origin": "API_DEFINITION", + "description": " Lists DeliveryPipelines in a given project and location.", + "canonical": true, + "file": "cloud_deploy.list_delivery_pipelines.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDeliveryPipelines", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ListDeliveryPipelines", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.ListDeliveryPipelinesResponse", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "ListDeliveryPipelines", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ListDeliveryPipelines", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } }, - "method": { - "shortName": "GetDeliveryPipeline", - "fullName": "google.cloud.deploy.v1.CloudDeploy.GetDeliveryPipeline", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_CreateDeliveryPipeline_async", - "title": "CloudDeploy createDeliveryPipeline Sample", - "origin": "API_DEFINITION", - "description": " Creates a new DeliveryPipeline in a given project and location.", - "canonical": true, - "file": "cloud_deploy.create_delivery_pipeline.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 81, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateDeliveryPipeline", - "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateDeliveryPipeline", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "delivery_pipeline_id", - "type": "TYPE_STRING" - }, - { - "name": "delivery_pipeline", - "type": ".google.cloud.deploy.v1.DeliveryPipeline" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" + "regionTag": "clouddeploy_v1_generated_CloudDeploy_GetDeliveryPipeline_async", + "title": "CloudDeploy getDeliveryPipeline Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single DeliveryPipeline.", + "canonical": true, + "file": "cloud_deploy.get_delivery_pipeline.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetDeliveryPipeline", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetDeliveryPipeline", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.DeliveryPipeline", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "GetDeliveryPipeline", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetDeliveryPipeline", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } }, - "method": { - "shortName": "CreateDeliveryPipeline", - "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateDeliveryPipeline", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_UpdateDeliveryPipeline_async", - "title": "CloudDeploy updateDeliveryPipeline Sample", - "origin": "API_DEFINITION", - "description": " Updates the parameters of a single DeliveryPipeline.", - "canonical": true, - "file": "cloud_deploy.update_delivery_pipeline.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 84, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateDeliveryPipeline", - "fullName": "google.cloud.deploy.v1.CloudDeploy.UpdateDeliveryPipeline", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "delivery_pipeline", - "type": ".google.cloud.deploy.v1.DeliveryPipeline" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "allow_missing", - "type": "TYPE_BOOL" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" + "regionTag": "clouddeploy_v1_generated_CloudDeploy_CreateDeliveryPipeline_async", + "title": "CloudDeploy createDeliveryPipeline Sample", + "origin": "API_DEFINITION", + "description": " Creates a new DeliveryPipeline in a given project and location.", + "canonical": true, + "file": "cloud_deploy.create_delivery_pipeline.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 81, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateDeliveryPipeline", + "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateDeliveryPipeline", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "delivery_pipeline_id", + "type": "TYPE_STRING" + }, + { + "name": "delivery_pipeline", + "type": ".google.cloud.deploy.v1.DeliveryPipeline" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "CreateDeliveryPipeline", + "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateDeliveryPipeline", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } }, - "method": { - "shortName": "UpdateDeliveryPipeline", - "fullName": "google.cloud.deploy.v1.CloudDeploy.UpdateDeliveryPipeline", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_DeleteDeliveryPipeline_async", - "title": "CloudDeploy deleteDeliveryPipeline Sample", - "origin": "API_DEFINITION", - "description": " Deletes a single DeliveryPipeline.", - "canonical": true, - "file": "cloud_deploy.delete_delivery_pipeline.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 88, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteDeliveryPipeline", - "fullName": "google.cloud.deploy.v1.CloudDeploy.DeleteDeliveryPipeline", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "allow_missing", - "type": "TYPE_BOOL" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - }, - { - "name": "force", - "type": "TYPE_BOOL" - }, - { - "name": "etag", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" + "regionTag": "clouddeploy_v1_generated_CloudDeploy_UpdateDeliveryPipeline_async", + "title": "CloudDeploy updateDeliveryPipeline Sample", + "origin": "API_DEFINITION", + "description": " Updates the parameters of a single DeliveryPipeline.", + "canonical": true, + "file": "cloud_deploy.update_delivery_pipeline.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 84, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateDeliveryPipeline", + "fullName": "google.cloud.deploy.v1.CloudDeploy.UpdateDeliveryPipeline", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "delivery_pipeline", + "type": ".google.cloud.deploy.v1.DeliveryPipeline" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "UpdateDeliveryPipeline", + "fullName": "google.cloud.deploy.v1.CloudDeploy.UpdateDeliveryPipeline", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } }, - "method": { - "shortName": "DeleteDeliveryPipeline", - "fullName": "google.cloud.deploy.v1.CloudDeploy.DeleteDeliveryPipeline", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_ListTargets_async", - "title": "CloudDeploy listTargets Sample", - "origin": "API_DEFINITION", - "description": " Lists Targets in a given project and location.", - "canonical": true, - "file": "cloud_deploy.list_targets.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 75, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListTargets", - "fullName": "google.cloud.deploy.v1.CloudDeploy.ListTargets", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.deploy.v1.ListTargetsResponse", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" + "regionTag": "clouddeploy_v1_generated_CloudDeploy_DeleteDeliveryPipeline_async", + "title": "CloudDeploy deleteDeliveryPipeline Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single DeliveryPipeline.", + "canonical": true, + "file": "cloud_deploy.delete_delivery_pipeline.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 88, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteDeliveryPipeline", + "fullName": "google.cloud.deploy.v1.CloudDeploy.DeleteDeliveryPipeline", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + }, + { + "name": "force", + "type": "TYPE_BOOL" + }, + { + "name": "etag", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "DeleteDeliveryPipeline", + "fullName": "google.cloud.deploy.v1.CloudDeploy.DeleteDeliveryPipeline", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } }, - "method": { - "shortName": "ListTargets", - "fullName": "google.cloud.deploy.v1.CloudDeploy.ListTargets", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_GetTarget_async", - "title": "CloudDeploy getTarget Sample", - "origin": "API_DEFINITION", - "description": " Gets details of a single Target.", - "canonical": true, - "file": "cloud_deploy.get_target.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 51, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetTarget", - "fullName": "google.cloud.deploy.v1.CloudDeploy.GetTarget", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.deploy.v1.Target", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" + "regionTag": "clouddeploy_v1_generated_CloudDeploy_ListTargets_async", + "title": "CloudDeploy listTargets Sample", + "origin": "API_DEFINITION", + "description": " Lists Targets in a given project and location.", + "canonical": true, + "file": "cloud_deploy.list_targets.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListTargets", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ListTargets", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.ListTargetsResponse", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "ListTargets", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ListTargets", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } }, - "method": { - "shortName": "GetTarget", - "fullName": "google.cloud.deploy.v1.CloudDeploy.GetTarget", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_CreateTarget_async", - "title": "CloudDeploy createTarget Sample", - "origin": "API_DEFINITION", - "description": " Creates a new Target in a given project and location.", - "canonical": true, - "file": "cloud_deploy.create_target.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 82, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateTarget", - "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateTarget", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "target_id", - "type": "TYPE_STRING" - }, - { - "name": "target", - "type": ".google.cloud.deploy.v1.Target" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" + "regionTag": "clouddeploy_v1_generated_CloudDeploy_GetTarget_async", + "title": "CloudDeploy getTarget Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single Target.", + "canonical": true, + "file": "cloud_deploy.get_target.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetTarget", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetTarget", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.Target", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "GetTarget", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetTarget", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } }, - "method": { - "shortName": "CreateTarget", - "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateTarget", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_UpdateTarget_async", - "title": "CloudDeploy updateTarget Sample", - "origin": "API_DEFINITION", - "description": " Updates the parameters of a single Target.", - "canonical": true, - "file": "cloud_deploy.update_target.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 84, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateTarget", - "fullName": "google.cloud.deploy.v1.CloudDeploy.UpdateTarget", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "target", - "type": ".google.cloud.deploy.v1.Target" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "allow_missing", - "type": "TYPE_BOOL" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" + "regionTag": "clouddeploy_v1_generated_CloudDeploy_CreateTarget_async", + "title": "CloudDeploy createTarget Sample", + "origin": "API_DEFINITION", + "description": " Creates a new Target in a given project and location.", + "canonical": true, + "file": "cloud_deploy.create_target.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 82, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateTarget", + "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateTarget", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "target_id", + "type": "TYPE_STRING" + }, + { + "name": "target", + "type": ".google.cloud.deploy.v1.Target" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "CreateTarget", + "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateTarget", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } }, - "method": { - "shortName": "UpdateTarget", - "fullName": "google.cloud.deploy.v1.CloudDeploy.UpdateTarget", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_DeleteTarget_async", - "title": "CloudDeploy deleteTarget Sample", - "origin": "API_DEFINITION", - "description": " Deletes a single Target.", - "canonical": true, - "file": "cloud_deploy.delete_target.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 82, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteTarget", - "fullName": "google.cloud.deploy.v1.CloudDeploy.DeleteTarget", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "allow_missing", - "type": "TYPE_BOOL" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - }, - { - "name": "etag", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" + "regionTag": "clouddeploy_v1_generated_CloudDeploy_UpdateTarget_async", + "title": "CloudDeploy updateTarget Sample", + "origin": "API_DEFINITION", + "description": " Updates the parameters of a single Target.", + "canonical": true, + "file": "cloud_deploy.update_target.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 84, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateTarget", + "fullName": "google.cloud.deploy.v1.CloudDeploy.UpdateTarget", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "target", + "type": ".google.cloud.deploy.v1.Target" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "UpdateTarget", + "fullName": "google.cloud.deploy.v1.CloudDeploy.UpdateTarget", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } }, - "method": { - "shortName": "DeleteTarget", - "fullName": "google.cloud.deploy.v1.CloudDeploy.DeleteTarget", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_ListReleases_async", - "title": "CloudDeploy listReleases Sample", - "origin": "API_DEFINITION", - "description": " Lists Releases in a given project and location.", - "canonical": true, - "file": "cloud_deploy.list_releases.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 74, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListReleases", - "fullName": "google.cloud.deploy.v1.CloudDeploy.ListReleases", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.deploy.v1.ListReleasesResponse", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" + "regionTag": "clouddeploy_v1_generated_CloudDeploy_DeleteTarget_async", + "title": "CloudDeploy deleteTarget Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single Target.", + "canonical": true, + "file": "cloud_deploy.delete_target.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 82, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteTarget", + "fullName": "google.cloud.deploy.v1.CloudDeploy.DeleteTarget", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + }, + { + "name": "etag", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "DeleteTarget", + "fullName": "google.cloud.deploy.v1.CloudDeploy.DeleteTarget", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } }, - "method": { - "shortName": "ListReleases", - "fullName": "google.cloud.deploy.v1.CloudDeploy.ListReleases", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_GetRelease_async", - "title": "CloudDeploy getRelease Sample", - "origin": "API_DEFINITION", - "description": " Gets details of a single Release.", - "canonical": true, - "file": "cloud_deploy.get_release.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 51, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetRelease", - "fullName": "google.cloud.deploy.v1.CloudDeploy.GetRelease", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.deploy.v1.Release", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" + "regionTag": "clouddeploy_v1_generated_CloudDeploy_ListReleases_async", + "title": "CloudDeploy listReleases Sample", + "origin": "API_DEFINITION", + "description": " Lists Releases in a given project and location.", + "canonical": true, + "file": "cloud_deploy.list_releases.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListReleases", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ListReleases", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.ListReleasesResponse", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "ListReleases", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ListReleases", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } }, - "method": { - "shortName": "GetRelease", - "fullName": "google.cloud.deploy.v1.CloudDeploy.GetRelease", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_CreateRelease_async", - "title": "CloudDeploy createRelease Sample", - "origin": "API_DEFINITION", - "description": " Creates a new Release in a given project and location.", - "canonical": true, - "file": "cloud_deploy.create_release.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 82, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateRelease", - "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateRelease", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "release_id", - "type": "TYPE_STRING" - }, - { - "name": "release", - "type": ".google.cloud.deploy.v1.Release" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" + "regionTag": "clouddeploy_v1_generated_CloudDeploy_GetRelease_async", + "title": "CloudDeploy getRelease Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single Release.", + "canonical": true, + "file": "cloud_deploy.get_release.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetRelease", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetRelease", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.Release", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "GetRelease", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetRelease", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } }, - "method": { - "shortName": "CreateRelease", - "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateRelease", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_ApproveRollout_async", - "title": "CloudDeploy approveRollout Sample", - "origin": "API_DEFINITION", - "description": " Approves a Rollout.", - "canonical": true, - "file": "cloud_deploy.approve_rollout.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 57, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ApproveRollout", - "fullName": "google.cloud.deploy.v1.CloudDeploy.ApproveRollout", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "approved", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.cloud.deploy.v1.ApproveRolloutResponse", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" + "regionTag": "clouddeploy_v1_generated_CloudDeploy_CreateRelease_async", + "title": "CloudDeploy createRelease Sample", + "origin": "API_DEFINITION", + "description": " Creates a new Release in a given project and location.", + "canonical": true, + "file": "cloud_deploy.create_release.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 82, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateRelease", + "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateRelease", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "release_id", + "type": "TYPE_STRING" + }, + { + "name": "release", + "type": ".google.cloud.deploy.v1.Release" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "CreateRelease", + "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateRelease", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } }, - "method": { - "shortName": "ApproveRollout", - "fullName": "google.cloud.deploy.v1.CloudDeploy.ApproveRollout", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_ListRollouts_async", - "title": "CloudDeploy listRollouts Sample", - "origin": "API_DEFINITION", - "description": " Lists Rollouts in a given project and location.", - "canonical": true, - "file": "cloud_deploy.list_rollouts.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 74, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListRollouts", - "fullName": "google.cloud.deploy.v1.CloudDeploy.ListRollouts", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.deploy.v1.ListRolloutsResponse", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" + "regionTag": "clouddeploy_v1_generated_CloudDeploy_ApproveRollout_async", + "title": "CloudDeploy approveRollout Sample", + "origin": "API_DEFINITION", + "description": " Approves a Rollout.", + "canonical": true, + "file": "cloud_deploy.approve_rollout.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ApproveRollout", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ApproveRollout", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "approved", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.deploy.v1.ApproveRolloutResponse", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "ApproveRollout", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ApproveRollout", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } }, - "method": { - "shortName": "ListRollouts", - "fullName": "google.cloud.deploy.v1.CloudDeploy.ListRollouts", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_GetRollout_async", - "title": "CloudDeploy getRollout Sample", - "origin": "API_DEFINITION", - "description": " Gets details of a single Rollout.", - "canonical": true, - "file": "cloud_deploy.get_rollout.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 51, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetRollout", - "fullName": "google.cloud.deploy.v1.CloudDeploy.GetRollout", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.deploy.v1.Rollout", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" + "regionTag": "clouddeploy_v1_generated_CloudDeploy_ListRollouts_async", + "title": "CloudDeploy listRollouts Sample", + "origin": "API_DEFINITION", + "description": " Lists Rollouts in a given project and location.", + "canonical": true, + "file": "cloud_deploy.list_rollouts.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListRollouts", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ListRollouts", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.ListRolloutsResponse", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "ListRollouts", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ListRollouts", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } }, - "method": { - "shortName": "GetRollout", - "fullName": "google.cloud.deploy.v1.CloudDeploy.GetRollout", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_CreateRollout_async", - "title": "CloudDeploy createRollout Sample", - "origin": "API_DEFINITION", - "description": " Creates a new Rollout in a given project and location.", - "canonical": true, - "file": "cloud_deploy.create_rollout.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 82, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateRollout", - "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateRollout", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "rollout_id", - "type": "TYPE_STRING" - }, - { - "name": "rollout", - "type": ".google.cloud.deploy.v1.Rollout" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" + "regionTag": "clouddeploy_v1_generated_CloudDeploy_GetRollout_async", + "title": "CloudDeploy getRollout Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single Rollout.", + "canonical": true, + "file": "cloud_deploy.get_rollout.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetRollout", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetRollout", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.Rollout", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "GetRollout", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetRollout", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } }, - "method": { - "shortName": "CreateRollout", - "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateRollout", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_GetConfig_async", - "title": "CloudDeploy getConfig Sample", - "origin": "API_DEFINITION", - "description": " Gets the configuration for a location.", - "canonical": true, - "file": "cloud_deploy.get_config.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 50, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetConfig", - "fullName": "google.cloud.deploy.v1.CloudDeploy.GetConfig", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.deploy.v1.Config", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" + "regionTag": "clouddeploy_v1_generated_CloudDeploy_CreateRollout_async", + "title": "CloudDeploy createRollout Sample", + "origin": "API_DEFINITION", + "description": " Creates a new Rollout in a given project and location.", + "canonical": true, + "file": "cloud_deploy.create_rollout.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 82, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateRollout", + "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateRollout", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "rollout_id", + "type": "TYPE_STRING" + }, + { + "name": "rollout", + "type": ".google.cloud.deploy.v1.Rollout" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "CreateRollout", + "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateRollout", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } }, - "method": { - "shortName": "GetConfig", - "fullName": "google.cloud.deploy.v1.CloudDeploy.GetConfig", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_GetConfig_async", + "title": "CloudDeploy getConfig Sample", + "origin": "API_DEFINITION", + "description": " Gets the configuration for a location.", + "canonical": true, + "file": "cloud_deploy.get_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetConfig", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetConfig", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.Config", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "GetConfig", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetConfig", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } } - } - } - ] -} + ] +} \ No newline at end of file From b783b8418c73583e3a1299518d8ed74abff805c9 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 20 Apr 2022 12:46:34 -0700 Subject: [PATCH 169/254] build(node): update client library version in samples metadata (#1356) (#65) * build(node): add feat in node post-processor to add client library version number in snippet metadata Co-authored-by: Benjamin E. Coe Source-Link: https://github.com/googleapis/synthtool/commit/d337b88dd1494365183718a2de0b7b4056b6fdfe Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:d106724ad2a96daa1b8d88de101ba50bdb30b8df62ffa0aa2b451d93b4556641 Co-authored-by: Owl Bot Co-authored-by: Benjamin E. Coe --- ...ogle.cloud.gkeconnect.gateway.v1beta1.json | 488 +++++++++--------- 1 file changed, 244 insertions(+), 244 deletions(-) diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/snippet_metadata.google.cloud.gkeconnect.gateway.v1beta1.json b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/snippet_metadata.google.cloud.gkeconnect.gateway.v1beta1.json index e326d26df55..c8bb95b89e9 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/snippet_metadata.google.cloud.gkeconnect.gateway.v1beta1.json +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/snippet_metadata.google.cloud.gkeconnect.gateway.v1beta1.json @@ -1,255 +1,255 @@ { - "clientLibrary": { - "name": "nodejs-gateway", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.cloud.gkeconnect.gateway.v1beta1", - "version": "v1beta1" - } - ] - }, - "snippets": [ - { - "regionTag": "connectgateway_v1beta1_generated_GatewayService_GetResource_async", - "title": "GatewayService getResource Sample", - "origin": "API_DEFINITION", - "description": " GetResource performs an HTTP GET request on the Kubernetes API Server.", - "canonical": true, - "file": "gateway_service.get_resource.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetResource", - "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.GetResource", - "async": true, - "parameters": [ - { - "name": "content_type", - "type": "TYPE_STRING" - }, - { - "name": "data", - "type": "TYPE_BYTES" - }, - { - "name": "extensions", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.api.HttpBody", - "client": { - "shortName": "GatewayServiceClient", - "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayServiceClient" - }, - "method": { - "shortName": "GetResource", - "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.GetResource", - "service": { - "shortName": "GatewayService", - "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService" - } - } - } + "clientLibrary": { + "name": "nodejs-gateway", + "version": "1.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.gkeconnect.gateway.v1beta1", + "version": "v1beta1" + } + ] }, - { - "regionTag": "connectgateway_v1beta1_generated_GatewayService_PostResource_async", - "title": "GatewayService postResource Sample", - "origin": "API_DEFINITION", - "description": " PostResource performs an HTTP POST on the Kubernetes API Server.", - "canonical": true, - "file": "gateway_service.post_resource.js", - "language": "JAVASCRIPT", - "segments": [ + "snippets": [ { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "PostResource", - "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.PostResource", - "async": true, - "parameters": [ - { - "name": "content_type", - "type": "TYPE_STRING" - }, - { - "name": "data", - "type": "TYPE_BYTES" - }, - { - "name": "extensions", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.api.HttpBody", - "client": { - "shortName": "GatewayServiceClient", - "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayServiceClient" + "regionTag": "connectgateway_v1beta1_generated_GatewayService_GetResource_async", + "title": "GatewayService getResource Sample", + "origin": "API_DEFINITION", + "description": " GetResource performs an HTTP GET request on the Kubernetes API Server.", + "canonical": true, + "file": "gateway_service.get_resource.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetResource", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.GetResource", + "async": true, + "parameters": [ + { + "name": "content_type", + "type": "TYPE_STRING" + }, + { + "name": "data", + "type": "TYPE_BYTES" + }, + { + "name": "extensions", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.api.HttpBody", + "client": { + "shortName": "GatewayServiceClient", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayServiceClient" + }, + "method": { + "shortName": "GetResource", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.GetResource", + "service": { + "shortName": "GatewayService", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService" + } + } + } }, - "method": { - "shortName": "PostResource", - "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.PostResource", - "service": { - "shortName": "GatewayService", - "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService" - } - } - } - }, - { - "regionTag": "connectgateway_v1beta1_generated_GatewayService_DeleteResource_async", - "title": "GatewayService deleteResource Sample", - "origin": "API_DEFINITION", - "description": " DeleteResource performs an HTTP DELETE on the Kubernetes API Server.", - "canonical": true, - "file": "gateway_service.delete_resource.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteResource", - "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.DeleteResource", - "async": true, - "parameters": [ - { - "name": "content_type", - "type": "TYPE_STRING" - }, - { - "name": "data", - "type": "TYPE_BYTES" - }, - { - "name": "extensions", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.api.HttpBody", - "client": { - "shortName": "GatewayServiceClient", - "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayServiceClient" + "regionTag": "connectgateway_v1beta1_generated_GatewayService_PostResource_async", + "title": "GatewayService postResource Sample", + "origin": "API_DEFINITION", + "description": " PostResource performs an HTTP POST on the Kubernetes API Server.", + "canonical": true, + "file": "gateway_service.post_resource.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "PostResource", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.PostResource", + "async": true, + "parameters": [ + { + "name": "content_type", + "type": "TYPE_STRING" + }, + { + "name": "data", + "type": "TYPE_BYTES" + }, + { + "name": "extensions", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.api.HttpBody", + "client": { + "shortName": "GatewayServiceClient", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayServiceClient" + }, + "method": { + "shortName": "PostResource", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.PostResource", + "service": { + "shortName": "GatewayService", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService" + } + } + } }, - "method": { - "shortName": "DeleteResource", - "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.DeleteResource", - "service": { - "shortName": "GatewayService", - "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService" - } - } - } - }, - { - "regionTag": "connectgateway_v1beta1_generated_GatewayService_PutResource_async", - "title": "GatewayService putResource Sample", - "origin": "API_DEFINITION", - "description": " PutResource performs an HTTP PUT on the Kubernetes API Server.", - "canonical": true, - "file": "gateway_service.put_resource.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "PutResource", - "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.PutResource", - "async": true, - "parameters": [ - { - "name": "content_type", - "type": "TYPE_STRING" - }, - { - "name": "data", - "type": "TYPE_BYTES" - }, - { - "name": "extensions", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.api.HttpBody", - "client": { - "shortName": "GatewayServiceClient", - "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayServiceClient" + "regionTag": "connectgateway_v1beta1_generated_GatewayService_DeleteResource_async", + "title": "GatewayService deleteResource Sample", + "origin": "API_DEFINITION", + "description": " DeleteResource performs an HTTP DELETE on the Kubernetes API Server.", + "canonical": true, + "file": "gateway_service.delete_resource.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteResource", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.DeleteResource", + "async": true, + "parameters": [ + { + "name": "content_type", + "type": "TYPE_STRING" + }, + { + "name": "data", + "type": "TYPE_BYTES" + }, + { + "name": "extensions", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.api.HttpBody", + "client": { + "shortName": "GatewayServiceClient", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayServiceClient" + }, + "method": { + "shortName": "DeleteResource", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.DeleteResource", + "service": { + "shortName": "GatewayService", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService" + } + } + } }, - "method": { - "shortName": "PutResource", - "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.PutResource", - "service": { - "shortName": "GatewayService", - "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService" - } - } - } - }, - { - "regionTag": "connectgateway_v1beta1_generated_GatewayService_PatchResource_async", - "title": "GatewayService patchResource Sample", - "origin": "API_DEFINITION", - "description": " PatchResource performs an HTTP PATCH on the Kubernetes API Server.", - "canonical": true, - "file": "gateway_service.patch_resource.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "PatchResource", - "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.PatchResource", - "async": true, - "parameters": [ - { - "name": "content_type", - "type": "TYPE_STRING" - }, - { - "name": "data", - "type": "TYPE_BYTES" - }, - { - "name": "extensions", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.api.HttpBody", - "client": { - "shortName": "GatewayServiceClient", - "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayServiceClient" + "regionTag": "connectgateway_v1beta1_generated_GatewayService_PutResource_async", + "title": "GatewayService putResource Sample", + "origin": "API_DEFINITION", + "description": " PutResource performs an HTTP PUT on the Kubernetes API Server.", + "canonical": true, + "file": "gateway_service.put_resource.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "PutResource", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.PutResource", + "async": true, + "parameters": [ + { + "name": "content_type", + "type": "TYPE_STRING" + }, + { + "name": "data", + "type": "TYPE_BYTES" + }, + { + "name": "extensions", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.api.HttpBody", + "client": { + "shortName": "GatewayServiceClient", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayServiceClient" + }, + "method": { + "shortName": "PutResource", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.PutResource", + "service": { + "shortName": "GatewayService", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService" + } + } + } }, - "method": { - "shortName": "PatchResource", - "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.PatchResource", - "service": { - "shortName": "GatewayService", - "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService" - } + { + "regionTag": "connectgateway_v1beta1_generated_GatewayService_PatchResource_async", + "title": "GatewayService patchResource Sample", + "origin": "API_DEFINITION", + "description": " PatchResource performs an HTTP PATCH on the Kubernetes API Server.", + "canonical": true, + "file": "gateway_service.patch_resource.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "PatchResource", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.PatchResource", + "async": true, + "parameters": [ + { + "name": "content_type", + "type": "TYPE_STRING" + }, + { + "name": "data", + "type": "TYPE_BYTES" + }, + { + "name": "extensions", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.api.HttpBody", + "client": { + "shortName": "GatewayServiceClient", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayServiceClient" + }, + "method": { + "shortName": "PatchResource", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.PatchResource", + "service": { + "shortName": "GatewayService", + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService" + } + } + } } - } - } - ] -} + ] +} \ No newline at end of file From 4fdf2f7135122187210019f33a0b2d4e0901e851 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 29 Apr 2022 09:34:28 -0700 Subject: [PATCH 170/254] chore: remove unused imports (#30) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: remove unused imports PiperOrigin-RevId: 445390897 Source-Link: https://github.com/googleapis/googleapis/commit/ca19f9a44bbc88625f8c898f9cdb25bbabdc474a Source-Link: https://github.com/googleapis/googleapis-gen/commit/e06d817d831390522e7598e9caf1c24aa942c644 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTA2ZDgxN2Q4MzEzOTA1MjJlNzU5OGU5Y2FmMWMyNGFhOTQyYzY0NCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../google/cloud/dataplex/v1/analyze.proto | 1 - .../google/cloud/dataplex/v1/logs.proto | 1 - .../google/cloud/dataplex/v1/resources.proto | 1 - .../google/cloud/dataplex/v1/tasks.proto | 1 - .../google-cloud-dataplex/protos/protos.d.ts | 500 ++--- .../google-cloud-dataplex/protos/protos.js | 1812 ++++++++--------- .../google-cloud-dataplex/protos/protos.json | 174 +- 7 files changed, 1243 insertions(+), 1247 deletions(-) diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/analyze.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/analyze.proto index c95aa3f1ddd..6f987fafad0 100644 --- a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/analyze.proto +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/analyze.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.cloud.dataplex.v1; -import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/dataplex/v1/resources.proto"; diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/logs.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/logs.proto index 7539b35300b..c1255bccdde 100644 --- a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/logs.proto +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/logs.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.cloud.dataplex.v1; -import "google/api/annotations.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/resources.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/resources.proto index 18ae0baa2dd..8786a00a35a 100644 --- a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/resources.proto +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/resources.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.cloud.dataplex.v1; -import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/protobuf/duration.proto"; diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/tasks.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/tasks.proto index c716944c65f..8bb07a2ee26 100644 --- a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/tasks.proto +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/tasks.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.cloud.dataplex.v1; -import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/dataplex/v1/resources.proto"; diff --git a/packages/google-cloud-dataplex/protos/protos.d.ts b/packages/google-cloud-dataplex/protos/protos.d.ts index 652016b6a1f..b33ec252878 100644 --- a/packages/google-cloud-dataplex/protos/protos.d.ts +++ b/packages/google-cloud-dataplex/protos/protos.d.ts @@ -14466,6 +14466,256 @@ export namespace google { /** Namespace api. */ namespace api { + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7 + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a Http. */ interface IHttp { @@ -14804,256 +15054,6 @@ export namespace google { */ public toJSON(): { [k: string]: any }; } - - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5, - UNORDERED_LIST = 6, - NON_EMPTY_DEFAULT = 7 - } - - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { - - /** ResourceDescriptor type */ - type?: (string|null); - - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); - - /** ResourceDescriptor nameField */ - nameField?: (string|null); - - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); - - /** ResourceDescriptor plural */ - plural?: (string|null); - - /** ResourceDescriptor singular */ - singular?: (string|null); - - /** ResourceDescriptor style */ - style?: (google.api.ResourceDescriptor.Style[]|null); - } - - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { - - /** - * Constructs a new ResourceDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceDescriptor); - - /** ResourceDescriptor type. */ - public type: string; - - /** ResourceDescriptor pattern. */ - public pattern: string[]; - - /** ResourceDescriptor nameField. */ - public nameField: string; - - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); - - /** ResourceDescriptor plural. */ - public plural: string; - - /** ResourceDescriptor singular. */ - public singular: string; - - /** ResourceDescriptor style. */ - public style: google.api.ResourceDescriptor.Style[]; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceDescriptor instance - */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; - - /** - * Verifies a ResourceDescriptor message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceDescriptor - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace ResourceDescriptor { - - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } - - /** Style enum. */ - enum Style { - STYLE_UNSPECIFIED = 0, - DECLARATIVE_FRIENDLY = 1 - } - } - - /** Properties of a ResourceReference. */ - interface IResourceReference { - - /** ResourceReference type */ - type?: (string|null); - - /** ResourceReference childType */ - childType?: (string|null); - } - - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { - - /** - * Constructs a new ResourceReference. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceReference); - - /** ResourceReference type. */ - public type: string; - - /** ResourceReference childType. */ - public childType: string; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceReference instance - */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; - - /** - * Verifies a ResourceReference message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceReference - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; - - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @param message ResourceReference - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } } /** Namespace protobuf. */ diff --git a/packages/google-cloud-dataplex/protos/protos.js b/packages/google-cloud-dataplex/protos/protos.js index d0496740a1d..64657cbeb63 100644 --- a/packages/google-cloud-dataplex/protos/protos.js +++ b/packages/google-cloud-dataplex/protos/protos.js @@ -35371,26 +35371,58 @@ */ var api = {}; - api.Http = (function() { + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + return values; + })(); + + api.ResourceDescriptor = (function() { /** - * Properties of a Http. + * Properties of a ResourceDescriptor. * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style */ /** - * Constructs a new Http. + * Constructs a new ResourceDescriptor. * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor * @constructor - * @param {google.api.IHttp=} [properties] Properties to set + * @param {google.api.IResourceDescriptor=} [properties] Properties to set */ - function Http(properties) { - this.rules = []; + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -35398,91 +35430,167 @@ } /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor * @instance */ - Http.prototype.rules = $util.emptyArray; + ResourceDescriptor.prototype.type = ""; /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor * @instance */ - Http.prototype.fullyDecodeReservedExpansion = false; + ResourceDescriptor.prototype.pattern = $util.emptyArray; /** - * Creates a new Http instance using the specified properties. + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. * @function create - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance */ - Http.create = function create(properties) { - return new Http(properties); + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); }; /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encode - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encode = function encode(message, writer) { + ResourceDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } return writer; }; /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encodeDelimited = function encodeDelimited(message, writer) { + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Http message from the specified reader or buffer. + * Decodes a ResourceDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http + * @returns {google.api.ResourceDescriptor} ResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Http.decode = function decode(reader, length) { + ResourceDescriptor.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + message.type = reader.string(); break; case 2: - message.fullyDecodeReservedExpansion = reader.bool(); + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + case 3: + message.nameField = reader.string(); + break; + case 4: + message.history = reader.int32(); + break; + case 5: + message.plural = reader.string(); + break; + case 6: + message.singular = reader.string(); + break; + case 10: + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); break; default: reader.skipType(tag & 7); @@ -35493,353 +35601,335 @@ }; /** - * Decodes a Http message from the specified reader or buffer, length delimited. + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http + * @returns {google.api.ResourceDescriptor} ResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Http.decodeDelimited = function decodeDelimited(reader) { + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Http message. + * Verifies a ResourceDescriptor message. * @function verify - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Http.verify = function verify(message) { + ResourceDescriptor.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - if (typeof message.fullyDecodeReservedExpansion !== "boolean") - return "fullyDecodeReservedExpansion: boolean expected"; - return null; - }; - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Http - * @static - * @param {Object.} object Plain object - * @returns {google.api.Http} Http - */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) - return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } } - if (object.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); return message; }; /** - * Creates a plain object from a Http message. Also converts values to other types if specified. + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.Http} message Http + * @param {google.api.ResourceDescriptor} message ResourceDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Http.toObject = function toObject(message, options) { + ResourceDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fullyDecodeReservedExpansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; return object; }; /** - * Converts this Http to JSON. + * Converts this ResourceDescriptor to JSON. * @function toJSON - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @instance * @returns {Object.} JSON object */ - Http.prototype.toJSON = function toJSON() { + ResourceDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Http; - })(); - - api.HttpRule = (function() { - - /** - * Properties of a HttpRule. - * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [responseBody] HttpRule responseBody - * @property {Array.|null} [additionalBindings] HttpRule additionalBindings - */ - - /** - * Constructs a new HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule - * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set - */ - function HttpRule(properties) { - this.additionalBindings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; - - /** - * HttpRule get. - * @member {string|null|undefined} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = null; - - /** - * HttpRule put. - * @member {string|null|undefined} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = null; - /** - * HttpRule post. - * @member {string|null|undefined} post - * @memberof google.api.HttpRule - * @instance + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value */ - HttpRule.prototype.post = null; + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); /** - * HttpRule delete. - * @member {string|null|undefined} delete - * @memberof google.api.HttpRule - * @instance + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value */ - HttpRule.prototype["delete"] = null; + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); - /** - * HttpRule patch. - * @member {string|null|undefined} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = null; + return ResourceDescriptor; + })(); - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; + api.ResourceReference = (function() { /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType */ - HttpRule.prototype.body = ""; - - /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule - * @instance + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set */ - HttpRule.prototype.responseBody = ""; + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference * @instance */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ResourceReference.prototype.type = ""; /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference * @instance */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); + ResourceReference.prototype.childType = ""; /** - * Creates a new HttpRule instance using the specified properties. + * Creates a new ResourceReference instance using the specified properties. * @function create - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); }; /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. * @function encode - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encode = function encode(message, writer) { + ResourceReference.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && Object.hasOwnProperty.call(message, "get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && Object.hasOwnProperty.call(message, "put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && Object.hasOwnProperty.call(message, "post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additionalBindings != null && message.additionalBindings.length) - for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); return writer; }; /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HttpRule message from the specified reader or buffer. + * Decodes a ResourceReference message from the specified reader or buffer. * @function decode - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule + * @returns {google.api.ResourceReference} ResourceReference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HttpRule.decode = function decode(reader, length) { + ResourceReference.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.selector = reader.string(); + message.type = reader.string(); break; case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message["delete"] = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + message.childType = reader.string(); break; default: reader.skipType(tag & 7); @@ -35850,240 +35940,118 @@ }; /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule + * @returns {google.api.ResourceReference} ResourceReference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { + ResourceReference.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HttpRule message. + * Verifies a ResourceReference message. * @function verify - * @memberof google.api.HttpRule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HttpRule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && message.hasOwnProperty("put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && message.hasOwnProperty("post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - var error = $root.google.api.CustomHttpPattern.verify(message.custom); - if (error) - return "custom." + error; - } - } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - if (!$util.isString(message.responseBody)) - return "responseBody: string expected"; - if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { - if (!Array.isArray(message.additionalBindings)) - return "additionalBindings: array expected"; - for (var i = 0; i < message.additionalBindings.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); - if (error) - return "additionalBindings." + error; - } - } - return null; - }; - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static - * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule - */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) - return object; - var message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); - } - if (object.body != null) - message.body = String(object.body); - if (object.responseBody != null) - message.responseBody = String(object.responseBody); - if (object.additionalBindings) { - if (!Array.isArray(object.additionalBindings)) - throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); - message.additionalBindings = []; - for (var i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); - message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); - } - } + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); return message; }; /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static - * @param {google.api.HttpRule} message HttpRule + * @param {google.api.ResourceReference} message ResourceReference * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HttpRule.toObject = function toObject(message, options) { + ResourceReference.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.additionalBindings = []; if (options.defaults) { - object.selector = ""; - object.body = ""; - object.responseBody = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; - } - if (message.additionalBindings && message.additionalBindings.length) { - object.additionalBindings = []; - for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + object.type = ""; + object.childType = ""; } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; return object; }; /** - * Converts this HttpRule to JSON. + * Converts this ResourceReference to JSON. * @function toJSON - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @instance * @returns {Object.} JSON object */ - HttpRule.prototype.toJSON = function toJSON() { + ResourceReference.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return HttpRule; + return ResourceReference; })(); - api.CustomHttpPattern = (function() { + api.Http = (function() { /** - * Properties of a CustomHttpPattern. + * Properties of a Http. * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion */ /** - * Constructs a new CustomHttpPattern. + * Constructs a new Http. * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern + * @classdesc Represents a Http. + * @implements IHttp * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @param {google.api.IHttp=} [properties] Properties to set */ - function CustomHttpPattern(properties) { + function Http(properties) { + this.rules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36091,88 +36059,91 @@ } /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http * @instance */ - CustomHttpPattern.prototype.kind = ""; + Http.prototype.rules = $util.emptyArray; /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http * @instance */ - CustomHttpPattern.prototype.path = ""; + Http.prototype.fullyDecodeReservedExpansion = false; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * Creates a new Http instance using the specified properties. * @function create - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); + Http.create = function create(properties) { + return new Http(properties); }; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encode - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encode = function encode(message, writer) { + Http.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); return writer; }; /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + Http.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes a Http message from the specified reader or buffer. * @function decode - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.Http} Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomHttpPattern.decode = function decode(reader, length) { + Http.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.kind = reader.string(); + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); break; case 2: - message.path = reader.string(); + message.fullyDecodeReservedExpansion = reader.bool(); break; default: reader.skipType(tag & 7); @@ -36183,150 +36154,143 @@ }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes a Http message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.Http} Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + Http.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomHttpPattern message. + * Verifies a Http message. * @function verify - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CustomHttpPattern.verify = function verify(message) { + Http.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; return null; }; /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a Http message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.Http} Http */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); return message; }; /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * Creates a plain object from a Http message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {google.api.Http} message Http * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomHttpPattern.toObject = function toObject(message, options) { + Http.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.kind = ""; - object.path = ""; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; return object; }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this Http to JSON. * @function toJSON - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @instance * @returns {Object.} JSON object */ - CustomHttpPattern.prototype.toJSON = function toJSON() { + Http.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CustomHttpPattern; - })(); - - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value - * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - values[valuesById[6] = "UNORDERED_LIST"] = 6; - values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; - return values; + return Http; })(); - api.ResourceDescriptor = (function() { + api.HttpRule = (function() { /** - * Properties of a ResourceDescriptor. + * Properties of a HttpRule. * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular - * @property {Array.|null} [style] ResourceDescriptor style + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings */ /** - * Constructs a new ResourceDescriptor. + * Constructs a new HttpRule. * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor + * @classdesc Represents a HttpRule. + * @implements IHttpRule * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @param {google.api.IHttpRule=} [properties] Properties to set */ - function ResourceDescriptor(properties) { - this.pattern = []; - this.style = []; + function HttpRule(properties) { + this.additionalBindings = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36334,167 +36298,209 @@ } /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.type = ""; + HttpRule.prototype.selector = ""; /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; + HttpRule.prototype.get = null; /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.nameField = ""; + HttpRule.prototype.put = null; /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.history = 0; + HttpRule.prototype.post = null; /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.plural = ""; + HttpRule.prototype["delete"] = null; /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.singular = ""; + HttpRule.prototype.patch = null; /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.style = $util.emptyArray; + HttpRule.prototype.custom = null; /** - * Creates a new ResourceDescriptor instance using the specified properties. + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. * @function create - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); + HttpRule.create = function create(properties) { + return new HttpRule(properties); }; /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encode - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encode = function encode(message, writer) { + HttpRule.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && Object.hasOwnProperty.call(message, "history")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); - if (message.style != null && message.style.length) { - writer.uint32(/* id 10, wireType 2 =*/82).fork(); - for (var i = 0; i < message.style.length; ++i) - writer.int32(message.style[i]); - writer.ldelim(); - } + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); return writer; }; /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. + * Decodes a HttpRule message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.HttpRule} HttpRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceDescriptor.decode = function decode(reader, length) { + HttpRule.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.string(); + message.selector = reader.string(); break; case 2: - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); + message.get = reader.string(); break; case 3: - message.nameField = reader.string(); + message.put = reader.string(); break; case 4: - message.history = reader.int32(); + message.post = reader.string(); break; case 5: - message.plural = reader.string(); + message["delete"] = reader.string(); break; case 6: - message.singular = reader.string(); + message.patch = reader.string(); break; - case 10: - if (!(message.style && message.style.length)) - message.style = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.style.push(reader.int32()); - } else - message.style.push(reader.int32()); + case 8: + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + case 7: + message.body = reader.string(); + break; + case 12: + message.responseBody = reader.string(); + break; + case 11: + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -36505,246 +36511,240 @@ }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a HttpRule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.HttpRule} HttpRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + HttpRule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceDescriptor message. + * Verifies a HttpRule message. * @function verify - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResourceDescriptor.verify = function verify(message) { + HttpRule.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.pattern != null && message.hasOwnProperty("pattern")) { - if (!Array.isArray(message.pattern)) - return "pattern: array expected"; - for (var i = 0; i < message.pattern.length; ++i) - if (!$util.isString(message.pattern[i])) - return "pattern: string[] expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; } - if (message.nameField != null && message.hasOwnProperty("nameField")) - if (!$util.isString(message.nameField)) - return "nameField: string expected"; - if (message.history != null && message.hasOwnProperty("history")) - switch (message.history) { - default: - return "history: enum value expected"; - case 0: - case 1: - case 2: - break; + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; } - if (message.plural != null && message.hasOwnProperty("plural")) - if (!$util.isString(message.plural)) - return "plural: string expected"; - if (message.singular != null && message.hasOwnProperty("singular")) - if (!$util.isString(message.singular)) - return "singular: string expected"; - if (message.style != null && message.hasOwnProperty("style")) { - if (!Array.isArray(message.style)) - return "style: array expected"; - for (var i = 0; i < message.style.length; ++i) - switch (message.style[i]) { - default: - return "style: enum value[] expected"; - case 0: - case 1: - break; - } } return null; }; /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.HttpRule} HttpRule */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) return object; - var message = new $root.google.api.ResourceDescriptor(); - if (object.type != null) - message.type = String(object.type); - if (object.pattern) { - if (!Array.isArray(object.pattern)) - throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); - message.pattern = []; - for (var i = 0; i < object.pattern.length; ++i) - message.pattern[i] = String(object.pattern[i]); - } - if (object.nameField != null) - message.nameField = String(object.nameField); - switch (object.history) { - case "HISTORY_UNSPECIFIED": - case 0: - message.history = 0; - break; - case "ORIGINALLY_SINGLE_PATTERN": - case 1: - message.history = 1; - break; - case "FUTURE_MULTI_PATTERN": - case 2: - message.history = 2; - break; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); } - if (object.plural != null) - message.plural = String(object.plural); - if (object.singular != null) - message.singular = String(object.singular); - if (object.style) { - if (!Array.isArray(object.style)) - throw TypeError(".google.api.ResourceDescriptor.style: array expected"); - message.style = []; - for (var i = 0; i < object.style.length; ++i) - switch (object.style[i]) { - default: - case "STYLE_UNSPECIFIED": - case 0: - message.style[i] = 0; - break; - case "DECLARATIVE_FRIENDLY": - case 1: - message.style[i] = 1; - break; - } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } } return message; }; /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {google.api.HttpRule} message HttpRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceDescriptor.toObject = function toObject(message, options) { + HttpRule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.pattern = []; - object.style = []; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; } - if (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.pattern && message.pattern.length) { - object.pattern = []; - for (var j = 0; j < message.pattern.length; ++j) - object.pattern[j] = message.pattern[j]; + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; } - if (message.nameField != null && message.hasOwnProperty("nameField")) - object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; - if (message.plural != null && message.hasOwnProperty("plural")) - object.plural = message.plural; - if (message.singular != null && message.hasOwnProperty("singular")) - object.singular = message.singular; - if (message.style && message.style.length) { - object.style = []; - for (var j = 0; j < message.style.length; ++j) - object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; return object; }; /** - * Converts this ResourceDescriptor to JSON. + * Converts this HttpRule to JSON. * @function toJSON - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @instance * @returns {Object.} JSON object */ - ResourceDescriptor.prototype.toJSON = function toJSON() { + HttpRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * History enum. - * @name google.api.ResourceDescriptor.History - * @enum {number} - * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value - * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value - * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value - */ - ResourceDescriptor.History = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; - values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; - return values; - })(); - - /** - * Style enum. - * @name google.api.ResourceDescriptor.Style - * @enum {number} - * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value - * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value - */ - ResourceDescriptor.Style = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; - return values; - })(); - - return ResourceDescriptor; + return HttpRule; })(); - api.ResourceReference = (function() { + api.CustomHttpPattern = (function() { /** - * Properties of a ResourceReference. + * Properties of a CustomHttpPattern. * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path */ /** - * Constructs a new ResourceReference. + * Constructs a new CustomHttpPattern. * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set */ - function ResourceReference(properties) { + function CustomHttpPattern(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36752,88 +36752,88 @@ } /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern * @instance */ - ResourceReference.prototype.type = ""; + CustomHttpPattern.prototype.kind = ""; /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern * @instance */ - ResourceReference.prototype.childType = ""; + CustomHttpPattern.prototype.path = ""; /** - * Creates a new ResourceReference instance using the specified properties. + * Creates a new CustomHttpPattern instance using the specified properties. * @function create - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); }; /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encode - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encode = function encode(message, writer) { + CustomHttpPattern.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); return writer; }; /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceReference message from the specified reader or buffer. + * Decodes a CustomHttpPattern message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.CustomHttpPattern} CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceReference.decode = function decode(reader, length) { + CustomHttpPattern.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.string(); + message.kind = reader.string(); break; case 2: - message.childType = reader.string(); + message.path = reader.string(); break; default: reader.skipType(tag & 7); @@ -36844,96 +36844,96 @@ }; /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.CustomHttpPattern} CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceReference message. + * Verifies a CustomHttpPattern message. * @function verify - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResourceReference.verify = function verify(message) { + CustomHttpPattern.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.childType != null && message.hasOwnProperty("childType")) - if (!$util.isString(message.childType)) - return "childType: string expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; return null; }; /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.CustomHttpPattern} CustomHttpPattern */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) return object; - var message = new $root.google.api.ResourceReference(); - if (object.type != null) - message.type = String(object.type); - if (object.childType != null) - message.childType = String(object.childType); + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); return message; }; /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.ResourceReference} message ResourceReference + * @param {google.api.CustomHttpPattern} message CustomHttpPattern * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceReference.toObject = function toObject(message, options) { + CustomHttpPattern.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.type = ""; - object.childType = ""; + object.kind = ""; + object.path = ""; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; return object; }; /** - * Converts this ResourceReference to JSON. + * Converts this CustomHttpPattern to JSON. * @function toJSON - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @instance * @returns {Object.} JSON object */ - ResourceReference.prototype.toJSON = function toJSON() { + CustomHttpPattern.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ResourceReference; + return CustomHttpPattern; })(); return api; diff --git a/packages/google-cloud-dataplex/protos/protos.json b/packages/google-cloud-dataplex/protos/protos.json index 98b7eebb9d0..e6054c23a74 100644 --- a/packages/google-cloud-dataplex/protos/protos.json +++ b/packages/google-cloud-dataplex/protos/protos.json @@ -4854,93 +4854,6 @@ "cc_enable_arenas": true }, "nested": { - "http": { - "type": "HttpRule", - "id": 72295728, - "extend": "google.protobuf.MethodOptions" - }, - "Http": { - "fields": { - "rules": { - "rule": "repeated", - "type": "HttpRule", - "id": 1 - }, - "fullyDecodeReservedExpansion": { - "type": "bool", - "id": 2 - } - } - }, - "HttpRule": { - "oneofs": { - "pattern": { - "oneof": [ - "get", - "put", - "post", - "delete", - "patch", - "custom" - ] - } - }, - "fields": { - "selector": { - "type": "string", - "id": 1 - }, - "get": { - "type": "string", - "id": 2 - }, - "put": { - "type": "string", - "id": 3 - }, - "post": { - "type": "string", - "id": 4 - }, - "delete": { - "type": "string", - "id": 5 - }, - "patch": { - "type": "string", - "id": 6 - }, - "custom": { - "type": "CustomHttpPattern", - "id": 8 - }, - "body": { - "type": "string", - "id": 7 - }, - "responseBody": { - "type": "string", - "id": 12 - }, - "additionalBindings": { - "rule": "repeated", - "type": "HttpRule", - "id": 11 - } - } - }, - "CustomHttpPattern": { - "fields": { - "kind": { - "type": "string", - "id": 1 - }, - "path": { - "type": "string", - "id": 2 - } - } - }, "fieldBehavior": { "rule": "repeated", "type": "google.api.FieldBehavior", @@ -5036,6 +4949,93 @@ } } }, + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, "methodSignature": { "rule": "repeated", "type": "string", From 00e99cc28ebdddb32be1e94bc369fed737168a95 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 3 May 2022 03:22:24 +0200 Subject: [PATCH 171/254] chore(deps): update dependency @types/mocha to v9 (#117) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@types/mocha](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | [`^8.0.4` -> `^9.0.0`](https://renovatebot.com/diffs/npm/@types%2fmocha/8.2.3/9.1.1) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.1.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.1.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.1.1/compatibility-slim/8.2.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.1.1/confidence-slim/8.2.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-policy-troubleshooter). --- packages/google-cloud-policytroubleshooter/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-policytroubleshooter/package.json b/packages/google-cloud-policytroubleshooter/package.json index f70d116e685..8c22ae6ea7e 100644 --- a/packages/google-cloud-policytroubleshooter/package.json +++ b/packages/google-cloud-policytroubleshooter/package.json @@ -42,7 +42,7 @@ "google-gax": "^2.24.1" }, "devDependencies": { - "@types/mocha": "^8.0.4", + "@types/mocha": "^9.0.0", "@types/node": "^16.0.0", "@types/sinon": "^10.0.0", "c8": "^7.3.5", From 644306ae088b87824a2ebe3b8674453648ab6c1e Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 5 May 2022 11:31:07 -0700 Subject: [PATCH 172/254] chore(main): release 1.1.0 (#72) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-shell/CHANGELOG.md | 7 +++++++ packages/google-cloud-shell/package-lock.json | 2 +- packages/google-cloud-shell/package.json | 2 +- packages/google-cloud-shell/samples/package.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-shell/CHANGELOG.md b/packages/google-cloud-shell/CHANGELOG.md index 972bfd0e20b..63e9373378a 100644 --- a/packages/google-cloud-shell/CHANGELOG.md +++ b/packages/google-cloud-shell/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.1.0](https://github.com/googleapis/nodejs-cloud-shell/compare/v1.0.5...v1.1.0) (2022-04-21) + + +### Features + +* upgrade library to ga ([#69](https://github.com/googleapis/nodejs-cloud-shell/issues/69)) ([e878a84](https://github.com/googleapis/nodejs-cloud-shell/commit/e878a84014054ecfc2cd2d090c6762eaeca20fca)) + ### [1.0.5](https://www.github.com/googleapis/nodejs-cloud-shell/compare/v1.0.4...v1.0.5) (2021-08-30) diff --git a/packages/google-cloud-shell/package-lock.json b/packages/google-cloud-shell/package-lock.json index 630ac3e39d7..b2cd45bae6f 100644 --- a/packages/google-cloud-shell/package-lock.json +++ b/packages/google-cloud-shell/package-lock.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/shell", - "version": "1.0.5", + "version": "1.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/google-cloud-shell/package.json b/packages/google-cloud-shell/package.json index dfb25a56e2a..ec0080612bd 100644 --- a/packages/google-cloud-shell/package.json +++ b/packages/google-cloud-shell/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/shell", - "version": "1.0.5", + "version": "1.1.0", "description": "cloudshell client for Node.js", "repository": "googleapis/nodejs-cloud-shell", "license": "Apache-2.0", diff --git a/packages/google-cloud-shell/samples/package.json b/packages/google-cloud-shell/samples/package.json index eb97e78421f..4f49f8d13db 100644 --- a/packages/google-cloud-shell/samples/package.json +++ b/packages/google-cloud-shell/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/shell": "^1.0.5" + "@google-cloud/shell": "^1.1.0" }, "devDependencies": { "c8": "^7.1.0", From db8e59ab75c21496ff25bf8359b51802ca9ce103 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 9 May 2022 17:36:15 +0200 Subject: [PATCH 173/254] chore(deps): update dependency sinon to v14 (#120) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^13.0.0` -> `^14.0.0`](https://renovatebot.com/diffs/npm/sinon/13.0.2/14.0.0) | [![age](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/compatibility-slim/13.0.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/confidence-slim/13.0.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v14.0.0`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1400) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v13.0.2...v14.0.0) - [`c2bbd826`](https://togithub.com/sinonjs/sinon/commit/c2bbd82641444eb5b32822489ae40f185afbbf00) Drop node 12 (Morgan Roderick) > And embrace Node 18 > > See https://nodejs.org/en/about/releases/ *Released by Morgan Roderick on 2022-05-07.*
--- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-policy-troubleshooter). --- packages/google-cloud-policytroubleshooter/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-policytroubleshooter/package.json b/packages/google-cloud-policytroubleshooter/package.json index 8c22ae6ea7e..5232d53d935 100644 --- a/packages/google-cloud-policytroubleshooter/package.json +++ b/packages/google-cloud-policytroubleshooter/package.json @@ -54,7 +54,7 @@ "mocha": "^8.2.1", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", - "sinon": "^13.0.0", + "sinon": "^14.0.0", "ts-loader": "^9.0.0", "typescript": "^4.1.2", "webpack": "^5.9.0", From 56118b2dd1bfa6994ded684871ccc72b6cf7028c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 9 May 2022 17:38:23 +0200 Subject: [PATCH 174/254] chore(deps): update dependency sinon to v14 (#68) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^13.0.0` -> `^14.0.0`](https://renovatebot.com/diffs/npm/sinon/13.0.2/14.0.0) | [![age](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/compatibility-slim/13.0.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/confidence-slim/13.0.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v14.0.0`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1400) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v13.0.2...v14.0.0) - [`c2bbd826`](https://togithub.com/sinonjs/sinon/commit/c2bbd82641444eb5b32822489ae40f185afbbf00) Drop node 12 (Morgan Roderick) > And embrace Node 18 > > See https://nodejs.org/en/about/releases/ *Released by Morgan Roderick on 2022-05-07.*
--- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-gke-connect-gateway). --- packages/google-cloud-gkeconnect-gateway/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-gkeconnect-gateway/package.json b/packages/google-cloud-gkeconnect-gateway/package.json index 7cd9c728a0b..d8be5aa2894 100644 --- a/packages/google-cloud-gkeconnect-gateway/package.json +++ b/packages/google-cloud-gkeconnect-gateway/package.json @@ -54,7 +54,7 @@ "mocha": "^9.0.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", - "sinon": "^13.0.0", + "sinon": "^14.0.0", "ts-loader": "^9.1.2", "typescript": "^4.2.4", "webpack": "^5.36.2", From 3dd48b44115c5e687781d1f221a40e1ed6f77640 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 9 May 2022 17:42:15 +0200 Subject: [PATCH 175/254] chore(deps): update dependency sinon to v14 (#33) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^13.0.0` -> `^14.0.0`](https://renovatebot.com/diffs/npm/sinon/13.0.2/14.0.0) | [![age](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/compatibility-slim/13.0.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/confidence-slim/13.0.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v14.0.0`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1400) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v13.0.2...v14.0.0) - [`c2bbd826`](https://togithub.com/sinonjs/sinon/commit/c2bbd82641444eb5b32822489ae40f185afbbf00) Drop node 12 (Morgan Roderick) > And embrace Node 18 > > See https://nodejs.org/en/about/releases/ *Released by Morgan Roderick on 2022-05-07.*
--- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-dataplex). --- packages/google-cloud-dataplex/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-dataplex/package.json b/packages/google-cloud-dataplex/package.json index 97ba96fb86e..4a663947637 100644 --- a/packages/google-cloud-dataplex/package.json +++ b/packages/google-cloud-dataplex/package.json @@ -55,7 +55,7 @@ "mocha": "^9.0.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", - "sinon": "^13.0.0", + "sinon": "^14.0.0", "ts-loader": "^9.1.2", "typescript": "^4.2.4", "webpack": "^5.36.2", From 1961eb6777c7661f3d689e49e2d9d78061894dc2 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 9 May 2022 17:42:19 +0200 Subject: [PATCH 176/254] chore(deps): update dependency sinon to v14 (#48) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^13.0.0` -> `^14.0.0`](https://renovatebot.com/diffs/npm/sinon/13.0.2/14.0.0) | [![age](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/compatibility-slim/13.0.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/confidence-slim/13.0.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v14.0.0`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1400) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v13.0.2...v14.0.0) - [`c2bbd826`](https://togithub.com/sinonjs/sinon/commit/c2bbd82641444eb5b32822489ae40f185afbbf00) Drop node 12 (Morgan Roderick) > And embrace Node 18 > > See https://nodejs.org/en/about/releases/ *Released by Morgan Roderick on 2022-05-07.*
--- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-deploy). --- packages/google-cloud-deploy/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-deploy/package.json b/packages/google-cloud-deploy/package.json index 1a858c178f2..91d88525808 100644 --- a/packages/google-cloud-deploy/package.json +++ b/packages/google-cloud-deploy/package.json @@ -54,7 +54,7 @@ "mocha": "^9.0.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", - "sinon": "^13.0.0", + "sinon": "^14.0.0", "ts-loader": "^9.1.2", "typescript": "^4.2.4", "webpack": "^5.36.2", From c878577a592ec956f5b5da58c04c1467d02dfa2d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 9 May 2022 17:46:20 +0200 Subject: [PATCH 177/254] chore(deps): update dependency sinon to v14 (#87) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^13.0.0` -> `^14.0.0`](https://renovatebot.com/diffs/npm/sinon/13.0.0/14.0.0) | [![age](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/compatibility-slim/13.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/confidence-slim/13.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v14.0.0`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1400) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v13.0.2...v14.0.0) - [`c2bbd826`](https://togithub.com/sinonjs/sinon/commit/c2bbd82641444eb5b32822489ae40f185afbbf00) Drop node 12 (Morgan Roderick) > And embrace Node 18 > > See https://nodejs.org/en/about/releases/ *Released by Morgan Roderick on 2022-05-07.* ### [`v13.0.2`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1302) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v13.0.1...v13.0.2) - [`bddb631a`](https://togithub.com/sinonjs/sinon/commit/bddb631aab6afc3e663a5db847c675ea96c90970) Update fake-timers (Carl-Erik Kopseng) - [`eaed0eb2`](https://togithub.com/sinonjs/sinon/commit/eaed0eb24bd8f42b0484b8861a5ff066001da5d5) Bump nokogiri from 1.13.3 to 1.13.4 ([#​2451](https://togithub.com/sinonjs/sinon/issues/2451)) (dependabot\[bot]) *Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2022-04-14.* ### [`v13.0.1`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1301) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v13.0.0...v13.0.1) - [`ec4223f9`](https://togithub.com/sinonjs/sinon/commit/ec4223f94076d809483e3c6a7536cfc1278dd3c9) Bump nise to fix [sinonjs/nise#​193](https://togithub.com/sinonjs/nise/issues/193) (Carl-Erik Kopseng) - [`f329a010`](https://togithub.com/sinonjs/sinon/commit/f329a01040bfa5a79e039419220b21eda56935d6) Add unimported to workflow ([#​2441](https://togithub.com/sinonjs/sinon/issues/2441)) (Morgan Roderick) - [`7f16cec9`](https://togithub.com/sinonjs/sinon/commit/7f16cec968c3c8d4e580267fb00195916d6f827d) Enable updates to same major version (Carl-Erik Kopseng) - [`f784d7ad`](https://togithub.com/sinonjs/sinon/commit/f784d7ad2c86be0fc65477d69f8bdafca846ef2c) Re-introduce new version.sh script to version hook (Joel Bradshaw) > This was inadvertently removed during merge conflicts, and is required > for any of the new release process stuff to work - [`51c508ab`](https://togithub.com/sinonjs/sinon/commit/51c508ab77cf0f9fb8c5305ff626f6a2eada178f) Add dry run mode to `npm version` ([#​2436](https://togithub.com/sinonjs/sinon/issues/2436)) (Joel Bradshaw) > - Add DRY_RUN flag to skip publish/push > > - Allow overriding branch names for testing - [`05341dcf`](https://togithub.com/sinonjs/sinon/commit/05341dcf92ddca4a1d4c90966b1fcdc7039cff18) Update npm version scripts to manage new releases branch (Joel Bradshaw) - [`fe658261`](https://togithub.com/sinonjs/sinon/commit/fe65826171db69ed2986a1060db77944dbc98a6d) Remove release archives from master (Joel Bradshaw) > These archives made it difficult to find things in the GitHub interface, > and take up a lot of space in a checked-out repo for something that is > not useful to most people checking out the repository. > > The main purpose of these archives is to make old versions and > documentation available on the Sinon website that is run out of this > repo. This can be supported by using a separate branch for website > releases, and to maintain the archives. > > Following this commit, the `npm version` scripts will be updated to > automatically handle archiving the releases in the new releases branch > and keeping it up to date with master. > > Also remove the directories we removed from .prettierignore, since they > don't exist any more. *Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2022-02-01.*
--- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-cloud-shell). --- packages/google-cloud-shell/package-lock.json | 26 +++++++++---------- packages/google-cloud-shell/package.json | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/google-cloud-shell/package-lock.json b/packages/google-cloud-shell/package-lock.json index b2cd45bae6f..3cbe005d23a 100644 --- a/packages/google-cloud-shell/package-lock.json +++ b/packages/google-cloud-shell/package-lock.json @@ -3414,13 +3414,13 @@ "dev": true }, "nise": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.0.tgz", - "integrity": "sha512-W5WlHu+wvo3PaKLsJJkgPup2LrsXCcm7AWwyNZkUnn5rwPkuPBi3Iwk5SQtN0mv+K65k7nKKjwNQ30wg3wLAQQ==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.1.tgz", + "integrity": "sha512-yr5kW2THW1AkxVmCnKEh4nbYkJdB3I7LUkiUgOvEkOp414mc2UMaHMA7pjq1nYowhdoJZGwEKGaQVbxfpWj10A==", "dev": true, "requires": { - "@sinonjs/commons": "^1.7.0", - "@sinonjs/fake-timers": "^7.0.4", + "@sinonjs/commons": "^1.8.3", + "@sinonjs/fake-timers": ">=5", "@sinonjs/text-encoding": "^0.7.1", "just-extend": "^4.0.2", "path-to-regexp": "^1.7.0" @@ -4235,23 +4235,23 @@ "dev": true }, "sinon": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-13.0.0.tgz", - "integrity": "sha512-3tjMDB/tY04b06Bnb4aMKQfNrau2C9HET+R4HVWfv2KegDVLGg4wnBqjVepvxR7S7R1GTwDZzEv52tpFipt6yA==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-14.0.0.tgz", + "integrity": "sha512-ugA6BFmE+WrJdh0owRZHToLd32Uw3Lxq6E6LtNRU+xTVBefx632h03Q7apXWRsRdZAJ41LB8aUfn2+O4jsDNMw==", "dev": true, "requires": { "@sinonjs/commons": "^1.8.3", - "@sinonjs/fake-timers": "^9.0.0", + "@sinonjs/fake-timers": "^9.1.2", "@sinonjs/samsam": "^6.1.1", "diff": "^5.0.0", - "nise": "^5.1.0", + "nise": "^5.1.1", "supports-color": "^7.2.0" }, "dependencies": { "@sinonjs/fake-timers": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.0.0.tgz", - "integrity": "sha512-+shXA2X7KNP7H7qNbQTJ3SA+NQc0pZDSBrdvFSRwF8sAo/ohw+ZQFD8Moc+gnz51+1eRXtEQBpKWPiQ4jsRC/w==", + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", + "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", "dev": true, "requires": { "@sinonjs/commons": "^1.7.0" diff --git a/packages/google-cloud-shell/package.json b/packages/google-cloud-shell/package.json index ec0080612bd..9a822f7316f 100644 --- a/packages/google-cloud-shell/package.json +++ b/packages/google-cloud-shell/package.json @@ -54,7 +54,7 @@ "mocha": "^9.0.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", - "sinon": "^13.0.0", + "sinon": "^14.0.0", "ts-loader": "^9.1.2", "typescript": "^4.2.4", "webpack": "^5.36.2", From d26bfe97f619a2c3061929a7755ceff27228c3ea Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 19 May 2022 02:24:10 +0200 Subject: [PATCH 178/254] fix(deps): update dependency @google-cloud/local-auth to v2 (#123) --- packages/google-cloud-policytroubleshooter/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-policytroubleshooter/samples/package.json b/packages/google-cloud-policytroubleshooter/samples/package.json index adccda2547c..3505f95ff38 100644 --- a/packages/google-cloud-policytroubleshooter/samples/package.json +++ b/packages/google-cloud-policytroubleshooter/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/local-auth": "^1.0.0", + "@google-cloud/local-auth": "^2.0.0", "@google-cloud/policy-troubleshooter": "^1.1.1" }, "devDependencies": { From fb4c7efe1ececdebe972c01ee58a8224c3d637a3 Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Wed, 18 May 2022 17:24:35 -0700 Subject: [PATCH 179/254] build!: update library to use Node 12 (#122) * build!: Update library to use Node 12 Co-authored-by: Owl Bot --- .../google-cloud-policytroubleshooter/package.json | 10 +++++----- .../samples/package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-policytroubleshooter/package.json b/packages/google-cloud-policytroubleshooter/package.json index 5232d53d935..621a5f9b270 100644 --- a/packages/google-cloud-policytroubleshooter/package.json +++ b/packages/google-cloud-policytroubleshooter/package.json @@ -39,28 +39,28 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^2.24.1" + "google-gax": "^3.0.1" }, "devDependencies": { "@types/mocha": "^9.0.0", "@types/node": "^16.0.0", "@types/sinon": "^10.0.0", "c8": "^7.3.5", - "gts": "^3.0.3", + "gts": "^3.1.0", "jsdoc": "^3.6.6", "jsdoc-fresh": "^1.0.2", "jsdoc-region-tag": "^1.0.6", "linkinator": "^2.7.0", - "mocha": "^8.2.1", + "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", "sinon": "^14.0.0", "ts-loader": "^9.0.0", - "typescript": "^4.1.2", + "typescript": "^4.6.4", "webpack": "^5.9.0", "webpack-cli": "^4.2.0" }, "engines": { - "node": ">=10.0.0" + "node": ">=12.0.0" } } diff --git a/packages/google-cloud-policytroubleshooter/samples/package.json b/packages/google-cloud-policytroubleshooter/samples/package.json index 3505f95ff38..15926c75739 100644 --- a/packages/google-cloud-policytroubleshooter/samples/package.json +++ b/packages/google-cloud-policytroubleshooter/samples/package.json @@ -4,7 +4,7 @@ "license": "Apache-2.0", "author": "Google LLC", "engines": { - "node": ">=10" + "node": ">=12.0.0" }, "files": [ "*.js" From 7a6403ce04eb13aad14ab32458b0668e81c715d2 Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Wed, 18 May 2022 17:53:39 -0700 Subject: [PATCH 180/254] build!: update library to use Node 12 (#70) * build!: Update library to use Node 12 Co-authored-by: Owl Bot --- packages/google-cloud-gkeconnect-gateway/package.json | 8 ++++---- .../google-cloud-gkeconnect-gateway/samples/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-gkeconnect-gateway/package.json b/packages/google-cloud-gkeconnect-gateway/package.json index d8be5aa2894..bc5882e6431 100644 --- a/packages/google-cloud-gkeconnect-gateway/package.json +++ b/packages/google-cloud-gkeconnect-gateway/package.json @@ -39,7 +39,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^2.24.1" + "google-gax": "^3.0.1" }, "devDependencies": { "@types/mocha": "^9.0.0", @@ -51,16 +51,16 @@ "jsdoc-fresh": "^1.0.2", "jsdoc-region-tag": "^1.0.6", "linkinator": "^2.13.6", - "mocha": "^9.0.0", + "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", "sinon": "^14.0.0", "ts-loader": "^9.1.2", - "typescript": "^4.2.4", + "typescript": "^4.6.4", "webpack": "^5.36.2", "webpack-cli": "^4.7.0" }, "engines": { - "node": ">=v10.0.0" + "node": ">=12.0.0" } } diff --git a/packages/google-cloud-gkeconnect-gateway/samples/package.json b/packages/google-cloud-gkeconnect-gateway/samples/package.json index abfe0a82c20..04c39b97b0b 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/package.json +++ b/packages/google-cloud-gkeconnect-gateway/samples/package.json @@ -4,7 +4,7 @@ "license": "Apache-2.0", "author": "Google LLC", "engines": { - "node": ">=10" + "node": ">=12.0.0" }, "files": [ "*.js" From fdf644bef4d3000bdc6830dcceea2274903ea6b0 Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Wed, 18 May 2022 18:54:26 -0700 Subject: [PATCH 181/254] build!: update library to use Node 12 (#89) * build!: Update library to use Node 12 Co-authored-by: Owl Bot --- packages/google-cloud-shell/package-lock.json | 773 +++++++++--------- packages/google-cloud-shell/package.json | 8 +- .../google-cloud-shell/samples/package.json | 2 +- 3 files changed, 411 insertions(+), 372 deletions(-) diff --git a/packages/google-cloud-shell/package-lock.json b/packages/google-cloud-shell/package-lock.json index 3cbe005d23a..89ae068eb73 100644 --- a/packages/google-cloud-shell/package-lock.json +++ b/packages/google-cloud-shell/package-lock.json @@ -107,15 +107,15 @@ "dev": true }, "@eslint/eslintrc": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.1.tgz", - "integrity": "sha512-5v7TDE9plVhvxQeWLXDTvFvJBdH6pEsdnl2g/dAptmuFEPedQ4Erq5rsDsX+mvAM610IhNaO2W5V1dOOnDKxkQ==", + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", + "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.1.1", "espree": "^7.3.0", - "globals": "^12.1.0", + "globals": "^13.9.0", "ignore": "^4.0.6", "import-fresh": "^3.2.1", "js-yaml": "^3.13.1", @@ -123,60 +123,52 @@ "strip-json-comments": "^3.1.1" }, "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - }, - "espree": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", - "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", - "dev": true, - "requires": { - "acorn": "^7.4.0", - "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" - } - }, - "globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", - "dev": true, - "requires": { - "type-fest": "^0.8.1" - } - }, - "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true } } }, "@grpc/grpc-js": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.3.7.tgz", - "integrity": "sha512-CKQVuwuSPh40tgOkR7c0ZisxYRiN05PcKPW72mQL5y++qd7CwBRoaJZvU5xfXnCJDFBmS3qZGQ71Frx6Ofo2XA==", + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.6.7.tgz", + "integrity": "sha512-eBM03pu9hd3VqDQG+kHahiG1x80RGkkqqRb1Pchcwqej/KkAH95gAvKs6laqaHCycYaPK+TKuNQnOz9UXYA8qw==", "requires": { + "@grpc/proto-loader": "^0.6.4", "@types/node": ">=12.12.47" } }, "@grpc/proto-loader": { - "version": "0.6.4", - "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.6.4.tgz", - "integrity": "sha512-7xvDvW/vJEcmLUltCUGOgWRPM8Oofv0eCFSVMuKqaqWJaXSzmB+m9hiyqe34QofAl4WAzIKUZZlinIF9FOHyTQ==", + "version": "0.6.12", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.6.12.tgz", + "integrity": "sha512-filTVbETFnxb9CyRX98zN18ilChTuf/C5scZ2xyaOTp0EHGq0/ufX8rjqXUcSb1Gpv7eZq4M2jDvbh9BogKnrg==", "requires": { "@types/long": "^4.0.1", "lodash.camelcase": "^4.3.0", "long": "^4.0.0", "protobufjs": "^6.10.0", - "yargs": "^16.1.1" + "yargs": "^16.2.0" + } + }, + "@humanwhocodes/config-array": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", + "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", + "dev": true, + "requires": { + "@humanwhocodes/object-schema": "^1.2.0", + "debug": "^4.1.1", + "minimatch": "^3.0.4" } }, + "@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true + }, "@istanbuljs/schema": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", @@ -184,35 +176,35 @@ "dev": true }, "@nodelib/fs.scandir": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz", - "integrity": "sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, "requires": { - "@nodelib/fs.stat": "2.0.4", + "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" } }, "@nodelib/fs.stat": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz", - "integrity": "sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true }, "@nodelib/fs.walk": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz", - "integrity": "sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow==", + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, "requires": { - "@nodelib/fs.scandir": "2.1.4", + "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" } }, "@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha1-m4sMxmPWaafY9vXQiToU00jzD78=" + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" }, "@protobufjs/base64": { "version": "1.1.2", @@ -227,12 +219,12 @@ "@protobufjs/eventemitter": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha1-NVy8mLr61ZePntCV85diHx0Ga3A=" + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" }, "@protobufjs/fetch": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", - "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", "requires": { "@protobufjs/aspromise": "^1.1.1", "@protobufjs/inquire": "^1.1.0" @@ -241,27 +233,27 @@ "@protobufjs/float": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E=" + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" }, "@protobufjs/inquire": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik=" + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" }, "@protobufjs/path": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha1-bMKyDFya1q0NzP0hynZz2Nf79o0=" + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" }, "@protobufjs/pool": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q=" + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" }, "@protobufjs/utf8": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" }, "@sindresorhus/is": { "version": "0.14.0", @@ -352,9 +344,9 @@ "dev": true }, "@types/long": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz", - "integrity": "sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w==" + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", + "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==" }, "@types/minimist": { "version": "1.2.1", @@ -389,107 +381,85 @@ } }, "@typescript-eslint/eslint-plugin": { - "version": "4.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.26.0.tgz", - "integrity": "sha512-yA7IWp+5Qqf+TLbd8b35ySFOFzUfL7i+4If50EqvjT6w35X8Lv0eBHb6rATeWmucks37w+zV+tWnOXI9JlG6Eg==", + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.33.0.tgz", + "integrity": "sha512-aINiAxGVdOl1eJyVjaWn/YcVAq4Gi/Yo35qHGCnqbWVz61g39D0h23veY/MA0rFFGfxK7TySg2uwDeNv+JgVpg==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "4.26.0", - "@typescript-eslint/scope-manager": "4.26.0", + "@typescript-eslint/experimental-utils": "4.33.0", + "@typescript-eslint/scope-manager": "4.33.0", "debug": "^4.3.1", "functional-red-black-tree": "^1.0.1", - "lodash": "^4.17.21", + "ignore": "^5.1.8", "regexpp": "^3.1.0", "semver": "^7.3.5", "tsutils": "^3.21.0" - }, - "dependencies": { - "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - } } }, "@typescript-eslint/experimental-utils": { - "version": "4.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.26.0.tgz", - "integrity": "sha512-TH2FO2rdDm7AWfAVRB5RSlbUhWxGVuxPNzGT7W65zVfl8H/WeXTk1e69IrcEVsBslrQSTDKQSaJD89hwKrhdkw==", + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.33.0.tgz", + "integrity": "sha512-zeQjOoES5JFjTnAhI5QY7ZviczMzDptls15GFsI6jyUOq0kOf9+WonkhtlIhh0RgHRnqj5gdNxW5j1EvAyYg6Q==", "dev": true, "requires": { "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.26.0", - "@typescript-eslint/types": "4.26.0", - "@typescript-eslint/typescript-estree": "4.26.0", + "@typescript-eslint/scope-manager": "4.33.0", + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/typescript-estree": "4.33.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" } }, "@typescript-eslint/parser": { - "version": "4.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.26.0.tgz", - "integrity": "sha512-b4jekVJG9FfmjUfmM4VoOItQhPlnt6MPOBUL0AQbiTmm+SSpSdhHYlwayOm4IW9KLI/4/cRKtQCmDl1oE2OlPg==", + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.33.0.tgz", + "integrity": "sha512-ZohdsbXadjGBSK0/r+d87X0SBmKzOq4/S5nzK6SBgJspFo9/CUDJ7hjayuze+JK7CZQLDMroqytp7pOcFKTxZA==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "4.26.0", - "@typescript-eslint/types": "4.26.0", - "@typescript-eslint/typescript-estree": "4.26.0", + "@typescript-eslint/scope-manager": "4.33.0", + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/typescript-estree": "4.33.0", "debug": "^4.3.1" } }, "@typescript-eslint/scope-manager": { - "version": "4.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.26.0.tgz", - "integrity": "sha512-G6xB6mMo4xVxwMt5lEsNTz3x4qGDt0NSGmTBNBPJxNsrTXJSm21c6raeYroS2OwQsOyIXqKZv266L/Gln1BWqg==", + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.33.0.tgz", + "integrity": "sha512-5IfJHpgTsTZuONKbODctL4kKuQje/bzBRkwHE8UOZ4f89Zeddg+EGZs8PD8NcN4LdM3ygHWYB3ukPAYjvl/qbQ==", "dev": true, "requires": { - "@typescript-eslint/types": "4.26.0", - "@typescript-eslint/visitor-keys": "4.26.0" + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/visitor-keys": "4.33.0" } }, "@typescript-eslint/types": { - "version": "4.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.26.0.tgz", - "integrity": "sha512-rADNgXl1kS/EKnDr3G+m7fB9yeJNnR9kF7xMiXL6mSIWpr3Wg5MhxyfEXy/IlYthsqwBqHOr22boFbf/u6O88A==", + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.33.0.tgz", + "integrity": "sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "4.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.26.0.tgz", - "integrity": "sha512-GHUgahPcm9GfBuy3TzdsizCcPjKOAauG9xkz9TR8kOdssz2Iz9jRCSQm6+aVFa23d5NcSpo1GdHGSQKe0tlcbg==", + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.33.0.tgz", + "integrity": "sha512-rkWRY1MPFzjwnEVHsxGemDzqqddw2QbTJlICPD9p9I9LfsO8fdmfQPOX3uKfUaGRDFJbfrtm/sXhVXN4E+bzCA==", "dev": true, "requires": { - "@typescript-eslint/types": "4.26.0", - "@typescript-eslint/visitor-keys": "4.26.0", + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/visitor-keys": "4.33.0", "debug": "^4.3.1", "globby": "^11.0.3", "is-glob": "^4.0.1", "semver": "^7.3.5", "tsutils": "^3.21.0" - }, - "dependencies": { - "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - } } }, "@typescript-eslint/visitor-keys": { - "version": "4.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.26.0.tgz", - "integrity": "sha512-cw4j8lH38V1ycGBbF+aFiLUls9Z0Bw8QschP3mkth50BbWzgFS33ISIgBzUMuQ2IdahoEv/rXstr8Zhlz4B1Zg==", + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz", + "integrity": "sha512-uqi/2aSz9g2ftcHWf8uLPJA70rUv6yuMW5Bohw+bwcuzaxQIHaKFZCKGoGXIrc9vkTJ3+0txM73K0Hq3d5wgIg==", "dev": true, "requires": { - "@typescript-eslint/types": "4.26.0", + "@typescript-eslint/types": "4.33.0", "eslint-visitor-keys": "^2.0.0" } }, @@ -693,9 +663,9 @@ "dev": true }, "acorn-jsx": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", - "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true }, "agent-base": { @@ -863,9 +833,9 @@ "dev": true }, "bignumber.js": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz", - "integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA==" + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.2.tgz", + "integrity": "sha512-GAcQvbpsM0pUb0zw1EI0KhQEZ+lRwR5fYaAp3vPOYuP7aDvGy6cVN6XHLauvF8SOga2y0dcLcjt3iQDTSEliyw==" }, "binary-extensions": { "version": "2.2.0", @@ -960,7 +930,7 @@ "buffer-equal-constant-time": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" }, "buffer-from": { "version": "1.1.1", @@ -1150,9 +1120,9 @@ } }, "chokidar": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", - "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "dev": true, "requires": { "anymatch": "~3.1.2", @@ -1380,9 +1350,9 @@ "dev": true }, "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, "defer-to-connect": { @@ -1581,13 +1551,14 @@ "dev": true }, "eslint": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.27.0.tgz", - "integrity": "sha512-JZuR6La2ZF0UD384lcbnd0Cgg6QJjiCwhMD6eU4h/VGPcVGwawNNzKU41tgokGXnfjOOyI6QIffthhJTPzzuRA==", + "version": "7.32.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", + "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", "dev": true, "requires": { "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.1", + "@eslint/eslintrc": "^0.4.3", + "@humanwhocodes/config-array": "^0.5.0", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -1604,7 +1575,7 @@ "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.0.0", + "glob-parent": "^5.1.2", "globals": "^13.6.0", "ignore": "^4.0.6", "import-fresh": "^3.0.0", @@ -1644,47 +1615,11 @@ } } }, - "espree": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", - "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", - "dev": true, - "requires": { - "acorn": "^7.4.0", - "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - } - } - }, - "optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", - "dev": true, - "requires": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" - } - }, - "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true } } }, @@ -1750,12 +1685,6 @@ "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", "dev": true }, - "ignore": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", - "dev": true - }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -1765,9 +1694,9 @@ } }, "eslint-plugin-prettier": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.0.tgz", - "integrity": "sha512-UDK6rJT6INSfcOo545jiaOwB701uAIt2/dR7WnFQoGCVl1/EMqdANBmwUaqqQ45aXprsTGzSa39LI1PyuRBxxw==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.1.tgz", + "integrity": "sha512-htg25EUYUeIhKHXjOinK4BgCcDwtLHjqaxCDsMy5nbnUMkKFvIhMVCp+5GFUXQ4Nr8lBsPqtGAqBenbpFqAA2g==", "dev": true, "requires": { "prettier-linter-helpers": "^1.0.0" @@ -1806,6 +1735,25 @@ "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", "dev": true }, + "espree": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "dev": true, + "requires": { + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } + } + }, "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", @@ -1839,9 +1787,9 @@ } }, "estraverse": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.1.0.tgz", - "integrity": "sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true }, "esutils": { @@ -1892,17 +1840,6 @@ "chardet": "^0.7.0", "iconv-lite": "^0.4.24", "tmp": "^0.0.33" - }, - "dependencies": { - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, - "requires": { - "os-tmpdir": "~1.0.2" - } - } } }, "fast-deep-equal": { @@ -1918,17 +1855,16 @@ "dev": true }, "fast-glob": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.5.tgz", - "integrity": "sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg==", + "version": "3.2.11", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", + "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", "dev": true, "requires": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.0", + "glob-parent": "^5.1.2", "merge2": "^1.3.0", - "micromatch": "^4.0.2", - "picomatch": "^2.2.1" + "micromatch": "^4.0.4" } }, "fast-json-stable-stringify": { @@ -1955,9 +1891,9 @@ "dev": true }, "fastq": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.0.tgz", - "integrity": "sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", "dev": true, "requires": { "reusify": "^1.0.4" @@ -2025,9 +1961,9 @@ } }, "flatted": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", - "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.5.tgz", + "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==", "dev": true }, "foreground-child": { @@ -2087,12 +2023,34 @@ } }, "gcp-metadata": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-4.3.0.tgz", - "integrity": "sha512-L9XQUpvKJCM76YRSmcxrR4mFPzPGsgZUH+GgHMxAET8qc6+BhRJq63RLhWakgEO2KKVgeSDVfyiNjkGSADwNTA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-5.0.0.tgz", + "integrity": "sha512-gfwuX3yA3nNsHSWUL4KG90UulNiq922Ukj3wLTrcnX33BB7PwB1o0ubR8KVvXu9nJH+P5w1j2SQSNNqto+H0DA==", "requires": { - "gaxios": "^4.0.0", + "gaxios": "^5.0.0", "json-bigint": "^1.0.0" + }, + "dependencies": { + "gaxios": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-5.0.0.tgz", + "integrity": "sha512-VD/yc5ln6XU8Ch1hyYY6kRMBE0Yc2np3fPyeJeYHhrPs1i8rgnsApPMWyrugkl7LLoSqpOJVBWlQIa87OAvt8Q==", + "requires": { + "abort-controller": "^3.0.0", + "extend": "^3.0.2", + "https-proxy-agent": "^5.0.0", + "is-stream": "^2.0.0", + "node-fetch": "^2.6.7" + } + }, + "node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "requires": { + "whatwg-url": "^5.0.0" + } + } } }, "get-caller-file": { @@ -2145,78 +2103,92 @@ } }, "globals": { - "version": "13.9.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.9.0.tgz", - "integrity": "sha512-74/FduwI/JaIrr1H8e71UbDE+5x7pIPs1C2rrwC52SszOo043CsWOZEMW7o2Y58xwm9b+0RBKDxY5n2sUpEFxA==", + "version": "13.15.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.15.0.tgz", + "integrity": "sha512-bpzcOlgDhMG070Av0Vy5Owklpv1I6+j96GhUI7Rh7IzDCKLzboflLrrfqMu8NquDbiR4EOQk7XzJwqVJxicxog==", "dev": true, "requires": { "type-fest": "^0.20.2" } }, "globby": { - "version": "11.0.3", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.3.tgz", - "integrity": "sha512-ffdmosjA807y7+lA1NM0jELARVmYul/715xiILEjo3hBLPTcirgQNnXECn5g3mtR8TOLCVbkfua1Hpen25/Xcg==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, "requires": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", - "fast-glob": "^3.1.1", - "ignore": "^5.1.4", - "merge2": "^1.3.0", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", "slash": "^3.0.0" - }, - "dependencies": { - "ignore": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", - "dev": true - } } }, "google-auth-library": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-7.6.2.tgz", - "integrity": "sha512-yvEnwVsvgH8RXTtpf6e84e7dqIdUEKJhmQvTJwzYP+RDdHjLrDp9sk2u2ZNDJPLKZ7DJicx/+AStcQspJiq+Qw==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-8.0.2.tgz", + "integrity": "sha512-HoG+nWFAThLovKpvcbYzxgn+nBJPTfAwtq0GxPN821nOO+21+8oP7MoEHfd1sbDulUFFGfcjJr2CnJ4YssHcyg==", "requires": { "arrify": "^2.0.0", "base64-js": "^1.3.0", "ecdsa-sig-formatter": "^1.0.11", "fast-text-encoding": "^1.0.0", - "gaxios": "^4.0.0", - "gcp-metadata": "^4.2.0", - "gtoken": "^5.0.4", + "gaxios": "^5.0.0", + "gcp-metadata": "^5.0.0", + "gtoken": "^5.3.2", "jws": "^4.0.0", "lru-cache": "^6.0.0" + }, + "dependencies": { + "gaxios": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-5.0.0.tgz", + "integrity": "sha512-VD/yc5ln6XU8Ch1hyYY6kRMBE0Yc2np3fPyeJeYHhrPs1i8rgnsApPMWyrugkl7LLoSqpOJVBWlQIa87OAvt8Q==", + "requires": { + "abort-controller": "^3.0.0", + "extend": "^3.0.2", + "https-proxy-agent": "^5.0.0", + "is-stream": "^2.0.0", + "node-fetch": "^2.6.7" + } + }, + "node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "requires": { + "whatwg-url": "^5.0.0" + } + } } }, "google-gax": { - "version": "2.24.2", - "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-2.24.2.tgz", - "integrity": "sha512-4OtyEIt/KAXRX5o2W/6DGf8MnMs1lMXwcGoPHR4PwXfTUVKjK7ywRe2/yRIMkYEDzAwu/kppPgfpX+kCG2rWfw==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-3.0.1.tgz", + "integrity": "sha512-vCCWt/wgxho52ombbfdG+ECKQx2quwYzVGhM39ylXFRg35nlr3387/tDdfqxxEQy8cg9Q7s6GNRROdZqr+9XYA==", "requires": { - "@grpc/grpc-js": "~1.3.0", - "@grpc/proto-loader": "^0.6.1", + "@grpc/grpc-js": "~1.6.0", + "@grpc/proto-loader": "^0.6.12", "@types/long": "^4.0.0", "abort-controller": "^3.0.0", "duplexify": "^4.0.0", "fast-text-encoding": "^1.0.3", - "google-auth-library": "^7.6.1", + "google-auth-library": "^8.0.2", "is-stream-ended": "^0.1.4", "node-fetch": "^2.6.1", - "object-hash": "^2.1.1", - "proto3-json-serializer": "^0.1.1", + "object-hash": "^3.0.0", + "proto3-json-serializer": "^0.1.8", "protobufjs": "6.11.2", - "retry-request": "^4.0.0" + "retry-request": "^5.0.0" } }, "google-p12-pem": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-3.1.2.tgz", - "integrity": "sha512-tjf3IQIt7tWCDsa0ofDQ1qqSCNzahXDxdAGJDbruWqu3eCg5CKLYKN+hi0s6lfvzYZ1GDVr+oDF9OOWlDSdf0A==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-3.1.4.tgz", + "integrity": "sha512-HHuHmkLgwjdmVRngf5+gSmpkyaRI6QmOg77J8tkNBHhNEI62sGHyw4/+UkgyZEI7h84NbWprXDJ+sa3xOYFvTg==", "requires": { - "node-forge": "^0.10.0" + "node-forge": "^1.3.1" } }, "got": { @@ -2262,12 +2234,12 @@ "dev": true }, "gtoken": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-5.3.1.tgz", - "integrity": "sha512-yqOREjzLHcbzz1UrQoxhBtpk8KjrVhuqPE7od1K2uhyxG2BHjKZetlbLw/SPZak/QqTIQW+addS+EcjqQsZbwQ==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-5.3.2.tgz", + "integrity": "sha512-gkvEKREW7dXWF8NV8pVrKfW7WqReAmjjkMBh6lNCCGOM4ucS0r0YyXXl0r/9Yj8wcW/32ISkfc8h5mPTDbtifQ==", "requires": { "gaxios": "^4.0.0", - "google-p12-pem": "^3.0.3", + "google-p12-pem": "^3.1.3", "jws": "^4.0.0" } }, @@ -2296,9 +2268,9 @@ }, "dependencies": { "chalk": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", - "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -2398,9 +2370,9 @@ } }, "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", "dev": true }, "ignore-walk": { @@ -2493,9 +2465,9 @@ }, "dependencies": { "chalk": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", - "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -2980,12 +2952,6 @@ "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=" }, - "lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "dev": true - }, "lodash.get": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", @@ -3248,33 +3214,32 @@ "dev": true }, "mocha": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.1.1.tgz", - "integrity": "sha512-0wE74YMgOkCgBUj8VyIDwmLUjTsS13WV1Pg7l0SHea2qzZzlq7MDnfbPsHKcELBRk3+izEVkRofjmClpycudCA==", + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz", + "integrity": "sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==", "dev": true, "requires": { "@ungap/promise-all-settled": "1.1.2", "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", - "chokidar": "3.5.2", - "debug": "4.3.1", + "chokidar": "3.5.3", + "debug": "4.3.3", "diff": "5.0.0", "escape-string-regexp": "4.0.0", "find-up": "5.0.0", - "glob": "7.1.7", + "glob": "7.2.0", "growl": "1.10.5", "he": "1.2.0", "js-yaml": "4.1.0", "log-symbols": "4.1.0", - "minimatch": "3.0.4", + "minimatch": "4.2.1", "ms": "2.1.3", - "nanoid": "3.1.23", + "nanoid": "3.3.1", "serialize-javascript": "6.0.0", "strip-json-comments": "3.1.1", "supports-color": "8.1.1", "which": "2.0.2", - "wide-align": "1.1.3", - "workerpool": "6.1.5", + "workerpool": "6.2.0", "yargs": "16.2.0", "yargs-parser": "20.2.4", "yargs-unparser": "2.0.0" @@ -3286,6 +3251,23 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, + "debug": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "dev": true, + "requires": { + "ms": "2.1.2" + }, + "dependencies": { + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, "find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -3297,9 +3279,9 @@ } }, "glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -3308,6 +3290,17 @@ "minimatch": "^3.0.4", "once": "^1.3.0", "path-is-absolute": "^1.0.0" + }, + "dependencies": { + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } } }, "js-yaml": { @@ -3328,6 +3321,15 @@ "p-locate": "^5.0.0" } }, + "minimatch": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz", + "integrity": "sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, "ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -3390,9 +3392,9 @@ "dev": true }, "nanoid": { - "version": "3.1.23", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.23.tgz", - "integrity": "sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", + "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==", "dev": true }, "natural-compare": { @@ -3432,9 +3434,9 @@ "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" }, "node-forge": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", - "integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==" + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", + "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==" }, "node-releases": { "version": "1.1.72", @@ -3533,9 +3535,9 @@ } }, "object-hash": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-2.2.0.tgz", - "integrity": "sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw==" + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", + "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==" }, "once": { "version": "1.4.0", @@ -3554,6 +3556,20 @@ "mimic-fn": "^2.1.0" } }, + "optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "requires": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + } + }, "os-tmpdir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", @@ -3788,9 +3804,9 @@ "dev": true }, "prettier": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.3.0.tgz", - "integrity": "sha512-kXtO4s0Lz/DW/IJ9QdWhAf7/NmPWQXkFr/r/WkR3vyI+0v8amTDxiaQSLzs8NBlytfLWX/7uQUMIW677yLKl4w==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.2.tgz", + "integrity": "sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==", "dev": true }, "prettier-linter-helpers": { @@ -3809,9 +3825,12 @@ "dev": true }, "proto3-json-serializer": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/proto3-json-serializer/-/proto3-json-serializer-0.1.3.tgz", - "integrity": "sha512-X0DAtxCBsy1NDn84huVFGOFgBslT2gBmM+85nY6/5SOAaCon1jzVNdvi74foIyFvs5CjtSbQsepsM5TsyNhqQw==" + "version": "0.1.9", + "resolved": "https://registry.npmjs.org/proto3-json-serializer/-/proto3-json-serializer-0.1.9.tgz", + "integrity": "sha512-A60IisqvnuI45qNRygJjrnNjX2TMdQGMY+57tR3nul3ZgO2zXkR9OGR8AXxJhkqx84g0FTnrfi3D5fWMSdANdQ==", + "requires": { + "protobufjs": "^6.11.2" + } }, "protobufjs": { "version": "6.11.2", @@ -4007,9 +4026,9 @@ } }, "regexpp": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", - "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", "dev": true }, "registry-auth-token": { @@ -4103,9 +4122,9 @@ } }, "retry-request": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-4.2.2.tgz", - "integrity": "sha512-xA93uxUD/rogV7BV59agW/JHPGXeREMWiZc9jhcwY4YdZ7QOtC7qbomYg0n4wyk2lJhggjvKvhNX8wln/Aldhg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-5.0.0.tgz", + "integrity": "sha512-vBZdBxUordje9253imlmGtppC5gdcwZmNz7JnU2ui+KKFPk25keR+0c020AVV20oesYxIFOI0Kh3HE88/59ieg==", "requires": { "debug": "^4.1.1", "extend": "^3.0.2" @@ -4172,6 +4191,15 @@ "ajv-keywords": "^3.5.2" } }, + "semver": { + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, "semver-diff": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", @@ -4400,23 +4428,22 @@ } }, "table": { - "version": "6.7.1", - "resolved": "https://registry.npmjs.org/table/-/table-6.7.1.tgz", - "integrity": "sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg==", + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/table/-/table-6.8.0.tgz", + "integrity": "sha512-s/fitrbVeEyHKFa7mFdkuQMWlH1Wgw/yEXMt5xACT4ZpzWFluehAxRtUUQKPuWhaLAWhFcVx6w3oC8VKaUfPGA==", "dev": true, "requires": { "ajv": "^8.0.1", - "lodash.clonedeep": "^4.5.0", "lodash.truncate": "^4.4.2", "slice-ansi": "^4.0.0", - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0" + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" }, "dependencies": { "ajv": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.5.0.tgz", - "integrity": "sha512-Y2l399Tt1AguU3BPRP9Fn4eN+Or+StUGWCUpbnFyXSo8NZ9S4uj+AG2pjs5apK+ZMOwYOz1+a+VKvKH7CudXgQ==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", + "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -4425,11 +4452,37 @@ "uri-js": "^4.2.2" } }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, "json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "dev": true + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } } } }, @@ -4543,6 +4596,15 @@ "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, "to-readable-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", @@ -4558,6 +4620,11 @@ "is-number": "^7.0.0" } }, + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" + }, "trim-newlines": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", @@ -4643,9 +4710,9 @@ } }, "typescript": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.2.tgz", - "integrity": "sha512-zZ4hShnmnoVnAHpVHWpTcxdv7dWP60S2FsydQLV8V5PbS3FifjWFFRiHSWpDJahly88PRyV5teTSLoq4eG7mKw==", + "version": "4.6.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.4.tgz", + "integrity": "sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==", "dev": true }, "uc.micro": { @@ -4780,6 +4847,11 @@ "graceful-fs": "^4.1.2" } }, + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" + }, "webpack": { "version": "5.38.1", "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.38.1.tgz", @@ -4876,6 +4948,15 @@ } } }, + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -4885,48 +4966,6 @@ "isexe": "^2.0.0" } }, - "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "requires": { - "string-width": "^1.0.2 || 2" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, "widest-line": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", @@ -4949,9 +4988,9 @@ "dev": true }, "workerpool": { - "version": "6.1.5", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.5.tgz", - "integrity": "sha512-XdKkCK0Zqc6w3iTxLckiuJ81tiD/o5rBE/m+nXpRCB+/Sq4DqkfXZ/x0jW02DG1tGsfUGXbTJyZDP+eu67haSw==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz", + "integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==", "dev": true }, "wrap-ansi": { @@ -5035,9 +5074,9 @@ }, "dependencies": { "camelcase": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", - "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true }, "decamelize": { diff --git a/packages/google-cloud-shell/package.json b/packages/google-cloud-shell/package.json index 9a822f7316f..4d12921ee90 100644 --- a/packages/google-cloud-shell/package.json +++ b/packages/google-cloud-shell/package.json @@ -39,7 +39,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^2.24.1" + "google-gax": "^3.0.1" }, "devDependencies": { "@types/mocha": "^9.0.0", @@ -51,16 +51,16 @@ "jsdoc-fresh": "^1.0.2", "jsdoc-region-tag": "^1.0.6", "linkinator": "^2.13.6", - "mocha": "^9.0.0", + "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", "sinon": "^14.0.0", "ts-loader": "^9.1.2", - "typescript": "^4.2.4", + "typescript": "^4.6.4", "webpack": "^5.36.2", "webpack-cli": "^4.7.0" }, "engines": { - "node": ">=v10.0.0" + "node": ">=12.0.0" } } diff --git a/packages/google-cloud-shell/samples/package.json b/packages/google-cloud-shell/samples/package.json index 4f49f8d13db..bcd0b948fc4 100644 --- a/packages/google-cloud-shell/samples/package.json +++ b/packages/google-cloud-shell/samples/package.json @@ -4,7 +4,7 @@ "license": "Apache-2.0", "author": "Google LLC", "engines": { - "node": ">=10" + "node": ">=12.0.0" }, "files": [ "*.js" From 29f284528485ac95c79ce93766cedf68927a26b9 Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Wed, 18 May 2022 19:09:22 -0700 Subject: [PATCH 182/254] build!: update library to use Node 12 (#50) * build!: Update library to use Node 12 Co-authored-by: Owl Bot --- packages/google-cloud-deploy/package.json | 8 ++++---- packages/google-cloud-deploy/samples/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-deploy/package.json b/packages/google-cloud-deploy/package.json index 91d88525808..7c8ca6706ee 100644 --- a/packages/google-cloud-deploy/package.json +++ b/packages/google-cloud-deploy/package.json @@ -39,7 +39,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^2.12.0" + "google-gax": "^3.0.1" }, "devDependencies": { "@types/mocha": "^9.0.0", @@ -51,16 +51,16 @@ "jsdoc-fresh": "^1.0.2", "jsdoc-region-tag": "^1.0.6", "linkinator": "^2.13.6", - "mocha": "^9.0.0", + "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", "sinon": "^14.0.0", "ts-loader": "^9.1.2", - "typescript": "^4.2.4", + "typescript": "^4.6.4", "webpack": "^5.36.2", "webpack-cli": "^4.7.0" }, "engines": { - "node": ">=v10.0.0" + "node": ">=12.0.0" } } diff --git a/packages/google-cloud-deploy/samples/package.json b/packages/google-cloud-deploy/samples/package.json index 56569c4f434..c26c12a3a17 100644 --- a/packages/google-cloud-deploy/samples/package.json +++ b/packages/google-cloud-deploy/samples/package.json @@ -4,7 +4,7 @@ "license": "Apache-2.0", "author": "Google LLC", "engines": { - "node": ">=10" + "node": ">=12.0.0" }, "files": [ "*.js" From c231a5fad83a6ce9edcdaf5e09d0cf445ba5e229 Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Wed, 18 May 2022 19:13:13 -0700 Subject: [PATCH 183/254] build!: update library to use Node 12 (#35) * build!: Update library to use Node 12 Co-authored-by: Owl Bot --- packages/google-cloud-dataplex/package.json | 8 ++++---- packages/google-cloud-dataplex/samples/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-dataplex/package.json b/packages/google-cloud-dataplex/package.json index 4a663947637..35c4aa01b42 100644 --- a/packages/google-cloud-dataplex/package.json +++ b/packages/google-cloud-dataplex/package.json @@ -39,7 +39,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^2.12.0" + "google-gax": "^3.0.1" }, "devDependencies": { "@types/mocha": "^9.0.0", @@ -52,16 +52,16 @@ "jsdoc-fresh": "^1.0.2", "jsdoc-region-tag": "^1.0.6", "linkinator": "^3.0.0", - "mocha": "^9.0.0", + "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", "sinon": "^14.0.0", "ts-loader": "^9.1.2", - "typescript": "^4.2.4", + "typescript": "^4.6.4", "webpack": "^5.36.2", "webpack-cli": "^4.7.0" }, "engines": { - "node": ">=v10.0.0" + "node": ">=12.0.0" } } diff --git a/packages/google-cloud-dataplex/samples/package.json b/packages/google-cloud-dataplex/samples/package.json index e346e7ee2ce..d4c76d481c8 100644 --- a/packages/google-cloud-dataplex/samples/package.json +++ b/packages/google-cloud-dataplex/samples/package.json @@ -4,7 +4,7 @@ "license": "Apache-2.0", "author": "Google LLC", "engines": { - "node": ">=10" + "node": ">=12.0.0" }, "files": [ "*.js" From 3a82c6d5d7b61e2bf7f8048d812bb0d98287fc25 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 19 May 2022 17:50:28 -0700 Subject: [PATCH 184/254] chore(main): release 2.0.0 (#71) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 2.0.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- packages/google-cloud-gkeconnect-gateway/CHANGELOG.md | 11 +++++++++++ packages/google-cloud-gkeconnect-gateway/package.json | 2 +- ...adata.google.cloud.gkeconnect.gateway.v1beta1.json | 2 +- .../samples/package.json | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-gkeconnect-gateway/CHANGELOG.md b/packages/google-cloud-gkeconnect-gateway/CHANGELOG.md index 7dee47ba604..1d357aeafc5 100644 --- a/packages/google-cloud-gkeconnect-gateway/CHANGELOG.md +++ b/packages/google-cloud-gkeconnect-gateway/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## [2.0.0](https://github.com/googleapis/nodejs-gke-connect-gateway/compare/v1.1.0...v2.0.0) (2022-05-19) + + +### ⚠ BREAKING CHANGES + +* update library to use Node 12 (#70) + +### Build System + +* update library to use Node 12 ([#70](https://github.com/googleapis/nodejs-gke-connect-gateway/issues/70)) ([7417416](https://github.com/googleapis/nodejs-gke-connect-gateway/commit/741741665d6dbdfe70e51ed0f181e8791bac4716)) + ## [1.1.0](https://www.github.com/googleapis/nodejs-gke-connect-gateway/compare/v1.0.3...v1.1.0) (2021-08-23) diff --git a/packages/google-cloud-gkeconnect-gateway/package.json b/packages/google-cloud-gkeconnect-gateway/package.json index bc5882e6431..1572613dffb 100644 --- a/packages/google-cloud-gkeconnect-gateway/package.json +++ b/packages/google-cloud-gkeconnect-gateway/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/gke-connect-gateway", - "version": "1.1.0", + "version": "2.0.0", "description": "apigateway client for Node.js", "repository": "googleapis/nodejs-gke-connect-gateway", "license": "Apache-2.0", diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/snippet_metadata.google.cloud.gkeconnect.gateway.v1beta1.json b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/snippet_metadata.google.cloud.gkeconnect.gateway.v1beta1.json index c8bb95b89e9..e21cc7e0fc9 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/snippet_metadata.google.cloud.gkeconnect.gateway.v1beta1.json +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/snippet_metadata.google.cloud.gkeconnect.gateway.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-gateway", - "version": "1.1.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-gkeconnect-gateway/samples/package.json b/packages/google-cloud-gkeconnect-gateway/samples/package.json index 04c39b97b0b..b8f172cfa52 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/package.json +++ b/packages/google-cloud-gkeconnect-gateway/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/gke-connect-gateway": "^1.1.0" + "@google-cloud/gke-connect-gateway": "^2.0.0" }, "devDependencies": { "c8": "^7.1.0", From 1c5ef44625f1f1067dbc5e0192beee6add6ae367 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 26 May 2022 11:32:38 -0700 Subject: [PATCH 185/254] chore(main): release 2.0.0 (#90) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-shell/CHANGELOG.md | 11 +++++++++++ packages/google-cloud-shell/package-lock.json | 2 +- packages/google-cloud-shell/package.json | 2 +- packages/google-cloud-shell/samples/package.json | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-shell/CHANGELOG.md b/packages/google-cloud-shell/CHANGELOG.md index 63e9373378a..3c022d5ba74 100644 --- a/packages/google-cloud-shell/CHANGELOG.md +++ b/packages/google-cloud-shell/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## [2.0.0](https://github.com/googleapis/nodejs-cloud-shell/compare/v1.1.0...v2.0.0) (2022-05-19) + + +### ⚠ BREAKING CHANGES + +* update library to use Node 12 (#89) + +### Build System + +* update library to use Node 12 ([#89](https://github.com/googleapis/nodejs-cloud-shell/issues/89)) ([314345e](https://github.com/googleapis/nodejs-cloud-shell/commit/314345e76607e76c4ee4e5866080e1eff599e261)) + ## [1.1.0](https://github.com/googleapis/nodejs-cloud-shell/compare/v1.0.5...v1.1.0) (2022-04-21) diff --git a/packages/google-cloud-shell/package-lock.json b/packages/google-cloud-shell/package-lock.json index 89ae068eb73..c5b18f54bf8 100644 --- a/packages/google-cloud-shell/package-lock.json +++ b/packages/google-cloud-shell/package-lock.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/shell", - "version": "1.1.0", + "version": "2.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/google-cloud-shell/package.json b/packages/google-cloud-shell/package.json index 4d12921ee90..a2962d02c96 100644 --- a/packages/google-cloud-shell/package.json +++ b/packages/google-cloud-shell/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/shell", - "version": "1.1.0", + "version": "2.0.0", "description": "cloudshell client for Node.js", "repository": "googleapis/nodejs-cloud-shell", "license": "Apache-2.0", diff --git a/packages/google-cloud-shell/samples/package.json b/packages/google-cloud-shell/samples/package.json index bcd0b948fc4..52ce8f583de 100644 --- a/packages/google-cloud-shell/samples/package.json +++ b/packages/google-cloud-shell/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/shell": "^1.1.0" + "@google-cloud/shell": "^2.0.0" }, "devDependencies": { "c8": "^7.1.0", From 5264556ff4a6a0ac515326a67bcac938ca2684c0 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 6 Jun 2022 11:58:01 -0400 Subject: [PATCH 186/254] chore(main): release 2.0.0 (#124) See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .../CHANGELOG.md | 16 ++++++++++++++++ .../package.json | 2 +- ...ata.google.cloud.policytroubleshooter.v1.json | 2 +- .../samples/package.json | 2 +- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-policytroubleshooter/CHANGELOG.md b/packages/google-cloud-policytroubleshooter/CHANGELOG.md index 1fe31971f3f..8e68b0f7ecd 100644 --- a/packages/google-cloud-policytroubleshooter/CHANGELOG.md +++ b/packages/google-cloud-policytroubleshooter/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +## [2.0.0](https://github.com/googleapis/nodejs-policy-troubleshooter/compare/v1.1.1...v2.0.0) (2022-05-19) + + +### ⚠ BREAKING CHANGES + +* update library to use Node 12 (#122) + +### Bug Fixes + +* **deps:** update dependency @google-cloud/local-auth to v2 ([#123](https://github.com/googleapis/nodejs-policy-troubleshooter/issues/123)) ([f5d7541](https://github.com/googleapis/nodejs-policy-troubleshooter/commit/f5d7541fe61c1b17ca9ccd339d28759a937e1252)) + + +### Build System + +* update library to use Node 12 ([#122](https://github.com/googleapis/nodejs-policy-troubleshooter/issues/122)) ([f15ace8](https://github.com/googleapis/nodejs-policy-troubleshooter/commit/f15ace8726ead0dcdf6c643b0e403f7717f85e5c)) + ### [1.1.1](https://www.github.com/googleapis/nodejs-policy-troubleshooter/compare/v1.1.0...v1.1.1) (2021-09-09) diff --git a/packages/google-cloud-policytroubleshooter/package.json b/packages/google-cloud-policytroubleshooter/package.json index 621a5f9b270..0b6a89cd218 100644 --- a/packages/google-cloud-policytroubleshooter/package.json +++ b/packages/google-cloud-policytroubleshooter/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/policy-troubleshooter", - "version": "1.1.1", + "version": "2.0.0", "description": "Policytroubleshooter client for Node.js", "repository": "googleapis/nodejs-policy-troubleshooter", "license": "Apache-2.0", diff --git a/packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata.google.cloud.policytroubleshooter.v1.json b/packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata.google.cloud.policytroubleshooter.v1.json index 1cf73d2a465..e5f1446b10c 100644 --- a/packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata.google.cloud.policytroubleshooter.v1.json +++ b/packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata.google.cloud.policytroubleshooter.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-policytroubleshooter", - "version": "1.1.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-policytroubleshooter/samples/package.json b/packages/google-cloud-policytroubleshooter/samples/package.json index 15926c75739..83123aca228 100644 --- a/packages/google-cloud-policytroubleshooter/samples/package.json +++ b/packages/google-cloud-policytroubleshooter/samples/package.json @@ -14,7 +14,7 @@ }, "dependencies": { "@google-cloud/local-auth": "^2.0.0", - "@google-cloud/policy-troubleshooter": "^1.1.1" + "@google-cloud/policy-troubleshooter": "^2.0.0" }, "devDependencies": { "c8": "^7.1.0", From e32714a7994460f501438b0639eb01cd78f3713d Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 7 Jun 2022 11:20:42 -0400 Subject: [PATCH 187/254] chore(main): release 2.0.0 (#36) See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- packages/google-cloud-dataplex/CHANGELOG.md | 11 +++++++++++ packages/google-cloud-dataplex/package.json | 2 +- .../v1/snippet_metadata.google.cloud.dataplex.v1.json | 2 +- packages/google-cloud-dataplex/samples/package.json | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-dataplex/CHANGELOG.md b/packages/google-cloud-dataplex/CHANGELOG.md index b94ae6ff375..ffe624aaa0c 100644 --- a/packages/google-cloud-dataplex/CHANGELOG.md +++ b/packages/google-cloud-dataplex/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## [2.0.0](https://github.com/googleapis/nodejs-dataplex/compare/v1.2.0...v2.0.0) (2022-05-19) + + +### ⚠ BREAKING CHANGES + +* update library to use Node 12 (#35) + +### Build System + +* update library to use Node 12 ([#35](https://github.com/googleapis/nodejs-dataplex/issues/35)) ([5eacc44](https://github.com/googleapis/nodejs-dataplex/commit/5eacc440fb9d16a200d7a4c79edd1a52fbc17848)) + ## [1.2.0](https://github.com/googleapis/nodejs-dataplex/compare/v1.1.0...v1.2.0) (2022-03-24) diff --git a/packages/google-cloud-dataplex/package.json b/packages/google-cloud-dataplex/package.json index 35c4aa01b42..c486232238c 100644 --- a/packages/google-cloud-dataplex/package.json +++ b/packages/google-cloud-dataplex/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/dataplex", - "version": "1.2.0", + "version": "2.0.0", "description": "dataplex client for Node.js", "repository": "googleapis/nodejs-dataplex", "license": "Apache-2.0", diff --git a/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json b/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json index 7e52c6deecb..b92d93742a2 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json +++ b/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataplex", - "version": "1.2.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dataplex/samples/package.json b/packages/google-cloud-dataplex/samples/package.json index d4c76d481c8..b050b6a6619 100644 --- a/packages/google-cloud-dataplex/samples/package.json +++ b/packages/google-cloud-dataplex/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/dataplex": "^1.2.0" + "@google-cloud/dataplex": "^2.0.0" }, "devDependencies": { "c8": "^7.1.0", From 79f58019593e215bb08cd2ceab27d4be9aeb49cf Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 7 Jun 2022 11:25:21 -0400 Subject: [PATCH 188/254] chore(main): release 2.0.0 (#51) See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- packages/google-cloud-deploy/CHANGELOG.md | 11 +++++++++++ packages/google-cloud-deploy/package.json | 2 +- .../v1/snippet_metadata.google.cloud.deploy.v1.json | 2 +- packages/google-cloud-deploy/samples/package.json | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-deploy/CHANGELOG.md b/packages/google-cloud-deploy/CHANGELOG.md index 0898e1c638c..2b161f5e6d2 100644 --- a/packages/google-cloud-deploy/CHANGELOG.md +++ b/packages/google-cloud-deploy/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## [2.0.0](https://github.com/googleapis/nodejs-deploy/compare/v1.0.0...v2.0.0) (2022-05-19) + + +### ⚠ BREAKING CHANGES + +* update library to use Node 12 (#50) + +### Build System + +* update library to use Node 12 ([#50](https://github.com/googleapis/nodejs-deploy/issues/50)) ([a688caf](https://github.com/googleapis/nodejs-deploy/commit/a688caf817f5f760d951ad6e9570ee0f4a4c0c5f)) + ## [1.0.0](https://github.com/googleapis/nodejs-deploy/compare/v0.2.0...v1.0.0) (2022-03-23) diff --git a/packages/google-cloud-deploy/package.json b/packages/google-cloud-deploy/package.json index 7c8ca6706ee..5aa34a9a184 100644 --- a/packages/google-cloud-deploy/package.json +++ b/packages/google-cloud-deploy/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/deploy", - "version": "1.0.0", + "version": "2.0.0", "description": "clouddeploy client for Node.js", "repository": "googleapis/nodejs-deploy", "license": "Apache-2.0", diff --git a/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json b/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json index 2f144b3ee0f..945f50cb87c 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json +++ b/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-deploy", - "version": "1.0.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-deploy/samples/package.json b/packages/google-cloud-deploy/samples/package.json index c26c12a3a17..0f206b8cc3b 100644 --- a/packages/google-cloud-deploy/samples/package.json +++ b/packages/google-cloud-deploy/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/deploy": "^1.0.0" + "@google-cloud/deploy": "^2.0.0" }, "devDependencies": { "c8": "^7.1.0", From a6ceb36a6a756a6b5756184aa17c5f5e397ee2c5 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 9 Jun 2022 19:24:35 +0200 Subject: [PATCH 189/254] chore(deps): update dependency jsdoc-fresh to v2 (#92) --- packages/google-cloud-shell/package-lock.json | 6 +++--- packages/google-cloud-shell/package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-shell/package-lock.json b/packages/google-cloud-shell/package-lock.json index c5b18f54bf8..d85c737b2dd 100644 --- a/packages/google-cloud-shell/package-lock.json +++ b/packages/google-cloud-shell/package-lock.json @@ -2735,9 +2735,9 @@ } }, "jsdoc-fresh": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/jsdoc-fresh/-/jsdoc-fresh-1.0.5.tgz", - "integrity": "sha512-gikURZcof6vHeWJLDjula45EdulOsWYeysXcNlstxeromE/Qr/3YIErT7sluswNIrNzFQY+/czbBMAwQM9CyWQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/jsdoc-fresh/-/jsdoc-fresh-2.0.0.tgz", + "integrity": "sha512-KNQ3gjqHP3AEctcwPBNNdeArkpvcR0i1d4DrpnzohK5EdOcCKzedBvt5kDjUPvaJ/oF+W5bey2IW+xpiS5nEfQ==", "dev": true, "requires": { "taffydb": "^2.7.3" diff --git a/packages/google-cloud-shell/package.json b/packages/google-cloud-shell/package.json index a2962d02c96..8637bcf184e 100644 --- a/packages/google-cloud-shell/package.json +++ b/packages/google-cloud-shell/package.json @@ -48,7 +48,7 @@ "c8": "^7.7.2", "gts": "^3.1.0", "jsdoc": "^3.6.6", - "jsdoc-fresh": "^1.0.2", + "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^1.0.6", "linkinator": "^2.13.6", "mocha": "^9.2.2", From aca13401707c444b9f90fc60ee971c006cfd12fc Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 9 Jun 2022 22:12:23 +0200 Subject: [PATCH 190/254] chore(deps): update dependency jsdoc-fresh to v2 (#127) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [jsdoc-fresh](https://togithub.com/googleapis/jsdoc-fresh) | [`^1.0.2` -> `^2.0.0`](https://renovatebot.com/diffs/npm/jsdoc-fresh/1.1.1/2.0.0) | [![age](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/compatibility-slim/1.1.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/confidence-slim/1.1.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/jsdoc-fresh ### [`v2.0.0`](https://togithub.com/googleapis/jsdoc-fresh/blob/HEAD/CHANGELOG.md#​200-httpsgithubcomgoogleapisjsdoc-freshcomparev111v200-2022-05-18) [Compare Source](https://togithub.com/googleapis/jsdoc-fresh/compare/v1.1.1...v2.0.0) ##### ⚠ BREAKING CHANGES - update library to use Node 12 ([#​108](https://togithub.com/googleapis/jsdoc-fresh/issues/108)) ##### Build System - update library to use Node 12 ([#​108](https://togithub.com/googleapis/jsdoc-fresh/issues/108)) ([e61c223](https://togithub.com/googleapis/jsdoc-fresh/commit/e61c2238db8900e339e5fe7fb8aea09642290182)) ##### [1.1.1](https://www.github.com/googleapis/jsdoc-fresh/compare/v1.1.0...v1.1.1) (2021-08-11) ##### Bug Fixes - **build:** migrate to using main branch ([#​83](https://www.togithub.com/googleapis/jsdoc-fresh/issues/83)) ([9474adb](https://www.github.com/googleapis/jsdoc-fresh/commit/9474adbf0d559d319ff207397ba2be6b557999ac))
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-policy-troubleshooter). --- packages/google-cloud-policytroubleshooter/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-policytroubleshooter/package.json b/packages/google-cloud-policytroubleshooter/package.json index 0b6a89cd218..ced38ae064f 100644 --- a/packages/google-cloud-policytroubleshooter/package.json +++ b/packages/google-cloud-policytroubleshooter/package.json @@ -48,7 +48,7 @@ "c8": "^7.3.5", "gts": "^3.1.0", "jsdoc": "^3.6.6", - "jsdoc-fresh": "^1.0.2", + "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^1.0.6", "linkinator": "^2.7.0", "mocha": "^9.2.2", From ad1815ecaea3550f1a999a49f125148f404c81a5 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 9 Jun 2022 22:14:14 +0200 Subject: [PATCH 191/254] chore(deps): update dependency jsdoc-fresh to v2 (#38) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [jsdoc-fresh](https://togithub.com/googleapis/jsdoc-fresh) | [`^1.0.2` -> `^2.0.0`](https://renovatebot.com/diffs/npm/jsdoc-fresh/1.1.1/2.0.0) | [![age](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/compatibility-slim/1.1.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/confidence-slim/1.1.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/jsdoc-fresh ### [`v2.0.0`](https://togithub.com/googleapis/jsdoc-fresh/blob/HEAD/CHANGELOG.md#​200-httpsgithubcomgoogleapisjsdoc-freshcomparev111v200-2022-05-18) [Compare Source](https://togithub.com/googleapis/jsdoc-fresh/compare/v1.1.1...v2.0.0) ##### ⚠ BREAKING CHANGES - update library to use Node 12 ([#​108](https://togithub.com/googleapis/jsdoc-fresh/issues/108)) ##### Build System - update library to use Node 12 ([#​108](https://togithub.com/googleapis/jsdoc-fresh/issues/108)) ([e61c223](https://togithub.com/googleapis/jsdoc-fresh/commit/e61c2238db8900e339e5fe7fb8aea09642290182)) ##### [1.1.1](https://www.github.com/googleapis/jsdoc-fresh/compare/v1.1.0...v1.1.1) (2021-08-11) ##### Bug Fixes - **build:** migrate to using main branch ([#​83](https://www.togithub.com/googleapis/jsdoc-fresh/issues/83)) ([9474adb](https://www.github.com/googleapis/jsdoc-fresh/commit/9474adbf0d559d319ff207397ba2be6b557999ac))
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-dataplex). --- packages/google-cloud-dataplex/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-dataplex/package.json b/packages/google-cloud-dataplex/package.json index c486232238c..6be7f922c46 100644 --- a/packages/google-cloud-dataplex/package.json +++ b/packages/google-cloud-dataplex/package.json @@ -49,7 +49,7 @@ "chai": "^4.3.6", "gts": "^3.1.0", "jsdoc": "^3.6.6", - "jsdoc-fresh": "^1.0.2", + "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^1.0.6", "linkinator": "^3.0.0", "mocha": "^9.2.2", From f9446ca6ab8f0c308369781186335619e27fc6a8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 9 Jun 2022 22:14:29 +0200 Subject: [PATCH 192/254] chore(deps): update dependency jsdoc-region-tag to v2 (#93) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [jsdoc-region-tag](https://togithub.com/googleapis/jsdoc-region-tag) | [`^1.0.6` -> `^2.0.0`](https://renovatebot.com/diffs/npm/jsdoc-region-tag/1.0.6/2.0.0) | [![age](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/compatibility-slim/1.0.6)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/confidence-slim/1.0.6)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/jsdoc-region-tag ### [`v2.0.0`](https://togithub.com/googleapis/jsdoc-region-tag/blob/HEAD/CHANGELOG.md#​200-httpsgithubcomgoogleapisjsdoc-region-tagcomparev131v200-2022-05-20) [Compare Source](https://togithub.com/googleapis/jsdoc-region-tag/compare/v1.3.1...v2.0.0) ##### ⚠ BREAKING CHANGES - update library to use Node 12 ([#​107](https://togithub.com/googleapis/jsdoc-region-tag/issues/107)) ##### Build System - update library to use Node 12 ([#​107](https://togithub.com/googleapis/jsdoc-region-tag/issues/107)) ([5b51796](https://togithub.com/googleapis/jsdoc-region-tag/commit/5b51796771984cf8b978990025f14faa03c19923)) ##### [1.3.1](https://www.github.com/googleapis/jsdoc-region-tag/compare/v1.3.0...v1.3.1) (2021-08-11) ##### Bug Fixes - **build:** migrate to using main branch ([#​79](https://www.togithub.com/googleapis/jsdoc-region-tag/issues/79)) ([5050615](https://www.github.com/googleapis/jsdoc-region-tag/commit/50506150b7758592df5e389c6a5c3d82b3b20881)) ### [`v1.3.1`](https://togithub.com/googleapis/jsdoc-region-tag/blob/HEAD/CHANGELOG.md#​131-httpswwwgithubcomgoogleapisjsdoc-region-tagcomparev130v131-2021-08-11) [Compare Source](https://togithub.com/googleapis/jsdoc-region-tag/compare/v1.3.0...v1.3.1) ### [`v1.3.0`](https://togithub.com/googleapis/jsdoc-region-tag/blob/HEAD/CHANGELOG.md#​130-httpswwwgithubcomgoogleapisjsdoc-region-tagcomparev120v130-2021-07-08) [Compare Source](https://togithub.com/googleapis/jsdoc-region-tag/compare/v1.2.0...v1.3.0) ##### Features - classdesc can also contain link ([#​74](https://www.togithub.com/googleapis/jsdoc-region-tag/issues/74)) ([e57b3ad](https://www.github.com/googleapis/jsdoc-region-tag/commit/e57b3add05abf0c427c4044d507ca600ef58c102)) ### [`v1.2.0`](https://togithub.com/googleapis/jsdoc-region-tag/blob/HEAD/CHANGELOG.md#​120-httpswwwgithubcomgoogleapisjsdoc-region-tagcomparev110v120-2021-07-07) [Compare Source](https://togithub.com/googleapis/jsdoc-region-tag/compare/v1.1.0...v1.2.0) ##### Features - replace relative URL with cloud.google.com ([#​72](https://www.togithub.com/googleapis/jsdoc-region-tag/issues/72)) ([212febc](https://www.github.com/googleapis/jsdoc-region-tag/commit/212febc933c246a5e31675e128ad65c45d300cac)) ### [`v1.1.0`](https://togithub.com/googleapis/jsdoc-region-tag/blob/HEAD/CHANGELOG.md#​110-httpswwwgithubcomgoogleapisjsdoc-region-tagcomparev106v110-2021-06-10) [Compare Source](https://togithub.com/googleapis/jsdoc-region-tag/compare/v1.0.6...v1.1.0) ##### Features - add `gcf-owl-bot[bot]` to `ignoreAuthors` ([#​56](https://www.togithub.com/googleapis/jsdoc-region-tag/issues/56)) ([9e3649a](https://www.github.com/googleapis/jsdoc-region-tag/commit/9e3649a3c1778f65115993048d8eca80e5958df8)) ##### [1.0.6](https://www.github.com/googleapis/jsdoc-region-tag/compare/v1.0.5...v1.0.6) (2020-09-02) ##### Bug Fixes - main was pointing to old location ([#​33](https://www.togithub.com/googleapis/jsdoc-region-tag/issues/33)) ([46be7f8](https://www.github.com/googleapis/jsdoc-region-tag/commit/46be7f83d75506529e46fef4e1bfd5d585b2bc5c)) ##### [1.0.5](https://www.github.com/googleapis/jsdoc-region-tag/compare/v1.0.4...v1.0.5) (2020-08-29) ##### Bug Fixes - move system and samples test from Node 10 to Node 12 ([#​30](https://www.togithub.com/googleapis/jsdoc-region-tag/issues/30)) ([0cfc38b](https://www.github.com/googleapis/jsdoc-region-tag/commit/0cfc38b339c130389a0eb6927e4a8dd4db5c39e2)) ##### [1.0.4](https://www.github.com/googleapis/jsdoc-region-tag/compare/v1.0.3...v1.0.4) (2020-01-09) ##### Bug Fixes - tag issue of undefined ([#​11](https://www.togithub.com/googleapis/jsdoc-region-tag/issues/11)) ([adf52c5](https://www.github.com/googleapis/jsdoc-region-tag/commit/adf52c5dc7f8531fc951f9cf80283d17c3dead37)) ##### [1.0.3](https://www.github.com/googleapis/jsdoc-region-tag/compare/v1.0.2...v1.0.3) (2019-11-21) ##### Bug Fixes - node_modules can have folders with .js extension ([#​3](https://www.togithub.com/googleapis/jsdoc-region-tag/issues/3)) ([dccba19](https://www.github.com/googleapis/jsdoc-region-tag/commit/dccba19cf52290f84a559b19f4691e109fb7f031)) ##### [1.0.2](https://www.github.com/bcoe/jsdoc-region-tag/compare/v1.0.1...v1.0.2) (2019-11-12) ##### Bug Fixes - **deps:** remove unused yargs dep ([#​5](https://www.togithub.com/bcoe/jsdoc-region-tag/issues/5)) ([1f87fbb](https://www.github.com/bcoe/jsdoc-region-tag/commit/1f87fbb70103a9589c8740db7bbd12f2989169bf)) ##### [1.0.1](https://www.github.com/bcoe/jsdoc-region-tag/compare/v1.0.0...v1.0.1) (2019-11-11) ##### Bug Fixes - **license:** license to Google ([#​3](https://www.togithub.com/bcoe/jsdoc-region-tag/issues/3)) ([7f7ff0f](https://www.github.com/bcoe/jsdoc-region-tag/commit/7f7ff0f550f35af2cbcd1cc4e7ccb852de2ff01e))
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-cloud-shell). --- packages/google-cloud-shell/package-lock.json | 6 +++--- packages/google-cloud-shell/package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-shell/package-lock.json b/packages/google-cloud-shell/package-lock.json index d85c737b2dd..9e9931c196a 100644 --- a/packages/google-cloud-shell/package-lock.json +++ b/packages/google-cloud-shell/package-lock.json @@ -2752,9 +2752,9 @@ } }, "jsdoc-region-tag": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/jsdoc-region-tag/-/jsdoc-region-tag-1.0.6.tgz", - "integrity": "sha512-f6CjJfEsKPOWJuhi3kW7ZNVzOxelEGueoEKIGqxUGD67CSurjPRIKOoRW3et1YzHHQYuD2OQUrPgL/gtp72lIA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/jsdoc-region-tag/-/jsdoc-region-tag-2.0.0.tgz", + "integrity": "sha512-CwoEF5zALHVjhV5EtyH5QXhq+vblT6YOOatyBXug4fTwSgd9GyyKeUuBl6NJVpRFtIJ+/xS+X4vCnD5qsqgYZQ==", "dev": true, "requires": { "glob": "^7.1.6" diff --git a/packages/google-cloud-shell/package.json b/packages/google-cloud-shell/package.json index 8637bcf184e..d3262d07927 100644 --- a/packages/google-cloud-shell/package.json +++ b/packages/google-cloud-shell/package.json @@ -49,7 +49,7 @@ "gts": "^3.1.0", "jsdoc": "^3.6.6", "jsdoc-fresh": "^2.0.0", - "jsdoc-region-tag": "^1.0.6", + "jsdoc-region-tag": "^2.0.0", "linkinator": "^2.13.6", "mocha": "^9.2.2", "null-loader": "^4.0.1", From 793310934dd74c981aae8a95ae460ffc633d1bbc Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 9 Jun 2022 22:18:17 +0200 Subject: [PATCH 193/254] chore(deps): update dependency jsdoc-region-tag to v2 (#74) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [jsdoc-region-tag](https://togithub.com/googleapis/jsdoc-region-tag) | [`^1.0.6` -> `^2.0.0`](https://renovatebot.com/diffs/npm/jsdoc-region-tag/1.3.1/2.0.0) | [![age](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/compatibility-slim/1.3.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/confidence-slim/1.3.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/jsdoc-region-tag ### [`v2.0.0`](https://togithub.com/googleapis/jsdoc-region-tag/blob/HEAD/CHANGELOG.md#​200-httpsgithubcomgoogleapisjsdoc-region-tagcomparev131v200-2022-05-20) [Compare Source](https://togithub.com/googleapis/jsdoc-region-tag/compare/v1.3.1...v2.0.0) ##### ⚠ BREAKING CHANGES - update library to use Node 12 ([#​107](https://togithub.com/googleapis/jsdoc-region-tag/issues/107)) ##### Build System - update library to use Node 12 ([#​107](https://togithub.com/googleapis/jsdoc-region-tag/issues/107)) ([5b51796](https://togithub.com/googleapis/jsdoc-region-tag/commit/5b51796771984cf8b978990025f14faa03c19923)) ##### [1.3.1](https://www.github.com/googleapis/jsdoc-region-tag/compare/v1.3.0...v1.3.1) (2021-08-11) ##### Bug Fixes - **build:** migrate to using main branch ([#​79](https://www.togithub.com/googleapis/jsdoc-region-tag/issues/79)) ([5050615](https://www.github.com/googleapis/jsdoc-region-tag/commit/50506150b7758592df5e389c6a5c3d82b3b20881))
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-gke-connect-gateway). --- packages/google-cloud-gkeconnect-gateway/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-gkeconnect-gateway/package.json b/packages/google-cloud-gkeconnect-gateway/package.json index 1572613dffb..dc457074f3f 100644 --- a/packages/google-cloud-gkeconnect-gateway/package.json +++ b/packages/google-cloud-gkeconnect-gateway/package.json @@ -49,7 +49,7 @@ "gts": "^3.1.0", "jsdoc": "^3.6.6", "jsdoc-fresh": "^1.0.2", - "jsdoc-region-tag": "^1.0.6", + "jsdoc-region-tag": "^2.0.0", "linkinator": "^2.13.6", "mocha": "^9.2.2", "null-loader": "^4.0.1", From d0ca9521a93852b38b2c936902d06e4c6c2d9fec Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 9 Jun 2022 22:26:13 +0200 Subject: [PATCH 194/254] chore(deps): update dependency jsdoc-region-tag to v2 (#128) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [jsdoc-region-tag](https://togithub.com/googleapis/jsdoc-region-tag) | [`^1.0.6` -> `^2.0.0`](https://renovatebot.com/diffs/npm/jsdoc-region-tag/1.3.1/2.0.0) | [![age](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/compatibility-slim/1.3.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/confidence-slim/1.3.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/jsdoc-region-tag ### [`v2.0.0`](https://togithub.com/googleapis/jsdoc-region-tag/blob/HEAD/CHANGELOG.md#​200-httpsgithubcomgoogleapisjsdoc-region-tagcomparev131v200-2022-05-20) [Compare Source](https://togithub.com/googleapis/jsdoc-region-tag/compare/v1.3.1...v2.0.0) ##### ⚠ BREAKING CHANGES - update library to use Node 12 ([#​107](https://togithub.com/googleapis/jsdoc-region-tag/issues/107)) ##### Build System - update library to use Node 12 ([#​107](https://togithub.com/googleapis/jsdoc-region-tag/issues/107)) ([5b51796](https://togithub.com/googleapis/jsdoc-region-tag/commit/5b51796771984cf8b978990025f14faa03c19923)) ##### [1.3.1](https://www.github.com/googleapis/jsdoc-region-tag/compare/v1.3.0...v1.3.1) (2021-08-11) ##### Bug Fixes - **build:** migrate to using main branch ([#​79](https://www.togithub.com/googleapis/jsdoc-region-tag/issues/79)) ([5050615](https://www.github.com/googleapis/jsdoc-region-tag/commit/50506150b7758592df5e389c6a5c3d82b3b20881))
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-policy-troubleshooter). --- packages/google-cloud-policytroubleshooter/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-policytroubleshooter/package.json b/packages/google-cloud-policytroubleshooter/package.json index ced38ae064f..3bcfd355d9c 100644 --- a/packages/google-cloud-policytroubleshooter/package.json +++ b/packages/google-cloud-policytroubleshooter/package.json @@ -49,7 +49,7 @@ "gts": "^3.1.0", "jsdoc": "^3.6.6", "jsdoc-fresh": "^2.0.0", - "jsdoc-region-tag": "^1.0.6", + "jsdoc-region-tag": "^2.0.0", "linkinator": "^2.7.0", "mocha": "^9.2.2", "null-loader": "^4.0.1", From 57277739e341151f6424f0cd543d4bf0ad99378f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 9 Jun 2022 22:34:41 +0200 Subject: [PATCH 195/254] chore(deps): update dependency jsdoc-region-tag to v2 (#39) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [jsdoc-region-tag](https://togithub.com/googleapis/jsdoc-region-tag) | [`^1.0.6` -> `^2.0.0`](https://renovatebot.com/diffs/npm/jsdoc-region-tag/1.3.1/2.0.0) | [![age](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/compatibility-slim/1.3.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/confidence-slim/1.3.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/jsdoc-region-tag ### [`v2.0.0`](https://togithub.com/googleapis/jsdoc-region-tag/blob/HEAD/CHANGELOG.md#​200-httpsgithubcomgoogleapisjsdoc-region-tagcomparev131v200-2022-05-20) [Compare Source](https://togithub.com/googleapis/jsdoc-region-tag/compare/v1.3.1...v2.0.0) ##### ⚠ BREAKING CHANGES - update library to use Node 12 ([#​107](https://togithub.com/googleapis/jsdoc-region-tag/issues/107)) ##### Build System - update library to use Node 12 ([#​107](https://togithub.com/googleapis/jsdoc-region-tag/issues/107)) ([5b51796](https://togithub.com/googleapis/jsdoc-region-tag/commit/5b51796771984cf8b978990025f14faa03c19923)) ##### [1.3.1](https://www.github.com/googleapis/jsdoc-region-tag/compare/v1.3.0...v1.3.1) (2021-08-11) ##### Bug Fixes - **build:** migrate to using main branch ([#​79](https://www.togithub.com/googleapis/jsdoc-region-tag/issues/79)) ([5050615](https://www.github.com/googleapis/jsdoc-region-tag/commit/50506150b7758592df5e389c6a5c3d82b3b20881))
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-dataplex). --- packages/google-cloud-dataplex/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-dataplex/package.json b/packages/google-cloud-dataplex/package.json index 6be7f922c46..2e63c290b95 100644 --- a/packages/google-cloud-dataplex/package.json +++ b/packages/google-cloud-dataplex/package.json @@ -50,7 +50,7 @@ "gts": "^3.1.0", "jsdoc": "^3.6.6", "jsdoc-fresh": "^2.0.0", - "jsdoc-region-tag": "^1.0.6", + "jsdoc-region-tag": "^2.0.0", "linkinator": "^3.0.0", "mocha": "^9.2.2", "null-loader": "^4.0.1", From fd5abd535b87af70acf2f30c6f61f7a3df60f9a2 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 9 Jun 2022 22:36:19 +0200 Subject: [PATCH 196/254] chore(deps): update dependency jsdoc-fresh to v2 (#73) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [jsdoc-fresh](https://togithub.com/googleapis/jsdoc-fresh) | [`^1.0.2` -> `^2.0.0`](https://renovatebot.com/diffs/npm/jsdoc-fresh/1.1.1/2.0.0) | [![age](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/compatibility-slim/1.1.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/confidence-slim/1.1.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/jsdoc-fresh ### [`v2.0.0`](https://togithub.com/googleapis/jsdoc-fresh/blob/HEAD/CHANGELOG.md#​200-httpsgithubcomgoogleapisjsdoc-freshcomparev111v200-2022-05-18) [Compare Source](https://togithub.com/googleapis/jsdoc-fresh/compare/v1.1.1...v2.0.0) ##### ⚠ BREAKING CHANGES - update library to use Node 12 ([#​108](https://togithub.com/googleapis/jsdoc-fresh/issues/108)) ##### Build System - update library to use Node 12 ([#​108](https://togithub.com/googleapis/jsdoc-fresh/issues/108)) ([e61c223](https://togithub.com/googleapis/jsdoc-fresh/commit/e61c2238db8900e339e5fe7fb8aea09642290182)) ##### [1.1.1](https://www.github.com/googleapis/jsdoc-fresh/compare/v1.1.0...v1.1.1) (2021-08-11) ##### Bug Fixes - **build:** migrate to using main branch ([#​83](https://www.togithub.com/googleapis/jsdoc-fresh/issues/83)) ([9474adb](https://www.github.com/googleapis/jsdoc-fresh/commit/9474adbf0d559d319ff207397ba2be6b557999ac))
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-gke-connect-gateway). --- packages/google-cloud-gkeconnect-gateway/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-gkeconnect-gateway/package.json b/packages/google-cloud-gkeconnect-gateway/package.json index dc457074f3f..f3bf7412963 100644 --- a/packages/google-cloud-gkeconnect-gateway/package.json +++ b/packages/google-cloud-gkeconnect-gateway/package.json @@ -48,7 +48,7 @@ "c8": "^7.7.2", "gts": "^3.1.0", "jsdoc": "^3.6.6", - "jsdoc-fresh": "^1.0.2", + "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^2.13.6", "mocha": "^9.2.2", From e7e7db5e5a77fa8f3cd2f751429ba9bd83b0e279 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 10 Jun 2022 17:00:22 +0200 Subject: [PATCH 197/254] chore(deps): update dependency jsdoc-fresh to v2 (#53) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [jsdoc-fresh](https://togithub.com/googleapis/jsdoc-fresh) | [`^1.0.2` -> `^2.0.0`](https://renovatebot.com/diffs/npm/jsdoc-fresh/1.1.1/2.0.0) | [![age](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/compatibility-slim/1.1.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/confidence-slim/1.1.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/jsdoc-fresh ### [`v2.0.0`](https://togithub.com/googleapis/jsdoc-fresh/blob/HEAD/CHANGELOG.md#​200-httpsgithubcomgoogleapisjsdoc-freshcomparev111v200-2022-05-18) [Compare Source](https://togithub.com/googleapis/jsdoc-fresh/compare/v1.1.1...v2.0.0) ##### ⚠ BREAKING CHANGES - update library to use Node 12 ([#​108](https://togithub.com/googleapis/jsdoc-fresh/issues/108)) ##### Build System - update library to use Node 12 ([#​108](https://togithub.com/googleapis/jsdoc-fresh/issues/108)) ([e61c223](https://togithub.com/googleapis/jsdoc-fresh/commit/e61c2238db8900e339e5fe7fb8aea09642290182)) ##### [1.1.1](https://www.github.com/googleapis/jsdoc-fresh/compare/v1.1.0...v1.1.1) (2021-08-11) ##### Bug Fixes - **build:** migrate to using main branch ([#​83](https://www.togithub.com/googleapis/jsdoc-fresh/issues/83)) ([9474adb](https://www.github.com/googleapis/jsdoc-fresh/commit/9474adbf0d559d319ff207397ba2be6b557999ac))
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-deploy). --- packages/google-cloud-deploy/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-deploy/package.json b/packages/google-cloud-deploy/package.json index 5aa34a9a184..666c7ab4d36 100644 --- a/packages/google-cloud-deploy/package.json +++ b/packages/google-cloud-deploy/package.json @@ -48,7 +48,7 @@ "c8": "^7.7.2", "gts": "^3.1.0", "jsdoc": "^3.6.6", - "jsdoc-fresh": "^1.0.2", + "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^1.0.6", "linkinator": "^2.13.6", "mocha": "^9.2.2", From 6c7783b7daa3a28504fdbfaa383b5708e2be2826 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 10 Jun 2022 17:30:29 +0200 Subject: [PATCH 198/254] chore(deps): update dependency jsdoc-region-tag to v2 (#54) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [jsdoc-region-tag](https://togithub.com/googleapis/jsdoc-region-tag) | [`^1.0.6` -> `^2.0.0`](https://renovatebot.com/diffs/npm/jsdoc-region-tag/1.3.1/2.0.0) | [![age](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/compatibility-slim/1.3.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/confidence-slim/1.3.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/jsdoc-region-tag ### [`v2.0.0`](https://togithub.com/googleapis/jsdoc-region-tag/blob/HEAD/CHANGELOG.md#​200-httpsgithubcomgoogleapisjsdoc-region-tagcomparev131v200-2022-05-20) [Compare Source](https://togithub.com/googleapis/jsdoc-region-tag/compare/v1.3.1...v2.0.0) ##### ⚠ BREAKING CHANGES - update library to use Node 12 ([#​107](https://togithub.com/googleapis/jsdoc-region-tag/issues/107)) ##### Build System - update library to use Node 12 ([#​107](https://togithub.com/googleapis/jsdoc-region-tag/issues/107)) ([5b51796](https://togithub.com/googleapis/jsdoc-region-tag/commit/5b51796771984cf8b978990025f14faa03c19923)) ##### [1.3.1](https://www.github.com/googleapis/jsdoc-region-tag/compare/v1.3.0...v1.3.1) (2021-08-11) ##### Bug Fixes - **build:** migrate to using main branch ([#​79](https://www.togithub.com/googleapis/jsdoc-region-tag/issues/79)) ([5050615](https://www.github.com/googleapis/jsdoc-region-tag/commit/50506150b7758592df5e389c6a5c3d82b3b20881))
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-deploy). --- packages/google-cloud-deploy/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-deploy/package.json b/packages/google-cloud-deploy/package.json index 666c7ab4d36..eb4ec38e9cb 100644 --- a/packages/google-cloud-deploy/package.json +++ b/packages/google-cloud-deploy/package.json @@ -49,7 +49,7 @@ "gts": "^3.1.0", "jsdoc": "^3.6.6", "jsdoc-fresh": "^2.0.0", - "jsdoc-region-tag": "^1.0.6", + "jsdoc-region-tag": "^2.0.0", "linkinator": "^2.13.6", "mocha": "^9.2.2", "null-loader": "^4.0.1", From bb241a3db4a945f7806820813b9b5af3b8759985 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 29 Jun 2022 17:09:33 -0700 Subject: [PATCH 199/254] feat: support regapic LRO (#40) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: support regapic LRO Use gapic-generator-typescript v2.15.1. PiperOrigin-RevId: 456946341 Source-Link: https://github.com/googleapis/googleapis/commit/88fd18d9d3b872b3d06a3d9392879f50b5bf3ce5 Source-Link: https://github.com/googleapis/googleapis-gen/commit/accfa371f667439313335c64042b063c1c53102e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWNjZmEzNzFmNjY3NDM5MzEzMzM1YzY0MDQyYjA2M2MxYzUzMTAyZSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../src/v1/content_service_client.ts | 11 +- .../src/v1/dataplex_service_client.ts | 128 ++++++++++++++++-- .../src/v1/metadata_service_client.ts | 11 +- 3 files changed, 126 insertions(+), 24 deletions(-) diff --git a/packages/google-cloud-dataplex/src/v1/content_service_client.ts b/packages/google-cloud-dataplex/src/v1/content_service_client.ts index 9d0f0334c94..8f3cc1a4190 100644 --- a/packages/google-cloud-dataplex/src/v1/content_service_client.ts +++ b/packages/google-cloud-dataplex/src/v1/content_service_client.ts @@ -70,7 +70,7 @@ export class ContentServiceClient { * * @param {object} [options] - The configuration object. * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] @@ -93,11 +93,10 @@ export class ContentServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean} [options.fallback] - Use HTTP fallback mode. - * In fallback mode, a special browser-compatible transport implementation is used - * instead of gRPC transport. In browser context (if the `window` object is defined) - * the fallback mode is enabled automatically; set `options.fallback` to `false` - * if you need to override this behavior. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. */ constructor(opts?: ClientOptions) { // Ensure that options include all the required fields. diff --git a/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts b/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts index bd7b2655390..5b548cae515 100644 --- a/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts +++ b/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts @@ -23,6 +23,7 @@ import { CallOptions, Descriptors, ClientOptions, + GrpcClientOptions, LROperation, PaginationCallback, GaxCall, @@ -76,7 +77,7 @@ export class DataplexServiceClient { * * @param {object} [options] - The configuration object. * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] @@ -99,11 +100,10 @@ export class DataplexServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean} [options.fallback] - Use HTTP fallback mode. - * In fallback mode, a special browser-compatible transport implementation is used - * instead of gRPC transport. In browser context (if the `window` object is defined) - * the fallback mode is enabled automatically; set `options.fallback` to `false` - * if you need to override this behavior. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. */ constructor(opts?: ClientOptions) { // Ensure that options include all the required fields. @@ -273,16 +273,120 @@ export class DataplexServiceClient { }; const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); - // This API contains "long-running operations", which return a // an Operation object that allows for tracking of the operation, // rather than holding a request open. - + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }; + if (opts.fallback === 'rest') { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [ + { + selector: 'google.cloud.location.Locations.GetLocation', + get: '/v1/{name=projects/*/locations/*}', + }, + { + selector: 'google.cloud.location.Locations.ListLocations', + get: '/v1/{name=projects/*}/locations', + }, + { + selector: 'google.iam.v1.IAMPolicy.GetIamPolicy', + get: '/v1/{resource=projects/*/locations/*/lakes/*}:getIamPolicy', + additional_bindings: [ + { + get: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/lakes/*/content/*}:getIamPolicy', + }, + ], + }, + { + selector: 'google.iam.v1.IAMPolicy.SetIamPolicy', + post: '/v1/{resource=projects/*/locations/*/lakes/*}:setIamPolicy', + body: '*', + additional_bindings: [ + { + post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/lakes/*/content/*}:setIamPolicy', + body: '*', + }, + ], + }, + { + selector: 'google.iam.v1.IAMPolicy.TestIamPermissions', + post: '/v1/{resource=projects/*/locations/*/lakes/*}:testIamPermissions', + body: '*', + additional_bindings: [ + { + post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/lakes/*/content/*}:testIamPermissions', + body: '*', + }, + ], + }, + { + selector: 'google.longrunning.Operations.CancelOperation', + post: '/v1/{name=projects/*/locations/*/operations/*}:cancel', + body: '*', + }, + { + selector: 'google.longrunning.Operations.DeleteOperation', + delete: '/v1/{name=projects/*/locations/*/operations/*}', + }, + { + selector: 'google.longrunning.Operations.GetOperation', + get: '/v1/{name=projects/*/locations/*/operations/*}', + }, + { + selector: 'google.longrunning.Operations.ListOperations', + get: '/v1/{name=projects/*/locations/*}/operations', + }, + ]; + } this.operationsClient = this._gaxModule - .lro({ - auth: this.auth, - grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, - }) + .lro(lroOptions) .operationsClient(opts); const createLakeResponse = protoFilesRoot.lookup( '.google.cloud.dataplex.v1.Lake' diff --git a/packages/google-cloud-dataplex/src/v1/metadata_service_client.ts b/packages/google-cloud-dataplex/src/v1/metadata_service_client.ts index 402d1b31046..2dbba046ca8 100644 --- a/packages/google-cloud-dataplex/src/v1/metadata_service_client.ts +++ b/packages/google-cloud-dataplex/src/v1/metadata_service_client.ts @@ -71,7 +71,7 @@ export class MetadataServiceClient { * * @param {object} [options] - The configuration object. * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] @@ -94,11 +94,10 @@ export class MetadataServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean} [options.fallback] - Use HTTP fallback mode. - * In fallback mode, a special browser-compatible transport implementation is used - * instead of gRPC transport. In browser context (if the `window` object is defined) - * the fallback mode is enabled automatically; set `options.fallback` to `false` - * if you need to override this behavior. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. */ constructor(opts?: ClientOptions) { // Ensure that options include all the required fields. From d05f0c1aeeace37681bccb283526af67c5b40a77 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 29 Jun 2022 17:10:05 -0700 Subject: [PATCH 200/254] feat: support regapic LRO (#55) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: support regapic LRO Use gapic-generator-typescript v2.15.1. PiperOrigin-RevId: 456946341 Source-Link: https://github.com/googleapis/googleapis/commit/88fd18d9d3b872b3d06a3d9392879f50b5bf3ce5 Source-Link: https://github.com/googleapis/googleapis-gen/commit/accfa371f667439313335c64042b063c1c53102e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWNjZmEzNzFmNjY3NDM5MzEzMzM1YzY0MDQyYjA2M2MxYzUzMTAyZSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../src/v1/cloud_deploy_client.ts | 84 ++++++++++++++++--- 1 file changed, 72 insertions(+), 12 deletions(-) diff --git a/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts b/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts index 4340ea34823..611f6baa28d 100644 --- a/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts +++ b/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts @@ -23,6 +23,7 @@ import { CallOptions, Descriptors, ClientOptions, + GrpcClientOptions, LROperation, PaginationCallback, GaxCall, @@ -73,7 +74,7 @@ export class CloudDeployClient { * * @param {object} [options] - The configuration object. * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] @@ -96,11 +97,10 @@ export class CloudDeployClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean} [options.fallback] - Use HTTP fallback mode. - * In fallback mode, a special browser-compatible transport implementation is used - * instead of gRPC transport. In browser context (if the `window` object is defined) - * the fallback mode is enabled automatically; set `options.fallback` to `false` - * if you need to override this behavior. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. */ constructor(opts?: ClientOptions) { // Ensure that options include all the required fields. @@ -229,16 +229,76 @@ export class CloudDeployClient { }; const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); - // This API contains "long-running operations", which return a // an Operation object that allows for tracking of the operation, // rather than holding a request open. - + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }; + if (opts.fallback === 'rest') { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [ + { + selector: 'google.cloud.location.Locations.GetLocation', + get: '/v1/{name=projects/*/locations/*}', + }, + { + selector: 'google.cloud.location.Locations.ListLocations', + get: '/v1/{name=projects/*}/locations', + }, + { + selector: 'google.iam.v1.IAMPolicy.GetIamPolicy', + get: '/v1/{resource=projects/*/locations/*/deliveryPipelines/*}:getIamPolicy', + additional_bindings: [ + { + get: '/v1/{resource=projects/*/locations/*/targets/*}:getIamPolicy', + }, + ], + }, + { + selector: 'google.iam.v1.IAMPolicy.SetIamPolicy', + post: '/v1/{resource=projects/*/locations/*/deliveryPipelines/*}:setIamPolicy', + body: '*', + additional_bindings: [ + { + post: '/v1/{resource=projects/*/locations/*/targets/*}:setIamPolicy', + body: '*', + }, + ], + }, + { + selector: 'google.iam.v1.IAMPolicy.TestIamPermissions', + post: '/v1/{resource=projects/*/locations/*/deliveryPipelines/*}:testIamPermissions', + body: '*', + additional_bindings: [ + { + post: '/v1/{resource=projects/*/locations/*/targets/*}:testIamPermissions', + body: '*', + }, + ], + }, + { + selector: 'google.longrunning.Operations.CancelOperation', + post: '/v1/{name=projects/*/locations/*/operations/*}:cancel', + body: '*', + }, + { + selector: 'google.longrunning.Operations.DeleteOperation', + delete: '/v1/{name=projects/*/locations/*/operations/*}', + }, + { + selector: 'google.longrunning.Operations.GetOperation', + get: '/v1/{name=projects/*/locations/*/operations/*}', + }, + { + selector: 'google.longrunning.Operations.ListOperations', + get: '/v1/{name=projects/*/locations/*}/operations', + }, + ]; + } this.operationsClient = this._gaxModule - .lro({ - auth: this.auth, - grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, - }) + .lro(lroOptions) .operationsClient(opts); const createDeliveryPipelineResponse = protoFilesRoot.lookup( '.google.cloud.deploy.v1.DeliveryPipeline' From b1d6081c22e7ec4e56bcb3c11cdebb1e27d81ff7 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 29 Jun 2022 17:30:18 -0700 Subject: [PATCH 201/254] fix(docs): describe fallback rest option (#75) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: support regapic LRO Use gapic-generator-typescript v2.15.1. PiperOrigin-RevId: 456946341 Source-Link: https://github.com/googleapis/googleapis/commit/88fd18d9d3b872b3d06a3d9392879f50b5bf3ce5 Source-Link: https://github.com/googleapis/googleapis-gen/commit/accfa371f667439313335c64042b063c1c53102e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWNjZmEzNzFmNjY3NDM5MzEzMzM1YzY0MDQyYjA2M2MxYzUzMTAyZSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../src/v1beta1/gateway_service_client.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts b/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts index 95f66c072b8..de9002a8508 100644 --- a/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts +++ b/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts @@ -64,7 +64,7 @@ export class GatewayServiceClient { * * @param {object} [options] - The configuration object. * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] @@ -87,11 +87,10 @@ export class GatewayServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean} [options.fallback] - Use HTTP fallback mode. - * In fallback mode, a special browser-compatible transport implementation is used - * instead of gRPC transport. In browser context (if the `window` object is defined) - * the fallback mode is enabled automatically; set `options.fallback` to `false` - * if you need to override this behavior. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. */ constructor(opts?: ClientOptions) { // Ensure that options include all the required fields. From 447c7084fc58bf890023339a4576463c483a32d1 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 29 Jun 2022 17:33:21 -0700 Subject: [PATCH 202/254] fix(docs): describe fallback rest option (#129) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(docs): describe fallback rest option Use gapic-generator-typescript v2.15.1. PiperOrigin-RevId: 456946341 Source-Link: https://github.com/googleapis/googleapis/commit/88fd18d9d3b872b3d06a3d9392879f50b5bf3ce5 Source-Link: https://github.com/googleapis/googleapis-gen/commit/accfa371f667439313335c64042b063c1c53102e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWNjZmEzNzFmNjY3NDM5MzEzMzM1YzY0MDQyYjA2M2MxYzUzMTAyZSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../src/v1/iam_checker_client.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts b/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts index 6623db13b1d..6bae2a69b6b 100644 --- a/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts +++ b/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts @@ -62,7 +62,7 @@ export class IamCheckerClient { * * @param {object} [options] - The configuration object. * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] @@ -85,11 +85,10 @@ export class IamCheckerClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean} [options.fallback] - Use HTTP fallback mode. - * In fallback mode, a special browser-compatible transport implementation is used - * instead of gRPC transport. In browser context (if the `window` object is defined) - * the fallback mode is enabled automatically; set `options.fallback` to `false` - * if you need to override this behavior. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. */ constructor(opts?: ClientOptions) { // Ensure that options include all the required fields. From 7826b7aea2960fc41b413a1cbd90a53671322a9c Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 19:10:27 +0000 Subject: [PATCH 203/254] chore(main): release 2.0.1 (#130) :robot: I have created a release *beep* *boop* --- ## [2.0.1](https://github.com/googleapis/nodejs-policy-troubleshooter/compare/v2.0.0...v2.0.1) (2022-06-30) ### Bug Fixes * **docs:** describe fallback rest option ([#129](https://github.com/googleapis/nodejs-policy-troubleshooter/issues/129)) ([e84320f](https://github.com/googleapis/nodejs-policy-troubleshooter/commit/e84320ffdea95006a57a29db73b5e0e4286de5a7)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-policytroubleshooter/CHANGELOG.md | 7 +++++++ packages/google-cloud-policytroubleshooter/package.json | 2 +- ...ppet_metadata.google.cloud.policytroubleshooter.v1.json | 2 +- .../google-cloud-policytroubleshooter/samples/package.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-policytroubleshooter/CHANGELOG.md b/packages/google-cloud-policytroubleshooter/CHANGELOG.md index 8e68b0f7ecd..a9e1f3868fe 100644 --- a/packages/google-cloud-policytroubleshooter/CHANGELOG.md +++ b/packages/google-cloud-policytroubleshooter/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.0.1](https://github.com/googleapis/nodejs-policy-troubleshooter/compare/v2.0.0...v2.0.1) (2022-06-30) + + +### Bug Fixes + +* **docs:** describe fallback rest option ([#129](https://github.com/googleapis/nodejs-policy-troubleshooter/issues/129)) ([e84320f](https://github.com/googleapis/nodejs-policy-troubleshooter/commit/e84320ffdea95006a57a29db73b5e0e4286de5a7)) + ## [2.0.0](https://github.com/googleapis/nodejs-policy-troubleshooter/compare/v1.1.1...v2.0.0) (2022-05-19) diff --git a/packages/google-cloud-policytroubleshooter/package.json b/packages/google-cloud-policytroubleshooter/package.json index 3bcfd355d9c..9b51cb9fd29 100644 --- a/packages/google-cloud-policytroubleshooter/package.json +++ b/packages/google-cloud-policytroubleshooter/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/policy-troubleshooter", - "version": "2.0.0", + "version": "2.0.1", "description": "Policytroubleshooter client for Node.js", "repository": "googleapis/nodejs-policy-troubleshooter", "license": "Apache-2.0", diff --git a/packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata.google.cloud.policytroubleshooter.v1.json b/packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata.google.cloud.policytroubleshooter.v1.json index e5f1446b10c..c9a784b0461 100644 --- a/packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata.google.cloud.policytroubleshooter.v1.json +++ b/packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata.google.cloud.policytroubleshooter.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-policytroubleshooter", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-policytroubleshooter/samples/package.json b/packages/google-cloud-policytroubleshooter/samples/package.json index 83123aca228..ddd093d6bac 100644 --- a/packages/google-cloud-policytroubleshooter/samples/package.json +++ b/packages/google-cloud-policytroubleshooter/samples/package.json @@ -14,7 +14,7 @@ }, "dependencies": { "@google-cloud/local-auth": "^2.0.0", - "@google-cloud/policy-troubleshooter": "^2.0.0" + "@google-cloud/policy-troubleshooter": "^2.0.1" }, "devDependencies": { "c8": "^7.1.0", From 3b948bfe8fa7ac82d8f660917741ca505121e0d4 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 19:14:25 +0000 Subject: [PATCH 204/254] chore(main): release 2.0.1 (#76) :robot: I have created a release *beep* *boop* --- ## [2.0.1](https://github.com/googleapis/nodejs-gke-connect-gateway/compare/v2.0.0...v2.0.1) (2022-06-30) ### Bug Fixes * **docs:** describe fallback rest option ([#75](https://github.com/googleapis/nodejs-gke-connect-gateway/issues/75)) ([aa8cdc8](https://github.com/googleapis/nodejs-gke-connect-gateway/commit/aa8cdc8607b44eea8bcc6b7065c01818857a8d70)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-gkeconnect-gateway/CHANGELOG.md | 7 +++++++ packages/google-cloud-gkeconnect-gateway/package.json | 2 +- ...t_metadata.google.cloud.gkeconnect.gateway.v1beta1.json | 2 +- .../google-cloud-gkeconnect-gateway/samples/package.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-gkeconnect-gateway/CHANGELOG.md b/packages/google-cloud-gkeconnect-gateway/CHANGELOG.md index 1d357aeafc5..36d20d4b635 100644 --- a/packages/google-cloud-gkeconnect-gateway/CHANGELOG.md +++ b/packages/google-cloud-gkeconnect-gateway/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.0.1](https://github.com/googleapis/nodejs-gke-connect-gateway/compare/v2.0.0...v2.0.1) (2022-06-30) + + +### Bug Fixes + +* **docs:** describe fallback rest option ([#75](https://github.com/googleapis/nodejs-gke-connect-gateway/issues/75)) ([aa8cdc8](https://github.com/googleapis/nodejs-gke-connect-gateway/commit/aa8cdc8607b44eea8bcc6b7065c01818857a8d70)) + ## [2.0.0](https://github.com/googleapis/nodejs-gke-connect-gateway/compare/v1.1.0...v2.0.0) (2022-05-19) diff --git a/packages/google-cloud-gkeconnect-gateway/package.json b/packages/google-cloud-gkeconnect-gateway/package.json index f3bf7412963..bf797e1a783 100644 --- a/packages/google-cloud-gkeconnect-gateway/package.json +++ b/packages/google-cloud-gkeconnect-gateway/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/gke-connect-gateway", - "version": "2.0.0", + "version": "2.0.1", "description": "apigateway client for Node.js", "repository": "googleapis/nodejs-gke-connect-gateway", "license": "Apache-2.0", diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/snippet_metadata.google.cloud.gkeconnect.gateway.v1beta1.json b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/snippet_metadata.google.cloud.gkeconnect.gateway.v1beta1.json index e21cc7e0fc9..fb79593b810 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/snippet_metadata.google.cloud.gkeconnect.gateway.v1beta1.json +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/snippet_metadata.google.cloud.gkeconnect.gateway.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-gateway", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-gkeconnect-gateway/samples/package.json b/packages/google-cloud-gkeconnect-gateway/samples/package.json index b8f172cfa52..da3e7ee2589 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/package.json +++ b/packages/google-cloud-gkeconnect-gateway/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/gke-connect-gateway": "^2.0.0" + "@google-cloud/gke-connect-gateway": "^2.0.1" }, "devDependencies": { "c8": "^7.1.0", From 143197f34429a8b6cef2f8305692f47aa8dd29eb Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 4 Jul 2022 13:40:14 -0400 Subject: [PATCH 205/254] chore(main): release 2.1.0 (#56) See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- packages/google-cloud-deploy/CHANGELOG.md | 7 +++++++ packages/google-cloud-deploy/package.json | 2 +- .../v1/snippet_metadata.google.cloud.deploy.v1.json | 2 +- packages/google-cloud-deploy/samples/package.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-deploy/CHANGELOG.md b/packages/google-cloud-deploy/CHANGELOG.md index 2b161f5e6d2..69e075c4869 100644 --- a/packages/google-cloud-deploy/CHANGELOG.md +++ b/packages/google-cloud-deploy/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.1.0](https://github.com/googleapis/nodejs-deploy/compare/v2.0.0...v2.1.0) (2022-06-30) + + +### Features + +* support regapic LRO ([#55](https://github.com/googleapis/nodejs-deploy/issues/55)) ([5c7ba12](https://github.com/googleapis/nodejs-deploy/commit/5c7ba1270c9f7b386614a1efa4ef4e752b591fda)) + ## [2.0.0](https://github.com/googleapis/nodejs-deploy/compare/v1.0.0...v2.0.0) (2022-05-19) diff --git a/packages/google-cloud-deploy/package.json b/packages/google-cloud-deploy/package.json index eb4ec38e9cb..3b15f380af1 100644 --- a/packages/google-cloud-deploy/package.json +++ b/packages/google-cloud-deploy/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/deploy", - "version": "2.0.0", + "version": "2.1.0", "description": "clouddeploy client for Node.js", "repository": "googleapis/nodejs-deploy", "license": "Apache-2.0", diff --git a/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json b/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json index 945f50cb87c..88686591015 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json +++ b/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-deploy", - "version": "2.0.0", + "version": "2.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-deploy/samples/package.json b/packages/google-cloud-deploy/samples/package.json index 0f206b8cc3b..93dbb383837 100644 --- a/packages/google-cloud-deploy/samples/package.json +++ b/packages/google-cloud-deploy/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/deploy": "^2.0.0" + "@google-cloud/deploy": "^2.1.0" }, "devDependencies": { "c8": "^7.1.0", From e94644ffac5db1391b8b2eb4ef78198524f0ec92 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 5 Jul 2022 11:42:26 -0400 Subject: [PATCH 206/254] chore(main): release 2.1.0 (#41) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 2.1.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- packages/google-cloud-dataplex/CHANGELOG.md | 7 +++++++ packages/google-cloud-dataplex/package.json | 2 +- .../v1/snippet_metadata.google.cloud.dataplex.v1.json | 2 +- packages/google-cloud-dataplex/samples/package.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-dataplex/CHANGELOG.md b/packages/google-cloud-dataplex/CHANGELOG.md index ffe624aaa0c..fddc61dca5c 100644 --- a/packages/google-cloud-dataplex/CHANGELOG.md +++ b/packages/google-cloud-dataplex/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.1.0](https://github.com/googleapis/nodejs-dataplex/compare/v2.0.0...v2.1.0) (2022-06-30) + + +### Features + +* support regapic LRO ([#40](https://github.com/googleapis/nodejs-dataplex/issues/40)) ([b41c45d](https://github.com/googleapis/nodejs-dataplex/commit/b41c45db754f2bbead96bd6a1ee327d7db7d05ae)) + ## [2.0.0](https://github.com/googleapis/nodejs-dataplex/compare/v1.2.0...v2.0.0) (2022-05-19) diff --git a/packages/google-cloud-dataplex/package.json b/packages/google-cloud-dataplex/package.json index 2e63c290b95..9bd85b553ef 100644 --- a/packages/google-cloud-dataplex/package.json +++ b/packages/google-cloud-dataplex/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/dataplex", - "version": "2.0.0", + "version": "2.1.0", "description": "dataplex client for Node.js", "repository": "googleapis/nodejs-dataplex", "license": "Apache-2.0", diff --git a/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json b/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json index b92d93742a2..658151e4d7f 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json +++ b/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataplex", - "version": "2.0.0", + "version": "2.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dataplex/samples/package.json b/packages/google-cloud-dataplex/samples/package.json index b050b6a6619..bd5f3202040 100644 --- a/packages/google-cloud-dataplex/samples/package.json +++ b/packages/google-cloud-dataplex/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/dataplex": "^2.0.0" + "@google-cloud/dataplex": "^2.1.0" }, "devDependencies": { "c8": "^7.1.0", From 9c19067b0cf449dc742d5ef18650e7367df7fd63 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 7 Jul 2022 21:49:26 +0200 Subject: [PATCH 207/254] chore(deps): update dependency linkinator to v4 (#58) --- packages/google-cloud-deploy/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-deploy/package.json b/packages/google-cloud-deploy/package.json index 3b15f380af1..31d57e55a04 100644 --- a/packages/google-cloud-deploy/package.json +++ b/packages/google-cloud-deploy/package.json @@ -50,7 +50,7 @@ "jsdoc": "^3.6.6", "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", - "linkinator": "^2.13.6", + "linkinator": "^4.0.0", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", From 2f2beb0c5cff018c3fca7eaf1e1aa0c78676ec38 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 7 Jul 2022 22:32:56 +0200 Subject: [PATCH 208/254] chore(deps): update dependency linkinator to v4 (#96) --- packages/google-cloud-shell/package-lock.json | 1030 ++++++++++++++--- packages/google-cloud-shell/package.json | 2 +- 2 files changed, 897 insertions(+), 135 deletions(-) diff --git a/packages/google-cloud-shell/package-lock.json b/packages/google-cloud-shell/package-lock.json index 9e9931c196a..989e7bb9d5a 100644 --- a/packages/google-cloud-shell/package-lock.json +++ b/packages/google-cloud-shell/package-lock.json @@ -201,6 +201,33 @@ "fastq": "^1.6.0" } }, + "@pnpm/network.ca-file": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@pnpm/network.ca-file/-/network.ca-file-1.0.1.tgz", + "integrity": "sha512-gkINruT2KUhZLTaiHxwCOh1O4NVnFT0wLjWFBHmTz9vpKag/C/noIMJXBxFe4F0mYpUVX2puLwAieLYFg2NvoA==", + "dev": true, + "requires": { + "graceful-fs": "4.2.10" + }, + "dependencies": { + "graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "dev": true + } + } + }, + "@pnpm/npm-conf": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@pnpm/npm-conf/-/npm-conf-1.0.4.tgz", + "integrity": "sha512-o5YFq/+ksEJMbSzzkaQDHlp00aonLDU5xNPVTRL12hTWBbVSSeWXxPukq75h+mvXnoOWT95vV2u1HSTw2C4XOw==", + "dev": true, + "requires": { + "@pnpm/network.ca-file": "^1.0.1", + "config-chain": "^1.1.11" + } + }, "@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", @@ -305,6 +332,18 @@ "defer-to-connect": "^1.0.1" } }, + "@types/cacheable-request": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.2.tgz", + "integrity": "sha512-B3xVo+dlKM6nnKTcmm5ZtY/OL8bOAOd2Olee9M1zft65ox50OzjEHW91sDiU9j6cvW8Ejg1/Qkf4xd2kugApUA==", + "dev": true, + "requires": { + "@types/http-cache-semantics": "*", + "@types/keyv": "*", + "@types/node": "*", + "@types/responselike": "*" + } + }, "@types/eslint": { "version": "7.2.13", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.2.13.tgz", @@ -331,18 +370,39 @@ "integrity": "sha512-c5ciR06jK8u9BstrmJyO97m+klJrrhCf9u3rLu3DEAJBirxRqSCvDQoYKmxuYwQI5SZChAWu+tq9oVlGRuzPAg==", "dev": true }, + "@types/http-cache-semantics": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", + "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==", + "dev": true + }, "@types/istanbul-lib-coverage": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz", "integrity": "sha512-sz7iLqvVUg1gIedBOvlkxPlc8/uVzyS5OwGz1cKjXzkl3FpL3al0crU8YGU1WoHkxn0Wxbw5tyi6hvzJKNzFsw==", "dev": true }, + "@types/json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha512-3YP80IxxFJB4b5tYC2SUPwkg0XQLiu0nWvhRgEatgjf+29IcWO9X1k8xRv5DGssJ/lCrjYTjQPcobJr2yWIVuQ==", + "dev": true + }, "@types/json-schema": { "version": "7.0.7", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz", "integrity": "sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==", "dev": true }, + "@types/keyv": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", + "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, "@types/long": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", @@ -371,6 +431,15 @@ "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==", "dev": true }, + "@types/responselike": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz", + "integrity": "sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, "@types/sinon": { "version": "10.0.1", "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.1.tgz", @@ -849,12 +918,6 @@ "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", "dev": true }, - "boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", - "dev": true - }, "boxen": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.0.1.tgz", @@ -997,6 +1060,12 @@ } } }, + "cacheable-lookup": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-6.0.4.tgz", + "integrity": "sha512-mbcDEZCkv2CZF4G01kr8eBd/5agkt9oCqz75tJMSIsquvRZ2sL6Hi5zGVKi/0OSC9oO1GHfJ2AV0ZIOY9vye0A==", + "dev": true + }, "cacheable-request": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", @@ -1083,42 +1152,6 @@ "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", "dev": true }, - "cheerio": { - "version": "1.0.0-rc.9", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.9.tgz", - "integrity": "sha512-QF6XVdrLONO6DXRF5iaolY+odmhj2CLj+xzNod7INPWMi/x9X4SOylH0S/vaPpX+AUU6t04s34SQNh7DbkuCng==", - "dev": true, - "requires": { - "cheerio-select": "^1.4.0", - "dom-serializer": "^1.3.1", - "domhandler": "^4.2.0", - "htmlparser2": "^6.1.0", - "parse5": "^6.0.1", - "parse5-htmlparser2-tree-adapter": "^6.0.1", - "tslib": "^2.2.0" - }, - "dependencies": { - "tslib": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", - "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==", - "dev": true - } - } - }, - "cheerio-select": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-1.4.0.tgz", - "integrity": "sha512-sobR3Yqz27L553Qa7cK6rtJlMDbiKPdNywtR95Sj/YgfpLfy0u6CGJuaBKe5YE/vTc23SCRKxWSdlon/w6I/Ew==", - "dev": true, - "requires": { - "css-select": "^4.1.2", - "css-what": "^5.0.0", - "domelementtype": "^2.2.0", - "domhandler": "^4.2.0", - "domutils": "^2.6.0" - } - }, "chokidar": { "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", @@ -1229,12 +1262,48 @@ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true }, + "compress-brotli": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/compress-brotli/-/compress-brotli-1.3.8.tgz", + "integrity": "sha512-lVcQsjhxhIXsuupfy9fmZUFtAIdBmXA7EGY6GBdgZ++qkM9zG4YFT8iU7FoBxzryNDMOpD1HIFHUSX4D87oqhQ==", + "dev": true, + "requires": { + "@types/json-buffer": "~3.0.0", + "json-buffer": "~3.0.1" + }, + "dependencies": { + "json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + } + } + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, + "config-chain": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", + "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", + "dev": true, + "requires": { + "ini": "^1.3.4", + "proto-list": "~1.2.1" + }, + "dependencies": { + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true + } + } + }, "configstore": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", @@ -1283,25 +1352,6 @@ "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", "dev": true }, - "css-select": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.1.2.tgz", - "integrity": "sha512-nu5ye2Hg/4ISq4XqdLY2bEatAcLIdt3OYGFc9Tm9n7VSlFBcfRv0gBNksHRgSdUDQGtN3XrZ94ztW+NfzkFSUw==", - "dev": true, - "requires": { - "boolbase": "^1.0.0", - "css-what": "^5.0.0", - "domhandler": "^4.2.0", - "domutils": "^2.6.0", - "nth-check": "^2.0.0" - } - }, - "css-what": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.0.1.tgz", - "integrity": "sha512-FYDTSHb/7KXsWICVsxdmiExPjCfRC4qRFBdVwv7Ax9hMnvMmEjP9RfxTEZ3qPZGmADDn2vAKSo9UcN1jKVYscg==", - "dev": true - }, "debug": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", @@ -1386,40 +1436,48 @@ } }, "dom-serializer": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz", - "integrity": "sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", "dev": true, "requires": { - "domelementtype": "^2.0.1", - "domhandler": "^4.2.0", - "entities": "^2.0.0" + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" + }, + "dependencies": { + "entities": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.3.1.tgz", + "integrity": "sha512-o4q/dYJlmyjP2zfnaWDUC6A3BQFmVTX+tZPezK7k0GLSU9QYCauscf5Y+qcEPzKL+EixVouYDgLQK5H9GrLpkg==", + "dev": true + } } }, "domelementtype": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", - "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", "dev": true }, "domhandler": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.2.0.tgz", - "integrity": "sha512-zk7sgt970kzPks2Bf+dwT/PLzghLnsivb9CcxkvR8Mzr66Olr0Ofd8neSbglHJHaHa2MadfoSdNlKYAaafmWfA==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", "dev": true, "requires": { - "domelementtype": "^2.2.0" + "domelementtype": "^2.3.0" } }, "domutils": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.6.0.tgz", - "integrity": "sha512-y0BezHuy4MDYxh6OvolXYsH+1EMGmFbwv5FKW7ovwMG6zTPWqNPq3WF9ayZssFq+UlKdffGLbOEaghNdaOm1WA==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.0.1.tgz", + "integrity": "sha512-z08c1l761iKhDFtfXO04C7kTdPBLi41zwOZl00WS8b5eiaebNpY00HKbztwBq+e3vyqWNwWF3mP9YLUeqIrF+Q==", "dev": true, "requires": { - "dom-serializer": "^1.0.1", - "domelementtype": "^2.2.0", - "domhandler": "^4.2.0" + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.1" } }, "dot-prop": { @@ -1448,6 +1506,12 @@ "stream-shift": "^1.0.0" } }, + "eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, "ecdsa-sig-formatter": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", @@ -1541,7 +1605,7 @@ "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", "dev": true }, "escape-string-regexp": { @@ -1976,6 +2040,12 @@ "signal-exit": "^3.0.2" } }, + "form-data-encoder": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-1.7.1.tgz", + "integrity": "sha512-EFRDrsMm/kyqbTQocNvRXMLjc7Es2Vk+IQFx/YW7hkUH1eBl4J1fqiP34l74Yt0pFLCNpc06fkbVk00008mzjg==", + "dev": true + }, "fs-minipass": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", @@ -2328,15 +2398,23 @@ "dev": true }, "htmlparser2": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz", - "integrity": "sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.1.tgz", + "integrity": "sha512-4lVbmc1diZC7GUJQtRQ5yBAeUCL1exyMwmForWkRLnwyzWBFxN633SALPMGYaWZvKe9j1pRZJpauvmxENSp/EA==", "dev": true, "requires": { - "domelementtype": "^2.0.1", - "domhandler": "^4.0.0", - "domutils": "^2.5.2", - "entities": "^2.0.0" + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "domutils": "^3.0.1", + "entities": "^4.3.0" + }, + "dependencies": { + "entities": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.3.1.tgz", + "integrity": "sha512-o4q/dYJlmyjP2zfnaWDUC6A3BQFmVTX+tZPezK7k0GLSU9QYCauscf5Y+qcEPzKL+EixVouYDgLQK5H9GrLpkg==", + "dev": true + } } }, "http-cache-semantics": { @@ -2345,6 +2423,24 @@ "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", "dev": true }, + "http2-wrapper": { + "version": "2.1.11", + "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.1.11.tgz", + "integrity": "sha512-aNAk5JzLturWEUiuhAN73Jcbq96R7rTitAoXV54FYMatvihnpD2+6PUgU4ce3D/m5VDbw+F5CsyKSF176ptitQ==", + "dev": true, + "requires": { + "quick-lru": "^5.1.1", + "resolve-alpn": "^1.2.0" + }, + "dependencies": { + "quick-lru": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", + "dev": true + } + } + }, "https-proxy-agent": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", @@ -2807,12 +2903,6 @@ "minimist": "^1.2.5" } }, - "jsonexport": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/jsonexport/-/jsonexport-3.2.0.tgz", - "integrity": "sha512-GbO9ugb0YTZatPd/hqCGR0FSwbr82H6OzG04yzdrG7XOe4QZ0jhQ+kOsB29zqkzoYJLmLxbbrFiuwbQu891XnQ==", - "dev": true - }, "just-extend": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", @@ -2897,22 +2987,706 @@ } }, "linkinator": { - "version": "2.13.6", - "resolved": "https://registry.npmjs.org/linkinator/-/linkinator-2.13.6.tgz", - "integrity": "sha512-kE4hB0+d5ZDYI6NrC10TlXHTU2OXYVoigJRka58qZ9RwGaAVKpdhLWRLv9k94VTPo7rE6LDwWohqmp1IA7sLTg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/linkinator/-/linkinator-4.0.0.tgz", + "integrity": "sha512-NKJmdp90A8/UYiWy4f0FzcBFoA9ntfUPKrvDJqevos5Are9O9KgEGcZKARmN+ZYWsioySQFlS5ySiYxvDxNtQA==", "dev": true, "requires": { - "chalk": "^4.0.0", - "cheerio": "^1.0.0-rc.5", + "chalk": "^5.0.0", "escape-html": "^1.0.3", - "gaxios": "^4.0.0", - "glob": "^7.1.6", - "jsonexport": "^3.0.0", - "marked": "^2.0.0", - "meow": "^9.0.0", - "mime": "^2.5.0", + "gaxios": "^5.0.0", + "glob": "^8.0.1", + "htmlparser2": "^8.0.1", + "marked": "^4.0.3", + "meow": "^10.1.1", + "mime": "^3.0.0", "server-destroy": "^1.0.1", - "update-notifier": "^5.0.0" + "update-notifier": "^6.0.0" + }, + "dependencies": { + "@sindresorhus/is": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", + "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", + "dev": true + }, + "@szmarczak/http-timer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-5.0.1.tgz", + "integrity": "sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==", + "dev": true, + "requires": { + "defer-to-connect": "^2.0.1" + } + }, + "@types/minimist": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", + "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==", + "dev": true + }, + "ansi-align": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", + "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", + "dev": true, + "requires": { + "string-width": "^4.1.0" + }, + "dependencies": { + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + } + } + }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, + "ansi-styles": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.1.0.tgz", + "integrity": "sha512-VbqNsoz55SYGczauuup0MFUyXNQviSpFTj1RQtFzmQLk18qbVSpTFFGMT293rmDaQuKCT6InmbuEyUne4mTuxQ==", + "dev": true + }, + "boxen": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-7.0.0.tgz", + "integrity": "sha512-j//dBVuyacJbvW+tvZ9HuH03fZ46QcaKvvhZickZqtB271DxJ7SNRSNxrV/dZX0085m7hISRZWbzWlJvx/rHSg==", + "dev": true, + "requires": { + "ansi-align": "^3.0.1", + "camelcase": "^7.0.0", + "chalk": "^5.0.1", + "cli-boxes": "^3.0.0", + "string-width": "^5.1.2", + "type-fest": "^2.13.0", + "widest-line": "^4.0.1", + "wrap-ansi": "^8.0.1" + }, + "dependencies": { + "camelcase": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-7.0.0.tgz", + "integrity": "sha512-JToIvOmz6nhGsUhAYScbo2d6Py5wojjNfoxoc2mEVLUdJ70gJK2gnd+ABY1Tc3sVMyK7QDPtN0T/XdlCQWITyQ==", + "dev": true + }, + "type-fest": { + "version": "2.16.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.16.0.tgz", + "integrity": "sha512-qpaThT2HQkFb83gMOrdKVsfCN7LKxP26Yq+smPzY1FqoHRjqmjqHXA7n5Gkxi8efirtbeEUxzfEdePthQWCuHw==", + "dev": true + } + } + }, + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "cacheable-request": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.2.tgz", + "integrity": "sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew==", + "dev": true, + "requires": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^4.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^6.0.1", + "responselike": "^2.0.0" + }, + "dependencies": { + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "dev": true + } + } + }, + "camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true + }, + "camelcase-keys": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-7.0.2.tgz", + "integrity": "sha512-Rjs1H+A9R+Ig+4E/9oyB66UC5Mj9Xq3N//vcLf2WzgdTi/3gUu3Z9KoqmlrEG4VuuLK8wJHofxzdQXz/knhiYg==", + "dev": true, + "requires": { + "camelcase": "^6.3.0", + "map-obj": "^4.1.0", + "quick-lru": "^5.1.1", + "type-fest": "^1.2.1" + } + }, + "chalk": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.0.1.tgz", + "integrity": "sha512-Fo07WOYGqMfCWHOzSXOt2CxDbC6skS/jO9ynEcmpANMoPrD+W1r1K6Vx7iNm+AQmETU1Xr2t+n8nzkV9t6xh3w==", + "dev": true + }, + "ci-info": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.2.tgz", + "integrity": "sha512-xmDt/QIAdeZ9+nfdPsaBCpMvHNLFiLdjj59qjqn+6iPe6YmHGQ35sBnQ8uslRBXFmXkiZQOJRjvQeoGppoTjjg==", + "dev": true + }, + "cli-boxes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz", + "integrity": "sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==", + "dev": true + }, + "configstore": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-6.0.0.tgz", + "integrity": "sha512-cD31W1v3GqUlQvbBCGcXmd2Nj9SvLDOP1oQ0YFuLETufzSPaKp11rYBsSOm7rCsW3OnIRAFM3OxRhceaXNYHkA==", + "dev": true, + "requires": { + "dot-prop": "^6.0.1", + "graceful-fs": "^4.2.6", + "unique-string": "^3.0.0", + "write-file-atomic": "^3.0.3", + "xdg-basedir": "^5.0.1" + } + }, + "crypto-random-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-4.0.0.tgz", + "integrity": "sha512-x8dy3RnvYdlUcPOjkEHqozhiwzKNSq7GcPuXFbnyMOCHxX8V3OgIg/pYuabl2sbUPfIJaeAQB7PMOK8DFIdoRA==", + "dev": true, + "requires": { + "type-fest": "^1.0.1" + } + }, + "decamelize": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-5.0.1.tgz", + "integrity": "sha512-VfxadyCECXgQlkoEAjeghAr5gY3Hf+IKjKb+X8tGVDtveCjN+USwprd2q3QXBR9T1+x2DG0XZF5/w+7HAtSaXA==", + "dev": true + }, + "decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "dev": true, + "requires": { + "mimic-response": "^3.1.0" + } + }, + "defer-to-connect": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", + "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", + "dev": true + }, + "dot-prop": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-6.0.1.tgz", + "integrity": "sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==", + "dev": true, + "requires": { + "is-obj": "^2.0.0" + } + }, + "escape-goat": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-4.0.0.tgz", + "integrity": "sha512-2Sd4ShcWxbx6OY1IHyla/CVNwvg7XwZVoXZHcSu9w9SReNP1EzzD5T8NWKIR38fIqEns9kDWKUQTXXAmlDrdPg==", + "dev": true + }, + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "gaxios": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-5.0.1.tgz", + "integrity": "sha512-keK47BGKHyyOVQxgcUaSaFvr3ehZYAlvhvpHXy0YB2itzZef+GqZR8TBsfVRWghdwlKrYsn+8L8i3eblF7Oviw==", + "dev": true, + "requires": { + "extend": "^3.0.2", + "https-proxy-agent": "^5.0.0", + "is-stream": "^2.0.0", + "node-fetch": "^2.6.7" + } + }, + "glob": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", + "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + } + }, + "got": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/got/-/got-12.1.0.tgz", + "integrity": "sha512-hBv2ty9QN2RdbJJMK3hesmSkFTjVIHyIDDbssCKnSmq62edGgImJWD10Eb1k77TiV1bxloxqcFAVK8+9pkhOig==", + "dev": true, + "requires": { + "@sindresorhus/is": "^4.6.0", + "@szmarczak/http-timer": "^5.0.1", + "@types/cacheable-request": "^6.0.2", + "@types/responselike": "^1.0.0", + "cacheable-lookup": "^6.0.4", + "cacheable-request": "^7.0.2", + "decompress-response": "^6.0.0", + "form-data-encoder": "1.7.1", + "get-stream": "^6.0.1", + "http2-wrapper": "^2.1.10", + "lowercase-keys": "^3.0.0", + "p-cancelable": "^3.0.0", + "responselike": "^2.0.0" + } + }, + "has-yarn": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-3.0.0.tgz", + "integrity": "sha512-IrsVwUHhEULx3R8f/aA8AHuEzAorplsab/v8HBzEiIukwq5i/EC+xmOW+HfP1OaDP+2JkgT1yILHN2O3UFIbcA==", + "dev": true + }, + "import-lazy": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-4.0.0.tgz", + "integrity": "sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==", + "dev": true + }, + "indent-string": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz", + "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==", + "dev": true + }, + "is-ci": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", + "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", + "dev": true, + "requires": { + "ci-info": "^3.2.0" + } + }, + "is-npm": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-6.0.0.tgz", + "integrity": "sha512-JEjxbSmtPSt1c8XTkVrlujcXdKV1/tvuQ7GwKcAlyiVLeYFQ2VHat8xfrDJsIkhCdF/tZ7CiIR3sy141c6+gPQ==", + "dev": true + }, + "is-yarn-global": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.4.0.tgz", + "integrity": "sha512-HneQBCrXGBy15QnaDfcn6OLoU8AQPAa0Qn0IeJR/QCo4E8dNZaGGwxpCwWyEBQC5QvFonP8d6t60iGpAHVAfNA==", + "dev": true + }, + "json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, + "keyv": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.3.2.tgz", + "integrity": "sha512-kn8WmodVBe12lmHpA6W8OY7SNh6wVR+Z+wZESF4iF5FCazaVXGWOtnbnvX0tMQ1bO+/TmOD9LziuYMvrIIs0xw==", + "dev": true, + "requires": { + "compress-brotli": "^1.3.8", + "json-buffer": "3.0.1" + } + }, + "latest-version": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-7.0.0.tgz", + "integrity": "sha512-KvNT4XqAMzdcL6ka6Tl3i2lYeFDgXNCuIX+xNx6ZMVR1dFq+idXd9FLKNMOIx0t9mJ9/HudyX4oZWXZQ0UJHeg==", + "dev": true, + "requires": { + "package-json": "^8.1.0" + } + }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "requires": { + "p-locate": "^5.0.0" + } + }, + "lowercase-keys": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-3.0.0.tgz", + "integrity": "sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==", + "dev": true + }, + "marked": { + "version": "4.0.17", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.0.17.tgz", + "integrity": "sha512-Wfk0ATOK5iPxM4ptrORkFemqroz0ZDxp5MWfYA7H/F+wO17NRWV5Ypxi6p3g2Xmw2bKeiYOl6oVnLHKxBA0VhA==", + "dev": true + }, + "meow": { + "version": "10.1.3", + "resolved": "https://registry.npmjs.org/meow/-/meow-10.1.3.tgz", + "integrity": "sha512-0WL7RMCPPdUTE00+GxJjL4d5Dm6eUbmAzxlzywJWiRUKCW093owmZ7/q74tH9VI91vxw9KJJNxAcvdpxb2G4iA==", + "dev": true, + "requires": { + "@types/minimist": "^1.2.2", + "camelcase-keys": "^7.0.0", + "decamelize": "^5.0.0", + "decamelize-keys": "^1.1.0", + "hard-rejection": "^2.1.0", + "minimist-options": "4.1.0", + "normalize-package-data": "^3.0.2", + "read-pkg-up": "^8.0.0", + "redent": "^4.0.0", + "trim-newlines": "^4.0.2", + "type-fest": "^1.2.2", + "yargs-parser": "^20.2.9" + } + }, + "mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "dev": true + }, + "minimatch": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", + "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + }, + "node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "dev": true, + "requires": { + "whatwg-url": "^5.0.0" + } + }, + "normalize-url": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", + "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", + "dev": true + }, + "p-cancelable": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-3.0.0.tgz", + "integrity": "sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==", + "dev": true + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "requires": { + "p-limit": "^3.0.2" + } + }, + "package-json": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-8.1.0.tgz", + "integrity": "sha512-hySwcV8RAWeAfPsXb9/HGSPn8lwDnv6fabH+obUZKX169QknRkRhPxd1yMubpKDskLFATkl3jHpNtVtDPFA0Wg==", + "dev": true, + "requires": { + "got": "^12.1.0", + "registry-auth-token": "^5.0.1", + "registry-url": "^6.0.0", + "semver": "^7.3.7" + } + }, + "pupa": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/pupa/-/pupa-3.1.0.tgz", + "integrity": "sha512-FLpr4flz5xZTSJxSeaheeMKN/EDzMdK7b8PTOC6a5PYFKTucWbdqjgqaEyH0shFiSJrVB1+Qqi4Tk19ccU6Aug==", + "dev": true, + "requires": { + "escape-goat": "^4.0.0" + } + }, + "quick-lru": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", + "dev": true + }, + "read-pkg": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-6.0.0.tgz", + "integrity": "sha512-X1Fu3dPuk/8ZLsMhEj5f4wFAF0DWoK7qhGJvgaijocXxBmSToKfbFtqbxMO7bVjNA1dmE5huAzjXj/ey86iw9Q==", + "dev": true, + "requires": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^3.0.2", + "parse-json": "^5.2.0", + "type-fest": "^1.0.1" + } + }, + "read-pkg-up": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-8.0.0.tgz", + "integrity": "sha512-snVCqPczksT0HS2EC+SxUndvSzn6LRCwpfSvLrIfR5BKDQQZMaI6jPRC9dYvYFDRAuFEAnkwww8kBBNE/3VvzQ==", + "dev": true, + "requires": { + "find-up": "^5.0.0", + "read-pkg": "^6.0.0", + "type-fest": "^1.0.1" + } + }, + "redent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-4.0.0.tgz", + "integrity": "sha512-tYkDkVVtYkSVhuQ4zBgfvciymHaeuel+zFKXShfDnFP5SyVEP7qo70Rf1jTOTCx3vGNAbnEi/xFkcfQVMIBWag==", + "dev": true, + "requires": { + "indent-string": "^5.0.0", + "strip-indent": "^4.0.0" + } + }, + "registry-auth-token": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-5.0.1.tgz", + "integrity": "sha512-UfxVOj8seK1yaIOiieV4FIP01vfBDLsY0H9sQzi9EbbUdJiuuBjJgLa1DpImXMNPnVkBD4eVxTEXcrZA6kfpJA==", + "dev": true, + "requires": { + "@pnpm/npm-conf": "^1.0.4" + } + }, + "registry-url": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-6.0.1.tgz", + "integrity": "sha512-+crtS5QjFRqFCoQmvGduwYWEBng99ZvmFvF+cUJkGYF1L1BfU8C6Zp9T7f5vPAwyLkUExpvK+ANVZmGU49qi4Q==", + "dev": true, + "requires": { + "rc": "1.2.8" + } + }, + "responselike": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.0.tgz", + "integrity": "sha512-xH48u3FTB9VsZw7R+vvgaKeLKzT6jOogbQhEe/jewwnZgzPcnyWui2Av6JpoYZF/91uueC+lqhWqeURw5/qhCw==", + "dev": true, + "requires": { + "lowercase-keys": "^2.0.0" + }, + "dependencies": { + "lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "dev": true + } + } + }, + "semver-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-4.0.0.tgz", + "integrity": "sha512-0Ju4+6A8iOnpL/Thra7dZsSlOHYAHIeMxfhWQRI1/VLcT3WDBZKKtQt/QkBOsiIN9ZpuvHE6cGZ0x4glCMmfiA==", + "dev": true, + "requires": { + "semver": "^7.3.5" + } + }, + "string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "requires": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true + }, + "emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "strip-ansi": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", + "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", + "dev": true, + "requires": { + "ansi-regex": "^6.0.1" + } + } + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "strip-indent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-4.0.0.tgz", + "integrity": "sha512-mnVSV2l+Zv6BLpSD/8V87CW/y9EmmbYzGCIavsnsI6/nwn26DwffM/yztm30Z/I2DY9wdS3vXVCMnHDgZaVNoA==", + "dev": true, + "requires": { + "min-indent": "^1.0.1" + } + }, + "trim-newlines": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-4.0.2.tgz", + "integrity": "sha512-GJtWyq9InR/2HRiLZgpIKv+ufIKrVrvjQWEj7PxAXNc5dwbNJkqhAUoAGgzRmULAnoOM5EIpveYd3J2VeSAIew==", + "dev": true + }, + "type-fest": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", + "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==", + "dev": true + }, + "unique-string": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-3.0.0.tgz", + "integrity": "sha512-VGXBUVwxKMBUznyffQweQABPRRW1vHZAbadFZud4pLFAqRGvv/96vafgjWFqzourzr8YonlQiPgH0YCJfawoGQ==", + "dev": true, + "requires": { + "crypto-random-string": "^4.0.0" + } + }, + "update-notifier": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-6.0.2.tgz", + "integrity": "sha512-EDxhTEVPZZRLWYcJ4ZXjGFN0oP7qYvbXWzEgRm/Yql4dHX5wDbvh89YHP6PK1lzZJYrMtXUuZZz8XGK+U6U1og==", + "dev": true, + "requires": { + "boxen": "^7.0.0", + "chalk": "^5.0.1", + "configstore": "^6.0.0", + "has-yarn": "^3.0.0", + "import-lazy": "^4.0.0", + "is-ci": "^3.0.1", + "is-installed-globally": "^0.4.0", + "is-npm": "^6.0.0", + "is-yarn-global": "^0.4.0", + "latest-version": "^7.0.0", + "pupa": "^3.1.0", + "semver": "^7.3.7", + "semver-diff": "^4.0.0", + "xdg-basedir": "^5.1.0" + } + }, + "widest-line": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz", + "integrity": "sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig==", + "dev": true, + "requires": { + "string-width": "^5.0.1" + } + }, + "wrap-ansi": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.0.1.tgz", + "integrity": "sha512-QFF+ufAqhoYHvoHdajT/Po7KoXVBPXS2bgjIam5isfWJPfIOnQZ50JtUiVvCv/sjgacf3yRrt2ZKUZ/V4itN4g==", + "dev": true, + "requires": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true + }, + "strip-ansi": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", + "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", + "dev": true, + "requires": { + "ansi-regex": "^6.0.1" + } + } + } + }, + "xdg-basedir": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-5.1.0.tgz", + "integrity": "sha512-GCPAHLvrIH13+c0SuacwvRYj2SxJXQ4kaVTT5xgL3kPrz56XxkF21IGhjSE1+W0aw7gpBWRGXLCPnPby6lSpmQ==", + "dev": true + }, + "yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true + } } }, "loader-runner": { @@ -3116,9 +3890,9 @@ } }, "mime": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.5.2.tgz", - "integrity": "sha512-tqkh47FzKeCPD2PUiPB6pkbMzsCasjxAfC62/Wap5qrUWcb+sFasXUC5I3gYM5iBM8v/Qpn4UK0x+j0iHyFPDg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz", + "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", "dev": true }, "mime-db": { @@ -3515,15 +4289,6 @@ "path-key": "^3.0.0" } }, - "nth-check": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.0.tgz", - "integrity": "sha512-i4sc/Kj8htBrAiH1viZ0TgU8Y5XqCaV/FziYK6TBczxmeKm3AEFWqqF3195yKudrarqy7Zu80Ra5dobFjn9X/Q==", - "dev": true, - "requires": { - "boolbase": "^1.0.0" - } - }, "null-loader": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/null-loader/-/null-loader-4.0.1.tgz", @@ -3683,21 +4448,6 @@ "lines-and-columns": "^1.1.6" } }, - "parse5": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", - "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", - "dev": true - }, - "parse5-htmlparser2-tree-adapter": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz", - "integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==", - "dev": true, - "requires": { - "parse5": "^6.0.1" - } - }, "path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -3824,6 +4574,12 @@ "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true }, + "proto-list": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", + "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==", + "dev": true + }, "proto3-json-serializer": { "version": "0.1.9", "resolved": "https://registry.npmjs.org/proto3-json-serializer/-/proto3-json-serializer-0.1.9.tgz", @@ -4079,6 +4835,12 @@ "path-parse": "^1.0.6" } }, + "resolve-alpn": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", + "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", + "dev": true + }, "resolve-cwd": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", @@ -4229,7 +4991,7 @@ "server-destroy": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/server-destroy/-/server-destroy-1.0.1.tgz", - "integrity": "sha1-8Tv5KOQrnD55OD5hzDmYtdFObN0=", + "integrity": "sha512-rb+9B5YBIEzYcD6x2VKidaa+cqYBJQKnU4oe4E3ANwRRN56yk/ua1YCJT1n21NTS8w6CcOclAKNP3PhdCXKYtQ==", "dev": true }, "shallow-clone": { diff --git a/packages/google-cloud-shell/package.json b/packages/google-cloud-shell/package.json index d3262d07927..a981aa11e78 100644 --- a/packages/google-cloud-shell/package.json +++ b/packages/google-cloud-shell/package.json @@ -50,7 +50,7 @@ "jsdoc": "^3.6.6", "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", - "linkinator": "^2.13.6", + "linkinator": "^4.0.0", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", From c688bd60f189e1e802fc4e0be5a6735196808bf8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 13 Jul 2022 01:58:40 +0200 Subject: [PATCH 209/254] chore(deps): update dependency linkinator to v4 (#134) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [linkinator](https://togithub.com/JustinBeckwith/linkinator) | [`^2.7.0` -> `^4.0.0`](https://renovatebot.com/diffs/npm/linkinator/2.16.2/4.0.2) | [![age](https://badges.renovateapi.com/packages/npm/linkinator/4.0.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/linkinator/4.0.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/linkinator/4.0.2/compatibility-slim/2.16.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/linkinator/4.0.2/confidence-slim/2.16.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
JustinBeckwith/linkinator ### [`v4.0.2`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v4.0.2) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v4.0.1...v4.0.2) ##### Bug Fixes - address srcset parsing with multiple spaces ([#​512](https://togithub.com/JustinBeckwith/linkinator/issues/512)) ([fefb5b6](https://togithub.com/JustinBeckwith/linkinator/commit/fefb5b6734fc4ab335793358c5f491338ecbeb90)) ### [`v4.0.1`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v4.0.1) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v4.0.0...v4.0.1) ##### Bug Fixes - properly parse srcset attribute ([#​510](https://togithub.com/JustinBeckwith/linkinator/issues/510)) ([9a8a83c](https://togithub.com/JustinBeckwith/linkinator/commit/9a8a83c35182b3cd4daee62a00f156767fe5c6a7)) ### [`v4.0.0`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v4.0.0) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.1.0...v4.0.0) ##### Features - create new release with notes ([#​508](https://togithub.com/JustinBeckwith/linkinator/issues/508)) ([2cab633](https://togithub.com/JustinBeckwith/linkinator/commit/2cab633c9659eb10794a4bac06f8b0acdc3e2c0c)) ##### BREAKING CHANGES - The commits in [#​507](https://togithub.com/JustinBeckwith/linkinator/issues/507) and [#​506](https://togithub.com/JustinBeckwith/linkinator/issues/506) both had breaking changes. They included dropping support for Node.js 12.x and updating the CSV export to be streaming, and to use a new way of writing the CSV file. This is an empty to commit using the `BREAKING CHANGE` format in the commit message to ensure a release is triggered. ### [`v3.1.0`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.1.0) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.6...v3.1.0) ##### Features - allow --skip to be defined multiple times ([#​399](https://togithub.com/JustinBeckwith/linkinator/issues/399)) ([5ca5a46](https://togithub.com/JustinBeckwith/linkinator/commit/5ca5a461508e688de12e5ae6b4cfb6565f832ebf)) ### [`v3.0.6`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.6) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.5...v3.0.6) ##### Bug Fixes - **deps:** upgrade node-glob to v8 ([#​397](https://togithub.com/JustinBeckwith/linkinator/issues/397)) ([d334dc6](https://togithub.com/JustinBeckwith/linkinator/commit/d334dc6734cd7c2b73d7ed3dea0550a6c3072ad5)) ### [`v3.0.5`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.5) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.4...v3.0.5) ##### Bug Fixes - **deps:** upgrade to htmlparser2 v8.0.1 ([#​396](https://togithub.com/JustinBeckwith/linkinator/issues/396)) ([ba3b9a8](https://togithub.com/JustinBeckwith/linkinator/commit/ba3b9a8a9b19d39af6ed91790135e833b80c1eb6)) ### [`v3.0.4`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.4) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.3...v3.0.4) ##### Bug Fixes - **deps:** update dependency gaxios to v5 ([#​391](https://togithub.com/JustinBeckwith/linkinator/issues/391)) ([48af50e](https://togithub.com/JustinBeckwith/linkinator/commit/48af50e787731204aeb7eff41325c62291311e45)) ### [`v3.0.3`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.3) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.2...v3.0.3) ##### Bug Fixes - export getConfig from index ([#​371](https://togithub.com/JustinBeckwith/linkinator/issues/371)) ([0bc0355](https://togithub.com/JustinBeckwith/linkinator/commit/0bc0355c7e2ea457f247e6b52d1577b8c4ecb3a1)) ### [`v3.0.2`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.2) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.1...v3.0.2) ##### Bug Fixes - allow server root with trailing slash ([#​370](https://togithub.com/JustinBeckwith/linkinator/issues/370)) ([8adf6b0](https://togithub.com/JustinBeckwith/linkinator/commit/8adf6b025fda250e38461f1cdad40fe08c3b3b7c)) ### [`v3.0.1`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.1) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.0...v3.0.1) ##### Bug Fixes - decode path parts in local web server ([#​369](https://togithub.com/JustinBeckwith/linkinator/issues/369)) ([4696a0c](https://togithub.com/JustinBeckwith/linkinator/commit/4696a0c38c341b178ed815f47371fca955979feb)) ### [`v3.0.0`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.0) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v2.16.2...v3.0.0) ##### Bug Fixes - **deps:** update dependency chalk to v5 ([#​362](https://togithub.com/JustinBeckwith/linkinator/issues/362)) ([4b17a8d](https://togithub.com/JustinBeckwith/linkinator/commit/4b17a8d87b649eaf813428f8ee6955e1d21dae4f)) - feat!: convert to es modules, drop node 10 ([#​359](https://togithub.com/JustinBeckwith/linkinator/issues/359)) ([efee299](https://togithub.com/JustinBeckwith/linkinator/commit/efee299ab8a805accef751eecf8538915a4e7783)), closes [#​359](https://togithub.com/JustinBeckwith/linkinator/issues/359) ##### BREAKING CHANGES - this module now requires node.js 12 and above, and has moved to es modules by default.
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-policy-troubleshooter). --- packages/google-cloud-policytroubleshooter/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-policytroubleshooter/package.json b/packages/google-cloud-policytroubleshooter/package.json index 9b51cb9fd29..4d8a4648be1 100644 --- a/packages/google-cloud-policytroubleshooter/package.json +++ b/packages/google-cloud-policytroubleshooter/package.json @@ -50,7 +50,7 @@ "jsdoc": "^3.6.6", "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", - "linkinator": "^2.7.0", + "linkinator": "^4.0.0", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", From 0ef416880d4068d1f648c61437a6156b43b01ab6 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 13 Jul 2022 02:00:22 +0200 Subject: [PATCH 210/254] chore(deps): update dependency linkinator to v4 (#80) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [linkinator](https://togithub.com/JustinBeckwith/linkinator) | [`^2.13.6` -> `^4.0.0`](https://renovatebot.com/diffs/npm/linkinator/2.16.2/4.0.2) | [![age](https://badges.renovateapi.com/packages/npm/linkinator/4.0.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/linkinator/4.0.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/linkinator/4.0.2/compatibility-slim/2.16.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/linkinator/4.0.2/confidence-slim/2.16.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
JustinBeckwith/linkinator ### [`v4.0.2`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v4.0.2) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v4.0.1...v4.0.2) ##### Bug Fixes - address srcset parsing with multiple spaces ([#​512](https://togithub.com/JustinBeckwith/linkinator/issues/512)) ([fefb5b6](https://togithub.com/JustinBeckwith/linkinator/commit/fefb5b6734fc4ab335793358c5f491338ecbeb90)) ### [`v4.0.1`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v4.0.1) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v4.0.0...v4.0.1) ##### Bug Fixes - properly parse srcset attribute ([#​510](https://togithub.com/JustinBeckwith/linkinator/issues/510)) ([9a8a83c](https://togithub.com/JustinBeckwith/linkinator/commit/9a8a83c35182b3cd4daee62a00f156767fe5c6a7)) ### [`v4.0.0`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v4.0.0) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.1.0...v4.0.0) ##### Features - create new release with notes ([#​508](https://togithub.com/JustinBeckwith/linkinator/issues/508)) ([2cab633](https://togithub.com/JustinBeckwith/linkinator/commit/2cab633c9659eb10794a4bac06f8b0acdc3e2c0c)) ##### BREAKING CHANGES - The commits in [#​507](https://togithub.com/JustinBeckwith/linkinator/issues/507) and [#​506](https://togithub.com/JustinBeckwith/linkinator/issues/506) both had breaking changes. They included dropping support for Node.js 12.x and updating the CSV export to be streaming, and to use a new way of writing the CSV file. This is an empty to commit using the `BREAKING CHANGE` format in the commit message to ensure a release is triggered. ### [`v3.1.0`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.1.0) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.6...v3.1.0) ##### Features - allow --skip to be defined multiple times ([#​399](https://togithub.com/JustinBeckwith/linkinator/issues/399)) ([5ca5a46](https://togithub.com/JustinBeckwith/linkinator/commit/5ca5a461508e688de12e5ae6b4cfb6565f832ebf)) ### [`v3.0.6`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.6) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.5...v3.0.6) ##### Bug Fixes - **deps:** upgrade node-glob to v8 ([#​397](https://togithub.com/JustinBeckwith/linkinator/issues/397)) ([d334dc6](https://togithub.com/JustinBeckwith/linkinator/commit/d334dc6734cd7c2b73d7ed3dea0550a6c3072ad5)) ### [`v3.0.5`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.5) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.4...v3.0.5) ##### Bug Fixes - **deps:** upgrade to htmlparser2 v8.0.1 ([#​396](https://togithub.com/JustinBeckwith/linkinator/issues/396)) ([ba3b9a8](https://togithub.com/JustinBeckwith/linkinator/commit/ba3b9a8a9b19d39af6ed91790135e833b80c1eb6)) ### [`v3.0.4`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.4) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.3...v3.0.4) ##### Bug Fixes - **deps:** update dependency gaxios to v5 ([#​391](https://togithub.com/JustinBeckwith/linkinator/issues/391)) ([48af50e](https://togithub.com/JustinBeckwith/linkinator/commit/48af50e787731204aeb7eff41325c62291311e45)) ### [`v3.0.3`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.3) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.2...v3.0.3) ##### Bug Fixes - export getConfig from index ([#​371](https://togithub.com/JustinBeckwith/linkinator/issues/371)) ([0bc0355](https://togithub.com/JustinBeckwith/linkinator/commit/0bc0355c7e2ea457f247e6b52d1577b8c4ecb3a1)) ### [`v3.0.2`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.2) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.1...v3.0.2) ##### Bug Fixes - allow server root with trailing slash ([#​370](https://togithub.com/JustinBeckwith/linkinator/issues/370)) ([8adf6b0](https://togithub.com/JustinBeckwith/linkinator/commit/8adf6b025fda250e38461f1cdad40fe08c3b3b7c)) ### [`v3.0.1`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.1) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.0...v3.0.1) ##### Bug Fixes - decode path parts in local web server ([#​369](https://togithub.com/JustinBeckwith/linkinator/issues/369)) ([4696a0c](https://togithub.com/JustinBeckwith/linkinator/commit/4696a0c38c341b178ed815f47371fca955979feb)) ### [`v3.0.0`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.0) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v2.16.2...v3.0.0) ##### Bug Fixes - **deps:** update dependency chalk to v5 ([#​362](https://togithub.com/JustinBeckwith/linkinator/issues/362)) ([4b17a8d](https://togithub.com/JustinBeckwith/linkinator/commit/4b17a8d87b649eaf813428f8ee6955e1d21dae4f)) - feat!: convert to es modules, drop node 10 ([#​359](https://togithub.com/JustinBeckwith/linkinator/issues/359)) ([efee299](https://togithub.com/JustinBeckwith/linkinator/commit/efee299ab8a805accef751eecf8538915a4e7783)), closes [#​359](https://togithub.com/JustinBeckwith/linkinator/issues/359) ##### BREAKING CHANGES - this module now requires node.js 12 and above, and has moved to es modules by default.
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-gke-connect-gateway). --- packages/google-cloud-gkeconnect-gateway/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-gkeconnect-gateway/package.json b/packages/google-cloud-gkeconnect-gateway/package.json index bf797e1a783..6a95d0edddf 100644 --- a/packages/google-cloud-gkeconnect-gateway/package.json +++ b/packages/google-cloud-gkeconnect-gateway/package.json @@ -50,7 +50,7 @@ "jsdoc": "^3.6.6", "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", - "linkinator": "^2.13.6", + "linkinator": "^4.0.0", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", From af662ccf80799796335b698a20ed5659b6e2b816 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 13 Jul 2022 02:00:35 +0200 Subject: [PATCH 211/254] chore(deps): update dependency linkinator to v4 (#43) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [linkinator](https://togithub.com/JustinBeckwith/linkinator) | [`^3.0.0` -> `^4.0.0`](https://renovatebot.com/diffs/npm/linkinator/3.1.0/4.0.2) | [![age](https://badges.renovateapi.com/packages/npm/linkinator/4.0.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/linkinator/4.0.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/linkinator/4.0.2/compatibility-slim/3.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/linkinator/4.0.2/confidence-slim/3.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
JustinBeckwith/linkinator ### [`v4.0.2`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v4.0.2) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v4.0.1...v4.0.2) ##### Bug Fixes - address srcset parsing with multiple spaces ([#​512](https://togithub.com/JustinBeckwith/linkinator/issues/512)) ([fefb5b6](https://togithub.com/JustinBeckwith/linkinator/commit/fefb5b6734fc4ab335793358c5f491338ecbeb90)) ### [`v4.0.1`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v4.0.1) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v4.0.0...v4.0.1) ##### Bug Fixes - properly parse srcset attribute ([#​510](https://togithub.com/JustinBeckwith/linkinator/issues/510)) ([9a8a83c](https://togithub.com/JustinBeckwith/linkinator/commit/9a8a83c35182b3cd4daee62a00f156767fe5c6a7)) ### [`v4.0.0`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v4.0.0) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.1.0...v4.0.0) ##### Features - create new release with notes ([#​508](https://togithub.com/JustinBeckwith/linkinator/issues/508)) ([2cab633](https://togithub.com/JustinBeckwith/linkinator/commit/2cab633c9659eb10794a4bac06f8b0acdc3e2c0c)) ##### BREAKING CHANGES - The commits in [#​507](https://togithub.com/JustinBeckwith/linkinator/issues/507) and [#​506](https://togithub.com/JustinBeckwith/linkinator/issues/506) both had breaking changes. They included dropping support for Node.js 12.x and updating the CSV export to be streaming, and to use a new way of writing the CSV file. This is an empty to commit using the `BREAKING CHANGE` format in the commit message to ensure a release is triggered.
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-dataplex). --- packages/google-cloud-dataplex/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-dataplex/package.json b/packages/google-cloud-dataplex/package.json index 9bd85b553ef..3de94bd3067 100644 --- a/packages/google-cloud-dataplex/package.json +++ b/packages/google-cloud-dataplex/package.json @@ -51,7 +51,7 @@ "jsdoc": "^3.6.6", "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", - "linkinator": "^3.0.0", + "linkinator": "^4.0.0", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", From dd114323b2b33de2bba0323ff6be47b9e6962a3a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 23 Aug 2022 00:12:15 +0000 Subject: [PATCH 212/254] fix: better support for fallback mode (#59) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 468790263 Source-Link: https://github.com/googleapis/googleapis/commit/873ab456273d105245df0fb82a6c17a814553b80 Source-Link: https://github.com/googleapis/googleapis-gen/commit/cb6f37aeff2a3472e40a7bbace8c67d75e24bee5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2I2ZjM3YWVmZjJhMzQ3MmU0MGE3YmJhY2U4YzY3ZDc1ZTI0YmVlNSJ9 --- .../v1/cloud_deploy.approve_rollout.js | 3 + .../cloud_deploy.create_delivery_pipeline.js | 3 + .../v1/cloud_deploy.create_release.js | 3 + .../v1/cloud_deploy.create_rollout.js | 3 + .../v1/cloud_deploy.create_target.js | 3 + .../cloud_deploy.delete_delivery_pipeline.js | 3 + .../v1/cloud_deploy.delete_target.js | 3 + .../generated/v1/cloud_deploy.get_config.js | 3 + .../v1/cloud_deploy.get_delivery_pipeline.js | 3 + .../generated/v1/cloud_deploy.get_release.js | 3 + .../generated/v1/cloud_deploy.get_rollout.js | 3 + .../generated/v1/cloud_deploy.get_target.js | 3 + .../cloud_deploy.list_delivery_pipelines.js | 3 + .../v1/cloud_deploy.list_releases.js | 3 + .../v1/cloud_deploy.list_rollouts.js | 3 + .../generated/v1/cloud_deploy.list_targets.js | 3 + .../cloud_deploy.update_delivery_pipeline.js | 3 + .../v1/cloud_deploy.update_target.js | 3 + ...ippet_metadata.google.cloud.deploy.v1.json | 36 ++-- .../src/v1/cloud_deploy_client.ts | 36 ++-- .../test/gapic_cloud_deploy_v1.ts | 156 +++++++++--------- 21 files changed, 169 insertions(+), 113 deletions(-) diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.approve_rollout.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.approve_rollout.js index 1f974d6911a..e998b6c1ba3 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.approve_rollout.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.approve_rollout.js @@ -23,6 +23,9 @@ function main(name, approved) { // [START clouddeploy_v1_generated_CloudDeploy_ApproveRollout_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js index eb65c284a08..4432b55be54 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js @@ -23,6 +23,9 @@ function main(parent, deliveryPipelineId, deliveryPipeline) { // [START clouddeploy_v1_generated_CloudDeploy_CreateDeliveryPipeline_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_release.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_release.js index 36053ee4611..7179e441622 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_release.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_release.js @@ -23,6 +23,9 @@ function main(parent, releaseId, release) { // [START clouddeploy_v1_generated_CloudDeploy_CreateRelease_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_rollout.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_rollout.js index a9625ceb710..9d04a45da3a 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_rollout.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_rollout.js @@ -23,6 +23,9 @@ function main(parent, rolloutId, rollout) { // [START clouddeploy_v1_generated_CloudDeploy_CreateRollout_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_target.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_target.js index 744e4f37698..7241169b91e 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_target.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_target.js @@ -23,6 +23,9 @@ function main(parent, targetId, target) { // [START clouddeploy_v1_generated_CloudDeploy_CreateTarget_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js index 7901a961a23..45ee126c493 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js @@ -23,6 +23,9 @@ function main(name) { // [START clouddeploy_v1_generated_CloudDeploy_DeleteDeliveryPipeline_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_target.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_target.js index b21c995b394..924acdecddd 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_target.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_target.js @@ -23,6 +23,9 @@ function main(name) { // [START clouddeploy_v1_generated_CloudDeploy_DeleteTarget_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_config.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_config.js index 26cc2632ca4..020fa675477 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_config.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_config.js @@ -23,6 +23,9 @@ function main(name) { // [START clouddeploy_v1_generated_CloudDeploy_GetConfig_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_delivery_pipeline.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_delivery_pipeline.js index 2ba4d0b906f..4446e09eb6a 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_delivery_pipeline.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_delivery_pipeline.js @@ -23,6 +23,9 @@ function main(name) { // [START clouddeploy_v1_generated_CloudDeploy_GetDeliveryPipeline_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_release.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_release.js index 4401fabdb5d..4130f1f1f3d 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_release.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_release.js @@ -23,6 +23,9 @@ function main(name) { // [START clouddeploy_v1_generated_CloudDeploy_GetRelease_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_rollout.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_rollout.js index 434c0e4ecc1..d5e64fa2b0a 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_rollout.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_rollout.js @@ -23,6 +23,9 @@ function main(name) { // [START clouddeploy_v1_generated_CloudDeploy_GetRollout_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_target.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_target.js index 075d179db0a..55d5e963204 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_target.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_target.js @@ -23,6 +23,9 @@ function main(name) { // [START clouddeploy_v1_generated_CloudDeploy_GetTarget_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js index d9f7580b298..63298cdfc0e 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js @@ -23,6 +23,9 @@ function main(parent) { // [START clouddeploy_v1_generated_CloudDeploy_ListDeliveryPipelines_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_releases.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_releases.js index 3141ea20cf6..d635dcdad8a 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_releases.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_releases.js @@ -23,6 +23,9 @@ function main(parent) { // [START clouddeploy_v1_generated_CloudDeploy_ListReleases_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_rollouts.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_rollouts.js index 51aa3fccbcf..cb6dab835da 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_rollouts.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_rollouts.js @@ -23,6 +23,9 @@ function main(parent) { // [START clouddeploy_v1_generated_CloudDeploy_ListRollouts_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_targets.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_targets.js index c64be81b37e..34c7cf51d83 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_targets.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_targets.js @@ -23,6 +23,9 @@ function main(parent) { // [START clouddeploy_v1_generated_CloudDeploy_ListTargets_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js index 19e8637291c..0cad66e7f56 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js @@ -23,6 +23,9 @@ function main(updateMask, deliveryPipeline) { // [START clouddeploy_v1_generated_CloudDeploy_UpdateDeliveryPipeline_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_target.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_target.js index f49504f3fe4..aa31f9966a1 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_target.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_target.js @@ -23,6 +23,9 @@ function main(updateMask, target) { // [START clouddeploy_v1_generated_CloudDeploy_UpdateTarget_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json b/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json index 88686591015..288ba7a7ab9 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json +++ b/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 76, + "end": 79, "type": "FULL" } ], @@ -78,7 +78,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -118,7 +118,7 @@ "segments": [ { "start": 25, - "end": 81, + "end": 84, "type": "FULL" } ], @@ -174,7 +174,7 @@ "segments": [ { "start": 25, - "end": 84, + "end": 87, "type": "FULL" } ], @@ -230,7 +230,7 @@ "segments": [ { "start": 25, - "end": 88, + "end": 91, "type": "FULL" } ], @@ -290,7 +290,7 @@ "segments": [ { "start": 25, - "end": 75, + "end": 78, "type": "FULL" } ], @@ -346,7 +346,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -386,7 +386,7 @@ "segments": [ { "start": 25, - "end": 82, + "end": 85, "type": "FULL" } ], @@ -442,7 +442,7 @@ "segments": [ { "start": 25, - "end": 84, + "end": 87, "type": "FULL" } ], @@ -498,7 +498,7 @@ "segments": [ { "start": 25, - "end": 82, + "end": 85, "type": "FULL" } ], @@ -554,7 +554,7 @@ "segments": [ { "start": 25, - "end": 74, + "end": 77, "type": "FULL" } ], @@ -610,7 +610,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -650,7 +650,7 @@ "segments": [ { "start": 25, - "end": 82, + "end": 85, "type": "FULL" } ], @@ -706,7 +706,7 @@ "segments": [ { "start": 25, - "end": 57, + "end": 60, "type": "FULL" } ], @@ -750,7 +750,7 @@ "segments": [ { "start": 25, - "end": 74, + "end": 77, "type": "FULL" } ], @@ -806,7 +806,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -846,7 +846,7 @@ "segments": [ { "start": 25, - "end": 82, + "end": 85, "type": "FULL" } ], @@ -902,7 +902,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], diff --git a/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts b/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts index 611f6baa28d..be4fc862c81 100644 --- a/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts +++ b/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts @@ -30,7 +30,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -495,7 +494,8 @@ export class CloudDeployClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -1230,7 +1230,7 @@ export class CloudDeployClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.createDeliveryPipeline, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.deploy.v1.DeliveryPipeline, @@ -1397,7 +1397,7 @@ export class CloudDeployClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.updateDeliveryPipeline, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.deploy.v1.DeliveryPipeline, @@ -1567,7 +1567,7 @@ export class CloudDeployClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.deleteDeliveryPipeline, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.protobuf.Empty, @@ -1727,7 +1727,7 @@ export class CloudDeployClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.createTarget, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.deploy.v1.Target, @@ -1890,7 +1890,7 @@ export class CloudDeployClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.updateTarget, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.deploy.v1.Target, @@ -2052,7 +2052,7 @@ export class CloudDeployClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.deleteTarget, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.protobuf.Empty, @@ -2212,7 +2212,7 @@ export class CloudDeployClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.createRelease, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.deploy.v1.Release, @@ -2372,7 +2372,7 @@ export class CloudDeployClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.createRollout, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.deploy.v1.Rollout, @@ -2542,7 +2542,7 @@ export class CloudDeployClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listDeliveryPipelines.createStream( - this.innerApiCalls.listDeliveryPipelines as gax.GaxCall, + this.innerApiCalls.listDeliveryPipelines as GaxCall, request, callSettings ); @@ -2603,7 +2603,7 @@ export class CloudDeployClient { this.initialize(); return this.descriptors.page.listDeliveryPipelines.asyncIterate( this.innerApiCalls['listDeliveryPipelines'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -2760,7 +2760,7 @@ export class CloudDeployClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listTargets.createStream( - this.innerApiCalls.listTargets as gax.GaxCall, + this.innerApiCalls.listTargets as GaxCall, request, callSettings ); @@ -2820,7 +2820,7 @@ export class CloudDeployClient { this.initialize(); return this.descriptors.page.listTargets.asyncIterate( this.innerApiCalls['listTargets'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -2977,7 +2977,7 @@ export class CloudDeployClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listReleases.createStream( - this.innerApiCalls.listReleases as gax.GaxCall, + this.innerApiCalls.listReleases as GaxCall, request, callSettings ); @@ -3036,7 +3036,7 @@ export class CloudDeployClient { this.initialize(); return this.descriptors.page.listReleases.asyncIterate( this.innerApiCalls['listReleases'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -3193,7 +3193,7 @@ export class CloudDeployClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listRollouts.createStream( - this.innerApiCalls.listRollouts as gax.GaxCall, + this.innerApiCalls.listRollouts as GaxCall, request, callSettings ); @@ -3252,7 +3252,7 @@ export class CloudDeployClient { this.initialize(); return this.descriptors.page.listRollouts.asyncIterate( this.innerApiCalls['listRollouts'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts b/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts index 7207c05c09a..4a782d5a73c 100644 --- a/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts +++ b/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts @@ -145,99 +145,101 @@ function stubAsyncIterationCall( } describe('v1.CloudDeployClient', () => { - it('has servicePath', () => { - const servicePath = clouddeployModule.v1.CloudDeployClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = clouddeployModule.v1.CloudDeployClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = clouddeployModule.v1.CloudDeployClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new clouddeployModule.v1.CloudDeployClient(); - assert(client); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = clouddeployModule.v1.CloudDeployClient.servicePath; + assert(servicePath); + }); - it('should create a client with gRPC fallback', () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - fallback: true, + it('has apiEndpoint', () => { + const apiEndpoint = clouddeployModule.v1.CloudDeployClient.apiEndpoint; + assert(apiEndpoint); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has port', () => { + const port = clouddeployModule.v1.CloudDeployClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert.strictEqual(client.cloudDeployStub, undefined); - await client.initialize(); - assert(client.cloudDeployStub); - }); - it('has close method for the initialized client', done => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new clouddeployModule.v1.CloudDeployClient(); + assert(client); }); - client.initialize(); - assert(client.cloudDeployStub); - client.close().then(() => { - done(); + + it('should create a client with gRPC fallback', () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + fallback: true, + }); + assert(client); }); - }); - it('has close method for the non-initialized client', done => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has initialize method and supports deferred initialization', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.cloudDeployStub, undefined); + await client.initialize(); + assert(client.cloudDeployStub); }); - assert.strictEqual(client.cloudDeployStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the initialized client', done => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.cloudDeployStub); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.cloudDeployStub, undefined); + client.close().then(() => { + done(); + }); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('getDeliveryPipeline', () => { From 2d28ae7928ccc15a7f96a348abbfdb58e3d6d16e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 23 Aug 2022 00:14:14 +0000 Subject: [PATCH 213/254] fix: better support for fallback mode (#81) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 468790263 Source-Link: https://github.com/googleapis/googleapis/commit/873ab456273d105245df0fb82a6c17a814553b80 Source-Link: https://github.com/googleapis/googleapis-gen/commit/cb6f37aeff2a3472e40a7bbace8c67d75e24bee5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2I2ZjM3YWVmZjJhMzQ3MmU0MGE3YmJhY2U4YzY3ZDc1ZTI0YmVlNSJ9 --- .../gateway_service.delete_resource.js | 3 + .../v1beta1/gateway_service.get_resource.js | 3 + .../v1beta1/gateway_service.patch_resource.js | 3 + .../v1beta1/gateway_service.post_resource.js | 3 + .../v1beta1/gateway_service.put_resource.js | 3 + ...ogle.cloud.gkeconnect.gateway.v1beta1.json | 10 +- .../src/v1beta1/gateway_service_client.ts | 3 +- .../test/gapic_gateway_service_v1beta1.ts | 160 +++++++++--------- 8 files changed, 103 insertions(+), 85 deletions(-) diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.delete_resource.js b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.delete_resource.js index 175c0b63c30..b19fd6eaf1d 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.delete_resource.js +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.delete_resource.js @@ -23,6 +23,9 @@ function main() { // [START connectgateway_v1beta1_generated_GatewayService_DeleteResource_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.get_resource.js b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.get_resource.js index 0fa94673477..76aeef2367f 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.get_resource.js +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.get_resource.js @@ -23,6 +23,9 @@ function main() { // [START connectgateway_v1beta1_generated_GatewayService_GetResource_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.patch_resource.js b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.patch_resource.js index b317496df66..3faabc9f5f2 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.patch_resource.js +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.patch_resource.js @@ -23,6 +23,9 @@ function main() { // [START connectgateway_v1beta1_generated_GatewayService_PatchResource_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.post_resource.js b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.post_resource.js index e707127b774..fb86e8d8611 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.post_resource.js +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.post_resource.js @@ -23,6 +23,9 @@ function main() { // [START connectgateway_v1beta1_generated_GatewayService_PostResource_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.put_resource.js b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.put_resource.js index 2326f91bdca..2c848e0df32 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.put_resource.js +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.put_resource.js @@ -23,6 +23,9 @@ function main() { // [START connectgateway_v1beta1_generated_GatewayService_PutResource_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/snippet_metadata.google.cloud.gkeconnect.gateway.v1beta1.json b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/snippet_metadata.google.cloud.gkeconnect.gateway.v1beta1.json index fb79593b810..8f9e2beff2b 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/snippet_metadata.google.cloud.gkeconnect.gateway.v1beta1.json +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/snippet_metadata.google.cloud.gkeconnect.gateway.v1beta1.json @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 58, + "end": 61, "type": "FULL" } ], @@ -70,7 +70,7 @@ "segments": [ { "start": 25, - "end": 58, + "end": 61, "type": "FULL" } ], @@ -118,7 +118,7 @@ "segments": [ { "start": 25, - "end": 58, + "end": 61, "type": "FULL" } ], @@ -166,7 +166,7 @@ "segments": [ { "start": 25, - "end": 58, + "end": 61, "type": "FULL" } ], @@ -214,7 +214,7 @@ "segments": [ { "start": 25, - "end": 58, + "end": 61, "type": "FULL" } ], diff --git a/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts b/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts index de9002a8508..457e1183cf6 100644 --- a/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts +++ b/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts @@ -229,7 +229,8 @@ export class GatewayServiceClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; diff --git a/packages/google-cloud-gkeconnect-gateway/test/gapic_gateway_service_v1beta1.ts b/packages/google-cloud-gkeconnect-gateway/test/gapic_gateway_service_v1beta1.ts index 41665ef55d6..266d9d76a11 100644 --- a/packages/google-cloud-gkeconnect-gateway/test/gapic_gateway_service_v1beta1.ts +++ b/packages/google-cloud-gkeconnect-gateway/test/gapic_gateway_service_v1beta1.ts @@ -50,101 +50,103 @@ function stubSimpleCallWithCallback( } describe('v1beta1.GatewayServiceClient', () => { - it('has servicePath', () => { - const servicePath = - gatewayserviceModule.v1beta1.GatewayServiceClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - gatewayserviceModule.v1beta1.GatewayServiceClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = gatewayserviceModule.v1beta1.GatewayServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new gatewayserviceModule.v1beta1.GatewayServiceClient(); - assert(client); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + gatewayserviceModule.v1beta1.GatewayServiceClient.servicePath; + assert(servicePath); + }); - it('should create a client with gRPC fallback', () => { - const client = new gatewayserviceModule.v1beta1.GatewayServiceClient({ - fallback: true, + it('has apiEndpoint', () => { + const apiEndpoint = + gatewayserviceModule.v1beta1.GatewayServiceClient.apiEndpoint; + assert(apiEndpoint); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new gatewayserviceModule.v1beta1.GatewayServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has port', () => { + const port = gatewayserviceModule.v1beta1.GatewayServiceClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert.strictEqual(client.gatewayServiceStub, undefined); - await client.initialize(); - assert(client.gatewayServiceStub); - }); - it('has close method for the initialized client', done => { - const client = new gatewayserviceModule.v1beta1.GatewayServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new gatewayserviceModule.v1beta1.GatewayServiceClient(); + assert(client); }); - client.initialize(); - assert(client.gatewayServiceStub); - client.close().then(() => { - done(); + + it('should create a client with gRPC fallback', () => { + const client = new gatewayserviceModule.v1beta1.GatewayServiceClient({ + fallback: true, + }); + assert(client); }); - }); - it('has close method for the non-initialized client', done => { - const client = new gatewayserviceModule.v1beta1.GatewayServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has initialize method and supports deferred initialization', async () => { + const client = new gatewayserviceModule.v1beta1.GatewayServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.gatewayServiceStub, undefined); + await client.initialize(); + assert(client.gatewayServiceStub); }); - assert.strictEqual(client.gatewayServiceStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the initialized client', done => { + const client = new gatewayserviceModule.v1beta1.GatewayServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.gatewayServiceStub); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new gatewayserviceModule.v1beta1.GatewayServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = new gatewayserviceModule.v1beta1.GatewayServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.gatewayServiceStub, undefined); + client.close().then(() => { + done(); + }); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new gatewayserviceModule.v1beta1.GatewayServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new gatewayserviceModule.v1beta1.GatewayServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new gatewayserviceModule.v1beta1.GatewayServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('getResource', () => { From 12c92b3c0eee5b0ce16362380c76407717e019c2 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 23 Aug 2022 00:14:18 +0000 Subject: [PATCH 214/254] fix: better support for fallback mode (#135) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 468790263 Source-Link: https://github.com/googleapis/googleapis/commit/873ab456273d105245df0fb82a6c17a814553b80 Source-Link: https://github.com/googleapis/googleapis-gen/commit/cb6f37aeff2a3472e40a7bbace8c67d75e24bee5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2I2ZjM3YWVmZjJhMzQ3MmU0MGE3YmJhY2U4YzY3ZDc1ZTI0YmVlNSJ9 --- .../v1/iam_checker.troubleshoot_iam_policy.js | 3 + ....google.cloud.policytroubleshooter.v1.json | 2 +- .../src/v1/iam_checker_client.ts | 3 +- .../test/gapic_iam_checker_v1.ts | 156 +++++++++--------- 4 files changed, 85 insertions(+), 79 deletions(-) diff --git a/packages/google-cloud-policytroubleshooter/samples/generated/v1/iam_checker.troubleshoot_iam_policy.js b/packages/google-cloud-policytroubleshooter/samples/generated/v1/iam_checker.troubleshoot_iam_policy.js index 6206ea3e548..98d3a10511f 100644 --- a/packages/google-cloud-policytroubleshooter/samples/generated/v1/iam_checker.troubleshoot_iam_policy.js +++ b/packages/google-cloud-policytroubleshooter/samples/generated/v1/iam_checker.troubleshoot_iam_policy.js @@ -23,6 +23,9 @@ function main() { // [START policytroubleshooter_v1_generated_IamChecker_TroubleshootIamPolicy_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata.google.cloud.policytroubleshooter.v1.json b/packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata.google.cloud.policytroubleshooter.v1.json index c9a784b0461..c65ba730dcf 100644 --- a/packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata.google.cloud.policytroubleshooter.v1.json +++ b/packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata.google.cloud.policytroubleshooter.v1.json @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], diff --git a/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts b/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts index 6bae2a69b6b..cdb30992b86 100644 --- a/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts +++ b/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts @@ -220,7 +220,8 @@ export class IamCheckerClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; diff --git a/packages/google-cloud-policytroubleshooter/test/gapic_iam_checker_v1.ts b/packages/google-cloud-policytroubleshooter/test/gapic_iam_checker_v1.ts index 884da56d4fb..a36c5c5c180 100644 --- a/packages/google-cloud-policytroubleshooter/test/gapic_iam_checker_v1.ts +++ b/packages/google-cloud-policytroubleshooter/test/gapic_iam_checker_v1.ts @@ -50,99 +50,101 @@ function stubSimpleCallWithCallback( } describe('v1.IamCheckerClient', () => { - it('has servicePath', () => { - const servicePath = iamcheckerModule.v1.IamCheckerClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = iamcheckerModule.v1.IamCheckerClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = iamcheckerModule.v1.IamCheckerClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new iamcheckerModule.v1.IamCheckerClient(); - assert(client); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = iamcheckerModule.v1.IamCheckerClient.servicePath; + assert(servicePath); + }); - it('should create a client with gRPC fallback', () => { - const client = new iamcheckerModule.v1.IamCheckerClient({ - fallback: true, + it('has apiEndpoint', () => { + const apiEndpoint = iamcheckerModule.v1.IamCheckerClient.apiEndpoint; + assert(apiEndpoint); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new iamcheckerModule.v1.IamCheckerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has port', () => { + const port = iamcheckerModule.v1.IamCheckerClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert.strictEqual(client.iamCheckerStub, undefined); - await client.initialize(); - assert(client.iamCheckerStub); - }); - it('has close method for the initialized client', done => { - const client = new iamcheckerModule.v1.IamCheckerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new iamcheckerModule.v1.IamCheckerClient(); + assert(client); }); - client.initialize(); - assert(client.iamCheckerStub); - client.close().then(() => { - done(); + + it('should create a client with gRPC fallback', () => { + const client = new iamcheckerModule.v1.IamCheckerClient({ + fallback: true, + }); + assert(client); }); - }); - it('has close method for the non-initialized client', done => { - const client = new iamcheckerModule.v1.IamCheckerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has initialize method and supports deferred initialization', async () => { + const client = new iamcheckerModule.v1.IamCheckerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.iamCheckerStub, undefined); + await client.initialize(); + assert(client.iamCheckerStub); }); - assert.strictEqual(client.iamCheckerStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the initialized client', done => { + const client = new iamcheckerModule.v1.IamCheckerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.iamCheckerStub); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new iamcheckerModule.v1.IamCheckerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = new iamcheckerModule.v1.IamCheckerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.iamCheckerStub, undefined); + client.close().then(() => { + done(); + }); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new iamcheckerModule.v1.IamCheckerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new iamcheckerModule.v1.IamCheckerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new iamcheckerModule.v1.IamCheckerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('troubleshootIamPolicy', () => { From 6fadfbff2f58b32f58a97d222008126f08122464 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 23 Aug 2022 00:48:15 +0000 Subject: [PATCH 215/254] fix: change import long to require (#99) Source-Link: https://github.com/googleapis/synthtool/commit/d229a1258999f599a90a9b674a1c5541e00db588 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:74ab2b3c71ef27e6d8b69b1d0a0c9d31447777b79ac3cd4be82c265b45f37e5e --- .../google-cloud-shell/protos/protos.d.ts | 491 ++- packages/google-cloud-shell/protos/protos.js | 2792 ++++++++++++----- .../google-cloud-shell/protos/protos.json | 24 + 3 files changed, 2529 insertions(+), 778 deletions(-) diff --git a/packages/google-cloud-shell/protos/protos.d.ts b/packages/google-cloud-shell/protos/protos.d.ts index 0760a29a7f1..0b6eeba4b71 100644 --- a/packages/google-cloud-shell/protos/protos.d.ts +++ b/packages/google-cloud-shell/protos/protos.d.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import * as Long from "long"; +import Long = require("long"); import {protobuf as $protobuf} from "google-gax"; /** Namespace google. */ export namespace google { @@ -120,35 +120,35 @@ export namespace google { namespace CloudShellService { /** - * Callback as used by {@link google.cloud.shell.v1.CloudShellService#getEnvironment}. + * Callback as used by {@link google.cloud.shell.v1.CloudShellService|getEnvironment}. * @param error Error, if any * @param [response] Environment */ type GetEnvironmentCallback = (error: (Error|null), response?: google.cloud.shell.v1.Environment) => void; /** - * Callback as used by {@link google.cloud.shell.v1.CloudShellService#startEnvironment}. + * Callback as used by {@link google.cloud.shell.v1.CloudShellService|startEnvironment}. * @param error Error, if any * @param [response] Operation */ type StartEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.shell.v1.CloudShellService#authorizeEnvironment}. + * Callback as used by {@link google.cloud.shell.v1.CloudShellService|authorizeEnvironment}. * @param error Error, if any * @param [response] Operation */ type AuthorizeEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.shell.v1.CloudShellService#addPublicKey}. + * Callback as used by {@link google.cloud.shell.v1.CloudShellService|addPublicKey}. * @param error Error, if any * @param [response] Operation */ type AddPublicKeyCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.shell.v1.CloudShellService#removePublicKey}. + * Callback as used by {@link google.cloud.shell.v1.CloudShellService|removePublicKey}. * @param error Error, if any * @param [response] Operation */ @@ -291,6 +291,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Environment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Environment { @@ -393,6 +400,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetEnvironmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateEnvironmentMetadata. */ @@ -477,6 +491,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateEnvironmentMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteEnvironmentMetadata. */ @@ -561,6 +582,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteEnvironmentMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a StartEnvironmentRequest. */ @@ -663,6 +691,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StartEnvironmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AuthorizeEnvironmentRequest. */ @@ -771,6 +806,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuthorizeEnvironmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AuthorizeEnvironmentResponse. */ @@ -855,6 +897,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuthorizeEnvironmentResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AuthorizeEnvironmentMetadata. */ @@ -939,6 +988,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuthorizeEnvironmentMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a StartEnvironmentMetadata. */ @@ -1029,6 +1085,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StartEnvironmentMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace StartEnvironmentMetadata { @@ -1131,6 +1194,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StartEnvironmentResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AddPublicKeyRequest. */ @@ -1227,6 +1297,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddPublicKeyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AddPublicKeyResponse. */ @@ -1317,6 +1394,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddPublicKeyResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AddPublicKeyMetadata. */ @@ -1401,6 +1485,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddPublicKeyMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a RemovePublicKeyRequest. */ @@ -1497,6 +1588,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RemovePublicKeyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a RemovePublicKeyResponse. */ @@ -1581,6 +1679,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RemovePublicKeyResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a RemovePublicKeyMetadata. */ @@ -1665,6 +1770,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RemovePublicKeyMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CloudShellErrorDetails. */ @@ -1755,6 +1867,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudShellErrorDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace CloudShellErrorDetails { @@ -1869,6 +1988,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a HttpRule. */ @@ -2016,6 +2142,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CustomHttpPattern. */ @@ -2112,6 +2245,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** FieldBehavior enum. */ @@ -2250,6 +2390,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ResourceDescriptor { @@ -2362,6 +2509,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -2456,6 +2610,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FileDescriptorProto. */ @@ -2496,6 +2657,9 @@ export namespace google { /** FileDescriptorProto syntax */ syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (string|null); } /** Represents a FileDescriptorProto. */ @@ -2543,6 +2707,9 @@ export namespace google { /** FileDescriptorProto syntax. */ public syntax: string; + /** FileDescriptorProto edition. */ + public edition: string; + /** * Creates a new FileDescriptorProto instance using the specified properties. * @param [properties] Properties to set @@ -2612,6 +2779,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DescriptorProto. */ @@ -2756,6 +2930,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace DescriptorProto { @@ -2860,6 +3041,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ReservedRange. */ @@ -2956,6 +3144,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -3047,6 +3242,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FieldDescriptorProto. */ @@ -3197,6 +3399,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FieldDescriptorProto { @@ -3325,6 +3534,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EnumDescriptorProto. */ @@ -3439,6 +3655,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace EnumDescriptorProto { @@ -3537,6 +3760,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -3640,6 +3870,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ServiceDescriptorProto. */ @@ -3742,6 +3979,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MethodDescriptorProto. */ @@ -3862,6 +4106,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FileOptions. */ @@ -4075,6 +4326,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FileOptions { @@ -4202,6 +4460,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FieldOptions. */ @@ -4219,6 +4484,9 @@ export namespace google { /** FieldOptions lazy */ lazy?: (boolean|null); + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + /** FieldOptions deprecated */ deprecated?: (boolean|null); @@ -4256,6 +4524,9 @@ export namespace google { /** FieldOptions lazy. */ public lazy: boolean; + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + /** FieldOptions deprecated. */ public deprecated: boolean; @@ -4334,6 +4605,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FieldOptions { @@ -4441,6 +4719,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EnumOptions. */ @@ -4543,6 +4828,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EnumValueOptions. */ @@ -4639,6 +4931,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ServiceOptions. */ @@ -4741,6 +5040,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MethodOptions. */ @@ -4852,6 +5158,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace MethodOptions { @@ -4988,6 +5301,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace UninterpretedOption { @@ -5086,6 +5406,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -5177,6 +5504,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace SourceCodeInfo { @@ -5293,6 +5627,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -5384,6 +5725,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace GeneratedCodeInfo { @@ -5402,6 +5750,9 @@ export namespace google { /** Annotation end */ end?: (number|null); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); } /** Represents an Annotation. */ @@ -5425,6 +5776,9 @@ export namespace google { /** Annotation end. */ public end: number; + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + /** * Creates a new Annotation instance using the specified properties. * @param [properties] Properties to set @@ -5494,6 +5848,23 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } } } @@ -5591,6 +5962,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Any + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Duration. */ @@ -5687,6 +6065,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Empty. */ @@ -5771,6 +6156,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FieldMask. */ @@ -5861,6 +6253,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldMask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Timestamp. */ @@ -5957,6 +6356,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -6057,35 +6463,35 @@ export namespace google { namespace Operations { /** - * Callback as used by {@link google.longrunning.Operations#listOperations}. + * Callback as used by {@link google.longrunning.Operations|listOperations}. * @param error Error, if any * @param [response] ListOperationsResponse */ type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; /** - * Callback as used by {@link google.longrunning.Operations#getOperation}. + * Callback as used by {@link google.longrunning.Operations|getOperation}. * @param error Error, if any * @param [response] Operation */ type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.longrunning.Operations#deleteOperation}. + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. * @param error Error, if any * @param [response] Empty */ type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.longrunning.Operations#cancelOperation}. + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. * @param error Error, if any * @param [response] Empty */ type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.longrunning.Operations#waitOperation}. + * Callback as used by {@link google.longrunning.Operations|waitOperation}. * @param error Error, if any * @param [response] Operation */ @@ -6207,6 +6613,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Operation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetOperationRequest. */ @@ -6297,6 +6710,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListOperationsRequest. */ @@ -6405,6 +6825,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListOperationsResponse. */ @@ -6501,6 +6928,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CancelOperationRequest. */ @@ -6591,6 +7025,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CancelOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteOperationRequest. */ @@ -6681,6 +7122,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WaitOperationRequest. */ @@ -6777,6 +7225,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WaitOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an OperationInfo. */ @@ -6873,6 +7328,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -6979,6 +7441,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Status + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } } diff --git a/packages/google-cloud-shell/protos/protos.js b/packages/google-cloud-shell/protos/protos.js index d35dc7118f0..9abb3be7a8b 100644 --- a/packages/google-cloud-shell/protos/protos.js +++ b/packages/google-cloud-shell/protos/protos.js @@ -99,7 +99,7 @@ }; /** - * Callback as used by {@link google.cloud.shell.v1.CloudShellService#getEnvironment}. + * Callback as used by {@link google.cloud.shell.v1.CloudShellService|getEnvironment}. * @memberof google.cloud.shell.v1.CloudShellService * @typedef GetEnvironmentCallback * @type {function} @@ -132,7 +132,7 @@ */ /** - * Callback as used by {@link google.cloud.shell.v1.CloudShellService#startEnvironment}. + * Callback as used by {@link google.cloud.shell.v1.CloudShellService|startEnvironment}. * @memberof google.cloud.shell.v1.CloudShellService * @typedef StartEnvironmentCallback * @type {function} @@ -165,7 +165,7 @@ */ /** - * Callback as used by {@link google.cloud.shell.v1.CloudShellService#authorizeEnvironment}. + * Callback as used by {@link google.cloud.shell.v1.CloudShellService|authorizeEnvironment}. * @memberof google.cloud.shell.v1.CloudShellService * @typedef AuthorizeEnvironmentCallback * @type {function} @@ -198,7 +198,7 @@ */ /** - * Callback as used by {@link google.cloud.shell.v1.CloudShellService#addPublicKey}. + * Callback as used by {@link google.cloud.shell.v1.CloudShellService|addPublicKey}. * @memberof google.cloud.shell.v1.CloudShellService * @typedef AddPublicKeyCallback * @type {function} @@ -231,7 +231,7 @@ */ /** - * Callback as used by {@link google.cloud.shell.v1.CloudShellService#removePublicKey}. + * Callback as used by {@link google.cloud.shell.v1.CloudShellService|removePublicKey}. * @memberof google.cloud.shell.v1.CloudShellService * @typedef RemovePublicKeyCallback * @type {function} @@ -448,35 +448,44 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.id = reader.string(); - break; - case 3: - message.dockerImage = reader.string(); - break; - case 4: - message.state = reader.int32(); - break; - case 12: - message.webHost = reader.string(); - break; - case 5: - message.sshUsername = reader.string(); - break; - case 6: - message.sshHost = reader.string(); - break; - case 7: - message.sshPort = reader.int32(); - break; - case 8: - if (!(message.publicKeys && message.publicKeys.length)) - message.publicKeys = []; - message.publicKeys.push(reader.string()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.id = reader.string(); + break; + } + case 3: { + message.dockerImage = reader.string(); + break; + } + case 4: { + message.state = reader.int32(); + break; + } + case 12: { + message.webHost = reader.string(); + break; + } + case 5: { + message.sshUsername = reader.string(); + break; + } + case 6: { + message.sshHost = reader.string(); + break; + } + case 7: { + message.sshPort = reader.int32(); + break; + } + case 8: { + if (!(message.publicKeys && message.publicKeys.length)) + message.publicKeys = []; + message.publicKeys.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -672,6 +681,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Environment + * @function getTypeUrl + * @memberof google.cloud.shell.v1.Environment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Environment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.shell.v1.Environment"; + }; + /** * State enum. * @name google.cloud.shell.v1.Environment.State @@ -787,9 +811,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -879,6 +904,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetEnvironmentRequest + * @function getTypeUrl + * @memberof google.cloud.shell.v1.GetEnvironmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.shell.v1.GetEnvironmentRequest"; + }; + return GetEnvironmentRequest; })(); @@ -1039,6 +1079,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateEnvironmentMetadata + * @function getTypeUrl + * @memberof google.cloud.shell.v1.CreateEnvironmentMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateEnvironmentMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.shell.v1.CreateEnvironmentMetadata"; + }; + return CreateEnvironmentMetadata; })(); @@ -1199,6 +1254,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteEnvironmentMetadata + * @function getTypeUrl + * @memberof google.cloud.shell.v1.DeleteEnvironmentMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteEnvironmentMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.shell.v1.DeleteEnvironmentMetadata"; + }; + return DeleteEnvironmentMetadata; })(); @@ -1318,17 +1388,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.accessToken = reader.string(); - break; - case 3: - if (!(message.publicKeys && message.publicKeys.length)) - message.publicKeys = []; - message.publicKeys.push(reader.string()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.accessToken = reader.string(); + break; + } + case 3: { + if (!(message.publicKeys && message.publicKeys.length)) + message.publicKeys = []; + message.publicKeys.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -1448,6 +1521,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for StartEnvironmentRequest + * @function getTypeUrl + * @memberof google.cloud.shell.v1.StartEnvironmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StartEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.shell.v1.StartEnvironmentRequest"; + }; + return StartEnvironmentRequest; })(); @@ -1576,18 +1664,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.accessToken = reader.string(); - break; - case 4: - message.idToken = reader.string(); - break; - case 3: - message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.accessToken = reader.string(); + break; + } + case 4: { + message.idToken = reader.string(); + break; + } + case 3: { + message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -1707,6 +1799,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AuthorizeEnvironmentRequest + * @function getTypeUrl + * @memberof google.cloud.shell.v1.AuthorizeEnvironmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuthorizeEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.shell.v1.AuthorizeEnvironmentRequest"; + }; + return AuthorizeEnvironmentRequest; })(); @@ -1867,6 +1974,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AuthorizeEnvironmentResponse + * @function getTypeUrl + * @memberof google.cloud.shell.v1.AuthorizeEnvironmentResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuthorizeEnvironmentResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.shell.v1.AuthorizeEnvironmentResponse"; + }; + return AuthorizeEnvironmentResponse; })(); @@ -2027,6 +2149,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AuthorizeEnvironmentMetadata + * @function getTypeUrl + * @memberof google.cloud.shell.v1.AuthorizeEnvironmentMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuthorizeEnvironmentMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.shell.v1.AuthorizeEnvironmentMetadata"; + }; + return AuthorizeEnvironmentMetadata; })(); @@ -2122,9 +2259,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.state = reader.int32(); - break; + case 1: { + message.state = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -2242,6 +2380,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for StartEnvironmentMetadata + * @function getTypeUrl + * @memberof google.cloud.shell.v1.StartEnvironmentMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StartEnvironmentMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.shell.v1.StartEnvironmentMetadata"; + }; + /** * State enum. * @name google.cloud.shell.v1.StartEnvironmentMetadata.State @@ -2357,9 +2510,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.environment = $root.google.cloud.shell.v1.Environment.decode(reader, reader.uint32()); - break; + case 1: { + message.environment = $root.google.cloud.shell.v1.Environment.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -2454,6 +2608,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for StartEnvironmentResponse + * @function getTypeUrl + * @memberof google.cloud.shell.v1.StartEnvironmentResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StartEnvironmentResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.shell.v1.StartEnvironmentResponse"; + }; + return StartEnvironmentResponse; })(); @@ -2560,12 +2729,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.environment = reader.string(); - break; - case 2: - message.key = reader.string(); - break; + case 1: { + message.environment = reader.string(); + break; + } + case 2: { + message.key = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -2664,6 +2835,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AddPublicKeyRequest + * @function getTypeUrl + * @memberof google.cloud.shell.v1.AddPublicKeyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AddPublicKeyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.shell.v1.AddPublicKeyRequest"; + }; + return AddPublicKeyRequest; })(); @@ -2759,9 +2945,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; + case 1: { + message.key = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -2851,6 +3038,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AddPublicKeyResponse + * @function getTypeUrl + * @memberof google.cloud.shell.v1.AddPublicKeyResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AddPublicKeyResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.shell.v1.AddPublicKeyResponse"; + }; + return AddPublicKeyResponse; })(); @@ -3011,6 +3213,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AddPublicKeyMetadata + * @function getTypeUrl + * @memberof google.cloud.shell.v1.AddPublicKeyMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AddPublicKeyMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.shell.v1.AddPublicKeyMetadata"; + }; + return AddPublicKeyMetadata; })(); @@ -3117,12 +3334,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.environment = reader.string(); - break; - case 2: - message.key = reader.string(); - break; + case 1: { + message.environment = reader.string(); + break; + } + case 2: { + message.key = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -3221,6 +3440,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RemovePublicKeyRequest + * @function getTypeUrl + * @memberof google.cloud.shell.v1.RemovePublicKeyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RemovePublicKeyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.shell.v1.RemovePublicKeyRequest"; + }; + return RemovePublicKeyRequest; })(); @@ -3381,6 +3615,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RemovePublicKeyResponse + * @function getTypeUrl + * @memberof google.cloud.shell.v1.RemovePublicKeyResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RemovePublicKeyResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.shell.v1.RemovePublicKeyResponse"; + }; + return RemovePublicKeyResponse; })(); @@ -3541,6 +3790,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RemovePublicKeyMetadata + * @function getTypeUrl + * @memberof google.cloud.shell.v1.RemovePublicKeyMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RemovePublicKeyMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.shell.v1.RemovePublicKeyMetadata"; + }; + return RemovePublicKeyMetadata; })(); @@ -3636,9 +3900,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.code = reader.int32(); - break; + case 1: { + message.code = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -3756,6 +4021,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CloudShellErrorDetails + * @function getTypeUrl + * @memberof google.cloud.shell.v1.CloudShellErrorDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudShellErrorDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.shell.v1.CloudShellErrorDetails"; + }; + /** * CloudShellErrorCode enum. * @name google.cloud.shell.v1.CloudShellErrorDetails.CloudShellErrorCode @@ -3902,14 +4182,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -4025,6 +4307,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + return Http; })(); @@ -4235,38 +4532,48 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message["delete"] = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -4488,6 +4795,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + return HttpRule; })(); @@ -4594,12 +4916,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -4698,6 +5022,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + return CustomHttpPattern; })(); @@ -4892,36 +5231,43 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); - break; - case 3: - message.nameField = reader.string(); - break; - case 4: - message.history = reader.int32(); - break; - case 5: - message.plural = reader.string(); - break; - case 6: - message.singular = reader.string(); - break; - case 10: - if (!(message.style && message.style.length)) - message.style = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.style.push(reader.int32()); - } else - message.style.push(reader.int32()); - break; + case 1: { + message.type = reader.string(); + break; + } + case 2: { + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + } + case 3: { + message.nameField = reader.string(); + break; + } + case 4: { + message.history = reader.int32(); + break; + } + case 5: { + message.plural = reader.string(); + break; + } + case 6: { + message.singular = reader.string(); + break; + } + case 10: { + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + } default: reader.skipType(tag & 7); break; @@ -5119,6 +5465,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; + /** * History enum. * @name google.api.ResourceDescriptor.History @@ -5255,12 +5616,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.childType = reader.string(); - break; + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -5359,6 +5722,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + return ResourceReference; })(); @@ -5468,11 +5846,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -5579,6 +5958,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + return FileDescriptorSet; })(); @@ -5600,6 +5994,7 @@ * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {string|null} [edition] FileDescriptorProto edition */ /** @@ -5720,6 +6115,14 @@ */ FileDescriptorProto.prototype.syntax = ""; + /** + * FileDescriptorProto edition. + * @member {string} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = ""; + /** * Creates a new FileDescriptorProto instance using the specified properties. * @function create @@ -5775,6 +6178,8 @@ writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.edition); return writer; }; @@ -5809,66 +6214,82 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message["package"] = reader.string(); - break; - case 3: - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - case 10: - if (!(message.publicDependency && message.publicDependency.length)) - message.publicDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else message.publicDependency.push(reader.int32()); - } else - message.publicDependency.push(reader.int32()); - break; - case 11: - if (!(message.weakDependency && message.weakDependency.length)) - message.weakDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else message.weakDependency.push(reader.int32()); - } else - message.weakDependency.push(reader.int32()); - break; - case 4: - if (!(message.messageType && message.messageType.length)) - message.messageType = []; - message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 13: { + message.edition = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -5980,6 +6401,9 @@ if (message.syntax != null && message.hasOwnProperty("syntax")) if (!$util.isString(message.syntax)) return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + if (!$util.isString(message.edition)) + return "edition: string expected"; return null; }; @@ -6072,6 +6496,8 @@ } if (object.syntax != null) message.syntax = String(object.syntax); + if (object.edition != null) + message.edition = String(object.edition); return message; }; @@ -6103,6 +6529,7 @@ object.options = null; object.sourceCodeInfo = null; object.syntax = ""; + object.edition = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -6149,6 +6576,8 @@ } if (message.syntax != null && message.hasOwnProperty("syntax")) object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = message.edition; return object; }; @@ -6163,6 +6592,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + return FileDescriptorProto; })(); @@ -6373,52 +6817,62 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.nestedType && message.nestedType.length)) - message.nestedType = []; - message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.extensionRange && message.extensionRange.length)) - message.extensionRange = []; - message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - if (!(message.oneofDecl && message.oneofDecl.length)) - message.oneofDecl = []; - message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -6719,6 +7173,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + DescriptorProto.ExtensionRange = (function() { /** @@ -6833,15 +7302,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -6953,6 +7425,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + return ExtensionRange; })(); @@ -7059,12 +7546,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -7163,6 +7652,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + return ReservedRange; })(); @@ -7263,11 +7767,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -7374,6 +7879,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + return ExtensionRangeOptions; })(); @@ -7579,39 +8099,50 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3Optional = reader.bool(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -7898,6 +8429,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + /** * Type enum. * @name google.protobuf.FieldDescriptorProto.Type @@ -8066,12 +8612,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -8175,6 +8723,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + return OneofDescriptorProto; })(); @@ -8320,27 +8883,32 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -8516,6 +9084,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + EnumDescriptorProto.EnumReservedRange = (function() { /** @@ -8619,12 +9202,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -8723,6 +9308,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + return EnumReservedRange; })(); @@ -8843,15 +9443,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -8963,6 +9566,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + return EnumValueDescriptorProto; })(); @@ -9082,17 +9700,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -9222,6 +9843,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + return ServiceDescriptorProto; })(); @@ -9372,24 +10008,30 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -9525,6 +10167,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + return MethodDescriptorProto; })(); @@ -9855,76 +10512,98 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1053: - if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) - message[".google.api.resourceDefinition"] = []; - message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); - break; + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 42: { + message.phpGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -10237,6 +10916,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + /** * OptimizeMode enum. * @name google.protobuf.FileOptions.OptimizeMode @@ -10405,26 +11099,32 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1053: - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); - break; + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -10578,6 +11278,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + return MessageOptions; })(); @@ -10591,6 +11306,7 @@ * @property {boolean|null} [packed] FieldOptions packed * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy * @property {boolean|null} [deprecated] FieldOptions deprecated * @property {boolean|null} [weak] FieldOptions weak * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption @@ -10647,6 +11363,14 @@ */ FieldOptions.prototype.lazy = false; + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + /** * FieldOptions deprecated. * @member {boolean} deprecated @@ -10723,6 +11447,8 @@ writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); @@ -10768,42 +11494,55 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1052: - if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) - message[".google.api.fieldBehavior"] = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else message[".google.api.fieldBehavior"].push(reader.int32()); - } else - message[".google.api.fieldBehavior"].push(reader.int32()); - break; - case 1055: - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); - break; + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -10863,6 +11602,9 @@ if (message.lazy != null && message.hasOwnProperty("lazy")) if (typeof message.lazy !== "boolean") return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; if (message.deprecated != null && message.hasOwnProperty("deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; @@ -10948,6 +11690,8 @@ } if (object.lazy != null) message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); if (object.deprecated != null) message.deprecated = Boolean(object.deprecated); if (object.weak != null) @@ -11035,6 +11779,7 @@ object.lazy = false; object.jstype = options.enums === String ? "JS_NORMAL" : 0; object.weak = false; + object.unverifiedLazy = false; object[".google.api.resourceReference"] = null; } if (message.ctype != null && message.hasOwnProperty("ctype")) @@ -11049,6 +11794,8 @@ object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; if (message.weak != null && message.hasOwnProperty("weak")) object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -11075,6 +11822,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + /** * CType enum. * @name google.protobuf.FieldOptions.CType @@ -11204,11 +11966,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -11315,6 +12078,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + return OneofOptions; })(); @@ -11434,17 +12212,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -11569,6 +12350,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + return EnumOptions; })(); @@ -11677,14 +12473,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 1: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -11800,6 +12598,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + return EnumValueOptions; })(); @@ -11930,20 +12743,24 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1049: - message[".google.api.defaultHost"] = reader.string(); - break; - case 1050: - message[".google.api.oauthScopes"] = reader.string(); - break; + case 33: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -12076,6 +12893,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + return ServiceOptions; })(); @@ -12230,28 +13062,34 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 72295728: - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); - break; - case 1051: - if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) - message[".google.api.methodSignature"] = []; - message[".google.api.methodSignature"].push(reader.string()); - break; - case 1049: - message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); - break; + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } + case 1049: { + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -12441,6 +13279,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + /** * IdempotencyLevel enum. * @name google.protobuf.MethodOptions.IdempotencyLevel @@ -12620,29 +13473,36 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = reader.uint64(); - break; - case 5: - message.negativeIntValue = reader.int64(); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + } + case 3: { + message.identifierValue = reader.string(); + break; + } + case 4: { + message.positiveIntValue = reader.uint64(); + break; + } + case 5: { + message.negativeIntValue = reader.int64(); + break; + } + case 6: { + message.doubleValue = reader.double(); + break; + } + case 7: { + message.stringValue = reader.bytes(); + break; + } + case 8: { + message.aggregateValue = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -12755,7 +13615,7 @@ if (object.stringValue != null) if (typeof object.stringValue === "string") $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); - else if (object.stringValue.length) + else if (object.stringValue.length >= 0) message.stringValue = object.stringValue; if (object.aggregateValue != null) message.aggregateValue = String(object.aggregateValue); @@ -12836,6 +13696,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + UninterpretedOption.NamePart = (function() { /** @@ -12937,12 +13812,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -13043,6 +13920,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + return NamePart; })(); @@ -13143,11 +14035,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -13254,6 +14147,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + SourceCodeInfo.Location = (function() { /** @@ -13402,37 +14310,42 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - case 2: - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else message.span.push(reader.int32()); - } else - message.span.push(reader.int32()); - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) - message.leadingDetachedComments = []; - message.leadingDetachedComments.push(reader.string()); - break; + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -13593,6 +14506,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + return Location; })(); @@ -13693,11 +14621,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.annotation && message.annotation.length)) - message.annotation = []; - message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -13804,6 +14733,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + GeneratedCodeInfo.Annotation = (function() { /** @@ -13814,6 +14758,7 @@ * @property {string|null} [sourceFile] Annotation sourceFile * @property {number|null} [begin] Annotation begin * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic */ /** @@ -13864,6 +14809,14 @@ */ Annotation.prototype.end = 0; + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + /** * Creates a new Annotation instance using the specified properties. * @function create @@ -13900,6 +14853,8 @@ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); if (message.end != null && Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); return writer; }; @@ -13934,25 +14889,33 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -14004,6 +14967,15 @@ if (message.end != null && message.hasOwnProperty("end")) if (!$util.isInteger(message.end)) return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -14032,6 +15004,20 @@ message.begin = object.begin | 0; if (object.end != null) message.end = object.end | 0; + switch (object.semantic) { + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } return message; }; @@ -14054,6 +15040,7 @@ object.sourceFile = ""; object.begin = 0; object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; } if (message.path && message.path.length) { object.path = []; @@ -14066,6 +15053,8 @@ object.begin = message.begin; if (message.end != null && message.hasOwnProperty("end")) object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; return object; }; @@ -14080,6 +15069,37 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + return Annotation; })(); @@ -14189,12 +15209,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type_url = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; + case 1: { + message.type_url = reader.string(); + break; + } + case 2: { + message.value = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -14256,7 +15278,7 @@ if (object.value != null) if (typeof object.value === "string") $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) + else if (object.value.length >= 0) message.value = object.value; return message; }; @@ -14302,6 +15324,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Any + * @function getTypeUrl + * @memberof google.protobuf.Any + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Any"; + }; + return Any; })(); @@ -14408,12 +15445,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.seconds = reader.int64(); - break; - case 2: - message.nanos = reader.int32(); - break; + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -14526,6 +15565,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + return Duration; })(); @@ -14686,6 +15740,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Empty + * @function getTypeUrl + * @memberof google.protobuf.Empty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; + return Empty; })(); @@ -14783,11 +15852,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); - break; + case 1: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -14889,6 +15959,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FieldMask + * @function getTypeUrl + * @memberof google.protobuf.FieldMask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldMask"; + }; + return FieldMask; })(); @@ -14995,12 +16080,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.seconds = reader.int64(); - break; - case 2: - message.nanos = reader.int32(); - break; + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -15113,6 +16200,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + return Timestamp; })(); @@ -15161,7 +16263,7 @@ }; /** - * Callback as used by {@link google.longrunning.Operations#listOperations}. + * Callback as used by {@link google.longrunning.Operations|listOperations}. * @memberof google.longrunning.Operations * @typedef ListOperationsCallback * @type {function} @@ -15194,7 +16296,7 @@ */ /** - * Callback as used by {@link google.longrunning.Operations#getOperation}. + * Callback as used by {@link google.longrunning.Operations|getOperation}. * @memberof google.longrunning.Operations * @typedef GetOperationCallback * @type {function} @@ -15227,7 +16329,7 @@ */ /** - * Callback as used by {@link google.longrunning.Operations#deleteOperation}. + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. * @memberof google.longrunning.Operations * @typedef DeleteOperationCallback * @type {function} @@ -15260,7 +16362,7 @@ */ /** - * Callback as used by {@link google.longrunning.Operations#cancelOperation}. + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. * @memberof google.longrunning.Operations * @typedef CancelOperationCallback * @type {function} @@ -15293,7 +16395,7 @@ */ /** - * Callback as used by {@link google.longrunning.Operations#waitOperation}. + * Callback as used by {@link google.longrunning.Operations|waitOperation}. * @memberof google.longrunning.Operations * @typedef WaitOperationCallback * @type {function} @@ -15478,21 +16580,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 3: - message.done = reader.bool(); - break; - case 4: - message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - case 5: - message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } + case 3: { + message.done = reader.bool(); + break; + } + case 4: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 5: { + message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -15643,6 +16750,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Operation + * @function getTypeUrl + * @memberof google.longrunning.Operation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.Operation"; + }; + return Operation; })(); @@ -15738,9 +16860,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -15830,6 +16953,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.GetOperationRequest"; + }; + return GetOperationRequest; })(); @@ -15958,18 +17096,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: - message.name = reader.string(); - break; - case 1: - message.filter = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; + case 4: { + message.name = reader.string(); + break; + } + case 1: { + message.filter = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -16084,6 +17226,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListOperationsRequest + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsRequest"; + }; + return ListOperationsRequest; })(); @@ -16192,14 +17349,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.operations && message.operations.length)) - message.operations = []; - message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -16315,6 +17474,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListOperationsResponse + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsResponse"; + }; + return ListOperationsResponse; })(); @@ -16410,9 +17584,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -16502,6 +17677,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CancelOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.CancelOperationRequest"; + }; + return CancelOperationRequest; })(); @@ -16597,9 +17787,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -16689,6 +17880,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.DeleteOperationRequest"; + }; + return DeleteOperationRequest; })(); @@ -16795,12 +18001,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -16904,6 +18112,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WaitOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.WaitOperationRequest"; + }; + return WaitOperationRequest; })(); @@ -17010,12 +18233,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.responseType = reader.string(); - break; - case 2: - message.metadataType = reader.string(); - break; + case 1: { + message.responseType = reader.string(); + break; + } + case 2: { + message.metadataType = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -17114,6 +18339,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OperationInfo + * @function getTypeUrl + * @memberof google.longrunning.OperationInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.OperationInfo"; + }; + return OperationInfo; })(); @@ -17245,17 +18485,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.code = reader.int32(); - break; - case 2: - message.message = reader.string(); - break; - case 3: - if (!(message.details && message.details.length)) - message.details = []; - message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); - break; + case 1: { + message.code = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -17380,6 +18623,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Status + * @function getTypeUrl + * @memberof google.rpc.Status + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.Status"; + }; + return Status; })(); diff --git a/packages/google-cloud-shell/protos/protos.json b/packages/google-cloud-shell/protos/protos.json index 956ddd412b1..e614cad6cc9 100644 --- a/packages/google-cloud-shell/protos/protos.json +++ b/packages/google-cloud-shell/protos/protos.json @@ -665,6 +665,10 @@ "syntax": { "type": "string", "id": 12 + }, + "edition": { + "type": "string", + "id": 13 } } }, @@ -1193,6 +1197,13 @@ "default": false } }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, "deprecated": { "type": "bool", "id": 3, @@ -1485,6 +1496,19 @@ "end": { "type": "int32", "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } } } } From 883dd88d9c95ec3a2baf4f5b36dc1b2fa6548fee Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 23 Aug 2022 00:52:28 +0000 Subject: [PATCH 216/254] fix: change import long to require (#45) Source-Link: https://github.com/googleapis/synthtool/commit/d229a1258999f599a90a9b674a1c5541e00db588 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:74ab2b3c71ef27e6d8b69b1d0a0c9d31447777b79ac3cd4be82c265b45f37e5e --- .../google-cloud-dataplex/protos/protos.d.ts | 1317 ++- .../google-cloud-dataplex/protos/protos.js | 7823 ++++++++++++----- .../google-cloud-dataplex/protos/protos.json | 24 + 3 files changed, 6831 insertions(+), 2333 deletions(-) diff --git a/packages/google-cloud-dataplex/protos/protos.d.ts b/packages/google-cloud-dataplex/protos/protos.d.ts index b33ec252878..0e10fb32aae 100644 --- a/packages/google-cloud-dataplex/protos/protos.d.ts +++ b/packages/google-cloud-dataplex/protos/protos.d.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import * as Long from "long"; +import Long = require("long"); import {protobuf as $protobuf} from "google-gax"; /** Namespace google. */ export namespace google { @@ -180,6 +180,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Environment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Environment { @@ -284,6 +291,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InfrastructureSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace InfrastructureSpec { @@ -388,6 +402,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ComputeResources + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an OsImageRuntime. */ @@ -496,6 +517,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OsImageRuntime + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -593,6 +621,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SessionSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SessionStatus. */ @@ -683,6 +718,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SessionStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Endpoints. */ @@ -779,6 +821,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Endpoints + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -930,6 +979,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Content + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Content { @@ -1022,6 +1078,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SqlScript + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace SqlScript { @@ -1121,6 +1184,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Notebook + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Notebook { @@ -1239,6 +1309,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Session + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Lake. */ @@ -1395,6 +1472,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Lake + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Lake { @@ -1487,6 +1571,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Metastore + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MetastoreStatus. */ @@ -1595,6 +1686,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetastoreStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace MetastoreStatus { @@ -1710,6 +1808,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AssetStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Zone. */ @@ -1866,6 +1971,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Zone + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Zone { @@ -1965,6 +2077,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ResourceSpec { @@ -2098,6 +2217,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiscoverySpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace DiscoverySpec { @@ -2208,6 +2334,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CsvOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a JsonOptions. */ @@ -2304,6 +2437,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JsonOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } } @@ -2489,6 +2629,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Action + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Action { @@ -2583,6 +2730,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MissingResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UnauthorizedResource. */ @@ -2667,6 +2821,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UnauthorizedResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FailedSecurityPolicyApply. */ @@ -2757,6 +2918,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FailedSecurityPolicyApply + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an InvalidDataFormat. */ @@ -2859,6 +3027,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InvalidDataFormat + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an IncompatibleDataSchema. */ @@ -2973,6 +3148,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IncompatibleDataSchema + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace IncompatibleDataSchema { @@ -3073,6 +3255,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InvalidDataPartition + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace InvalidDataPartition { @@ -3167,6 +3356,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MissingData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an InvalidDataOrganization. */ @@ -3251,6 +3447,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InvalidDataOrganization + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -3414,6 +3617,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Asset + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Asset { @@ -3518,6 +3728,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SecurityStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace SecurityStatus { @@ -3652,6 +3869,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiscoverySpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace DiscoverySpec { @@ -3762,6 +3986,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CsvOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a JsonOptions. */ @@ -3858,6 +4089,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JsonOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -3955,6 +4193,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ResourceSpec { @@ -4067,6 +4312,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ResourceStatus { @@ -4197,6 +4449,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiscoveryStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace DiscoveryStatus { @@ -4316,6 +4575,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Stats + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } } @@ -4423,35 +4689,35 @@ export namespace google { namespace ContentService { /** - * Callback as used by {@link google.cloud.dataplex.v1.ContentService#createContent}. + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|createContent}. * @param error Error, if any * @param [response] Content */ type CreateContentCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Content) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.ContentService#updateContent}. + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|updateContent}. * @param error Error, if any * @param [response] Content */ type UpdateContentCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Content) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.ContentService#deleteContent}. + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|deleteContent}. * @param error Error, if any * @param [response] Empty */ type DeleteContentCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.ContentService#getContent}. + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|getContent}. * @param error Error, if any * @param [response] Content */ type GetContentCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Content) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.ContentService#listContent}. + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|listContent}. * @param error Error, if any * @param [response] ListContentResponse */ @@ -4558,6 +4824,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateContentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateContentRequest. */ @@ -4660,6 +4933,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateContentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteContentRequest. */ @@ -4750,6 +5030,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteContentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListContentRequest. */ @@ -4858,6 +5145,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListContentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListContentResponse. */ @@ -4954,6 +5248,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListContentResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetContentRequest. */ @@ -5050,6 +5351,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetContentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace GetContentRequest { @@ -5207,6 +5515,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiscoveryEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace DiscoveryEvent { @@ -5318,6 +5633,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConfigDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EntityDetails. */ @@ -5414,6 +5736,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EntityDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PartitionDetails. */ @@ -5516,6 +5845,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PartitionDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an ActionDetails. */ @@ -5606,6 +5942,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ActionDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -5745,6 +6088,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JobEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace JobEvent { @@ -5887,6 +6237,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SessionEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace SessionEvent { @@ -6017,6 +6374,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryDetail + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace QueryDetail { @@ -6180,63 +6544,63 @@ export namespace google { namespace MetadataService { /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#createEntity}. + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|createEntity}. * @param error Error, if any * @param [response] Entity */ type CreateEntityCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Entity) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#updateEntity}. + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|updateEntity}. * @param error Error, if any * @param [response] Entity */ type UpdateEntityCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Entity) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#deleteEntity}. + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|deleteEntity}. * @param error Error, if any * @param [response] Empty */ type DeleteEntityCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#getEntity}. + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|getEntity}. * @param error Error, if any * @param [response] Entity */ type GetEntityCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Entity) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#listEntities}. + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|listEntities}. * @param error Error, if any * @param [response] ListEntitiesResponse */ type ListEntitiesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListEntitiesResponse) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#createPartition}. + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|createPartition}. * @param error Error, if any * @param [response] Partition */ type CreatePartitionCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Partition) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#deletePartition}. + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|deletePartition}. * @param error Error, if any * @param [response] Empty */ type DeletePartitionCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#getPartition}. + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|getPartition}. * @param error Error, if any * @param [response] Partition */ type GetPartitionCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Partition) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#listPartitions}. + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|listPartitions}. * @param error Error, if any * @param [response] ListPartitionsResponse */ @@ -6343,6 +6707,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateEntityRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateEntityRequest. */ @@ -6439,6 +6810,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateEntityRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteEntityRequest. */ @@ -6535,6 +6913,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteEntityRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListEntitiesRequest. */ @@ -6649,6 +7034,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListEntitiesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ListEntitiesRequest { @@ -6755,6 +7147,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListEntitiesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetEntityRequest. */ @@ -6851,6 +7250,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetEntityRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace GetEntityRequest { @@ -6970,6 +7376,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPartitionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreatePartitionRequest. */ @@ -7072,6 +7485,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreatePartitionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeletePartitionRequest. */ @@ -7168,6 +7588,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeletePartitionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListPartitionsResponse. */ @@ -7264,6 +7691,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPartitionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetPartitionRequest. */ @@ -7354,6 +7788,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetPartitionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Entity. */ @@ -7534,6 +7975,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Entity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Entity { @@ -7639,6 +8087,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CompatibilityStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace CompatibilityStatus { @@ -7737,6 +8192,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Compatibility + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } } @@ -7847,6 +8309,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Partition + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Schema. */ @@ -7955,6 +8424,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Schema + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Schema { @@ -8099,6 +8575,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SchemaField + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PartitionField. */ @@ -8195,6 +8678,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PartitionField + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** PartitionStyle enum. */ @@ -8319,6 +8809,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StorageFormat + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace StorageFormat { @@ -8429,6 +8926,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CsvOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a JsonOptions. */ @@ -8519,6 +9023,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JsonOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Format enum. */ @@ -9025,224 +9536,224 @@ export namespace google { namespace DataplexService { /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createLake}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createLake}. * @param error Error, if any * @param [response] Operation */ type CreateLakeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateLake}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateLake}. * @param error Error, if any * @param [response] Operation */ type UpdateLakeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteLake}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteLake}. * @param error Error, if any * @param [response] Operation */ type DeleteLakeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listLakes}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listLakes}. * @param error Error, if any * @param [response] ListLakesResponse */ type ListLakesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListLakesResponse) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getLake}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getLake}. * @param error Error, if any * @param [response] Lake */ type GetLakeCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Lake) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listLakeActions}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listLakeActions}. * @param error Error, if any * @param [response] ListActionsResponse */ type ListLakeActionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListActionsResponse) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createZone}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createZone}. * @param error Error, if any * @param [response] Operation */ type CreateZoneCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateZone}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateZone}. * @param error Error, if any * @param [response] Operation */ type UpdateZoneCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteZone}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteZone}. * @param error Error, if any * @param [response] Operation */ type DeleteZoneCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listZones}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listZones}. * @param error Error, if any * @param [response] ListZonesResponse */ type ListZonesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListZonesResponse) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getZone}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getZone}. * @param error Error, if any * @param [response] Zone */ type GetZoneCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Zone) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listZoneActions}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listZoneActions}. * @param error Error, if any * @param [response] ListActionsResponse */ type ListZoneActionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListActionsResponse) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createAsset}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createAsset}. * @param error Error, if any * @param [response] Operation */ type CreateAssetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateAsset}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateAsset}. * @param error Error, if any * @param [response] Operation */ type UpdateAssetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteAsset}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteAsset}. * @param error Error, if any * @param [response] Operation */ type DeleteAssetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listAssets}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listAssets}. * @param error Error, if any * @param [response] ListAssetsResponse */ type ListAssetsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListAssetsResponse) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getAsset}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getAsset}. * @param error Error, if any * @param [response] Asset */ type GetAssetCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Asset) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listAssetActions}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listAssetActions}. * @param error Error, if any * @param [response] ListActionsResponse */ type ListAssetActionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListActionsResponse) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createTask}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createTask}. * @param error Error, if any * @param [response] Operation */ type CreateTaskCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateTask}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateTask}. * @param error Error, if any * @param [response] Operation */ type UpdateTaskCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteTask}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteTask}. * @param error Error, if any * @param [response] Operation */ type DeleteTaskCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listTasks}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listTasks}. * @param error Error, if any * @param [response] ListTasksResponse */ type ListTasksCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListTasksResponse) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getTask}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getTask}. * @param error Error, if any * @param [response] Task */ type GetTaskCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Task) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listJobs}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listJobs}. * @param error Error, if any * @param [response] ListJobsResponse */ type ListJobsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListJobsResponse) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getJob}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getJob}. * @param error Error, if any * @param [response] Job */ type GetJobCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Job) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#cancelJob}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|cancelJob}. * @param error Error, if any * @param [response] Empty */ type CancelJobCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createEnvironment}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createEnvironment}. * @param error Error, if any * @param [response] Operation */ type CreateEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateEnvironment}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateEnvironment}. * @param error Error, if any * @param [response] Operation */ type UpdateEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteEnvironment}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteEnvironment}. * @param error Error, if any * @param [response] Operation */ type DeleteEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listEnvironments}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listEnvironments}. * @param error Error, if any * @param [response] ListEnvironmentsResponse */ type ListEnvironmentsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListEnvironmentsResponse) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getEnvironment}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getEnvironment}. * @param error Error, if any * @param [response] Environment */ type GetEnvironmentCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Environment) => void; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listSessions}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listSessions}. * @param error Error, if any * @param [response] ListSessionsResponse */ @@ -9355,6 +9866,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateLakeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateLakeRequest. */ @@ -9457,6 +9975,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateLakeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteLakeRequest. */ @@ -9547,6 +10072,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteLakeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListLakesRequest. */ @@ -9661,6 +10193,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListLakesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListLakesResponse. */ @@ -9763,6 +10302,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListLakesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListLakeActionsRequest. */ @@ -9865,6 +10411,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListLakeActionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListActionsResponse. */ @@ -9961,6 +10514,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListActionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetLakeRequest. */ @@ -10051,6 +10611,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetLakeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateZoneRequest. */ @@ -10159,6 +10726,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateZoneRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateZoneRequest. */ @@ -10261,6 +10835,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateZoneRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteZoneRequest. */ @@ -10351,6 +10932,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteZoneRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListZonesRequest. */ @@ -10465,6 +11053,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListZonesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListZonesResponse. */ @@ -10561,7 +11156,14 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; - } + + /** + * Gets the default type url for ListZonesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } /** Properties of a ListZoneActionsRequest. */ interface IListZoneActionsRequest { @@ -10663,6 +11265,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListZoneActionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetZoneRequest. */ @@ -10753,6 +11362,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetZoneRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateAssetRequest. */ @@ -10861,6 +11477,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateAssetRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateAssetRequest. */ @@ -10963,6 +11586,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateAssetRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteAssetRequest. */ @@ -11053,6 +11683,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteAssetRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListAssetsRequest. */ @@ -11167,6 +11804,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAssetsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListAssetsResponse. */ @@ -11263,6 +11907,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAssetsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListAssetActionsRequest. */ @@ -11365,6 +12016,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAssetActionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetAssetRequest. */ @@ -11455,6 +12113,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetAssetRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an OperationMetadata. */ @@ -11581,6 +12246,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateTaskRequest. */ @@ -11689,6 +12361,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateTaskRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateTaskRequest. */ @@ -11791,6 +12470,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateTaskRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteTaskRequest. */ @@ -11881,6 +12567,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteTaskRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListTasksRequest. */ @@ -11995,6 +12688,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListTasksRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListTasksResponse. */ @@ -12097,6 +12797,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListTasksResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetTaskRequest. */ @@ -12187,6 +12894,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetTaskRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetJobRequest. */ @@ -12277,6 +12991,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetJobRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListJobsRequest. */ @@ -12379,6 +13100,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListJobsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListJobsResponse. */ @@ -12475,6 +13203,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListJobsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CancelJobRequest. */ @@ -12565,6 +13300,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CancelJobRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateEnvironmentRequest. */ @@ -12673,6 +13415,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateEnvironmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateEnvironmentRequest. */ @@ -12775,6 +13524,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateEnvironmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteEnvironmentRequest. */ @@ -12865,6 +13621,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteEnvironmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListEnvironmentsRequest. */ @@ -12979,6 +13742,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListEnvironmentsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListEnvironmentsResponse. */ @@ -13075,6 +13845,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListEnvironmentsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetEnvironmentRequest. */ @@ -13165,6 +13942,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetEnvironmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListSessionsRequest. */ @@ -13267,6 +14051,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListSessionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListSessionsResponse. */ @@ -13363,6 +14154,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListSessionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Task. */ @@ -13516,6 +14314,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Task + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Task { @@ -13629,6 +14434,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InfrastructureSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace InfrastructureSpec { @@ -13727,6 +14539,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchComputeResources + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ContainerImageRuntime. */ @@ -13829,6 +14648,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ContainerImageRuntime + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a VpcNetwork. */ @@ -13934,6 +14760,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VpcNetwork + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -14052,6 +14885,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TriggerSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace TriggerSpec { @@ -14164,6 +15004,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExecutionSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SparkTaskConfig. */ @@ -14299,6 +15146,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SparkTaskConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -14438,6 +15292,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Job + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Job { @@ -14602,6 +15463,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ResourceDescriptor { @@ -14714,6 +15582,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Http. */ @@ -14810,6 +15685,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a HttpRule. */ @@ -14957,6 +15839,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CustomHttpPattern. */ @@ -15053,6 +15942,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -15147,6 +16043,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FileDescriptorProto. */ @@ -15187,6 +16090,9 @@ export namespace google { /** FileDescriptorProto syntax */ syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (string|null); } /** Represents a FileDescriptorProto. */ @@ -15234,6 +16140,9 @@ export namespace google { /** FileDescriptorProto syntax. */ public syntax: string; + /** FileDescriptorProto edition. */ + public edition: string; + /** * Creates a new FileDescriptorProto instance using the specified properties. * @param [properties] Properties to set @@ -15303,6 +16212,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DescriptorProto. */ @@ -15447,6 +16363,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace DescriptorProto { @@ -15551,6 +16474,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ReservedRange. */ @@ -15647,6 +16577,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -15738,6 +16675,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FieldDescriptorProto. */ @@ -15888,6 +16832,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FieldDescriptorProto { @@ -16016,6 +16967,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EnumDescriptorProto. */ @@ -16130,6 +17088,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace EnumDescriptorProto { @@ -16228,6 +17193,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -16331,6 +17303,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ServiceDescriptorProto. */ @@ -16433,6 +17412,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MethodDescriptorProto. */ @@ -16553,6 +17539,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FileOptions. */ @@ -16766,6 +17759,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FileOptions { @@ -16893,6 +17893,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FieldOptions. */ @@ -16910,6 +17917,9 @@ export namespace google { /** FieldOptions lazy */ lazy?: (boolean|null); + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + /** FieldOptions deprecated */ deprecated?: (boolean|null); @@ -16947,6 +17957,9 @@ export namespace google { /** FieldOptions lazy. */ public lazy: boolean; + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + /** FieldOptions deprecated. */ public deprecated: boolean; @@ -17025,6 +18038,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FieldOptions { @@ -17132,6 +18152,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EnumOptions. */ @@ -17234,6 +18261,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EnumValueOptions. */ @@ -17330,6 +18364,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ServiceOptions. */ @@ -17432,6 +18473,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MethodOptions. */ @@ -17543,6 +18591,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace MethodOptions { @@ -17679,6 +18734,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace UninterpretedOption { @@ -17777,6 +18839,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -17868,6 +18937,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace SourceCodeInfo { @@ -17984,6 +19060,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -18075,6 +19158,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace GeneratedCodeInfo { @@ -18093,6 +19183,9 @@ export namespace google { /** Annotation end */ end?: (number|null); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); } /** Represents an Annotation. */ @@ -18116,6 +19209,9 @@ export namespace google { /** Annotation end. */ public end: number; + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + /** * Creates a new Annotation instance using the specified properties. * @param [properties] Properties to set @@ -18185,6 +19281,23 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } } } @@ -18282,6 +19395,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Timestamp. */ @@ -18378,6 +19498,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Empty. */ @@ -18462,6 +19589,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FieldMask. */ @@ -18552,6 +19686,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldMask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Any. */ @@ -18648,6 +19789,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Any + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -18748,35 +19896,35 @@ export namespace google { namespace Operations { /** - * Callback as used by {@link google.longrunning.Operations#listOperations}. + * Callback as used by {@link google.longrunning.Operations|listOperations}. * @param error Error, if any * @param [response] ListOperationsResponse */ type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; /** - * Callback as used by {@link google.longrunning.Operations#getOperation}. + * Callback as used by {@link google.longrunning.Operations|getOperation}. * @param error Error, if any * @param [response] Operation */ type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.longrunning.Operations#deleteOperation}. + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. * @param error Error, if any * @param [response] Empty */ type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.longrunning.Operations#cancelOperation}. + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. * @param error Error, if any * @param [response] Empty */ type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.longrunning.Operations#waitOperation}. + * Callback as used by {@link google.longrunning.Operations|waitOperation}. * @param error Error, if any * @param [response] Operation */ @@ -18898,6 +20046,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Operation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetOperationRequest. */ @@ -18988,6 +20143,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListOperationsRequest. */ @@ -19096,6 +20258,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListOperationsResponse. */ @@ -19192,6 +20361,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CancelOperationRequest. */ @@ -19282,6 +20458,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CancelOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteOperationRequest. */ @@ -19372,6 +20555,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WaitOperationRequest. */ @@ -19468,6 +20658,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WaitOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an OperationInfo. */ @@ -19564,6 +20761,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -19670,6 +20874,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Status + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } } diff --git a/packages/google-cloud-dataplex/protos/protos.js b/packages/google-cloud-dataplex/protos/protos.js index 64657cbeb63..a1d13ede5d9 100644 --- a/packages/google-cloud-dataplex/protos/protos.js +++ b/packages/google-cloud-dataplex/protos/protos.js @@ -281,61 +281,73 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.displayName = reader.string(); - break; - case 3: - message.uid = reader.string(); - break; - case 4: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 5: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.uid = reader.string(); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.labels[key] = value; + break; + } + case 7: { + message.description = reader.string(); + break; + } + case 8: { + message.state = reader.int32(); + break; + } + case 100: { + message.infrastructureSpec = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.decode(reader, reader.uint32()); + break; + } + case 101: { + message.sessionSpec = $root.google.cloud.dataplex.v1.Environment.SessionSpec.decode(reader, reader.uint32()); + break; + } + case 102: { + message.sessionStatus = $root.google.cloud.dataplex.v1.Environment.SessionStatus.decode(reader, reader.uint32()); + break; + } + case 200: { + message.endpoints = $root.google.cloud.dataplex.v1.Environment.Endpoints.decode(reader, reader.uint32()); + break; } - message.labels[key] = value; - break; - case 7: - message.description = reader.string(); - break; - case 8: - message.state = reader.int32(); - break; - case 100: - message.infrastructureSpec = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.decode(reader, reader.uint32()); - break; - case 101: - message.sessionSpec = $root.google.cloud.dataplex.v1.Environment.SessionSpec.decode(reader, reader.uint32()); - break; - case 102: - message.sessionStatus = $root.google.cloud.dataplex.v1.Environment.SessionStatus.decode(reader, reader.uint32()); - break; - case 200: - message.endpoints = $root.google.cloud.dataplex.v1.Environment.Endpoints.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -587,6 +599,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Environment + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Environment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Environment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Environment"; + }; + Environment.InfrastructureSpec = (function() { /** @@ -715,12 +742,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 50: - message.compute = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources.decode(reader, reader.uint32()); - break; - case 100: - message.osImage = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.decode(reader, reader.uint32()); - break; + case 50: { + message.compute = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources.decode(reader, reader.uint32()); + break; + } + case 100: { + message.osImage = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -838,6 +867,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for InfrastructureSpec + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InfrastructureSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Environment.InfrastructureSpec"; + }; + InfrastructureSpec.ComputeResources = (function() { /** @@ -952,15 +996,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.diskSizeGb = reader.int32(); - break; - case 2: - message.nodeCount = reader.int32(); - break; - case 3: - message.maxNodeCount = reader.int32(); - break; + case 1: { + message.diskSizeGb = reader.int32(); + break; + } + case 2: { + message.nodeCount = reader.int32(); + break; + } + case 3: { + message.maxNodeCount = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -1067,6 +1114,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ComputeResources + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ComputeResources.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources"; + }; + return ComputeResources; })(); @@ -1201,41 +1263,45 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.imageVersion = reader.string(); - break; - case 2: - if (!(message.javaLibraries && message.javaLibraries.length)) - message.javaLibraries = []; - message.javaLibraries.push(reader.string()); - break; - case 3: - if (!(message.pythonPackages && message.pythonPackages.length)) - message.pythonPackages = []; - message.pythonPackages.push(reader.string()); - break; - case 4: - if (message.properties === $util.emptyObject) - message.properties = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + message.imageVersion = reader.string(); + break; + } + case 2: { + if (!(message.javaLibraries && message.javaLibraries.length)) + message.javaLibraries = []; + message.javaLibraries.push(reader.string()); + break; + } + case 3: { + if (!(message.pythonPackages && message.pythonPackages.length)) + message.pythonPackages = []; + message.pythonPackages.push(reader.string()); + break; + } + case 4: { + if (message.properties === $util.emptyObject) + message.properties = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.properties[key] = value; + break; } - message.properties[key] = value; - break; default: reader.skipType(tag & 7); break; @@ -1390,6 +1456,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OsImageRuntime + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OsImageRuntime.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime"; + }; + return OsImageRuntime; })(); @@ -1499,12 +1580,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.maxIdleDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 2: - message.enableFastStartup = reader.bool(); - break; + case 1: { + message.maxIdleDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.enableFastStartup = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -1608,6 +1691,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SessionSpec + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Environment.SessionSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SessionSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Environment.SessionSpec"; + }; + return SessionSpec; })(); @@ -1703,9 +1801,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.active = reader.bool(); - break; + case 1: { + message.active = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -1795,6 +1894,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SessionStatus + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Environment.SessionStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SessionStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Environment.SessionStatus"; + }; + return SessionStatus; })(); @@ -1901,12 +2015,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.notebooks = reader.string(); - break; - case 2: - message.sql = reader.string(); - break; + case 1: { + message.notebooks = reader.string(); + break; + } + case 2: { + message.sql = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -2005,6 +2121,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Endpoints + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Environment.Endpoints + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Endpoints.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Environment.Endpoints"; + }; + return Endpoints; })(); @@ -2229,55 +2360,65 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.uid = reader.string(); - break; - case 3: - message.path = reader.string(); - break; - case 4: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 5: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.uid = reader.string(); + break; + } + case 3: { + message.path = reader.string(); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.labels[key] = value; + break; + } + case 7: { + message.description = reader.string(); + break; + } + case 9: { + message.dataText = reader.string(); + break; + } + case 100: { + message.sqlScript = $root.google.cloud.dataplex.v1.Content.SqlScript.decode(reader, reader.uint32()); + break; + } + case 101: { + message.notebook = $root.google.cloud.dataplex.v1.Content.Notebook.decode(reader, reader.uint32()); + break; } - message.labels[key] = value; - break; - case 7: - message.description = reader.string(); - break; - case 9: - message.dataText = reader.string(); - break; - case 100: - message.sqlScript = $root.google.cloud.dataplex.v1.Content.SqlScript.decode(reader, reader.uint32()); - break; - case 101: - message.notebook = $root.google.cloud.dataplex.v1.Content.Notebook.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -2492,6 +2633,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Content + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Content + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Content.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Content"; + }; + Content.SqlScript = (function() { /** @@ -2584,9 +2740,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.engine = reader.int32(); - break; + case 1: { + message.engine = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -2689,6 +2846,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SqlScript + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Content.SqlScript + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SqlScript.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Content.SqlScript"; + }; + /** * QueryEngine enum. * @name google.cloud.dataplex.v1.Content.SqlScript.QueryEngine @@ -2798,9 +2970,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.kernelType = reader.int32(); - break; + case 1: { + message.kernelType = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -2903,6 +3076,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Notebook + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Content.Notebook + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Notebook.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Content.Notebook"; + }; + /** * KernelType enum. * @name google.cloud.dataplex.v1.Content.Notebook.KernelType @@ -3048,18 +3236,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.userId = reader.string(); - break; - case 3: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 4: - message.state = reader.int32(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.userId = reader.string(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.state = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -3207,6 +3399,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Session + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Session + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Session.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Session"; + }; + return Session; })(); @@ -3425,61 +3632,73 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.displayName = reader.string(); - break; - case 3: - message.uid = reader.string(); - break; - case 4: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 5: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.uid = reader.string(); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.labels[key] = value; + break; + } + case 7: { + message.description = reader.string(); + break; + } + case 8: { + message.state = reader.int32(); + break; + } + case 9: { + message.serviceAccount = reader.string(); + break; + } + case 102: { + message.metastore = $root.google.cloud.dataplex.v1.Lake.Metastore.decode(reader, reader.uint32()); + break; + } + case 103: { + message.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.decode(reader, reader.uint32()); + break; + } + case 104: { + message.metastoreStatus = $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.decode(reader, reader.uint32()); + break; } - message.labels[key] = value; - break; - case 7: - message.description = reader.string(); - break; - case 8: - message.state = reader.int32(); - break; - case 9: - message.serviceAccount = reader.string(); - break; - case 102: - message.metastore = $root.google.cloud.dataplex.v1.Lake.Metastore.decode(reader, reader.uint32()); - break; - case 103: - message.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.decode(reader, reader.uint32()); - break; - case 104: - message.metastoreStatus = $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -3726,6 +3945,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Lake + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Lake + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Lake.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Lake"; + }; + Lake.Metastore = (function() { /** @@ -3818,9 +4052,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.service = reader.string(); - break; + case 1: { + message.service = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -3910,6 +4145,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Metastore + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Metastore.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Lake.Metastore"; + }; + return Metastore; })(); @@ -4038,18 +4288,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.state = reader.int32(); - break; - case 2: - message.message = reader.string(); - break; - case 3: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 4: - message.endpoint = reader.string(); - break; + case 1: { + message.state = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.endpoint = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -4197,6 +4451,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MetastoreStatus + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetastoreStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Lake.MetastoreStatus"; + }; + /** * State enum. * @name google.cloud.dataplex.v1.Lake.MetastoreStatus.State @@ -4337,15 +4606,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 2: - message.activeAssets = reader.int32(); - break; - case 3: - message.securityPolicyApplyingAssets = reader.int32(); - break; + case 1: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.activeAssets = reader.int32(); + break; + } + case 3: { + message.securityPolicyApplyingAssets = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -4457,6 +4729,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AssetStatus + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.AssetStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AssetStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.AssetStatus"; + }; + return AssetStatus; })(); @@ -4675,61 +4962,73 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.displayName = reader.string(); - break; - case 3: - message.uid = reader.string(); - break; - case 4: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 5: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.uid = reader.string(); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.labels[key] = value; + break; + } + case 7: { + message.description = reader.string(); + break; + } + case 8: { + message.state = reader.int32(); + break; + } + case 9: { + message.type = reader.int32(); + break; + } + case 103: { + message.discoverySpec = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.decode(reader, reader.uint32()); + break; + } + case 104: { + message.resourceSpec = $root.google.cloud.dataplex.v1.Zone.ResourceSpec.decode(reader, reader.uint32()); + break; + } + case 105: { + message.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.decode(reader, reader.uint32()); + break; } - message.labels[key] = value; - break; - case 7: - message.description = reader.string(); - break; - case 8: - message.state = reader.int32(); - break; - case 9: - message.type = reader.int32(); - break; - case 103: - message.discoverySpec = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.decode(reader, reader.uint32()); - break; - case 104: - message.resourceSpec = $root.google.cloud.dataplex.v1.Zone.ResourceSpec.decode(reader, reader.uint32()); - break; - case 105: - message.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -4994,6 +5293,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Zone + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Zone + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Zone.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Zone"; + }; + /** * Type enum. * @name google.cloud.dataplex.v1.Zone.Type @@ -5102,9 +5416,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.locationType = reader.int32(); - break; + case 1: { + message.locationType = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -5212,6 +5527,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ResourceSpec + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Zone.ResourceSpec"; + }; + /** * LocationType enum. * @name google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType @@ -5396,28 +5726,34 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.enabled = reader.bool(); - break; - case 2: - if (!(message.includePatterns && message.includePatterns.length)) - message.includePatterns = []; - message.includePatterns.push(reader.string()); - break; - case 3: - if (!(message.excludePatterns && message.excludePatterns.length)) - message.excludePatterns = []; - message.excludePatterns.push(reader.string()); - break; - case 4: - message.csvOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.decode(reader, reader.uint32()); - break; - case 5: - message.jsonOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.decode(reader, reader.uint32()); - break; - case 10: - message.schedule = reader.string(); - break; + case 1: { + message.enabled = reader.bool(); + break; + } + case 2: { + if (!(message.includePatterns && message.includePatterns.length)) + message.includePatterns = []; + message.includePatterns.push(reader.string()); + break; + } + case 3: { + if (!(message.excludePatterns && message.excludePatterns.length)) + message.excludePatterns = []; + message.excludePatterns.push(reader.string()); + break; + } + case 4: { + message.csvOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.jsonOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.decode(reader, reader.uint32()); + break; + } + case 10: { + message.schedule = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -5589,6 +5925,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DiscoverySpec + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DiscoverySpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Zone.DiscoverySpec"; + }; + DiscoverySpec.CsvOptions = (function() { /** @@ -5714,18 +6065,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.headerRows = reader.int32(); - break; - case 2: - message.delimiter = reader.string(); - break; - case 3: - message.encoding = reader.string(); - break; - case 4: - message.disableTypeInference = reader.bool(); - break; + case 1: { + message.headerRows = reader.int32(); + break; + } + case 2: { + message.delimiter = reader.string(); + break; + } + case 3: { + message.encoding = reader.string(); + break; + } + case 4: { + message.disableTypeInference = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -5840,6 +6195,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CsvOptions + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CsvOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions"; + }; + return CsvOptions; })(); @@ -5946,12 +6316,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.encoding = reader.string(); - break; - case 2: - message.disableTypeInference = reader.bool(); - break; + case 1: { + message.encoding = reader.string(); + break; + } + case 2: { + message.disableTypeInference = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -6050,6 +6422,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for JsonOptions + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JsonOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions"; + }; + return JsonOptions; })(); @@ -6332,56 +6719,72 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.category = reader.int32(); - break; - case 2: - message.issue = reader.string(); - break; - case 4: - message.detectTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 5: - message.name = reader.string(); - break; - case 6: - message.lake = reader.string(); - break; - case 7: - message.zone = reader.string(); - break; - case 8: - message.asset = reader.string(); - break; - case 9: - if (!(message.dataLocations && message.dataLocations.length)) - message.dataLocations = []; - message.dataLocations.push(reader.string()); - break; - case 10: - message.invalidDataFormat = $root.google.cloud.dataplex.v1.Action.InvalidDataFormat.decode(reader, reader.uint32()); - break; - case 11: - message.incompatibleDataSchema = $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.decode(reader, reader.uint32()); - break; - case 12: - message.invalidDataPartition = $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.decode(reader, reader.uint32()); - break; - case 13: - message.missingData = $root.google.cloud.dataplex.v1.Action.MissingData.decode(reader, reader.uint32()); - break; - case 14: - message.missingResource = $root.google.cloud.dataplex.v1.Action.MissingResource.decode(reader, reader.uint32()); - break; - case 15: - message.unauthorizedResource = $root.google.cloud.dataplex.v1.Action.UnauthorizedResource.decode(reader, reader.uint32()); - break; - case 21: - message.failedSecurityPolicyApply = $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.decode(reader, reader.uint32()); - break; - case 22: - message.invalidDataOrganization = $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization.decode(reader, reader.uint32()); - break; + case 1: { + message.category = reader.int32(); + break; + } + case 2: { + message.issue = reader.string(); + break; + } + case 4: { + message.detectTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.name = reader.string(); + break; + } + case 6: { + message.lake = reader.string(); + break; + } + case 7: { + message.zone = reader.string(); + break; + } + case 8: { + message.asset = reader.string(); + break; + } + case 9: { + if (!(message.dataLocations && message.dataLocations.length)) + message.dataLocations = []; + message.dataLocations.push(reader.string()); + break; + } + case 10: { + message.invalidDataFormat = $root.google.cloud.dataplex.v1.Action.InvalidDataFormat.decode(reader, reader.uint32()); + break; + } + case 11: { + message.incompatibleDataSchema = $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.decode(reader, reader.uint32()); + break; + } + case 12: { + message.invalidDataPartition = $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.decode(reader, reader.uint32()); + break; + } + case 13: { + message.missingData = $root.google.cloud.dataplex.v1.Action.MissingData.decode(reader, reader.uint32()); + break; + } + case 14: { + message.missingResource = $root.google.cloud.dataplex.v1.Action.MissingResource.decode(reader, reader.uint32()); + break; + } + case 15: { + message.unauthorizedResource = $root.google.cloud.dataplex.v1.Action.UnauthorizedResource.decode(reader, reader.uint32()); + break; + } + case 21: { + message.failedSecurityPolicyApply = $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.decode(reader, reader.uint32()); + break; + } + case 22: { + message.invalidDataOrganization = $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -6728,6 +7131,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Action + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Action + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Action.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Action"; + }; + /** * Category enum. * @name google.cloud.dataplex.v1.Action.Category @@ -6903,6 +7321,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MissingResource + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Action.MissingResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MissingResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Action.MissingResource"; + }; + return MissingResource; })(); @@ -7063,6 +7496,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UnauthorizedResource + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UnauthorizedResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Action.UnauthorizedResource"; + }; + return UnauthorizedResource; })(); @@ -7158,9 +7606,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.asset = reader.string(); - break; + case 1: { + message.asset = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -7250,6 +7699,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FailedSecurityPolicyApply + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FailedSecurityPolicyApply.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply"; + }; + return FailedSecurityPolicyApply; })(); @@ -7369,17 +7833,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.sampledDataLocations && message.sampledDataLocations.length)) - message.sampledDataLocations = []; - message.sampledDataLocations.push(reader.string()); - break; - case 2: - message.expectedFormat = reader.string(); - break; - case 3: - message.newFormat = reader.string(); - break; + case 1: { + if (!(message.sampledDataLocations && message.sampledDataLocations.length)) + message.sampledDataLocations = []; + message.sampledDataLocations.push(reader.string()); + break; + } + case 2: { + message.expectedFormat = reader.string(); + break; + } + case 3: { + message.newFormat = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -7499,6 +7966,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for InvalidDataFormat + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InvalidDataFormat.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Action.InvalidDataFormat"; + }; + return InvalidDataFormat; })(); @@ -7640,23 +8122,28 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.table = reader.string(); - break; - case 2: - message.existingSchema = reader.string(); - break; - case 3: - message.newSchema = reader.string(); - break; - case 4: - if (!(message.sampledDataLocations && message.sampledDataLocations.length)) - message.sampledDataLocations = []; - message.sampledDataLocations.push(reader.string()); - break; - case 5: - message.schemaChange = reader.int32(); - break; + case 1: { + message.table = reader.string(); + break; + } + case 2: { + message.existingSchema = reader.string(); + break; + } + case 3: { + message.newSchema = reader.string(); + break; + } + case 4: { + if (!(message.sampledDataLocations && message.sampledDataLocations.length)) + message.sampledDataLocations = []; + message.sampledDataLocations.push(reader.string()); + break; + } + case 5: { + message.schemaChange = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -7810,6 +8297,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for IncompatibleDataSchema + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IncompatibleDataSchema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Action.IncompatibleDataSchema"; + }; + /** * SchemaChange enum. * @name google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange @@ -7921,9 +8423,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.expectedStructure = reader.int32(); - break; + case 1: { + message.expectedStructure = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -8031,6 +8534,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for InvalidDataPartition + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InvalidDataPartition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Action.InvalidDataPartition"; + }; + /** * PartitionStructure enum. * @name google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure @@ -8207,6 +8725,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MissingData + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Action.MissingData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MissingData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Action.MissingData"; + }; + return MissingData; })(); @@ -8367,6 +8900,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for InvalidDataOrganization + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InvalidDataOrganization.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Action.InvalidDataOrganization"; + }; + return InvalidDataOrganization; })(); @@ -8599,64 +9147,77 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.displayName = reader.string(); - break; - case 3: - message.uid = reader.string(); - break; - case 4: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 5: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.uid = reader.string(); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.labels[key] = value; + break; + } + case 7: { + message.description = reader.string(); + break; + } + case 8: { + message.state = reader.int32(); + break; + } + case 100: { + message.resourceSpec = $root.google.cloud.dataplex.v1.Asset.ResourceSpec.decode(reader, reader.uint32()); + break; + } + case 101: { + message.resourceStatus = $root.google.cloud.dataplex.v1.Asset.ResourceStatus.decode(reader, reader.uint32()); + break; + } + case 103: { + message.securityStatus = $root.google.cloud.dataplex.v1.Asset.SecurityStatus.decode(reader, reader.uint32()); + break; + } + case 106: { + message.discoverySpec = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.decode(reader, reader.uint32()); + break; + } + case 107: { + message.discoveryStatus = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.decode(reader, reader.uint32()); + break; } - message.labels[key] = value; - break; - case 7: - message.description = reader.string(); - break; - case 8: - message.state = reader.int32(); - break; - case 100: - message.resourceSpec = $root.google.cloud.dataplex.v1.Asset.ResourceSpec.decode(reader, reader.uint32()); - break; - case 101: - message.resourceStatus = $root.google.cloud.dataplex.v1.Asset.ResourceStatus.decode(reader, reader.uint32()); - break; - case 103: - message.securityStatus = $root.google.cloud.dataplex.v1.Asset.SecurityStatus.decode(reader, reader.uint32()); - break; - case 106: - message.discoverySpec = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.decode(reader, reader.uint32()); - break; - case 107: - message.discoveryStatus = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -8916,6 +9477,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Asset + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Asset + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Asset.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Asset"; + }; + Asset.SecurityStatus = (function() { /** @@ -9030,15 +9606,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.state = reader.int32(); - break; - case 2: - message.message = reader.string(); - break; - case 3: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; + case 1: { + message.state = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -9173,6 +9752,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SecurityStatus + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SecurityStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Asset.SecurityStatus"; + }; + /** * State enum. * @name google.cloud.dataplex.v1.Asset.SecurityStatus.State @@ -9359,28 +9953,34 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.enabled = reader.bool(); - break; - case 2: - if (!(message.includePatterns && message.includePatterns.length)) - message.includePatterns = []; - message.includePatterns.push(reader.string()); - break; - case 3: - if (!(message.excludePatterns && message.excludePatterns.length)) - message.excludePatterns = []; - message.excludePatterns.push(reader.string()); - break; - case 4: - message.csvOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.decode(reader, reader.uint32()); - break; - case 5: - message.jsonOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.decode(reader, reader.uint32()); - break; - case 10: - message.schedule = reader.string(); - break; + case 1: { + message.enabled = reader.bool(); + break; + } + case 2: { + if (!(message.includePatterns && message.includePatterns.length)) + message.includePatterns = []; + message.includePatterns.push(reader.string()); + break; + } + case 3: { + if (!(message.excludePatterns && message.excludePatterns.length)) + message.excludePatterns = []; + message.excludePatterns.push(reader.string()); + break; + } + case 4: { + message.csvOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.jsonOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.decode(reader, reader.uint32()); + break; + } + case 10: { + message.schedule = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -9552,6 +10152,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DiscoverySpec + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DiscoverySpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Asset.DiscoverySpec"; + }; + DiscoverySpec.CsvOptions = (function() { /** @@ -9677,18 +10292,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.headerRows = reader.int32(); - break; - case 2: - message.delimiter = reader.string(); - break; - case 3: - message.encoding = reader.string(); - break; - case 4: - message.disableTypeInference = reader.bool(); - break; + case 1: { + message.headerRows = reader.int32(); + break; + } + case 2: { + message.delimiter = reader.string(); + break; + } + case 3: { + message.encoding = reader.string(); + break; + } + case 4: { + message.disableTypeInference = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -9803,6 +10422,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CsvOptions + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CsvOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions"; + }; + return CsvOptions; })(); @@ -9909,12 +10543,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.encoding = reader.string(); - break; - case 2: - message.disableTypeInference = reader.bool(); - break; + case 1: { + message.encoding = reader.string(); + break; + } + case 2: { + message.disableTypeInference = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -10013,6 +10649,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for JsonOptions + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JsonOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions"; + }; + return JsonOptions; })(); @@ -10122,12 +10773,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.type = reader.int32(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -10244,6 +10897,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ResourceSpec + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Asset.ResourceSpec"; + }; + /** * Type enum. * @name google.cloud.dataplex.v1.Asset.ResourceSpec.Type @@ -10377,15 +11045,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.state = reader.int32(); - break; - case 2: - message.message = reader.string(); - break; - case 3: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; + case 1: { + message.state = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -10515,6 +11186,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ResourceStatus + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Asset.ResourceStatus"; + }; + /** * State enum. * @name google.cloud.dataplex.v1.Asset.ResourceStatus.State @@ -10681,24 +11367,30 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.state = reader.int32(); - break; - case 2: - message.message = reader.string(); - break; - case 3: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 4: - message.lastRunTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - message.stats = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.decode(reader, reader.uint32()); - break; - case 7: - message.lastRunDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; + case 1: { + message.state = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.lastRunTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.stats = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.decode(reader, reader.uint32()); + break; + } + case 7: { + message.lastRunDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -10877,6 +11569,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DiscoveryStatus + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DiscoveryStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Asset.DiscoveryStatus"; + }; + /** * State enum. * @name google.cloud.dataplex.v1.Asset.DiscoveryStatus.State @@ -11022,18 +11729,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.dataItems = reader.int64(); - break; - case 2: - message.dataSize = reader.int64(); - break; - case 3: - message.tables = reader.int64(); - break; - case 4: - message.filesets = reader.int64(); - break; + case 1: { + message.dataItems = reader.int64(); + break; + } + case 2: { + message.dataSize = reader.int64(); + break; + } + case 3: { + message.tables = reader.int64(); + break; + } + case 4: { + message.filesets = reader.int64(); + break; + } default: reader.skipType(tag & 7); break; @@ -11204,6 +11915,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Stats + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Stats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats"; + }; + return Stats; })(); @@ -11266,7 +11992,7 @@ }; /** - * Callback as used by {@link google.cloud.dataplex.v1.ContentService#createContent}. + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|createContent}. * @memberof google.cloud.dataplex.v1.ContentService * @typedef CreateContentCallback * @type {function} @@ -11299,7 +12025,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.ContentService#updateContent}. + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|updateContent}. * @memberof google.cloud.dataplex.v1.ContentService * @typedef UpdateContentCallback * @type {function} @@ -11332,7 +12058,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.ContentService#deleteContent}. + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|deleteContent}. * @memberof google.cloud.dataplex.v1.ContentService * @typedef DeleteContentCallback * @type {function} @@ -11365,7 +12091,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.ContentService#getContent}. + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|getContent}. * @memberof google.cloud.dataplex.v1.ContentService * @typedef GetContentCallback * @type {function} @@ -11398,7 +12124,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.ContentService#listContent}. + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|listContent}. * @memberof google.cloud.dataplex.v1.ContentService * @typedef ListContentCallback * @type {function} @@ -11547,15 +12273,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.content = $root.google.cloud.dataplex.v1.Content.decode(reader, reader.uint32()); - break; - case 3: - message.validateOnly = reader.bool(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.content = $root.google.cloud.dataplex.v1.Content.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -11667,6 +12396,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateContentRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.CreateContentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateContentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateContentRequest"; + }; + return CreateContentRequest; })(); @@ -11784,15 +12528,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 2: - message.content = $root.google.cloud.dataplex.v1.Content.decode(reader, reader.uint32()); - break; - case 3: - message.validateOnly = reader.bool(); - break; + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.content = $root.google.cloud.dataplex.v1.Content.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -11909,6 +12656,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateContentRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateContentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateContentRequest"; + }; + return UpdateContentRequest; })(); @@ -12004,9 +12766,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -12096,6 +12859,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteContentRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DeleteContentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteContentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteContentRequest"; + }; + return DeleteContentRequest; })(); @@ -12224,18 +13002,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - case 4: - message.filter = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -12350,6 +13132,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListContentRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListContentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListContentRequest"; + }; + return ListContentRequest; })(); @@ -12458,14 +13255,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.content && message.content.length)) - message.content = []; - message.content.push($root.google.cloud.dataplex.v1.Content.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.content && message.content.length)) + message.content = []; + message.content.push($root.google.cloud.dataplex.v1.Content.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -12581,6 +13380,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListContentResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListContentResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListContentResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListContentResponse"; + }; + return ListContentResponse; })(); @@ -12687,12 +13501,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.view = reader.int32(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.view = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -12809,6 +13625,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetContentRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.GetContentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetContentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetContentRequest"; + }; + /** * ContentView enum. * @name google.cloud.dataplex.v1.GetContentRequest.ContentView @@ -13033,36 +13864,46 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.message = reader.string(); - break; - case 2: - message.lakeId = reader.string(); - break; - case 3: - message.zoneId = reader.string(); - break; - case 4: - message.assetId = reader.string(); - break; - case 5: - message.dataLocation = reader.string(); - break; - case 10: - message.type = reader.int32(); - break; - case 20: - message.config = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.decode(reader, reader.uint32()); - break; - case 21: - message.entity = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.decode(reader, reader.uint32()); - break; - case 22: - message.partition = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.decode(reader, reader.uint32()); - break; - case 23: - message.action = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.decode(reader, reader.uint32()); - break; + case 1: { + message.message = reader.string(); + break; + } + case 2: { + message.lakeId = reader.string(); + break; + } + case 3: { + message.zoneId = reader.string(); + break; + } + case 4: { + message.assetId = reader.string(); + break; + } + case 5: { + message.dataLocation = reader.string(); + break; + } + case 10: { + message.type = reader.int32(); + break; + } + case 20: { + message.config = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.decode(reader, reader.uint32()); + break; + } + case 21: { + message.entity = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.decode(reader, reader.uint32()); + break; + } + case 22: { + message.partition = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.decode(reader, reader.uint32()); + break; + } + case 23: { + message.action = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -13315,6 +14156,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DiscoveryEvent + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DiscoveryEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DiscoveryEvent"; + }; + /** * EventType enum. * @name google.cloud.dataplex.v1.DiscoveryEvent.EventType @@ -13451,28 +14307,29 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (message.parameters === $util.emptyObject) - message.parameters = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + if (message.parameters === $util.emptyObject) + message.parameters = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.parameters[key] = value; + break; } - message.parameters[key] = value; - break; default: reader.skipType(tag & 7); break; @@ -13576,6 +14433,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ConfigDetails + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConfigDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails"; + }; + return ConfigDetails; })(); @@ -13682,12 +14554,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.entity = reader.string(); - break; - case 2: - message.type = reader.int32(); - break; + case 1: { + message.entity = reader.string(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -13804,6 +14678,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EntityDetails + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EntityDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails"; + }; + return EntityDetails; })(); @@ -13921,15 +14810,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.partition = reader.string(); - break; - case 2: - message.entity = reader.string(); - break; - case 3: - message.type = reader.int32(); - break; + case 1: { + message.partition = reader.string(); + break; + } + case 2: { + message.entity = reader.string(); + break; + } + case 3: { + message.type = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -14054,6 +14946,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PartitionDetails + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PartitionDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails"; + }; + return PartitionDetails; })(); @@ -14149,9 +15056,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; + case 1: { + message.type = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -14241,6 +15149,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ActionDetails + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ActionDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails"; + }; + return ActionDetails; })(); @@ -14427,33 +15350,42 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.message = reader.string(); - break; - case 2: - message.jobId = reader.string(); - break; - case 3: - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 4: - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 5: - message.state = reader.int32(); - break; - case 6: - message.retries = reader.int32(); - break; - case 7: - message.type = reader.int32(); - break; - case 8: - message.service = reader.int32(); - break; - case 9: - message.serviceJob = reader.string(); - break; + case 1: { + message.message = reader.string(); + break; + } + case 2: { + message.jobId = reader.string(); + break; + } + case 3: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.state = reader.int32(); + break; + } + case 6: { + message.retries = reader.int32(); + break; + } + case 7: { + message.type = reader.int32(); + break; + } + case 8: { + message.service = reader.int32(); + break; + } + case 9: { + message.serviceJob = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -14677,6 +15609,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for JobEvent + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JobEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.JobEvent"; + }; + /** * Type enum. * @name google.cloud.dataplex.v1.JobEvent.Type @@ -14880,21 +15827,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.message = reader.string(); - break; - case 2: - message.userId = reader.string(); - break; - case 3: - message.sessionId = reader.string(); - break; - case 4: - message.type = reader.int32(); - break; - case 5: - message.query = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.decode(reader, reader.uint32()); - break; + case 1: { + message.message = reader.string(); + break; + } + case 2: { + message.userId = reader.string(); + break; + } + case 3: { + message.sessionId = reader.string(); + break; + } + case 4: { + message.type = reader.int32(); + break; + } + case 5: { + message.query = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -15051,6 +16003,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SessionEvent + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SessionEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.SessionEvent"; + }; + /** * EventType enum. * @name google.cloud.dataplex.v1.SessionEvent.EventType @@ -15216,24 +16183,30 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.queryId = reader.string(); - break; - case 2: - message.queryText = reader.string(); - break; - case 3: - message.engine = reader.int32(); - break; - case 4: - message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 5: - message.resultSizeBytes = reader.int64(); - break; - case 6: - message.dataProcessedBytes = reader.int64(); - break; + case 1: { + message.queryId = reader.string(); + break; + } + case 2: { + message.queryText = reader.string(); + break; + } + case 3: { + message.engine = reader.int32(); + break; + } + case 4: { + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 5: { + message.resultSizeBytes = reader.int64(); + break; + } + case 6: { + message.dataProcessedBytes = reader.int64(); + break; + } default: reader.skipType(tag & 7); break; @@ -15415,6 +16388,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for QueryDetail + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.SessionEvent.QueryDetail"; + }; + /** * Engine enum. * @name google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine @@ -15470,7 +16458,7 @@ }; /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#createEntity}. + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|createEntity}. * @memberof google.cloud.dataplex.v1.MetadataService * @typedef CreateEntityCallback * @type {function} @@ -15503,7 +16491,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#updateEntity}. + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|updateEntity}. * @memberof google.cloud.dataplex.v1.MetadataService * @typedef UpdateEntityCallback * @type {function} @@ -15536,7 +16524,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#deleteEntity}. + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|deleteEntity}. * @memberof google.cloud.dataplex.v1.MetadataService * @typedef DeleteEntityCallback * @type {function} @@ -15569,7 +16557,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#getEntity}. + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|getEntity}. * @memberof google.cloud.dataplex.v1.MetadataService * @typedef GetEntityCallback * @type {function} @@ -15602,7 +16590,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#listEntities}. + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|listEntities}. * @memberof google.cloud.dataplex.v1.MetadataService * @typedef ListEntitiesCallback * @type {function} @@ -15635,7 +16623,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#createPartition}. + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|createPartition}. * @memberof google.cloud.dataplex.v1.MetadataService * @typedef CreatePartitionCallback * @type {function} @@ -15668,7 +16656,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#deletePartition}. + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|deletePartition}. * @memberof google.cloud.dataplex.v1.MetadataService * @typedef DeletePartitionCallback * @type {function} @@ -15701,7 +16689,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#getPartition}. + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|getPartition}. * @memberof google.cloud.dataplex.v1.MetadataService * @typedef GetPartitionCallback * @type {function} @@ -15734,7 +16722,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService#listPartitions}. + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|listPartitions}. * @memberof google.cloud.dataplex.v1.MetadataService * @typedef ListPartitionsCallback * @type {function} @@ -15883,15 +16871,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 3: - message.entity = $root.google.cloud.dataplex.v1.Entity.decode(reader, reader.uint32()); - break; - case 4: - message.validateOnly = reader.bool(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 3: { + message.entity = $root.google.cloud.dataplex.v1.Entity.decode(reader, reader.uint32()); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -16003,6 +16994,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateEntityRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.CreateEntityRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateEntityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateEntityRequest"; + }; + return CreateEntityRequest; })(); @@ -16109,12 +17115,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.entity = $root.google.cloud.dataplex.v1.Entity.decode(reader, reader.uint32()); - break; - case 3: - message.validateOnly = reader.bool(); - break; + case 2: { + message.entity = $root.google.cloud.dataplex.v1.Entity.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -16218,6 +17226,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateEntityRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.UpdateEntityRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateEntityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateEntityRequest"; + }; + return UpdateEntityRequest; })(); @@ -16324,12 +17347,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.etag = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.etag = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -16428,6 +17453,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteEntityRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DeleteEntityRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteEntityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteEntityRequest"; + }; + return DeleteEntityRequest; })(); @@ -16567,21 +17607,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.view = reader.int32(); - break; - case 3: - message.pageSize = reader.int32(); - break; - case 4: - message.pageToken = reader.string(); - break; - case 5: - message.filter = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.view = reader.int32(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -16722,6 +17767,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListEntitiesRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListEntitiesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListEntitiesRequest"; + }; + /** * EntityView enum. * @name google.cloud.dataplex.v1.ListEntitiesRequest.EntityView @@ -16846,14 +17906,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.entities && message.entities.length)) - message.entities = []; - message.entities.push($root.google.cloud.dataplex.v1.Entity.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.entities && message.entities.length)) + message.entities = []; + message.entities.push($root.google.cloud.dataplex.v1.Entity.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -16969,6 +18031,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListEntitiesResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListEntitiesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListEntitiesResponse"; + }; + return ListEntitiesResponse; })(); @@ -17075,12 +18152,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.view = reader.int32(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.view = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -17202,6 +18281,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetEntityRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetEntityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetEntityRequest"; + }; + /** * EntityView enum. * @name google.cloud.dataplex.v1.GetEntityRequest.EntityView @@ -17348,18 +18442,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - case 4: - message.filter = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -17474,6 +18572,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListPartitionsRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPartitionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListPartitionsRequest"; + }; + return ListPartitionsRequest; })(); @@ -17591,15 +18704,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 3: - message.partition = $root.google.cloud.dataplex.v1.Partition.decode(reader, reader.uint32()); - break; - case 4: - message.validateOnly = reader.bool(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 3: { + message.partition = $root.google.cloud.dataplex.v1.Partition.decode(reader, reader.uint32()); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -17711,6 +18827,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreatePartitionRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreatePartitionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.CreatePartitionRequest"; + }; + return CreatePartitionRequest; })(); @@ -17817,12 +18948,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.etag = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.etag = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -17921,6 +19054,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeletePartitionRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DeletePartitionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeletePartitionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DeletePartitionRequest"; + }; + return DeletePartitionRequest; })(); @@ -18029,14 +19177,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.partitions && message.partitions.length)) - message.partitions = []; - message.partitions.push($root.google.cloud.dataplex.v1.Partition.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.partitions && message.partitions.length)) + message.partitions = []; + message.partitions.push($root.google.cloud.dataplex.v1.Partition.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -18152,6 +19302,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListPartitionsResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPartitionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListPartitionsResponse"; + }; + return ListPartitionsResponse; })(); @@ -18247,9 +19412,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -18339,6 +19505,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetPartitionRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetPartitionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetPartitionRequest"; + }; + return GetPartitionRequest; })(); @@ -18599,54 +19780,70 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.displayName = reader.string(); - break; - case 3: - message.description = reader.string(); - break; - case 5: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 7: - message.id = reader.string(); - break; - case 8: - message.etag = reader.string(); - break; - case 10: - message.type = reader.int32(); - break; - case 11: - message.asset = reader.string(); - break; - case 12: - message.dataPath = reader.string(); - break; - case 13: - message.dataPathPattern = reader.string(); - break; - case 14: - message.catalogEntry = reader.string(); - break; - case 15: - message.system = reader.int32(); - break; - case 16: - message.format = $root.google.cloud.dataplex.v1.StorageFormat.decode(reader, reader.uint32()); - break; - case 19: - message.compatibility = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.decode(reader, reader.uint32()); - break; - case 50: - message.schema = $root.google.cloud.dataplex.v1.Schema.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 5: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.id = reader.string(); + break; + } + case 8: { + message.etag = reader.string(); + break; + } + case 10: { + message.type = reader.int32(); + break; + } + case 11: { + message.asset = reader.string(); + break; + } + case 12: { + message.dataPath = reader.string(); + break; + } + case 13: { + message.dataPathPattern = reader.string(); + break; + } + case 14: { + message.catalogEntry = reader.string(); + break; + } + case 15: { + message.system = reader.int32(); + break; + } + case 16: { + message.format = $root.google.cloud.dataplex.v1.StorageFormat.decode(reader, reader.uint32()); + break; + } + case 19: { + message.compatibility = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.decode(reader, reader.uint32()); + break; + } + case 50: { + message.schema = $root.google.cloud.dataplex.v1.Schema.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -18918,6 +20115,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Entity + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Entity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Entity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Entity"; + }; + /** * Type enum. * @name google.cloud.dataplex.v1.Entity.Type @@ -19037,12 +20249,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.hiveMetastore = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.decode(reader, reader.uint32()); - break; - case 2: - message.bigquery = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.decode(reader, reader.uint32()); - break; + case 1: { + message.hiveMetastore = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.decode(reader, reader.uint32()); + break; + } + case 2: { + message.bigquery = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -19151,6 +20365,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CompatibilityStatus + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CompatibilityStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Entity.CompatibilityStatus"; + }; + CompatibilityStatus.Compatibility = (function() { /** @@ -19254,12 +20483,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.compatible = reader.bool(); - break; - case 2: - message.reason = reader.string(); - break; + case 1: { + message.compatible = reader.bool(); + break; + } + case 2: { + message.reason = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -19358,6 +20589,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Compatibility + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Compatibility.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility"; + }; + return Compatibility; })(); @@ -19494,20 +20740,24 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.values && message.values.length)) - message.values = []; - message.values.push(reader.string()); - break; - case 3: - message.location = reader.string(); - break; - case 4: - message.etag = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push(reader.string()); + break; + } + case 3: { + message.location = reader.string(); + break; + } + case 4: { + message.etag = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -19635,6 +20885,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Partition + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Partition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Partition"; + }; + return Partition; })(); @@ -19767,22 +21032,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.userManaged = reader.bool(); - break; - case 2: - if (!(message.fields && message.fields.length)) - message.fields = []; - message.fields.push($root.google.cloud.dataplex.v1.Schema.SchemaField.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.partitionFields && message.partitionFields.length)) - message.partitionFields = []; - message.partitionFields.push($root.google.cloud.dataplex.v1.Schema.PartitionField.decode(reader, reader.uint32())); - break; - case 4: - message.partitionStyle = reader.int32(); - break; + case 1: { + message.userManaged = reader.bool(); + break; + } + case 2: { + if (!(message.fields && message.fields.length)) + message.fields = []; + message.fields.push($root.google.cloud.dataplex.v1.Schema.SchemaField.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.partitionFields && message.partitionFields.length)) + message.partitionFields = []; + message.partitionFields.push($root.google.cloud.dataplex.v1.Schema.PartitionField.decode(reader, reader.uint32())); + break; + } + case 4: { + message.partitionStyle = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -19946,6 +21215,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Schema + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Schema + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Schema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Schema"; + }; + /** * Type enum. * @name google.cloud.dataplex.v1.Schema.Type @@ -20144,23 +21428,28 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.type = reader.int32(); - break; - case 4: - message.mode = reader.int32(); - break; - case 10: - if (!(message.fields && message.fields.length)) - message.fields = []; - message.fields.push($root.google.cloud.dataplex.v1.Schema.SchemaField.decode(reader, reader.uint32())); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.type = reader.int32(); + break; + } + case 4: { + message.mode = reader.int32(); + break; + } + case 10: { + if (!(message.fields && message.fields.length)) + message.fields = []; + message.fields.push($root.google.cloud.dataplex.v1.Schema.SchemaField.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -20407,6 +21696,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SchemaField + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SchemaField.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Schema.SchemaField"; + }; + return SchemaField; })(); @@ -20513,12 +21817,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.type = reader.int32(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -20700,6 +22006,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PartitionField + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PartitionField.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Schema.PartitionField"; + }; + return PartitionField; })(); @@ -20870,21 +22191,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.format = reader.int32(); - break; - case 2: - message.compressionFormat = reader.int32(); - break; - case 3: - message.mimeType = reader.string(); - break; - case 10: - message.csv = $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.decode(reader, reader.uint32()); - break; - case 11: - message.json = $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.format = reader.int32(); + break; + } + case 2: { + message.compressionFormat = reader.int32(); + break; + } + case 3: { + message.mimeType = reader.string(); + break; + } + case 10: { + message.csv = $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.decode(reader, reader.uint32()); + break; + } + case 11: { + message.json = $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -21116,6 +22442,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for StorageFormat + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.StorageFormat + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StorageFormat.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.StorageFormat"; + }; + StorageFormat.CsvOptions = (function() { /** @@ -21241,18 +22582,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.encoding = reader.string(); - break; - case 2: - message.headerRows = reader.int32(); - break; - case 3: - message.delimiter = reader.string(); - break; - case 4: - message.quote = reader.string(); - break; + case 1: { + message.encoding = reader.string(); + break; + } + case 2: { + message.headerRows = reader.int32(); + break; + } + case 3: { + message.delimiter = reader.string(); + break; + } + case 4: { + message.quote = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -21367,6 +22712,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CsvOptions + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CsvOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.StorageFormat.CsvOptions"; + }; + return CsvOptions; })(); @@ -21462,9 +22822,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.encoding = reader.string(); - break; + case 1: { + message.encoding = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -21554,6 +22915,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for JsonOptions + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JsonOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.StorageFormat.JsonOptions"; + }; + return JsonOptions; })(); @@ -21661,7 +23037,7 @@ }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createLake}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createLake}. * @memberof google.cloud.dataplex.v1.DataplexService * @typedef CreateLakeCallback * @type {function} @@ -21694,7 +23070,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateLake}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateLake}. * @memberof google.cloud.dataplex.v1.DataplexService * @typedef UpdateLakeCallback * @type {function} @@ -21727,7 +23103,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteLake}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteLake}. * @memberof google.cloud.dataplex.v1.DataplexService * @typedef DeleteLakeCallback * @type {function} @@ -21760,7 +23136,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listLakes}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listLakes}. * @memberof google.cloud.dataplex.v1.DataplexService * @typedef ListLakesCallback * @type {function} @@ -21793,7 +23169,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getLake}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getLake}. * @memberof google.cloud.dataplex.v1.DataplexService * @typedef GetLakeCallback * @type {function} @@ -21826,7 +23202,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listLakeActions}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listLakeActions}. * @memberof google.cloud.dataplex.v1.DataplexService * @typedef ListLakeActionsCallback * @type {function} @@ -21859,7 +23235,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createZone}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createZone}. * @memberof google.cloud.dataplex.v1.DataplexService * @typedef CreateZoneCallback * @type {function} @@ -21892,7 +23268,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateZone}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateZone}. * @memberof google.cloud.dataplex.v1.DataplexService * @typedef UpdateZoneCallback * @type {function} @@ -21925,7 +23301,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteZone}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteZone}. * @memberof google.cloud.dataplex.v1.DataplexService * @typedef DeleteZoneCallback * @type {function} @@ -21958,7 +23334,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listZones}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listZones}. * @memberof google.cloud.dataplex.v1.DataplexService * @typedef ListZonesCallback * @type {function} @@ -21991,7 +23367,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getZone}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getZone}. * @memberof google.cloud.dataplex.v1.DataplexService * @typedef GetZoneCallback * @type {function} @@ -22024,7 +23400,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listZoneActions}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listZoneActions}. * @memberof google.cloud.dataplex.v1.DataplexService * @typedef ListZoneActionsCallback * @type {function} @@ -22057,7 +23433,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createAsset}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createAsset}. * @memberof google.cloud.dataplex.v1.DataplexService * @typedef CreateAssetCallback * @type {function} @@ -22090,7 +23466,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateAsset}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateAsset}. * @memberof google.cloud.dataplex.v1.DataplexService * @typedef UpdateAssetCallback * @type {function} @@ -22123,7 +23499,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteAsset}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteAsset}. * @memberof google.cloud.dataplex.v1.DataplexService * @typedef DeleteAssetCallback * @type {function} @@ -22156,7 +23532,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listAssets}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listAssets}. * @memberof google.cloud.dataplex.v1.DataplexService * @typedef ListAssetsCallback * @type {function} @@ -22189,7 +23565,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getAsset}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getAsset}. * @memberof google.cloud.dataplex.v1.DataplexService * @typedef GetAssetCallback * @type {function} @@ -22222,7 +23598,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listAssetActions}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listAssetActions}. * @memberof google.cloud.dataplex.v1.DataplexService * @typedef ListAssetActionsCallback * @type {function} @@ -22255,7 +23631,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createTask}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createTask}. * @memberof google.cloud.dataplex.v1.DataplexService * @typedef CreateTaskCallback * @type {function} @@ -22288,7 +23664,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateTask}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateTask}. * @memberof google.cloud.dataplex.v1.DataplexService * @typedef UpdateTaskCallback * @type {function} @@ -22321,7 +23697,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteTask}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteTask}. * @memberof google.cloud.dataplex.v1.DataplexService * @typedef DeleteTaskCallback * @type {function} @@ -22354,7 +23730,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listTasks}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listTasks}. * @memberof google.cloud.dataplex.v1.DataplexService * @typedef ListTasksCallback * @type {function} @@ -22387,7 +23763,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getTask}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getTask}. * @memberof google.cloud.dataplex.v1.DataplexService * @typedef GetTaskCallback * @type {function} @@ -22420,7 +23796,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listJobs}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listJobs}. * @memberof google.cloud.dataplex.v1.DataplexService * @typedef ListJobsCallback * @type {function} @@ -22453,7 +23829,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getJob}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getJob}. * @memberof google.cloud.dataplex.v1.DataplexService * @typedef GetJobCallback * @type {function} @@ -22486,7 +23862,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#cancelJob}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|cancelJob}. * @memberof google.cloud.dataplex.v1.DataplexService * @typedef CancelJobCallback * @type {function} @@ -22519,7 +23895,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#createEnvironment}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createEnvironment}. * @memberof google.cloud.dataplex.v1.DataplexService * @typedef CreateEnvironmentCallback * @type {function} @@ -22552,7 +23928,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#updateEnvironment}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateEnvironment}. * @memberof google.cloud.dataplex.v1.DataplexService * @typedef UpdateEnvironmentCallback * @type {function} @@ -22585,7 +23961,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#deleteEnvironment}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteEnvironment}. * @memberof google.cloud.dataplex.v1.DataplexService * @typedef DeleteEnvironmentCallback * @type {function} @@ -22618,7 +23994,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listEnvironments}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listEnvironments}. * @memberof google.cloud.dataplex.v1.DataplexService * @typedef ListEnvironmentsCallback * @type {function} @@ -22651,7 +24027,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#getEnvironment}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getEnvironment}. * @memberof google.cloud.dataplex.v1.DataplexService * @typedef GetEnvironmentCallback * @type {function} @@ -22684,7 +24060,7 @@ */ /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService#listSessions}. + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listSessions}. * @memberof google.cloud.dataplex.v1.DataplexService * @typedef ListSessionsCallback * @type {function} @@ -22844,18 +24220,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.lakeId = reader.string(); - break; - case 3: - message.lake = $root.google.cloud.dataplex.v1.Lake.decode(reader, reader.uint32()); - break; - case 4: - message.validateOnly = reader.bool(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.lakeId = reader.string(); + break; + } + case 3: { + message.lake = $root.google.cloud.dataplex.v1.Lake.decode(reader, reader.uint32()); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -22975,6 +24355,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateLakeRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateLakeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateLakeRequest"; + }; + return CreateLakeRequest; })(); @@ -23092,15 +24487,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 2: - message.lake = $root.google.cloud.dataplex.v1.Lake.decode(reader, reader.uint32()); - break; - case 3: - message.validateOnly = reader.bool(); - break; + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.lake = $root.google.cloud.dataplex.v1.Lake.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -23217,6 +24615,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateLakeRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateLakeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateLakeRequest"; + }; + return UpdateLakeRequest; })(); @@ -23312,9 +24725,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -23404,6 +24818,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteLakeRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteLakeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteLakeRequest"; + }; + return DeleteLakeRequest; })(); @@ -23543,21 +24972,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - case 4: - message.filter = reader.string(); - break; - case 5: - message.orderBy = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -23680,6 +25114,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListLakesRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListLakesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListLakesRequest"; + }; + return ListLakesRequest; })(); @@ -23801,19 +25250,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.lakes && message.lakes.length)) - message.lakes = []; - message.lakes.push($root.google.cloud.dataplex.v1.Lake.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - case 3: - if (!(message.unreachableLocations && message.unreachableLocations.length)) - message.unreachableLocations = []; - message.unreachableLocations.push(reader.string()); - break; + case 1: { + if (!(message.lakes && message.lakes.length)) + message.lakes = []; + message.lakes.push($root.google.cloud.dataplex.v1.Lake.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachableLocations && message.unreachableLocations.length)) + message.unreachableLocations = []; + message.unreachableLocations.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -23950,6 +25402,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListLakesResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListLakesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListLakesResponse"; + }; + return ListLakesResponse; })(); @@ -24067,15 +25534,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -24182,6 +25652,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListLakeActionsRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListLakeActionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListLakeActionsRequest"; + }; + return ListLakeActionsRequest; })(); @@ -24290,14 +25775,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.actions && message.actions.length)) - message.actions = []; - message.actions.push($root.google.cloud.dataplex.v1.Action.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.actions && message.actions.length)) + message.actions = []; + message.actions.push($root.google.cloud.dataplex.v1.Action.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -24413,6 +25900,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListActionsResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListActionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListActionsResponse"; + }; + return ListActionsResponse; })(); @@ -24508,9 +26010,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -24600,6 +26103,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetLakeRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetLakeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetLakeRequest"; + }; + return GetLakeRequest; })(); @@ -24728,18 +26246,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.zoneId = reader.string(); - break; - case 3: - message.zone = $root.google.cloud.dataplex.v1.Zone.decode(reader, reader.uint32()); - break; - case 4: - message.validateOnly = reader.bool(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.zoneId = reader.string(); + break; + } + case 3: { + message.zone = $root.google.cloud.dataplex.v1.Zone.decode(reader, reader.uint32()); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -24859,6 +26381,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateZoneRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateZoneRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateZoneRequest"; + }; + return CreateZoneRequest; })(); @@ -24976,15 +26513,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 2: - message.zone = $root.google.cloud.dataplex.v1.Zone.decode(reader, reader.uint32()); - break; - case 3: - message.validateOnly = reader.bool(); - break; + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.zone = $root.google.cloud.dataplex.v1.Zone.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -25101,6 +26641,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateZoneRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateZoneRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateZoneRequest"; + }; + return UpdateZoneRequest; })(); @@ -25196,9 +26751,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -25288,6 +26844,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteZoneRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteZoneRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteZoneRequest"; + }; + return DeleteZoneRequest; })(); @@ -25427,21 +26998,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - case 4: - message.filter = reader.string(); - break; - case 5: - message.orderBy = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -25564,6 +27140,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListZonesRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListZonesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListZonesRequest"; + }; + return ListZonesRequest; })(); @@ -25672,14 +27263,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.zones && message.zones.length)) - message.zones = []; - message.zones.push($root.google.cloud.dataplex.v1.Zone.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.zones && message.zones.length)) + message.zones = []; + message.zones.push($root.google.cloud.dataplex.v1.Zone.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -25795,6 +27388,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListZonesResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListZonesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListZonesResponse"; + }; + return ListZonesResponse; })(); @@ -25912,15 +27520,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -26027,6 +27638,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListZoneActionsRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListZoneActionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListZoneActionsRequest"; + }; + return ListZoneActionsRequest; })(); @@ -26122,9 +27748,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -26214,6 +27841,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetZoneRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetZoneRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetZoneRequest"; + }; + return GetZoneRequest; })(); @@ -26342,18 +27984,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.assetId = reader.string(); - break; - case 3: - message.asset = $root.google.cloud.dataplex.v1.Asset.decode(reader, reader.uint32()); - break; - case 4: - message.validateOnly = reader.bool(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.assetId = reader.string(); + break; + } + case 3: { + message.asset = $root.google.cloud.dataplex.v1.Asset.decode(reader, reader.uint32()); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -26473,6 +28119,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateAssetRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateAssetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateAssetRequest"; + }; + return CreateAssetRequest; })(); @@ -26590,15 +28251,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 2: - message.asset = $root.google.cloud.dataplex.v1.Asset.decode(reader, reader.uint32()); - break; - case 3: - message.validateOnly = reader.bool(); - break; + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.asset = $root.google.cloud.dataplex.v1.Asset.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -26715,6 +28379,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateAssetRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateAssetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateAssetRequest"; + }; + return UpdateAssetRequest; })(); @@ -26810,9 +28489,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -26902,6 +28582,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteAssetRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteAssetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteAssetRequest"; + }; + return DeleteAssetRequest; })(); @@ -27041,21 +28736,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - case 4: - message.filter = reader.string(); - break; - case 5: - message.orderBy = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -27178,6 +28878,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListAssetsRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAssetsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListAssetsRequest"; + }; + return ListAssetsRequest; })(); @@ -27286,14 +29001,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.assets && message.assets.length)) - message.assets = []; - message.assets.push($root.google.cloud.dataplex.v1.Asset.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.assets && message.assets.length)) + message.assets = []; + message.assets.push($root.google.cloud.dataplex.v1.Asset.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -27409,6 +29126,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListAssetsResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAssetsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListAssetsResponse"; + }; + return ListAssetsResponse; })(); @@ -27526,15 +29258,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -27641,6 +29376,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListAssetActionsRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAssetActionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListAssetActionsRequest"; + }; + return ListAssetActionsRequest; })(); @@ -27736,9 +29486,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -27828,6 +29579,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetAssetRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetAssetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetAssetRequest"; + }; + return GetAssetRequest; })(); @@ -27989,27 +29755,34 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 2: - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 3: - message.target = reader.string(); - break; - case 4: - message.verb = reader.string(); - break; - case 5: - message.statusMessage = reader.string(); - break; - case 6: - message.requestedCancellation = reader.bool(); - break; - case 7: - message.apiVersion = reader.string(); - break; + case 1: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.target = reader.string(); + break; + } + case 4: { + message.verb = reader.string(); + break; + } + case 5: { + message.statusMessage = reader.string(); + break; + } + case 6: { + message.requestedCancellation = reader.bool(); + break; + } + case 7: { + message.apiVersion = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -28158,6 +29931,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OperationMetadata + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.OperationMetadata"; + }; + return OperationMetadata; })(); @@ -28286,18 +30074,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.taskId = reader.string(); - break; - case 3: - message.task = $root.google.cloud.dataplex.v1.Task.decode(reader, reader.uint32()); - break; - case 4: - message.validateOnly = reader.bool(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.taskId = reader.string(); + break; + } + case 3: { + message.task = $root.google.cloud.dataplex.v1.Task.decode(reader, reader.uint32()); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -28417,6 +30209,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateTaskRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateTaskRequest"; + }; + return CreateTaskRequest; })(); @@ -28534,15 +30341,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 2: - message.task = $root.google.cloud.dataplex.v1.Task.decode(reader, reader.uint32()); - break; - case 3: - message.validateOnly = reader.bool(); - break; + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.task = $root.google.cloud.dataplex.v1.Task.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -28659,6 +30469,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateTaskRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateTaskRequest"; + }; + return UpdateTaskRequest; })(); @@ -28754,9 +30579,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -28846,6 +30672,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteTaskRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteTaskRequest"; + }; + return DeleteTaskRequest; })(); @@ -28985,21 +30826,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - case 4: - message.filter = reader.string(); - break; - case 5: - message.orderBy = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -29122,6 +30968,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListTasksRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListTasksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListTasksRequest"; + }; + return ListTasksRequest; })(); @@ -29243,19 +31104,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.tasks && message.tasks.length)) - message.tasks = []; - message.tasks.push($root.google.cloud.dataplex.v1.Task.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - case 3: - if (!(message.unreachableLocations && message.unreachableLocations.length)) - message.unreachableLocations = []; - message.unreachableLocations.push(reader.string()); - break; + case 1: { + if (!(message.tasks && message.tasks.length)) + message.tasks = []; + message.tasks.push($root.google.cloud.dataplex.v1.Task.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachableLocations && message.unreachableLocations.length)) + message.unreachableLocations = []; + message.unreachableLocations.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -29392,6 +31256,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListTasksResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListTasksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListTasksResponse"; + }; + return ListTasksResponse; })(); @@ -29487,9 +31366,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -29579,6 +31459,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetTaskRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetTaskRequest"; + }; + return GetTaskRequest; })(); @@ -29674,9 +31569,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -29766,6 +31662,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetJobRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetJobRequest"; + }; + return GetJobRequest; })(); @@ -29883,15 +31794,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -29998,6 +31912,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListJobsRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListJobsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListJobsRequest"; + }; + return ListJobsRequest; })(); @@ -30106,14 +32035,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.jobs && message.jobs.length)) - message.jobs = []; - message.jobs.push($root.google.cloud.dataplex.v1.Job.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.jobs && message.jobs.length)) + message.jobs = []; + message.jobs.push($root.google.cloud.dataplex.v1.Job.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -30229,6 +32160,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListJobsResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListJobsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListJobsResponse"; + }; + return ListJobsResponse; })(); @@ -30324,9 +32270,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -30416,6 +32363,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CancelJobRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.CancelJobRequest"; + }; + return CancelJobRequest; })(); @@ -30544,18 +32506,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.environmentId = reader.string(); - break; - case 3: - message.environment = $root.google.cloud.dataplex.v1.Environment.decode(reader, reader.uint32()); - break; - case 4: - message.validateOnly = reader.bool(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.environmentId = reader.string(); + break; + } + case 3: { + message.environment = $root.google.cloud.dataplex.v1.Environment.decode(reader, reader.uint32()); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -30675,6 +32641,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateEnvironmentRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateEnvironmentRequest"; + }; + return CreateEnvironmentRequest; })(); @@ -30792,15 +32773,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 2: - message.environment = $root.google.cloud.dataplex.v1.Environment.decode(reader, reader.uint32()); - break; - case 3: - message.validateOnly = reader.bool(); - break; + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.environment = $root.google.cloud.dataplex.v1.Environment.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -30917,6 +32901,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateEnvironmentRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateEnvironmentRequest"; + }; + return UpdateEnvironmentRequest; })(); @@ -31012,9 +33011,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -31104,6 +33104,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteEnvironmentRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteEnvironmentRequest"; + }; + return DeleteEnvironmentRequest; })(); @@ -31243,21 +33258,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - case 4: - message.filter = reader.string(); - break; - case 5: - message.orderBy = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -31380,6 +33400,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListEnvironmentsRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListEnvironmentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListEnvironmentsRequest"; + }; + return ListEnvironmentsRequest; })(); @@ -31488,14 +33523,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.environments && message.environments.length)) - message.environments = []; - message.environments.push($root.google.cloud.dataplex.v1.Environment.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.environments && message.environments.length)) + message.environments = []; + message.environments.push($root.google.cloud.dataplex.v1.Environment.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -31611,6 +33648,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListEnvironmentsResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListEnvironmentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListEnvironmentsResponse"; + }; + return ListEnvironmentsResponse; })(); @@ -31706,9 +33758,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -31798,6 +33851,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetEnvironmentRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetEnvironmentRequest"; + }; + return GetEnvironmentRequest; })(); @@ -31915,15 +33983,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -32030,6 +34101,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListSessionsRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListSessionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListSessionsRequest"; + }; + return ListSessionsRequest; })(); @@ -32138,14 +34224,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.sessions && message.sessions.length)) - message.sessions = []; - message.sessions.push($root.google.cloud.dataplex.v1.Session.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.sessions && message.sessions.length)) + message.sessions = []; + message.sessions.push($root.google.cloud.dataplex.v1.Session.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -32261,6 +34349,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListSessionsResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListSessionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListSessionsResponse"; + }; + return ListSessionsResponse; })(); @@ -32482,58 +34585,69 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.uid = reader.string(); - break; - case 3: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 4: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 5: - message.description = reader.string(); - break; - case 6: - message.displayName = reader.string(); - break; - case 7: - message.state = reader.int32(); - break; - case 8: - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.uid = reader.string(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.description = reader.string(); + break; + } + case 6: { + message.displayName = reader.string(); + break; + } + case 7: { + message.state = reader.int32(); + break; + } + case 8: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.labels[key] = value; + break; + } + case 100: { + message.triggerSpec = $root.google.cloud.dataplex.v1.Task.TriggerSpec.decode(reader, reader.uint32()); + break; + } + case 101: { + message.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.decode(reader, reader.uint32()); + break; + } + case 300: { + message.spark = $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.decode(reader, reader.uint32()); + break; } - message.labels[key] = value; - break; - case 100: - message.triggerSpec = $root.google.cloud.dataplex.v1.Task.TriggerSpec.decode(reader, reader.uint32()); - break; - case 101: - message.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.decode(reader, reader.uint32()); - break; - case 300: - message.spark = $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -32778,6 +34892,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Task + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Task + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Task.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task"; + }; + Task.InfrastructureSpec = (function() { /** @@ -32928,15 +35057,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 52: - message.batch = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.decode(reader, reader.uint32()); - break; - case 101: - message.containerImage = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.decode(reader, reader.uint32()); - break; - case 150: - message.vpcNetwork = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.decode(reader, reader.uint32()); - break; + case 52: { + message.batch = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.decode(reader, reader.uint32()); + break; + } + case 101: { + message.containerImage = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.decode(reader, reader.uint32()); + break; + } + case 150: { + message.vpcNetwork = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -33072,6 +35204,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for InfrastructureSpec + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InfrastructureSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.InfrastructureSpec"; + }; + InfrastructureSpec.BatchComputeResources = (function() { /** @@ -33175,12 +35322,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.executorsCount = reader.int32(); - break; - case 2: - message.maxExecutorsCount = reader.int32(); - break; + case 1: { + message.executorsCount = reader.int32(); + break; + } + case 2: { + message.maxExecutorsCount = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -33279,6 +35428,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BatchComputeResources + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchComputeResources.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources"; + }; + return BatchComputeResources; })(); @@ -33402,38 +35566,41 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - if (!(message.javaJars && message.javaJars.length)) - message.javaJars = []; - message.javaJars.push(reader.string()); - break; - case 3: - if (!(message.pythonPackages && message.pythonPackages.length)) - message.pythonPackages = []; - message.pythonPackages.push(reader.string()); - break; - case 4: - if (message.properties === $util.emptyObject) - message.properties = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 2: { + if (!(message.javaJars && message.javaJars.length)) + message.javaJars = []; + message.javaJars.push(reader.string()); + break; + } + case 3: { + if (!(message.pythonPackages && message.pythonPackages.length)) + message.pythonPackages = []; + message.pythonPackages.push(reader.string()); + break; + } + case 4: { + if (message.properties === $util.emptyObject) + message.properties = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.properties[key] = value; + break; } - message.properties[key] = value; - break; default: reader.skipType(tag & 7); break; @@ -33579,6 +35746,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ContainerImageRuntime + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ContainerImageRuntime.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime"; + }; + return ContainerImageRuntime; })(); @@ -33712,17 +35894,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.network = reader.string(); - break; - case 2: - message.subNetwork = reader.string(); - break; - case 3: - if (!(message.networkTags && message.networkTags.length)) - message.networkTags = []; - message.networkTags.push(reader.string()); - break; + case 1: { + message.network = reader.string(); + break; + } + case 2: { + message.subNetwork = reader.string(); + break; + } + case 3: { + if (!(message.networkTags && message.networkTags.length)) + message.networkTags = []; + message.networkTags.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -33851,6 +36036,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for VpcNetwork + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VpcNetwork.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork"; + }; + return VpcNetwork; })(); @@ -34007,21 +36207,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 5: - message.type = reader.int32(); - break; - case 6: - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 4: - message.disabled = reader.bool(); - break; - case 7: - message.maxRetries = reader.int32(); - break; - case 100: - message.schedule = reader.string(); - break; + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.disabled = reader.bool(); + break; + } + case 7: { + message.maxRetries = reader.int32(); + break; + } + case 100: { + message.schedule = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -34172,6 +36377,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TriggerSpec + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TriggerSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.TriggerSpec"; + }; + /** * Type enum. * @name google.cloud.dataplex.v1.Task.TriggerSpec.Type @@ -34307,34 +36527,37 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: - if (message.args === $util.emptyObject) - message.args = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 4: { + if (message.args === $util.emptyObject) + message.args = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.args[key] = value; + break; + } + case 5: { + message.serviceAccount = reader.string(); + break; + } + case 8: { + message.maxJobExecutionLifetime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; } - message.args[key] = value; - break; - case 5: - message.serviceAccount = reader.string(); - break; - case 8: - message.maxJobExecutionLifetime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -34461,6 +36684,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ExecutionSpec + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExecutionSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.ExecutionSpec"; + }; + return ExecutionSpec; })(); @@ -34651,34 +36889,42 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 100: - message.mainJarFileUri = reader.string(); - break; - case 101: - message.mainClass = reader.string(); - break; - case 102: - message.pythonScriptFile = reader.string(); - break; - case 104: - message.sqlScriptFile = reader.string(); - break; - case 105: - message.sqlScript = reader.string(); - break; - case 3: - if (!(message.fileUris && message.fileUris.length)) - message.fileUris = []; - message.fileUris.push(reader.string()); - break; - case 4: - if (!(message.archiveUris && message.archiveUris.length)) - message.archiveUris = []; - message.archiveUris.push(reader.string()); - break; - case 6: - message.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.decode(reader, reader.uint32()); - break; + case 100: { + message.mainJarFileUri = reader.string(); + break; + } + case 101: { + message.mainClass = reader.string(); + break; + } + case 102: { + message.pythonScriptFile = reader.string(); + break; + } + case 104: { + message.sqlScriptFile = reader.string(); + break; + } + case 105: { + message.sqlScript = reader.string(); + break; + } + case 3: { + if (!(message.fileUris && message.fileUris.length)) + message.fileUris = []; + message.fileUris.push(reader.string()); + break; + } + case 4: { + if (!(message.archiveUris && message.archiveUris.length)) + message.archiveUris = []; + message.archiveUris.push(reader.string()); + break; + } + case 6: { + message.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -34884,6 +37130,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SparkTaskConfig + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SparkTaskConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.SparkTaskConfig"; + }; + return SparkTaskConfig; })(); @@ -35070,33 +37331,42 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.uid = reader.string(); - break; - case 3: - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 4: - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 5: - message.state = reader.int32(); - break; - case 6: - message.retryCount = reader.uint32(); - break; - case 7: - message.service = reader.int32(); - break; - case 8: - message.serviceJob = reader.string(); - break; - case 9: - message.message = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.uid = reader.string(); + break; + } + case 3: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.state = reader.int32(); + break; + } + case 6: { + message.retryCount = reader.uint32(); + break; + } + case 7: { + message.service = reader.int32(); + break; + } + case 8: { + message.serviceJob = reader.string(); + break; + } + case 9: { + message.message = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -35312,6 +37582,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Job + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Job + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Job.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Job"; + }; + /** * Service enum. * @name google.cloud.dataplex.v1.Job.Service @@ -35562,36 +37847,43 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); - break; - case 3: - message.nameField = reader.string(); - break; - case 4: - message.history = reader.int32(); - break; - case 5: - message.plural = reader.string(); - break; - case 6: - message.singular = reader.string(); - break; - case 10: - if (!(message.style && message.style.length)) - message.style = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + message.type = reader.string(); + break; + } + case 2: { + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + } + case 3: { + message.nameField = reader.string(); + break; + } + case 4: { + message.history = reader.int32(); + break; + } + case 5: { + message.plural = reader.string(); + break; + } + case 6: { + message.singular = reader.string(); + break; + } + case 10: { + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else message.style.push(reader.int32()); - } else - message.style.push(reader.int32()); - break; + break; + } default: reader.skipType(tag & 7); break; @@ -35789,6 +38081,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; + /** * History enum. * @name google.api.ResourceDescriptor.History @@ -35925,12 +38232,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.childType = reader.string(); - break; + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -36029,6 +38338,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + return ResourceReference; })(); @@ -36137,14 +38461,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -36260,6 +38586,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + return Http; })(); @@ -36470,38 +38811,48 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message["delete"] = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -36723,6 +39074,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + return HttpRule; })(); @@ -36829,12 +39195,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -36933,6 +39301,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + return CustomHttpPattern; })(); @@ -37042,11 +39425,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -37153,6 +39537,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + return FileDescriptorSet; })(); @@ -37174,6 +39573,7 @@ * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {string|null} [edition] FileDescriptorProto edition */ /** @@ -37294,6 +39694,14 @@ */ FileDescriptorProto.prototype.syntax = ""; + /** + * FileDescriptorProto edition. + * @member {string} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = ""; + /** * Creates a new FileDescriptorProto instance using the specified properties. * @function create @@ -37349,6 +39757,8 @@ writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.edition); return writer; }; @@ -37383,66 +39793,82 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message["package"] = reader.string(); - break; - case 3: - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - case 10: - if (!(message.publicDependency && message.publicDependency.length)) - message.publicDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else message.publicDependency.push(reader.int32()); - } else - message.publicDependency.push(reader.int32()); - break; - case 11: - if (!(message.weakDependency && message.weakDependency.length)) - message.weakDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else message.weakDependency.push(reader.int32()); - } else - message.weakDependency.push(reader.int32()); - break; - case 4: - if (!(message.messageType && message.messageType.length)) - message.messageType = []; - message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 13: { + message.edition = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -37554,6 +39980,9 @@ if (message.syntax != null && message.hasOwnProperty("syntax")) if (!$util.isString(message.syntax)) return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + if (!$util.isString(message.edition)) + return "edition: string expected"; return null; }; @@ -37646,6 +40075,8 @@ } if (object.syntax != null) message.syntax = String(object.syntax); + if (object.edition != null) + message.edition = String(object.edition); return message; }; @@ -37677,6 +40108,7 @@ object.options = null; object.sourceCodeInfo = null; object.syntax = ""; + object.edition = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -37723,6 +40155,8 @@ } if (message.syntax != null && message.hasOwnProperty("syntax")) object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = message.edition; return object; }; @@ -37737,6 +40171,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + return FileDescriptorProto; })(); @@ -37947,52 +40396,62 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.nestedType && message.nestedType.length)) - message.nestedType = []; - message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.extensionRange && message.extensionRange.length)) - message.extensionRange = []; - message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - if (!(message.oneofDecl && message.oneofDecl.length)) - message.oneofDecl = []; - message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -38293,6 +40752,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + DescriptorProto.ExtensionRange = (function() { /** @@ -38407,15 +40881,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -38527,6 +41004,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + return ExtensionRange; })(); @@ -38633,12 +41125,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -38737,6 +41231,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + return ReservedRange; })(); @@ -38837,11 +41346,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -38948,6 +41458,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + return ExtensionRangeOptions; })(); @@ -39153,39 +41678,50 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3Optional = reader.bool(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -39472,6 +42008,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + /** * Type enum. * @name google.protobuf.FieldDescriptorProto.Type @@ -39640,12 +42191,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -39749,6 +42302,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + return OneofDescriptorProto; })(); @@ -39894,27 +42462,32 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -40090,6 +42663,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + EnumDescriptorProto.EnumReservedRange = (function() { /** @@ -40193,12 +42781,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -40297,6 +42887,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + return EnumReservedRange; })(); @@ -40417,15 +43022,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -40537,6 +43145,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + return EnumValueDescriptorProto; })(); @@ -40656,17 +43279,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -40796,6 +43422,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + return ServiceDescriptorProto; })(); @@ -40946,24 +43587,30 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -41099,6 +43746,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + return MethodDescriptorProto; })(); @@ -41429,76 +44091,98 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1053: - if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) - message[".google.api.resourceDefinition"] = []; - message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); - break; + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 42: { + message.phpGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -41811,6 +44495,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + /** * OptimizeMode enum. * @name google.protobuf.FileOptions.OptimizeMode @@ -41979,26 +44678,32 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1053: - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); - break; + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -42152,6 +44857,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + return MessageOptions; })(); @@ -42165,6 +44885,7 @@ * @property {boolean|null} [packed] FieldOptions packed * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy * @property {boolean|null} [deprecated] FieldOptions deprecated * @property {boolean|null} [weak] FieldOptions weak * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption @@ -42221,6 +44942,14 @@ */ FieldOptions.prototype.lazy = false; + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + /** * FieldOptions deprecated. * @member {boolean} deprecated @@ -42297,6 +45026,8 @@ writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); @@ -42342,42 +45073,55 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1052: - if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) - message[".google.api.fieldBehavior"] = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else message[".google.api.fieldBehavior"].push(reader.int32()); - } else - message[".google.api.fieldBehavior"].push(reader.int32()); - break; - case 1055: - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); - break; + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -42437,6 +45181,9 @@ if (message.lazy != null && message.hasOwnProperty("lazy")) if (typeof message.lazy !== "boolean") return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; if (message.deprecated != null && message.hasOwnProperty("deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; @@ -42522,6 +45269,8 @@ } if (object.lazy != null) message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); if (object.deprecated != null) message.deprecated = Boolean(object.deprecated); if (object.weak != null) @@ -42609,6 +45358,7 @@ object.lazy = false; object.jstype = options.enums === String ? "JS_NORMAL" : 0; object.weak = false; + object.unverifiedLazy = false; object[".google.api.resourceReference"] = null; } if (message.ctype != null && message.hasOwnProperty("ctype")) @@ -42623,6 +45373,8 @@ object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; if (message.weak != null && message.hasOwnProperty("weak")) object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -42649,6 +45401,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + /** * CType enum. * @name google.protobuf.FieldOptions.CType @@ -42778,11 +45545,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -42889,6 +45657,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + return OneofOptions; })(); @@ -43008,17 +45791,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -43143,6 +45929,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + return EnumOptions; })(); @@ -43251,14 +46052,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 1: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -43374,6 +46177,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + return EnumValueOptions; })(); @@ -43504,20 +46322,24 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1049: - message[".google.api.defaultHost"] = reader.string(); - break; - case 1050: - message[".google.api.oauthScopes"] = reader.string(); - break; + case 33: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -43650,6 +46472,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + return ServiceOptions; })(); @@ -43804,28 +46641,34 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 72295728: - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); - break; - case 1051: - if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) - message[".google.api.methodSignature"] = []; - message[".google.api.methodSignature"].push(reader.string()); - break; - case 1049: - message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); - break; + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } + case 1049: { + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -44015,6 +46858,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + /** * IdempotencyLevel enum. * @name google.protobuf.MethodOptions.IdempotencyLevel @@ -44194,29 +47052,36 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = reader.uint64(); - break; - case 5: - message.negativeIntValue = reader.int64(); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + } + case 3: { + message.identifierValue = reader.string(); + break; + } + case 4: { + message.positiveIntValue = reader.uint64(); + break; + } + case 5: { + message.negativeIntValue = reader.int64(); + break; + } + case 6: { + message.doubleValue = reader.double(); + break; + } + case 7: { + message.stringValue = reader.bytes(); + break; + } + case 8: { + message.aggregateValue = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -44329,7 +47194,7 @@ if (object.stringValue != null) if (typeof object.stringValue === "string") $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); - else if (object.stringValue.length) + else if (object.stringValue.length >= 0) message.stringValue = object.stringValue; if (object.aggregateValue != null) message.aggregateValue = String(object.aggregateValue); @@ -44410,6 +47275,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + UninterpretedOption.NamePart = (function() { /** @@ -44511,12 +47391,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -44617,6 +47499,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + return NamePart; })(); @@ -44717,11 +47614,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -44828,6 +47726,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + SourceCodeInfo.Location = (function() { /** @@ -44976,37 +47889,42 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - case 2: - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else message.span.push(reader.int32()); - } else - message.span.push(reader.int32()); - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) - message.leadingDetachedComments = []; - message.leadingDetachedComments.push(reader.string()); - break; + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -45167,6 +48085,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + return Location; })(); @@ -45267,11 +48200,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.annotation && message.annotation.length)) - message.annotation = []; - message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -45378,6 +48312,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + GeneratedCodeInfo.Annotation = (function() { /** @@ -45388,6 +48337,7 @@ * @property {string|null} [sourceFile] Annotation sourceFile * @property {number|null} [begin] Annotation begin * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic */ /** @@ -45438,6 +48388,14 @@ */ Annotation.prototype.end = 0; + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + /** * Creates a new Annotation instance using the specified properties. * @function create @@ -45474,6 +48432,8 @@ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); if (message.end != null && Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); return writer; }; @@ -45508,25 +48468,33 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -45578,6 +48546,15 @@ if (message.end != null && message.hasOwnProperty("end")) if (!$util.isInteger(message.end)) return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -45606,6 +48583,20 @@ message.begin = object.begin | 0; if (object.end != null) message.end = object.end | 0; + switch (object.semantic) { + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } return message; }; @@ -45628,6 +48619,7 @@ object.sourceFile = ""; object.begin = 0; object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; } if (message.path && message.path.length) { object.path = []; @@ -45640,6 +48632,8 @@ object.begin = message.begin; if (message.end != null && message.hasOwnProperty("end")) object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; return object; }; @@ -45654,6 +48648,37 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + return Annotation; })(); @@ -45763,12 +48788,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.seconds = reader.int64(); - break; - case 2: - message.nanos = reader.int32(); - break; + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -45881,6 +48908,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + return Duration; })(); @@ -45987,12 +49029,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.seconds = reader.int64(); - break; - case 2: - message.nanos = reader.int32(); - break; + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -46105,6 +49149,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + return Timestamp; })(); @@ -46265,6 +49324,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Empty + * @function getTypeUrl + * @memberof google.protobuf.Empty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; + return Empty; })(); @@ -46362,11 +49436,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); - break; + case 1: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -46468,6 +49543,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FieldMask + * @function getTypeUrl + * @memberof google.protobuf.FieldMask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldMask"; + }; + return FieldMask; })(); @@ -46574,12 +49664,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type_url = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; + case 1: { + message.type_url = reader.string(); + break; + } + case 2: { + message.value = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -46641,7 +49733,7 @@ if (object.value != null) if (typeof object.value === "string") $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) + else if (object.value.length >= 0) message.value = object.value; return message; }; @@ -46687,6 +49779,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Any + * @function getTypeUrl + * @memberof google.protobuf.Any + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Any"; + }; + return Any; })(); @@ -46735,7 +49842,7 @@ }; /** - * Callback as used by {@link google.longrunning.Operations#listOperations}. + * Callback as used by {@link google.longrunning.Operations|listOperations}. * @memberof google.longrunning.Operations * @typedef ListOperationsCallback * @type {function} @@ -46768,7 +49875,7 @@ */ /** - * Callback as used by {@link google.longrunning.Operations#getOperation}. + * Callback as used by {@link google.longrunning.Operations|getOperation}. * @memberof google.longrunning.Operations * @typedef GetOperationCallback * @type {function} @@ -46801,7 +49908,7 @@ */ /** - * Callback as used by {@link google.longrunning.Operations#deleteOperation}. + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. * @memberof google.longrunning.Operations * @typedef DeleteOperationCallback * @type {function} @@ -46834,7 +49941,7 @@ */ /** - * Callback as used by {@link google.longrunning.Operations#cancelOperation}. + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. * @memberof google.longrunning.Operations * @typedef CancelOperationCallback * @type {function} @@ -46867,7 +49974,7 @@ */ /** - * Callback as used by {@link google.longrunning.Operations#waitOperation}. + * Callback as used by {@link google.longrunning.Operations|waitOperation}. * @memberof google.longrunning.Operations * @typedef WaitOperationCallback * @type {function} @@ -47052,21 +50159,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 3: - message.done = reader.bool(); - break; - case 4: - message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - case 5: - message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } + case 3: { + message.done = reader.bool(); + break; + } + case 4: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 5: { + message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -47217,6 +50329,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Operation + * @function getTypeUrl + * @memberof google.longrunning.Operation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.Operation"; + }; + return Operation; })(); @@ -47312,9 +50439,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -47404,6 +50532,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.GetOperationRequest"; + }; + return GetOperationRequest; })(); @@ -47532,18 +50675,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: - message.name = reader.string(); - break; - case 1: - message.filter = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; + case 4: { + message.name = reader.string(); + break; + } + case 1: { + message.filter = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -47658,6 +50805,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListOperationsRequest + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsRequest"; + }; + return ListOperationsRequest; })(); @@ -47766,14 +50928,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.operations && message.operations.length)) - message.operations = []; - message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -47889,6 +51053,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListOperationsResponse + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsResponse"; + }; + return ListOperationsResponse; })(); @@ -47984,9 +51163,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -48076,6 +51256,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CancelOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.CancelOperationRequest"; + }; + return CancelOperationRequest; })(); @@ -48171,9 +51366,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -48263,6 +51459,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.DeleteOperationRequest"; + }; + return DeleteOperationRequest; })(); @@ -48369,12 +51580,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -48478,6 +51691,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WaitOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.WaitOperationRequest"; + }; + return WaitOperationRequest; })(); @@ -48584,12 +51812,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.responseType = reader.string(); - break; - case 2: - message.metadataType = reader.string(); - break; + case 1: { + message.responseType = reader.string(); + break; + } + case 2: { + message.metadataType = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -48688,6 +51918,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OperationInfo + * @function getTypeUrl + * @memberof google.longrunning.OperationInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.OperationInfo"; + }; + return OperationInfo; })(); @@ -48819,17 +52064,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.code = reader.int32(); - break; - case 2: - message.message = reader.string(); - break; - case 3: - if (!(message.details && message.details.length)) - message.details = []; - message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); - break; + case 1: { + message.code = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -48954,6 +52202,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Status + * @function getTypeUrl + * @memberof google.rpc.Status + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.Status"; + }; + return Status; })(); diff --git a/packages/google-cloud-dataplex/protos/protos.json b/packages/google-cloud-dataplex/protos/protos.json index e6054c23a74..5d120a46639 100644 --- a/packages/google-cloud-dataplex/protos/protos.json +++ b/packages/google-cloud-dataplex/protos/protos.json @@ -5136,6 +5136,10 @@ "syntax": { "type": "string", "id": 12 + }, + "edition": { + "type": "string", + "id": 13 } } }, @@ -5664,6 +5668,13 @@ "default": false } }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, "deprecated": { "type": "bool", "id": 3, @@ -5956,6 +5967,19 @@ "end": { "type": "int32", "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } } } } From 1c06a236b5957aa341dfc597cea7268b74675d97 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 23 Aug 2022 01:10:18 +0000 Subject: [PATCH 217/254] fix: change import long to require (#82) Source-Link: https://github.com/googleapis/synthtool/commit/d229a1258999f599a90a9b674a1c5541e00db588 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:74ab2b3c71ef27e6d8b69b1d0a0c9d31447777b79ac3cd4be82c265b45f37e5e --- .../protos/protos.d.ts | 264 ++- .../protos/protos.js | 1861 ++++++++++++----- .../protos/protos.json | 24 + 3 files changed, 1578 insertions(+), 571 deletions(-) diff --git a/packages/google-cloud-gkeconnect-gateway/protos/protos.d.ts b/packages/google-cloud-gkeconnect-gateway/protos/protos.d.ts index 89242aa1323..ee55f0f2447 100644 --- a/packages/google-cloud-gkeconnect-gateway/protos/protos.d.ts +++ b/packages/google-cloud-gkeconnect-gateway/protos/protos.d.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import * as Long from "long"; +import Long = require("long"); import {protobuf as $protobuf} from "google-gax"; /** Namespace google. */ export namespace google { @@ -123,35 +123,35 @@ export namespace google { namespace GatewayService { /** - * Callback as used by {@link google.cloud.gkeconnect.gateway.v1beta1.GatewayService#getResource}. + * Callback as used by {@link google.cloud.gkeconnect.gateway.v1beta1.GatewayService|getResource}. * @param error Error, if any * @param [response] HttpBody */ type GetResourceCallback = (error: (Error|null), response?: google.api.HttpBody) => void; /** - * Callback as used by {@link google.cloud.gkeconnect.gateway.v1beta1.GatewayService#postResource}. + * Callback as used by {@link google.cloud.gkeconnect.gateway.v1beta1.GatewayService|postResource}. * @param error Error, if any * @param [response] HttpBody */ type PostResourceCallback = (error: (Error|null), response?: google.api.HttpBody) => void; /** - * Callback as used by {@link google.cloud.gkeconnect.gateway.v1beta1.GatewayService#deleteResource}. + * Callback as used by {@link google.cloud.gkeconnect.gateway.v1beta1.GatewayService|deleteResource}. * @param error Error, if any * @param [response] HttpBody */ type DeleteResourceCallback = (error: (Error|null), response?: google.api.HttpBody) => void; /** - * Callback as used by {@link google.cloud.gkeconnect.gateway.v1beta1.GatewayService#putResource}. + * Callback as used by {@link google.cloud.gkeconnect.gateway.v1beta1.GatewayService|putResource}. * @param error Error, if any * @param [response] HttpBody */ type PutResourceCallback = (error: (Error|null), response?: google.api.HttpBody) => void; /** - * Callback as used by {@link google.cloud.gkeconnect.gateway.v1beta1.GatewayService#patchResource}. + * Callback as used by {@link google.cloud.gkeconnect.gateway.v1beta1.GatewayService|patchResource}. * @param error Error, if any * @param [response] HttpBody */ @@ -259,6 +259,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a HttpRule. */ @@ -406,6 +413,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CustomHttpPattern. */ @@ -502,6 +516,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a HttpBody. */ @@ -604,6 +625,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpBody + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -698,6 +726,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FileDescriptorProto. */ @@ -738,6 +773,9 @@ export namespace google { /** FileDescriptorProto syntax */ syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (string|null); } /** Represents a FileDescriptorProto. */ @@ -785,6 +823,9 @@ export namespace google { /** FileDescriptorProto syntax. */ public syntax: string; + /** FileDescriptorProto edition. */ + public edition: string; + /** * Creates a new FileDescriptorProto instance using the specified properties. * @param [properties] Properties to set @@ -854,6 +895,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DescriptorProto. */ @@ -998,6 +1046,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace DescriptorProto { @@ -1102,6 +1157,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ReservedRange. */ @@ -1198,6 +1260,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -1289,6 +1358,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FieldDescriptorProto. */ @@ -1439,6 +1515,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FieldDescriptorProto { @@ -1567,6 +1650,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EnumDescriptorProto. */ @@ -1681,6 +1771,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace EnumDescriptorProto { @@ -1779,6 +1876,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -1882,6 +1986,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ServiceDescriptorProto. */ @@ -1984,6 +2095,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MethodDescriptorProto. */ @@ -2104,6 +2222,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FileOptions. */ @@ -2314,6 +2439,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FileOptions { @@ -2438,6 +2570,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FieldOptions. */ @@ -2455,6 +2594,9 @@ export namespace google { /** FieldOptions lazy */ lazy?: (boolean|null); + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + /** FieldOptions deprecated */ deprecated?: (boolean|null); @@ -2486,6 +2628,9 @@ export namespace google { /** FieldOptions lazy. */ public lazy: boolean; + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + /** FieldOptions deprecated. */ public deprecated: boolean; @@ -2564,6 +2709,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FieldOptions { @@ -2671,6 +2823,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EnumOptions. */ @@ -2773,6 +2932,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EnumValueOptions. */ @@ -2869,6 +3035,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ServiceOptions. */ @@ -2971,6 +3144,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MethodOptions. */ @@ -3079,6 +3259,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace MethodOptions { @@ -3215,6 +3402,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace UninterpretedOption { @@ -3313,6 +3507,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -3404,6 +3605,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace SourceCodeInfo { @@ -3520,6 +3728,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -3611,6 +3826,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace GeneratedCodeInfo { @@ -3629,6 +3851,9 @@ export namespace google { /** Annotation end */ end?: (number|null); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); } /** Represents an Annotation. */ @@ -3652,6 +3877,9 @@ export namespace google { /** Annotation end. */ public end: number; + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + /** * Creates a new Annotation instance using the specified properties. * @param [properties] Properties to set @@ -3721,6 +3949,23 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } } } @@ -3818,6 +4063,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Any + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } } diff --git a/packages/google-cloud-gkeconnect-gateway/protos/protos.js b/packages/google-cloud-gkeconnect-gateway/protos/protos.js index dbeaf13673d..85ebd1c7200 100644 --- a/packages/google-cloud-gkeconnect-gateway/protos/protos.js +++ b/packages/google-cloud-gkeconnect-gateway/protos/protos.js @@ -108,7 +108,7 @@ }; /** - * Callback as used by {@link google.cloud.gkeconnect.gateway.v1beta1.GatewayService#getResource}. + * Callback as used by {@link google.cloud.gkeconnect.gateway.v1beta1.GatewayService|getResource}. * @memberof google.cloud.gkeconnect.gateway.v1beta1.GatewayService * @typedef GetResourceCallback * @type {function} @@ -141,7 +141,7 @@ */ /** - * Callback as used by {@link google.cloud.gkeconnect.gateway.v1beta1.GatewayService#postResource}. + * Callback as used by {@link google.cloud.gkeconnect.gateway.v1beta1.GatewayService|postResource}. * @memberof google.cloud.gkeconnect.gateway.v1beta1.GatewayService * @typedef PostResourceCallback * @type {function} @@ -174,7 +174,7 @@ */ /** - * Callback as used by {@link google.cloud.gkeconnect.gateway.v1beta1.GatewayService#deleteResource}. + * Callback as used by {@link google.cloud.gkeconnect.gateway.v1beta1.GatewayService|deleteResource}. * @memberof google.cloud.gkeconnect.gateway.v1beta1.GatewayService * @typedef DeleteResourceCallback * @type {function} @@ -207,7 +207,7 @@ */ /** - * Callback as used by {@link google.cloud.gkeconnect.gateway.v1beta1.GatewayService#putResource}. + * Callback as used by {@link google.cloud.gkeconnect.gateway.v1beta1.GatewayService|putResource}. * @memberof google.cloud.gkeconnect.gateway.v1beta1.GatewayService * @typedef PutResourceCallback * @type {function} @@ -240,7 +240,7 @@ */ /** - * Callback as used by {@link google.cloud.gkeconnect.gateway.v1beta1.GatewayService#patchResource}. + * Callback as used by {@link google.cloud.gkeconnect.gateway.v1beta1.GatewayService|patchResource}. * @memberof google.cloud.gkeconnect.gateway.v1beta1.GatewayService * @typedef PatchResourceCallback * @type {function} @@ -401,14 +401,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -524,6 +526,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + return Http; })(); @@ -734,38 +751,48 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message["delete"] = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -987,6 +1014,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + return HttpRule; })(); @@ -1093,12 +1135,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -1197,6 +1241,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + return CustomHttpPattern; })(); @@ -1316,17 +1375,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.contentType = reader.string(); - break; - case 2: - message.data = reader.bytes(); - break; - case 3: - if (!(message.extensions && message.extensions.length)) - message.extensions = []; - message.extensions.push($root.google.protobuf.Any.decode(reader, reader.uint32())); - break; + case 1: { + message.contentType = reader.string(); + break; + } + case 2: { + message.data = reader.bytes(); + break; + } + case 3: { + if (!(message.extensions && message.extensions.length)) + message.extensions = []; + message.extensions.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -1397,7 +1459,7 @@ if (object.data != null) if (typeof object.data === "string") $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); - else if (object.data.length) + else if (object.data.length >= 0) message.data = object.data; if (object.extensions) { if (!Array.isArray(object.extensions)) @@ -1460,6 +1522,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for HttpBody + * @function getTypeUrl + * @memberof google.api.HttpBody + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpBody.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpBody"; + }; + return HttpBody; })(); @@ -1569,11 +1646,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -1680,6 +1758,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + return FileDescriptorSet; })(); @@ -1701,6 +1794,7 @@ * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {string|null} [edition] FileDescriptorProto edition */ /** @@ -1821,6 +1915,14 @@ */ FileDescriptorProto.prototype.syntax = ""; + /** + * FileDescriptorProto edition. + * @member {string} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = ""; + /** * Creates a new FileDescriptorProto instance using the specified properties. * @function create @@ -1876,6 +1978,8 @@ writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.edition); return writer; }; @@ -1910,66 +2014,82 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message["package"] = reader.string(); - break; - case 3: - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - case 10: - if (!(message.publicDependency && message.publicDependency.length)) - message.publicDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else message.publicDependency.push(reader.int32()); - } else - message.publicDependency.push(reader.int32()); - break; - case 11: - if (!(message.weakDependency && message.weakDependency.length)) - message.weakDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else message.weakDependency.push(reader.int32()); - } else - message.weakDependency.push(reader.int32()); - break; - case 4: - if (!(message.messageType && message.messageType.length)) - message.messageType = []; - message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 13: { + message.edition = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -2081,6 +2201,9 @@ if (message.syntax != null && message.hasOwnProperty("syntax")) if (!$util.isString(message.syntax)) return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + if (!$util.isString(message.edition)) + return "edition: string expected"; return null; }; @@ -2173,6 +2296,8 @@ } if (object.syntax != null) message.syntax = String(object.syntax); + if (object.edition != null) + message.edition = String(object.edition); return message; }; @@ -2204,6 +2329,7 @@ object.options = null; object.sourceCodeInfo = null; object.syntax = ""; + object.edition = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -2250,6 +2376,8 @@ } if (message.syntax != null && message.hasOwnProperty("syntax")) object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = message.edition; return object; }; @@ -2264,6 +2392,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + return FileDescriptorProto; })(); @@ -2474,52 +2617,62 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.nestedType && message.nestedType.length)) - message.nestedType = []; - message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.extensionRange && message.extensionRange.length)) - message.extensionRange = []; - message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - if (!(message.oneofDecl && message.oneofDecl.length)) - message.oneofDecl = []; - message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -2820,6 +2973,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + DescriptorProto.ExtensionRange = (function() { /** @@ -2934,15 +3102,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -3054,6 +3225,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + return ExtensionRange; })(); @@ -3160,12 +3346,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -3264,6 +3452,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + return ReservedRange; })(); @@ -3364,11 +3567,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -3475,13 +3679,28 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ExtensionRangeOptions; - })(); - - protobuf.FieldDescriptorProto = (function() { - /** - * Properties of a FieldDescriptorProto. + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. * @memberof google.protobuf * @interface IFieldDescriptorProto * @property {string|null} [name] FieldDescriptorProto name @@ -3680,39 +3899,50 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3Optional = reader.bool(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -3999,6 +4229,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + /** * Type enum. * @name google.protobuf.FieldDescriptorProto.Type @@ -4167,12 +4412,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -4276,6 +4523,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + return OneofDescriptorProto; })(); @@ -4421,27 +4683,32 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -4617,6 +4884,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + EnumDescriptorProto.EnumReservedRange = (function() { /** @@ -4720,12 +5002,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -4824,6 +5108,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + return EnumReservedRange; })(); @@ -4944,15 +5243,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -5064,6 +5366,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + return EnumValueDescriptorProto; })(); @@ -5183,17 +5500,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -5323,6 +5643,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + return ServiceDescriptorProto; })(); @@ -5473,24 +5808,30 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -5626,6 +5967,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + return MethodDescriptorProto; })(); @@ -5943,71 +6299,92 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 42: { + message.phpGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -6294,6 +6671,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + /** * OptimizeMode enum. * @name google.protobuf.FileOptions.OptimizeMode @@ -6451,23 +6843,28 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -6608,6 +7005,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + return MessageOptions; })(); @@ -6621,6 +7033,7 @@ * @property {boolean|null} [packed] FieldOptions packed * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy * @property {boolean|null} [deprecated] FieldOptions deprecated * @property {boolean|null} [weak] FieldOptions weak * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption @@ -6674,6 +7087,14 @@ */ FieldOptions.prototype.lazy = false; + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + /** * FieldOptions deprecated. * @member {boolean} deprecated @@ -6734,6 +7155,8 @@ writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); @@ -6764,36 +7187,47 @@ * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + FieldOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -6853,6 +7287,9 @@ if (message.lazy != null && message.hasOwnProperty("lazy")) if (typeof message.lazy !== "boolean") return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; if (message.deprecated != null && message.hasOwnProperty("deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; @@ -6915,6 +7352,8 @@ } if (object.lazy != null) message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); if (object.deprecated != null) message.deprecated = Boolean(object.deprecated); if (object.weak != null) @@ -6954,6 +7393,7 @@ object.lazy = false; object.jstype = options.enums === String ? "JS_NORMAL" : 0; object.weak = false; + object.unverifiedLazy = false; } if (message.ctype != null && message.hasOwnProperty("ctype")) object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; @@ -6967,6 +7407,8 @@ object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; if (message.weak != null && message.hasOwnProperty("weak")) object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -6986,6 +7428,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + /** * CType enum. * @name google.protobuf.FieldOptions.CType @@ -7115,11 +7572,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -7226,6 +7684,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + return OneofOptions; })(); @@ -7345,17 +7818,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -7480,6 +7956,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + return EnumOptions; })(); @@ -7588,14 +8079,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 1: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -7711,6 +8204,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + return EnumValueOptions; })(); @@ -7841,20 +8349,24 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1049: - message[".google.api.defaultHost"] = reader.string(); - break; - case 1050: - message[".google.api.oauthScopes"] = reader.string(); - break; + case 33: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -7987,6 +8499,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + return ServiceOptions; })(); @@ -8130,25 +8657,30 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 72295728: - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); - break; - case 1051: - if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) - message[".google.api.methodSignature"] = []; - message[".google.api.methodSignature"].push(reader.string()); - break; + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -8325,6 +8857,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + /** * IdempotencyLevel enum. * @name google.protobuf.MethodOptions.IdempotencyLevel @@ -8504,29 +9051,36 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = reader.uint64(); - break; - case 5: - message.negativeIntValue = reader.int64(); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + } + case 3: { + message.identifierValue = reader.string(); + break; + } + case 4: { + message.positiveIntValue = reader.uint64(); + break; + } + case 5: { + message.negativeIntValue = reader.int64(); + break; + } + case 6: { + message.doubleValue = reader.double(); + break; + } + case 7: { + message.stringValue = reader.bytes(); + break; + } + case 8: { + message.aggregateValue = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -8639,7 +9193,7 @@ if (object.stringValue != null) if (typeof object.stringValue === "string") $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); - else if (object.stringValue.length) + else if (object.stringValue.length >= 0) message.stringValue = object.stringValue; if (object.aggregateValue != null) message.aggregateValue = String(object.aggregateValue); @@ -8720,6 +9274,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + UninterpretedOption.NamePart = (function() { /** @@ -8821,12 +9390,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -8927,6 +9498,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + return NamePart; })(); @@ -9027,11 +9613,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -9138,6 +9725,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + SourceCodeInfo.Location = (function() { /** @@ -9286,37 +9888,42 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - case 2: - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else message.span.push(reader.int32()); - } else - message.span.push(reader.int32()); - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) - message.leadingDetachedComments = []; - message.leadingDetachedComments.push(reader.string()); - break; + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -9477,6 +10084,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + return Location; })(); @@ -9577,11 +10199,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.annotation && message.annotation.length)) - message.annotation = []; - message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -9688,6 +10311,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + GeneratedCodeInfo.Annotation = (function() { /** @@ -9698,6 +10336,7 @@ * @property {string|null} [sourceFile] Annotation sourceFile * @property {number|null} [begin] Annotation begin * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic */ /** @@ -9748,6 +10387,14 @@ */ Annotation.prototype.end = 0; + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + /** * Creates a new Annotation instance using the specified properties. * @function create @@ -9784,6 +10431,8 @@ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); if (message.end != null && Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); return writer; }; @@ -9818,25 +10467,33 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -9888,6 +10545,15 @@ if (message.end != null && message.hasOwnProperty("end")) if (!$util.isInteger(message.end)) return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -9916,6 +10582,20 @@ message.begin = object.begin | 0; if (object.end != null) message.end = object.end | 0; + switch (object.semantic) { + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } return message; }; @@ -9938,6 +10618,7 @@ object.sourceFile = ""; object.begin = 0; object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; } if (message.path && message.path.length) { object.path = []; @@ -9950,6 +10631,8 @@ object.begin = message.begin; if (message.end != null && message.hasOwnProperty("end")) object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; return object; }; @@ -9964,6 +10647,37 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + return Annotation; })(); @@ -10073,12 +10787,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type_url = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; + case 1: { + message.type_url = reader.string(); + break; + } + case 2: { + message.value = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -10140,7 +10856,7 @@ if (object.value != null) if (typeof object.value === "string") $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) + else if (object.value.length >= 0) message.value = object.value; return message; }; @@ -10186,6 +10902,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Any + * @function getTypeUrl + * @memberof google.protobuf.Any + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Any"; + }; + return Any; })(); diff --git a/packages/google-cloud-gkeconnect-gateway/protos/protos.json b/packages/google-cloud-gkeconnect-gateway/protos/protos.json index 4457ae24728..65b66014583 100644 --- a/packages/google-cloud-gkeconnect-gateway/protos/protos.json +++ b/packages/google-cloud-gkeconnect-gateway/protos/protos.json @@ -319,6 +319,10 @@ "syntax": { "type": "string", "id": 12 + }, + "edition": { + "type": "string", + "id": 13 } } }, @@ -847,6 +851,13 @@ "default": false } }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, "deprecated": { "type": "bool", "id": 3, @@ -1139,6 +1150,19 @@ "end": { "type": "int32", "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } } } } From f0d0c4df0d48416b2572a199b0ffd114d134d701 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 23 Aug 2022 07:34:19 +0000 Subject: [PATCH 218/254] fix: change import long to require (#136) Source-Link: https://github.com/googleapis/synthtool/commit/d229a1258999f599a90a9b674a1c5541e00db588 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:74ab2b3c71ef27e6d8b69b1d0a0c9d31447777b79ac3cd4be82c265b45f37e5e --- .../protos/protos.d.ts | 549 +++- .../protos/protos.js | 2896 +++++++++++++---- .../protos/protos.json | 65 + 3 files changed, 2807 insertions(+), 703 deletions(-) diff --git a/packages/google-cloud-policytroubleshooter/protos/protos.d.ts b/packages/google-cloud-policytroubleshooter/protos/protos.d.ts index 9a58bbde96b..e8cc945a8ff 100644 --- a/packages/google-cloud-policytroubleshooter/protos/protos.d.ts +++ b/packages/google-cloud-policytroubleshooter/protos/protos.d.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import * as Long from "long"; +import Long = require("long"); import {protobuf as $protobuf} from "google-gax"; /** Namespace google. */ export namespace google { @@ -64,7 +64,7 @@ export namespace google { namespace IamChecker { /** - * Callback as used by {@link google.cloud.policytroubleshooter.v1.IamChecker#troubleshootIamPolicy}. + * Callback as used by {@link google.cloud.policytroubleshooter.v1.IamChecker|troubleshootIamPolicy}. * @param error Error, if any * @param [response] TroubleshootIamPolicyResponse */ @@ -159,6 +159,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TroubleshootIamPolicyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a TroubleshootIamPolicyResponse. */ @@ -255,6 +262,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TroubleshootIamPolicyResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AccessTuple. */ @@ -357,6 +371,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessTuple + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an ExplainedPolicy. */ @@ -471,6 +492,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExplainedPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BindingExplanation. */ @@ -597,6 +625,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BindingExplanation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace BindingExplanation { @@ -695,6 +730,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnnotatedMembership + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** RolePermission enum. */ @@ -843,6 +885,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a HttpRule. */ @@ -990,6 +1039,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CustomHttpPattern. */ @@ -1086,6 +1142,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -1180,6 +1243,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FileDescriptorProto. */ @@ -1220,6 +1290,9 @@ export namespace google { /** FileDescriptorProto syntax */ syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (string|null); } /** Represents a FileDescriptorProto. */ @@ -1267,6 +1340,9 @@ export namespace google { /** FileDescriptorProto syntax. */ public syntax: string; + /** FileDescriptorProto edition. */ + public edition: string; + /** * Creates a new FileDescriptorProto instance using the specified properties. * @param [properties] Properties to set @@ -1336,6 +1412,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DescriptorProto. */ @@ -1480,6 +1563,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace DescriptorProto { @@ -1584,6 +1674,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ReservedRange. */ @@ -1680,6 +1777,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -1771,6 +1875,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FieldDescriptorProto. */ @@ -1921,6 +2032,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FieldDescriptorProto { @@ -2049,6 +2167,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EnumDescriptorProto. */ @@ -2163,6 +2288,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace EnumDescriptorProto { @@ -2261,6 +2393,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -2364,6 +2503,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ServiceDescriptorProto. */ @@ -2466,6 +2612,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MethodDescriptorProto. */ @@ -2586,6 +2739,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FileOptions. */ @@ -2796,6 +2956,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FileOptions { @@ -2920,6 +3087,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FieldOptions. */ @@ -2937,6 +3111,9 @@ export namespace google { /** FieldOptions lazy */ lazy?: (boolean|null); + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + /** FieldOptions deprecated */ deprecated?: (boolean|null); @@ -2971,6 +3148,9 @@ export namespace google { /** FieldOptions lazy. */ public lazy: boolean; + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + /** FieldOptions deprecated. */ public deprecated: boolean; @@ -3049,6 +3229,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FieldOptions { @@ -3156,6 +3343,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EnumOptions. */ @@ -3258,6 +3452,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EnumValueOptions. */ @@ -3354,6 +3555,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ServiceOptions. */ @@ -3456,6 +3664,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MethodOptions. */ @@ -3564,6 +3779,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace MethodOptions { @@ -3700,6 +3922,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace UninterpretedOption { @@ -3798,6 +4027,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -3889,6 +4125,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace SourceCodeInfo { @@ -4005,6 +4248,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -4096,6 +4346,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace GeneratedCodeInfo { @@ -4114,6 +4371,9 @@ export namespace google { /** Annotation end */ end?: (number|null); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); } /** Represents an Annotation. */ @@ -4137,6 +4397,9 @@ export namespace google { /** Annotation end. */ public end: number; + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + /** * Creates a new Annotation instance using the specified properties. * @param [properties] Properties to set @@ -4206,6 +4469,23 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } } } } @@ -4225,6 +4505,9 @@ export namespace google { /** Policy bindings */ bindings?: (google.iam.v1.IBinding[]|null); + /** Policy auditConfigs */ + auditConfigs?: (google.iam.v1.IAuditConfig[]|null); + /** Policy etag */ etag?: (Uint8Array|string|null); } @@ -4244,6 +4527,9 @@ export namespace google { /** Policy bindings. */ public bindings: google.iam.v1.IBinding[]; + /** Policy auditConfigs. */ + public auditConfigs: google.iam.v1.IAuditConfig[]; + /** Policy etag. */ public etag: (Uint8Array|string); @@ -4316,6 +4602,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Policy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Binding. */ @@ -4418,6 +4711,230 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Binding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AuditConfig. */ + interface IAuditConfig { + + /** AuditConfig service */ + service?: (string|null); + + /** AuditConfig auditLogConfigs */ + auditLogConfigs?: (google.iam.v1.IAuditLogConfig[]|null); + } + + /** Represents an AuditConfig. */ + class AuditConfig implements IAuditConfig { + + /** + * Constructs a new AuditConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IAuditConfig); + + /** AuditConfig service. */ + public service: string; + + /** AuditConfig auditLogConfigs. */ + public auditLogConfigs: google.iam.v1.IAuditLogConfig[]; + + /** + * Creates a new AuditConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AuditConfig instance + */ + public static create(properties?: google.iam.v1.IAuditConfig): google.iam.v1.AuditConfig; + + /** + * Encodes the specified AuditConfig message. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @param message AuditConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @param message AuditConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuditConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditConfig; + + /** + * Decodes an AuditConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditConfig; + + /** + * Verifies an AuditConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AuditConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuditConfig + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditConfig; + + /** + * Creates a plain object from an AuditConfig message. Also converts values to other types if specified. + * @param message AuditConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.AuditConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuditConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuditConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AuditLogConfig. */ + interface IAuditLogConfig { + + /** AuditLogConfig logType */ + logType?: (google.iam.v1.AuditLogConfig.LogType|keyof typeof google.iam.v1.AuditLogConfig.LogType|null); + + /** AuditLogConfig exemptedMembers */ + exemptedMembers?: (string[]|null); + } + + /** Represents an AuditLogConfig. */ + class AuditLogConfig implements IAuditLogConfig { + + /** + * Constructs a new AuditLogConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IAuditLogConfig); + + /** AuditLogConfig logType. */ + public logType: (google.iam.v1.AuditLogConfig.LogType|keyof typeof google.iam.v1.AuditLogConfig.LogType); + + /** AuditLogConfig exemptedMembers. */ + public exemptedMembers: string[]; + + /** + * Creates a new AuditLogConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AuditLogConfig instance + */ + public static create(properties?: google.iam.v1.IAuditLogConfig): google.iam.v1.AuditLogConfig; + + /** + * Encodes the specified AuditLogConfig message. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. + * @param message AuditLogConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IAuditLogConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuditLogConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. + * @param message AuditLogConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IAuditLogConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuditLogConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuditLogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditLogConfig; + + /** + * Decodes an AuditLogConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuditLogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditLogConfig; + + /** + * Verifies an AuditLogConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AuditLogConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuditLogConfig + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditLogConfig; + + /** + * Creates a plain object from an AuditLogConfig message. Also converts values to other types if specified. + * @param message AuditLogConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.AuditLogConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuditLogConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuditLogConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AuditLogConfig { + + /** LogType enum. */ + enum LogType { + LOG_TYPE_UNSPECIFIED = 0, + ADMIN_READ = 1, + DATA_WRITE = 2, + DATA_READ = 3 + } } /** Properties of a PolicyDelta. */ @@ -4514,6 +5031,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PolicyDelta + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BindingDelta. */ @@ -4622,6 +5146,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BindingDelta + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace BindingDelta { @@ -4740,6 +5271,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuditConfigDelta + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace AuditConfigDelta { @@ -4863,6 +5401,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Expr + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } } diff --git a/packages/google-cloud-policytroubleshooter/protos/protos.js b/packages/google-cloud-policytroubleshooter/protos/protos.js index 81d9211ee89..bd1cc6b2c08 100644 --- a/packages/google-cloud-policytroubleshooter/protos/protos.js +++ b/packages/google-cloud-policytroubleshooter/protos/protos.js @@ -99,7 +99,7 @@ }; /** - * Callback as used by {@link google.cloud.policytroubleshooter.v1.IamChecker#troubleshootIamPolicy}. + * Callback as used by {@link google.cloud.policytroubleshooter.v1.IamChecker|troubleshootIamPolicy}. * @memberof google.cloud.policytroubleshooter.v1.IamChecker * @typedef TroubleshootIamPolicyCallback * @type {function} @@ -226,9 +226,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.accessTuple = $root.google.cloud.policytroubleshooter.v1.AccessTuple.decode(reader, reader.uint32()); - break; + case 1: { + message.accessTuple = $root.google.cloud.policytroubleshooter.v1.AccessTuple.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -323,6 +324,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TroubleshootIamPolicyRequest + * @function getTypeUrl + * @memberof google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TroubleshootIamPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest"; + }; + return TroubleshootIamPolicyRequest; })(); @@ -431,14 +447,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.access = reader.int32(); - break; - case 2: - if (!(message.explainedPolicies && message.explainedPolicies.length)) - message.explainedPolicies = []; - message.explainedPolicies.push($root.google.cloud.policytroubleshooter.v1.ExplainedPolicy.decode(reader, reader.uint32())); - break; + case 1: { + message.access = reader.int32(); + break; + } + case 2: { + if (!(message.explainedPolicies && message.explainedPolicies.length)) + message.explainedPolicies = []; + message.explainedPolicies.push($root.google.cloud.policytroubleshooter.v1.ExplainedPolicy.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -582,6 +600,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TroubleshootIamPolicyResponse + * @function getTypeUrl + * @memberof google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TroubleshootIamPolicyResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse"; + }; + return TroubleshootIamPolicyResponse; })(); @@ -699,15 +732,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.principal = reader.string(); - break; - case 2: - message.fullResourceName = reader.string(); - break; - case 3: - message.permission = reader.string(); - break; + case 1: { + message.principal = reader.string(); + break; + } + case 2: { + message.fullResourceName = reader.string(); + break; + } + case 3: { + message.permission = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -814,6 +850,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AccessTuple + * @function getTypeUrl + * @memberof google.cloud.policytroubleshooter.v1.AccessTuple + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccessTuple.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.policytroubleshooter.v1.AccessTuple"; + }; + return AccessTuple; })(); @@ -955,23 +1006,28 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.access = reader.int32(); - break; - case 2: - message.fullResourceName = reader.string(); - break; - case 3: - message.policy = $root.google.iam.v1.Policy.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.bindingExplanations && message.bindingExplanations.length)) - message.bindingExplanations = []; - message.bindingExplanations.push($root.google.cloud.policytroubleshooter.v1.BindingExplanation.decode(reader, reader.uint32())); - break; - case 5: - message.relevance = reader.int32(); - break; + case 1: { + message.access = reader.int32(); + break; + } + case 2: { + message.fullResourceName = reader.string(); + break; + } + case 3: { + message.policy = $root.google.iam.v1.Policy.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.bindingExplanations && message.bindingExplanations.length)) + message.bindingExplanations = []; + message.bindingExplanations.push($root.google.cloud.policytroubleshooter.v1.BindingExplanation.decode(reader, reader.uint32())); + break; + } + case 5: { + message.relevance = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -1163,6 +1219,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ExplainedPolicy + * @function getTypeUrl + * @memberof google.cloud.policytroubleshooter.v1.ExplainedPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExplainedPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.policytroubleshooter.v1.ExplainedPolicy"; + }; + return ExplainedPolicy; })(); @@ -1328,46 +1399,53 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.access = reader.int32(); - break; - case 2: - message.role = reader.string(); - break; - case 3: - message.rolePermission = reader.int32(); - break; - case 4: - message.rolePermissionRelevance = reader.int32(); - break; - case 5: - if (message.memberships === $util.emptyObject) - message.memberships = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + message.access = reader.int32(); + break; + } + case 2: { + message.role = reader.string(); + break; + } + case 3: { + message.rolePermission = reader.int32(); + break; + } + case 4: { + message.rolePermissionRelevance = reader.int32(); + break; + } + case 5: { + if (message.memberships === $util.emptyObject) + message.memberships = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.memberships[key] = value; + break; + } + case 6: { + message.relevance = reader.int32(); + break; + } + case 7: { + message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); + break; } - message.memberships[key] = value; - break; - case 6: - message.relevance = reader.int32(); - break; - case 7: - message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -1618,6 +1696,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BindingExplanation + * @function getTypeUrl + * @memberof google.cloud.policytroubleshooter.v1.BindingExplanation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BindingExplanation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.policytroubleshooter.v1.BindingExplanation"; + }; + BindingExplanation.AnnotatedMembership = (function() { /** @@ -1721,12 +1814,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.membership = reader.int32(); - break; - case 2: - message.relevance = reader.int32(); - break; + case 1: { + message.membership = reader.int32(); + break; + } + case 2: { + message.relevance = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -1871,6 +1966,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AnnotatedMembership + * @function getTypeUrl + * @memberof google.cloud.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnnotatedMembership.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership"; + }; + return AnnotatedMembership; })(); @@ -2100,14 +2210,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -2223,6 +2335,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + return Http; })(); @@ -2433,38 +2560,48 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message["delete"] = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -2686,6 +2823,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + return HttpRule; })(); @@ -2792,12 +2944,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -2896,6 +3050,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + return CustomHttpPattern; })(); @@ -3005,11 +3174,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -3116,6 +3286,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + return FileDescriptorSet; })(); @@ -3137,6 +3322,7 @@ * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {string|null} [edition] FileDescriptorProto edition */ /** @@ -3257,6 +3443,14 @@ */ FileDescriptorProto.prototype.syntax = ""; + /** + * FileDescriptorProto edition. + * @member {string} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = ""; + /** * Creates a new FileDescriptorProto instance using the specified properties. * @function create @@ -3312,6 +3506,8 @@ writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.edition); return writer; }; @@ -3346,66 +3542,82 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message["package"] = reader.string(); - break; - case 3: - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - case 10: - if (!(message.publicDependency && message.publicDependency.length)) - message.publicDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else message.publicDependency.push(reader.int32()); - } else - message.publicDependency.push(reader.int32()); - break; - case 11: - if (!(message.weakDependency && message.weakDependency.length)) - message.weakDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else message.weakDependency.push(reader.int32()); - } else - message.weakDependency.push(reader.int32()); - break; - case 4: - if (!(message.messageType && message.messageType.length)) - message.messageType = []; - message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 13: { + message.edition = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -3517,6 +3729,9 @@ if (message.syntax != null && message.hasOwnProperty("syntax")) if (!$util.isString(message.syntax)) return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + if (!$util.isString(message.edition)) + return "edition: string expected"; return null; }; @@ -3609,6 +3824,8 @@ } if (object.syntax != null) message.syntax = String(object.syntax); + if (object.edition != null) + message.edition = String(object.edition); return message; }; @@ -3640,6 +3857,7 @@ object.options = null; object.sourceCodeInfo = null; object.syntax = ""; + object.edition = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -3686,6 +3904,8 @@ } if (message.syntax != null && message.hasOwnProperty("syntax")) object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = message.edition; return object; }; @@ -3700,6 +3920,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + return FileDescriptorProto; })(); @@ -3910,52 +4145,62 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.nestedType && message.nestedType.length)) - message.nestedType = []; - message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.extensionRange && message.extensionRange.length)) - message.extensionRange = []; - message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - if (!(message.oneofDecl && message.oneofDecl.length)) - message.oneofDecl = []; - message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -4256,6 +4501,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + DescriptorProto.ExtensionRange = (function() { /** @@ -4370,15 +4630,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -4490,6 +4753,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + return ExtensionRange; })(); @@ -4596,12 +4874,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -4700,6 +4980,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + return ReservedRange; })(); @@ -4800,11 +5095,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -4911,6 +5207,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + return ExtensionRangeOptions; })(); @@ -5116,39 +5427,50 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3Optional = reader.bool(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -5435,6 +5757,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + /** * Type enum. * @name google.protobuf.FieldDescriptorProto.Type @@ -5603,12 +5940,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -5712,6 +6051,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + return OneofDescriptorProto; })(); @@ -5857,27 +6211,32 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -6053,6 +6412,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + EnumDescriptorProto.EnumReservedRange = (function() { /** @@ -6156,12 +6530,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -6260,6 +6636,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + return EnumReservedRange; })(); @@ -6380,15 +6771,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -6500,6 +6894,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + return EnumValueDescriptorProto; })(); @@ -6619,19 +7028,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; } } @@ -6759,6 +7171,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + return ServiceDescriptorProto; })(); @@ -6909,24 +7336,30 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -7062,6 +7495,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + return MethodDescriptorProto; })(); @@ -7379,71 +7827,92 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 42: { + message.phpGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -7730,6 +8199,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + /** * OptimizeMode enum. * @name google.protobuf.FileOptions.OptimizeMode @@ -7887,23 +8371,28 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -8044,6 +8533,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + return MessageOptions; })(); @@ -8057,6 +8561,7 @@ * @property {boolean|null} [packed] FieldOptions packed * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy * @property {boolean|null} [deprecated] FieldOptions deprecated * @property {boolean|null} [weak] FieldOptions weak * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption @@ -8112,6 +8617,14 @@ */ FieldOptions.prototype.lazy = false; + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + /** * FieldOptions deprecated. * @member {boolean} deprecated @@ -8180,6 +8693,8 @@ writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); @@ -8223,39 +8738,51 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1052: - if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) - message[".google.api.fieldBehavior"] = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else message[".google.api.fieldBehavior"].push(reader.int32()); - } else - message[".google.api.fieldBehavior"].push(reader.int32()); - break; + break; + } default: reader.skipType(tag & 7); break; @@ -8315,6 +8842,9 @@ if (message.lazy != null && message.hasOwnProperty("lazy")) if (typeof message.lazy !== "boolean") return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; if (message.deprecated != null && message.hasOwnProperty("deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; @@ -8395,6 +8925,8 @@ } if (object.lazy != null) message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); if (object.deprecated != null) message.deprecated = Boolean(object.deprecated); if (object.weak != null) @@ -8477,6 +9009,7 @@ object.lazy = false; object.jstype = options.enums === String ? "JS_NORMAL" : 0; object.weak = false; + object.unverifiedLazy = false; } if (message.ctype != null && message.hasOwnProperty("ctype")) object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; @@ -8490,6 +9023,8 @@ object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; if (message.weak != null && message.hasOwnProperty("weak")) object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -8514,6 +9049,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + /** * CType enum. * @name google.protobuf.FieldOptions.CType @@ -8643,11 +9193,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -8754,6 +9305,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + return OneofOptions; })(); @@ -8873,17 +9439,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -9008,6 +9577,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + return EnumOptions; })(); @@ -9116,14 +9700,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 1: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -9239,6 +9825,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + return EnumValueOptions; })(); @@ -9369,20 +9970,24 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1049: - message[".google.api.defaultHost"] = reader.string(); - break; - case 1050: - message[".google.api.oauthScopes"] = reader.string(); - break; + case 33: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -9515,13 +10120,28 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ServiceOptions; - })(); - - protobuf.MethodOptions = (function() { - /** - * Properties of a MethodOptions. + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. * @memberof google.protobuf * @interface IMethodOptions * @property {boolean|null} [deprecated] MethodOptions deprecated @@ -9658,25 +10278,30 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 72295728: - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); - break; - case 1051: - if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) - message[".google.api.methodSignature"] = []; - message[".google.api.methodSignature"].push(reader.string()); - break; + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -9853,6 +10478,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + /** * IdempotencyLevel enum. * @name google.protobuf.MethodOptions.IdempotencyLevel @@ -10032,29 +10672,36 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = reader.uint64(); - break; - case 5: - message.negativeIntValue = reader.int64(); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + } + case 3: { + message.identifierValue = reader.string(); + break; + } + case 4: { + message.positiveIntValue = reader.uint64(); + break; + } + case 5: { + message.negativeIntValue = reader.int64(); + break; + } + case 6: { + message.doubleValue = reader.double(); + break; + } + case 7: { + message.stringValue = reader.bytes(); + break; + } + case 8: { + message.aggregateValue = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -10167,7 +10814,7 @@ if (object.stringValue != null) if (typeof object.stringValue === "string") $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); - else if (object.stringValue.length) + else if (object.stringValue.length >= 0) message.stringValue = object.stringValue; if (object.aggregateValue != null) message.aggregateValue = String(object.aggregateValue); @@ -10248,6 +10895,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + UninterpretedOption.NamePart = (function() { /** @@ -10349,12 +11011,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -10455,6 +11119,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + return NamePart; })(); @@ -10555,11 +11234,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -10666,6 +11346,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + SourceCodeInfo.Location = (function() { /** @@ -10814,37 +11509,42 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - case 2: - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else message.span.push(reader.int32()); - } else - message.span.push(reader.int32()); - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) - message.leadingDetachedComments = []; - message.leadingDetachedComments.push(reader.string()); - break; + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -11005,6 +11705,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + return Location; })(); @@ -11105,11 +11820,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.annotation && message.annotation.length)) - message.annotation = []; - message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -11216,6 +11932,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + GeneratedCodeInfo.Annotation = (function() { /** @@ -11226,6 +11957,7 @@ * @property {string|null} [sourceFile] Annotation sourceFile * @property {number|null} [begin] Annotation begin * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic */ /** @@ -11276,6 +12008,14 @@ */ Annotation.prototype.end = 0; + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + /** * Creates a new Annotation instance using the specified properties. * @function create @@ -11312,6 +12052,8 @@ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); if (message.end != null && Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); return writer; }; @@ -11346,25 +12088,33 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -11416,6 +12166,15 @@ if (message.end != null && message.hasOwnProperty("end")) if (!$util.isInteger(message.end)) return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -11444,6 +12203,20 @@ message.begin = object.begin | 0; if (object.end != null) message.end = object.end | 0; + switch (object.semantic) { + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } return message; }; @@ -11466,6 +12239,7 @@ object.sourceFile = ""; object.begin = 0; object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; } if (message.path && message.path.length) { object.path = []; @@ -11478,6 +12252,8 @@ object.begin = message.begin; if (message.end != null && message.hasOwnProperty("end")) object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; return object; }; @@ -11492,6 +12268,37 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + return Annotation; })(); @@ -11527,6 +12334,7 @@ * @interface IPolicy * @property {number|null} [version] Policy version * @property {Array.|null} [bindings] Policy bindings + * @property {Array.|null} [auditConfigs] Policy auditConfigs * @property {Uint8Array|null} [etag] Policy etag */ @@ -11540,6 +12348,7 @@ */ function Policy(properties) { this.bindings = []; + this.auditConfigs = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11562,6 +12371,14 @@ */ Policy.prototype.bindings = $util.emptyArray; + /** + * Policy auditConfigs. + * @member {Array.} auditConfigs + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.auditConfigs = $util.emptyArray; + /** * Policy etag. * @member {Uint8Array} etag @@ -11601,6 +12418,9 @@ if (message.bindings != null && message.bindings.length) for (var i = 0; i < message.bindings.length; ++i) $root.google.iam.v1.Binding.encode(message.bindings[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.auditConfigs != null && message.auditConfigs.length) + for (var i = 0; i < message.auditConfigs.length; ++i) + $root.google.iam.v1.AuditConfig.encode(message.auditConfigs[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -11635,17 +12455,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.version = reader.int32(); - break; - case 4: - if (!(message.bindings && message.bindings.length)) - message.bindings = []; - message.bindings.push($root.google.iam.v1.Binding.decode(reader, reader.uint32())); - break; - case 3: - message.etag = reader.bytes(); - break; + case 1: { + message.version = reader.int32(); + break; + } + case 4: { + if (!(message.bindings && message.bindings.length)) + message.bindings = []; + message.bindings.push($root.google.iam.v1.Binding.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.auditConfigs && message.auditConfigs.length)) + message.auditConfigs = []; + message.auditConfigs.push($root.google.iam.v1.AuditConfig.decode(reader, reader.uint32())); + break; + } + case 3: { + message.etag = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -11693,6 +12522,15 @@ return "bindings." + error; } } + if (message.auditConfigs != null && message.hasOwnProperty("auditConfigs")) { + if (!Array.isArray(message.auditConfigs)) + return "auditConfigs: array expected"; + for (var i = 0; i < message.auditConfigs.length; ++i) { + var error = $root.google.iam.v1.AuditConfig.verify(message.auditConfigs[i]); + if (error) + return "auditConfigs." + error; + } + } if (message.etag != null && message.hasOwnProperty("etag")) if (!(message.etag && typeof message.etag.length === "number" || $util.isString(message.etag))) return "etag: buffer expected"; @@ -11723,10 +12561,20 @@ message.bindings[i] = $root.google.iam.v1.Binding.fromObject(object.bindings[i]); } } + if (object.auditConfigs) { + if (!Array.isArray(object.auditConfigs)) + throw TypeError(".google.iam.v1.Policy.auditConfigs: array expected"); + message.auditConfigs = []; + for (var i = 0; i < object.auditConfigs.length; ++i) { + if (typeof object.auditConfigs[i] !== "object") + throw TypeError(".google.iam.v1.Policy.auditConfigs: object expected"); + message.auditConfigs[i] = $root.google.iam.v1.AuditConfig.fromObject(object.auditConfigs[i]); + } + } if (object.etag != null) if (typeof object.etag === "string") $util.base64.decode(object.etag, message.etag = $util.newBuffer($util.base64.length(object.etag)), 0); - else if (object.etag.length) + else if (object.etag.length >= 0) message.etag = object.etag; return message; }; @@ -11744,8 +12592,10 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.bindings = []; + object.auditConfigs = []; + } if (options.defaults) { object.version = 0; if (options.bytes === String) @@ -11765,6 +12615,11 @@ for (var j = 0; j < message.bindings.length; ++j) object.bindings[j] = $root.google.iam.v1.Binding.toObject(message.bindings[j], options); } + if (message.auditConfigs && message.auditConfigs.length) { + object.auditConfigs = []; + for (var j = 0; j < message.auditConfigs.length; ++j) + object.auditConfigs[j] = $root.google.iam.v1.AuditConfig.toObject(message.auditConfigs[j], options); + } return object; }; @@ -11779,6 +12634,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Policy + * @function getTypeUrl + * @memberof google.iam.v1.Policy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Policy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.Policy"; + }; + return Policy; })(); @@ -11898,17 +12768,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.role = reader.string(); - break; - case 2: - if (!(message.members && message.members.length)) - message.members = []; - message.members.push(reader.string()); - break; - case 3: - message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); - break; + case 1: { + message.role = reader.string(); + break; + } + case 2: { + if (!(message.members && message.members.length)) + message.members = []; + message.members.push(reader.string()); + break; + } + case 3: { + message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -12033,16 +12906,563 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Binding + * @function getTypeUrl + * @memberof google.iam.v1.Binding + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Binding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.Binding"; + }; + return Binding; })(); - v1.PolicyDelta = (function() { + v1.AuditConfig = (function() { /** - * Properties of a PolicyDelta. + * Properties of an AuditConfig. * @memberof google.iam.v1 - * @interface IPolicyDelta - * @property {Array.|null} [bindingDeltas] PolicyDelta bindingDeltas + * @interface IAuditConfig + * @property {string|null} [service] AuditConfig service + * @property {Array.|null} [auditLogConfigs] AuditConfig auditLogConfigs + */ + + /** + * Constructs a new AuditConfig. + * @memberof google.iam.v1 + * @classdesc Represents an AuditConfig. + * @implements IAuditConfig + * @constructor + * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set + */ + function AuditConfig(properties) { + this.auditLogConfigs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuditConfig service. + * @member {string} service + * @memberof google.iam.v1.AuditConfig + * @instance + */ + AuditConfig.prototype.service = ""; + + /** + * AuditConfig auditLogConfigs. + * @member {Array.} auditLogConfigs + * @memberof google.iam.v1.AuditConfig + * @instance + */ + AuditConfig.prototype.auditLogConfigs = $util.emptyArray; + + /** + * Creates a new AuditConfig instance using the specified properties. + * @function create + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set + * @returns {google.iam.v1.AuditConfig} AuditConfig instance + */ + AuditConfig.create = function create(properties) { + return new AuditConfig(properties); + }; + + /** + * Encodes the specified AuditConfig message. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); + if (message.auditLogConfigs != null && message.auditLogConfigs.length) + for (var i = 0; i < message.auditLogConfigs.length; ++i) + $root.google.iam.v1.AuditLogConfig.encode(message.auditLogConfigs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuditConfig message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.AuditConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.AuditConfig} AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.service = reader.string(); + break; + } + case 3: { + if (!(message.auditLogConfigs && message.auditLogConfigs.length)) + message.auditLogConfigs = []; + message.auditLogConfigs.push($root.google.iam.v1.AuditLogConfig.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuditConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.AuditConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.AuditConfig} AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuditConfig message. + * @function verify + * @memberof google.iam.v1.AuditConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuditConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + if (message.auditLogConfigs != null && message.hasOwnProperty("auditLogConfigs")) { + if (!Array.isArray(message.auditLogConfigs)) + return "auditLogConfigs: array expected"; + for (var i = 0; i < message.auditLogConfigs.length; ++i) { + var error = $root.google.iam.v1.AuditLogConfig.verify(message.auditLogConfigs[i]); + if (error) + return "auditLogConfigs." + error; + } + } + return null; + }; + + /** + * Creates an AuditConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.AuditConfig + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.AuditConfig} AuditConfig + */ + AuditConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.AuditConfig) + return object; + var message = new $root.google.iam.v1.AuditConfig(); + if (object.service != null) + message.service = String(object.service); + if (object.auditLogConfigs) { + if (!Array.isArray(object.auditLogConfigs)) + throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: array expected"); + message.auditLogConfigs = []; + for (var i = 0; i < object.auditLogConfigs.length; ++i) { + if (typeof object.auditLogConfigs[i] !== "object") + throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: object expected"); + message.auditLogConfigs[i] = $root.google.iam.v1.AuditLogConfig.fromObject(object.auditLogConfigs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AuditConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.AuditConfig} message AuditConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuditConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.auditLogConfigs = []; + if (options.defaults) + object.service = ""; + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + if (message.auditLogConfigs && message.auditLogConfigs.length) { + object.auditLogConfigs = []; + for (var j = 0; j < message.auditLogConfigs.length; ++j) + object.auditLogConfigs[j] = $root.google.iam.v1.AuditLogConfig.toObject(message.auditLogConfigs[j], options); + } + return object; + }; + + /** + * Converts this AuditConfig to JSON. + * @function toJSON + * @memberof google.iam.v1.AuditConfig + * @instance + * @returns {Object.} JSON object + */ + AuditConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AuditConfig + * @function getTypeUrl + * @memberof google.iam.v1.AuditConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuditConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.AuditConfig"; + }; + + return AuditConfig; + })(); + + v1.AuditLogConfig = (function() { + + /** + * Properties of an AuditLogConfig. + * @memberof google.iam.v1 + * @interface IAuditLogConfig + * @property {google.iam.v1.AuditLogConfig.LogType|null} [logType] AuditLogConfig logType + * @property {Array.|null} [exemptedMembers] AuditLogConfig exemptedMembers + */ + + /** + * Constructs a new AuditLogConfig. + * @memberof google.iam.v1 + * @classdesc Represents an AuditLogConfig. + * @implements IAuditLogConfig + * @constructor + * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set + */ + function AuditLogConfig(properties) { + this.exemptedMembers = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuditLogConfig logType. + * @member {google.iam.v1.AuditLogConfig.LogType} logType + * @memberof google.iam.v1.AuditLogConfig + * @instance + */ + AuditLogConfig.prototype.logType = 0; + + /** + * AuditLogConfig exemptedMembers. + * @member {Array.} exemptedMembers + * @memberof google.iam.v1.AuditLogConfig + * @instance + */ + AuditLogConfig.prototype.exemptedMembers = $util.emptyArray; + + /** + * Creates a new AuditLogConfig instance using the specified properties. + * @function create + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig instance + */ + AuditLogConfig.create = function create(properties) { + return new AuditLogConfig(properties); + }; + + /** + * Encodes the specified AuditLogConfig message. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditLogConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.logType); + if (message.exemptedMembers != null && message.exemptedMembers.length) + for (var i = 0; i < message.exemptedMembers.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.exemptedMembers[i]); + return writer; + }; + + /** + * Encodes the specified AuditLogConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditLogConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuditLogConfig message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditLogConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditLogConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.logType = reader.int32(); + break; + } + case 2: { + if (!(message.exemptedMembers && message.exemptedMembers.length)) + message.exemptedMembers = []; + message.exemptedMembers.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuditLogConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditLogConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuditLogConfig message. + * @function verify + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuditLogConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.logType != null && message.hasOwnProperty("logType")) + switch (message.logType) { + default: + return "logType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.exemptedMembers != null && message.hasOwnProperty("exemptedMembers")) { + if (!Array.isArray(message.exemptedMembers)) + return "exemptedMembers: array expected"; + for (var i = 0; i < message.exemptedMembers.length; ++i) + if (!$util.isString(message.exemptedMembers[i])) + return "exemptedMembers: string[] expected"; + } + return null; + }; + + /** + * Creates an AuditLogConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig + */ + AuditLogConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.AuditLogConfig) + return object; + var message = new $root.google.iam.v1.AuditLogConfig(); + switch (object.logType) { + case "LOG_TYPE_UNSPECIFIED": + case 0: + message.logType = 0; + break; + case "ADMIN_READ": + case 1: + message.logType = 1; + break; + case "DATA_WRITE": + case 2: + message.logType = 2; + break; + case "DATA_READ": + case 3: + message.logType = 3; + break; + } + if (object.exemptedMembers) { + if (!Array.isArray(object.exemptedMembers)) + throw TypeError(".google.iam.v1.AuditLogConfig.exemptedMembers: array expected"); + message.exemptedMembers = []; + for (var i = 0; i < object.exemptedMembers.length; ++i) + message.exemptedMembers[i] = String(object.exemptedMembers[i]); + } + return message; + }; + + /** + * Creates a plain object from an AuditLogConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {google.iam.v1.AuditLogConfig} message AuditLogConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuditLogConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.exemptedMembers = []; + if (options.defaults) + object.logType = options.enums === String ? "LOG_TYPE_UNSPECIFIED" : 0; + if (message.logType != null && message.hasOwnProperty("logType")) + object.logType = options.enums === String ? $root.google.iam.v1.AuditLogConfig.LogType[message.logType] : message.logType; + if (message.exemptedMembers && message.exemptedMembers.length) { + object.exemptedMembers = []; + for (var j = 0; j < message.exemptedMembers.length; ++j) + object.exemptedMembers[j] = message.exemptedMembers[j]; + } + return object; + }; + + /** + * Converts this AuditLogConfig to JSON. + * @function toJSON + * @memberof google.iam.v1.AuditLogConfig + * @instance + * @returns {Object.} JSON object + */ + AuditLogConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AuditLogConfig + * @function getTypeUrl + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuditLogConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.AuditLogConfig"; + }; + + /** + * LogType enum. + * @name google.iam.v1.AuditLogConfig.LogType + * @enum {number} + * @property {number} LOG_TYPE_UNSPECIFIED=0 LOG_TYPE_UNSPECIFIED value + * @property {number} ADMIN_READ=1 ADMIN_READ value + * @property {number} DATA_WRITE=2 DATA_WRITE value + * @property {number} DATA_READ=3 DATA_READ value + */ + AuditLogConfig.LogType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOG_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADMIN_READ"] = 1; + values[valuesById[2] = "DATA_WRITE"] = 2; + values[valuesById[3] = "DATA_READ"] = 3; + return values; + })(); + + return AuditLogConfig; + })(); + + v1.PolicyDelta = (function() { + + /** + * Properties of a PolicyDelta. + * @memberof google.iam.v1 + * @interface IPolicyDelta + * @property {Array.|null} [bindingDeltas] PolicyDelta bindingDeltas * @property {Array.|null} [auditConfigDeltas] PolicyDelta auditConfigDeltas */ @@ -12143,16 +13563,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.bindingDeltas && message.bindingDeltas.length)) - message.bindingDeltas = []; - message.bindingDeltas.push($root.google.iam.v1.BindingDelta.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.auditConfigDeltas && message.auditConfigDeltas.length)) - message.auditConfigDeltas = []; - message.auditConfigDeltas.push($root.google.iam.v1.AuditConfigDelta.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.bindingDeltas && message.bindingDeltas.length)) + message.bindingDeltas = []; + message.bindingDeltas.push($root.google.iam.v1.BindingDelta.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.auditConfigDeltas && message.auditConfigDeltas.length)) + message.auditConfigDeltas = []; + message.auditConfigDeltas.push($root.google.iam.v1.AuditConfigDelta.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -12285,6 +13707,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PolicyDelta + * @function getTypeUrl + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PolicyDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.PolicyDelta"; + }; + return PolicyDelta; })(); @@ -12413,18 +13850,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.action = reader.int32(); - break; - case 2: - message.role = reader.string(); - break; - case 3: - message.member = reader.string(); - break; - case 4: - message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); - break; + case 1: { + message.action = reader.int32(); + break; + } + case 2: { + message.role = reader.string(); + break; + } + case 3: { + message.member = reader.string(); + break; + } + case 4: { + message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -12562,6 +14003,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BindingDelta + * @function getTypeUrl + * @memberof google.iam.v1.BindingDelta + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BindingDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.BindingDelta"; + }; + /** * Action enum. * @name google.iam.v1.BindingDelta.Action @@ -12706,18 +14162,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.action = reader.int32(); - break; - case 2: - message.service = reader.string(); - break; - case 3: - message.exemptedMember = reader.string(); - break; - case 4: - message.logType = reader.string(); - break; + case 1: { + message.action = reader.int32(); + break; + } + case 2: { + message.service = reader.string(); + break; + } + case 3: { + message.exemptedMember = reader.string(); + break; + } + case 4: { + message.logType = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -12850,6 +14310,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AuditConfigDelta + * @function getTypeUrl + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuditConfigDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.AuditConfigDelta"; + }; + /** * Action enum. * @name google.iam.v1.AuditConfigDelta.Action @@ -13009,18 +14484,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.expression = reader.string(); - break; - case 2: - message.title = reader.string(); - break; - case 3: - message.description = reader.string(); - break; - case 4: - message.location = reader.string(); - break; + case 1: { + message.expression = reader.string(); + break; + } + case 2: { + message.title = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + message.location = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -13135,6 +14614,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Expr + * @function getTypeUrl + * @memberof google.type.Expr + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Expr.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.Expr"; + }; + return Expr; })(); diff --git a/packages/google-cloud-policytroubleshooter/protos/protos.json b/packages/google-cloud-policytroubleshooter/protos/protos.json index 0b5f7d56d40..3f3c32e0a85 100644 --- a/packages/google-cloud-policytroubleshooter/protos/protos.json +++ b/packages/google-cloud-policytroubleshooter/protos/protos.json @@ -417,6 +417,10 @@ "syntax": { "type": "string", "id": 12 + }, + "edition": { + "type": "string", + "id": 13 } } }, @@ -945,6 +949,13 @@ "default": false } }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, "deprecated": { "type": "bool", "id": 3, @@ -1237,6 +1248,19 @@ "end": { "type": "int32", "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } } } } @@ -1268,6 +1292,11 @@ "type": "Binding", "id": 4 }, + "auditConfigs": { + "rule": "repeated", + "type": "AuditConfig", + "id": 6 + }, "etag": { "type": "bytes", "id": 3 @@ -1291,6 +1320,42 @@ } } }, + "AuditConfig": { + "fields": { + "service": { + "type": "string", + "id": 1 + }, + "auditLogConfigs": { + "rule": "repeated", + "type": "AuditLogConfig", + "id": 3 + } + } + }, + "AuditLogConfig": { + "fields": { + "logType": { + "type": "LogType", + "id": 1 + }, + "exemptedMembers": { + "rule": "repeated", + "type": "string", + "id": 2 + } + }, + "nested": { + "LogType": { + "values": { + "LOG_TYPE_UNSPECIFIED": 0, + "ADMIN_READ": 1, + "DATA_WRITE": 2, + "DATA_READ": 3 + } + } + } + }, "PolicyDelta": { "fields": { "bindingDeltas": { From 38aa8b9450ad23ae3525ac3be77a0ea1f412f030 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 23 Aug 2022 07:40:27 +0000 Subject: [PATCH 219/254] fix: change import long to require (#60) Source-Link: https://github.com/googleapis/synthtool/commit/d229a1258999f599a90a9b674a1c5541e00db588 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:74ab2b3c71ef27e6d8b69b1d0a0c9d31447777b79ac3cd4be82c265b45f37e5e --- .../google-cloud-deploy/protos/protos.d.ts | 741 ++- packages/google-cloud-deploy/protos/protos.js | 4957 ++++++++++++----- .../google-cloud-deploy/protos/protos.json | 24 + 3 files changed, 4177 insertions(+), 1545 deletions(-) diff --git a/packages/google-cloud-deploy/protos/protos.d.ts b/packages/google-cloud-deploy/protos/protos.d.ts index 510d9277f59..4919daecc19 100644 --- a/packages/google-cloud-deploy/protos/protos.d.ts +++ b/packages/google-cloud-deploy/protos/protos.d.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import * as Long from "long"; +import Long = require("long"); import {protobuf as $protobuf} from "google-gax"; /** Namespace google. */ export namespace google { @@ -302,126 +302,126 @@ export namespace google { namespace CloudDeploy { /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#listDeliveryPipelines}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|listDeliveryPipelines}. * @param error Error, if any * @param [response] ListDeliveryPipelinesResponse */ type ListDeliveryPipelinesCallback = (error: (Error|null), response?: google.cloud.deploy.v1.ListDeliveryPipelinesResponse) => void; /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#getDeliveryPipeline}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|getDeliveryPipeline}. * @param error Error, if any * @param [response] DeliveryPipeline */ type GetDeliveryPipelineCallback = (error: (Error|null), response?: google.cloud.deploy.v1.DeliveryPipeline) => void; /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#createDeliveryPipeline}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|createDeliveryPipeline}. * @param error Error, if any * @param [response] Operation */ type CreateDeliveryPipelineCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#updateDeliveryPipeline}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|updateDeliveryPipeline}. * @param error Error, if any * @param [response] Operation */ type UpdateDeliveryPipelineCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#deleteDeliveryPipeline}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|deleteDeliveryPipeline}. * @param error Error, if any * @param [response] Operation */ type DeleteDeliveryPipelineCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#listTargets}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|listTargets}. * @param error Error, if any * @param [response] ListTargetsResponse */ type ListTargetsCallback = (error: (Error|null), response?: google.cloud.deploy.v1.ListTargetsResponse) => void; /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#getTarget}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|getTarget}. * @param error Error, if any * @param [response] Target */ type GetTargetCallback = (error: (Error|null), response?: google.cloud.deploy.v1.Target) => void; /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#createTarget}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|createTarget}. * @param error Error, if any * @param [response] Operation */ type CreateTargetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#updateTarget}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|updateTarget}. * @param error Error, if any * @param [response] Operation */ type UpdateTargetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#deleteTarget}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|deleteTarget}. * @param error Error, if any * @param [response] Operation */ type DeleteTargetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#listReleases}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|listReleases}. * @param error Error, if any * @param [response] ListReleasesResponse */ type ListReleasesCallback = (error: (Error|null), response?: google.cloud.deploy.v1.ListReleasesResponse) => void; /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#getRelease}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|getRelease}. * @param error Error, if any * @param [response] Release */ type GetReleaseCallback = (error: (Error|null), response?: google.cloud.deploy.v1.Release) => void; /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#createRelease}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|createRelease}. * @param error Error, if any * @param [response] Operation */ type CreateReleaseCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#approveRollout}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|approveRollout}. * @param error Error, if any * @param [response] ApproveRolloutResponse */ type ApproveRolloutCallback = (error: (Error|null), response?: google.cloud.deploy.v1.ApproveRolloutResponse) => void; /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#listRollouts}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|listRollouts}. * @param error Error, if any * @param [response] ListRolloutsResponse */ type ListRolloutsCallback = (error: (Error|null), response?: google.cloud.deploy.v1.ListRolloutsResponse) => void; /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#getRollout}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|getRollout}. * @param error Error, if any * @param [response] Rollout */ type GetRolloutCallback = (error: (Error|null), response?: google.cloud.deploy.v1.Rollout) => void; /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#createRollout}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|createRollout}. * @param error Error, if any * @param [response] Operation */ type CreateRolloutCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#getConfig}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|getConfig}. * @param error Error, if any * @param [response] Config */ @@ -573,6 +573,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeliveryPipeline + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SerialPipeline. */ @@ -663,6 +670,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SerialPipeline + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Stage. */ @@ -759,6 +773,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Stage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PipelineReadyCondition. */ @@ -855,6 +876,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PipelineReadyCondition + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a TargetsPresentCondition. */ @@ -957,6 +985,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TargetsPresentCondition + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PipelineCondition. */ @@ -1053,6 +1088,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PipelineCondition + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListDeliveryPipelinesRequest. */ @@ -1167,6 +1209,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDeliveryPipelinesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListDeliveryPipelinesResponse. */ @@ -1269,6 +1318,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDeliveryPipelinesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetDeliveryPipelineRequest. */ @@ -1359,6 +1415,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetDeliveryPipelineRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateDeliveryPipelineRequest. */ @@ -1473,6 +1536,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateDeliveryPipelineRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateDeliveryPipelineRequest. */ @@ -1587,6 +1657,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateDeliveryPipelineRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteDeliveryPipelineRequest. */ @@ -1707,6 +1784,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteDeliveryPipelineRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Target. */ @@ -1872,6 +1956,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Target + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an ExecutionConfig. */ @@ -1995,6 +2086,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExecutionConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ExecutionConfig { @@ -2101,6 +2199,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DefaultPool + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PrivatePool. */ @@ -2203,6 +2308,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PrivatePool + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GkeCluster. */ @@ -2299,6 +2411,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GkeCluster + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AnthosCluster. */ @@ -2389,6 +2508,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnthosCluster + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListTargetsRequest. */ @@ -2503,6 +2629,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListTargetsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListTargetsResponse. */ @@ -2605,6 +2738,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListTargetsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetTargetRequest. */ @@ -2695,6 +2835,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetTargetRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateTargetRequest. */ @@ -2809,6 +2956,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateTargetRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateTargetRequest. */ @@ -2923,6 +3077,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateTargetRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteTargetRequest. */ @@ -3037,6 +3198,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteTargetRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Release. */ @@ -3229,6 +3397,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Release + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Release { @@ -3341,6 +3516,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TargetRender + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace TargetRender { @@ -3456,6 +3638,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BuildArtifact + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a TargetArtifact. */ @@ -3561,6 +3750,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TargetArtifact + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListReleasesRequest. */ @@ -3675,6 +3871,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListReleasesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListReleasesResponse. */ @@ -3777,6 +3980,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListReleasesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetReleaseRequest. */ @@ -3867,6 +4077,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetReleaseRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateReleaseRequest. */ @@ -3981,6 +4198,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateReleaseRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Rollout. */ @@ -4167,6 +4391,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Rollout + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Rollout { @@ -4314,6 +4545,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListRolloutsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListRolloutsResponse. */ @@ -4416,6 +4654,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListRolloutsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetRolloutRequest. */ @@ -4506,6 +4751,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetRolloutRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateRolloutRequest. */ @@ -4620,6 +4872,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateRolloutRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an OperationMetadata. */ @@ -4746,6 +5005,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an ApproveRolloutRequest. */ @@ -4842,6 +5108,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ApproveRolloutRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an ApproveRolloutResponse. */ @@ -4926,6 +5199,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ApproveRolloutResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Config. */ @@ -5028,6 +5308,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Config + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SkaffoldVersion. */ @@ -5124,6 +5411,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SkaffoldVersion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetConfigRequest. */ @@ -5214,6 +5508,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeliveryPipelineNotificationEvent. */ @@ -5316,6 +5617,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeliveryPipelineNotificationEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Type enum. */ @@ -5425,6 +5733,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReleaseNotificationEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ReleaseRenderEvent. */ @@ -5521,6 +5836,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReleaseRenderEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a RolloutNotificationEvent. */ @@ -5641,6 +5963,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RolloutNotificationEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a TargetNotificationEvent. */ @@ -5743,6 +6072,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TargetNotificationEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } } @@ -5845,6 +6181,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a HttpRule. */ @@ -5992,6 +6335,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CustomHttpPattern. */ @@ -6088,6 +6438,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** FieldBehavior enum. */ @@ -6226,6 +6583,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ResourceDescriptor { @@ -6338,6 +6702,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -6432,6 +6803,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FileDescriptorProto. */ @@ -6472,6 +6850,9 @@ export namespace google { /** FileDescriptorProto syntax */ syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (string|null); } /** Represents a FileDescriptorProto. */ @@ -6519,6 +6900,9 @@ export namespace google { /** FileDescriptorProto syntax. */ public syntax: string; + /** FileDescriptorProto edition. */ + public edition: string; + /** * Creates a new FileDescriptorProto instance using the specified properties. * @param [properties] Properties to set @@ -6588,6 +6972,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DescriptorProto. */ @@ -6732,6 +7123,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace DescriptorProto { @@ -6836,6 +7234,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ReservedRange. */ @@ -6932,6 +7337,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -7023,6 +7435,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FieldDescriptorProto. */ @@ -7173,6 +7592,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FieldDescriptorProto { @@ -7301,6 +7727,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EnumDescriptorProto. */ @@ -7415,6 +7848,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace EnumDescriptorProto { @@ -7513,6 +7953,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -7616,6 +8063,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ServiceDescriptorProto. */ @@ -7718,6 +8172,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MethodDescriptorProto. */ @@ -7838,6 +8299,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FileOptions. */ @@ -8051,6 +8519,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FileOptions { @@ -8178,6 +8653,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FieldOptions. */ @@ -8195,6 +8677,9 @@ export namespace google { /** FieldOptions lazy */ lazy?: (boolean|null); + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + /** FieldOptions deprecated */ deprecated?: (boolean|null); @@ -8232,6 +8717,9 @@ export namespace google { /** FieldOptions lazy. */ public lazy: boolean; + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + /** FieldOptions deprecated. */ public deprecated: boolean; @@ -8310,6 +8798,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FieldOptions { @@ -8417,6 +8912,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EnumOptions. */ @@ -8519,6 +9021,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EnumValueOptions. */ @@ -8615,6 +9124,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ServiceOptions. */ @@ -8717,6 +9233,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MethodOptions. */ @@ -8828,6 +9351,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace MethodOptions { @@ -8964,6 +9494,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace UninterpretedOption { @@ -9062,6 +9599,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -9153,6 +9697,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace SourceCodeInfo { @@ -9269,6 +9820,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -9360,6 +9918,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace GeneratedCodeInfo { @@ -9378,6 +9943,9 @@ export namespace google { /** Annotation end */ end?: (number|null); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); } /** Represents an Annotation. */ @@ -9401,6 +9969,9 @@ export namespace google { /** Annotation end. */ public end: number; + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + /** * Creates a new Annotation instance using the specified properties. * @param [properties] Properties to set @@ -9470,6 +10041,23 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } } } @@ -9567,6 +10155,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Any + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Duration. */ @@ -9663,6 +10258,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Empty. */ @@ -9747,6 +10349,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FieldMask. */ @@ -9837,6 +10446,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldMask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Timestamp. */ @@ -9933,6 +10549,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -10033,35 +10656,35 @@ export namespace google { namespace Operations { /** - * Callback as used by {@link google.longrunning.Operations#listOperations}. + * Callback as used by {@link google.longrunning.Operations|listOperations}. * @param error Error, if any * @param [response] ListOperationsResponse */ type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; /** - * Callback as used by {@link google.longrunning.Operations#getOperation}. + * Callback as used by {@link google.longrunning.Operations|getOperation}. * @param error Error, if any * @param [response] Operation */ type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.longrunning.Operations#deleteOperation}. + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. * @param error Error, if any * @param [response] Empty */ type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.longrunning.Operations#cancelOperation}. + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. * @param error Error, if any * @param [response] Empty */ type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.longrunning.Operations#waitOperation}. + * Callback as used by {@link google.longrunning.Operations|waitOperation}. * @param error Error, if any * @param [response] Operation */ @@ -10183,6 +10806,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Operation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetOperationRequest. */ @@ -10273,6 +10903,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListOperationsRequest. */ @@ -10381,6 +11018,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListOperationsResponse. */ @@ -10477,6 +11121,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CancelOperationRequest. */ @@ -10567,6 +11218,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CancelOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteOperationRequest. */ @@ -10657,6 +11315,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WaitOperationRequest. */ @@ -10753,6 +11418,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WaitOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an OperationInfo. */ @@ -10849,6 +11521,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -10955,6 +11634,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Status + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -11061,6 +11747,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Date + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } } diff --git a/packages/google-cloud-deploy/protos/protos.js b/packages/google-cloud-deploy/protos/protos.js index 39b25002725..adfe361ca28 100644 --- a/packages/google-cloud-deploy/protos/protos.js +++ b/packages/google-cloud-deploy/protos/protos.js @@ -99,7 +99,7 @@ }; /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#listDeliveryPipelines}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|listDeliveryPipelines}. * @memberof google.cloud.deploy.v1.CloudDeploy * @typedef ListDeliveryPipelinesCallback * @type {function} @@ -132,7 +132,7 @@ */ /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#getDeliveryPipeline}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|getDeliveryPipeline}. * @memberof google.cloud.deploy.v1.CloudDeploy * @typedef GetDeliveryPipelineCallback * @type {function} @@ -165,7 +165,7 @@ */ /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#createDeliveryPipeline}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|createDeliveryPipeline}. * @memberof google.cloud.deploy.v1.CloudDeploy * @typedef CreateDeliveryPipelineCallback * @type {function} @@ -198,7 +198,7 @@ */ /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#updateDeliveryPipeline}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|updateDeliveryPipeline}. * @memberof google.cloud.deploy.v1.CloudDeploy * @typedef UpdateDeliveryPipelineCallback * @type {function} @@ -231,7 +231,7 @@ */ /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#deleteDeliveryPipeline}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|deleteDeliveryPipeline}. * @memberof google.cloud.deploy.v1.CloudDeploy * @typedef DeleteDeliveryPipelineCallback * @type {function} @@ -264,7 +264,7 @@ */ /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#listTargets}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|listTargets}. * @memberof google.cloud.deploy.v1.CloudDeploy * @typedef ListTargetsCallback * @type {function} @@ -297,7 +297,7 @@ */ /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#getTarget}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|getTarget}. * @memberof google.cloud.deploy.v1.CloudDeploy * @typedef GetTargetCallback * @type {function} @@ -330,7 +330,7 @@ */ /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#createTarget}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|createTarget}. * @memberof google.cloud.deploy.v1.CloudDeploy * @typedef CreateTargetCallback * @type {function} @@ -363,7 +363,7 @@ */ /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#updateTarget}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|updateTarget}. * @memberof google.cloud.deploy.v1.CloudDeploy * @typedef UpdateTargetCallback * @type {function} @@ -396,7 +396,7 @@ */ /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#deleteTarget}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|deleteTarget}. * @memberof google.cloud.deploy.v1.CloudDeploy * @typedef DeleteTargetCallback * @type {function} @@ -429,7 +429,7 @@ */ /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#listReleases}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|listReleases}. * @memberof google.cloud.deploy.v1.CloudDeploy * @typedef ListReleasesCallback * @type {function} @@ -462,7 +462,7 @@ */ /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#getRelease}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|getRelease}. * @memberof google.cloud.deploy.v1.CloudDeploy * @typedef GetReleaseCallback * @type {function} @@ -495,7 +495,7 @@ */ /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#createRelease}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|createRelease}. * @memberof google.cloud.deploy.v1.CloudDeploy * @typedef CreateReleaseCallback * @type {function} @@ -528,7 +528,7 @@ */ /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#approveRollout}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|approveRollout}. * @memberof google.cloud.deploy.v1.CloudDeploy * @typedef ApproveRolloutCallback * @type {function} @@ -561,7 +561,7 @@ */ /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#listRollouts}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|listRollouts}. * @memberof google.cloud.deploy.v1.CloudDeploy * @typedef ListRolloutsCallback * @type {function} @@ -594,7 +594,7 @@ */ /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#getRollout}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|getRollout}. * @memberof google.cloud.deploy.v1.CloudDeploy * @typedef GetRolloutCallback * @type {function} @@ -627,7 +627,7 @@ */ /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#createRollout}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|createRollout}. * @memberof google.cloud.deploy.v1.CloudDeploy * @typedef CreateRolloutCallback * @type {function} @@ -660,7 +660,7 @@ */ /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy#getConfig}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|getConfig}. * @memberof google.cloud.deploy.v1.CloudDeploy * @typedef GetConfigCallback * @type {function} @@ -904,74 +904,84 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.uid = reader.string(); - break; - case 3: - message.description = reader.string(); - break; - case 4: - if (message.annotations === $util.emptyObject) - message.annotations = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.uid = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + if (message.annotations === $util.emptyObject) + message.annotations = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.annotations[key] = value; + break; } - message.annotations[key] = value; - break; - case 5: - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 5: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.labels[key] = value; + break; + } + case 6: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.serialPipeline = $root.google.cloud.deploy.v1.SerialPipeline.decode(reader, reader.uint32()); + break; + } + case 11: { + message.condition = $root.google.cloud.deploy.v1.PipelineCondition.decode(reader, reader.uint32()); + break; + } + case 10: { + message.etag = reader.string(); + break; } - message.labels[key] = value; - break; - case 6: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 7: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 8: - message.serialPipeline = $root.google.cloud.deploy.v1.SerialPipeline.decode(reader, reader.uint32()); - break; - case 11: - message.condition = $root.google.cloud.deploy.v1.PipelineCondition.decode(reader, reader.uint32()); - break; - case 10: - message.etag = reader.string(); - break; default: reader.skipType(tag & 7); break; @@ -1189,6 +1199,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeliveryPipeline + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.DeliveryPipeline + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeliveryPipeline.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.DeliveryPipeline"; + }; + return DeliveryPipeline; })(); @@ -1286,11 +1311,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.stages && message.stages.length)) - message.stages = []; - message.stages.push($root.google.cloud.deploy.v1.Stage.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.stages && message.stages.length)) + message.stages = []; + message.stages.push($root.google.cloud.deploy.v1.Stage.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -1397,6 +1423,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SerialPipeline + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.SerialPipeline + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SerialPipeline.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.SerialPipeline"; + }; + return SerialPipeline; })(); @@ -1505,14 +1546,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.targetId = reader.string(); - break; - case 2: - if (!(message.profiles && message.profiles.length)) - message.profiles = []; - message.profiles.push(reader.string()); - break; + case 1: { + message.targetId = reader.string(); + break; + } + case 2: { + if (!(message.profiles && message.profiles.length)) + message.profiles = []; + message.profiles.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -1623,6 +1666,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Stage + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.Stage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Stage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.Stage"; + }; + return Stage; })(); @@ -1729,12 +1787,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.status = reader.bool(); - break; - case 4: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; + case 3: { + message.status = reader.bool(); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -1838,6 +1898,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PipelineReadyCondition + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.PipelineReadyCondition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PipelineReadyCondition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.PipelineReadyCondition"; + }; + return PipelineReadyCondition; })(); @@ -1957,17 +2032,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.status = reader.bool(); - break; - case 2: - if (!(message.missingTargets && message.missingTargets.length)) - message.missingTargets = []; - message.missingTargets.push(reader.string()); - break; - case 4: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; + case 1: { + message.status = reader.bool(); + break; + } + case 2: { + if (!(message.missingTargets && message.missingTargets.length)) + message.missingTargets = []; + message.missingTargets.push(reader.string()); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -2092,6 +2170,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TargetsPresentCondition + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.TargetsPresentCondition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TargetsPresentCondition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.TargetsPresentCondition"; + }; + return TargetsPresentCondition; })(); @@ -2198,12 +2291,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.pipelineReadyCondition = $root.google.cloud.deploy.v1.PipelineReadyCondition.decode(reader, reader.uint32()); - break; - case 3: - message.targetsPresentCondition = $root.google.cloud.deploy.v1.TargetsPresentCondition.decode(reader, reader.uint32()); - break; + case 1: { + message.pipelineReadyCondition = $root.google.cloud.deploy.v1.PipelineReadyCondition.decode(reader, reader.uint32()); + break; + } + case 3: { + message.targetsPresentCondition = $root.google.cloud.deploy.v1.TargetsPresentCondition.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -2312,6 +2407,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PipelineCondition + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.PipelineCondition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PipelineCondition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.PipelineCondition"; + }; + return PipelineCondition; })(); @@ -2451,21 +2561,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - case 4: - message.filter = reader.string(); - break; - case 5: - message.orderBy = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -2588,6 +2703,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListDeliveryPipelinesRequest + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDeliveryPipelinesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.ListDeliveryPipelinesRequest"; + }; + return ListDeliveryPipelinesRequest; })(); @@ -2709,19 +2839,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.deliveryPipelines && message.deliveryPipelines.length)) - message.deliveryPipelines = []; - message.deliveryPipelines.push($root.google.cloud.deploy.v1.DeliveryPipeline.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - case 3: - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); - break; + case 1: { + if (!(message.deliveryPipelines && message.deliveryPipelines.length)) + message.deliveryPipelines = []; + message.deliveryPipelines.push($root.google.cloud.deploy.v1.DeliveryPipeline.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -2858,6 +2991,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListDeliveryPipelinesResponse + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDeliveryPipelinesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.ListDeliveryPipelinesResponse"; + }; + return ListDeliveryPipelinesResponse; })(); @@ -2953,9 +3101,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -3045,6 +3194,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetDeliveryPipelineRequest + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.GetDeliveryPipelineRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetDeliveryPipelineRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.GetDeliveryPipelineRequest"; + }; + return GetDeliveryPipelineRequest; })(); @@ -3184,21 +3348,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.deliveryPipelineId = reader.string(); - break; - case 3: - message.deliveryPipeline = $root.google.cloud.deploy.v1.DeliveryPipeline.decode(reader, reader.uint32()); - break; - case 4: - message.requestId = reader.string(); - break; - case 5: - message.validateOnly = reader.bool(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.deliveryPipelineId = reader.string(); + break; + } + case 3: { + message.deliveryPipeline = $root.google.cloud.deploy.v1.DeliveryPipeline.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + case 5: { + message.validateOnly = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -3326,6 +3495,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateDeliveryPipelineRequest + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateDeliveryPipelineRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.CreateDeliveryPipelineRequest"; + }; + return CreateDeliveryPipelineRequest; })(); @@ -3465,21 +3649,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 2: - message.deliveryPipeline = $root.google.cloud.deploy.v1.DeliveryPipeline.decode(reader, reader.uint32()); - break; - case 3: - message.requestId = reader.string(); - break; - case 4: - message.allowMissing = reader.bool(); - break; - case 5: - message.validateOnly = reader.bool(); - break; + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.deliveryPipeline = $root.google.cloud.deploy.v1.DeliveryPipeline.decode(reader, reader.uint32()); + break; + } + case 3: { + message.requestId = reader.string(); + break; + } + case 4: { + message.allowMissing = reader.bool(); + break; + } + case 5: { + message.validateOnly = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -3612,6 +3801,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateDeliveryPipelineRequest + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateDeliveryPipelineRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.UpdateDeliveryPipelineRequest"; + }; + return UpdateDeliveryPipelineRequest; })(); @@ -3762,26 +3966,32 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.requestId = reader.string(); - break; - case 3: - message.allowMissing = reader.bool(); - break; - case 4: - message.validateOnly = reader.bool(); - break; - case 6: - message.force = reader.bool(); - break; - case 5: - message.etag = reader.string(); - break; - default: - reader.skipType(tag & 7); + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.requestId = reader.string(); + break; + } + case 3: { + message.allowMissing = reader.bool(); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } + case 6: { + message.force = reader.bool(); + break; + } + case 5: { + message.etag = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; } } @@ -3910,6 +4120,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteDeliveryPipelineRequest + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteDeliveryPipelineRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.DeleteDeliveryPipelineRequest"; + }; + return DeleteDeliveryPipelineRequest; })(); @@ -4157,85 +4382,98 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.targetId = reader.string(); - break; - case 3: - message.uid = reader.string(); - break; - case 4: - message.description = reader.string(); - break; - case 5: - if (message.annotations === $util.emptyObject) - message.annotations = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.targetId = reader.string(); + break; + } + case 3: { + message.uid = reader.string(); + break; + } + case 4: { + message.description = reader.string(); + break; + } + case 5: { + if (message.annotations === $util.emptyObject) + message.annotations = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.annotations[key] = value; + break; } - message.annotations[key] = value; - break; - case 6: - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 6: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.labels[key] = value; + break; + } + case 13: { + message.requireApproval = reader.bool(); + break; + } + case 8: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 15: { + message.gke = $root.google.cloud.deploy.v1.GkeCluster.decode(reader, reader.uint32()); + break; + } + case 17: { + message.anthosCluster = $root.google.cloud.deploy.v1.AnthosCluster.decode(reader, reader.uint32()); + break; + } + case 12: { + message.etag = reader.string(); + break; + } + case 16: { + if (!(message.executionConfigs && message.executionConfigs.length)) + message.executionConfigs = []; + message.executionConfigs.push($root.google.cloud.deploy.v1.ExecutionConfig.decode(reader, reader.uint32())); + break; } - message.labels[key] = value; - break; - case 13: - message.requireApproval = reader.bool(); - break; - case 8: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 9: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 15: - message.gke = $root.google.cloud.deploy.v1.GkeCluster.decode(reader, reader.uint32()); - break; - case 17: - message.anthosCluster = $root.google.cloud.deploy.v1.AnthosCluster.decode(reader, reader.uint32()); - break; - case 12: - message.etag = reader.string(); - break; - case 16: - if (!(message.executionConfigs && message.executionConfigs.length)) - message.executionConfigs = []; - message.executionConfigs.push($root.google.cloud.deploy.v1.ExecutionConfig.decode(reader, reader.uint32())); - break; default: reader.skipType(tag & 7); break; @@ -4502,6 +4740,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Target + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.Target + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Target.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.Target"; + }; + return Target; })(); @@ -4671,31 +4924,37 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.usages && message.usages.length)) - message.usages = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + if (!(message.usages && message.usages.length)) + message.usages = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.usages.push(reader.int32()); + } else message.usages.push(reader.int32()); - } else - message.usages.push(reader.int32()); - break; - case 2: - message.defaultPool = $root.google.cloud.deploy.v1.DefaultPool.decode(reader, reader.uint32()); - break; - case 3: - message.privatePool = $root.google.cloud.deploy.v1.PrivatePool.decode(reader, reader.uint32()); - break; - case 4: - message.workerPool = reader.string(); - break; - case 5: - message.serviceAccount = reader.string(); - break; - case 6: - message.artifactStorage = reader.string(); - break; + break; + } + case 2: { + message.defaultPool = $root.google.cloud.deploy.v1.DefaultPool.decode(reader, reader.uint32()); + break; + } + case 3: { + message.privatePool = $root.google.cloud.deploy.v1.PrivatePool.decode(reader, reader.uint32()); + break; + } + case 4: { + message.workerPool = reader.string(); + break; + } + case 5: { + message.serviceAccount = reader.string(); + break; + } + case 6: { + message.artifactStorage = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -4882,6 +5141,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ExecutionConfig + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.ExecutionConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExecutionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.ExecutionConfig"; + }; + /** * ExecutionEnvironmentUsage enum. * @name google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage @@ -5004,12 +5278,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.serviceAccount = reader.string(); - break; - case 2: - message.artifactStorage = reader.string(); - break; + case 1: { + message.serviceAccount = reader.string(); + break; + } + case 2: { + message.artifactStorage = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -5108,6 +5384,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DefaultPool + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.DefaultPool + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DefaultPool.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.DefaultPool"; + }; + return DefaultPool; })(); @@ -5225,15 +5516,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.workerPool = reader.string(); - break; - case 2: - message.serviceAccount = reader.string(); - break; - case 3: - message.artifactStorage = reader.string(); - break; + case 1: { + message.workerPool = reader.string(); + break; + } + case 2: { + message.serviceAccount = reader.string(); + break; + } + case 3: { + message.artifactStorage = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -5340,6 +5634,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PrivatePool + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.PrivatePool + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PrivatePool.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.PrivatePool"; + }; + return PrivatePool; })(); @@ -5446,12 +5755,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.cluster = reader.string(); - break; - case 2: - message.internalIp = reader.bool(); - break; + case 1: { + message.cluster = reader.string(); + break; + } + case 2: { + message.internalIp = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -5550,6 +5861,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GkeCluster + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.GkeCluster + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GkeCluster.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.GkeCluster"; + }; + return GkeCluster; })(); @@ -5645,9 +5971,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.membership = reader.string(); - break; + case 1: { + message.membership = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -5737,6 +6064,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AnthosCluster + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.AnthosCluster + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnthosCluster.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.AnthosCluster"; + }; + return AnthosCluster; })(); @@ -5876,21 +6218,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - case 4: - message.filter = reader.string(); - break; - case 5: - message.orderBy = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -6013,6 +6360,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListTargetsRequest + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.ListTargetsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListTargetsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.ListTargetsRequest"; + }; + return ListTargetsRequest; })(); @@ -6134,19 +6496,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.targets && message.targets.length)) - message.targets = []; - message.targets.push($root.google.cloud.deploy.v1.Target.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - case 3: - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); - break; + case 1: { + if (!(message.targets && message.targets.length)) + message.targets = []; + message.targets.push($root.google.cloud.deploy.v1.Target.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -6283,6 +6648,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListTargetsResponse + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.ListTargetsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListTargetsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.ListTargetsResponse"; + }; + return ListTargetsResponse; })(); @@ -6378,9 +6758,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -6470,6 +6851,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetTargetRequest + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.GetTargetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetTargetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.GetTargetRequest"; + }; + return GetTargetRequest; })(); @@ -6609,21 +7005,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.targetId = reader.string(); - break; - case 3: - message.target = $root.google.cloud.deploy.v1.Target.decode(reader, reader.uint32()); - break; - case 4: - message.requestId = reader.string(); - break; - case 5: - message.validateOnly = reader.bool(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.targetId = reader.string(); + break; + } + case 3: { + message.target = $root.google.cloud.deploy.v1.Target.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + case 5: { + message.validateOnly = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -6751,6 +7152,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateTargetRequest + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateTargetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.CreateTargetRequest"; + }; + return CreateTargetRequest; })(); @@ -6890,21 +7306,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 2: - message.target = $root.google.cloud.deploy.v1.Target.decode(reader, reader.uint32()); - break; - case 3: - message.requestId = reader.string(); - break; - case 4: - message.allowMissing = reader.bool(); - break; - case 5: - message.validateOnly = reader.bool(); - break; + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.target = $root.google.cloud.deploy.v1.Target.decode(reader, reader.uint32()); + break; + } + case 3: { + message.requestId = reader.string(); + break; + } + case 4: { + message.allowMissing = reader.bool(); + break; + } + case 5: { + message.validateOnly = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -7037,6 +7458,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateTargetRequest + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateTargetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.UpdateTargetRequest"; + }; + return UpdateTargetRequest; })(); @@ -7176,21 +7612,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.requestId = reader.string(); - break; - case 3: - message.allowMissing = reader.bool(); - break; - case 4: - message.validateOnly = reader.bool(); - break; - case 5: - message.etag = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.requestId = reader.string(); + break; + } + case 3: { + message.allowMissing = reader.bool(); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } + case 5: { + message.etag = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -7313,6 +7754,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteTargetRequest + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteTargetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.DeleteTargetRequest"; + }; + return DeleteTargetRequest; })(); @@ -7611,140 +8067,158 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.uid = reader.string(); - break; - case 3: - message.description = reader.string(); - break; - case 4: - if (message.annotations === $util.emptyObject) - message.annotations = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.uid = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + if (message.annotations === $util.emptyObject) + message.annotations = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.annotations[key] = value; + break; } - message.annotations[key] = value; - break; - case 5: - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 5: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.labels[key] = value; + break; } - message.labels[key] = value; - break; - case 6: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 7: - message.renderStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 8: - message.renderEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 17: - message.skaffoldConfigUri = reader.string(); - break; - case 9: - message.skaffoldConfigPath = reader.string(); - break; - case 10: - if (!(message.buildArtifacts && message.buildArtifacts.length)) - message.buildArtifacts = []; - message.buildArtifacts.push($root.google.cloud.deploy.v1.BuildArtifact.decode(reader, reader.uint32())); - break; - case 11: - message.deliveryPipelineSnapshot = $root.google.cloud.deploy.v1.DeliveryPipeline.decode(reader, reader.uint32()); - break; - case 12: - if (!(message.targetSnapshots && message.targetSnapshots.length)) - message.targetSnapshots = []; - message.targetSnapshots.push($root.google.cloud.deploy.v1.Target.decode(reader, reader.uint32())); - break; - case 13: - message.renderState = reader.int32(); - break; - case 16: - message.etag = reader.string(); - break; - case 19: - message.skaffoldVersion = reader.string(); - break; - case 20: - if (message.targetArtifacts === $util.emptyObject) - message.targetArtifacts = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.deploy.v1.TargetArtifact.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; + case 6: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.renderStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.renderEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 17: { + message.skaffoldConfigUri = reader.string(); + break; + } + case 9: { + message.skaffoldConfigPath = reader.string(); + break; + } + case 10: { + if (!(message.buildArtifacts && message.buildArtifacts.length)) + message.buildArtifacts = []; + message.buildArtifacts.push($root.google.cloud.deploy.v1.BuildArtifact.decode(reader, reader.uint32())); + break; + } + case 11: { + message.deliveryPipelineSnapshot = $root.google.cloud.deploy.v1.DeliveryPipeline.decode(reader, reader.uint32()); + break; + } + case 12: { + if (!(message.targetSnapshots && message.targetSnapshots.length)) + message.targetSnapshots = []; + message.targetSnapshots.push($root.google.cloud.deploy.v1.Target.decode(reader, reader.uint32())); + break; + } + case 13: { + message.renderState = reader.int32(); + break; + } + case 16: { + message.etag = reader.string(); + break; + } + case 19: { + message.skaffoldVersion = reader.string(); + break; + } + case 20: { + if (message.targetArtifacts === $util.emptyObject) + message.targetArtifacts = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.deploy.v1.TargetArtifact.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.targetArtifacts[key] = value; + break; } - message.targetArtifacts[key] = value; - break; - case 22: - if (message.targetRenders === $util.emptyObject) - message.targetRenders = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.deploy.v1.Release.TargetRender.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; + case 22: { + if (message.targetRenders === $util.emptyObject) + message.targetRenders = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.deploy.v1.Release.TargetRender.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.targetRenders[key] = value; + break; } - message.targetRenders[key] = value; - break; default: reader.skipType(tag & 7); break; @@ -8115,6 +8589,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Release + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.Release + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Release.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.Release"; + }; + /** * RenderState enum. * @name google.cloud.deploy.v1.Release.RenderState @@ -8247,15 +8736,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.renderingBuild = reader.string(); - break; - case 2: - message.renderingState = reader.int32(); - break; - case 4: - message.failureCause = reader.int32(); - break; + case 1: { + message.renderingBuild = reader.string(); + break; + } + case 2: { + message.renderingState = reader.int32(); + break; + } + case 4: { + message.failureCause = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -8403,6 +8895,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TargetRender + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TargetRender.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.Release.TargetRender"; + }; + /** * TargetRenderState enum. * @name google.cloud.deploy.v1.Release.TargetRender.TargetRenderState @@ -8546,12 +9053,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.image = reader.string(); - break; - case 2: - message.tag = reader.string(); - break; + case 3: { + message.image = reader.string(); + break; + } + case 2: { + message.tag = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -8650,6 +9159,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BuildArtifact + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.BuildArtifact + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BuildArtifact.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.BuildArtifact"; + }; + return BuildArtifact; })(); @@ -8781,15 +9305,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: - message.artifactUri = reader.string(); - break; - case 2: - message.skaffoldConfigPath = reader.string(); - break; - case 3: - message.manifestPath = reader.string(); - break; + case 4: { + message.artifactUri = reader.string(); + break; + } + case 2: { + message.skaffoldConfigPath = reader.string(); + break; + } + case 3: { + message.manifestPath = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -8901,6 +9428,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TargetArtifact + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.TargetArtifact + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TargetArtifact.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.TargetArtifact"; + }; + return TargetArtifact; })(); @@ -9040,21 +9582,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - case 4: - message.filter = reader.string(); - break; - case 5: - message.orderBy = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -9177,6 +9724,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListReleasesRequest + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListReleasesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.ListReleasesRequest"; + }; + return ListReleasesRequest; })(); @@ -9298,19 +9860,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.releases && message.releases.length)) - message.releases = []; - message.releases.push($root.google.cloud.deploy.v1.Release.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - case 3: - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); - break; + case 1: { + if (!(message.releases && message.releases.length)) + message.releases = []; + message.releases.push($root.google.cloud.deploy.v1.Release.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -9447,6 +10012,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListReleasesResponse + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListReleasesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.ListReleasesResponse"; + }; + return ListReleasesResponse; })(); @@ -9542,9 +10122,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -9634,6 +10215,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetReleaseRequest + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetReleaseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.GetReleaseRequest"; + }; + return GetReleaseRequest; })(); @@ -9773,21 +10369,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.releaseId = reader.string(); - break; - case 3: - message.release = $root.google.cloud.deploy.v1.Release.decode(reader, reader.uint32()); - break; - case 4: - message.requestId = reader.string(); - break; - case 5: - message.validateOnly = reader.bool(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.releaseId = reader.string(); + break; + } + case 3: { + message.release = $root.google.cloud.deploy.v1.Release.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + case 5: { + message.validateOnly = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -9915,6 +10516,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateReleaseRequest + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateReleaseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.CreateReleaseRequest"; + }; + return CreateReleaseRequest; })(); @@ -10190,95 +10806,112 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.uid = reader.string(); - break; - case 3: - message.description = reader.string(); - break; - case 4: - if (message.annotations === $util.emptyObject) - message.annotations = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.uid = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + if (message.annotations === $util.emptyObject) + message.annotations = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.annotations[key] = value; + break; } - message.annotations[key] = value; - break; - case 5: - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 5: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.labels[key] = value; + break; + } + case 6: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.approveTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.enqueueTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.deployStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 10: { + message.deployEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 18: { + message.targetId = reader.string(); + break; + } + case 12: { + message.approvalState = reader.int32(); + break; + } + case 13: { + message.state = reader.int32(); + break; + } + case 14: { + message.failureReason = reader.string(); + break; + } + case 17: { + message.deployingBuild = reader.string(); + break; + } + case 16: { + message.etag = reader.string(); + break; + } + case 19: { + message.deployFailureCause = reader.int32(); + break; } - message.labels[key] = value; - break; - case 6: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 7: - message.approveTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 8: - message.enqueueTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 9: - message.deployStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 10: - message.deployEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 18: - message.targetId = reader.string(); - break; - case 12: - message.approvalState = reader.int32(); - break; - case 13: - message.state = reader.int32(); - break; - case 14: - message.failureReason = reader.string(); - break; - case 17: - message.deployingBuild = reader.string(); - break; - case 16: - message.etag = reader.string(); - break; - case 19: - message.deployFailureCause = reader.int32(); - break; default: reader.skipType(tag & 7); break; @@ -10650,6 +11283,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Rollout + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.Rollout + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Rollout.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.Rollout"; + }; + /** * ApprovalState enum. * @name google.cloud.deploy.v1.Rollout.ApprovalState @@ -10855,21 +11503,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - case 4: - message.filter = reader.string(); - break; - case 5: - message.orderBy = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -10992,6 +11645,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListRolloutsRequest + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListRolloutsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.ListRolloutsRequest"; + }; + return ListRolloutsRequest; })(); @@ -11113,19 +11781,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.rollouts && message.rollouts.length)) - message.rollouts = []; - message.rollouts.push($root.google.cloud.deploy.v1.Rollout.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - case 3: - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); - break; + case 1: { + if (!(message.rollouts && message.rollouts.length)) + message.rollouts = []; + message.rollouts.push($root.google.cloud.deploy.v1.Rollout.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -11262,6 +11933,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListRolloutsResponse + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListRolloutsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.ListRolloutsResponse"; + }; + return ListRolloutsResponse; })(); @@ -11357,9 +12043,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -11449,6 +12136,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetRolloutRequest + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetRolloutRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.GetRolloutRequest"; + }; + return GetRolloutRequest; })(); @@ -11588,21 +12290,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.rolloutId = reader.string(); - break; - case 3: - message.rollout = $root.google.cloud.deploy.v1.Rollout.decode(reader, reader.uint32()); - break; - case 4: - message.requestId = reader.string(); - break; - case 5: - message.validateOnly = reader.bool(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.rolloutId = reader.string(); + break; + } + case 3: { + message.rollout = $root.google.cloud.deploy.v1.Rollout.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + case 5: { + message.validateOnly = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -11730,6 +12437,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateRolloutRequest + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateRolloutRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.CreateRolloutRequest"; + }; + return CreateRolloutRequest; })(); @@ -11891,27 +12613,34 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 2: - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 3: - message.target = reader.string(); - break; - case 4: - message.verb = reader.string(); - break; - case 5: - message.statusMessage = reader.string(); - break; - case 6: - message.requestedCancellation = reader.bool(); - break; - case 7: - message.apiVersion = reader.string(); - break; + case 1: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.target = reader.string(); + break; + } + case 4: { + message.verb = reader.string(); + break; + } + case 5: { + message.statusMessage = reader.string(); + break; + } + case 6: { + message.requestedCancellation = reader.bool(); + break; + } + case 7: { + message.apiVersion = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -12060,6 +12789,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OperationMetadata + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.OperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.OperationMetadata"; + }; + return OperationMetadata; })(); @@ -12166,12 +12910,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.approved = reader.bool(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.approved = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -12270,6 +13016,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ApproveRolloutRequest + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ApproveRolloutRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.ApproveRolloutRequest"; + }; + return ApproveRolloutRequest; })(); @@ -12430,6 +13191,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ApproveRolloutResponse + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.ApproveRolloutResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ApproveRolloutResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.ApproveRolloutResponse"; + }; + return ApproveRolloutResponse; })(); @@ -12549,17 +13325,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.supportedVersions && message.supportedVersions.length)) - message.supportedVersions = []; - message.supportedVersions.push($root.google.cloud.deploy.v1.SkaffoldVersion.decode(reader, reader.uint32())); - break; - case 3: - message.defaultSkaffoldVersion = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.supportedVersions && message.supportedVersions.length)) + message.supportedVersions = []; + message.supportedVersions.push($root.google.cloud.deploy.v1.SkaffoldVersion.decode(reader, reader.uint32())); + break; + } + case 3: { + message.defaultSkaffoldVersion = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -12684,6 +13463,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Config + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.Config + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Config.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.Config"; + }; + return Config; })(); @@ -12790,13 +13584,15 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.version = reader.string(); - break; - case 2: - message.supportEndDate = $root.google.type.Date.decode(reader, reader.uint32()); - break; - default: + case 1: { + message.version = reader.string(); + break; + } + case 2: { + message.supportEndDate = $root.google.type.Date.decode(reader, reader.uint32()); + break; + } + default: reader.skipType(tag & 7); break; } @@ -12899,6 +13695,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SkaffoldVersion + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.SkaffoldVersion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SkaffoldVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.SkaffoldVersion"; + }; + return SkaffoldVersion; })(); @@ -12994,9 +13805,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -13086,6 +13898,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetConfigRequest + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.GetConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.GetConfigRequest"; + }; + return GetConfigRequest; })(); @@ -13203,15 +14030,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.message = reader.string(); - break; - case 2: - message.deliveryPipeline = reader.string(); - break; - case 3: - message.type = reader.int32(); - break; + case 1: { + message.message = reader.string(); + break; + } + case 2: { + message.deliveryPipeline = reader.string(); + break; + } + case 3: { + message.type = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -13336,6 +14166,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeliveryPipelineNotificationEvent + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.DeliveryPipelineNotificationEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeliveryPipelineNotificationEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.DeliveryPipelineNotificationEvent"; + }; + return DeliveryPipelineNotificationEvent; })(); @@ -13469,15 +14314,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.message = reader.string(); - break; - case 2: - message.release = reader.string(); - break; - case 3: - message.type = reader.int32(); - break; + case 1: { + message.message = reader.string(); + break; + } + case 2: { + message.release = reader.string(); + break; + } + case 3: { + message.type = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -13602,6 +14450,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ReleaseNotificationEvent + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.ReleaseNotificationEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReleaseNotificationEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.ReleaseNotificationEvent"; + }; + return ReleaseNotificationEvent; })(); @@ -13708,12 +14571,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.message = reader.string(); - break; - case 2: - message.release = reader.string(); - break; + case 1: { + message.message = reader.string(); + break; + } + case 2: { + message.release = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -13812,6 +14677,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ReleaseRenderEvent + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.ReleaseRenderEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReleaseRenderEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.ReleaseRenderEvent"; + }; + return ReleaseRenderEvent; })(); @@ -13962,24 +14842,30 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.message = reader.string(); - break; - case 2: - message.pipelineUid = reader.string(); - break; - case 3: - message.releaseUid = reader.string(); - break; - case 4: - message.rollout = reader.string(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.targetId = reader.string(); - break; + case 1: { + message.message = reader.string(); + break; + } + case 2: { + message.pipelineUid = reader.string(); + break; + } + case 3: { + message.releaseUid = reader.string(); + break; + } + case 4: { + message.rollout = reader.string(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.targetId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -14128,6 +15014,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RolloutNotificationEvent + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.RolloutNotificationEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RolloutNotificationEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.RolloutNotificationEvent"; + }; + return RolloutNotificationEvent; })(); @@ -14245,15 +15146,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.message = reader.string(); - break; - case 2: - message.target = reader.string(); - break; - case 3: - message.type = reader.int32(); - break; + case 1: { + message.message = reader.string(); + break; + } + case 2: { + message.target = reader.string(); + break; + } + case 3: { + message.type = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -14378,6 +15282,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TargetNotificationEvent + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.TargetNotificationEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TargetNotificationEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.TargetNotificationEvent"; + }; + return TargetNotificationEvent; })(); @@ -14504,14 +15423,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -14627,6 +15548,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + return Http; })(); @@ -14837,38 +15773,48 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message["delete"] = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -15090,6 +16036,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + return HttpRule; })(); @@ -15196,12 +16157,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -15300,6 +16263,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + return CustomHttpPattern; })(); @@ -15494,36 +16472,43 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); - break; - case 3: - message.nameField = reader.string(); - break; - case 4: - message.history = reader.int32(); - break; - case 5: - message.plural = reader.string(); - break; - case 6: - message.singular = reader.string(); - break; - case 10: - if (!(message.style && message.style.length)) - message.style = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + message.type = reader.string(); + break; + } + case 2: { + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + } + case 3: { + message.nameField = reader.string(); + break; + } + case 4: { + message.history = reader.int32(); + break; + } + case 5: { + message.plural = reader.string(); + break; + } + case 6: { + message.singular = reader.string(); + break; + } + case 10: { + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else message.style.push(reader.int32()); - } else - message.style.push(reader.int32()); - break; + break; + } default: reader.skipType(tag & 7); break; @@ -15721,6 +16706,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; + /** * History enum. * @name google.api.ResourceDescriptor.History @@ -15857,12 +16857,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.childType = reader.string(); - break; + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -15961,12 +16963,27 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ResourceReference; - })(); - - return api; - })(); - + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + + return ResourceReference; + })(); + + return api; + })(); + google.protobuf = (function() { /** @@ -16070,11 +17087,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -16181,6 +17199,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + return FileDescriptorSet; })(); @@ -16202,6 +17235,7 @@ * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {string|null} [edition] FileDescriptorProto edition */ /** @@ -16322,6 +17356,14 @@ */ FileDescriptorProto.prototype.syntax = ""; + /** + * FileDescriptorProto edition. + * @member {string} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = ""; + /** * Creates a new FileDescriptorProto instance using the specified properties. * @function create @@ -16377,6 +17419,8 @@ writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.edition); return writer; }; @@ -16411,66 +17455,82 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message["package"] = reader.string(); - break; - case 3: - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - case 10: - if (!(message.publicDependency && message.publicDependency.length)) - message.publicDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else message.publicDependency.push(reader.int32()); - } else - message.publicDependency.push(reader.int32()); - break; - case 11: - if (!(message.weakDependency && message.weakDependency.length)) - message.weakDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else message.weakDependency.push(reader.int32()); - } else - message.weakDependency.push(reader.int32()); - break; - case 4: - if (!(message.messageType && message.messageType.length)) - message.messageType = []; - message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 13: { + message.edition = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -16582,6 +17642,9 @@ if (message.syntax != null && message.hasOwnProperty("syntax")) if (!$util.isString(message.syntax)) return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + if (!$util.isString(message.edition)) + return "edition: string expected"; return null; }; @@ -16674,6 +17737,8 @@ } if (object.syntax != null) message.syntax = String(object.syntax); + if (object.edition != null) + message.edition = String(object.edition); return message; }; @@ -16705,6 +17770,7 @@ object.options = null; object.sourceCodeInfo = null; object.syntax = ""; + object.edition = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -16751,6 +17817,8 @@ } if (message.syntax != null && message.hasOwnProperty("syntax")) object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = message.edition; return object; }; @@ -16765,6 +17833,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + return FileDescriptorProto; })(); @@ -16975,52 +18058,62 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.nestedType && message.nestedType.length)) - message.nestedType = []; - message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.extensionRange && message.extensionRange.length)) - message.extensionRange = []; - message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - if (!(message.oneofDecl && message.oneofDecl.length)) - message.oneofDecl = []; - message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -17321,6 +18414,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + DescriptorProto.ExtensionRange = (function() { /** @@ -17435,15 +18543,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -17555,6 +18666,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + return ExtensionRange; })(); @@ -17661,12 +18787,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -17765,6 +18893,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + return ReservedRange; })(); @@ -17865,11 +19008,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -17976,6 +19120,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + return ExtensionRangeOptions; })(); @@ -18181,39 +19340,50 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3Optional = reader.bool(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -18500,6 +19670,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + /** * Type enum. * @name google.protobuf.FieldDescriptorProto.Type @@ -18668,12 +19853,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -18777,6 +19964,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + return OneofDescriptorProto; })(); @@ -18922,27 +20124,32 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -19118,6 +20325,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + EnumDescriptorProto.EnumReservedRange = (function() { /** @@ -19221,12 +20443,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -19325,6 +20549,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + return EnumReservedRange; })(); @@ -19445,15 +20684,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -19565,6 +20807,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + return EnumValueDescriptorProto; })(); @@ -19684,17 +20941,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -19824,6 +21084,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + return ServiceDescriptorProto; })(); @@ -19974,24 +21249,30 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -20127,6 +21408,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + return MethodDescriptorProto; })(); @@ -20457,76 +21753,98 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1053: - if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) - message[".google.api.resourceDefinition"] = []; - message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); - break; + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 42: { + message.phpGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -20839,6 +22157,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + /** * OptimizeMode enum. * @name google.protobuf.FileOptions.OptimizeMode @@ -21007,26 +22340,32 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1053: - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); - break; + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -21180,6 +22519,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + return MessageOptions; })(); @@ -21193,6 +22547,7 @@ * @property {boolean|null} [packed] FieldOptions packed * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy * @property {boolean|null} [deprecated] FieldOptions deprecated * @property {boolean|null} [weak] FieldOptions weak * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption @@ -21249,6 +22604,14 @@ */ FieldOptions.prototype.lazy = false; + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + /** * FieldOptions deprecated. * @member {boolean} deprecated @@ -21325,6 +22688,8 @@ writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); @@ -21370,42 +22735,55 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1052: - if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) - message[".google.api.fieldBehavior"] = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else message[".google.api.fieldBehavior"].push(reader.int32()); - } else - message[".google.api.fieldBehavior"].push(reader.int32()); - break; - case 1055: - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); - break; + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -21465,6 +22843,9 @@ if (message.lazy != null && message.hasOwnProperty("lazy")) if (typeof message.lazy !== "boolean") return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; if (message.deprecated != null && message.hasOwnProperty("deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; @@ -21550,6 +22931,8 @@ } if (object.lazy != null) message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); if (object.deprecated != null) message.deprecated = Boolean(object.deprecated); if (object.weak != null) @@ -21637,6 +23020,7 @@ object.lazy = false; object.jstype = options.enums === String ? "JS_NORMAL" : 0; object.weak = false; + object.unverifiedLazy = false; object[".google.api.resourceReference"] = null; } if (message.ctype != null && message.hasOwnProperty("ctype")) @@ -21651,6 +23035,8 @@ object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; if (message.weak != null && message.hasOwnProperty("weak")) object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -21677,6 +23063,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + /** * CType enum. * @name google.protobuf.FieldOptions.CType @@ -21806,11 +23207,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -21917,6 +23319,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + return OneofOptions; })(); @@ -22036,17 +23453,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -22171,6 +23591,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + return EnumOptions; })(); @@ -22279,14 +23714,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 1: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -22402,6 +23839,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + return EnumValueOptions; })(); @@ -22532,20 +23984,24 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1049: - message[".google.api.defaultHost"] = reader.string(); - break; - case 1050: - message[".google.api.oauthScopes"] = reader.string(); - break; + case 33: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -22678,6 +24134,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + return ServiceOptions; })(); @@ -22832,28 +24303,34 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 72295728: - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); - break; - case 1051: - if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) - message[".google.api.methodSignature"] = []; - message[".google.api.methodSignature"].push(reader.string()); - break; - case 1049: - message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); - break; + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } + case 1049: { + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -23043,6 +24520,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + /** * IdempotencyLevel enum. * @name google.protobuf.MethodOptions.IdempotencyLevel @@ -23222,29 +24714,36 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = reader.uint64(); - break; - case 5: - message.negativeIntValue = reader.int64(); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + } + case 3: { + message.identifierValue = reader.string(); + break; + } + case 4: { + message.positiveIntValue = reader.uint64(); + break; + } + case 5: { + message.negativeIntValue = reader.int64(); + break; + } + case 6: { + message.doubleValue = reader.double(); + break; + } + case 7: { + message.stringValue = reader.bytes(); + break; + } + case 8: { + message.aggregateValue = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -23357,7 +24856,7 @@ if (object.stringValue != null) if (typeof object.stringValue === "string") $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); - else if (object.stringValue.length) + else if (object.stringValue.length >= 0) message.stringValue = object.stringValue; if (object.aggregateValue != null) message.aggregateValue = String(object.aggregateValue); @@ -23438,6 +24937,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + UninterpretedOption.NamePart = (function() { /** @@ -23539,12 +25053,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -23645,6 +25161,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + return NamePart; })(); @@ -23745,11 +25276,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -23856,6 +25388,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + SourceCodeInfo.Location = (function() { /** @@ -24004,37 +25551,42 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - case 2: - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else message.span.push(reader.int32()); - } else - message.span.push(reader.int32()); - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) - message.leadingDetachedComments = []; - message.leadingDetachedComments.push(reader.string()); - break; + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -24195,6 +25747,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + return Location; })(); @@ -24295,11 +25862,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.annotation && message.annotation.length)) - message.annotation = []; - message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -24406,6 +25974,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + GeneratedCodeInfo.Annotation = (function() { /** @@ -24416,6 +25999,7 @@ * @property {string|null} [sourceFile] Annotation sourceFile * @property {number|null} [begin] Annotation begin * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic */ /** @@ -24466,6 +26050,14 @@ */ Annotation.prototype.end = 0; + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + /** * Creates a new Annotation instance using the specified properties. * @function create @@ -24502,6 +26094,8 @@ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); if (message.end != null && Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); return writer; }; @@ -24536,25 +26130,33 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -24606,6 +26208,15 @@ if (message.end != null && message.hasOwnProperty("end")) if (!$util.isInteger(message.end)) return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -24634,6 +26245,20 @@ message.begin = object.begin | 0; if (object.end != null) message.end = object.end | 0; + switch (object.semantic) { + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } return message; }; @@ -24656,6 +26281,7 @@ object.sourceFile = ""; object.begin = 0; object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; } if (message.path && message.path.length) { object.path = []; @@ -24668,6 +26294,8 @@ object.begin = message.begin; if (message.end != null && message.hasOwnProperty("end")) object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; return object; }; @@ -24682,6 +26310,37 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + return Annotation; })(); @@ -24791,12 +26450,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type_url = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; + case 1: { + message.type_url = reader.string(); + break; + } + case 2: { + message.value = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -24858,7 +26519,7 @@ if (object.value != null) if (typeof object.value === "string") $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) + else if (object.value.length >= 0) message.value = object.value; return message; }; @@ -24904,6 +26565,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Any + * @function getTypeUrl + * @memberof google.protobuf.Any + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Any"; + }; + return Any; })(); @@ -25010,12 +26686,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.seconds = reader.int64(); - break; - case 2: - message.nanos = reader.int32(); - break; + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -25128,6 +26806,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + return Duration; })(); @@ -25288,6 +26981,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Empty + * @function getTypeUrl + * @memberof google.protobuf.Empty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; + return Empty; })(); @@ -25385,11 +27093,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); - break; + case 1: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -25491,6 +27200,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FieldMask + * @function getTypeUrl + * @memberof google.protobuf.FieldMask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldMask"; + }; + return FieldMask; })(); @@ -25597,12 +27321,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.seconds = reader.int64(); - break; - case 2: - message.nanos = reader.int32(); - break; + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -25715,6 +27441,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + return Timestamp; })(); @@ -25763,7 +27504,7 @@ }; /** - * Callback as used by {@link google.longrunning.Operations#listOperations}. + * Callback as used by {@link google.longrunning.Operations|listOperations}. * @memberof google.longrunning.Operations * @typedef ListOperationsCallback * @type {function} @@ -25796,7 +27537,7 @@ */ /** - * Callback as used by {@link google.longrunning.Operations#getOperation}. + * Callback as used by {@link google.longrunning.Operations|getOperation}. * @memberof google.longrunning.Operations * @typedef GetOperationCallback * @type {function} @@ -25829,7 +27570,7 @@ */ /** - * Callback as used by {@link google.longrunning.Operations#deleteOperation}. + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. * @memberof google.longrunning.Operations * @typedef DeleteOperationCallback * @type {function} @@ -25862,7 +27603,7 @@ */ /** - * Callback as used by {@link google.longrunning.Operations#cancelOperation}. + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. * @memberof google.longrunning.Operations * @typedef CancelOperationCallback * @type {function} @@ -25895,7 +27636,7 @@ */ /** - * Callback as used by {@link google.longrunning.Operations#waitOperation}. + * Callback as used by {@link google.longrunning.Operations|waitOperation}. * @memberof google.longrunning.Operations * @typedef WaitOperationCallback * @type {function} @@ -26080,21 +27821,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 3: - message.done = reader.bool(); - break; - case 4: - message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - case 5: - message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } + case 3: { + message.done = reader.bool(); + break; + } + case 4: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 5: { + message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -26245,6 +27991,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Operation + * @function getTypeUrl + * @memberof google.longrunning.Operation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.Operation"; + }; + return Operation; })(); @@ -26340,9 +28101,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -26432,6 +28194,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.GetOperationRequest"; + }; + return GetOperationRequest; })(); @@ -26560,18 +28337,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: - message.name = reader.string(); - break; - case 1: - message.filter = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; + case 4: { + message.name = reader.string(); + break; + } + case 1: { + message.filter = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -26686,6 +28467,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListOperationsRequest + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsRequest"; + }; + return ListOperationsRequest; })(); @@ -26794,14 +28590,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.operations && message.operations.length)) - message.operations = []; - message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -26917,6 +28715,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListOperationsResponse + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsResponse"; + }; + return ListOperationsResponse; })(); @@ -27012,9 +28825,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -27104,6 +28918,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CancelOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.CancelOperationRequest"; + }; + return CancelOperationRequest; })(); @@ -27199,9 +29028,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -27291,6 +29121,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.DeleteOperationRequest"; + }; + return DeleteOperationRequest; })(); @@ -27397,12 +29242,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -27506,6 +29353,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WaitOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.WaitOperationRequest"; + }; + return WaitOperationRequest; })(); @@ -27612,12 +29474,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.responseType = reader.string(); - break; - case 2: - message.metadataType = reader.string(); - break; + case 1: { + message.responseType = reader.string(); + break; + } + case 2: { + message.metadataType = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -27716,6 +29580,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OperationInfo + * @function getTypeUrl + * @memberof google.longrunning.OperationInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.OperationInfo"; + }; + return OperationInfo; })(); @@ -27847,17 +29726,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.code = reader.int32(); - break; - case 2: - message.message = reader.string(); - break; - case 3: - if (!(message.details && message.details.length)) - message.details = []; - message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); - break; + case 1: { + message.code = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -27982,6 +29864,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Status + * @function getTypeUrl + * @memberof google.rpc.Status + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.Status"; + }; + return Status; })(); @@ -28111,15 +30008,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.year = reader.int32(); - break; - case 2: - message.month = reader.int32(); - break; - case 3: - message.day = reader.int32(); - break; + case 1: { + message.year = reader.int32(); + break; + } + case 2: { + message.month = reader.int32(); + break; + } + case 3: { + message.day = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -28226,6 +30126,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Date + * @function getTypeUrl + * @memberof google.type.Date + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Date.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.Date"; + }; + return Date; })(); diff --git a/packages/google-cloud-deploy/protos/protos.json b/packages/google-cloud-deploy/protos/protos.json index 0420b65e04e..f191ff68a03 100644 --- a/packages/google-cloud-deploy/protos/protos.json +++ b/packages/google-cloud-deploy/protos/protos.json @@ -2278,6 +2278,10 @@ "syntax": { "type": "string", "id": 12 + }, + "edition": { + "type": "string", + "id": 13 } } }, @@ -2806,6 +2810,13 @@ "default": false } }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, "deprecated": { "type": "bool", "id": 3, @@ -3098,6 +3109,19 @@ "end": { "type": "int32", "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } } } } From 513ef4bb91b3f7464cdd0ddbe7437fb1e6f2fa23 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 26 Aug 2022 11:04:15 -0700 Subject: [PATCH 220/254] chore(main): release 2.1.1 (#61) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 2.1.1 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- packages/google-cloud-deploy/CHANGELOG.md | 9 +++++++++ packages/google-cloud-deploy/package.json | 2 +- .../v1/snippet_metadata.google.cloud.deploy.v1.json | 2 +- packages/google-cloud-deploy/samples/package.json | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-deploy/CHANGELOG.md b/packages/google-cloud-deploy/CHANGELOG.md index 69e075c4869..806712a09c0 100644 --- a/packages/google-cloud-deploy/CHANGELOG.md +++ b/packages/google-cloud-deploy/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## [2.1.1](https://github.com/googleapis/nodejs-deploy/compare/v2.1.0...v2.1.1) (2022-08-23) + + +### Bug Fixes + +* better support for fallback mode ([#59](https://github.com/googleapis/nodejs-deploy/issues/59)) ([21bd8f3](https://github.com/googleapis/nodejs-deploy/commit/21bd8f318612224884e01504e949d59f9f9c5615)) +* change import long to require ([#60](https://github.com/googleapis/nodejs-deploy/issues/60)) ([682372a](https://github.com/googleapis/nodejs-deploy/commit/682372af2f6758cb797743ad08ad474837024219)) +* remove pip install statements ([#1546](https://github.com/googleapis/nodejs-deploy/issues/1546)) ([#62](https://github.com/googleapis/nodejs-deploy/issues/62)) ([d70fc8b](https://github.com/googleapis/nodejs-deploy/commit/d70fc8b1f161cd908385001eb433fb0a1bdae561)) + ## [2.1.0](https://github.com/googleapis/nodejs-deploy/compare/v2.0.0...v2.1.0) (2022-06-30) diff --git a/packages/google-cloud-deploy/package.json b/packages/google-cloud-deploy/package.json index 31d57e55a04..c73fbf97877 100644 --- a/packages/google-cloud-deploy/package.json +++ b/packages/google-cloud-deploy/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/deploy", - "version": "2.1.0", + "version": "2.1.1", "description": "clouddeploy client for Node.js", "repository": "googleapis/nodejs-deploy", "license": "Apache-2.0", diff --git a/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json b/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json index 288ba7a7ab9..199de3e7cea 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json +++ b/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-deploy", - "version": "2.1.0", + "version": "2.1.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-deploy/samples/package.json b/packages/google-cloud-deploy/samples/package.json index 93dbb383837..df61b0122e2 100644 --- a/packages/google-cloud-deploy/samples/package.json +++ b/packages/google-cloud-deploy/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/deploy": "^2.1.0" + "@google-cloud/deploy": "^2.1.1" }, "devDependencies": { "c8": "^7.1.0", From 0517f3cd854ad653e5fc0621fd608760212363ba Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 26 Aug 2022 12:28:44 -0700 Subject: [PATCH 221/254] chore(main): release 2.0.2 (#137) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 2.0.2 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- packages/google-cloud-policytroubleshooter/CHANGELOG.md | 9 +++++++++ packages/google-cloud-policytroubleshooter/package.json | 2 +- ...et_metadata.google.cloud.policytroubleshooter.v1.json | 2 +- .../samples/package.json | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-policytroubleshooter/CHANGELOG.md b/packages/google-cloud-policytroubleshooter/CHANGELOG.md index a9e1f3868fe..3235d58929e 100644 --- a/packages/google-cloud-policytroubleshooter/CHANGELOG.md +++ b/packages/google-cloud-policytroubleshooter/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## [2.0.2](https://github.com/googleapis/nodejs-policy-troubleshooter/compare/v2.0.1...v2.0.2) (2022-08-23) + + +### Bug Fixes + +* better support for fallback mode ([#135](https://github.com/googleapis/nodejs-policy-troubleshooter/issues/135)) ([7acbd17](https://github.com/googleapis/nodejs-policy-troubleshooter/commit/7acbd17c45d76cac504436fbcd7a2f6463c3d3ef)) +* change import long to require ([#136](https://github.com/googleapis/nodejs-policy-troubleshooter/issues/136)) ([05699c7](https://github.com/googleapis/nodejs-policy-troubleshooter/commit/05699c7f0d17826d3635618803e41557ebc377d7)) +* remove pip install statements ([#1546](https://github.com/googleapis/nodejs-policy-troubleshooter/issues/1546)) ([#138](https://github.com/googleapis/nodejs-policy-troubleshooter/issues/138)) ([2b8a030](https://github.com/googleapis/nodejs-policy-troubleshooter/commit/2b8a030f81a00161baf08a9aafd4add86528d082)) + ## [2.0.1](https://github.com/googleapis/nodejs-policy-troubleshooter/compare/v2.0.0...v2.0.1) (2022-06-30) diff --git a/packages/google-cloud-policytroubleshooter/package.json b/packages/google-cloud-policytroubleshooter/package.json index 4d8a4648be1..fe908f1fc87 100644 --- a/packages/google-cloud-policytroubleshooter/package.json +++ b/packages/google-cloud-policytroubleshooter/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/policy-troubleshooter", - "version": "2.0.1", + "version": "2.0.2", "description": "Policytroubleshooter client for Node.js", "repository": "googleapis/nodejs-policy-troubleshooter", "license": "Apache-2.0", diff --git a/packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata.google.cloud.policytroubleshooter.v1.json b/packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata.google.cloud.policytroubleshooter.v1.json index c65ba730dcf..fb234f3d3d4 100644 --- a/packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata.google.cloud.policytroubleshooter.v1.json +++ b/packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata.google.cloud.policytroubleshooter.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-policytroubleshooter", - "version": "2.0.1", + "version": "2.0.2", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-policytroubleshooter/samples/package.json b/packages/google-cloud-policytroubleshooter/samples/package.json index ddd093d6bac..ad222102d0a 100644 --- a/packages/google-cloud-policytroubleshooter/samples/package.json +++ b/packages/google-cloud-policytroubleshooter/samples/package.json @@ -14,7 +14,7 @@ }, "dependencies": { "@google-cloud/local-auth": "^2.0.0", - "@google-cloud/policy-troubleshooter": "^2.0.1" + "@google-cloud/policy-troubleshooter": "^2.0.2" }, "devDependencies": { "c8": "^7.1.0", From 984270bafe4d2b20f89d8f60c8c98f1aceb6430c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Sat, 27 Aug 2022 04:58:12 +0000 Subject: [PATCH 222/254] fix: do not import the whole google-gax from proto JS (#1553) (#85) fix: use google-gax v3.3.0 Source-Link: https://github.com/googleapis/synthtool/commit/c73d112a11a1f1a93efa67c50495c19aa3a88910 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:b15a6f06cc06dcffa11e1bebdf1a74b6775a134aac24a0f86f51ddf728eb373e --- packages/google-cloud-gkeconnect-gateway/package.json | 2 +- packages/google-cloud-gkeconnect-gateway/protos/protos.d.ts | 2 +- packages/google-cloud-gkeconnect-gateway/protos/protos.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-gkeconnect-gateway/package.json b/packages/google-cloud-gkeconnect-gateway/package.json index 6a95d0edddf..89204e632e5 100644 --- a/packages/google-cloud-gkeconnect-gateway/package.json +++ b/packages/google-cloud-gkeconnect-gateway/package.json @@ -39,7 +39,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^3.0.1" + "google-gax": "^3.3.0" }, "devDependencies": { "@types/mocha": "^9.0.0", diff --git a/packages/google-cloud-gkeconnect-gateway/protos/protos.d.ts b/packages/google-cloud-gkeconnect-gateway/protos/protos.d.ts index ee55f0f2447..5355fd9a8b1 100644 --- a/packages/google-cloud-gkeconnect-gateway/protos/protos.d.ts +++ b/packages/google-cloud-gkeconnect-gateway/protos/protos.d.ts @@ -13,7 +13,7 @@ // limitations under the License. import Long = require("long"); -import {protobuf as $protobuf} from "google-gax"; +import type {protobuf as $protobuf} from "google-gax"; /** Namespace google. */ export namespace google { diff --git a/packages/google-cloud-gkeconnect-gateway/protos/protos.js b/packages/google-cloud-gkeconnect-gateway/protos/protos.js index 85ebd1c7200..23c8e091367 100644 --- a/packages/google-cloud-gkeconnect-gateway/protos/protos.js +++ b/packages/google-cloud-gkeconnect-gateway/protos/protos.js @@ -19,7 +19,7 @@ define(["protobufjs/minimal"], factory); /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) - module.exports = factory(require("google-gax").protobufMinimal); + module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); })(this, function($protobuf) { "use strict"; From 33bd7b1fd1d2d0cea71e2dacf6cf4455c60cd048 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Sat, 27 Aug 2022 04:58:27 +0000 Subject: [PATCH 223/254] fix: do not import the whole google-gax from proto JS (#1553) (#63) fix: use google-gax v3.3.0 Source-Link: https://github.com/googleapis/synthtool/commit/c73d112a11a1f1a93efa67c50495c19aa3a88910 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:b15a6f06cc06dcffa11e1bebdf1a74b6775a134aac24a0f86f51ddf728eb373e --- packages/google-cloud-deploy/package.json | 2 +- packages/google-cloud-deploy/protos/protos.d.ts | 2 +- packages/google-cloud-deploy/protos/protos.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-deploy/package.json b/packages/google-cloud-deploy/package.json index c73fbf97877..4549f1a1e74 100644 --- a/packages/google-cloud-deploy/package.json +++ b/packages/google-cloud-deploy/package.json @@ -39,7 +39,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^3.0.1" + "google-gax": "^3.3.0" }, "devDependencies": { "@types/mocha": "^9.0.0", diff --git a/packages/google-cloud-deploy/protos/protos.d.ts b/packages/google-cloud-deploy/protos/protos.d.ts index 4919daecc19..7935a117dd1 100644 --- a/packages/google-cloud-deploy/protos/protos.d.ts +++ b/packages/google-cloud-deploy/protos/protos.d.ts @@ -13,7 +13,7 @@ // limitations under the License. import Long = require("long"); -import {protobuf as $protobuf} from "google-gax"; +import type {protobuf as $protobuf} from "google-gax"; /** Namespace google. */ export namespace google { diff --git a/packages/google-cloud-deploy/protos/protos.js b/packages/google-cloud-deploy/protos/protos.js index adfe361ca28..c011d70c8a6 100644 --- a/packages/google-cloud-deploy/protos/protos.js +++ b/packages/google-cloud-deploy/protos/protos.js @@ -19,7 +19,7 @@ define(["protobufjs/minimal"], factory); /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) - module.exports = factory(require("google-gax").protobufMinimal); + module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); })(this, function($protobuf) { "use strict"; From a0a23cd176433cfd11dcdfa1a6461b3889872426 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Sat, 27 Aug 2022 05:00:37 +0000 Subject: [PATCH 224/254] fix: do not import the whole google-gax from proto JS (#1553) (#139) fix: use google-gax v3.3.0 Source-Link: https://github.com/googleapis/synthtool/commit/c73d112a11a1f1a93efa67c50495c19aa3a88910 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:b15a6f06cc06dcffa11e1bebdf1a74b6775a134aac24a0f86f51ddf728eb373e --- packages/google-cloud-policytroubleshooter/package.json | 2 +- packages/google-cloud-policytroubleshooter/protos/protos.d.ts | 2 +- packages/google-cloud-policytroubleshooter/protos/protos.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-policytroubleshooter/package.json b/packages/google-cloud-policytroubleshooter/package.json index fe908f1fc87..b09196fabf2 100644 --- a/packages/google-cloud-policytroubleshooter/package.json +++ b/packages/google-cloud-policytroubleshooter/package.json @@ -39,7 +39,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^3.0.1" + "google-gax": "^3.3.0" }, "devDependencies": { "@types/mocha": "^9.0.0", diff --git a/packages/google-cloud-policytroubleshooter/protos/protos.d.ts b/packages/google-cloud-policytroubleshooter/protos/protos.d.ts index e8cc945a8ff..fa54ca92c56 100644 --- a/packages/google-cloud-policytroubleshooter/protos/protos.d.ts +++ b/packages/google-cloud-policytroubleshooter/protos/protos.d.ts @@ -13,7 +13,7 @@ // limitations under the License. import Long = require("long"); -import {protobuf as $protobuf} from "google-gax"; +import type {protobuf as $protobuf} from "google-gax"; /** Namespace google. */ export namespace google { diff --git a/packages/google-cloud-policytroubleshooter/protos/protos.js b/packages/google-cloud-policytroubleshooter/protos/protos.js index bd1cc6b2c08..604b8a6dafe 100644 --- a/packages/google-cloud-policytroubleshooter/protos/protos.js +++ b/packages/google-cloud-policytroubleshooter/protos/protos.js @@ -19,7 +19,7 @@ define(["protobufjs/minimal"], factory); /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) - module.exports = factory(require("google-gax").protobufMinimal); + module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); })(this, function($protobuf) { "use strict"; From 0cb1a1a97898d4e9bfa9a46382782a8b38f8a90c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Sat, 27 Aug 2022 05:04:26 +0000 Subject: [PATCH 225/254] fix: do not import the whole google-gax from proto JS (#1553) (#102) fix: use google-gax v3.3.0 Source-Link: https://github.com/googleapis/synthtool/commit/c73d112a11a1f1a93efa67c50495c19aa3a88910 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:b15a6f06cc06dcffa11e1bebdf1a74b6775a134aac24a0f86f51ddf728eb373e --- packages/google-cloud-shell/package.json | 2 +- packages/google-cloud-shell/protos/protos.d.ts | 2 +- packages/google-cloud-shell/protos/protos.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-shell/package.json b/packages/google-cloud-shell/package.json index a981aa11e78..21339c92567 100644 --- a/packages/google-cloud-shell/package.json +++ b/packages/google-cloud-shell/package.json @@ -39,7 +39,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^3.0.1" + "google-gax": "^3.3.0" }, "devDependencies": { "@types/mocha": "^9.0.0", diff --git a/packages/google-cloud-shell/protos/protos.d.ts b/packages/google-cloud-shell/protos/protos.d.ts index 0b6eeba4b71..31d8787fc32 100644 --- a/packages/google-cloud-shell/protos/protos.d.ts +++ b/packages/google-cloud-shell/protos/protos.d.ts @@ -13,7 +13,7 @@ // limitations under the License. import Long = require("long"); -import {protobuf as $protobuf} from "google-gax"; +import type {protobuf as $protobuf} from "google-gax"; /** Namespace google. */ export namespace google { diff --git a/packages/google-cloud-shell/protos/protos.js b/packages/google-cloud-shell/protos/protos.js index 9abb3be7a8b..5fa2e28e0a9 100644 --- a/packages/google-cloud-shell/protos/protos.js +++ b/packages/google-cloud-shell/protos/protos.js @@ -19,7 +19,7 @@ define(["protobufjs/minimal"], factory); /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) - module.exports = factory(require("google-gax").protobufMinimal); + module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); })(this, function($protobuf) { "use strict"; From e731034b950f9d9f09bd8509e9904bf040372204 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Sat, 27 Aug 2022 05:04:30 +0000 Subject: [PATCH 226/254] fix: do not import the whole google-gax from proto JS (#1553) (#48) fix: use google-gax v3.3.0 Source-Link: https://github.com/googleapis/synthtool/commit/c73d112a11a1f1a93efa67c50495c19aa3a88910 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:b15a6f06cc06dcffa11e1bebdf1a74b6775a134aac24a0f86f51ddf728eb373e --- packages/google-cloud-dataplex/package.json | 2 +- packages/google-cloud-dataplex/protos/protos.d.ts | 2 +- packages/google-cloud-dataplex/protos/protos.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-dataplex/package.json b/packages/google-cloud-dataplex/package.json index 3de94bd3067..338c45d7df0 100644 --- a/packages/google-cloud-dataplex/package.json +++ b/packages/google-cloud-dataplex/package.json @@ -39,7 +39,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^3.0.1" + "google-gax": "^3.3.0" }, "devDependencies": { "@types/mocha": "^9.0.0", diff --git a/packages/google-cloud-dataplex/protos/protos.d.ts b/packages/google-cloud-dataplex/protos/protos.d.ts index 0e10fb32aae..322f339249b 100644 --- a/packages/google-cloud-dataplex/protos/protos.d.ts +++ b/packages/google-cloud-dataplex/protos/protos.d.ts @@ -13,7 +13,7 @@ // limitations under the License. import Long = require("long"); -import {protobuf as $protobuf} from "google-gax"; +import type {protobuf as $protobuf} from "google-gax"; /** Namespace google. */ export namespace google { diff --git a/packages/google-cloud-dataplex/protos/protos.js b/packages/google-cloud-dataplex/protos/protos.js index a1d13ede5d9..2504aa41bae 100644 --- a/packages/google-cloud-dataplex/protos/protos.js +++ b/packages/google-cloud-dataplex/protos/protos.js @@ -19,7 +19,7 @@ define(["protobufjs/minimal"], factory); /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) - module.exports = factory(require("google-gax").protobufMinimal); + module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); })(this, function($protobuf) { "use strict"; From 19fd47fac9956857f68aa349f0b14c1acfe183b2 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 1 Sep 2022 20:26:20 +0000 Subject: [PATCH 227/254] fix: allow passing gax instance to client constructor (#64) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 470911839 Source-Link: https://github.com/googleapis/googleapis/commit/352756699ebc5b2144c252867c265ea44448712e Source-Link: https://github.com/googleapis/googleapis-gen/commit/f16a1d224f00a630ea43d6a9a1a31f566f45cdea Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjE2YTFkMjI0ZjAwYTYzMGVhNDNkNmE5YTFhMzFmNTY2ZjQ1Y2RlYSJ9 feat: accept google-gax instance as a parameter Please see the documentation of the client constructor for details. PiperOrigin-RevId: 470332808 Source-Link: https://github.com/googleapis/googleapis/commit/d4a23675457cd8f0b44080e0594ec72de1291b89 Source-Link: https://github.com/googleapis/googleapis-gen/commit/e97a1ac204ead4fe7341f91e72db7c6ac6016341 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTk3YTFhYzIwNGVhZDRmZTczNDFmOTFlNzJkYjdjNmFjNjAxNjM0MSJ9 --- .../src/v1/cloud_deploy_client.ts | 153 ++++++++++-------- 1 file changed, 87 insertions(+), 66 deletions(-) diff --git a/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts b/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts index be4fc862c81..93801d4cc09 100644 --- a/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts +++ b/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts @@ -17,8 +17,8 @@ // ** All changes to this file may be overwritten. ** /* global window */ -import * as gax from 'google-gax'; -import { +import type * as gax from 'google-gax'; +import type { Callback, CallOptions, Descriptors, @@ -28,7 +28,6 @@ import { PaginationCallback, GaxCall, } from 'google-gax'; - import {Transform} from 'stream'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); @@ -38,7 +37,6 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './cloud_deploy_client_config.json'; -import {operationsProtos} from 'google-gax'; const version = require('../../../package.json').version; /** @@ -100,8 +98,18 @@ export class CloudDeployClient { * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. * For more information, please check the * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. - */ - constructor(opts?: ClientOptions) { + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new CloudDeployClient({fallback: 'rest'}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { // Ensure that options include all the required fields. const staticMembers = this.constructor as typeof CloudDeployClient; const servicePath = @@ -121,8 +129,13 @@ export class CloudDeployClient { opts['scopes'] = staticMembers.scopes; } + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gax.fallback : gax; + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. this._gaxGrpc = new this._gaxModule.GrpcClient(opts); @@ -417,7 +430,7 @@ export class CloudDeployClient { this.innerApiCalls = {}; // Add a warn function to the client constructor so it can be easily tested. - this.warn = gax.warn; + this.warn = this._gaxModule.warn; } /** @@ -643,7 +656,7 @@ export class CloudDeployClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -727,7 +740,7 @@ export class CloudDeployClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -811,7 +824,7 @@ export class CloudDeployClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -900,7 +913,7 @@ export class CloudDeployClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -984,7 +997,7 @@ export class CloudDeployClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1067,7 +1080,7 @@ export class CloudDeployClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1193,7 +1206,7 @@ export class CloudDeployClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -1223,11 +1236,12 @@ export class CloudDeployClient { protos.google.cloud.deploy.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.createDeliveryPipeline, this._gaxModule.createDefaultBackoffSettings() @@ -1360,7 +1374,7 @@ export class CloudDeployClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ 'delivery_pipeline.name': request.deliveryPipeline!.name || '', }); this.initialize(); @@ -1390,11 +1404,12 @@ export class CloudDeployClient { protos.google.cloud.deploy.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.updateDeliveryPipeline, this._gaxModule.createDefaultBackoffSettings() @@ -1530,7 +1545,7 @@ export class CloudDeployClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1560,11 +1575,12 @@ export class CloudDeployClient { protos.google.cloud.deploy.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.deleteDeliveryPipeline, this._gaxModule.createDefaultBackoffSettings() @@ -1694,7 +1710,7 @@ export class CloudDeployClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -1720,11 +1736,12 @@ export class CloudDeployClient { protos.google.cloud.deploy.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.createTarget, this._gaxModule.createDefaultBackoffSettings() @@ -1857,7 +1874,7 @@ export class CloudDeployClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ 'target.name': request.target!.name || '', }); this.initialize(); @@ -1883,11 +1900,12 @@ export class CloudDeployClient { protos.google.cloud.deploy.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.updateTarget, this._gaxModule.createDefaultBackoffSettings() @@ -2019,7 +2037,7 @@ export class CloudDeployClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -2045,11 +2063,12 @@ export class CloudDeployClient { protos.google.cloud.deploy.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.deleteTarget, this._gaxModule.createDefaultBackoffSettings() @@ -2179,7 +2198,7 @@ export class CloudDeployClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -2205,11 +2224,12 @@ export class CloudDeployClient { protos.google.cloud.deploy.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.createRelease, this._gaxModule.createDefaultBackoffSettings() @@ -2339,7 +2359,7 @@ export class CloudDeployClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -2365,11 +2385,12 @@ export class CloudDeployClient { protos.google.cloud.deploy.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.createRollout, this._gaxModule.createDefaultBackoffSettings() @@ -2484,7 +2505,7 @@ export class CloudDeployClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -2535,7 +2556,7 @@ export class CloudDeployClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listDeliveryPipelines']; @@ -2595,7 +2616,7 @@ export class CloudDeployClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listDeliveryPipelines']; @@ -2703,7 +2724,7 @@ export class CloudDeployClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -2753,7 +2774,7 @@ export class CloudDeployClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listTargets']; @@ -2812,7 +2833,7 @@ export class CloudDeployClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listTargets']; @@ -2921,7 +2942,7 @@ export class CloudDeployClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -2970,7 +2991,7 @@ export class CloudDeployClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listReleases']; @@ -3028,7 +3049,7 @@ export class CloudDeployClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listReleases']; @@ -3137,7 +3158,7 @@ export class CloudDeployClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -3186,7 +3207,7 @@ export class CloudDeployClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listRollouts']; @@ -3244,7 +3265,7 @@ export class CloudDeployClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listRollouts']; From 3fe15d190c3c8e9c4b51e310892521d84b9ff2c0 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 1 Sep 2022 20:36:28 +0000 Subject: [PATCH 228/254] fix: allow passing gax instance to client constructor (#86) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 470911839 Source-Link: https://github.com/googleapis/googleapis/commit/352756699ebc5b2144c252867c265ea44448712e Source-Link: https://github.com/googleapis/googleapis-gen/commit/f16a1d224f00a630ea43d6a9a1a31f566f45cdea Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjE2YTFkMjI0ZjAwYTYzMGVhNDNkNmE5YTFhMzFmNTY2ZjQ1Y2RlYSJ9 feat: accept google-gax instance as a parameter Please see the documentation of the client constructor for details. PiperOrigin-RevId: 470332808 Source-Link: https://github.com/googleapis/googleapis/commit/d4a23675457cd8f0b44080e0594ec72de1291b89 Source-Link: https://github.com/googleapis/googleapis-gen/commit/e97a1ac204ead4fe7341f91e72db7c6ac6016341 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTk3YTFhYzIwNGVhZDRmZTczNDFmOTFlNzJkYjdjNmFjNjAxNjM0MSJ9 --- .../src/v1beta1/gateway_service_client.ts | 31 +++++++++++++++---- 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts b/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts index 457e1183cf6..ce2d66f902e 100644 --- a/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts +++ b/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_service_client.ts @@ -17,8 +17,13 @@ // ** All changes to this file may be overwritten. ** /* global window */ -import * as gax from 'google-gax'; -import {Callback, CallOptions, Descriptors, ClientOptions} from 'google-gax'; +import type * as gax from 'google-gax'; +import type { + Callback, + CallOptions, + Descriptors, + ClientOptions, +} from 'google-gax'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); @@ -28,7 +33,6 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './gateway_service_client_config.json'; - const version = require('../../../package.json').version; /** @@ -91,8 +95,18 @@ export class GatewayServiceClient { * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. * For more information, please check the * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new GatewayServiceClient({fallback: 'rest'}, gax); + * ``` */ - constructor(opts?: ClientOptions) { + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { // Ensure that options include all the required fields. const staticMembers = this.constructor as typeof GatewayServiceClient; const servicePath = @@ -112,8 +126,13 @@ export class GatewayServiceClient { opts['scopes'] = staticMembers.scopes; } + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gax.fallback : gax; + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. this._gaxGrpc = new this._gaxModule.GrpcClient(opts); @@ -167,7 +186,7 @@ export class GatewayServiceClient { this.innerApiCalls = {}; // Add a warn function to the client constructor so it can be easily tested. - this.warn = gax.warn; + this.warn = this._gaxModule.warn; } /** From 525d8f6dba1ea3bf312782433ea63da973fe36b6 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 1 Sep 2022 20:48:29 +0000 Subject: [PATCH 229/254] fix: allow passing gax instance to client constructor (#140) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 470911839 Source-Link: https://github.com/googleapis/googleapis/commit/352756699ebc5b2144c252867c265ea44448712e Source-Link: https://github.com/googleapis/googleapis-gen/commit/f16a1d224f00a630ea43d6a9a1a31f566f45cdea Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjE2YTFkMjI0ZjAwYTYzMGVhNDNkNmE5YTFhMzFmNTY2ZjQ1Y2RlYSJ9 feat: accept google-gax instance as a parameter Please see the documentation of the client constructor for details. PiperOrigin-RevId: 470332808 Source-Link: https://github.com/googleapis/googleapis/commit/d4a23675457cd8f0b44080e0594ec72de1291b89 Source-Link: https://github.com/googleapis/googleapis-gen/commit/e97a1ac204ead4fe7341f91e72db7c6ac6016341 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTk3YTFhYzIwNGVhZDRmZTczNDFmOTFlNzJkYjdjNmFjNjAxNjM0MSJ9 --- .../src/v1/iam_checker_client.ts | 31 +++++++++++++++---- 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts b/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts index cdb30992b86..884a6f0a421 100644 --- a/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts +++ b/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts @@ -17,8 +17,13 @@ // ** All changes to this file may be overwritten. ** /* global window */ -import * as gax from 'google-gax'; -import {Callback, CallOptions, Descriptors, ClientOptions} from 'google-gax'; +import type * as gax from 'google-gax'; +import type { + Callback, + CallOptions, + Descriptors, + ClientOptions, +} from 'google-gax'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); @@ -28,7 +33,6 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './iam_checker_client_config.json'; - const version = require('../../../package.json').version; /** @@ -89,8 +93,18 @@ export class IamCheckerClient { * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. * For more information, please check the * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new IamCheckerClient({fallback: 'rest'}, gax); + * ``` */ - constructor(opts?: ClientOptions) { + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { // Ensure that options include all the required fields. const staticMembers = this.constructor as typeof IamCheckerClient; const servicePath = @@ -110,8 +124,13 @@ export class IamCheckerClient { opts['scopes'] = staticMembers.scopes; } + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gax.fallback : gax; + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. this._gaxGrpc = new this._gaxModule.GrpcClient(opts); @@ -165,7 +184,7 @@ export class IamCheckerClient { this.innerApiCalls = {}; // Add a warn function to the client constructor so it can be easily tested. - this.warn = gax.warn; + this.warn = this._gaxModule.warn; } /** From f768b367302c725b939409b9e4a21adfeba92a3f Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 7 Sep 2022 17:49:58 -0400 Subject: [PATCH 230/254] chore(main): release 2.1.1 (#46) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 2.1.1 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- packages/google-cloud-dataplex/CHANGELOG.md | 10 ++++++++++ packages/google-cloud-dataplex/package.json | 2 +- .../v1/snippet_metadata.google.cloud.dataplex.v1.json | 2 +- packages/google-cloud-dataplex/samples/package.json | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-dataplex/CHANGELOG.md b/packages/google-cloud-dataplex/CHANGELOG.md index fddc61dca5c..2270e42b0a5 100644 --- a/packages/google-cloud-dataplex/CHANGELOG.md +++ b/packages/google-cloud-dataplex/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## [2.1.1](https://github.com/googleapis/nodejs-dataplex/compare/v2.1.0...v2.1.1) (2022-08-27) + + +### Bug Fixes + +* change import long to require ([#45](https://github.com/googleapis/nodejs-dataplex/issues/45)) ([7f3455c](https://github.com/googleapis/nodejs-dataplex/commit/7f3455c33f91a950b28d71e4af317eb31549a035)) +* do not import the whole google-gax from proto JS ([#1553](https://github.com/googleapis/nodejs-dataplex/issues/1553)) ([#48](https://github.com/googleapis/nodejs-dataplex/issues/48)) ([8ced1a1](https://github.com/googleapis/nodejs-dataplex/commit/8ced1a11ec7a280d8fe10b5180dd7b7252377441)) +* remove pip install statements ([#1546](https://github.com/googleapis/nodejs-dataplex/issues/1546)) ([#47](https://github.com/googleapis/nodejs-dataplex/issues/47)) ([76d8469](https://github.com/googleapis/nodejs-dataplex/commit/76d84695d49aec32df66626ea7cfa6f9d4eb2516)) +* use google-gax v3.3.0 ([8ced1a1](https://github.com/googleapis/nodejs-dataplex/commit/8ced1a11ec7a280d8fe10b5180dd7b7252377441)) + ## [2.1.0](https://github.com/googleapis/nodejs-dataplex/compare/v2.0.0...v2.1.0) (2022-06-30) diff --git a/packages/google-cloud-dataplex/package.json b/packages/google-cloud-dataplex/package.json index 338c45d7df0..10c4b584636 100644 --- a/packages/google-cloud-dataplex/package.json +++ b/packages/google-cloud-dataplex/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/dataplex", - "version": "2.1.0", + "version": "2.1.1", "description": "dataplex client for Node.js", "repository": "googleapis/nodejs-dataplex", "license": "Apache-2.0", diff --git a/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json b/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json index 658151e4d7f..82ac0888308 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json +++ b/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataplex", - "version": "2.1.0", + "version": "2.1.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dataplex/samples/package.json b/packages/google-cloud-dataplex/samples/package.json index bd5f3202040..96913dd04a4 100644 --- a/packages/google-cloud-dataplex/samples/package.json +++ b/packages/google-cloud-dataplex/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/dataplex": "^2.1.0" + "@google-cloud/dataplex": "^2.1.1" }, "devDependencies": { "c8": "^7.1.0", From a07d30f1aa22cba132d69e36a561317e9405aa17 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 7 Sep 2022 17:52:31 -0400 Subject: [PATCH 231/254] chore(main): release 2.0.2 (#83) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 2.0.2 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- packages/google-cloud-gkeconnect-gateway/CHANGELOG.md | 11 +++++++++++ packages/google-cloud-gkeconnect-gateway/package.json | 2 +- ...adata.google.cloud.gkeconnect.gateway.v1beta1.json | 2 +- .../samples/package.json | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-gkeconnect-gateway/CHANGELOG.md b/packages/google-cloud-gkeconnect-gateway/CHANGELOG.md index 36d20d4b635..2150341d535 100644 --- a/packages/google-cloud-gkeconnect-gateway/CHANGELOG.md +++ b/packages/google-cloud-gkeconnect-gateway/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## [2.0.2](https://github.com/googleapis/nodejs-gke-connect-gateway/compare/v2.0.1...v2.0.2) (2022-09-01) + + +### Bug Fixes + +* Allow passing gax instance to client constructor ([#86](https://github.com/googleapis/nodejs-gke-connect-gateway/issues/86)) ([29669fe](https://github.com/googleapis/nodejs-gke-connect-gateway/commit/29669fee06b214a8619b9815283f8778a82a5aac)) +* Better support for fallback mode ([#81](https://github.com/googleapis/nodejs-gke-connect-gateway/issues/81)) ([9d83c4a](https://github.com/googleapis/nodejs-gke-connect-gateway/commit/9d83c4a3a1f0b8b431d7a7b89d22405a8a26be04)) +* Change import long to require ([#82](https://github.com/googleapis/nodejs-gke-connect-gateway/issues/82)) ([cf69a4e](https://github.com/googleapis/nodejs-gke-connect-gateway/commit/cf69a4e8dff40dc0eeead51a746eeab1ed9efa12)) +* Do not import the whole google-gax from proto JS ([#1553](https://github.com/googleapis/nodejs-gke-connect-gateway/issues/1553)) ([#85](https://github.com/googleapis/nodejs-gke-connect-gateway/issues/85)) ([a7cc874](https://github.com/googleapis/nodejs-gke-connect-gateway/commit/a7cc87499841e940cc4298cbf620e45a4831238d)) +* Remove pip install statements ([#1546](https://github.com/googleapis/nodejs-gke-connect-gateway/issues/1546)) ([#84](https://github.com/googleapis/nodejs-gke-connect-gateway/issues/84)) ([3d0a7dd](https://github.com/googleapis/nodejs-gke-connect-gateway/commit/3d0a7dd8d308c9ff53b969f5ef91f5f836751343)) + ## [2.0.1](https://github.com/googleapis/nodejs-gke-connect-gateway/compare/v2.0.0...v2.0.1) (2022-06-30) diff --git a/packages/google-cloud-gkeconnect-gateway/package.json b/packages/google-cloud-gkeconnect-gateway/package.json index 89204e632e5..6a178aec6a8 100644 --- a/packages/google-cloud-gkeconnect-gateway/package.json +++ b/packages/google-cloud-gkeconnect-gateway/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/gke-connect-gateway", - "version": "2.0.1", + "version": "2.0.2", "description": "apigateway client for Node.js", "repository": "googleapis/nodejs-gke-connect-gateway", "license": "Apache-2.0", diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/snippet_metadata.google.cloud.gkeconnect.gateway.v1beta1.json b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/snippet_metadata.google.cloud.gkeconnect.gateway.v1beta1.json index 8f9e2beff2b..45896f5fcca 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/snippet_metadata.google.cloud.gkeconnect.gateway.v1beta1.json +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/snippet_metadata.google.cloud.gkeconnect.gateway.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-gateway", - "version": "2.0.1", + "version": "2.0.2", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-gkeconnect-gateway/samples/package.json b/packages/google-cloud-gkeconnect-gateway/samples/package.json index da3e7ee2589..fb452b6a69b 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/package.json +++ b/packages/google-cloud-gkeconnect-gateway/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/gke-connect-gateway": "^2.0.1" + "@google-cloud/gke-connect-gateway": "^2.0.2" }, "devDependencies": { "c8": "^7.1.0", From b000110a381bc7120117135ab68d93e707431e36 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 7 Sep 2022 17:57:02 -0400 Subject: [PATCH 232/254] chore(main): release 2.0.3 (#141) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 2.0.3 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- packages/google-cloud-policytroubleshooter/CHANGELOG.md | 8 ++++++++ packages/google-cloud-policytroubleshooter/package.json | 2 +- ...pet_metadata.google.cloud.policytroubleshooter.v1.json | 2 +- .../samples/package.json | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-policytroubleshooter/CHANGELOG.md b/packages/google-cloud-policytroubleshooter/CHANGELOG.md index 3235d58929e..ada5091bd45 100644 --- a/packages/google-cloud-policytroubleshooter/CHANGELOG.md +++ b/packages/google-cloud-policytroubleshooter/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [2.0.3](https://github.com/googleapis/nodejs-policy-troubleshooter/compare/v2.0.2...v2.0.3) (2022-09-01) + + +### Bug Fixes + +* Allow passing gax instance to client constructor ([#140](https://github.com/googleapis/nodejs-policy-troubleshooter/issues/140)) ([f8bd6b4](https://github.com/googleapis/nodejs-policy-troubleshooter/commit/f8bd6b4000f7b11b0e5f5e1a3c199a5d5f8f57e8)) +* Do not import the whole google-gax from proto JS ([#1553](https://github.com/googleapis/nodejs-policy-troubleshooter/issues/1553)) ([#139](https://github.com/googleapis/nodejs-policy-troubleshooter/issues/139)) ([a5d502f](https://github.com/googleapis/nodejs-policy-troubleshooter/commit/a5d502f7ce2a43f62c1bfeaa55fe9f6bc1796982)) + ## [2.0.2](https://github.com/googleapis/nodejs-policy-troubleshooter/compare/v2.0.1...v2.0.2) (2022-08-23) diff --git a/packages/google-cloud-policytroubleshooter/package.json b/packages/google-cloud-policytroubleshooter/package.json index b09196fabf2..304090031a3 100644 --- a/packages/google-cloud-policytroubleshooter/package.json +++ b/packages/google-cloud-policytroubleshooter/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/policy-troubleshooter", - "version": "2.0.2", + "version": "2.0.3", "description": "Policytroubleshooter client for Node.js", "repository": "googleapis/nodejs-policy-troubleshooter", "license": "Apache-2.0", diff --git a/packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata.google.cloud.policytroubleshooter.v1.json b/packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata.google.cloud.policytroubleshooter.v1.json index fb234f3d3d4..d7d57e7ca52 100644 --- a/packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata.google.cloud.policytroubleshooter.v1.json +++ b/packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata.google.cloud.policytroubleshooter.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-policytroubleshooter", - "version": "2.0.2", + "version": "2.0.3", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-policytroubleshooter/samples/package.json b/packages/google-cloud-policytroubleshooter/samples/package.json index ad222102d0a..244411fb345 100644 --- a/packages/google-cloud-policytroubleshooter/samples/package.json +++ b/packages/google-cloud-policytroubleshooter/samples/package.json @@ -14,7 +14,7 @@ }, "dependencies": { "@google-cloud/local-auth": "^2.0.0", - "@google-cloud/policy-troubleshooter": "^2.0.2" + "@google-cloud/policy-troubleshooter": "^2.0.3" }, "devDependencies": { "c8": "^7.1.0", From 002c8a0c3da6b0234df2ace85fb28a4596c7e47b Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 8 Sep 2022 16:45:41 -0400 Subject: [PATCH 233/254] chore(main): release 2.0.1 (#100) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-shell/CHANGELOG.md | 10 ++++++++++ packages/google-cloud-shell/package-lock.json | 2 +- packages/google-cloud-shell/package.json | 2 +- packages/google-cloud-shell/samples/package.json | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-shell/CHANGELOG.md b/packages/google-cloud-shell/CHANGELOG.md index 3c022d5ba74..7ced36ffcdc 100644 --- a/packages/google-cloud-shell/CHANGELOG.md +++ b/packages/google-cloud-shell/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## [2.0.1](https://github.com/googleapis/nodejs-cloud-shell/compare/v2.0.0...v2.0.1) (2022-08-27) + + +### Bug Fixes + +* change import long to require ([#99](https://github.com/googleapis/nodejs-cloud-shell/issues/99)) ([4ff9cc0](https://github.com/googleapis/nodejs-cloud-shell/commit/4ff9cc0cbf92bdb372994b27e81116412b46a10b)) +* do not import the whole google-gax from proto JS ([#1553](https://github.com/googleapis/nodejs-cloud-shell/issues/1553)) ([#102](https://github.com/googleapis/nodejs-cloud-shell/issues/102)) ([157f47b](https://github.com/googleapis/nodejs-cloud-shell/commit/157f47b06a9ed2b664e8a2a9a14916bce786adbc)) +* remove pip install statements ([#1546](https://github.com/googleapis/nodejs-cloud-shell/issues/1546)) ([#101](https://github.com/googleapis/nodejs-cloud-shell/issues/101)) ([2b0a031](https://github.com/googleapis/nodejs-cloud-shell/commit/2b0a031a6c7340a9cba6e779bca7afc9d01e9640)) +* use google-gax v3.3.0 ([157f47b](https://github.com/googleapis/nodejs-cloud-shell/commit/157f47b06a9ed2b664e8a2a9a14916bce786adbc)) + ## [2.0.0](https://github.com/googleapis/nodejs-cloud-shell/compare/v1.1.0...v2.0.0) (2022-05-19) diff --git a/packages/google-cloud-shell/package-lock.json b/packages/google-cloud-shell/package-lock.json index 989e7bb9d5a..b7e3e63ce65 100644 --- a/packages/google-cloud-shell/package-lock.json +++ b/packages/google-cloud-shell/package-lock.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/shell", - "version": "2.0.0", + "version": "2.0.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/google-cloud-shell/package.json b/packages/google-cloud-shell/package.json index 21339c92567..14b20a56e5e 100644 --- a/packages/google-cloud-shell/package.json +++ b/packages/google-cloud-shell/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/shell", - "version": "2.0.0", + "version": "2.0.1", "description": "cloudshell client for Node.js", "repository": "googleapis/nodejs-cloud-shell", "license": "Apache-2.0", diff --git a/packages/google-cloud-shell/samples/package.json b/packages/google-cloud-shell/samples/package.json index 52ce8f583de..a5c0b7cb9b0 100644 --- a/packages/google-cloud-shell/samples/package.json +++ b/packages/google-cloud-shell/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/shell": "^2.0.0" + "@google-cloud/shell": "^2.0.1" }, "devDependencies": { "c8": "^7.1.0", From a3a6e6df0305e8142b00a3a4e6911978e88a9f78 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 14 Sep 2022 22:34:15 +0000 Subject: [PATCH 234/254] fix: preserve default values in x-goog-request-params header (#142) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 474338479 Source-Link: https://github.com/googleapis/googleapis/commit/d5d35e0353b59719e8917103b1bc7df2782bf6ba Source-Link: https://github.com/googleapis/googleapis-gen/commit/efcd3f93962a103f68f003e2a1eecde6fa216a27 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWZjZDNmOTM5NjJhMTAzZjY4ZjAwM2UyYTFlZWNkZTZmYTIxNmEyNyJ9 --- .../test/gapic_iam_checker_v1.ts | 33 +++++++++---------- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/packages/google-cloud-policytroubleshooter/test/gapic_iam_checker_v1.ts b/packages/google-cloud-policytroubleshooter/test/gapic_iam_checker_v1.ts index a36c5c5c180..7b47814df48 100644 --- a/packages/google-cloud-policytroubleshooter/test/gapic_iam_checker_v1.ts +++ b/packages/google-cloud-policytroubleshooter/test/gapic_iam_checker_v1.ts @@ -25,6 +25,21 @@ import * as iamcheckerModule from '../src'; import {protobuf} from 'google-gax'; +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + function generateSampleMessage(instance: T) { const filledObject = ( instance.constructor as typeof protobuf.Message @@ -157,7 +172,6 @@ describe('v1.IamCheckerClient', () => { const request = generateSampleMessage( new protos.google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse() ); @@ -165,11 +179,6 @@ describe('v1.IamCheckerClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.troubleshootIamPolicy(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.troubleshootIamPolicy as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes troubleshootIamPolicy without error using callback', async () => { @@ -181,7 +190,6 @@ describe('v1.IamCheckerClient', () => { const request = generateSampleMessage( new protos.google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse() ); @@ -204,11 +212,6 @@ describe('v1.IamCheckerClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.troubleshootIamPolicy as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); }); it('invokes troubleshootIamPolicy with error', async () => { @@ -220,7 +223,6 @@ describe('v1.IamCheckerClient', () => { const request = generateSampleMessage( new protos.google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest() ); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.troubleshootIamPolicy = stubSimpleCall( undefined, @@ -230,11 +232,6 @@ describe('v1.IamCheckerClient', () => { client.troubleshootIamPolicy(request), expectedError ); - assert( - (client.innerApiCalls.troubleshootIamPolicy as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes troubleshootIamPolicy with closed client', async () => { From c43164f9b29817bd34b6b3636f27e2b82fe3c523 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 14 Sep 2022 22:34:29 +0000 Subject: [PATCH 235/254] fix: preserve default values in x-goog-request-params header (#66) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 474338479 Source-Link: https://github.com/googleapis/googleapis/commit/d5d35e0353b59719e8917103b1bc7df2782bf6ba Source-Link: https://github.com/googleapis/googleapis-gen/commit/efcd3f93962a103f68f003e2a1eecde6fa216a27 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWZjZDNmOTM5NjJhMTAzZjY4ZjAwM2UyYTFlZWNkZTZmYTIxNmEyNyJ9 --- .../src/v1/cloud_deploy_client.ts | 52 +- .../test/gapic_cloud_deploy_v1.ts | 2006 +++++++++-------- 2 files changed, 1046 insertions(+), 1012 deletions(-) diff --git a/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts b/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts index 93801d4cc09..619f948d9d6 100644 --- a/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts +++ b/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts @@ -657,7 +657,7 @@ export class CloudDeployClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getDeliveryPipeline(request, options, callback); @@ -741,7 +741,7 @@ export class CloudDeployClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getTarget(request, options, callback); @@ -825,7 +825,7 @@ export class CloudDeployClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getRelease(request, options, callback); @@ -914,7 +914,7 @@ export class CloudDeployClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.approveRollout(request, options, callback); @@ -998,7 +998,7 @@ export class CloudDeployClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getRollout(request, options, callback); @@ -1081,7 +1081,7 @@ export class CloudDeployClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getConfig(request, options, callback); @@ -1207,7 +1207,7 @@ export class CloudDeployClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.createDeliveryPipeline( @@ -1375,7 +1375,7 @@ export class CloudDeployClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - 'delivery_pipeline.name': request.deliveryPipeline!.name || '', + 'delivery_pipeline.name': request.deliveryPipeline!.name ?? '', }); this.initialize(); return this.innerApiCalls.updateDeliveryPipeline( @@ -1546,7 +1546,7 @@ export class CloudDeployClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.deleteDeliveryPipeline( @@ -1711,7 +1711,7 @@ export class CloudDeployClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.createTarget(request, options, callback); @@ -1875,7 +1875,7 @@ export class CloudDeployClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - 'target.name': request.target!.name || '', + 'target.name': request.target!.name ?? '', }); this.initialize(); return this.innerApiCalls.updateTarget(request, options, callback); @@ -2038,7 +2038,7 @@ export class CloudDeployClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.deleteTarget(request, options, callback); @@ -2199,7 +2199,7 @@ export class CloudDeployClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.createRelease(request, options, callback); @@ -2360,7 +2360,7 @@ export class CloudDeployClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.createRollout(request, options, callback); @@ -2506,7 +2506,7 @@ export class CloudDeployClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listDeliveryPipelines(request, options, callback); @@ -2557,7 +2557,7 @@ export class CloudDeployClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listDeliveryPipelines']; const callSettings = defaultCallSettings.merge(options); @@ -2617,7 +2617,7 @@ export class CloudDeployClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listDeliveryPipelines']; const callSettings = defaultCallSettings.merge(options); @@ -2725,7 +2725,7 @@ export class CloudDeployClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listTargets(request, options, callback); @@ -2775,7 +2775,7 @@ export class CloudDeployClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listTargets']; const callSettings = defaultCallSettings.merge(options); @@ -2834,7 +2834,7 @@ export class CloudDeployClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listTargets']; const callSettings = defaultCallSettings.merge(options); @@ -2943,7 +2943,7 @@ export class CloudDeployClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listReleases(request, options, callback); @@ -2992,7 +2992,7 @@ export class CloudDeployClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listReleases']; const callSettings = defaultCallSettings.merge(options); @@ -3050,7 +3050,7 @@ export class CloudDeployClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listReleases']; const callSettings = defaultCallSettings.merge(options); @@ -3159,7 +3159,7 @@ export class CloudDeployClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listRollouts(request, options, callback); @@ -3208,7 +3208,7 @@ export class CloudDeployClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listRollouts']; const callSettings = defaultCallSettings.merge(options); @@ -3266,7 +3266,7 @@ export class CloudDeployClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listRollouts']; const callSettings = defaultCallSettings.merge(options); diff --git a/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts b/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts index 4a782d5a73c..847def424c3 100644 --- a/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts +++ b/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts @@ -27,6 +27,21 @@ import {PassThrough} from 'stream'; import {protobuf, LROperation, operationsProtos} from 'google-gax'; +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + function generateSampleMessage(instance: T) { const filledObject = ( instance.constructor as typeof protobuf.Message @@ -252,15 +267,11 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetDeliveryPipelineRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetDeliveryPipelineRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.deploy.v1.DeliveryPipeline() ); @@ -268,11 +279,14 @@ describe('v1.CloudDeployClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.getDeliveryPipeline(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getDeliveryPipeline as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getDeliveryPipeline as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDeliveryPipeline as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getDeliveryPipeline without error using callback', async () => { @@ -284,15 +298,11 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetDeliveryPipelineRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetDeliveryPipelineRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.deploy.v1.DeliveryPipeline() ); @@ -315,11 +325,14 @@ describe('v1.CloudDeployClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getDeliveryPipeline as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getDeliveryPipeline as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDeliveryPipeline as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getDeliveryPipeline with error', async () => { @@ -331,26 +344,25 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetDeliveryPipelineRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetDeliveryPipelineRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getDeliveryPipeline = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getDeliveryPipeline(request), expectedError); - assert( - (client.innerApiCalls.getDeliveryPipeline as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getDeliveryPipeline as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDeliveryPipeline as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getDeliveryPipeline with closed client', async () => { @@ -362,7 +374,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetDeliveryPipelineRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('GetDeliveryPipelineRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getDeliveryPipeline(request), expectedError); @@ -379,26 +394,23 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetTargetRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetTargetRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.deploy.v1.Target() ); client.innerApiCalls.getTarget = stubSimpleCall(expectedResponse); const [response] = await client.getTarget(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getTarget as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getTarget as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getTarget as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getTarget without error using callback', async () => { @@ -410,15 +422,9 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetTargetRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetTargetRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.deploy.v1.Target() ); @@ -441,11 +447,14 @@ describe('v1.CloudDeployClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getTarget as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getTarget as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getTarget as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getTarget with error', async () => { @@ -457,23 +466,20 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetTargetRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetTargetRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getTarget = stubSimpleCall(undefined, expectedError); await assert.rejects(client.getTarget(request), expectedError); - assert( - (client.innerApiCalls.getTarget as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getTarget as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getTarget as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getTarget with closed client', async () => { @@ -485,7 +491,8 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetTargetRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('GetTargetRequest', ['name']); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getTarget(request), expectedError); @@ -502,26 +509,23 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetReleaseRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetReleaseRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.deploy.v1.Release() ); client.innerApiCalls.getRelease = stubSimpleCall(expectedResponse); const [response] = await client.getRelease(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getRelease as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getRelease as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getRelease as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getRelease without error using callback', async () => { @@ -533,15 +537,9 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetReleaseRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetReleaseRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.deploy.v1.Release() ); @@ -564,11 +562,14 @@ describe('v1.CloudDeployClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getRelease as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getRelease as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getRelease as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getRelease with error', async () => { @@ -580,26 +581,23 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetReleaseRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetReleaseRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getRelease = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getRelease(request), expectedError); - assert( - (client.innerApiCalls.getRelease as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getRelease as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getRelease as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getRelease with closed client', async () => { @@ -611,7 +609,8 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetReleaseRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('GetReleaseRequest', ['name']); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getRelease(request), expectedError); @@ -628,26 +627,25 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ApproveRolloutRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ApproveRolloutRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.deploy.v1.ApproveRolloutResponse() ); client.innerApiCalls.approveRollout = stubSimpleCall(expectedResponse); const [response] = await client.approveRollout(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.approveRollout as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.approveRollout as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.approveRollout as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes approveRollout without error using callback', async () => { @@ -659,15 +657,11 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ApproveRolloutRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ApproveRolloutRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.deploy.v1.ApproveRolloutResponse() ); @@ -690,11 +684,14 @@ describe('v1.CloudDeployClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.approveRollout as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.approveRollout as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.approveRollout as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes approveRollout with error', async () => { @@ -706,26 +703,25 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ApproveRolloutRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ApproveRolloutRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.approveRollout = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.approveRollout(request), expectedError); - assert( - (client.innerApiCalls.approveRollout as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.approveRollout as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.approveRollout as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes approveRollout with closed client', async () => { @@ -737,7 +733,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ApproveRolloutRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('ApproveRolloutRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.approveRollout(request), expectedError); @@ -754,26 +753,23 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetRolloutRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetRolloutRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.deploy.v1.Rollout() ); client.innerApiCalls.getRollout = stubSimpleCall(expectedResponse); const [response] = await client.getRollout(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getRollout as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getRollout as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getRollout as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getRollout without error using callback', async () => { @@ -785,15 +781,9 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetRolloutRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetRolloutRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.deploy.v1.Rollout() ); @@ -816,11 +806,14 @@ describe('v1.CloudDeployClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getRollout as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getRollout as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getRollout as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getRollout with error', async () => { @@ -832,26 +825,23 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetRolloutRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetRolloutRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getRollout = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getRollout(request), expectedError); - assert( - (client.innerApiCalls.getRollout as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getRollout as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getRollout as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getRollout with closed client', async () => { @@ -863,7 +853,8 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetRolloutRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('GetRolloutRequest', ['name']); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getRollout(request), expectedError); @@ -880,26 +871,23 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetConfigRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.deploy.v1.Config() ); client.innerApiCalls.getConfig = stubSimpleCall(expectedResponse); const [response] = await client.getConfig(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getConfig as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getConfig without error using callback', async () => { @@ -911,15 +899,9 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetConfigRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.deploy.v1.Config() ); @@ -942,11 +924,14 @@ describe('v1.CloudDeployClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getConfig as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getConfig with error', async () => { @@ -958,23 +943,20 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetConfigRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getConfig = stubSimpleCall(undefined, expectedError); await assert.rejects(client.getConfig(request), expectedError); - assert( - (client.innerApiCalls.getConfig as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getConfig with closed client', async () => { @@ -986,7 +968,8 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetConfigRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('GetConfigRequest', ['name']); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getConfig(request), expectedError); @@ -1003,15 +986,12 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CreateDeliveryPipelineRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1020,11 +1000,14 @@ describe('v1.CloudDeployClient', () => { const [operation] = await client.createDeliveryPipeline(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createDeliveryPipeline as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createDeliveryPipeline as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDeliveryPipeline as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createDeliveryPipeline without error using callback', async () => { @@ -1036,15 +1019,12 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CreateDeliveryPipelineRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1074,11 +1054,14 @@ describe('v1.CloudDeployClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createDeliveryPipeline as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createDeliveryPipeline as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDeliveryPipeline as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createDeliveryPipeline with call error', async () => { @@ -1090,15 +1073,12 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CreateDeliveryPipelineRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createDeliveryPipeline = stubLongRunningCall( undefined, @@ -1108,11 +1088,14 @@ describe('v1.CloudDeployClient', () => { client.createDeliveryPipeline(request), expectedError ); - assert( - (client.innerApiCalls.createDeliveryPipeline as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createDeliveryPipeline as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDeliveryPipeline as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createDeliveryPipeline with LRO error', async () => { @@ -1124,15 +1107,12 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CreateDeliveryPipelineRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createDeliveryPipeline = stubLongRunningCall( undefined, @@ -1141,11 +1121,14 @@ describe('v1.CloudDeployClient', () => { ); const [operation] = await client.createDeliveryPipeline(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.createDeliveryPipeline as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createDeliveryPipeline as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDeliveryPipeline as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkCreateDeliveryPipelineProgress without error', async () => { @@ -1200,16 +1183,13 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest() ); - request.deliveryPipeline = {}; - request.deliveryPipeline.name = ''; - const expectedHeaderRequestParams = 'delivery_pipeline.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.deliveryPipeline ??= {}; + const defaultValue1 = getTypeDefaultValue( + 'UpdateDeliveryPipelineRequest', + ['deliveryPipeline', 'name'] + ); + request.deliveryPipeline.name = defaultValue1; + const expectedHeaderRequestParams = `delivery_pipeline.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1218,11 +1198,14 @@ describe('v1.CloudDeployClient', () => { const [operation] = await client.updateDeliveryPipeline(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateDeliveryPipeline as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateDeliveryPipeline as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDeliveryPipeline as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateDeliveryPipeline without error using callback', async () => { @@ -1234,16 +1217,13 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest() ); - request.deliveryPipeline = {}; - request.deliveryPipeline.name = ''; - const expectedHeaderRequestParams = 'delivery_pipeline.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.deliveryPipeline ??= {}; + const defaultValue1 = getTypeDefaultValue( + 'UpdateDeliveryPipelineRequest', + ['deliveryPipeline', 'name'] + ); + request.deliveryPipeline.name = defaultValue1; + const expectedHeaderRequestParams = `delivery_pipeline.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1273,11 +1253,14 @@ describe('v1.CloudDeployClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateDeliveryPipeline as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updateDeliveryPipeline as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDeliveryPipeline as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateDeliveryPipeline with call error', async () => { @@ -1289,16 +1272,13 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest() ); - request.deliveryPipeline = {}; - request.deliveryPipeline.name = ''; - const expectedHeaderRequestParams = 'delivery_pipeline.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.deliveryPipeline ??= {}; + const defaultValue1 = getTypeDefaultValue( + 'UpdateDeliveryPipelineRequest', + ['deliveryPipeline', 'name'] + ); + request.deliveryPipeline.name = defaultValue1; + const expectedHeaderRequestParams = `delivery_pipeline.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateDeliveryPipeline = stubLongRunningCall( undefined, @@ -1308,11 +1288,14 @@ describe('v1.CloudDeployClient', () => { client.updateDeliveryPipeline(request), expectedError ); - assert( - (client.innerApiCalls.updateDeliveryPipeline as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateDeliveryPipeline as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDeliveryPipeline as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateDeliveryPipeline with LRO error', async () => { @@ -1324,16 +1307,13 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest() ); - request.deliveryPipeline = {}; - request.deliveryPipeline.name = ''; - const expectedHeaderRequestParams = 'delivery_pipeline.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.deliveryPipeline ??= {}; + const defaultValue1 = getTypeDefaultValue( + 'UpdateDeliveryPipelineRequest', + ['deliveryPipeline', 'name'] + ); + request.deliveryPipeline.name = defaultValue1; + const expectedHeaderRequestParams = `delivery_pipeline.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateDeliveryPipeline = stubLongRunningCall( undefined, @@ -1342,11 +1322,14 @@ describe('v1.CloudDeployClient', () => { ); const [operation] = await client.updateDeliveryPipeline(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.updateDeliveryPipeline as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateDeliveryPipeline as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDeliveryPipeline as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkUpdateDeliveryPipelineProgress without error', async () => { @@ -1401,15 +1384,12 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'DeleteDeliveryPipelineRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1418,11 +1398,14 @@ describe('v1.CloudDeployClient', () => { const [operation] = await client.deleteDeliveryPipeline(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteDeliveryPipeline as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteDeliveryPipeline as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteDeliveryPipeline as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteDeliveryPipeline without error using callback', async () => { @@ -1434,15 +1417,12 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'DeleteDeliveryPipelineRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1472,11 +1452,14 @@ describe('v1.CloudDeployClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteDeliveryPipeline as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteDeliveryPipeline as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteDeliveryPipeline as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteDeliveryPipeline with call error', async () => { @@ -1488,15 +1471,12 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'DeleteDeliveryPipelineRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteDeliveryPipeline = stubLongRunningCall( undefined, @@ -1506,11 +1486,14 @@ describe('v1.CloudDeployClient', () => { client.deleteDeliveryPipeline(request), expectedError ); - assert( - (client.innerApiCalls.deleteDeliveryPipeline as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteDeliveryPipeline as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteDeliveryPipeline as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteDeliveryPipeline with LRO error', async () => { @@ -1522,15 +1505,12 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'DeleteDeliveryPipelineRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteDeliveryPipeline = stubLongRunningCall( undefined, @@ -1539,11 +1519,14 @@ describe('v1.CloudDeployClient', () => { ); const [operation] = await client.deleteDeliveryPipeline(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.deleteDeliveryPipeline as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteDeliveryPipeline as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteDeliveryPipeline as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkDeleteDeliveryPipelineProgress without error', async () => { @@ -1598,15 +1581,11 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateTargetRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateTargetRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1614,11 +1593,14 @@ describe('v1.CloudDeployClient', () => { const [operation] = await client.createTarget(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createTarget as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createTarget as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createTarget as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createTarget without error using callback', async () => { @@ -1630,15 +1612,11 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateTargetRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateTargetRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1668,11 +1646,14 @@ describe('v1.CloudDeployClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createTarget as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createTarget as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createTarget as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createTarget with call error', async () => { @@ -1684,26 +1665,25 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateTargetRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateTargetRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createTarget = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.createTarget(request), expectedError); - assert( - (client.innerApiCalls.createTarget as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createTarget as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createTarget as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createTarget with LRO error', async () => { @@ -1715,15 +1695,11 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateTargetRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateTargetRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createTarget = stubLongRunningCall( undefined, @@ -1732,11 +1708,14 @@ describe('v1.CloudDeployClient', () => { ); const [operation] = await client.createTarget(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.createTarget as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createTarget as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createTarget as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkCreateTargetProgress without error', async () => { @@ -1788,16 +1767,13 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.UpdateTargetRequest() ); - request.target = {}; - request.target.name = ''; - const expectedHeaderRequestParams = 'target.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.target ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateTargetRequest', [ + 'target', + 'name', + ]); + request.target.name = defaultValue1; + const expectedHeaderRequestParams = `target.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1805,11 +1781,14 @@ describe('v1.CloudDeployClient', () => { const [operation] = await client.updateTarget(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateTarget as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateTarget as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateTarget as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateTarget without error using callback', async () => { @@ -1821,16 +1800,13 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.UpdateTargetRequest() ); - request.target = {}; - request.target.name = ''; - const expectedHeaderRequestParams = 'target.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.target ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateTargetRequest', [ + 'target', + 'name', + ]); + request.target.name = defaultValue1; + const expectedHeaderRequestParams = `target.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1860,11 +1836,14 @@ describe('v1.CloudDeployClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateTarget as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updateTarget as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateTarget as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateTarget with call error', async () => { @@ -1876,27 +1855,27 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.UpdateTargetRequest() ); - request.target = {}; - request.target.name = ''; - const expectedHeaderRequestParams = 'target.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.target ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateTargetRequest', [ + 'target', + 'name', + ]); + request.target.name = defaultValue1; + const expectedHeaderRequestParams = `target.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateTarget = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.updateTarget(request), expectedError); - assert( - (client.innerApiCalls.updateTarget as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateTarget as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateTarget as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateTarget with LRO error', async () => { @@ -1908,16 +1887,13 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.UpdateTargetRequest() ); - request.target = {}; - request.target.name = ''; - const expectedHeaderRequestParams = 'target.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.target ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateTargetRequest', [ + 'target', + 'name', + ]); + request.target.name = defaultValue1; + const expectedHeaderRequestParams = `target.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateTarget = stubLongRunningCall( undefined, @@ -1926,11 +1902,14 @@ describe('v1.CloudDeployClient', () => { ); const [operation] = await client.updateTarget(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.updateTarget as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateTarget as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateTarget as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkUpdateTargetProgress without error', async () => { @@ -1982,15 +1961,11 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.DeleteTargetRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteTargetRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1998,11 +1973,14 @@ describe('v1.CloudDeployClient', () => { const [operation] = await client.deleteTarget(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteTarget as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteTarget as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteTarget as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteTarget without error using callback', async () => { @@ -2014,15 +1992,11 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.DeleteTargetRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteTargetRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2052,11 +2026,14 @@ describe('v1.CloudDeployClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteTarget as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteTarget as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteTarget as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteTarget with call error', async () => { @@ -2068,26 +2045,25 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.DeleteTargetRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteTargetRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteTarget = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.deleteTarget(request), expectedError); - assert( - (client.innerApiCalls.deleteTarget as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteTarget as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteTarget as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteTarget with LRO error', async () => { @@ -2099,15 +2075,11 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.DeleteTargetRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteTargetRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteTarget = stubLongRunningCall( undefined, @@ -2116,11 +2088,14 @@ describe('v1.CloudDeployClient', () => { ); const [operation] = await client.deleteTarget(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.deleteTarget as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteTarget as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteTarget as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkDeleteTargetProgress without error', async () => { @@ -2172,15 +2147,11 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateReleaseRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateReleaseRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2189,11 +2160,14 @@ describe('v1.CloudDeployClient', () => { const [operation] = await client.createRelease(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createRelease as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createRelease as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createRelease as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createRelease without error using callback', async () => { @@ -2205,15 +2179,11 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateReleaseRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateReleaseRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2243,11 +2213,14 @@ describe('v1.CloudDeployClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createRelease as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createRelease as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createRelease as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createRelease with call error', async () => { @@ -2259,26 +2232,25 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateReleaseRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateReleaseRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createRelease = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.createRelease(request), expectedError); - assert( - (client.innerApiCalls.createRelease as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createRelease as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createRelease as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createRelease with LRO error', async () => { @@ -2290,15 +2262,11 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateReleaseRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateReleaseRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createRelease = stubLongRunningCall( undefined, @@ -2307,11 +2275,14 @@ describe('v1.CloudDeployClient', () => { ); const [operation] = await client.createRelease(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.createRelease as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createRelease as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createRelease as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkCreateReleaseProgress without error', async () => { @@ -2366,15 +2337,11 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateRolloutRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateRolloutRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2383,11 +2350,14 @@ describe('v1.CloudDeployClient', () => { const [operation] = await client.createRollout(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createRollout as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createRollout as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createRollout as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createRollout without error using callback', async () => { @@ -2399,15 +2369,11 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateRolloutRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateRolloutRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2437,11 +2403,14 @@ describe('v1.CloudDeployClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createRollout as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createRollout as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createRollout as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createRollout with call error', async () => { @@ -2453,26 +2422,25 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateRolloutRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateRolloutRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createRollout = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.createRollout(request), expectedError); - assert( - (client.innerApiCalls.createRollout as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createRollout as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createRollout as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createRollout with LRO error', async () => { @@ -2484,15 +2452,11 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateRolloutRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateRolloutRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createRollout = stubLongRunningCall( undefined, @@ -2501,11 +2465,14 @@ describe('v1.CloudDeployClient', () => { ); const [operation] = await client.createRollout(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.createRollout as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createRollout as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createRollout as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkCreateRolloutProgress without error', async () => { @@ -2560,15 +2527,12 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListDeliveryPipelinesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.deploy.v1.DeliveryPipeline() @@ -2584,11 +2548,14 @@ describe('v1.CloudDeployClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.listDeliveryPipelines(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listDeliveryPipelines as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listDeliveryPipelines as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDeliveryPipelines as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listDeliveryPipelines without error using callback', async () => { @@ -2600,15 +2567,12 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListDeliveryPipelinesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.deploy.v1.DeliveryPipeline() @@ -2639,11 +2603,14 @@ describe('v1.CloudDeployClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listDeliveryPipelines as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listDeliveryPipelines as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDeliveryPipelines as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listDeliveryPipelines with error', async () => { @@ -2655,15 +2622,12 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListDeliveryPipelinesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listDeliveryPipelines = stubSimpleCall( undefined, @@ -2673,11 +2637,14 @@ describe('v1.CloudDeployClient', () => { client.listDeliveryPipelines(request), expectedError ); - assert( - (client.innerApiCalls.listDeliveryPipelines as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listDeliveryPipelines as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDeliveryPipelines as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listDeliveryPipelinesStream without error', async () => { @@ -2689,8 +2656,12 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListDeliveryPipelinesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.deploy.v1.DeliveryPipeline() @@ -2730,12 +2701,15 @@ describe('v1.CloudDeployClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listDeliveryPipelines, request) ); - assert.strictEqual( + assert( ( client.descriptors.page.listDeliveryPipelines .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2748,8 +2722,12 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListDeliveryPipelinesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listDeliveryPipelines.createStream = stubPageStreamingCall(undefined, expectedError); @@ -2778,12 +2756,15 @@ describe('v1.CloudDeployClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listDeliveryPipelines, request) ); - assert.strictEqual( + assert( ( client.descriptors.page.listDeliveryPipelines .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2796,8 +2777,12 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListDeliveryPipelinesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.deploy.v1.DeliveryPipeline() @@ -2824,12 +2809,15 @@ describe('v1.CloudDeployClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listDeliveryPipelines .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2842,8 +2830,12 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListDeliveryPipelinesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listDeliveryPipelines.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -2861,12 +2853,15 @@ describe('v1.CloudDeployClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listDeliveryPipelines .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -2881,15 +2876,11 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListTargetsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListTargetsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), @@ -2898,11 +2889,14 @@ describe('v1.CloudDeployClient', () => { client.innerApiCalls.listTargets = stubSimpleCall(expectedResponse); const [response] = await client.listTargets(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listTargets as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listTargets as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listTargets as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listTargets without error using callback', async () => { @@ -2914,15 +2908,11 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListTargetsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListTargetsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), @@ -2947,11 +2937,14 @@ describe('v1.CloudDeployClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listTargets as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listTargets as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listTargets as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listTargets with error', async () => { @@ -2963,26 +2956,25 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListTargetsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListTargetsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listTargets = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listTargets(request), expectedError); - assert( - (client.innerApiCalls.listTargets as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listTargets as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listTargets as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listTargetsStream without error', async () => { @@ -2994,8 +2986,11 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListTargetsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListTargetsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), @@ -3023,11 +3018,12 @@ describe('v1.CloudDeployClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listTargets, request) ); - assert.strictEqual( - (client.descriptors.page.listTargets.createStream as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listTargets.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -3040,8 +3036,11 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListTargetsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListTargetsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listTargets.createStream = stubPageStreamingCall( undefined, @@ -3066,11 +3065,12 @@ describe('v1.CloudDeployClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listTargets, request) ); - assert.strictEqual( - (client.descriptors.page.listTargets.createStream as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listTargets.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -3083,8 +3083,11 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListTargetsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListTargetsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), @@ -3104,11 +3107,12 @@ describe('v1.CloudDeployClient', () => { ).args[1], request ); - assert.strictEqual( - (client.descriptors.page.listTargets.asyncIterate as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listTargets.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -3121,8 +3125,11 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListTargetsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListTargetsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listTargets.asyncIterate = stubAsyncIterationCall( undefined, @@ -3141,11 +3148,12 @@ describe('v1.CloudDeployClient', () => { ).args[1], request ); - assert.strictEqual( - (client.descriptors.page.listTargets.asyncIterate as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listTargets.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -3160,15 +3168,11 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListReleasesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListReleasesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), @@ -3177,11 +3181,14 @@ describe('v1.CloudDeployClient', () => { client.innerApiCalls.listReleases = stubSimpleCall(expectedResponse); const [response] = await client.listReleases(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listReleases as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listReleases as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listReleases as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listReleases without error using callback', async () => { @@ -3193,15 +3200,11 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListReleasesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListReleasesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), @@ -3226,11 +3229,14 @@ describe('v1.CloudDeployClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listReleases as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listReleases as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listReleases as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listReleases with error', async () => { @@ -3242,26 +3248,25 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListReleasesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListReleasesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listReleases = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listReleases(request), expectedError); - assert( - (client.innerApiCalls.listReleases as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listReleases as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listReleases as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listReleasesStream without error', async () => { @@ -3273,8 +3278,11 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListReleasesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListReleasesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), @@ -3302,11 +3310,12 @@ describe('v1.CloudDeployClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listReleases, request) ); - assert.strictEqual( - ( - client.descriptors.page.listReleases.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listReleases.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -3319,8 +3328,11 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListReleasesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListReleasesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listReleases.createStream = stubPageStreamingCall( undefined, @@ -3345,11 +3357,12 @@ describe('v1.CloudDeployClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listReleases, request) ); - assert.strictEqual( - ( - client.descriptors.page.listReleases.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listReleases.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -3362,8 +3375,11 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListReleasesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListReleasesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), @@ -3383,11 +3399,12 @@ describe('v1.CloudDeployClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listReleases.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listReleases.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -3400,8 +3417,11 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListReleasesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListReleasesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listReleases.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -3418,11 +3438,12 @@ describe('v1.CloudDeployClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listReleases.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listReleases.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -3437,15 +3458,11 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListRolloutsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListRolloutsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), @@ -3454,11 +3471,14 @@ describe('v1.CloudDeployClient', () => { client.innerApiCalls.listRollouts = stubSimpleCall(expectedResponse); const [response] = await client.listRollouts(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listRollouts as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listRollouts as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listRollouts as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listRollouts without error using callback', async () => { @@ -3470,15 +3490,11 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListRolloutsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListRolloutsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), @@ -3503,11 +3519,14 @@ describe('v1.CloudDeployClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listRollouts as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listRollouts as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listRollouts as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listRollouts with error', async () => { @@ -3519,26 +3538,25 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListRolloutsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListRolloutsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listRollouts = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listRollouts(request), expectedError); - assert( - (client.innerApiCalls.listRollouts as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listRollouts as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listRollouts as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listRolloutsStream without error', async () => { @@ -3550,8 +3568,11 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListRolloutsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListRolloutsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), @@ -3579,11 +3600,12 @@ describe('v1.CloudDeployClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listRollouts, request) ); - assert.strictEqual( - ( - client.descriptors.page.listRollouts.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listRollouts.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -3596,8 +3618,11 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListRolloutsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListRolloutsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listRollouts.createStream = stubPageStreamingCall( undefined, @@ -3622,11 +3647,12 @@ describe('v1.CloudDeployClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listRollouts, request) ); - assert.strictEqual( - ( - client.descriptors.page.listRollouts.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listRollouts.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -3639,8 +3665,11 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListRolloutsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListRolloutsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), @@ -3660,11 +3689,12 @@ describe('v1.CloudDeployClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listRollouts.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listRollouts.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -3677,8 +3707,11 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListRolloutsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListRolloutsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listRollouts.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -3695,11 +3728,12 @@ describe('v1.CloudDeployClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listRollouts.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listRollouts.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); From 4dc19c4621939291ae017cbbbfee4b68063c4f06 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 14 Sep 2022 22:34:34 +0000 Subject: [PATCH 236/254] fix: preserve default values in x-goog-request-params header (#87) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 474338479 Source-Link: https://github.com/googleapis/googleapis/commit/d5d35e0353b59719e8917103b1bc7df2782bf6ba Source-Link: https://github.com/googleapis/googleapis-gen/commit/efcd3f93962a103f68f003e2a1eecde6fa216a27 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWZjZDNmOTM5NjJhMTAzZjY4ZjAwM2UyYTFlZWNkZTZmYTIxNmEyNyJ9 --- .../test/gapic_gateway_service_v1beta1.ts | 105 +++--------------- 1 file changed, 15 insertions(+), 90 deletions(-) diff --git a/packages/google-cloud-gkeconnect-gateway/test/gapic_gateway_service_v1beta1.ts b/packages/google-cloud-gkeconnect-gateway/test/gapic_gateway_service_v1beta1.ts index 266d9d76a11..27f360b9ec4 100644 --- a/packages/google-cloud-gkeconnect-gateway/test/gapic_gateway_service_v1beta1.ts +++ b/packages/google-cloud-gkeconnect-gateway/test/gapic_gateway_service_v1beta1.ts @@ -25,6 +25,21 @@ import * as gatewayserviceModule from '../src'; import {protobuf} from 'google-gax'; +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + function generateSampleMessage(instance: T) { const filledObject = ( instance.constructor as typeof protobuf.Message @@ -157,18 +172,12 @@ describe('v1beta1.GatewayServiceClient', () => { }); client.initialize(); const request = generateSampleMessage(new protos.google.api.HttpBody()); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.api.HttpBody() ); client.innerApiCalls.getResource = stubSimpleCall(expectedResponse); const [response] = await client.getResource(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getResource as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes getResource without error using callback', async () => { @@ -178,7 +187,6 @@ describe('v1beta1.GatewayServiceClient', () => { }); client.initialize(); const request = generateSampleMessage(new protos.google.api.HttpBody()); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.api.HttpBody() ); @@ -198,11 +206,6 @@ describe('v1beta1.GatewayServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getResource as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); }); it('invokes getResource with error', async () => { @@ -212,18 +215,12 @@ describe('v1beta1.GatewayServiceClient', () => { }); client.initialize(); const request = generateSampleMessage(new protos.google.api.HttpBody()); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.getResource = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getResource(request), expectedError); - assert( - (client.innerApiCalls.getResource as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes getResource with closed client', async () => { @@ -247,18 +244,12 @@ describe('v1beta1.GatewayServiceClient', () => { }); client.initialize(); const request = generateSampleMessage(new protos.google.api.HttpBody()); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.api.HttpBody() ); client.innerApiCalls.postResource = stubSimpleCall(expectedResponse); const [response] = await client.postResource(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.postResource as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes postResource without error using callback', async () => { @@ -268,7 +259,6 @@ describe('v1beta1.GatewayServiceClient', () => { }); client.initialize(); const request = generateSampleMessage(new protos.google.api.HttpBody()); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.api.HttpBody() ); @@ -288,11 +278,6 @@ describe('v1beta1.GatewayServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.postResource as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); }); it('invokes postResource with error', async () => { @@ -302,18 +287,12 @@ describe('v1beta1.GatewayServiceClient', () => { }); client.initialize(); const request = generateSampleMessage(new protos.google.api.HttpBody()); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.postResource = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.postResource(request), expectedError); - assert( - (client.innerApiCalls.postResource as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes postResource with closed client', async () => { @@ -337,18 +316,12 @@ describe('v1beta1.GatewayServiceClient', () => { }); client.initialize(); const request = generateSampleMessage(new protos.google.api.HttpBody()); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.api.HttpBody() ); client.innerApiCalls.deleteResource = stubSimpleCall(expectedResponse); const [response] = await client.deleteResource(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteResource as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes deleteResource without error using callback', async () => { @@ -358,7 +331,6 @@ describe('v1beta1.GatewayServiceClient', () => { }); client.initialize(); const request = generateSampleMessage(new protos.google.api.HttpBody()); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.api.HttpBody() ); @@ -378,11 +350,6 @@ describe('v1beta1.GatewayServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteResource as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); }); it('invokes deleteResource with error', async () => { @@ -392,18 +359,12 @@ describe('v1beta1.GatewayServiceClient', () => { }); client.initialize(); const request = generateSampleMessage(new protos.google.api.HttpBody()); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.deleteResource = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.deleteResource(request), expectedError); - assert( - (client.innerApiCalls.deleteResource as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes deleteResource with closed client', async () => { @@ -427,18 +388,12 @@ describe('v1beta1.GatewayServiceClient', () => { }); client.initialize(); const request = generateSampleMessage(new protos.google.api.HttpBody()); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.api.HttpBody() ); client.innerApiCalls.putResource = stubSimpleCall(expectedResponse); const [response] = await client.putResource(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.putResource as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes putResource without error using callback', async () => { @@ -448,7 +403,6 @@ describe('v1beta1.GatewayServiceClient', () => { }); client.initialize(); const request = generateSampleMessage(new protos.google.api.HttpBody()); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.api.HttpBody() ); @@ -468,11 +422,6 @@ describe('v1beta1.GatewayServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.putResource as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); }); it('invokes putResource with error', async () => { @@ -482,18 +431,12 @@ describe('v1beta1.GatewayServiceClient', () => { }); client.initialize(); const request = generateSampleMessage(new protos.google.api.HttpBody()); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.putResource = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.putResource(request), expectedError); - assert( - (client.innerApiCalls.putResource as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes putResource with closed client', async () => { @@ -517,18 +460,12 @@ describe('v1beta1.GatewayServiceClient', () => { }); client.initialize(); const request = generateSampleMessage(new protos.google.api.HttpBody()); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.api.HttpBody() ); client.innerApiCalls.patchResource = stubSimpleCall(expectedResponse); const [response] = await client.patchResource(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.patchResource as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes patchResource without error using callback', async () => { @@ -538,7 +475,6 @@ describe('v1beta1.GatewayServiceClient', () => { }); client.initialize(); const request = generateSampleMessage(new protos.google.api.HttpBody()); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedResponse = generateSampleMessage( new protos.google.api.HttpBody() ); @@ -558,11 +494,6 @@ describe('v1beta1.GatewayServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.patchResource as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); }); it('invokes patchResource with error', async () => { @@ -572,18 +503,12 @@ describe('v1beta1.GatewayServiceClient', () => { }); client.initialize(); const request = generateSampleMessage(new protos.google.api.HttpBody()); - const expectedOptions = {otherArgs: {headers: {}}}; const expectedError = new Error('expected'); client.innerApiCalls.patchResource = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.patchResource(request), expectedError); - assert( - (client.innerApiCalls.patchResource as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); }); it('invokes patchResource with closed client', async () => { From d1636ac7dddef7ece152101df0e5219809f27540 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 21 Sep 2022 12:03:24 -0700 Subject: [PATCH 237/254] chore: remove duplicated IAM mixin for Node.js library (#44) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: use _gaxModule when accessing gax for bundling PiperOrigin-RevId: 470911839 Source-Link: https://github.com/googleapis/googleapis/commit/352756699ebc5b2144c252867c265ea44448712e Source-Link: https://github.com/googleapis/googleapis-gen/commit/f16a1d224f00a630ea43d6a9a1a31f566f45cdea Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjE2YTFkMjI0ZjAwYTYzMGVhNDNkNmE5YTFhMzFmNTY2ZjQ1Y2RlYSJ9 feat: accept google-gax instance as a parameter Please see the documentation of the client constructor for details. PiperOrigin-RevId: 470332808 Source-Link: https://github.com/googleapis/googleapis/commit/d4a23675457cd8f0b44080e0594ec72de1291b89 Source-Link: https://github.com/googleapis/googleapis-gen/commit/e97a1ac204ead4fe7341f91e72db7c6ac6016341 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTk3YTFhYzIwNGVhZDRmZTczNDFmOTFlNzJkYjdjNmFjNjAxNjM0MSJ9 fix: better support for fallback mode PiperOrigin-RevId: 468790263 Source-Link: https://github.com/googleapis/googleapis/commit/873ab456273d105245df0fb82a6c17a814553b80 Source-Link: https://github.com/googleapis/googleapis-gen/commit/cb6f37aeff2a3472e40a7bbace8c67d75e24bee5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2I2ZjM3YWVmZjJhMzQ3MmU0MGE3YmJhY2U4YzY3ZDc1ZTI0YmVlNSJ9 feat: Add IAM support for Explore content APIs feat: Add support for custom container for Task feat: Add support for cross project for Task feat: Add support for custom encryption key to be used for encrypt data on the PDs associated with the VMs in your Dataproc cluster for Task feat: Add support for Latest job in Task resource feat: User mode filter in Explore list sessions API feat: Support logging sampled file paths per partition to Cloud logging for Discovery event PiperOrigin-RevId: 461116673 Source-Link: https://github.com/googleapis/googleapis/commit/9af1b9b02e1609573c7aeb9a7937af3d4473b77a Source-Link: https://github.com/googleapis/googleapis-gen/commit/567135045b8400880681f2edef177b36d55dc57c Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTY3MTM1MDQ1Yjg0MDA4ODA2ODFmMmVkZWYxNzdiMzZkNTVkYzU3YyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: use gapic-generator-typescript v2.17.0 PiperOrigin-RevId: 474338479 Source-Link: https://github.com/googleapis/googleapis/commit/d5d35e0353b59719e8917103b1bc7df2782bf6ba Source-Link: https://github.com/googleapis/googleapis-gen/commit/efcd3f93962a103f68f003e2a1eecde6fa216a27 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWZjZDNmOTM5NjJhMTAzZjY4ZjAwM2UyYTFlZWNkZTZmYTIxNmEyNyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * test: use fully qualified request type name in tests PiperOrigin-RevId: 475685359 Source-Link: https://github.com/googleapis/googleapis/commit/7a129736313ceb1f277c3b7f7e16d2e04cc901dd Source-Link: https://github.com/googleapis/googleapis-gen/commit/370c729e2ba062a167449c27882ba5f379c5c34d Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzcwYzcyOWUyYmEwNjJhMTY3NDQ5YzI3ODgyYmE1ZjM3OWM1YzM0ZCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: remove duplicated IAM mixin for Node.js library PiperOrigin-RevId: 475855448 Source-Link: https://github.com/googleapis/googleapis/commit/b7c271c01c72f48c319403d9e726ea634895db82 Source-Link: https://github.com/googleapis/googleapis-gen/commit/27bf4af65b264d11c2784e69978f9115e0ac9100 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjdiZjRhZjY1YjI2NGQxMWMyNzg0ZTY5OTc4ZjkxMTVlMGFjOTEwMCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../google/cloud/dataplex/v1/content.proto | 72 + .../google/cloud/dataplex/v1/logs.proto | 4 + .../google/cloud/dataplex/v1/metadata.proto | 93 +- .../google/cloud/dataplex/v1/resources.proto | 2 +- .../google/cloud/dataplex/v1/service.proto | 35 +- .../google/cloud/dataplex/v1/tasks.proto | 32 +- .../google-cloud-dataplex/protos/protos.d.ts | 1851 ++++++- .../google-cloud-dataplex/protos/protos.js | 4415 ++++++++++++++++- .../google-cloud-dataplex/protos/protos.json | 490 +- .../v1/content_service.create_content.js | 3 + .../v1/content_service.delete_content.js | 3 + .../v1/content_service.get_content.js | 3 + .../v1/content_service.get_iam_policy.js | 67 + .../v1/content_service.list_content.js | 3 + .../v1/content_service.set_iam_policy.js | 77 + .../content_service.test_iam_permissions.js | 70 + .../v1/content_service.update_content.js | 3 + .../v1/dataplex_service.cancel_job.js | 3 + .../v1/dataplex_service.create_asset.js | 5 +- .../v1/dataplex_service.create_environment.js | 5 +- .../v1/dataplex_service.create_lake.js | 3 + .../v1/dataplex_service.create_task.js | 3 + .../v1/dataplex_service.create_zone.js | 3 + .../v1/dataplex_service.delete_asset.js | 3 + .../v1/dataplex_service.delete_environment.js | 5 +- .../v1/dataplex_service.delete_lake.js | 5 +- .../v1/dataplex_service.delete_task.js | 3 + .../v1/dataplex_service.delete_zone.js | 3 + .../v1/dataplex_service.get_asset.js | 3 + .../v1/dataplex_service.get_environment.js | 5 +- .../generated/v1/dataplex_service.get_job.js | 3 + .../generated/v1/dataplex_service.get_lake.js | 3 + .../generated/v1/dataplex_service.get_task.js | 5 +- .../generated/v1/dataplex_service.get_zone.js | 3 + .../v1/dataplex_service.list_asset_actions.js | 3 + .../v1/dataplex_service.list_assets.js | 3 + .../v1/dataplex_service.list_environments.js | 5 +- .../v1/dataplex_service.list_jobs.js | 3 + .../v1/dataplex_service.list_lake_actions.js | 5 +- .../v1/dataplex_service.list_lakes.js | 3 + .../v1/dataplex_service.list_sessions.js | 16 +- .../v1/dataplex_service.list_tasks.js | 3 + .../v1/dataplex_service.list_zone_actions.js | 3 + .../v1/dataplex_service.list_zones.js | 3 + .../v1/dataplex_service.update_asset.js | 3 + .../v1/dataplex_service.update_environment.js | 3 + .../v1/dataplex_service.update_lake.js | 3 + .../v1/dataplex_service.update_task.js | 3 + .../v1/dataplex_service.update_zone.js | 3 + .../v1/metadata_service.create_entity.js | 3 + .../v1/metadata_service.create_partition.js | 3 + .../v1/metadata_service.delete_entity.js | 6 +- .../v1/metadata_service.delete_partition.js | 5 +- .../v1/metadata_service.get_entity.js | 3 + .../v1/metadata_service.get_partition.js | 3 + .../v1/metadata_service.list_entities.js | 7 +- .../v1/metadata_service.list_partitions.js | 13 +- .../v1/metadata_service.update_entity.js | 3 + ...pet_metadata.google.cloud.dataplex.v1.json | 232 +- .../src/v1/content_service_client.ts | 445 +- .../src/v1/content_service_client_config.json | 36 +- .../src/v1/dataplex_service_client.ts | 611 ++- .../v1/dataplex_service_client_config.json | 13 +- .../src/v1/gapic_metadata.json | 30 + .../src/v1/metadata_service_client.ts | 228 +- .../test/gapic_content_service_v1.ts | 1338 +++-- .../test/gapic_dataplex_service_v1.ts | 4312 +++++++++------- .../test/gapic_metadata_service_v1.ts | 1331 +++-- 68 files changed, 12492 insertions(+), 3478 deletions(-) create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/content_service.get_iam_policy.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/content_service.set_iam_policy.js create mode 100644 packages/google-cloud-dataplex/samples/generated/v1/content_service.test_iam_permissions.js diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/content.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/content.proto index bc0f5c6a8b0..cd335a58cfd 100644 --- a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/content.proto +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/content.proto @@ -21,6 +21,8 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/dataplex/v1/analyze.proto"; +import "google/iam/v1/iam_policy.proto"; +import "google/iam/v1/policy.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; @@ -39,6 +41,10 @@ service ContentService { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*/lakes/*}/contentitems" body: "content" + additional_bindings { + post: "/v1/{parent=projects/*/locations/*/lakes/*}/content" + body: "content" + } }; option (google.api.method_signature) = "parent,content"; } @@ -48,6 +54,10 @@ service ContentService { option (google.api.http) = { patch: "/v1/{content.name=projects/*/locations/*/lakes/*/contentitems/**}" body: "content" + additional_bindings { + patch: "/v1/{content.name=projects/*/locations/*/lakes/*/content/**}" + body: "content" + } }; option (google.api.method_signature) = "content,update_mask"; } @@ -56,6 +66,9 @@ service ContentService { rpc DeleteContent(DeleteContentRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/lakes/*/contentitems/**}" + additional_bindings { + delete: "/v1/{name=projects/*/locations/*/lakes/*/content/**}" + } }; option (google.api.method_signature) = "name"; } @@ -64,14 +77,73 @@ service ContentService { rpc GetContent(GetContentRequest) returns (Content) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/lakes/*/contentitems/**}" + additional_bindings { + get: "/v1/{name=projects/*/locations/*/lakes/*/content/**}" + } }; option (google.api.method_signature) = "name"; } + // Gets the access control policy for a contentitem resource. A `NOT_FOUND` + // error is returned if the resource does not exist. An empty policy is + // returned if the resource exists but does not have a policy set on it. + // + // Caller must have Google IAM `dataplex.content.getIamPolicy` permission + // on the resource. + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { + option (google.api.http) = { + get: "/v1/{resource=projects/*/locations/*/lakes/*/contentitems/**}:getIamPolicy" + additional_bindings { + get: "/v1/{resource=projects/*/locations/*/lakes/*/content/**}:getIamPolicy" + } + }; + option (google.api.method_signature) = "resource"; + } + + // Sets the access control policy on the specified contentitem resource. + // Replaces any existing policy. + // + // Caller must have Google IAM `dataplex.content.setIamPolicy` permission + // on the resource. + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1/{resource=projects/*/locations/*/lakes/*/contentitems/**}:setIamPolicy" + body: "*" + additional_bindings { + post: "/v1/{resource=projects/*/locations/*/lakes/*/content/**}:setIamPolicy" + body: "*" + } + }; + } + + // Returns the caller's permissions on a resource. + // If the resource does not exist, an empty set of + // permissions is returned (a `NOT_FOUND` error is not returned). + // + // A caller is not required to have Google IAM permission to make this + // request. + // + // Note: This operation is designed to be used for building permission-aware + // UIs and command-line tools, not for authorization checking. This operation + // may "fail open" without warning. + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { + option (google.api.http) = { + post: "/v1/{resource=projects/*/locations/*/lakes/*/contentitems/**}:testIamPermissions" + body: "*" + additional_bindings { + post: "/v1/{resource=projects/*/locations/*/lakes/*/content/**}:testIamPermissions" + body: "*" + } + }; + } + // List content. rpc ListContent(ListContentRequest) returns (ListContentResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*/lakes/*}/contentitems" + additional_bindings { + get: "/v1/{parent=projects/*/locations/*/lakes/*}/content" + } }; option (google.api.method_signature) = "parent"; } diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/logs.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/logs.proto index c1255bccdde..51e48e46e70 100644 --- a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/logs.proto +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/logs.proto @@ -96,6 +96,10 @@ message DiscoveryEvent { // The type of the containing entity resource. EntityType type = 3; + + // The locations of the data items (e.g., a Cloud Storage objects) sampled + // for metadata inference. + repeated string sampled_data_locations = 4; } // Details about the action. diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/metadata.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/metadata.proto index 48d439057aa..290d9406628 100644 --- a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/metadata.proto +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/metadata.proto @@ -152,7 +152,8 @@ message DeleteEntityRequest { } ]; - // Required. The etag associated with the partition if it was previously retrieved. + // Required. The etag associated with the entity, which can be retrieved with a + // [GetEntity][] request. string etag = 2 [(google.api.field_behavior) = REQUIRED]; } @@ -160,7 +161,8 @@ message DeleteEntityRequest { message ListEntitiesRequest { // Entity views. enum EntityView { - // The default unset value. The API will default to the FULL view. + // The default unset value. Return both table and fileset entities + // if unspecified. ENTITY_VIEW_UNSPECIFIED = 0; // Only list table entities. @@ -199,8 +201,8 @@ message ListEntitiesRequest { // - Entity ID: ?filter="id=entityID" // - Asset ID: ?filter="asset=assetID" // - Data path ?filter="data_path=gs://my-bucket" - // - Is HIVE compatible: ?filter=”hive_compatible=true” - // - Is BigQuery compatible: ?filter=”bigquery_compatible=true” + // - Is HIVE compatible: ?filter="hive_compatible=true" + // - Is BigQuery compatible: ?filter="bigquery_compatible=true" string filter = 5 [(google.api.field_behavior) = OPTIONAL]; } @@ -267,14 +269,14 @@ message ListPartitionsRequest { // page token. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Filter the partitions returned to the caller using a key vslue pair - // expression. The filter expression supports: + // Optional. Filter the partitions returned to the caller using a key value pair + // expression. Supported operators and syntax: // - // - logical operators: AND, OR + // - logic operators: AND, OR // - comparison operators: <, >, >=, <= ,=, != // - LIKE operators: - // - The right hand of a LIKE operator supports “.” and - // “*” for wildcard searches, for example "value1 LIKE ".*oo.*" + // - The right hand of a LIKE operator supports "." and + // "*" for wildcard searches, for example "value1 LIKE ".*oo.*" // - parenthetical grouping: ( ) // // Sample filter expression: `?filter="key1 < value1 OR key2 > value2" @@ -322,7 +324,7 @@ message DeletePartitionRequest { } ]; - // Optional. The etag associated with the partition if it was previously retrieved. + // Optional. The etag associated with the partition. string etag = 2 [ deprecated = true, (google.api.field_behavior) = OPTIONAL @@ -401,7 +403,7 @@ message Entity { } ]; - // Optional. Display name must be shorter than or equal to 63 characters. + // Optional. Display name must be shorter than or equal to 256 characters. string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. User friendly longer description text. Must be shorter than or equal to @@ -418,11 +420,12 @@ message Entity { // published table name. Specifying a new ID in an update entity // request will override the existing value. // The ID must contain only letters (a-z, A-Z), numbers (0-9), and - // underscores. Must begin with a letter. + // underscores. Must begin with a letter and consist of 256 or fewer + // characters. string id = 7 [(google.api.field_behavior) = REQUIRED]; - // Optional. The etag for this entity. Required for update and delete requests. Must - // match the server's etag. + // Optional. The etag associated with the entity, which can be retrieved with a + // [GetEntity][] request. Required for update and delete requests. string etag = 8 [(google.api.field_behavior) = OPTIONAL]; // Required. Immutable. The type of entity. @@ -482,13 +485,11 @@ message Partition { pattern: "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}" }; - // Output only. The values must be HTML URL encoded two times before constructing the path. - // For example, if you have a value of "US:CA", encoded it two times and you - // get "US%253ACA". Then if you have the 2nd value is "CA#Sunnyvale", encoded - // two times and you get "CA%2523Sunnyvale". The partition values path is - // "US%253ACA/CA%2523Sunnyvale". The final URL will be - // "https://.../partitions/US%253ACA/CA%2523Sunnyvale". The name field in the - // responses will always have the encoded format. + // Output only. Partition values used in the HTTP URL must be + // double encoded. For example, `url_encode(url_encode(value))` can be used + // to encode "US:CA/CA#Sunnyvale so that the request URL ends + // with "/partitions/US%253ACA/CA%2523Sunnyvale". + // The name field in the response retains the encoded format. string name = 1 [ (google.api.field_behavior) = OUTPUT_ONLY, (google.api.resource_reference) = { @@ -589,8 +590,9 @@ message Schema { // Represents a column field within a table schema. message SchemaField { - // Required. The name of the field. The maximum length is 767 characters. The name - // must begins with a letter and not contains `:` and `.`. + // Required. The name of the field. Must contain only letters, numbers and + // underscores, with a maximum length of 767 characters, + // and must begin with a letter or underscore. string name = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. User friendly field description. Must be less than or equal to 1024 @@ -609,10 +611,12 @@ message Schema { // Represents a key field within the entity's partition structure. You could // have up to 20 partition fields, but only the first 10 partitions have the - // filtering ability due to performance consideration. + // filtering ability due to performance consideration. **Note:** + // Partition fields are immutable. message PartitionField { - // Required. Partition name is editable if only the partition style is not HIVE - // compatible. The maximum length allowed is 767 characters. + // Required. Partition field name must consist of letters, numbers, and underscores + // only, with a maximum of length of 256 characters, + // and must begin with a letter or underscore.. string name = 1 [(google.api.field_behavior) = REQUIRED]; // Required. Immutable. The type of field. @@ -633,26 +637,23 @@ message Schema { HIVE_COMPATIBLE = 1; } - // Required. Whether the schema is user-managed or managed by the service. - // - Set user_manage to false if you would like Dataplex to help you manage - // the schema. You will get the full service provided by Dataplex discovery, - // including new data discovery, schema inference and schema evolution. You - // can still provide input the schema of the entities, for example renaming a - // schema field, changing CSV or Json options if you think the discovered - // values are not as accurate. Dataplex will consider your input as the - // initial schema (as if they were produced by the previous discovery run), - // and will evolve schema or flag actions based on that. - // - Set user_manage to true if you would like to fully manage the entity - // schema by yourself. This is useful when you would like to manually specify - // the schema for a table. In this case, the schema defined by the user is - // guaranteed to be kept unchanged and would not be overwritten. But this also - // means Dataplex will not provide schema evolution management for you. - // Dataplex will still be able to manage partition registration (i.e., keeping - // the list of partitions up to date) when Dataplex discovery is turned on and - // user_managed is set to true. + // Required. Set to `true` if user-managed or `false` if managed by Dataplex. The + // default is `false` (managed by Dataplex). + // + // - Set to `false`to enable Dataplex discovery to update the schema. + // including new data discovery, schema inference, and schema evolution. + // Users retain the ability to input and edit the schema. Dataplex + // treats schema input by the user as though produced + // by a previous Dataplex discovery operation, and it will + // evolve the schema and take action based on that treatment. + // + // - Set to `true` to fully manage the entity + // schema. This setting guarantees that Dataplex will not + // change schema fields. bool user_managed = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. The sequence of fields describing data in table entities. + // **Note:** BigQuery SchemaFields are immutable. repeated SchemaField fields = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The sequence of fields describing the partition structure in entities. @@ -678,8 +679,9 @@ message StorageFormat { // Optional. The delimiter used to separate values. Defaults to ','. string delimiter = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The character used to quote column values. Accepts '"' and '''. - // Defaults to '"' if unspecified. + // Optional. The character used to quote column values. Accepts '"' + // (double quotation mark) or ''' (single quotation mark). Defaults to + // '"' (double quotation mark) if unspecified. string quote = 4 [(google.api.field_behavior) = OPTIONAL]; } @@ -754,6 +756,7 @@ message StorageFormat { // Required. The mime type descriptor for the data. Must match the pattern // {type}/{subtype}. Supported values: + // // - application/x-parquet // - application/x-avro // - application/x-orc diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/resources.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/resources.proto index 8786a00a35a..e07caac233a 100644 --- a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/resources.proto +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/resources.proto @@ -257,7 +257,7 @@ message Zone { } // Output only. The relative resource name of the zone, of the form: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}` + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. string name = 1 [ (google.api.field_behavior) = OUTPUT_ONLY, (google.api.resource_reference) = { diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/service.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/service.proto index e104f445e09..f7995c07b75 100644 --- a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/service.proto +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/service.proto @@ -35,9 +35,9 @@ option java_package = "com.google.cloud.dataplex.v1"; // Dataplex service provides data lakes as a service. The primary resources // offered by this service are Lakes, Zones and Assets which collectively allow -// a data adminstrator to organize, manage, secure and catalog data across their -// organization located across cloud projects in a variety of storage systems -// including Cloud Storage and BigQuery. +// a data administrator to organize, manage, secure and catalog data across +// their organization located across cloud projects in a variety of storage +// systems including Cloud Storage and BigQuery. service DataplexService { option (google.api.default_host) = "dataplex.googleapis.com"; option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; @@ -421,7 +421,7 @@ message UpdateLakeRequest { // Delete lake request. message DeleteLakeRequest { // Required. The resource name of the lake: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}` + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -475,7 +475,7 @@ message ListLakesResponse { // List lake actions request. message ListLakeActionsRequest { // Required. The resource name of the parent lake: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}` + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -649,7 +649,7 @@ message GetZoneRequest { // Create asset request. message CreateAssetRequest { // Required. The resource name of the parent zone: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}` + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -894,7 +894,7 @@ message ListTasksResponse { // Get task request. message GetTaskRequest { // Required. The resource name of the task: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}` + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -963,7 +963,7 @@ message CancelJobRequest { // Create environment request. message CreateEnvironmentRequest { // Required. The resource name of the parent lake: - // projects/{project_id}/locations/{location_id}/lakes/{lake_id} + // `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1004,7 +1004,7 @@ message UpdateEnvironmentRequest { // Delete environment request. message DeleteEnvironmentRequest { // Required. The resource name of the environment: - // projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}` + // `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1016,7 +1016,7 @@ message DeleteEnvironmentRequest { // List environments request. message ListEnvironmentsRequest { // Required. The resource name of the parent lake: - // projects/{project_id}/locations/{location_id}/lakes/{lake_id} + // `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1055,7 +1055,7 @@ message ListEnvironmentsResponse { // Get environment request. message GetEnvironmentRequest { // Required. The resource name of the environment: - // projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id} + // `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1067,7 +1067,7 @@ message GetEnvironmentRequest { // List sessions request. message ListSessionsRequest { // Required. The resource name of the parent environment: - // projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id} + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1085,6 +1085,17 @@ message ListSessionsRequest { // provided to `ListSessions` must match the call that provided the page // token. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter request. The following `mode` filter is supported to return only the + // sessions belonging to the requester when the mode is USER and return + // sessions of all the users when the mode is ADMIN. When no filter is sent + // default to USER mode. + // NOTE: When the mode is ADMIN, the requester should have + // `dataplex.environments.listAllSessions` permission to list all sessions, + // in absence of the permission, the request fails. + // + // mode = ADMIN | USER + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; } // List sessions response. diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/tasks.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/tasks.proto index 8bb07a2ee26..8ca33dac1ba 100644 --- a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/tasks.proto +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/tasks.proto @@ -39,23 +39,28 @@ message Task { // Batch compute resources associated with the task. message BatchComputeResources { // Optional. Total number of job executors. + // Executor Count should be between 2 and 100. [Default=2] int32 executors_count = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. Max configurable executors. // If max_executors_count > executors_count, then auto-scaling is enabled. + // Max Executor Count should be between 2 and 1000. [Default=1000] int32 max_executors_count = 2 [(google.api.field_behavior) = OPTIONAL]; } // Container Image Runtime Configuration used with Batch execution. message ContainerImageRuntime { + // Optional. Container image to use. + string image = 1 [(google.api.field_behavior) = OPTIONAL]; + // Optional. A list of Java JARS to add to the classpath. // Valid input includes Cloud Storage URIs to Jar binaries. - // For example, `gs://bucket-name/my/path/to/file.jar`. + // For example, gs://bucket-name/my/path/to/file.jar repeated string java_jars = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. A list of python packages to be installed. // Valid formats include Cloud Storage URI to a PIP installable library. - // For example, `gs://bucket-name/my/path/to/lib.tar.gz`. + // For example, gs://bucket-name/my/path/to/lib.tar.gz repeated string python_packages = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Override to common configuration of open source components installed on @@ -137,7 +142,7 @@ message Task { // Set to zero to never attempt to retry a failed task. int32 max_retries = 7 [(google.api.field_behavior) = OPTIONAL]; - // Trigger only applies for `RECURRING` tasks. + // Trigger only applies for RECURRING tasks. oneof trigger { // Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for running // tasks periodically. @@ -172,8 +177,17 @@ message Task { // used. string service_account = 5 [(google.api.field_behavior) = REQUIRED]; + // Optional. The project in which jobs are run. By default, the project containing the + // Lake is used. If a project is provided, the + // [ExecutionSpec.service_account][google.cloud.dataplex.v1.Task.ExecutionSpec.service_account] must belong to this project. + string project = 7 [(google.api.field_behavior) = OPTIONAL]; + // Optional. The maximum duration after which the job execution is expired. google.protobuf.Duration max_job_execution_lifetime = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Cloud KMS key to use for encryption, of the form: + // `projects/{project_number}/locations/{location_id}/keyRings/{key-ring-name}/cryptoKeys/{key-name}`. + string kms_key = 9 [(google.api.field_behavior) = OPTIONAL]; } // User-specified config for running a Spark task. @@ -224,6 +238,15 @@ message Task { InfrastructureSpec infrastructure_spec = 6 [(google.api.field_behavior) = OPTIONAL]; } + // Status of the task execution (e.g. Jobs). + message ExecutionStatus { + // Output only. Last update time of the status. + google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. latest job execution + Job latest_job = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + // Output only. The relative resource name of the task, of the form: // projects/{project_number}/locations/{location_id}/lakes/{lake_id}/ // tasks/{task_id}. @@ -262,6 +285,9 @@ message Task { // Required. Spec related to how a task is executed. ExecutionSpec execution_spec = 101 [(google.api.field_behavior) = REQUIRED]; + // Output only. Status of the latest task executions. + ExecutionStatus execution_status = 201 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Task template specific user-specified config. oneof config { // Config related to running custom Spark tasks. diff --git a/packages/google-cloud-dataplex/protos/protos.d.ts b/packages/google-cloud-dataplex/protos/protos.d.ts index 322f339249b..6e9a9b63df4 100644 --- a/packages/google-cloud-dataplex/protos/protos.d.ts +++ b/packages/google-cloud-dataplex/protos/protos.d.ts @@ -4671,6 +4671,48 @@ export namespace google { */ public getContent(request: google.cloud.dataplex.v1.IGetContentRequest): Promise; + /** + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy + */ + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.cloud.dataplex.v1.ContentService.GetIamPolicyCallback): void; + + /** + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @returns Promise + */ + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; + + /** + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy + */ + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.cloud.dataplex.v1.ContentService.SetIamPolicyCallback): void; + + /** + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @returns Promise + */ + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; + + /** + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + */ + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.cloud.dataplex.v1.ContentService.TestIamPermissionsCallback): void; + + /** + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @returns Promise + */ + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; + /** * Calls ListContent. * @param request ListContentRequest message or plain object @@ -4716,6 +4758,27 @@ export namespace google { */ type GetContentCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Content) => void; + /** + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|getIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|setIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|testIamPermissions}. + * @param error Error, if any + * @param [response] TestIamPermissionsResponse + */ + type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; + /** * Callback as used by {@link google.cloud.dataplex.v1.ContentService|listContent}. * @param error Error, if any @@ -5756,6 +5819,9 @@ export namespace google { /** PartitionDetails type */ type?: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null); + + /** PartitionDetails sampledDataLocations */ + sampledDataLocations?: (string[]|null); } /** Represents a PartitionDetails. */ @@ -5776,6 +5842,9 @@ export namespace google { /** PartitionDetails type. */ public type: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType); + /** PartitionDetails sampledDataLocations. */ + public sampledDataLocations: string[]; + /** * Creates a new PartitionDetails instance using the specified properties. * @param [properties] Properties to set @@ -13962,6 +14031,9 @@ export namespace google { /** ListSessionsRequest pageToken */ pageToken?: (string|null); + + /** ListSessionsRequest filter */ + filter?: (string|null); } /** Represents a ListSessionsRequest. */ @@ -13982,6 +14054,9 @@ export namespace google { /** ListSessionsRequest pageToken. */ public pageToken: string; + /** ListSessionsRequest filter. */ + public filter: string; + /** * Creates a new ListSessionsRequest instance using the specified properties. * @param [properties] Properties to set @@ -14196,6 +14271,9 @@ export namespace google { /** Task executionSpec */ executionSpec?: (google.cloud.dataplex.v1.Task.IExecutionSpec|null); + /** Task executionStatus */ + executionStatus?: (google.cloud.dataplex.v1.Task.IExecutionStatus|null); + /** Task spark */ spark?: (google.cloud.dataplex.v1.Task.ISparkTaskConfig|null); } @@ -14239,6 +14317,9 @@ export namespace google { /** Task executionSpec. */ public executionSpec?: (google.cloud.dataplex.v1.Task.IExecutionSpec|null); + /** Task executionStatus. */ + public executionStatus?: (google.cloud.dataplex.v1.Task.IExecutionStatus|null); + /** Task spark. */ public spark?: (google.cloud.dataplex.v1.Task.ISparkTaskConfig|null); @@ -14551,6 +14632,9 @@ export namespace google { /** Properties of a ContainerImageRuntime. */ interface IContainerImageRuntime { + /** ContainerImageRuntime image */ + image?: (string|null); + /** ContainerImageRuntime javaJars */ javaJars?: (string[]|null); @@ -14570,6 +14654,9 @@ export namespace google { */ constructor(properties?: google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime); + /** ContainerImageRuntime image. */ + public image: string; + /** ContainerImageRuntime javaJars. */ public javaJars: string[]; @@ -14913,8 +15000,14 @@ export namespace google { /** ExecutionSpec serviceAccount */ serviceAccount?: (string|null); + /** ExecutionSpec project */ + project?: (string|null); + /** ExecutionSpec maxJobExecutionLifetime */ maxJobExecutionLifetime?: (google.protobuf.IDuration|null); + + /** ExecutionSpec kmsKey */ + kmsKey?: (string|null); } /** Represents an ExecutionSpec. */ @@ -14932,9 +15025,15 @@ export namespace google { /** ExecutionSpec serviceAccount. */ public serviceAccount: string; + /** ExecutionSpec project. */ + public project: string; + /** ExecutionSpec maxJobExecutionLifetime. */ public maxJobExecutionLifetime?: (google.protobuf.IDuration|null); + /** ExecutionSpec kmsKey. */ + public kmsKey: string; + /** * Creates a new ExecutionSpec instance using the specified properties. * @param [properties] Properties to set @@ -15154,6 +15253,109 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of an ExecutionStatus. */ + interface IExecutionStatus { + + /** ExecutionStatus updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** ExecutionStatus latestJob */ + latestJob?: (google.cloud.dataplex.v1.IJob|null); + } + + /** Represents an ExecutionStatus. */ + class ExecutionStatus implements IExecutionStatus { + + /** + * Constructs a new ExecutionStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Task.IExecutionStatus); + + /** ExecutionStatus updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** ExecutionStatus latestJob. */ + public latestJob?: (google.cloud.dataplex.v1.IJob|null); + + /** + * Creates a new ExecutionStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecutionStatus instance + */ + public static create(properties?: google.cloud.dataplex.v1.Task.IExecutionStatus): google.cloud.dataplex.v1.Task.ExecutionStatus; + + /** + * Encodes the specified ExecutionStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionStatus.verify|verify} messages. + * @param message ExecutionStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Task.IExecutionStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecutionStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionStatus.verify|verify} messages. + * @param message ExecutionStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Task.IExecutionStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecutionStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecutionStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Task.ExecutionStatus; + + /** + * Decodes an ExecutionStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecutionStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Task.ExecutionStatus; + + /** + * Verifies an ExecutionStatus message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExecutionStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecutionStatus + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.ExecutionStatus; + + /** + * Creates a plain object from an ExecutionStatus message. Also converts values to other types if specified. + * @param message ExecutionStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Task.ExecutionStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecutionStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExecutionStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } /** Properties of a Job. */ @@ -19507,188 +19709,188 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an Empty. */ - interface IEmpty { + /** Properties of a FieldMask. */ + interface IFieldMask { + + /** FieldMask paths */ + paths?: (string[]|null); } - /** Represents an Empty. */ - class Empty implements IEmpty { + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { /** - * Constructs a new Empty. + * Constructs a new FieldMask. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IEmpty); + constructor(properties?: google.protobuf.IFieldMask); + + /** FieldMask paths. */ + public paths: string[]; /** - * Creates a new Empty instance using the specified properties. + * Creates a new FieldMask instance using the specified properties. * @param [properties] Properties to set - * @returns Empty instance + * @returns FieldMask instance */ - public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Empty message from the specified reader or buffer. + * Decodes a FieldMask message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Empty + * @returns FieldMask * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; /** - * Decodes an Empty message from the specified reader or buffer, length delimited. + * Decodes a FieldMask message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Empty + * @returns FieldMask * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; /** - * Verifies an Empty message. + * Verifies a FieldMask message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Empty + * @returns FieldMask */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @param message Empty + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Empty to JSON. + * Converts this FieldMask to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Empty + * Gets the default type url for FieldMask * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FieldMask. */ - interface IFieldMask { - - /** FieldMask paths */ - paths?: (string[]|null); + /** Properties of an Empty. */ + interface IEmpty { } - /** Represents a FieldMask. */ - class FieldMask implements IFieldMask { + /** Represents an Empty. */ + class Empty implements IEmpty { /** - * Constructs a new FieldMask. + * Constructs a new Empty. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IFieldMask); - - /** FieldMask paths. */ - public paths: string[]; + constructor(properties?: google.protobuf.IEmpty); /** - * Creates a new FieldMask instance using the specified properties. + * Creates a new Empty instance using the specified properties. * @param [properties] Properties to set - * @returns FieldMask instance + * @returns Empty instance */ - public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FieldMask message from the specified reader or buffer. + * Decodes an Empty message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FieldMask + * @returns Empty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * Decodes an Empty message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FieldMask + * @returns Empty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; /** - * Verifies a FieldMask message. + * Verifies an Empty message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * Creates an Empty message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FieldMask + * @returns Empty */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @param message FieldMask + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FieldMask to JSON. + * Converts this Empty to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FieldMask + * Gets the default type url for Empty * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -19799,6 +20001,1523 @@ export namespace google { } } + /** Namespace iam. */ + namespace iam { + + /** Namespace v1. */ + namespace v1 { + + /** Represents a IAMPolicy */ + class IAMPolicy extends $protobuf.rpc.Service { + + /** + * Constructs a new IAMPolicy service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new IAMPolicy service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): IAMPolicy; + + /** + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy + */ + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.iam.v1.IAMPolicy.SetIamPolicyCallback): void; + + /** + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @returns Promise + */ + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; + + /** + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy + */ + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.iam.v1.IAMPolicy.GetIamPolicyCallback): void; + + /** + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @returns Promise + */ + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; + + /** + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + */ + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.iam.v1.IAMPolicy.TestIamPermissionsCallback): void; + + /** + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @returns Promise + */ + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; + } + + namespace IAMPolicy { + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|setIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|getIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|testIamPermissions}. + * @param error Error, if any + * @param [response] TestIamPermissionsResponse + */ + type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; + } + + /** Properties of a SetIamPolicyRequest. */ + interface ISetIamPolicyRequest { + + /** SetIamPolicyRequest resource */ + resource?: (string|null); + + /** SetIamPolicyRequest policy */ + policy?: (google.iam.v1.IPolicy|null); + + /** SetIamPolicyRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents a SetIamPolicyRequest. */ + class SetIamPolicyRequest implements ISetIamPolicyRequest { + + /** + * Constructs a new SetIamPolicyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.ISetIamPolicyRequest); + + /** SetIamPolicyRequest resource. */ + public resource: string; + + /** SetIamPolicyRequest policy. */ + public policy?: (google.iam.v1.IPolicy|null); + + /** SetIamPolicyRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new SetIamPolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SetIamPolicyRequest instance + */ + public static create(properties?: google.iam.v1.ISetIamPolicyRequest): google.iam.v1.SetIamPolicyRequest; + + /** + * Encodes the specified SetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. + * @param message SetIamPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.ISetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. + * @param message SetIamPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.ISetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetIamPolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.SetIamPolicyRequest; + + /** + * Decodes a SetIamPolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.SetIamPolicyRequest; + + /** + * Verifies a SetIamPolicyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetIamPolicyRequest + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.SetIamPolicyRequest; + + /** + * Creates a plain object from a SetIamPolicyRequest message. Also converts values to other types if specified. + * @param message SetIamPolicyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.SetIamPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetIamPolicyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetIamPolicyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetIamPolicyRequest. */ + interface IGetIamPolicyRequest { + + /** GetIamPolicyRequest resource */ + resource?: (string|null); + + /** GetIamPolicyRequest options */ + options?: (google.iam.v1.IGetPolicyOptions|null); + } + + /** Represents a GetIamPolicyRequest. */ + class GetIamPolicyRequest implements IGetIamPolicyRequest { + + /** + * Constructs a new GetIamPolicyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IGetIamPolicyRequest); + + /** GetIamPolicyRequest resource. */ + public resource: string; + + /** GetIamPolicyRequest options. */ + public options?: (google.iam.v1.IGetPolicyOptions|null); + + /** + * Creates a new GetIamPolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetIamPolicyRequest instance + */ + public static create(properties?: google.iam.v1.IGetIamPolicyRequest): google.iam.v1.GetIamPolicyRequest; + + /** + * Encodes the specified GetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. + * @param message GetIamPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IGetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. + * @param message GetIamPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IGetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetIamPolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.GetIamPolicyRequest; + + /** + * Decodes a GetIamPolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.GetIamPolicyRequest; + + /** + * Verifies a GetIamPolicyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetIamPolicyRequest + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.GetIamPolicyRequest; + + /** + * Creates a plain object from a GetIamPolicyRequest message. Also converts values to other types if specified. + * @param message GetIamPolicyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.GetIamPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetIamPolicyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetIamPolicyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TestIamPermissionsRequest. */ + interface ITestIamPermissionsRequest { + + /** TestIamPermissionsRequest resource */ + resource?: (string|null); + + /** TestIamPermissionsRequest permissions */ + permissions?: (string[]|null); + } + + /** Represents a TestIamPermissionsRequest. */ + class TestIamPermissionsRequest implements ITestIamPermissionsRequest { + + /** + * Constructs a new TestIamPermissionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.ITestIamPermissionsRequest); + + /** TestIamPermissionsRequest resource. */ + public resource: string; + + /** TestIamPermissionsRequest permissions. */ + public permissions: string[]; + + /** + * Creates a new TestIamPermissionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns TestIamPermissionsRequest instance + */ + public static create(properties?: google.iam.v1.ITestIamPermissionsRequest): google.iam.v1.TestIamPermissionsRequest; + + /** + * Encodes the specified TestIamPermissionsRequest message. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. + * @param message TestIamPermissionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.ITestIamPermissionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TestIamPermissionsRequest message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. + * @param message TestIamPermissionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.ITestIamPermissionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TestIamPermissionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TestIamPermissionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.TestIamPermissionsRequest; + + /** + * Decodes a TestIamPermissionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TestIamPermissionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.TestIamPermissionsRequest; + + /** + * Verifies a TestIamPermissionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TestIamPermissionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TestIamPermissionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.TestIamPermissionsRequest; + + /** + * Creates a plain object from a TestIamPermissionsRequest message. Also converts values to other types if specified. + * @param message TestIamPermissionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.TestIamPermissionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TestIamPermissionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TestIamPermissionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TestIamPermissionsResponse. */ + interface ITestIamPermissionsResponse { + + /** TestIamPermissionsResponse permissions */ + permissions?: (string[]|null); + } + + /** Represents a TestIamPermissionsResponse. */ + class TestIamPermissionsResponse implements ITestIamPermissionsResponse { + + /** + * Constructs a new TestIamPermissionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.ITestIamPermissionsResponse); + + /** TestIamPermissionsResponse permissions. */ + public permissions: string[]; + + /** + * Creates a new TestIamPermissionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns TestIamPermissionsResponse instance + */ + public static create(properties?: google.iam.v1.ITestIamPermissionsResponse): google.iam.v1.TestIamPermissionsResponse; + + /** + * Encodes the specified TestIamPermissionsResponse message. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. + * @param message TestIamPermissionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.ITestIamPermissionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TestIamPermissionsResponse message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. + * @param message TestIamPermissionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.ITestIamPermissionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TestIamPermissionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TestIamPermissionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.TestIamPermissionsResponse; + + /** + * Decodes a TestIamPermissionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TestIamPermissionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.TestIamPermissionsResponse; + + /** + * Verifies a TestIamPermissionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TestIamPermissionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TestIamPermissionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.TestIamPermissionsResponse; + + /** + * Creates a plain object from a TestIamPermissionsResponse message. Also converts values to other types if specified. + * @param message TestIamPermissionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.TestIamPermissionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TestIamPermissionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TestIamPermissionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetPolicyOptions. */ + interface IGetPolicyOptions { + + /** GetPolicyOptions requestedPolicyVersion */ + requestedPolicyVersion?: (number|null); + } + + /** Represents a GetPolicyOptions. */ + class GetPolicyOptions implements IGetPolicyOptions { + + /** + * Constructs a new GetPolicyOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IGetPolicyOptions); + + /** GetPolicyOptions requestedPolicyVersion. */ + public requestedPolicyVersion: number; + + /** + * Creates a new GetPolicyOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPolicyOptions instance + */ + public static create(properties?: google.iam.v1.IGetPolicyOptions): google.iam.v1.GetPolicyOptions; + + /** + * Encodes the specified GetPolicyOptions message. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. + * @param message GetPolicyOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IGetPolicyOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPolicyOptions message, length delimited. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. + * @param message GetPolicyOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IGetPolicyOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPolicyOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPolicyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.GetPolicyOptions; + + /** + * Decodes a GetPolicyOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPolicyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.GetPolicyOptions; + + /** + * Verifies a GetPolicyOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetPolicyOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPolicyOptions + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.GetPolicyOptions; + + /** + * Creates a plain object from a GetPolicyOptions message. Also converts values to other types if specified. + * @param message GetPolicyOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.GetPolicyOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPolicyOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetPolicyOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Policy. */ + interface IPolicy { + + /** Policy version */ + version?: (number|null); + + /** Policy bindings */ + bindings?: (google.iam.v1.IBinding[]|null); + + /** Policy auditConfigs */ + auditConfigs?: (google.iam.v1.IAuditConfig[]|null); + + /** Policy etag */ + etag?: (Uint8Array|string|null); + } + + /** Represents a Policy. */ + class Policy implements IPolicy { + + /** + * Constructs a new Policy. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IPolicy); + + /** Policy version. */ + public version: number; + + /** Policy bindings. */ + public bindings: google.iam.v1.IBinding[]; + + /** Policy auditConfigs. */ + public auditConfigs: google.iam.v1.IAuditConfig[]; + + /** Policy etag. */ + public etag: (Uint8Array|string); + + /** + * Creates a new Policy instance using the specified properties. + * @param [properties] Properties to set + * @returns Policy instance + */ + public static create(properties?: google.iam.v1.IPolicy): google.iam.v1.Policy; + + /** + * Encodes the specified Policy message. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @param message Policy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Policy message, length delimited. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @param message Policy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Policy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.Policy; + + /** + * Decodes a Policy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.Policy; + + /** + * Verifies a Policy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Policy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Policy + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.Policy; + + /** + * Creates a plain object from a Policy message. Also converts values to other types if specified. + * @param message Policy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.Policy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Policy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Policy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Binding. */ + interface IBinding { + + /** Binding role */ + role?: (string|null); + + /** Binding members */ + members?: (string[]|null); + + /** Binding condition */ + condition?: (google.type.IExpr|null); + } + + /** Represents a Binding. */ + class Binding implements IBinding { + + /** + * Constructs a new Binding. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IBinding); + + /** Binding role. */ + public role: string; + + /** Binding members. */ + public members: string[]; + + /** Binding condition. */ + public condition?: (google.type.IExpr|null); + + /** + * Creates a new Binding instance using the specified properties. + * @param [properties] Properties to set + * @returns Binding instance + */ + public static create(properties?: google.iam.v1.IBinding): google.iam.v1.Binding; + + /** + * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @param message Binding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @param message Binding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Binding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.Binding; + + /** + * Decodes a Binding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.Binding; + + /** + * Verifies a Binding message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Binding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Binding + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.Binding; + + /** + * Creates a plain object from a Binding message. Also converts values to other types if specified. + * @param message Binding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.Binding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Binding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Binding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AuditConfig. */ + interface IAuditConfig { + + /** AuditConfig service */ + service?: (string|null); + + /** AuditConfig auditLogConfigs */ + auditLogConfigs?: (google.iam.v1.IAuditLogConfig[]|null); + } + + /** Represents an AuditConfig. */ + class AuditConfig implements IAuditConfig { + + /** + * Constructs a new AuditConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IAuditConfig); + + /** AuditConfig service. */ + public service: string; + + /** AuditConfig auditLogConfigs. */ + public auditLogConfigs: google.iam.v1.IAuditLogConfig[]; + + /** + * Creates a new AuditConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AuditConfig instance + */ + public static create(properties?: google.iam.v1.IAuditConfig): google.iam.v1.AuditConfig; + + /** + * Encodes the specified AuditConfig message. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @param message AuditConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @param message AuditConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuditConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditConfig; + + /** + * Decodes an AuditConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditConfig; + + /** + * Verifies an AuditConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AuditConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuditConfig + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditConfig; + + /** + * Creates a plain object from an AuditConfig message. Also converts values to other types if specified. + * @param message AuditConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.AuditConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuditConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuditConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AuditLogConfig. */ + interface IAuditLogConfig { + + /** AuditLogConfig logType */ + logType?: (google.iam.v1.AuditLogConfig.LogType|keyof typeof google.iam.v1.AuditLogConfig.LogType|null); + + /** AuditLogConfig exemptedMembers */ + exemptedMembers?: (string[]|null); + } + + /** Represents an AuditLogConfig. */ + class AuditLogConfig implements IAuditLogConfig { + + /** + * Constructs a new AuditLogConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IAuditLogConfig); + + /** AuditLogConfig logType. */ + public logType: (google.iam.v1.AuditLogConfig.LogType|keyof typeof google.iam.v1.AuditLogConfig.LogType); + + /** AuditLogConfig exemptedMembers. */ + public exemptedMembers: string[]; + + /** + * Creates a new AuditLogConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AuditLogConfig instance + */ + public static create(properties?: google.iam.v1.IAuditLogConfig): google.iam.v1.AuditLogConfig; + + /** + * Encodes the specified AuditLogConfig message. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. + * @param message AuditLogConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IAuditLogConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuditLogConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. + * @param message AuditLogConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IAuditLogConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuditLogConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuditLogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditLogConfig; + + /** + * Decodes an AuditLogConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuditLogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditLogConfig; + + /** + * Verifies an AuditLogConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AuditLogConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuditLogConfig + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditLogConfig; + + /** + * Creates a plain object from an AuditLogConfig message. Also converts values to other types if specified. + * @param message AuditLogConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.AuditLogConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuditLogConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuditLogConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AuditLogConfig { + + /** LogType enum. */ + enum LogType { + LOG_TYPE_UNSPECIFIED = 0, + ADMIN_READ = 1, + DATA_WRITE = 2, + DATA_READ = 3 + } + } + + /** Properties of a PolicyDelta. */ + interface IPolicyDelta { + + /** PolicyDelta bindingDeltas */ + bindingDeltas?: (google.iam.v1.IBindingDelta[]|null); + + /** PolicyDelta auditConfigDeltas */ + auditConfigDeltas?: (google.iam.v1.IAuditConfigDelta[]|null); + } + + /** Represents a PolicyDelta. */ + class PolicyDelta implements IPolicyDelta { + + /** + * Constructs a new PolicyDelta. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IPolicyDelta); + + /** PolicyDelta bindingDeltas. */ + public bindingDeltas: google.iam.v1.IBindingDelta[]; + + /** PolicyDelta auditConfigDeltas. */ + public auditConfigDeltas: google.iam.v1.IAuditConfigDelta[]; + + /** + * Creates a new PolicyDelta instance using the specified properties. + * @param [properties] Properties to set + * @returns PolicyDelta instance + */ + public static create(properties?: google.iam.v1.IPolicyDelta): google.iam.v1.PolicyDelta; + + /** + * Encodes the specified PolicyDelta message. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @param message PolicyDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IPolicyDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PolicyDelta message, length delimited. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @param message PolicyDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IPolicyDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PolicyDelta message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.PolicyDelta; + + /** + * Decodes a PolicyDelta message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.PolicyDelta; + + /** + * Verifies a PolicyDelta message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PolicyDelta message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PolicyDelta + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.PolicyDelta; + + /** + * Creates a plain object from a PolicyDelta message. Also converts values to other types if specified. + * @param message PolicyDelta + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.PolicyDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PolicyDelta to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PolicyDelta + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BindingDelta. */ + interface IBindingDelta { + + /** BindingDelta action */ + action?: (google.iam.v1.BindingDelta.Action|keyof typeof google.iam.v1.BindingDelta.Action|null); + + /** BindingDelta role */ + role?: (string|null); + + /** BindingDelta member */ + member?: (string|null); + + /** BindingDelta condition */ + condition?: (google.type.IExpr|null); + } + + /** Represents a BindingDelta. */ + class BindingDelta implements IBindingDelta { + + /** + * Constructs a new BindingDelta. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IBindingDelta); + + /** BindingDelta action. */ + public action: (google.iam.v1.BindingDelta.Action|keyof typeof google.iam.v1.BindingDelta.Action); + + /** BindingDelta role. */ + public role: string; + + /** BindingDelta member. */ + public member: string; + + /** BindingDelta condition. */ + public condition?: (google.type.IExpr|null); + + /** + * Creates a new BindingDelta instance using the specified properties. + * @param [properties] Properties to set + * @returns BindingDelta instance + */ + public static create(properties?: google.iam.v1.IBindingDelta): google.iam.v1.BindingDelta; + + /** + * Encodes the specified BindingDelta message. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @param message BindingDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IBindingDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BindingDelta message, length delimited. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @param message BindingDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IBindingDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BindingDelta message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.BindingDelta; + + /** + * Decodes a BindingDelta message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.BindingDelta; + + /** + * Verifies a BindingDelta message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BindingDelta message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BindingDelta + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.BindingDelta; + + /** + * Creates a plain object from a BindingDelta message. Also converts values to other types if specified. + * @param message BindingDelta + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.BindingDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BindingDelta to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BindingDelta + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BindingDelta { + + /** Action enum. */ + enum Action { + ACTION_UNSPECIFIED = 0, + ADD = 1, + REMOVE = 2 + } + } + + /** Properties of an AuditConfigDelta. */ + interface IAuditConfigDelta { + + /** AuditConfigDelta action */ + action?: (google.iam.v1.AuditConfigDelta.Action|keyof typeof google.iam.v1.AuditConfigDelta.Action|null); + + /** AuditConfigDelta service */ + service?: (string|null); + + /** AuditConfigDelta exemptedMember */ + exemptedMember?: (string|null); + + /** AuditConfigDelta logType */ + logType?: (string|null); + } + + /** Represents an AuditConfigDelta. */ + class AuditConfigDelta implements IAuditConfigDelta { + + /** + * Constructs a new AuditConfigDelta. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IAuditConfigDelta); + + /** AuditConfigDelta action. */ + public action: (google.iam.v1.AuditConfigDelta.Action|keyof typeof google.iam.v1.AuditConfigDelta.Action); + + /** AuditConfigDelta service. */ + public service: string; + + /** AuditConfigDelta exemptedMember. */ + public exemptedMember: string; + + /** AuditConfigDelta logType. */ + public logType: string; + + /** + * Creates a new AuditConfigDelta instance using the specified properties. + * @param [properties] Properties to set + * @returns AuditConfigDelta instance + */ + public static create(properties?: google.iam.v1.IAuditConfigDelta): google.iam.v1.AuditConfigDelta; + + /** + * Encodes the specified AuditConfigDelta message. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @param message AuditConfigDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IAuditConfigDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuditConfigDelta message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @param message AuditConfigDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IAuditConfigDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditConfigDelta; + + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditConfigDelta; + + /** + * Verifies an AuditConfigDelta message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AuditConfigDelta message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuditConfigDelta + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditConfigDelta; + + /** + * Creates a plain object from an AuditConfigDelta message. Also converts values to other types if specified. + * @param message AuditConfigDelta + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.AuditConfigDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuditConfigDelta to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuditConfigDelta + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AuditConfigDelta { + + /** Action enum. */ + enum Action { + ACTION_UNSPECIFIED = 0, + ADD = 1, + REMOVE = 2 + } + } + } + } + + /** Namespace type. */ + namespace type { + + /** Properties of an Expr. */ + interface IExpr { + + /** Expr expression */ + expression?: (string|null); + + /** Expr title */ + title?: (string|null); + + /** Expr description */ + description?: (string|null); + + /** Expr location */ + location?: (string|null); + } + + /** Represents an Expr. */ + class Expr implements IExpr { + + /** + * Constructs a new Expr. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.IExpr); + + /** Expr expression. */ + public expression: string; + + /** Expr title. */ + public title: string; + + /** Expr description. */ + public description: string; + + /** Expr location. */ + public location: string; + + /** + * Creates a new Expr instance using the specified properties. + * @param [properties] Properties to set + * @returns Expr instance + */ + public static create(properties?: google.type.IExpr): google.type.Expr; + + /** + * Encodes the specified Expr message. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * @param message Expr message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.IExpr, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Expr message, length delimited. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * @param message Expr message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.IExpr, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Expr message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Expr + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Expr; + + /** + * Decodes an Expr message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Expr + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Expr; + + /** + * Verifies an Expr message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Expr message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Expr + */ + public static fromObject(object: { [k: string]: any }): google.type.Expr; + + /** + * Creates a plain object from an Expr message. Also converts values to other types if specified. + * @param message Expr + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.Expr, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Expr to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Expr + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + /** Namespace longrunning. */ namespace longrunning { diff --git a/packages/google-cloud-dataplex/protos/protos.js b/packages/google-cloud-dataplex/protos/protos.js index 2504aa41bae..f7cf043673e 100644 --- a/packages/google-cloud-dataplex/protos/protos.js +++ b/packages/google-cloud-dataplex/protos/protos.js @@ -12123,6 +12123,105 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|getIamPolicy}. + * @memberof google.cloud.dataplex.v1.ContentService + * @typedef GetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ + + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.cloud.dataplex.v1.ContentService + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @param {google.cloud.dataplex.v1.ContentService.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContentService.prototype.getIamPolicy = function getIamPolicy(request, callback) { + return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "GetIamPolicy" }); + + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.cloud.dataplex.v1.ContentService + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|setIamPolicy}. + * @memberof google.cloud.dataplex.v1.ContentService + * @typedef SetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ + + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.cloud.dataplex.v1.ContentService + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @param {google.cloud.dataplex.v1.ContentService.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContentService.prototype.setIamPolicy = function setIamPolicy(request, callback) { + return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "SetIamPolicy" }); + + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.cloud.dataplex.v1.ContentService + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|testIamPermissions}. + * @memberof google.cloud.dataplex.v1.ContentService + * @typedef TestIamPermissionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse + */ + + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.cloud.dataplex.v1.ContentService + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @param {google.cloud.dataplex.v1.ContentService.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContentService.prototype.testIamPermissions = function testIamPermissions(request, callback) { + return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); + }, "name", { value: "TestIamPermissions" }); + + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.cloud.dataplex.v1.ContentService + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.cloud.dataplex.v1.ContentService|listContent}. * @memberof google.cloud.dataplex.v1.ContentService @@ -14705,6 +14804,7 @@ * @property {string|null} [partition] PartitionDetails partition * @property {string|null} [entity] PartitionDetails entity * @property {google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null} [type] PartitionDetails type + * @property {Array.|null} [sampledDataLocations] PartitionDetails sampledDataLocations */ /** @@ -14716,6 +14816,7 @@ * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails=} [properties] Properties to set */ function PartitionDetails(properties) { + this.sampledDataLocations = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14746,6 +14847,14 @@ */ PartitionDetails.prototype.type = 0; + /** + * PartitionDetails sampledDataLocations. + * @member {Array.} sampledDataLocations + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @instance + */ + PartitionDetails.prototype.sampledDataLocations = $util.emptyArray; + /** * Creates a new PartitionDetails instance using the specified properties. * @function create @@ -14776,6 +14885,9 @@ writer.uint32(/* id 2, wireType 2 =*/18).string(message.entity); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type); + if (message.sampledDataLocations != null && message.sampledDataLocations.length) + for (var i = 0; i < message.sampledDataLocations.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.sampledDataLocations[i]); return writer; }; @@ -14822,6 +14934,12 @@ message.type = reader.int32(); break; } + case 4: { + if (!(message.sampledDataLocations && message.sampledDataLocations.length)) + message.sampledDataLocations = []; + message.sampledDataLocations.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -14872,6 +14990,13 @@ case 2: break; } + if (message.sampledDataLocations != null && message.hasOwnProperty("sampledDataLocations")) { + if (!Array.isArray(message.sampledDataLocations)) + return "sampledDataLocations: array expected"; + for (var i = 0; i < message.sampledDataLocations.length; ++i) + if (!$util.isString(message.sampledDataLocations[i])) + return "sampledDataLocations: string[] expected"; + } return null; }; @@ -14905,6 +15030,13 @@ message.type = 2; break; } + if (object.sampledDataLocations) { + if (!Array.isArray(object.sampledDataLocations)) + throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.sampledDataLocations: array expected"); + message.sampledDataLocations = []; + for (var i = 0; i < object.sampledDataLocations.length; ++i) + message.sampledDataLocations[i] = String(object.sampledDataLocations[i]); + } return message; }; @@ -14921,6 +15053,8 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.sampledDataLocations = []; if (options.defaults) { object.partition = ""; object.entity = ""; @@ -14932,6 +15066,11 @@ object.entity = message.entity; if (message.type != null && message.hasOwnProperty("type")) object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityType[message.type] : message.type; + if (message.sampledDataLocations && message.sampledDataLocations.length) { + object.sampledDataLocations = []; + for (var j = 0; j < message.sampledDataLocations.length; ++j) + object.sampledDataLocations[j] = message.sampledDataLocations[j]; + } return object; }; @@ -33878,6 +34017,7 @@ * @property {string|null} [parent] ListSessionsRequest parent * @property {number|null} [pageSize] ListSessionsRequest pageSize * @property {string|null} [pageToken] ListSessionsRequest pageToken + * @property {string|null} [filter] ListSessionsRequest filter */ /** @@ -33919,6 +34059,14 @@ */ ListSessionsRequest.prototype.pageToken = ""; + /** + * ListSessionsRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @instance + */ + ListSessionsRequest.prototype.filter = ""; + /** * Creates a new ListSessionsRequest instance using the specified properties. * @function create @@ -33949,6 +34097,8 @@ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); return writer; }; @@ -33995,6 +34145,10 @@ message.pageToken = reader.string(); break; } + case 4: { + message.filter = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -34039,6 +34193,9 @@ if (message.pageToken != null && message.hasOwnProperty("pageToken")) if (!$util.isString(message.pageToken)) return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; return null; }; @@ -34060,6 +34217,8 @@ message.pageSize = object.pageSize | 0; if (object.pageToken != null) message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); return message; }; @@ -34080,6 +34239,7 @@ object.parent = ""; object.pageSize = 0; object.pageToken = ""; + object.filter = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; @@ -34087,6 +34247,8 @@ object.pageSize = message.pageSize; if (message.pageToken != null && message.hasOwnProperty("pageToken")) object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; return object; }; @@ -34383,6 +34545,7 @@ * @property {Object.|null} [labels] Task labels * @property {google.cloud.dataplex.v1.Task.ITriggerSpec|null} [triggerSpec] Task triggerSpec * @property {google.cloud.dataplex.v1.Task.IExecutionSpec|null} [executionSpec] Task executionSpec + * @property {google.cloud.dataplex.v1.Task.IExecutionStatus|null} [executionStatus] Task executionStatus * @property {google.cloud.dataplex.v1.Task.ISparkTaskConfig|null} [spark] Task spark */ @@ -34482,6 +34645,14 @@ */ Task.prototype.executionSpec = null; + /** + * Task executionStatus. + * @member {google.cloud.dataplex.v1.Task.IExecutionStatus|null|undefined} executionStatus + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.executionStatus = null; + /** * Task spark. * @member {google.cloud.dataplex.v1.Task.ISparkTaskConfig|null|undefined} spark @@ -34549,6 +34720,8 @@ $root.google.cloud.dataplex.v1.Task.TriggerSpec.encode(message.triggerSpec, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); if (message.executionSpec != null && Object.hasOwnProperty.call(message, "executionSpec")) $root.google.cloud.dataplex.v1.Task.ExecutionSpec.encode(message.executionSpec, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.executionStatus != null && Object.hasOwnProperty.call(message, "executionStatus")) + $root.google.cloud.dataplex.v1.Task.ExecutionStatus.encode(message.executionStatus, writer.uint32(/* id 201, wireType 2 =*/1610).fork()).ldelim(); if (message.spark != null && Object.hasOwnProperty.call(message, "spark")) $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.encode(message.spark, writer.uint32(/* id 300, wireType 2 =*/2402).fork()).ldelim(); return writer; @@ -34644,6 +34817,10 @@ message.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.decode(reader, reader.uint32()); break; } + case 201: { + message.executionStatus = $root.google.cloud.dataplex.v1.Task.ExecutionStatus.decode(reader, reader.uint32()); + break; + } case 300: { message.spark = $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.decode(reader, reader.uint32()); break; @@ -34735,6 +34912,11 @@ if (error) return "executionSpec." + error; } + if (message.executionStatus != null && message.hasOwnProperty("executionStatus")) { + var error = $root.google.cloud.dataplex.v1.Task.ExecutionStatus.verify(message.executionStatus); + if (error) + return "executionStatus." + error; + } if (message.spark != null && message.hasOwnProperty("spark")) { properties.config = 1; { @@ -34815,6 +34997,11 @@ throw TypeError(".google.cloud.dataplex.v1.Task.executionSpec: object expected"); message.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.fromObject(object.executionSpec); } + if (object.executionStatus != null) { + if (typeof object.executionStatus !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.executionStatus: object expected"); + message.executionStatus = $root.google.cloud.dataplex.v1.Task.ExecutionStatus.fromObject(object.executionStatus); + } if (object.spark != null) { if (typeof object.spark !== "object") throw TypeError(".google.cloud.dataplex.v1.Task.spark: object expected"); @@ -34848,6 +35035,7 @@ object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; object.triggerSpec = null; object.executionSpec = null; + object.executionStatus = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -34873,6 +35061,8 @@ object.triggerSpec = $root.google.cloud.dataplex.v1.Task.TriggerSpec.toObject(message.triggerSpec, options); if (message.executionSpec != null && message.hasOwnProperty("executionSpec")) object.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.toObject(message.executionSpec, options); + if (message.executionStatus != null && message.hasOwnProperty("executionStatus")) + object.executionStatus = $root.google.cloud.dataplex.v1.Task.ExecutionStatus.toObject(message.executionStatus, options); if (message.spark != null && message.hasOwnProperty("spark")) { object.spark = $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.toObject(message.spark, options); if (options.oneofs) @@ -35452,6 +35642,7 @@ * Properties of a ContainerImageRuntime. * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec * @interface IContainerImageRuntime + * @property {string|null} [image] ContainerImageRuntime image * @property {Array.|null} [javaJars] ContainerImageRuntime javaJars * @property {Array.|null} [pythonPackages] ContainerImageRuntime pythonPackages * @property {Object.|null} [properties] ContainerImageRuntime properties @@ -35475,6 +35666,14 @@ this[keys[i]] = properties[keys[i]]; } + /** + * ContainerImageRuntime image. + * @member {string} image + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @instance + */ + ContainerImageRuntime.prototype.image = ""; + /** * ContainerImageRuntime javaJars. * @member {Array.} javaJars @@ -35523,6 +35722,8 @@ ContainerImageRuntime.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.image != null && Object.hasOwnProperty.call(message, "image")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.image); if (message.javaJars != null && message.javaJars.length) for (var i = 0; i < message.javaJars.length; ++i) writer.uint32(/* id 2, wireType 2 =*/18).string(message.javaJars[i]); @@ -35566,6 +35767,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.image = reader.string(); + break; + } case 2: { if (!(message.javaJars && message.javaJars.length)) message.javaJars = []; @@ -35636,6 +35841,9 @@ ContainerImageRuntime.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.image != null && message.hasOwnProperty("image")) + if (!$util.isString(message.image)) + return "image: string expected"; if (message.javaJars != null && message.hasOwnProperty("javaJars")) { if (!Array.isArray(message.javaJars)) return "javaJars: array expected"; @@ -35673,6 +35881,8 @@ if (object instanceof $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime) return object; var message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime(); + if (object.image != null) + message.image = String(object.image); if (object.javaJars) { if (!Array.isArray(object.javaJars)) throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.javaJars: array expected"); @@ -35716,6 +35926,10 @@ } if (options.objects || options.defaults) object.properties = {}; + if (options.defaults) + object.image = ""; + if (message.image != null && message.hasOwnProperty("image")) + object.image = message.image; if (message.javaJars && message.javaJars.length) { object.javaJars = []; for (var j = 0; j < message.javaJars.length; ++j) @@ -36419,7 +36633,9 @@ * @interface IExecutionSpec * @property {Object.|null} [args] ExecutionSpec args * @property {string|null} [serviceAccount] ExecutionSpec serviceAccount + * @property {string|null} [project] ExecutionSpec project * @property {google.protobuf.IDuration|null} [maxJobExecutionLifetime] ExecutionSpec maxJobExecutionLifetime + * @property {string|null} [kmsKey] ExecutionSpec kmsKey */ /** @@ -36454,6 +36670,14 @@ */ ExecutionSpec.prototype.serviceAccount = ""; + /** + * ExecutionSpec project. + * @member {string} project + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @instance + */ + ExecutionSpec.prototype.project = ""; + /** * ExecutionSpec maxJobExecutionLifetime. * @member {google.protobuf.IDuration|null|undefined} maxJobExecutionLifetime @@ -36462,6 +36686,14 @@ */ ExecutionSpec.prototype.maxJobExecutionLifetime = null; + /** + * ExecutionSpec kmsKey. + * @member {string} kmsKey + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @instance + */ + ExecutionSpec.prototype.kmsKey = ""; + /** * Creates a new ExecutionSpec instance using the specified properties. * @function create @@ -36491,8 +36723,12 @@ writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.args[keys[i]]).ldelim(); if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.serviceAccount); + if (message.project != null && Object.hasOwnProperty.call(message, "project")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.project); if (message.maxJobExecutionLifetime != null && Object.hasOwnProperty.call(message, "maxJobExecutionLifetime")) $root.google.protobuf.Duration.encode(message.maxJobExecutionLifetime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.kmsKey != null && Object.hasOwnProperty.call(message, "kmsKey")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.kmsKey); return writer; }; @@ -36554,10 +36790,18 @@ message.serviceAccount = reader.string(); break; } + case 7: { + message.project = reader.string(); + break; + } case 8: { message.maxJobExecutionLifetime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } + case 9: { + message.kmsKey = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -36604,11 +36848,17 @@ if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) if (!$util.isString(message.serviceAccount)) return "serviceAccount: string expected"; + if (message.project != null && message.hasOwnProperty("project")) + if (!$util.isString(message.project)) + return "project: string expected"; if (message.maxJobExecutionLifetime != null && message.hasOwnProperty("maxJobExecutionLifetime")) { var error = $root.google.protobuf.Duration.verify(message.maxJobExecutionLifetime); if (error) return "maxJobExecutionLifetime." + error; } + if (message.kmsKey != null && message.hasOwnProperty("kmsKey")) + if (!$util.isString(message.kmsKey)) + return "kmsKey: string expected"; return null; }; @@ -36633,11 +36883,15 @@ } if (object.serviceAccount != null) message.serviceAccount = String(object.serviceAccount); + if (object.project != null) + message.project = String(object.project); if (object.maxJobExecutionLifetime != null) { if (typeof object.maxJobExecutionLifetime !== "object") throw TypeError(".google.cloud.dataplex.v1.Task.ExecutionSpec.maxJobExecutionLifetime: object expected"); message.maxJobExecutionLifetime = $root.google.protobuf.Duration.fromObject(object.maxJobExecutionLifetime); } + if (object.kmsKey != null) + message.kmsKey = String(object.kmsKey); return message; }; @@ -36658,7 +36912,9 @@ object.args = {}; if (options.defaults) { object.serviceAccount = ""; + object.project = ""; object.maxJobExecutionLifetime = null; + object.kmsKey = ""; } var keys2; if (message.args && (keys2 = Object.keys(message.args)).length) { @@ -36668,8 +36924,12 @@ } if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) object.serviceAccount = message.serviceAccount; + if (message.project != null && message.hasOwnProperty("project")) + object.project = message.project; if (message.maxJobExecutionLifetime != null && message.hasOwnProperty("maxJobExecutionLifetime")) object.maxJobExecutionLifetime = $root.google.protobuf.Duration.toObject(message.maxJobExecutionLifetime, options); + if (message.kmsKey != null && message.hasOwnProperty("kmsKey")) + object.kmsKey = message.kmsKey; return object; }; @@ -37148,6 +37408,243 @@ return SparkTaskConfig; })(); + Task.ExecutionStatus = (function() { + + /** + * Properties of an ExecutionStatus. + * @memberof google.cloud.dataplex.v1.Task + * @interface IExecutionStatus + * @property {google.protobuf.ITimestamp|null} [updateTime] ExecutionStatus updateTime + * @property {google.cloud.dataplex.v1.IJob|null} [latestJob] ExecutionStatus latestJob + */ + + /** + * Constructs a new ExecutionStatus. + * @memberof google.cloud.dataplex.v1.Task + * @classdesc Represents an ExecutionStatus. + * @implements IExecutionStatus + * @constructor + * @param {google.cloud.dataplex.v1.Task.IExecutionStatus=} [properties] Properties to set + */ + function ExecutionStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExecutionStatus updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @instance + */ + ExecutionStatus.prototype.updateTime = null; + + /** + * ExecutionStatus latestJob. + * @member {google.cloud.dataplex.v1.IJob|null|undefined} latestJob + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @instance + */ + ExecutionStatus.prototype.latestJob = null; + + /** + * Creates a new ExecutionStatus instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @static + * @param {google.cloud.dataplex.v1.Task.IExecutionStatus=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.ExecutionStatus} ExecutionStatus instance + */ + ExecutionStatus.create = function create(properties) { + return new ExecutionStatus(properties); + }; + + /** + * Encodes the specified ExecutionStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionStatus.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @static + * @param {google.cloud.dataplex.v1.Task.IExecutionStatus} message ExecutionStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecutionStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.latestJob != null && Object.hasOwnProperty.call(message, "latestJob")) + $root.google.cloud.dataplex.v1.Job.encode(message.latestJob, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExecutionStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @static + * @param {google.cloud.dataplex.v1.Task.IExecutionStatus} message ExecutionStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecutionStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExecutionStatus message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.ExecutionStatus} ExecutionStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecutionStatus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.ExecutionStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.latestJob = $root.google.cloud.dataplex.v1.Job.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExecutionStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.ExecutionStatus} ExecutionStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecutionStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExecutionStatus message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecutionStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.latestJob != null && message.hasOwnProperty("latestJob")) { + var error = $root.google.cloud.dataplex.v1.Job.verify(message.latestJob); + if (error) + return "latestJob." + error; + } + return null; + }; + + /** + * Creates an ExecutionStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.ExecutionStatus} ExecutionStatus + */ + ExecutionStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.ExecutionStatus) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.ExecutionStatus(); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.ExecutionStatus.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.latestJob != null) { + if (typeof object.latestJob !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.ExecutionStatus.latestJob: object expected"); + message.latestJob = $root.google.cloud.dataplex.v1.Job.fromObject(object.latestJob); + } + return message; + }; + + /** + * Creates a plain object from an ExecutionStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @static + * @param {google.cloud.dataplex.v1.Task.ExecutionStatus} message ExecutionStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecutionStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateTime = null; + object.latestJob = null; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.latestJob != null && message.hasOwnProperty("latestJob")) + object.latestJob = $root.google.cloud.dataplex.v1.Job.toObject(message.latestJob, options); + return object; + }; + + /** + * Converts this ExecutionStatus to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @instance + * @returns {Object.} JSON object + */ + ExecutionStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExecutionStatus + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExecutionStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.ExecutionStatus"; + }; + + return ExecutionStatus; + })(); + return Task; })(); @@ -49167,23 +49664,25 @@ return Timestamp; })(); - protobuf.Empty = (function() { + protobuf.FieldMask = (function() { /** - * Properties of an Empty. + * Properties of a FieldMask. * @memberof google.protobuf - * @interface IEmpty + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths */ /** - * Constructs a new Empty. + * Constructs a new FieldMask. * @memberof google.protobuf - * @classdesc Represents an Empty. - * @implements IEmpty + * @classdesc Represents a FieldMask. + * @implements IFieldMask * @constructor - * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @param {google.protobuf.IFieldMask=} [properties] Properties to set */ - function Empty(properties) { + function FieldMask(properties) { + this.paths = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -49191,63 +49690,80 @@ } /** - * Creates a new Empty instance using the specified properties. + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @instance + */ + FieldMask.prototype.paths = $util.emptyArray; + + /** + * Creates a new FieldMask instance using the specified properties. * @function create - * @memberof google.protobuf.Empty + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.IEmpty=} [properties] Properties to set - * @returns {google.protobuf.Empty} Empty instance + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance */ - Empty.create = function create(properties) { - return new Empty(properties); + FieldMask.create = function create(properties) { + return new FieldMask(properties); }; /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. * @function encode - * @memberof google.protobuf.Empty + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Empty.encode = function encode(message, writer) { + FieldMask.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); return writer; }; /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Empty + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Empty.encodeDelimited = function encodeDelimited(message, writer) { + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Empty message from the specified reader or buffer. + * Decodes a FieldMask message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Empty + * @memberof google.protobuf.FieldMask * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Empty} Empty + * @returns {google.protobuf.FieldMask} FieldMask * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Empty.decode = function decode(reader, length) { + FieldMask.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -49257,110 +49773,133 @@ }; /** - * Decodes an Empty message from the specified reader or buffer, length delimited. + * Decodes a FieldMask message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Empty + * @memberof google.protobuf.FieldMask * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Empty} Empty + * @returns {google.protobuf.FieldMask} FieldMask * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Empty.decodeDelimited = function decodeDelimited(reader) { + FieldMask.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Empty message. + * Verifies a FieldMask message. * @function verify - * @memberof google.protobuf.Empty + * @memberof google.protobuf.FieldMask * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Empty.verify = function verify(message) { + FieldMask.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } return null; }; /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Empty + * @memberof google.protobuf.FieldMask * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Empty} Empty + * @returns {google.protobuf.FieldMask} FieldMask */ - Empty.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Empty) + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) return object; - return new $root.google.protobuf.Empty(); + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; }; /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Empty + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.Empty} message Empty + * @param {google.protobuf.FieldMask} message FieldMask * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Empty.toObject = function toObject() { - return {}; + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; }; /** - * Converts this Empty to JSON. + * Converts this FieldMask to JSON. * @function toJSON - * @memberof google.protobuf.Empty + * @memberof google.protobuf.FieldMask * @instance * @returns {Object.} JSON object */ - Empty.prototype.toJSON = function toJSON() { + FieldMask.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Empty + * Gets the default type url for FieldMask * @function getTypeUrl - * @memberof google.protobuf.Empty + * @memberof google.protobuf.FieldMask * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.Empty"; + return typeUrlPrefix + "/google.protobuf.FieldMask"; }; - return Empty; + return FieldMask; })(); - protobuf.FieldMask = (function() { + protobuf.Empty = (function() { /** - * Properties of a FieldMask. + * Properties of an Empty. * @memberof google.protobuf - * @interface IFieldMask - * @property {Array.|null} [paths] FieldMask paths + * @interface IEmpty */ /** - * Constructs a new FieldMask. + * Constructs a new Empty. * @memberof google.protobuf - * @classdesc Represents a FieldMask. - * @implements IFieldMask + * @classdesc Represents an Empty. + * @implements IEmpty * @constructor - * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @param {google.protobuf.IEmpty=} [properties] Properties to set */ - function FieldMask(properties) { - this.paths = []; + function Empty(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -49368,80 +49907,63 @@ } /** - * FieldMask paths. - * @member {Array.} paths - * @memberof google.protobuf.FieldMask - * @instance - */ - FieldMask.prototype.paths = $util.emptyArray; - - /** - * Creates a new FieldMask instance using the specified properties. + * Creates a new Empty instance using the specified properties. * @function create - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - * @returns {google.protobuf.FieldMask} FieldMask instance + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance */ - FieldMask.create = function create(properties) { - return new FieldMask(properties); + Empty.create = function create(properties) { + return new Empty(properties); }; /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. * @function encode - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldMask.encode = function encode(message, writer) { + Empty.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.paths != null && message.paths.length) - for (var i = 0; i < message.paths.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); return writer; }; /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + Empty.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FieldMask message from the specified reader or buffer. + * Decodes an Empty message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.Empty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldMask} FieldMask + * @returns {google.protobuf.Empty} Empty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldMask.decode = function decode(reader, length) { + Empty.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); - break; - } default: reader.skipType(tag & 7); break; @@ -49451,114 +49973,89 @@ }; /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * Decodes an Empty message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.Empty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldMask} FieldMask + * @returns {google.protobuf.Empty} Empty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldMask.decodeDelimited = function decodeDelimited(reader) { + Empty.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FieldMask message. + * Verifies an Empty message. * @function verify - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.Empty * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FieldMask.verify = function verify(message) { + Empty.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.paths != null && message.hasOwnProperty("paths")) { - if (!Array.isArray(message.paths)) - return "paths: array expected"; - for (var i = 0; i < message.paths.length; ++i) - if (!$util.isString(message.paths[i])) - return "paths: string[] expected"; - } return null; }; /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * Creates an Empty message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.Empty * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FieldMask} FieldMask + * @returns {google.protobuf.Empty} Empty */ - FieldMask.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldMask) + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) return object; - var message = new $root.google.protobuf.FieldMask(); - if (object.paths) { - if (!Array.isArray(object.paths)) - throw TypeError(".google.protobuf.FieldMask.paths: array expected"); - message.paths = []; - for (var i = 0; i < object.paths.length; ++i) - message.paths[i] = String(object.paths[i]); - } - return message; + return new $root.google.protobuf.Empty(); }; /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * Creates a plain object from an Empty message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.FieldMask} message FieldMask + * @param {google.protobuf.Empty} message Empty * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldMask.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.paths = []; - if (message.paths && message.paths.length) { - object.paths = []; - for (var j = 0; j < message.paths.length; ++j) - object.paths[j] = message.paths[j]; - } - return object; + Empty.toObject = function toObject() { + return {}; }; /** - * Converts this FieldMask to JSON. + * Converts this Empty to JSON. * @function toJSON - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.Empty * @instance * @returns {Object.} JSON object */ - FieldMask.prototype.toJSON = function toJSON() { + Empty.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FieldMask + * Gets the default type url for Empty * @function getTypeUrl - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.Empty * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FieldMask"; + return typeUrlPrefix + "/google.protobuf.Empty"; }; - return FieldMask; + return Empty; })(); protobuf.Any = (function() { @@ -49800,6 +50297,3624 @@ return protobuf; })(); + google.iam = (function() { + + /** + * Namespace iam. + * @memberof google + * @namespace + */ + var iam = {}; + + iam.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.iam + * @namespace + */ + var v1 = {}; + + v1.IAMPolicy = (function() { + + /** + * Constructs a new IAMPolicy service. + * @memberof google.iam.v1 + * @classdesc Represents a IAMPolicy + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function IAMPolicy(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (IAMPolicy.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = IAMPolicy; + + /** + * Creates new IAMPolicy service using the specified rpc implementation. + * @function create + * @memberof google.iam.v1.IAMPolicy + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {IAMPolicy} RPC service. Useful where requests and/or responses are streamed. + */ + IAMPolicy.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|setIamPolicy}. + * @memberof google.iam.v1.IAMPolicy + * @typedef SetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ + + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @param {google.iam.v1.IAMPolicy.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IAMPolicy.prototype.setIamPolicy = function setIamPolicy(request, callback) { + return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "SetIamPolicy" }); + + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|getIamPolicy}. + * @memberof google.iam.v1.IAMPolicy + * @typedef GetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ + + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @param {google.iam.v1.IAMPolicy.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IAMPolicy.prototype.getIamPolicy = function getIamPolicy(request, callback) { + return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "GetIamPolicy" }); + + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|testIamPermissions}. + * @memberof google.iam.v1.IAMPolicy + * @typedef TestIamPermissionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse + */ + + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @param {google.iam.v1.IAMPolicy.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IAMPolicy.prototype.testIamPermissions = function testIamPermissions(request, callback) { + return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); + }, "name", { value: "TestIamPermissions" }); + + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return IAMPolicy; + })(); + + v1.SetIamPolicyRequest = (function() { + + /** + * Properties of a SetIamPolicyRequest. + * @memberof google.iam.v1 + * @interface ISetIamPolicyRequest + * @property {string|null} [resource] SetIamPolicyRequest resource + * @property {google.iam.v1.IPolicy|null} [policy] SetIamPolicyRequest policy + * @property {google.protobuf.IFieldMask|null} [updateMask] SetIamPolicyRequest updateMask + */ + + /** + * Constructs a new SetIamPolicyRequest. + * @memberof google.iam.v1 + * @classdesc Represents a SetIamPolicyRequest. + * @implements ISetIamPolicyRequest + * @constructor + * @param {google.iam.v1.ISetIamPolicyRequest=} [properties] Properties to set + */ + function SetIamPolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetIamPolicyRequest resource. + * @member {string} resource + * @memberof google.iam.v1.SetIamPolicyRequest + * @instance + */ + SetIamPolicyRequest.prototype.resource = ""; + + /** + * SetIamPolicyRequest policy. + * @member {google.iam.v1.IPolicy|null|undefined} policy + * @memberof google.iam.v1.SetIamPolicyRequest + * @instance + */ + SetIamPolicyRequest.prototype.policy = null; + + /** + * SetIamPolicyRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.iam.v1.SetIamPolicyRequest + * @instance + */ + SetIamPolicyRequest.prototype.updateMask = null; + + /** + * Creates a new SetIamPolicyRequest instance using the specified properties. + * @function create + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {google.iam.v1.ISetIamPolicyRequest=} [properties] Properties to set + * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest instance + */ + SetIamPolicyRequest.create = function create(properties) { + return new SetIamPolicyRequest(properties); + }; + + /** + * Encodes the specified SetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {google.iam.v1.ISetIamPolicyRequest} message SetIamPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetIamPolicyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); + if (message.policy != null && Object.hasOwnProperty.call(message, "policy")) + $root.google.iam.v1.Policy.encode(message.policy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {google.iam.v1.ISetIamPolicyRequest} message SetIamPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetIamPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetIamPolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetIamPolicyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.SetIamPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.resource = reader.string(); + break; + } + case 2: { + message.policy = $root.google.iam.v1.Policy.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetIamPolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetIamPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetIamPolicyRequest message. + * @function verify + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetIamPolicyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.policy != null && message.hasOwnProperty("policy")) { + var error = $root.google.iam.v1.Policy.verify(message.policy); + if (error) + return "policy." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates a SetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest + */ + SetIamPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.SetIamPolicyRequest) + return object; + var message = new $root.google.iam.v1.SetIamPolicyRequest(); + if (object.resource != null) + message.resource = String(object.resource); + if (object.policy != null) { + if (typeof object.policy !== "object") + throw TypeError(".google.iam.v1.SetIamPolicyRequest.policy: object expected"); + message.policy = $root.google.iam.v1.Policy.fromObject(object.policy); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.iam.v1.SetIamPolicyRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from a SetIamPolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {google.iam.v1.SetIamPolicyRequest} message SetIamPolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetIamPolicyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.resource = ""; + object.policy = null; + object.updateMask = null; + } + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.policy != null && message.hasOwnProperty("policy")) + object.policy = $root.google.iam.v1.Policy.toObject(message.policy, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this SetIamPolicyRequest to JSON. + * @function toJSON + * @memberof google.iam.v1.SetIamPolicyRequest + * @instance + * @returns {Object.} JSON object + */ + SetIamPolicyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetIamPolicyRequest + * @function getTypeUrl + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetIamPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.SetIamPolicyRequest"; + }; + + return SetIamPolicyRequest; + })(); + + v1.GetIamPolicyRequest = (function() { + + /** + * Properties of a GetIamPolicyRequest. + * @memberof google.iam.v1 + * @interface IGetIamPolicyRequest + * @property {string|null} [resource] GetIamPolicyRequest resource + * @property {google.iam.v1.IGetPolicyOptions|null} [options] GetIamPolicyRequest options + */ + + /** + * Constructs a new GetIamPolicyRequest. + * @memberof google.iam.v1 + * @classdesc Represents a GetIamPolicyRequest. + * @implements IGetIamPolicyRequest + * @constructor + * @param {google.iam.v1.IGetIamPolicyRequest=} [properties] Properties to set + */ + function GetIamPolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetIamPolicyRequest resource. + * @member {string} resource + * @memberof google.iam.v1.GetIamPolicyRequest + * @instance + */ + GetIamPolicyRequest.prototype.resource = ""; + + /** + * GetIamPolicyRequest options. + * @member {google.iam.v1.IGetPolicyOptions|null|undefined} options + * @memberof google.iam.v1.GetIamPolicyRequest + * @instance + */ + GetIamPolicyRequest.prototype.options = null; + + /** + * Creates a new GetIamPolicyRequest instance using the specified properties. + * @function create + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {google.iam.v1.IGetIamPolicyRequest=} [properties] Properties to set + * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest instance + */ + GetIamPolicyRequest.create = function create(properties) { + return new GetIamPolicyRequest(properties); + }; + + /** + * Encodes the specified GetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {google.iam.v1.IGetIamPolicyRequest} message GetIamPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIamPolicyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.iam.v1.GetPolicyOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {google.iam.v1.IGetIamPolicyRequest} message GetIamPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIamPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetIamPolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIamPolicyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.GetIamPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.resource = reader.string(); + break; + } + case 2: { + message.options = $root.google.iam.v1.GetPolicyOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetIamPolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIamPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetIamPolicyRequest message. + * @function verify + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetIamPolicyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.iam.v1.GetPolicyOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a GetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest + */ + GetIamPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.GetIamPolicyRequest) + return object; + var message = new $root.google.iam.v1.GetIamPolicyRequest(); + if (object.resource != null) + message.resource = String(object.resource); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.iam.v1.GetIamPolicyRequest.options: object expected"); + message.options = $root.google.iam.v1.GetPolicyOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a GetIamPolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {google.iam.v1.GetIamPolicyRequest} message GetIamPolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetIamPolicyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.resource = ""; + object.options = null; + } + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.iam.v1.GetPolicyOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this GetIamPolicyRequest to JSON. + * @function toJSON + * @memberof google.iam.v1.GetIamPolicyRequest + * @instance + * @returns {Object.} JSON object + */ + GetIamPolicyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetIamPolicyRequest + * @function getTypeUrl + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetIamPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.GetIamPolicyRequest"; + }; + + return GetIamPolicyRequest; + })(); + + v1.TestIamPermissionsRequest = (function() { + + /** + * Properties of a TestIamPermissionsRequest. + * @memberof google.iam.v1 + * @interface ITestIamPermissionsRequest + * @property {string|null} [resource] TestIamPermissionsRequest resource + * @property {Array.|null} [permissions] TestIamPermissionsRequest permissions + */ + + /** + * Constructs a new TestIamPermissionsRequest. + * @memberof google.iam.v1 + * @classdesc Represents a TestIamPermissionsRequest. + * @implements ITestIamPermissionsRequest + * @constructor + * @param {google.iam.v1.ITestIamPermissionsRequest=} [properties] Properties to set + */ + function TestIamPermissionsRequest(properties) { + this.permissions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TestIamPermissionsRequest resource. + * @member {string} resource + * @memberof google.iam.v1.TestIamPermissionsRequest + * @instance + */ + TestIamPermissionsRequest.prototype.resource = ""; + + /** + * TestIamPermissionsRequest permissions. + * @member {Array.} permissions + * @memberof google.iam.v1.TestIamPermissionsRequest + * @instance + */ + TestIamPermissionsRequest.prototype.permissions = $util.emptyArray; + + /** + * Creates a new TestIamPermissionsRequest instance using the specified properties. + * @function create + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {google.iam.v1.ITestIamPermissionsRequest=} [properties] Properties to set + * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest instance + */ + TestIamPermissionsRequest.create = function create(properties) { + return new TestIamPermissionsRequest(properties); + }; + + /** + * Encodes the specified TestIamPermissionsRequest message. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {google.iam.v1.ITestIamPermissionsRequest} message TestIamPermissionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestIamPermissionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); + if (message.permissions != null && message.permissions.length) + for (var i = 0; i < message.permissions.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.permissions[i]); + return writer; + }; + + /** + * Encodes the specified TestIamPermissionsRequest message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {google.iam.v1.ITestIamPermissionsRequest} message TestIamPermissionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestIamPermissionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TestIamPermissionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestIamPermissionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.TestIamPermissionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.resource = reader.string(); + break; + } + case 2: { + if (!(message.permissions && message.permissions.length)) + message.permissions = []; + message.permissions.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TestIamPermissionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestIamPermissionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TestIamPermissionsRequest message. + * @function verify + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TestIamPermissionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.permissions != null && message.hasOwnProperty("permissions")) { + if (!Array.isArray(message.permissions)) + return "permissions: array expected"; + for (var i = 0; i < message.permissions.length; ++i) + if (!$util.isString(message.permissions[i])) + return "permissions: string[] expected"; + } + return null; + }; + + /** + * Creates a TestIamPermissionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest + */ + TestIamPermissionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.TestIamPermissionsRequest) + return object; + var message = new $root.google.iam.v1.TestIamPermissionsRequest(); + if (object.resource != null) + message.resource = String(object.resource); + if (object.permissions) { + if (!Array.isArray(object.permissions)) + throw TypeError(".google.iam.v1.TestIamPermissionsRequest.permissions: array expected"); + message.permissions = []; + for (var i = 0; i < object.permissions.length; ++i) + message.permissions[i] = String(object.permissions[i]); + } + return message; + }; + + /** + * Creates a plain object from a TestIamPermissionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {google.iam.v1.TestIamPermissionsRequest} message TestIamPermissionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TestIamPermissionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.permissions = []; + if (options.defaults) + object.resource = ""; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.permissions && message.permissions.length) { + object.permissions = []; + for (var j = 0; j < message.permissions.length; ++j) + object.permissions[j] = message.permissions[j]; + } + return object; + }; + + /** + * Converts this TestIamPermissionsRequest to JSON. + * @function toJSON + * @memberof google.iam.v1.TestIamPermissionsRequest + * @instance + * @returns {Object.} JSON object + */ + TestIamPermissionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TestIamPermissionsRequest + * @function getTypeUrl + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TestIamPermissionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.TestIamPermissionsRequest"; + }; + + return TestIamPermissionsRequest; + })(); + + v1.TestIamPermissionsResponse = (function() { + + /** + * Properties of a TestIamPermissionsResponse. + * @memberof google.iam.v1 + * @interface ITestIamPermissionsResponse + * @property {Array.|null} [permissions] TestIamPermissionsResponse permissions + */ + + /** + * Constructs a new TestIamPermissionsResponse. + * @memberof google.iam.v1 + * @classdesc Represents a TestIamPermissionsResponse. + * @implements ITestIamPermissionsResponse + * @constructor + * @param {google.iam.v1.ITestIamPermissionsResponse=} [properties] Properties to set + */ + function TestIamPermissionsResponse(properties) { + this.permissions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TestIamPermissionsResponse permissions. + * @member {Array.} permissions + * @memberof google.iam.v1.TestIamPermissionsResponse + * @instance + */ + TestIamPermissionsResponse.prototype.permissions = $util.emptyArray; + + /** + * Creates a new TestIamPermissionsResponse instance using the specified properties. + * @function create + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {google.iam.v1.ITestIamPermissionsResponse=} [properties] Properties to set + * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse instance + */ + TestIamPermissionsResponse.create = function create(properties) { + return new TestIamPermissionsResponse(properties); + }; + + /** + * Encodes the specified TestIamPermissionsResponse message. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {google.iam.v1.ITestIamPermissionsResponse} message TestIamPermissionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestIamPermissionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.permissions != null && message.permissions.length) + for (var i = 0; i < message.permissions.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.permissions[i]); + return writer; + }; + + /** + * Encodes the specified TestIamPermissionsResponse message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {google.iam.v1.ITestIamPermissionsResponse} message TestIamPermissionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestIamPermissionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TestIamPermissionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestIamPermissionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.TestIamPermissionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.permissions && message.permissions.length)) + message.permissions = []; + message.permissions.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TestIamPermissionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestIamPermissionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TestIamPermissionsResponse message. + * @function verify + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TestIamPermissionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.permissions != null && message.hasOwnProperty("permissions")) { + if (!Array.isArray(message.permissions)) + return "permissions: array expected"; + for (var i = 0; i < message.permissions.length; ++i) + if (!$util.isString(message.permissions[i])) + return "permissions: string[] expected"; + } + return null; + }; + + /** + * Creates a TestIamPermissionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse + */ + TestIamPermissionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.TestIamPermissionsResponse) + return object; + var message = new $root.google.iam.v1.TestIamPermissionsResponse(); + if (object.permissions) { + if (!Array.isArray(object.permissions)) + throw TypeError(".google.iam.v1.TestIamPermissionsResponse.permissions: array expected"); + message.permissions = []; + for (var i = 0; i < object.permissions.length; ++i) + message.permissions[i] = String(object.permissions[i]); + } + return message; + }; + + /** + * Creates a plain object from a TestIamPermissionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {google.iam.v1.TestIamPermissionsResponse} message TestIamPermissionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TestIamPermissionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.permissions = []; + if (message.permissions && message.permissions.length) { + object.permissions = []; + for (var j = 0; j < message.permissions.length; ++j) + object.permissions[j] = message.permissions[j]; + } + return object; + }; + + /** + * Converts this TestIamPermissionsResponse to JSON. + * @function toJSON + * @memberof google.iam.v1.TestIamPermissionsResponse + * @instance + * @returns {Object.} JSON object + */ + TestIamPermissionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TestIamPermissionsResponse + * @function getTypeUrl + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TestIamPermissionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.TestIamPermissionsResponse"; + }; + + return TestIamPermissionsResponse; + })(); + + v1.GetPolicyOptions = (function() { + + /** + * Properties of a GetPolicyOptions. + * @memberof google.iam.v1 + * @interface IGetPolicyOptions + * @property {number|null} [requestedPolicyVersion] GetPolicyOptions requestedPolicyVersion + */ + + /** + * Constructs a new GetPolicyOptions. + * @memberof google.iam.v1 + * @classdesc Represents a GetPolicyOptions. + * @implements IGetPolicyOptions + * @constructor + * @param {google.iam.v1.IGetPolicyOptions=} [properties] Properties to set + */ + function GetPolicyOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetPolicyOptions requestedPolicyVersion. + * @member {number} requestedPolicyVersion + * @memberof google.iam.v1.GetPolicyOptions + * @instance + */ + GetPolicyOptions.prototype.requestedPolicyVersion = 0; + + /** + * Creates a new GetPolicyOptions instance using the specified properties. + * @function create + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {google.iam.v1.IGetPolicyOptions=} [properties] Properties to set + * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions instance + */ + GetPolicyOptions.create = function create(properties) { + return new GetPolicyOptions(properties); + }; + + /** + * Encodes the specified GetPolicyOptions message. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {google.iam.v1.IGetPolicyOptions} message GetPolicyOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPolicyOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.requestedPolicyVersion != null && Object.hasOwnProperty.call(message, "requestedPolicyVersion")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.requestedPolicyVersion); + return writer; + }; + + /** + * Encodes the specified GetPolicyOptions message, length delimited. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {google.iam.v1.IGetPolicyOptions} message GetPolicyOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPolicyOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetPolicyOptions message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPolicyOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.GetPolicyOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.requestedPolicyVersion = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetPolicyOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPolicyOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetPolicyOptions message. + * @function verify + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPolicyOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.requestedPolicyVersion != null && message.hasOwnProperty("requestedPolicyVersion")) + if (!$util.isInteger(message.requestedPolicyVersion)) + return "requestedPolicyVersion: integer expected"; + return null; + }; + + /** + * Creates a GetPolicyOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions + */ + GetPolicyOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.GetPolicyOptions) + return object; + var message = new $root.google.iam.v1.GetPolicyOptions(); + if (object.requestedPolicyVersion != null) + message.requestedPolicyVersion = object.requestedPolicyVersion | 0; + return message; + }; + + /** + * Creates a plain object from a GetPolicyOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {google.iam.v1.GetPolicyOptions} message GetPolicyOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPolicyOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.requestedPolicyVersion = 0; + if (message.requestedPolicyVersion != null && message.hasOwnProperty("requestedPolicyVersion")) + object.requestedPolicyVersion = message.requestedPolicyVersion; + return object; + }; + + /** + * Converts this GetPolicyOptions to JSON. + * @function toJSON + * @memberof google.iam.v1.GetPolicyOptions + * @instance + * @returns {Object.} JSON object + */ + GetPolicyOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetPolicyOptions + * @function getTypeUrl + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetPolicyOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.GetPolicyOptions"; + }; + + return GetPolicyOptions; + })(); + + v1.Policy = (function() { + + /** + * Properties of a Policy. + * @memberof google.iam.v1 + * @interface IPolicy + * @property {number|null} [version] Policy version + * @property {Array.|null} [bindings] Policy bindings + * @property {Array.|null} [auditConfigs] Policy auditConfigs + * @property {Uint8Array|null} [etag] Policy etag + */ + + /** + * Constructs a new Policy. + * @memberof google.iam.v1 + * @classdesc Represents a Policy. + * @implements IPolicy + * @constructor + * @param {google.iam.v1.IPolicy=} [properties] Properties to set + */ + function Policy(properties) { + this.bindings = []; + this.auditConfigs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Policy version. + * @member {number} version + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.version = 0; + + /** + * Policy bindings. + * @member {Array.} bindings + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.bindings = $util.emptyArray; + + /** + * Policy auditConfigs. + * @member {Array.} auditConfigs + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.auditConfigs = $util.emptyArray; + + /** + * Policy etag. + * @member {Uint8Array} etag + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.etag = $util.newBuffer([]); + + /** + * Creates a new Policy instance using the specified properties. + * @function create + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.IPolicy=} [properties] Properties to set + * @returns {google.iam.v1.Policy} Policy instance + */ + Policy.create = function create(properties) { + return new Policy(properties); + }; + + /** + * Encodes the specified Policy message. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.IPolicy} message Policy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Policy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.version); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.etag); + if (message.bindings != null && message.bindings.length) + for (var i = 0; i < message.bindings.length; ++i) + $root.google.iam.v1.Binding.encode(message.bindings[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.auditConfigs != null && message.auditConfigs.length) + for (var i = 0; i < message.auditConfigs.length; ++i) + $root.google.iam.v1.AuditConfig.encode(message.auditConfigs[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Policy message, length delimited. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.IPolicy} message Policy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Policy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Policy message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.Policy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.Policy} Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Policy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Policy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = reader.int32(); + break; + } + case 4: { + if (!(message.bindings && message.bindings.length)) + message.bindings = []; + message.bindings.push($root.google.iam.v1.Binding.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.auditConfigs && message.auditConfigs.length)) + message.auditConfigs = []; + message.auditConfigs.push($root.google.iam.v1.AuditConfig.decode(reader, reader.uint32())); + break; + } + case 3: { + message.etag = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Policy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.Policy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.Policy} Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Policy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Policy message. + * @function verify + * @memberof google.iam.v1.Policy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Policy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version)) + return "version: integer expected"; + if (message.bindings != null && message.hasOwnProperty("bindings")) { + if (!Array.isArray(message.bindings)) + return "bindings: array expected"; + for (var i = 0; i < message.bindings.length; ++i) { + var error = $root.google.iam.v1.Binding.verify(message.bindings[i]); + if (error) + return "bindings." + error; + } + } + if (message.auditConfigs != null && message.hasOwnProperty("auditConfigs")) { + if (!Array.isArray(message.auditConfigs)) + return "auditConfigs: array expected"; + for (var i = 0; i < message.auditConfigs.length; ++i) { + var error = $root.google.iam.v1.AuditConfig.verify(message.auditConfigs[i]); + if (error) + return "auditConfigs." + error; + } + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!(message.etag && typeof message.etag.length === "number" || $util.isString(message.etag))) + return "etag: buffer expected"; + return null; + }; + + /** + * Creates a Policy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.Policy + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.Policy} Policy + */ + Policy.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.Policy) + return object; + var message = new $root.google.iam.v1.Policy(); + if (object.version != null) + message.version = object.version | 0; + if (object.bindings) { + if (!Array.isArray(object.bindings)) + throw TypeError(".google.iam.v1.Policy.bindings: array expected"); + message.bindings = []; + for (var i = 0; i < object.bindings.length; ++i) { + if (typeof object.bindings[i] !== "object") + throw TypeError(".google.iam.v1.Policy.bindings: object expected"); + message.bindings[i] = $root.google.iam.v1.Binding.fromObject(object.bindings[i]); + } + } + if (object.auditConfigs) { + if (!Array.isArray(object.auditConfigs)) + throw TypeError(".google.iam.v1.Policy.auditConfigs: array expected"); + message.auditConfigs = []; + for (var i = 0; i < object.auditConfigs.length; ++i) { + if (typeof object.auditConfigs[i] !== "object") + throw TypeError(".google.iam.v1.Policy.auditConfigs: object expected"); + message.auditConfigs[i] = $root.google.iam.v1.AuditConfig.fromObject(object.auditConfigs[i]); + } + } + if (object.etag != null) + if (typeof object.etag === "string") + $util.base64.decode(object.etag, message.etag = $util.newBuffer($util.base64.length(object.etag)), 0); + else if (object.etag.length >= 0) + message.etag = object.etag; + return message; + }; + + /** + * Creates a plain object from a Policy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.Policy} message Policy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Policy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.bindings = []; + object.auditConfigs = []; + } + if (options.defaults) { + object.version = 0; + if (options.bytes === String) + object.etag = ""; + else { + object.etag = []; + if (options.bytes !== Array) + object.etag = $util.newBuffer(object.etag); + } + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = options.bytes === String ? $util.base64.encode(message.etag, 0, message.etag.length) : options.bytes === Array ? Array.prototype.slice.call(message.etag) : message.etag; + if (message.bindings && message.bindings.length) { + object.bindings = []; + for (var j = 0; j < message.bindings.length; ++j) + object.bindings[j] = $root.google.iam.v1.Binding.toObject(message.bindings[j], options); + } + if (message.auditConfigs && message.auditConfigs.length) { + object.auditConfigs = []; + for (var j = 0; j < message.auditConfigs.length; ++j) + object.auditConfigs[j] = $root.google.iam.v1.AuditConfig.toObject(message.auditConfigs[j], options); + } + return object; + }; + + /** + * Converts this Policy to JSON. + * @function toJSON + * @memberof google.iam.v1.Policy + * @instance + * @returns {Object.} JSON object + */ + Policy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Policy + * @function getTypeUrl + * @memberof google.iam.v1.Policy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Policy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.Policy"; + }; + + return Policy; + })(); + + v1.Binding = (function() { + + /** + * Properties of a Binding. + * @memberof google.iam.v1 + * @interface IBinding + * @property {string|null} [role] Binding role + * @property {Array.|null} [members] Binding members + * @property {google.type.IExpr|null} [condition] Binding condition + */ + + /** + * Constructs a new Binding. + * @memberof google.iam.v1 + * @classdesc Represents a Binding. + * @implements IBinding + * @constructor + * @param {google.iam.v1.IBinding=} [properties] Properties to set + */ + function Binding(properties) { + this.members = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Binding role. + * @member {string} role + * @memberof google.iam.v1.Binding + * @instance + */ + Binding.prototype.role = ""; + + /** + * Binding members. + * @member {Array.} members + * @memberof google.iam.v1.Binding + * @instance + */ + Binding.prototype.members = $util.emptyArray; + + /** + * Binding condition. + * @member {google.type.IExpr|null|undefined} condition + * @memberof google.iam.v1.Binding + * @instance + */ + Binding.prototype.condition = null; + + /** + * Creates a new Binding instance using the specified properties. + * @function create + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.IBinding=} [properties] Properties to set + * @returns {google.iam.v1.Binding} Binding instance + */ + Binding.create = function create(properties) { + return new Binding(properties); + }; + + /** + * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.IBinding} message Binding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Binding.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.role); + if (message.members != null && message.members.length) + for (var i = 0; i < message.members.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.members[i]); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.IBinding} message Binding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Binding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Binding message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.Binding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.Binding} Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Binding.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Binding(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.role = reader.string(); + break; + } + case 2: { + if (!(message.members && message.members.length)) + message.members = []; + message.members.push(reader.string()); + break; + } + case 3: { + message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Binding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.Binding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.Binding} Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Binding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Binding message. + * @function verify + * @memberof google.iam.v1.Binding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Binding.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.role != null && message.hasOwnProperty("role")) + if (!$util.isString(message.role)) + return "role: string expected"; + if (message.members != null && message.hasOwnProperty("members")) { + if (!Array.isArray(message.members)) + return "members: array expected"; + for (var i = 0; i < message.members.length; ++i) + if (!$util.isString(message.members[i])) + return "members: string[] expected"; + } + if (message.condition != null && message.hasOwnProperty("condition")) { + var error = $root.google.type.Expr.verify(message.condition); + if (error) + return "condition." + error; + } + return null; + }; + + /** + * Creates a Binding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.Binding + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.Binding} Binding + */ + Binding.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.Binding) + return object; + var message = new $root.google.iam.v1.Binding(); + if (object.role != null) + message.role = String(object.role); + if (object.members) { + if (!Array.isArray(object.members)) + throw TypeError(".google.iam.v1.Binding.members: array expected"); + message.members = []; + for (var i = 0; i < object.members.length; ++i) + message.members[i] = String(object.members[i]); + } + if (object.condition != null) { + if (typeof object.condition !== "object") + throw TypeError(".google.iam.v1.Binding.condition: object expected"); + message.condition = $root.google.type.Expr.fromObject(object.condition); + } + return message; + }; + + /** + * Creates a plain object from a Binding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.Binding} message Binding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Binding.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.members = []; + if (options.defaults) { + object.role = ""; + object.condition = null; + } + if (message.role != null && message.hasOwnProperty("role")) + object.role = message.role; + if (message.members && message.members.length) { + object.members = []; + for (var j = 0; j < message.members.length; ++j) + object.members[j] = message.members[j]; + } + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = $root.google.type.Expr.toObject(message.condition, options); + return object; + }; + + /** + * Converts this Binding to JSON. + * @function toJSON + * @memberof google.iam.v1.Binding + * @instance + * @returns {Object.} JSON object + */ + Binding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Binding + * @function getTypeUrl + * @memberof google.iam.v1.Binding + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Binding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.Binding"; + }; + + return Binding; + })(); + + v1.AuditConfig = (function() { + + /** + * Properties of an AuditConfig. + * @memberof google.iam.v1 + * @interface IAuditConfig + * @property {string|null} [service] AuditConfig service + * @property {Array.|null} [auditLogConfigs] AuditConfig auditLogConfigs + */ + + /** + * Constructs a new AuditConfig. + * @memberof google.iam.v1 + * @classdesc Represents an AuditConfig. + * @implements IAuditConfig + * @constructor + * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set + */ + function AuditConfig(properties) { + this.auditLogConfigs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuditConfig service. + * @member {string} service + * @memberof google.iam.v1.AuditConfig + * @instance + */ + AuditConfig.prototype.service = ""; + + /** + * AuditConfig auditLogConfigs. + * @member {Array.} auditLogConfigs + * @memberof google.iam.v1.AuditConfig + * @instance + */ + AuditConfig.prototype.auditLogConfigs = $util.emptyArray; + + /** + * Creates a new AuditConfig instance using the specified properties. + * @function create + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set + * @returns {google.iam.v1.AuditConfig} AuditConfig instance + */ + AuditConfig.create = function create(properties) { + return new AuditConfig(properties); + }; + + /** + * Encodes the specified AuditConfig message. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); + if (message.auditLogConfigs != null && message.auditLogConfigs.length) + for (var i = 0; i < message.auditLogConfigs.length; ++i) + $root.google.iam.v1.AuditLogConfig.encode(message.auditLogConfigs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuditConfig message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.AuditConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.AuditConfig} AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.service = reader.string(); + break; + } + case 3: { + if (!(message.auditLogConfigs && message.auditLogConfigs.length)) + message.auditLogConfigs = []; + message.auditLogConfigs.push($root.google.iam.v1.AuditLogConfig.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuditConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.AuditConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.AuditConfig} AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuditConfig message. + * @function verify + * @memberof google.iam.v1.AuditConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuditConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + if (message.auditLogConfigs != null && message.hasOwnProperty("auditLogConfigs")) { + if (!Array.isArray(message.auditLogConfigs)) + return "auditLogConfigs: array expected"; + for (var i = 0; i < message.auditLogConfigs.length; ++i) { + var error = $root.google.iam.v1.AuditLogConfig.verify(message.auditLogConfigs[i]); + if (error) + return "auditLogConfigs." + error; + } + } + return null; + }; + + /** + * Creates an AuditConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.AuditConfig + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.AuditConfig} AuditConfig + */ + AuditConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.AuditConfig) + return object; + var message = new $root.google.iam.v1.AuditConfig(); + if (object.service != null) + message.service = String(object.service); + if (object.auditLogConfigs) { + if (!Array.isArray(object.auditLogConfigs)) + throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: array expected"); + message.auditLogConfigs = []; + for (var i = 0; i < object.auditLogConfigs.length; ++i) { + if (typeof object.auditLogConfigs[i] !== "object") + throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: object expected"); + message.auditLogConfigs[i] = $root.google.iam.v1.AuditLogConfig.fromObject(object.auditLogConfigs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AuditConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.AuditConfig} message AuditConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuditConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.auditLogConfigs = []; + if (options.defaults) + object.service = ""; + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + if (message.auditLogConfigs && message.auditLogConfigs.length) { + object.auditLogConfigs = []; + for (var j = 0; j < message.auditLogConfigs.length; ++j) + object.auditLogConfigs[j] = $root.google.iam.v1.AuditLogConfig.toObject(message.auditLogConfigs[j], options); + } + return object; + }; + + /** + * Converts this AuditConfig to JSON. + * @function toJSON + * @memberof google.iam.v1.AuditConfig + * @instance + * @returns {Object.} JSON object + */ + AuditConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AuditConfig + * @function getTypeUrl + * @memberof google.iam.v1.AuditConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuditConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.AuditConfig"; + }; + + return AuditConfig; + })(); + + v1.AuditLogConfig = (function() { + + /** + * Properties of an AuditLogConfig. + * @memberof google.iam.v1 + * @interface IAuditLogConfig + * @property {google.iam.v1.AuditLogConfig.LogType|null} [logType] AuditLogConfig logType + * @property {Array.|null} [exemptedMembers] AuditLogConfig exemptedMembers + */ + + /** + * Constructs a new AuditLogConfig. + * @memberof google.iam.v1 + * @classdesc Represents an AuditLogConfig. + * @implements IAuditLogConfig + * @constructor + * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set + */ + function AuditLogConfig(properties) { + this.exemptedMembers = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuditLogConfig logType. + * @member {google.iam.v1.AuditLogConfig.LogType} logType + * @memberof google.iam.v1.AuditLogConfig + * @instance + */ + AuditLogConfig.prototype.logType = 0; + + /** + * AuditLogConfig exemptedMembers. + * @member {Array.} exemptedMembers + * @memberof google.iam.v1.AuditLogConfig + * @instance + */ + AuditLogConfig.prototype.exemptedMembers = $util.emptyArray; + + /** + * Creates a new AuditLogConfig instance using the specified properties. + * @function create + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig instance + */ + AuditLogConfig.create = function create(properties) { + return new AuditLogConfig(properties); + }; + + /** + * Encodes the specified AuditLogConfig message. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditLogConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.logType); + if (message.exemptedMembers != null && message.exemptedMembers.length) + for (var i = 0; i < message.exemptedMembers.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.exemptedMembers[i]); + return writer; + }; + + /** + * Encodes the specified AuditLogConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditLogConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuditLogConfig message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditLogConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditLogConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.logType = reader.int32(); + break; + } + case 2: { + if (!(message.exemptedMembers && message.exemptedMembers.length)) + message.exemptedMembers = []; + message.exemptedMembers.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuditLogConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditLogConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuditLogConfig message. + * @function verify + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuditLogConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.logType != null && message.hasOwnProperty("logType")) + switch (message.logType) { + default: + return "logType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.exemptedMembers != null && message.hasOwnProperty("exemptedMembers")) { + if (!Array.isArray(message.exemptedMembers)) + return "exemptedMembers: array expected"; + for (var i = 0; i < message.exemptedMembers.length; ++i) + if (!$util.isString(message.exemptedMembers[i])) + return "exemptedMembers: string[] expected"; + } + return null; + }; + + /** + * Creates an AuditLogConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig + */ + AuditLogConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.AuditLogConfig) + return object; + var message = new $root.google.iam.v1.AuditLogConfig(); + switch (object.logType) { + case "LOG_TYPE_UNSPECIFIED": + case 0: + message.logType = 0; + break; + case "ADMIN_READ": + case 1: + message.logType = 1; + break; + case "DATA_WRITE": + case 2: + message.logType = 2; + break; + case "DATA_READ": + case 3: + message.logType = 3; + break; + } + if (object.exemptedMembers) { + if (!Array.isArray(object.exemptedMembers)) + throw TypeError(".google.iam.v1.AuditLogConfig.exemptedMembers: array expected"); + message.exemptedMembers = []; + for (var i = 0; i < object.exemptedMembers.length; ++i) + message.exemptedMembers[i] = String(object.exemptedMembers[i]); + } + return message; + }; + + /** + * Creates a plain object from an AuditLogConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {google.iam.v1.AuditLogConfig} message AuditLogConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuditLogConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.exemptedMembers = []; + if (options.defaults) + object.logType = options.enums === String ? "LOG_TYPE_UNSPECIFIED" : 0; + if (message.logType != null && message.hasOwnProperty("logType")) + object.logType = options.enums === String ? $root.google.iam.v1.AuditLogConfig.LogType[message.logType] : message.logType; + if (message.exemptedMembers && message.exemptedMembers.length) { + object.exemptedMembers = []; + for (var j = 0; j < message.exemptedMembers.length; ++j) + object.exemptedMembers[j] = message.exemptedMembers[j]; + } + return object; + }; + + /** + * Converts this AuditLogConfig to JSON. + * @function toJSON + * @memberof google.iam.v1.AuditLogConfig + * @instance + * @returns {Object.} JSON object + */ + AuditLogConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AuditLogConfig + * @function getTypeUrl + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuditLogConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.AuditLogConfig"; + }; + + /** + * LogType enum. + * @name google.iam.v1.AuditLogConfig.LogType + * @enum {number} + * @property {number} LOG_TYPE_UNSPECIFIED=0 LOG_TYPE_UNSPECIFIED value + * @property {number} ADMIN_READ=1 ADMIN_READ value + * @property {number} DATA_WRITE=2 DATA_WRITE value + * @property {number} DATA_READ=3 DATA_READ value + */ + AuditLogConfig.LogType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOG_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADMIN_READ"] = 1; + values[valuesById[2] = "DATA_WRITE"] = 2; + values[valuesById[3] = "DATA_READ"] = 3; + return values; + })(); + + return AuditLogConfig; + })(); + + v1.PolicyDelta = (function() { + + /** + * Properties of a PolicyDelta. + * @memberof google.iam.v1 + * @interface IPolicyDelta + * @property {Array.|null} [bindingDeltas] PolicyDelta bindingDeltas + * @property {Array.|null} [auditConfigDeltas] PolicyDelta auditConfigDeltas + */ + + /** + * Constructs a new PolicyDelta. + * @memberof google.iam.v1 + * @classdesc Represents a PolicyDelta. + * @implements IPolicyDelta + * @constructor + * @param {google.iam.v1.IPolicyDelta=} [properties] Properties to set + */ + function PolicyDelta(properties) { + this.bindingDeltas = []; + this.auditConfigDeltas = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PolicyDelta bindingDeltas. + * @member {Array.} bindingDeltas + * @memberof google.iam.v1.PolicyDelta + * @instance + */ + PolicyDelta.prototype.bindingDeltas = $util.emptyArray; + + /** + * PolicyDelta auditConfigDeltas. + * @member {Array.} auditConfigDeltas + * @memberof google.iam.v1.PolicyDelta + * @instance + */ + PolicyDelta.prototype.auditConfigDeltas = $util.emptyArray; + + /** + * Creates a new PolicyDelta instance using the specified properties. + * @function create + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.IPolicyDelta=} [properties] Properties to set + * @returns {google.iam.v1.PolicyDelta} PolicyDelta instance + */ + PolicyDelta.create = function create(properties) { + return new PolicyDelta(properties); + }; + + /** + * Encodes the specified PolicyDelta message. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.IPolicyDelta} message PolicyDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PolicyDelta.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bindingDeltas != null && message.bindingDeltas.length) + for (var i = 0; i < message.bindingDeltas.length; ++i) + $root.google.iam.v1.BindingDelta.encode(message.bindingDeltas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.auditConfigDeltas != null && message.auditConfigDeltas.length) + for (var i = 0; i < message.auditConfigDeltas.length; ++i) + $root.google.iam.v1.AuditConfigDelta.encode(message.auditConfigDeltas[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PolicyDelta message, length delimited. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.IPolicyDelta} message PolicyDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PolicyDelta.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PolicyDelta message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.PolicyDelta} PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PolicyDelta.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.PolicyDelta(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.bindingDeltas && message.bindingDeltas.length)) + message.bindingDeltas = []; + message.bindingDeltas.push($root.google.iam.v1.BindingDelta.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.auditConfigDeltas && message.auditConfigDeltas.length)) + message.auditConfigDeltas = []; + message.auditConfigDeltas.push($root.google.iam.v1.AuditConfigDelta.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PolicyDelta message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.PolicyDelta} PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PolicyDelta.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PolicyDelta message. + * @function verify + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PolicyDelta.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bindingDeltas != null && message.hasOwnProperty("bindingDeltas")) { + if (!Array.isArray(message.bindingDeltas)) + return "bindingDeltas: array expected"; + for (var i = 0; i < message.bindingDeltas.length; ++i) { + var error = $root.google.iam.v1.BindingDelta.verify(message.bindingDeltas[i]); + if (error) + return "bindingDeltas." + error; + } + } + if (message.auditConfigDeltas != null && message.hasOwnProperty("auditConfigDeltas")) { + if (!Array.isArray(message.auditConfigDeltas)) + return "auditConfigDeltas: array expected"; + for (var i = 0; i < message.auditConfigDeltas.length; ++i) { + var error = $root.google.iam.v1.AuditConfigDelta.verify(message.auditConfigDeltas[i]); + if (error) + return "auditConfigDeltas." + error; + } + } + return null; + }; + + /** + * Creates a PolicyDelta message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.PolicyDelta} PolicyDelta + */ + PolicyDelta.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.PolicyDelta) + return object; + var message = new $root.google.iam.v1.PolicyDelta(); + if (object.bindingDeltas) { + if (!Array.isArray(object.bindingDeltas)) + throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: array expected"); + message.bindingDeltas = []; + for (var i = 0; i < object.bindingDeltas.length; ++i) { + if (typeof object.bindingDeltas[i] !== "object") + throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: object expected"); + message.bindingDeltas[i] = $root.google.iam.v1.BindingDelta.fromObject(object.bindingDeltas[i]); + } + } + if (object.auditConfigDeltas) { + if (!Array.isArray(object.auditConfigDeltas)) + throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: array expected"); + message.auditConfigDeltas = []; + for (var i = 0; i < object.auditConfigDeltas.length; ++i) { + if (typeof object.auditConfigDeltas[i] !== "object") + throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: object expected"); + message.auditConfigDeltas[i] = $root.google.iam.v1.AuditConfigDelta.fromObject(object.auditConfigDeltas[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a PolicyDelta message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.PolicyDelta} message PolicyDelta + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PolicyDelta.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.bindingDeltas = []; + object.auditConfigDeltas = []; + } + if (message.bindingDeltas && message.bindingDeltas.length) { + object.bindingDeltas = []; + for (var j = 0; j < message.bindingDeltas.length; ++j) + object.bindingDeltas[j] = $root.google.iam.v1.BindingDelta.toObject(message.bindingDeltas[j], options); + } + if (message.auditConfigDeltas && message.auditConfigDeltas.length) { + object.auditConfigDeltas = []; + for (var j = 0; j < message.auditConfigDeltas.length; ++j) + object.auditConfigDeltas[j] = $root.google.iam.v1.AuditConfigDelta.toObject(message.auditConfigDeltas[j], options); + } + return object; + }; + + /** + * Converts this PolicyDelta to JSON. + * @function toJSON + * @memberof google.iam.v1.PolicyDelta + * @instance + * @returns {Object.} JSON object + */ + PolicyDelta.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PolicyDelta + * @function getTypeUrl + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PolicyDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.PolicyDelta"; + }; + + return PolicyDelta; + })(); + + v1.BindingDelta = (function() { + + /** + * Properties of a BindingDelta. + * @memberof google.iam.v1 + * @interface IBindingDelta + * @property {google.iam.v1.BindingDelta.Action|null} [action] BindingDelta action + * @property {string|null} [role] BindingDelta role + * @property {string|null} [member] BindingDelta member + * @property {google.type.IExpr|null} [condition] BindingDelta condition + */ + + /** + * Constructs a new BindingDelta. + * @memberof google.iam.v1 + * @classdesc Represents a BindingDelta. + * @implements IBindingDelta + * @constructor + * @param {google.iam.v1.IBindingDelta=} [properties] Properties to set + */ + function BindingDelta(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BindingDelta action. + * @member {google.iam.v1.BindingDelta.Action} action + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.action = 0; + + /** + * BindingDelta role. + * @member {string} role + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.role = ""; + + /** + * BindingDelta member. + * @member {string} member + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.member = ""; + + /** + * BindingDelta condition. + * @member {google.type.IExpr|null|undefined} condition + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.condition = null; + + /** + * Creates a new BindingDelta instance using the specified properties. + * @function create + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.IBindingDelta=} [properties] Properties to set + * @returns {google.iam.v1.BindingDelta} BindingDelta instance + */ + BindingDelta.create = function create(properties) { + return new BindingDelta(properties); + }; + + /** + * Encodes the specified BindingDelta message. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.IBindingDelta} message BindingDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BindingDelta.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.role); + if (message.member != null && Object.hasOwnProperty.call(message, "member")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.member); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BindingDelta message, length delimited. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.IBindingDelta} message BindingDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BindingDelta.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BindingDelta message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.BindingDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.BindingDelta} BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BindingDelta.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.BindingDelta(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.action = reader.int32(); + break; + } + case 2: { + message.role = reader.string(); + break; + } + case 3: { + message.member = reader.string(); + break; + } + case 4: { + message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BindingDelta message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.BindingDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.BindingDelta} BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BindingDelta.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BindingDelta message. + * @function verify + * @memberof google.iam.v1.BindingDelta + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BindingDelta.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.action != null && message.hasOwnProperty("action")) + switch (message.action) { + default: + return "action: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.role != null && message.hasOwnProperty("role")) + if (!$util.isString(message.role)) + return "role: string expected"; + if (message.member != null && message.hasOwnProperty("member")) + if (!$util.isString(message.member)) + return "member: string expected"; + if (message.condition != null && message.hasOwnProperty("condition")) { + var error = $root.google.type.Expr.verify(message.condition); + if (error) + return "condition." + error; + } + return null; + }; + + /** + * Creates a BindingDelta message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.BindingDelta + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.BindingDelta} BindingDelta + */ + BindingDelta.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.BindingDelta) + return object; + var message = new $root.google.iam.v1.BindingDelta(); + switch (object.action) { + case "ACTION_UNSPECIFIED": + case 0: + message.action = 0; + break; + case "ADD": + case 1: + message.action = 1; + break; + case "REMOVE": + case 2: + message.action = 2; + break; + } + if (object.role != null) + message.role = String(object.role); + if (object.member != null) + message.member = String(object.member); + if (object.condition != null) { + if (typeof object.condition !== "object") + throw TypeError(".google.iam.v1.BindingDelta.condition: object expected"); + message.condition = $root.google.type.Expr.fromObject(object.condition); + } + return message; + }; + + /** + * Creates a plain object from a BindingDelta message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.BindingDelta} message BindingDelta + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BindingDelta.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; + object.role = ""; + object.member = ""; + object.condition = null; + } + if (message.action != null && message.hasOwnProperty("action")) + object.action = options.enums === String ? $root.google.iam.v1.BindingDelta.Action[message.action] : message.action; + if (message.role != null && message.hasOwnProperty("role")) + object.role = message.role; + if (message.member != null && message.hasOwnProperty("member")) + object.member = message.member; + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = $root.google.type.Expr.toObject(message.condition, options); + return object; + }; + + /** + * Converts this BindingDelta to JSON. + * @function toJSON + * @memberof google.iam.v1.BindingDelta + * @instance + * @returns {Object.} JSON object + */ + BindingDelta.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BindingDelta + * @function getTypeUrl + * @memberof google.iam.v1.BindingDelta + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BindingDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.BindingDelta"; + }; + + /** + * Action enum. + * @name google.iam.v1.BindingDelta.Action + * @enum {number} + * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value + * @property {number} ADD=1 ADD value + * @property {number} REMOVE=2 REMOVE value + */ + BindingDelta.Action = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADD"] = 1; + values[valuesById[2] = "REMOVE"] = 2; + return values; + })(); + + return BindingDelta; + })(); + + v1.AuditConfigDelta = (function() { + + /** + * Properties of an AuditConfigDelta. + * @memberof google.iam.v1 + * @interface IAuditConfigDelta + * @property {google.iam.v1.AuditConfigDelta.Action|null} [action] AuditConfigDelta action + * @property {string|null} [service] AuditConfigDelta service + * @property {string|null} [exemptedMember] AuditConfigDelta exemptedMember + * @property {string|null} [logType] AuditConfigDelta logType + */ + + /** + * Constructs a new AuditConfigDelta. + * @memberof google.iam.v1 + * @classdesc Represents an AuditConfigDelta. + * @implements IAuditConfigDelta + * @constructor + * @param {google.iam.v1.IAuditConfigDelta=} [properties] Properties to set + */ + function AuditConfigDelta(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuditConfigDelta action. + * @member {google.iam.v1.AuditConfigDelta.Action} action + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.action = 0; + + /** + * AuditConfigDelta service. + * @member {string} service + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.service = ""; + + /** + * AuditConfigDelta exemptedMember. + * @member {string} exemptedMember + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.exemptedMember = ""; + + /** + * AuditConfigDelta logType. + * @member {string} logType + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.logType = ""; + + /** + * Creates a new AuditConfigDelta instance using the specified properties. + * @function create + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.IAuditConfigDelta=} [properties] Properties to set + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta instance + */ + AuditConfigDelta.create = function create(properties) { + return new AuditConfigDelta(properties); + }; + + /** + * Encodes the specified AuditConfigDelta message. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.IAuditConfigDelta} message AuditConfigDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfigDelta.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.service); + if (message.exemptedMember != null && Object.hasOwnProperty.call(message, "exemptedMember")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.exemptedMember); + if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.logType); + return writer; + }; + + /** + * Encodes the specified AuditConfigDelta message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.IAuditConfigDelta} message AuditConfigDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfigDelta.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfigDelta.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfigDelta(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.action = reader.int32(); + break; + } + case 2: { + message.service = reader.string(); + break; + } + case 3: { + message.exemptedMember = reader.string(); + break; + } + case 4: { + message.logType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfigDelta.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuditConfigDelta message. + * @function verify + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuditConfigDelta.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.action != null && message.hasOwnProperty("action")) + switch (message.action) { + default: + return "action: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) + if (!$util.isString(message.exemptedMember)) + return "exemptedMember: string expected"; + if (message.logType != null && message.hasOwnProperty("logType")) + if (!$util.isString(message.logType)) + return "logType: string expected"; + return null; + }; + + /** + * Creates an AuditConfigDelta message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta + */ + AuditConfigDelta.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.AuditConfigDelta) + return object; + var message = new $root.google.iam.v1.AuditConfigDelta(); + switch (object.action) { + case "ACTION_UNSPECIFIED": + case 0: + message.action = 0; + break; + case "ADD": + case 1: + message.action = 1; + break; + case "REMOVE": + case 2: + message.action = 2; + break; + } + if (object.service != null) + message.service = String(object.service); + if (object.exemptedMember != null) + message.exemptedMember = String(object.exemptedMember); + if (object.logType != null) + message.logType = String(object.logType); + return message; + }; + + /** + * Creates a plain object from an AuditConfigDelta message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.AuditConfigDelta} message AuditConfigDelta + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuditConfigDelta.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; + object.service = ""; + object.exemptedMember = ""; + object.logType = ""; + } + if (message.action != null && message.hasOwnProperty("action")) + object.action = options.enums === String ? $root.google.iam.v1.AuditConfigDelta.Action[message.action] : message.action; + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) + object.exemptedMember = message.exemptedMember; + if (message.logType != null && message.hasOwnProperty("logType")) + object.logType = message.logType; + return object; + }; + + /** + * Converts this AuditConfigDelta to JSON. + * @function toJSON + * @memberof google.iam.v1.AuditConfigDelta + * @instance + * @returns {Object.} JSON object + */ + AuditConfigDelta.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AuditConfigDelta + * @function getTypeUrl + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuditConfigDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.AuditConfigDelta"; + }; + + /** + * Action enum. + * @name google.iam.v1.AuditConfigDelta.Action + * @enum {number} + * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value + * @property {number} ADD=1 ADD value + * @property {number} REMOVE=2 REMOVE value + */ + AuditConfigDelta.Action = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADD"] = 1; + values[valuesById[2] = "REMOVE"] = 2; + return values; + })(); + + return AuditConfigDelta; + })(); + + return v1; + })(); + + return iam; + })(); + + google.type = (function() { + + /** + * Namespace type. + * @memberof google + * @namespace + */ + var type = {}; + + type.Expr = (function() { + + /** + * Properties of an Expr. + * @memberof google.type + * @interface IExpr + * @property {string|null} [expression] Expr expression + * @property {string|null} [title] Expr title + * @property {string|null} [description] Expr description + * @property {string|null} [location] Expr location + */ + + /** + * Constructs a new Expr. + * @memberof google.type + * @classdesc Represents an Expr. + * @implements IExpr + * @constructor + * @param {google.type.IExpr=} [properties] Properties to set + */ + function Expr(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Expr expression. + * @member {string} expression + * @memberof google.type.Expr + * @instance + */ + Expr.prototype.expression = ""; + + /** + * Expr title. + * @member {string} title + * @memberof google.type.Expr + * @instance + */ + Expr.prototype.title = ""; + + /** + * Expr description. + * @member {string} description + * @memberof google.type.Expr + * @instance + */ + Expr.prototype.description = ""; + + /** + * Expr location. + * @member {string} location + * @memberof google.type.Expr + * @instance + */ + Expr.prototype.location = ""; + + /** + * Creates a new Expr instance using the specified properties. + * @function create + * @memberof google.type.Expr + * @static + * @param {google.type.IExpr=} [properties] Properties to set + * @returns {google.type.Expr} Expr instance + */ + Expr.create = function create(properties) { + return new Expr(properties); + }; + + /** + * Encodes the specified Expr message. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * @function encode + * @memberof google.type.Expr + * @static + * @param {google.type.IExpr} message Expr message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Expr.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.expression != null && Object.hasOwnProperty.call(message, "expression")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.expression); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.location); + return writer; + }; + + /** + * Encodes the specified Expr message, length delimited. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * @function encodeDelimited + * @memberof google.type.Expr + * @static + * @param {google.type.IExpr} message Expr message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Expr.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Expr message from the specified reader or buffer. + * @function decode + * @memberof google.type.Expr + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.type.Expr} Expr + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Expr.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Expr(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.expression = reader.string(); + break; + } + case 2: { + message.title = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + message.location = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Expr message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.type.Expr + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.type.Expr} Expr + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Expr.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Expr message. + * @function verify + * @memberof google.type.Expr + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Expr.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.expression != null && message.hasOwnProperty("expression")) + if (!$util.isString(message.expression)) + return "expression: string expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + return null; + }; + + /** + * Creates an Expr message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.type.Expr + * @static + * @param {Object.} object Plain object + * @returns {google.type.Expr} Expr + */ + Expr.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.Expr) + return object; + var message = new $root.google.type.Expr(); + if (object.expression != null) + message.expression = String(object.expression); + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + if (object.location != null) + message.location = String(object.location); + return message; + }; + + /** + * Creates a plain object from an Expr message. Also converts values to other types if specified. + * @function toObject + * @memberof google.type.Expr + * @static + * @param {google.type.Expr} message Expr + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Expr.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.expression = ""; + object.title = ""; + object.description = ""; + object.location = ""; + } + if (message.expression != null && message.hasOwnProperty("expression")) + object.expression = message.expression; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + return object; + }; + + /** + * Converts this Expr to JSON. + * @function toJSON + * @memberof google.type.Expr + * @instance + * @returns {Object.} JSON object + */ + Expr.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Expr + * @function getTypeUrl + * @memberof google.type.Expr + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Expr.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.Expr"; + }; + + return Expr; + })(); + + return type; + })(); + google.longrunning = (function() { /** diff --git a/packages/google-cloud-dataplex/protos/protos.json b/packages/google-cloud-dataplex/protos/protos.json index 5d120a46639..f5fb6c0d56f 100644 --- a/packages/google-cloud-dataplex/protos/protos.json +++ b/packages/google-cloud-dataplex/protos/protos.json @@ -1366,13 +1366,19 @@ "options": { "(google.api.http).post": "/v1/{parent=projects/*/locations/*/lakes/*}/contentitems", "(google.api.http).body": "content", + "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*/lakes/*}/content", + "(google.api.http).additional_bindings.body": "content", "(google.api.method_signature)": "parent,content" }, "parsedOptions": [ { "(google.api.http)": { "post": "/v1/{parent=projects/*/locations/*/lakes/*}/contentitems", - "body": "content" + "body": "content", + "additional_bindings": { + "post": "/v1/{parent=projects/*/locations/*/lakes/*}/content", + "body": "content" + } } }, { @@ -1386,13 +1392,19 @@ "options": { "(google.api.http).patch": "/v1/{content.name=projects/*/locations/*/lakes/*/contentitems/**}", "(google.api.http).body": "content", + "(google.api.http).additional_bindings.patch": "/v1/{content.name=projects/*/locations/*/lakes/*/content/**}", + "(google.api.http).additional_bindings.body": "content", "(google.api.method_signature)": "content,update_mask" }, "parsedOptions": [ { "(google.api.http)": { "patch": "/v1/{content.name=projects/*/locations/*/lakes/*/contentitems/**}", - "body": "content" + "body": "content", + "additional_bindings": { + "patch": "/v1/{content.name=projects/*/locations/*/lakes/*/content/**}", + "body": "content" + } } }, { @@ -1405,12 +1417,16 @@ "responseType": "google.protobuf.Empty", "options": { "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*/contentitems/**}", + "(google.api.http).additional_bindings.delete": "/v1/{name=projects/*/locations/*/lakes/*/content/**}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/lakes/*/contentitems/**}" + "delete": "/v1/{name=projects/*/locations/*/lakes/*/contentitems/**}", + "additional_bindings": { + "delete": "/v1/{name=projects/*/locations/*/lakes/*/content/**}" + } } }, { @@ -1423,12 +1439,16 @@ "responseType": "Content", "options": { "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/contentitems/**}", + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/lakes/*/content/**}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/lakes/*/contentitems/**}" + "get": "/v1/{name=projects/*/locations/*/lakes/*/contentitems/**}", + "additional_bindings": { + "get": "/v1/{name=projects/*/locations/*/lakes/*/content/**}" + } } }, { @@ -1436,17 +1456,87 @@ } ] }, + "GetIamPolicy": { + "requestType": "google.iam.v1.GetIamPolicyRequest", + "responseType": "google.iam.v1.Policy", + "options": { + "(google.api.http).get": "/v1/{resource=projects/*/locations/*/lakes/*/contentitems/**}:getIamPolicy", + "(google.api.http).additional_bindings.get": "/v1/{resource=projects/*/locations/*/lakes/*/content/**}:getIamPolicy", + "(google.api.method_signature)": "resource" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{resource=projects/*/locations/*/lakes/*/contentitems/**}:getIamPolicy", + "additional_bindings": { + "get": "/v1/{resource=projects/*/locations/*/lakes/*/content/**}:getIamPolicy" + } + } + }, + { + "(google.api.method_signature)": "resource" + } + ] + }, + "SetIamPolicy": { + "requestType": "google.iam.v1.SetIamPolicyRequest", + "responseType": "google.iam.v1.Policy", + "options": { + "(google.api.http).post": "/v1/{resource=projects/*/locations/*/lakes/*/contentitems/**}:setIamPolicy", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{resource=projects/*/locations/*/lakes/*/content/**}:setIamPolicy", + "(google.api.http).additional_bindings.body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=projects/*/locations/*/lakes/*/contentitems/**}:setIamPolicy", + "body": "*", + "additional_bindings": { + "post": "/v1/{resource=projects/*/locations/*/lakes/*/content/**}:setIamPolicy", + "body": "*" + } + } + } + ] + }, + "TestIamPermissions": { + "requestType": "google.iam.v1.TestIamPermissionsRequest", + "responseType": "google.iam.v1.TestIamPermissionsResponse", + "options": { + "(google.api.http).post": "/v1/{resource=projects/*/locations/*/lakes/*/contentitems/**}:testIamPermissions", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{resource=projects/*/locations/*/lakes/*/content/**}:testIamPermissions", + "(google.api.http).additional_bindings.body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=projects/*/locations/*/lakes/*/contentitems/**}:testIamPermissions", + "body": "*", + "additional_bindings": { + "post": "/v1/{resource=projects/*/locations/*/lakes/*/content/**}:testIamPermissions", + "body": "*" + } + } + } + ] + }, "ListContent": { "requestType": "ListContentRequest", "responseType": "ListContentResponse", "options": { "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*}/contentitems", + "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*/lakes/*}/content", "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/lakes/*}/contentitems" + "get": "/v1/{parent=projects/*/locations/*/lakes/*}/contentitems", + "additional_bindings": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*}/content" + } } }, { @@ -1700,6 +1790,11 @@ "type": { "type": "EntityType", "id": 3 + }, + "sampledDataLocations": { + "rule": "repeated", + "type": "string", + "id": 4 } } }, @@ -4384,6 +4479,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -4485,6 +4587,13 @@ "(google.api.field_behavior)": "REQUIRED" } }, + "executionStatus": { + "type": "ExecutionStatus", + "id": 201, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, "spark": { "type": "SparkTaskConfig", "id": 300 @@ -4544,6 +4653,13 @@ }, "ContainerImageRuntime": { "fields": { + "image": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "javaJars": { "rule": "repeated", "type": "string", @@ -4678,12 +4794,26 @@ "(google.api.field_behavior)": "REQUIRED" } }, + "project": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "maxJobExecutionLifetime": { "type": "google.protobuf.Duration", "id": 8, "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "kmsKey": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -4744,6 +4874,24 @@ } } } + }, + "ExecutionStatus": { + "fields": { + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "latestJob": { + "type": "Job", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } } } }, @@ -6009,9 +6157,6 @@ } } }, - "Empty": { - "fields": {} - }, "FieldMask": { "fields": { "paths": { @@ -6021,6 +6166,9 @@ } } }, + "Empty": { + "fields": {} + }, "Any": { "fields": { "type_url": { @@ -6035,6 +6183,332 @@ } } }, + "iam": { + "nested": { + "v1": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.Cloud.Iam.V1", + "go_package": "google.golang.org/genproto/googleapis/iam/v1;iam", + "java_multiple_files": true, + "java_outer_classname": "PolicyProto", + "java_package": "com.google.iam.v1", + "php_namespace": "Google\\Cloud\\Iam\\V1" + }, + "nested": { + "IAMPolicy": { + "options": { + "(google.api.default_host)": "iam-meta-api.googleapis.com" + }, + "methods": { + "SetIamPolicy": { + "requestType": "SetIamPolicyRequest", + "responseType": "Policy", + "options": { + "(google.api.http).post": "/v1/{resource=**}:setIamPolicy", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=**}:setIamPolicy", + "body": "*" + } + } + ] + }, + "GetIamPolicy": { + "requestType": "GetIamPolicyRequest", + "responseType": "Policy", + "options": { + "(google.api.http).post": "/v1/{resource=**}:getIamPolicy", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=**}:getIamPolicy", + "body": "*" + } + } + ] + }, + "TestIamPermissions": { + "requestType": "TestIamPermissionsRequest", + "responseType": "TestIamPermissionsResponse", + "options": { + "(google.api.http).post": "/v1/{resource=**}:testIamPermissions", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=**}:testIamPermissions", + "body": "*" + } + } + ] + } + } + }, + "SetIamPolicyRequest": { + "fields": { + "resource": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "*" + } + }, + "policy": { + "type": "Policy", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 3 + } + } + }, + "GetIamPolicyRequest": { + "fields": { + "resource": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "*" + } + }, + "options": { + "type": "GetPolicyOptions", + "id": 2 + } + } + }, + "TestIamPermissionsRequest": { + "fields": { + "resource": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "*" + } + }, + "permissions": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "TestIamPermissionsResponse": { + "fields": { + "permissions": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "GetPolicyOptions": { + "fields": { + "requestedPolicyVersion": { + "type": "int32", + "id": 1 + } + } + }, + "Policy": { + "fields": { + "version": { + "type": "int32", + "id": 1 + }, + "bindings": { + "rule": "repeated", + "type": "Binding", + "id": 4 + }, + "auditConfigs": { + "rule": "repeated", + "type": "AuditConfig", + "id": 6 + }, + "etag": { + "type": "bytes", + "id": 3 + } + } + }, + "Binding": { + "fields": { + "role": { + "type": "string", + "id": 1 + }, + "members": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "condition": { + "type": "google.type.Expr", + "id": 3 + } + } + }, + "AuditConfig": { + "fields": { + "service": { + "type": "string", + "id": 1 + }, + "auditLogConfigs": { + "rule": "repeated", + "type": "AuditLogConfig", + "id": 3 + } + } + }, + "AuditLogConfig": { + "fields": { + "logType": { + "type": "LogType", + "id": 1 + }, + "exemptedMembers": { + "rule": "repeated", + "type": "string", + "id": 2 + } + }, + "nested": { + "LogType": { + "values": { + "LOG_TYPE_UNSPECIFIED": 0, + "ADMIN_READ": 1, + "DATA_WRITE": 2, + "DATA_READ": 3 + } + } + } + }, + "PolicyDelta": { + "fields": { + "bindingDeltas": { + "rule": "repeated", + "type": "BindingDelta", + "id": 1 + }, + "auditConfigDeltas": { + "rule": "repeated", + "type": "AuditConfigDelta", + "id": 2 + } + } + }, + "BindingDelta": { + "fields": { + "action": { + "type": "Action", + "id": 1 + }, + "role": { + "type": "string", + "id": 2 + }, + "member": { + "type": "string", + "id": 3 + }, + "condition": { + "type": "google.type.Expr", + "id": 4 + } + }, + "nested": { + "Action": { + "values": { + "ACTION_UNSPECIFIED": 0, + "ADD": 1, + "REMOVE": 2 + } + } + } + }, + "AuditConfigDelta": { + "fields": { + "action": { + "type": "Action", + "id": 1 + }, + "service": { + "type": "string", + "id": 2 + }, + "exemptedMember": { + "type": "string", + "id": 3 + }, + "logType": { + "type": "string", + "id": 4 + } + }, + "nested": { + "Action": { + "values": { + "ACTION_UNSPECIFIED": 0, + "ADD": 1, + "REMOVE": 2 + } + } + } + } + } + } + } + }, + "type": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/type/expr;expr", + "java_multiple_files": true, + "java_outer_classname": "ExprProto", + "java_package": "com.google.type", + "objc_class_prefix": "GTP" + }, + "nested": { + "Expr": { + "fields": { + "expression": { + "type": "string", + "id": 1 + }, + "title": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "location": { + "type": "string", + "id": 4 + } + } + } + } + }, "longrunning": { "options": { "cc_enable_arenas": true, diff --git a/packages/google-cloud-dataplex/samples/generated/v1/content_service.create_content.js b/packages/google-cloud-dataplex/samples/generated/v1/content_service.create_content.js index ea0b0bea127..ec4d206392b 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/content_service.create_content.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/content_service.create_content.js @@ -23,6 +23,9 @@ function main(parent, content) { // [START dataplex_v1_generated_ContentService_CreateContent_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/content_service.delete_content.js b/packages/google-cloud-dataplex/samples/generated/v1/content_service.delete_content.js index fcfd8557fc5..22db9057302 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/content_service.delete_content.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/content_service.delete_content.js @@ -23,6 +23,9 @@ function main(name) { // [START dataplex_v1_generated_ContentService_DeleteContent_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/content_service.get_content.js b/packages/google-cloud-dataplex/samples/generated/v1/content_service.get_content.js index f764da78cf3..d7612fab50c 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/content_service.get_content.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/content_service.get_content.js @@ -23,6 +23,9 @@ function main(name) { // [START dataplex_v1_generated_ContentService_GetContent_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/content_service.get_iam_policy.js b/packages/google-cloud-dataplex/samples/generated/v1/content_service.get_iam_policy.js new file mode 100644 index 00000000000..f538076d21a --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/content_service.get_iam_policy.js @@ -0,0 +1,67 @@ +// Copyright 2022 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(resource) { + // [START dataplex_v1_generated_ContentService_GetIamPolicy_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + */ + // const resource = 'abc123' + /** + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + */ + // const options = {} + + // Imports the Dataplex library + const {ContentServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new ContentServiceClient(); + + async function callGetIamPolicy() { + // Construct request + const request = { + resource, + }; + + // Run request + const response = await dataplexClient.getIamPolicy(request); + console.log(response); + } + + callGetIamPolicy(); + // [END dataplex_v1_generated_ContentService_GetIamPolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/content_service.list_content.js b/packages/google-cloud-dataplex/samples/generated/v1/content_service.list_content.js index b2d9b3012cf..cb0300dbe05 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/content_service.list_content.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/content_service.list_content.js @@ -23,6 +23,9 @@ function main(parent) { // [START dataplex_v1_generated_ContentService_ListContent_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/content_service.set_iam_policy.js b/packages/google-cloud-dataplex/samples/generated/v1/content_service.set_iam_policy.js new file mode 100644 index 00000000000..f2421b864ad --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/content_service.set_iam_policy.js @@ -0,0 +1,77 @@ +// Copyright 2022 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(resource, policy) { + // [START dataplex_v1_generated_ContentService_SetIamPolicy_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + */ + // const resource = 'abc123' + /** + * REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + */ + // const policy = {} + /** + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * `paths: "bindings, etag"` + */ + // const updateMask = {} + + // Imports the Dataplex library + const {ContentServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new ContentServiceClient(); + + async function callSetIamPolicy() { + // Construct request + const request = { + resource, + policy, + }; + + // Run request + const response = await dataplexClient.setIamPolicy(request); + console.log(response); + } + + callSetIamPolicy(); + // [END dataplex_v1_generated_ContentService_SetIamPolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/content_service.test_iam_permissions.js b/packages/google-cloud-dataplex/samples/generated/v1/content_service.test_iam_permissions.js new file mode 100644 index 00000000000..f4685074825 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/content_service.test_iam_permissions.js @@ -0,0 +1,70 @@ +// Copyright 2022 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(resource, permissions) { + // [START dataplex_v1_generated_ContentService_TestIamPermissions_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + */ + // const resource = 'abc123' + /** + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * IAM Overview (https://cloud.google.com/iam/docs/overview#permissions). + */ + // const permissions = 'abc123' + + // Imports the Dataplex library + const {ContentServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new ContentServiceClient(); + + async function callTestIamPermissions() { + // Construct request + const request = { + resource, + permissions, + }; + + // Run request + const response = await dataplexClient.testIamPermissions(request); + console.log(response); + } + + callTestIamPermissions(); + // [END dataplex_v1_generated_ContentService_TestIamPermissions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/content_service.update_content.js b/packages/google-cloud-dataplex/samples/generated/v1/content_service.update_content.js index ec422bd66dc..8107980f7c8 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/content_service.update_content.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/content_service.update_content.js @@ -23,6 +23,9 @@ function main(updateMask, content) { // [START dataplex_v1_generated_ContentService_UpdateContent_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.cancel_job.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.cancel_job.js index 23751532a41..8cffe5aed58 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.cancel_job.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.cancel_job.js @@ -23,6 +23,9 @@ function main(name) { // [START dataplex_v1_generated_DataplexService_CancelJob_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_asset.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_asset.js index a86586e13d1..ea1fcce951b 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_asset.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_asset.js @@ -23,11 +23,14 @@ function main(parent, assetId, asset) { // [START dataplex_v1_generated_DataplexService_CreateAsset_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}` + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_environment.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_environment.js index 200ca0e2ae1..4e99824a165 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_environment.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_environment.js @@ -23,11 +23,14 @@ function main(parent, environmentId, environment) { // [START dataplex_v1_generated_DataplexService_CreateEnvironment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** * Required. The resource name of the parent lake: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id} + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_lake.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_lake.js index 8d861479ac7..1d1e9ca2910 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_lake.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_lake.js @@ -23,6 +23,9 @@ function main(parent, lakeId, lake) { // [START dataplex_v1_generated_DataplexService_CreateLake_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_task.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_task.js index c5fc710ee7f..5762e40649f 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_task.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_task.js @@ -23,6 +23,9 @@ function main(parent, taskId, task) { // [START dataplex_v1_generated_DataplexService_CreateTask_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_zone.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_zone.js index d97fbd3f8ce..c97a98de7e5 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_zone.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_zone.js @@ -23,6 +23,9 @@ function main(parent, zoneId, zone) { // [START dataplex_v1_generated_DataplexService_CreateZone_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_asset.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_asset.js index 9123efaab5e..e64a56e0700 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_asset.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_asset.js @@ -23,6 +23,9 @@ function main(name) { // [START dataplex_v1_generated_DataplexService_DeleteAsset_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_environment.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_environment.js index a69276fa96f..1b81c1673f2 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_environment.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_environment.js @@ -23,11 +23,14 @@ function main(name) { // [START dataplex_v1_generated_DataplexService_DeleteEnvironment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** * Required. The resource name of the environment: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}` + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. */ // const name = 'abc123' diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_lake.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_lake.js index 801282553f6..500261f4ed2 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_lake.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_lake.js @@ -23,11 +23,14 @@ function main(name) { // [START dataplex_v1_generated_DataplexService_DeleteLake_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** * Required. The resource name of the lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}` + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. */ // const name = 'abc123' diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_task.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_task.js index 1d9f516fa4c..cce7ae1a443 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_task.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_task.js @@ -23,6 +23,9 @@ function main(name) { // [START dataplex_v1_generated_DataplexService_DeleteTask_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_zone.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_zone.js index 7119523710a..d95d8bde695 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_zone.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_zone.js @@ -23,6 +23,9 @@ function main(name) { // [START dataplex_v1_generated_DataplexService_DeleteZone_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_asset.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_asset.js index c53e3d0b7e8..e3516a03fa6 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_asset.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_asset.js @@ -23,6 +23,9 @@ function main(name) { // [START dataplex_v1_generated_DataplexService_GetAsset_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_environment.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_environment.js index deb017ff68e..7973b26944a 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_environment.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_environment.js @@ -23,11 +23,14 @@ function main(name) { // [START dataplex_v1_generated_DataplexService_GetEnvironment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** * Required. The resource name of the environment: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id} + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. */ // const name = 'abc123' diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_job.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_job.js index 387b871eef6..53c41858fa3 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_job.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_job.js @@ -23,6 +23,9 @@ function main(name) { // [START dataplex_v1_generated_DataplexService_GetJob_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_lake.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_lake.js index 5d16908eef0..51748ccc384 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_lake.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_lake.js @@ -23,6 +23,9 @@ function main(name) { // [START dataplex_v1_generated_DataplexService_GetLake_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_task.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_task.js index 2a3a831d1d7..1273ace4170 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_task.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_task.js @@ -23,11 +23,14 @@ function main(name) { // [START dataplex_v1_generated_DataplexService_GetTask_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** * Required. The resource name of the task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}` + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. */ // const name = 'abc123' diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_zone.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_zone.js index 578f2e6d29d..24eb3820927 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_zone.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_zone.js @@ -23,6 +23,9 @@ function main(name) { // [START dataplex_v1_generated_DataplexService_GetZone_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_asset_actions.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_asset_actions.js index c000841dc75..976c3c9b68d 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_asset_actions.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_asset_actions.js @@ -23,6 +23,9 @@ function main(parent) { // [START dataplex_v1_generated_DataplexService_ListAssetActions_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_assets.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_assets.js index 832ea7f92ed..fdccf0f0221 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_assets.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_assets.js @@ -23,6 +23,9 @@ function main(parent) { // [START dataplex_v1_generated_DataplexService_ListAssets_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_environments.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_environments.js index 5b2414766fe..3535419f93c 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_environments.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_environments.js @@ -23,11 +23,14 @@ function main(parent) { // [START dataplex_v1_generated_DataplexService_ListEnvironments_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** * Required. The resource name of the parent lake: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id} + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_jobs.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_jobs.js index fbadfe5df23..e5ecf3a696f 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_jobs.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_jobs.js @@ -23,6 +23,9 @@ function main(parent) { // [START dataplex_v1_generated_DataplexService_ListJobs_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lake_actions.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lake_actions.js index 7f62261c7b7..7a086e30410 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lake_actions.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lake_actions.js @@ -23,11 +23,14 @@ function main(parent) { // [START dataplex_v1_generated_DataplexService_ListLakeActions_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}` + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lakes.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lakes.js index c0663d5ff04..bb74f9a9d85 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lakes.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lakes.js @@ -23,6 +23,9 @@ function main(parent) { // [START dataplex_v1_generated_DataplexService_ListLakes_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_sessions.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_sessions.js index 66b3b38cc26..6800957e1c3 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_sessions.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_sessions.js @@ -23,11 +23,14 @@ function main(parent) { // [START dataplex_v1_generated_DataplexService_ListSessions_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** * Required. The resource name of the parent environment: - * projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id} + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. */ // const parent = 'abc123' /** @@ -43,6 +46,17 @@ function main(parent) { * token. */ // const pageToken = 'abc123' + /** + * Optional. Filter request. The following `mode` filter is supported to return only the + * sessions belonging to the requester when the mode is USER and return + * sessions of all the users when the mode is ADMIN. When no filter is sent + * default to USER mode. + * NOTE: When the mode is ADMIN, the requester should have + * `dataplex.environments.listAllSessions` permission to list all sessions, + * in absence of the permission, the request fails. + * mode = ADMIN | USER + */ + // const filter = 'abc123' // Imports the Dataplex library const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_tasks.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_tasks.js index 543cc975515..61506b45db2 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_tasks.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_tasks.js @@ -23,6 +23,9 @@ function main(parent) { // [START dataplex_v1_generated_DataplexService_ListTasks_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zone_actions.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zone_actions.js index 43c286aedf8..d55fd4712ba 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zone_actions.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zone_actions.js @@ -23,6 +23,9 @@ function main(parent) { // [START dataplex_v1_generated_DataplexService_ListZoneActions_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zones.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zones.js index 8bb2e9385e6..4af5791ed2b 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zones.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zones.js @@ -23,6 +23,9 @@ function main(parent) { // [START dataplex_v1_generated_DataplexService_ListZones_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_asset.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_asset.js index 8c487e03abe..236e023a083 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_asset.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_asset.js @@ -23,6 +23,9 @@ function main(updateMask, asset) { // [START dataplex_v1_generated_DataplexService_UpdateAsset_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_environment.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_environment.js index 785a5321d67..69dadebf3b2 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_environment.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_environment.js @@ -23,6 +23,9 @@ function main(updateMask, environment) { // [START dataplex_v1_generated_DataplexService_UpdateEnvironment_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_lake.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_lake.js index f95b7d70e40..5f780c4ad14 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_lake.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_lake.js @@ -23,6 +23,9 @@ function main(updateMask, lake) { // [START dataplex_v1_generated_DataplexService_UpdateLake_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_task.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_task.js index b839272f3bf..201b61bbae1 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_task.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_task.js @@ -23,6 +23,9 @@ function main(updateMask, task) { // [START dataplex_v1_generated_DataplexService_UpdateTask_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_zone.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_zone.js index 7b9c53f740b..c52e94795a3 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_zone.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_zone.js @@ -23,6 +23,9 @@ function main(updateMask, zone) { // [START dataplex_v1_generated_DataplexService_UpdateZone_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.create_entity.js b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.create_entity.js index 0383927d8c5..ba4ff6117da 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.create_entity.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.create_entity.js @@ -23,6 +23,9 @@ function main(parent, entity) { // [START dataplex_v1_generated_MetadataService_CreateEntity_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.create_partition.js b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.create_partition.js index c4e18644908..9e0753beb53 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.create_partition.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.create_partition.js @@ -23,6 +23,9 @@ function main(parent, partition) { // [START dataplex_v1_generated_MetadataService_CreatePartition_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.delete_entity.js b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.delete_entity.js index c3bfc47340a..90eddaa1cdd 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.delete_entity.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.delete_entity.js @@ -23,6 +23,9 @@ function main(name, etag) { // [START dataplex_v1_generated_MetadataService_DeleteEntity_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** @@ -31,7 +34,8 @@ function main(name, etag) { */ // const name = 'abc123' /** - * Required. The etag associated with the partition if it was previously retrieved. + * Required. The etag associated with the entity, which can be retrieved with a + * GetEntity request. */ // const etag = 'abc123' diff --git a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.delete_partition.js b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.delete_partition.js index 2a99d9720a8..51d605a8594 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.delete_partition.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.delete_partition.js @@ -23,6 +23,9 @@ function main(name) { // [START dataplex_v1_generated_MetadataService_DeletePartition_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** @@ -34,7 +37,7 @@ function main(name) { */ // const name = 'abc123' /** - * Optional. The etag associated with the partition if it was previously retrieved. + * Optional. The etag associated with the partition. */ // const etag = 'abc123' diff --git a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_entity.js b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_entity.js index 88e563fd11a..47c5db0d785 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_entity.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_entity.js @@ -23,6 +23,9 @@ function main(name) { // [START dataplex_v1_generated_MetadataService_GetEntity_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_partition.js b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_partition.js index e10c8834d86..f34e5bf8ced 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_partition.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_partition.js @@ -23,6 +23,9 @@ function main(name) { // [START dataplex_v1_generated_MetadataService_GetPartition_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_entities.js b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_entities.js index 3606de8c730..2f876cb7df0 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_entities.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_entities.js @@ -23,6 +23,9 @@ function main(parent, view) { // [START dataplex_v1_generated_MetadataService_ListEntities_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** @@ -53,8 +56,8 @@ function main(parent, view) { * - Entity ID: ?filter="id=entityID" * - Asset ID: ?filter="asset=assetID" * - Data path ?filter="data_path=gs://my-bucket" - * - Is HIVE compatible: ?filter=”hive_compatible=true” - * - Is BigQuery compatible: ?filter=”bigquery_compatible=true” + * - Is HIVE compatible: ?filter="hive_compatible=true" + * - Is BigQuery compatible: ?filter="bigquery_compatible=true" */ // const filter = 'abc123' diff --git a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_partitions.js b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_partitions.js index b6fb79daa94..5ac9dda4d10 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_partitions.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_partitions.js @@ -23,6 +23,9 @@ function main(parent) { // [START dataplex_v1_generated_MetadataService_ListPartitions_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** @@ -44,13 +47,13 @@ function main(parent) { */ // const pageToken = 'abc123' /** - * Optional. Filter the partitions returned to the caller using a key vslue pair - * expression. The filter expression supports: - * - logical operators: AND, OR + * Optional. Filter the partitions returned to the caller using a key value pair + * expression. Supported operators and syntax: + * - logic operators: AND, OR * - comparison operators: <, >, >=, <= ,=, != * - LIKE operators: - * - The right hand of a LIKE operator supports “.” and - * “*” for wildcard searches, for example "value1 LIKE ".*oo.*" + * - The right hand of a LIKE operator supports "." and + * "*" for wildcard searches, for example "value1 LIKE ".*oo.*" * - parenthetical grouping: ( ) * Sample filter expression: `?filter="key1 < value1 OR key2 > value2" * **Notes:** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.update_entity.js b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.update_entity.js index 5096d58c95a..d506f7527b4 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.update_entity.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.update_entity.js @@ -23,6 +23,9 @@ function main(entity) { // [START dataplex_v1_generated_MetadataService_UpdateEntity_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json b/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json index 82ac0888308..dfb9f6d04e1 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json +++ b/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 61, + "end": 64, "type": "FULL" } ], @@ -70,7 +70,7 @@ "segments": [ { "start": 25, - "end": 61, + "end": 64, "type": "FULL" } ], @@ -118,7 +118,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -158,7 +158,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 58, "type": "FULL" } ], @@ -191,6 +191,142 @@ } } }, + { + "regionTag": "dataplex_v1_generated_ContentService_GetIamPolicy_async", + "title": "ContentService getIamPolicy Sample", + "origin": "API_DEFINITION", + "description": " Gets the access control policy for a contentitem resource. A `NOT_FOUND` error is returned if the resource does not exist. An empty policy is returned if the resource exists but does not have a policy set on it. Caller must have Google IAM `dataplex.content.getIamPolicy` permission on the resource.", + "canonical": true, + "file": "content_service.get_iam_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetIamPolicy", + "fullName": "google.cloud.dataplex.v1.ContentService.GetIamPolicy", + "async": true, + "parameters": [ + { + "name": "resource", + "type": "TYPE_STRING" + }, + { + "name": "options", + "type": ".google.iam.v1.GetPolicyOptions" + } + ], + "resultType": ".google.iam.v1.Policy", + "client": { + "shortName": "ContentServiceClient", + "fullName": "google.cloud.dataplex.v1.ContentServiceClient" + }, + "method": { + "shortName": "GetIamPolicy", + "fullName": "google.cloud.dataplex.v1.ContentService.GetIamPolicy", + "service": { + "shortName": "ContentService", + "fullName": "google.cloud.dataplex.v1.ContentService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_ContentService_SetIamPolicy_async", + "title": "ContentService setIamPolicy Sample", + "origin": "API_DEFINITION", + "description": " Sets the access control policy on the specified contentitem resource. Replaces any existing policy. Caller must have Google IAM `dataplex.content.setIamPolicy` permission on the resource.", + "canonical": true, + "file": "content_service.set_iam_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetIamPolicy", + "fullName": "google.cloud.dataplex.v1.ContentService.SetIamPolicy", + "async": true, + "parameters": [ + { + "name": "resource", + "type": "TYPE_STRING" + }, + { + "name": "policy", + "type": ".google.iam.v1.Policy" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.iam.v1.Policy", + "client": { + "shortName": "ContentServiceClient", + "fullName": "google.cloud.dataplex.v1.ContentServiceClient" + }, + "method": { + "shortName": "SetIamPolicy", + "fullName": "google.cloud.dataplex.v1.ContentService.SetIamPolicy", + "service": { + "shortName": "ContentService", + "fullName": "google.cloud.dataplex.v1.ContentService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_ContentService_TestIamPermissions_async", + "title": "ContentService testIamPermissions Sample", + "origin": "API_DEFINITION", + "description": " Returns the caller's permissions on a resource. If the resource does not exist, an empty set of permissions is returned (a `NOT_FOUND` error is not returned). A caller is not required to have Google IAM permission to make this request. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "canonical": true, + "file": "content_service.test_iam_permissions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "TestIamPermissions", + "fullName": "google.cloud.dataplex.v1.ContentService.TestIamPermissions", + "async": true, + "parameters": [ + { + "name": "resource", + "type": "TYPE_STRING" + }, + { + "name": "permissions", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.iam.v1.TestIamPermissionsResponse", + "client": { + "shortName": "ContentServiceClient", + "fullName": "google.cloud.dataplex.v1.ContentServiceClient" + }, + "method": { + "shortName": "TestIamPermissions", + "fullName": "google.cloud.dataplex.v1.ContentService.TestIamPermissions", + "service": { + "shortName": "ContentService", + "fullName": "google.cloud.dataplex.v1.ContentService" + } + } + } + }, { "regionTag": "dataplex_v1_generated_ContentService_ListContent_async", "title": "ContentService listContent Sample", @@ -202,7 +338,7 @@ "segments": [ { "start": 25, - "end": 76, + "end": 79, "type": "FULL" } ], @@ -254,7 +390,7 @@ "segments": [ { "start": 25, - "end": 75, + "end": 78, "type": "FULL" } ], @@ -306,7 +442,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 65, "type": "FULL" } ], @@ -354,7 +490,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -394,7 +530,7 @@ "segments": [ { "start": 25, - "end": 74, + "end": 77, "type": "FULL" } ], @@ -450,7 +586,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -490,7 +626,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], @@ -538,7 +674,7 @@ "segments": [ { "start": 25, - "end": 75, + "end": 78, "type": "FULL" } ], @@ -590,7 +726,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 65, "type": "FULL" } ], @@ -638,7 +774,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -678,7 +814,7 @@ "segments": [ { "start": 25, - "end": 73, + "end": 76, "type": "FULL" } ], @@ -734,7 +870,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -774,7 +910,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], @@ -822,7 +958,7 @@ "segments": [ { "start": 25, - "end": 74, + "end": 77, "type": "FULL" } ], @@ -874,7 +1010,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 65, "type": "FULL" } ], @@ -922,7 +1058,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -962,7 +1098,7 @@ "segments": [ { "start": 25, - "end": 74, + "end": 77, "type": "FULL" } ], @@ -1018,7 +1154,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -1058,7 +1194,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], @@ -1106,7 +1242,7 @@ "segments": [ { "start": 25, - "end": 67, + "end": 70, "type": "FULL" } ], @@ -1158,7 +1294,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 65, "type": "FULL" } ], @@ -1206,7 +1342,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -1246,7 +1382,7 @@ "segments": [ { "start": 25, - "end": 73, + "end": 76, "type": "FULL" } ], @@ -1302,7 +1438,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -1342,7 +1478,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], @@ -1390,7 +1526,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -1430,7 +1566,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -1470,7 +1606,7 @@ "segments": [ { "start": 25, - "end": 72, + "end": 75, "type": "FULL" } ], @@ -1522,7 +1658,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 65, "type": "FULL" } ], @@ -1570,7 +1706,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -1610,7 +1746,7 @@ "segments": [ { "start": 25, - "end": 74, + "end": 77, "type": "FULL" } ], @@ -1666,7 +1802,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -1706,7 +1842,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 80, "type": "FULL" } ], @@ -1726,6 +1862,10 @@ { "name": "page_token", "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" } ], "resultType": ".google.cloud.dataplex.v1.ListSessionsResponse", @@ -1754,7 +1894,7 @@ "segments": [ { "start": 25, - "end": 61, + "end": 64, "type": "FULL" } ], @@ -1802,7 +1942,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 58, "type": "FULL" } ], @@ -1846,7 +1986,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 60, "type": "FULL" } ], @@ -1890,7 +2030,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -1934,7 +2074,7 @@ "segments": [ { "start": 25, - "end": 81, + "end": 84, "type": "FULL" } ], @@ -1990,7 +2130,7 @@ "segments": [ { "start": 25, - "end": 61, + "end": 64, "type": "FULL" } ], @@ -2038,7 +2178,7 @@ "segments": [ { "start": 25, - "end": 58, + "end": 61, "type": "FULL" } ], @@ -2082,7 +2222,7 @@ "segments": [ { "start": 25, - "end": 53, + "end": 56, "type": "FULL" } ], @@ -2122,7 +2262,7 @@ "segments": [ { "start": 25, - "end": 84, + "end": 87, "type": "FULL" } ], diff --git a/packages/google-cloud-dataplex/src/v1/content_service_client.ts b/packages/google-cloud-dataplex/src/v1/content_service_client.ts index 8f3cc1a4190..1896de68bc9 100644 --- a/packages/google-cloud-dataplex/src/v1/content_service_client.ts +++ b/packages/google-cloud-dataplex/src/v1/content_service_client.ts @@ -17,18 +17,18 @@ // ** All changes to this file may be overwritten. ** /* global window */ -import * as gax from 'google-gax'; -import { +import type * as gax from 'google-gax'; +import type { Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall, + LocationsClient, + LocationProtos, } from 'google-gax'; - import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -37,7 +37,6 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './content_service_client_config.json'; - const version = require('../../../package.json').version; /** @@ -62,6 +61,7 @@ export class ContentServiceClient { }; warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; + locationsClient: LocationsClient; pathTemplates: {[name: string]: gax.PathTemplate}; contentServiceStub?: Promise<{[name: string]: Function}>; @@ -97,8 +97,18 @@ export class ContentServiceClient { * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. * For more information, please check the * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. - */ - constructor(opts?: ClientOptions) { + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new ContentServiceClient({fallback: 'rest'}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { // Ensure that options include all the required fields. const staticMembers = this.constructor as typeof ContentServiceClient; const servicePath = @@ -118,8 +128,13 @@ export class ContentServiceClient { opts['scopes'] = staticMembers.scopes; } + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gax.fallback : gax; + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. this._gaxGrpc = new this._gaxModule.GrpcClient(opts); @@ -140,6 +155,10 @@ export class ContentServiceClient { if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; } + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); // Determine the client header string. const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; @@ -231,7 +250,7 @@ export class ContentServiceClient { this.innerApiCalls = {}; // Add a warn function to the client constructor so it can be easily tested. - this.warn = gax.warn; + this.warn = this._gaxModule.warn; } /** @@ -271,6 +290,9 @@ export class ContentServiceClient { 'updateContent', 'deleteContent', 'getContent', + 'getIamPolicy', + 'setIamPolicy', + 'testIamPermissions', 'listContent', ]; for (const methodName of contentServiceStubMethods) { @@ -292,7 +314,8 @@ export class ContentServiceClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -439,8 +462,8 @@ export class ContentServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.createContent(request, options, callback); @@ -530,8 +553,8 @@ export class ContentServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - 'content.name': request.content!.name || '', + this._gaxModule.routingHeader.fromParams({ + 'content.name': request.content!.name ?? '', }); this.initialize(); return this.innerApiCalls.updateContent(request, options, callback); @@ -616,8 +639,8 @@ export class ContentServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - name: request.name || '', + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.deleteContent(request, options, callback); @@ -702,12 +725,301 @@ export class ContentServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - name: request.name || '', + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getContent(request, options, callback); } + /** + * Gets the access control policy for a contentitem resource. A `NOT_FOUND` + * error is returned if the resource does not exist. An empty policy is + * returned if the resource exists but does not have a policy set on it. + * + * Caller must have Google IAM `dataplex.content.getIamPolicy` permission + * on the resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {google.iam.v1.GetPolicyOptions} request.options + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Policy]{@link google.iam.v1.Policy}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/content_service.get_iam_policy.js + * region_tag:dataplex_v1_generated_ContentService_GetIamPolicy_async + */ + getIamPolicy( + request?: protos.google.iam.v1.IGetIamPolicyRequest, + options?: CallOptions + ): Promise< + [ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest | undefined, + {} | undefined + ] + >; + getIamPolicy( + request: protos.google.iam.v1.IGetIamPolicyRequest, + options: CallOptions, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): void; + getIamPolicy( + request: protos.google.iam.v1.IGetIamPolicyRequest, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): void; + getIamPolicy( + request?: protos.google.iam.v1.IGetIamPolicyRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + resource: request.resource ?? '', + }); + this.initialize(); + return this.innerApiCalls.getIamPolicy(request, options, callback); + } + /** + * Sets the access control policy on the specified contentitem resource. + * Replaces any existing policy. + * + * Caller must have Google IAM `dataplex.content.setIamPolicy` permission + * on the resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + * @param {google.iam.v1.Policy} request.policy + * REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + * @param {google.protobuf.FieldMask} request.updateMask + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * + * `paths: "bindings, etag"` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Policy]{@link google.iam.v1.Policy}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/content_service.set_iam_policy.js + * region_tag:dataplex_v1_generated_ContentService_SetIamPolicy_async + */ + setIamPolicy( + request?: protos.google.iam.v1.ISetIamPolicyRequest, + options?: CallOptions + ): Promise< + [ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | undefined, + {} | undefined + ] + >; + setIamPolicy( + request: protos.google.iam.v1.ISetIamPolicyRequest, + options: CallOptions, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): void; + setIamPolicy( + request: protos.google.iam.v1.ISetIamPolicyRequest, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): void; + setIamPolicy( + request?: protos.google.iam.v1.ISetIamPolicyRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + resource: request.resource ?? '', + }); + this.initialize(); + return this.innerApiCalls.setIamPolicy(request, options, callback); + } + /** + * Returns the caller's permissions on a resource. + * If the resource does not exist, an empty set of + * permissions is returned (a `NOT_FOUND` error is not returned). + * + * A caller is not required to have Google IAM permission to make this + * request. + * + * Note: This operation is designed to be used for building permission-aware + * UIs and command-line tools, not for authorization checking. This operation + * may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/content_service.test_iam_permissions.js + * region_tag:dataplex_v1_generated_ContentService_TestIamPermissions_async + */ + testIamPermissions( + request?: protos.google.iam.v1.ITestIamPermissionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | undefined, + {} | undefined + ] + >; + testIamPermissions( + request: protos.google.iam.v1.ITestIamPermissionsRequest, + options: CallOptions, + callback: Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ): void; + testIamPermissions( + request: protos.google.iam.v1.ITestIamPermissionsRequest, + callback: Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ): void; + testIamPermissions( + request?: protos.google.iam.v1.ITestIamPermissionsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + resource: request.resource ?? '', + }); + this.initialize(); + return this.innerApiCalls.testIamPermissions(request, options, callback); + } /** * List content. @@ -811,8 +1123,8 @@ export class ContentServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listContent(request, options, callback); @@ -865,14 +1177,14 @@ export class ContentServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listContent']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listContent.createStream( - this.innerApiCalls.listContent as gax.GaxCall, + this.innerApiCalls.listContent as GaxCall, request, callSettings ); @@ -928,18 +1240,98 @@ export class ContentServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listContent']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listContent.asyncIterate( this.innerApiCalls['listContent'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } + /** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Location]{@link google.cloud.location.Location}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + + /** + * Lists information about the supported locations for this service. Returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Location]{@link google.cloud.location.Location}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + // -------------------- // -- Path templates -- // -------------------- @@ -1994,6 +2386,7 @@ export class ContentServiceClient { return this.contentServiceStub.then(stub => { this._terminated = true; stub.close(); + this.locationsClient.close(); }); } return Promise.resolve(); diff --git a/packages/google-cloud-dataplex/src/v1/content_service_client_config.json b/packages/google-cloud-dataplex/src/v1/content_service_client_config.json index abfbef17bb1..2f8dc65d04f 100644 --- a/packages/google-cloud-dataplex/src/v1/content_service_client_config.json +++ b/packages/google-cloud-dataplex/src/v1/content_service_client_config.json @@ -6,6 +6,9 @@ "idempotent": [ "DEADLINE_EXCEEDED", "UNAVAILABLE" + ], + "unavailable": [ + "UNAVAILABLE" ] }, "retry_params": { @@ -17,28 +20,57 @@ "rpc_timeout_multiplier": 1, "max_rpc_timeout_millis": 60000, "total_timeout_millis": 600000 + }, + "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 } }, "methods": { "CreateContent": { + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "UpdateContent": { + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "DeleteContent": { + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "GetContent": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "SetIamPolicy": { + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, "ListContent": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" } } } diff --git a/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts b/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts index 5b548cae515..8b5350c4f6e 100644 --- a/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts +++ b/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts @@ -17,8 +17,8 @@ // ** All changes to this file may be overwritten. ** /* global window */ -import * as gax from 'google-gax'; -import { +import type * as gax from 'google-gax'; +import type { Callback, CallOptions, Descriptors, @@ -27,10 +27,10 @@ import { LROperation, PaginationCallback, GaxCall, + LocationsClient, + LocationProtos, } from 'google-gax'; - import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -39,15 +39,14 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './dataplex_service_client_config.json'; -import {operationsProtos} from 'google-gax'; const version = require('../../../package.json').version; /** * Dataplex service provides data lakes as a service. The primary resources * offered by this service are Lakes, Zones and Assets which collectively allow - * a data adminstrator to organize, manage, secure and catalog data across their - * organization located across cloud projects in a variety of storage systems - * including Cloud Storage and BigQuery. + * a data administrator to organize, manage, secure and catalog data across + * their organization located across cloud projects in a variety of storage + * systems including Cloud Storage and BigQuery. * @class * @memberof v1 */ @@ -68,6 +67,7 @@ export class DataplexServiceClient { }; warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; + locationsClient: LocationsClient; pathTemplates: {[name: string]: gax.PathTemplate}; operationsClient: gax.OperationsClient; dataplexServiceStub?: Promise<{[name: string]: Function}>; @@ -104,8 +104,18 @@ export class DataplexServiceClient { * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. * For more information, please check the * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. - */ - constructor(opts?: ClientOptions) { + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new DataplexServiceClient({fallback: 'rest'}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { // Ensure that options include all the required fields. const staticMembers = this.constructor as typeof DataplexServiceClient; const servicePath = @@ -125,8 +135,13 @@ export class DataplexServiceClient { opts['scopes'] = staticMembers.scopes; } + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gax.fallback : gax; + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. this._gaxGrpc = new this._gaxModule.GrpcClient(opts); @@ -147,6 +162,10 @@ export class DataplexServiceClient { if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; } + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); // Determine the client header string. const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; @@ -307,9 +326,6 @@ export class DataplexServiceClient { { get: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:getIamPolicy', }, - { - get: '/v1/{resource=projects/*/locations/*/lakes/*/content/*}:getIamPolicy', - }, ], }, { @@ -333,10 +349,6 @@ export class DataplexServiceClient { post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:setIamPolicy', body: '*', }, - { - post: '/v1/{resource=projects/*/locations/*/lakes/*/content/*}:setIamPolicy', - body: '*', - }, ], }, { @@ -360,10 +372,6 @@ export class DataplexServiceClient { post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:testIamPermissions', body: '*', }, - { - post: '/v1/{resource=projects/*/locations/*/lakes/*/content/*}:testIamPermissions', - body: '*', - }, ], }, { @@ -571,7 +579,7 @@ export class DataplexServiceClient { this.innerApiCalls = {}; // Add a warn function to the client constructor so it can be easily tested. - this.warn = gax.warn; + this.warn = this._gaxModule.warn; } /** @@ -662,7 +670,8 @@ export class DataplexServiceClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -802,8 +811,8 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - name: request.name || '', + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getLake(request, options, callback); @@ -886,8 +895,8 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - name: request.name || '', + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getZone(request, options, callback); @@ -970,8 +979,8 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - name: request.name || '', + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getAsset(request, options, callback); @@ -983,7 +992,7 @@ export class DataplexServiceClient { * The request object that will be sent. * @param {string} request.name * Required. The resource name of the task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}` + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1054,8 +1063,8 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - name: request.name || '', + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getTask(request, options, callback); @@ -1138,8 +1147,8 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - name: request.name || '', + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getJob(request, options, callback); @@ -1222,8 +1231,8 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - name: request.name || '', + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.cancelJob(request, options, callback); @@ -1235,7 +1244,7 @@ export class DataplexServiceClient { * The request object that will be sent. * @param {string} request.name * Required. The resource name of the environment: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id} + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1308,8 +1317,8 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - name: request.name || '', + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getEnvironment(request, options, callback); @@ -1428,8 +1437,8 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.createLake(request, options, callback); @@ -1454,14 +1463,15 @@ export class DataplexServiceClient { protos.google.cloud.dataplex.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.createLake, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.dataplex.v1.Lake, @@ -1571,8 +1581,8 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - 'lake.name': request.lake!.name || '', + this._gaxModule.routingHeader.fromParams({ + 'lake.name': request.lake!.name ?? '', }); this.initialize(); return this.innerApiCalls.updateLake(request, options, callback); @@ -1597,14 +1607,15 @@ export class DataplexServiceClient { protos.google.cloud.dataplex.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.updateLake, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.dataplex.v1.Lake, @@ -1619,7 +1630,7 @@ export class DataplexServiceClient { * The request object that will be sent. * @param {string} request.name * Required. The resource name of the lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}` + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1710,8 +1721,8 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - name: request.name || '', + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.deleteLake(request, options, callback); @@ -1736,14 +1747,15 @@ export class DataplexServiceClient { protos.google.cloud.dataplex.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.deleteLake, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.protobuf.Empty, @@ -1863,8 +1875,8 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.createZone(request, options, callback); @@ -1889,14 +1901,15 @@ export class DataplexServiceClient { protos.google.cloud.dataplex.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.createZone, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.dataplex.v1.Zone, @@ -2006,8 +2019,8 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - 'zone.name': request.zone!.name || '', + this._gaxModule.routingHeader.fromParams({ + 'zone.name': request.zone!.name ?? '', }); this.initialize(); return this.innerApiCalls.updateZone(request, options, callback); @@ -2032,14 +2045,15 @@ export class DataplexServiceClient { protos.google.cloud.dataplex.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.updateZone, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.dataplex.v1.Zone, @@ -2145,8 +2159,8 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - name: request.name || '', + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.deleteZone(request, options, callback); @@ -2171,14 +2185,15 @@ export class DataplexServiceClient { protos.google.cloud.dataplex.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.deleteZone, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.protobuf.Empty, @@ -2192,7 +2207,7 @@ export class DataplexServiceClient { * The request object that will be sent. * @param {string} request.parent * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}` + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. * @param {string} request.assetId * Required. Asset identifier. * This ID will be used to generate names such as table names when publishing @@ -2297,8 +2312,8 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.createAsset(request, options, callback); @@ -2323,14 +2338,15 @@ export class DataplexServiceClient { protos.google.cloud.dataplex.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.createAsset, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.dataplex.v1.Asset, @@ -2440,8 +2456,8 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - 'asset.name': request.asset!.name || '', + this._gaxModule.routingHeader.fromParams({ + 'asset.name': request.asset!.name ?? '', }); this.initialize(); return this.innerApiCalls.updateAsset(request, options, callback); @@ -2466,14 +2482,15 @@ export class DataplexServiceClient { protos.google.cloud.dataplex.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.updateAsset, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.dataplex.v1.Asset, @@ -2579,8 +2596,8 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - name: request.name || '', + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.deleteAsset(request, options, callback); @@ -2605,14 +2622,15 @@ export class DataplexServiceClient { protos.google.cloud.dataplex.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.deleteAsset, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.protobuf.Empty, @@ -2724,8 +2742,8 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.createTask(request, options, callback); @@ -2750,14 +2768,15 @@ export class DataplexServiceClient { protos.google.cloud.dataplex.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.createTask, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.dataplex.v1.Task, @@ -2867,8 +2886,8 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - 'task.name': request.task!.name || '', + this._gaxModule.routingHeader.fromParams({ + 'task.name': request.task!.name ?? '', }); this.initialize(); return this.innerApiCalls.updateTask(request, options, callback); @@ -2893,14 +2912,15 @@ export class DataplexServiceClient { protos.google.cloud.dataplex.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.updateTask, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.dataplex.v1.Task, @@ -3005,8 +3025,8 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - name: request.name || '', + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.deleteTask(request, options, callback); @@ -3031,14 +3051,15 @@ export class DataplexServiceClient { protos.google.cloud.dataplex.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.deleteTask, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.protobuf.Empty, @@ -3052,7 +3073,7 @@ export class DataplexServiceClient { * The request object that will be sent. * @param {string} request.parent * Required. The resource name of the parent lake: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id} + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. * @param {string} request.environmentId * Required. Environment identifier. * * Must contain only lowercase letters, numbers and hyphens. @@ -3155,8 +3176,8 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.createEnvironment(request, options, callback); @@ -3181,14 +3202,15 @@ export class DataplexServiceClient { protos.google.cloud.dataplex.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.createEnvironment, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.dataplex.v1.Environment, @@ -3298,8 +3320,8 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - 'environment.name': request.environment!.name || '', + this._gaxModule.routingHeader.fromParams({ + 'environment.name': request.environment!.name ?? '', }); this.initialize(); return this.innerApiCalls.updateEnvironment(request, options, callback); @@ -3324,14 +3346,15 @@ export class DataplexServiceClient { protos.google.cloud.dataplex.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.updateEnvironment, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.dataplex.v1.Environment, @@ -3346,7 +3369,7 @@ export class DataplexServiceClient { * The request object that will be sent. * @param {string} request.name * Required. The resource name of the environment: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}` + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -3437,8 +3460,8 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - name: request.name || '', + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.deleteEnvironment(request, options, callback); @@ -3463,14 +3486,15 @@ export class DataplexServiceClient { protos.google.cloud.dataplex.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.deleteEnvironment, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.protobuf.Empty, @@ -3571,8 +3595,8 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listLakes(request, options, callback); @@ -3619,14 +3643,14 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listLakes']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listLakes.createStream( - this.innerApiCalls.listLakes as gax.GaxCall, + this.innerApiCalls.listLakes as GaxCall, request, callSettings ); @@ -3676,15 +3700,15 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listLakes']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listLakes.asyncIterate( this.innerApiCalls['listLakes'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -3695,7 +3719,7 @@ export class DataplexServiceClient { * The request object that will be sent. * @param {string} request.parent * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}` + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. * @param {number} [request.pageSize] * Optional. Maximum number of actions to return. The service may return fewer than this * value. If unspecified, at most 10 actions will be returned. The maximum @@ -3780,8 +3804,8 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listLakeActions(request, options, callback); @@ -3793,7 +3817,7 @@ export class DataplexServiceClient { * The request object that will be sent. * @param {string} request.parent * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}` + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. * @param {number} [request.pageSize] * Optional. Maximum number of actions to return. The service may return fewer than this * value. If unspecified, at most 10 actions will be returned. The maximum @@ -3824,14 +3848,14 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listLakeActions']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listLakeActions.createStream( - this.innerApiCalls.listLakeActions as gax.GaxCall, + this.innerApiCalls.listLakeActions as GaxCall, request, callSettings ); @@ -3845,7 +3869,7 @@ export class DataplexServiceClient { * The request object that will be sent. * @param {string} request.parent * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}` + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. * @param {number} [request.pageSize] * Optional. Maximum number of actions to return. The service may return fewer than this * value. If unspecified, at most 10 actions will be returned. The maximum @@ -3877,15 +3901,15 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listLakeActions']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listLakeActions.asyncIterate( this.innerApiCalls['listLakeActions'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -3982,8 +4006,8 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listZones(request, options, callback); @@ -4029,14 +4053,14 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listZones']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listZones.createStream( - this.innerApiCalls.listZones as gax.GaxCall, + this.innerApiCalls.listZones as GaxCall, request, callSettings ); @@ -4085,15 +4109,15 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listZones']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listZones.asyncIterate( this.innerApiCalls['listZones'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -4189,8 +4213,8 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listZoneActions(request, options, callback); @@ -4233,14 +4257,14 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listZoneActions']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listZoneActions.createStream( - this.innerApiCalls.listZoneActions as gax.GaxCall, + this.innerApiCalls.listZoneActions as GaxCall, request, callSettings ); @@ -4286,15 +4310,15 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listZoneActions']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listZoneActions.asyncIterate( this.innerApiCalls['listZoneActions'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -4394,8 +4418,8 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listAssets(request, options, callback); @@ -4442,14 +4466,14 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listAssets']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listAssets.createStream( - this.innerApiCalls.listAssets as gax.GaxCall, + this.innerApiCalls.listAssets as GaxCall, request, callSettings ); @@ -4499,15 +4523,15 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listAssets']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listAssets.asyncIterate( this.innerApiCalls['listAssets'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -4603,8 +4627,8 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listAssetActions(request, options, callback); @@ -4647,14 +4671,14 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listAssetActions']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listAssetActions.createStream( - this.innerApiCalls.listAssetActions as gax.GaxCall, + this.innerApiCalls.listAssetActions as GaxCall, request, callSettings ); @@ -4700,15 +4724,15 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listAssetActions']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listAssetActions.asyncIterate( this.innerApiCalls['listAssetActions'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -4805,8 +4829,8 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listTasks(request, options, callback); @@ -4852,14 +4876,14 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listTasks']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listTasks.createStream( - this.innerApiCalls.listTasks as gax.GaxCall, + this.innerApiCalls.listTasks as GaxCall, request, callSettings ); @@ -4908,15 +4932,15 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listTasks']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listTasks.asyncIterate( this.innerApiCalls['listTasks'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -5010,8 +5034,8 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listJobs(request, options, callback); @@ -5054,14 +5078,14 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listJobs']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listJobs.createStream( - this.innerApiCalls.listJobs as gax.GaxCall, + this.innerApiCalls.listJobs as GaxCall, request, callSettings ); @@ -5107,15 +5131,15 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listJobs']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listJobs.asyncIterate( this.innerApiCalls['listJobs'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -5126,7 +5150,7 @@ export class DataplexServiceClient { * The request object that will be sent. * @param {string} request.parent * Required. The resource name of the parent lake: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id} + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. * @param {number} [request.pageSize] * Optional. Maximum number of environments to return. The service may return fewer than * this value. If unspecified, at most 10 environments will be returned. The @@ -5221,8 +5245,8 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listEnvironments(request, options, callback); @@ -5234,7 +5258,7 @@ export class DataplexServiceClient { * The request object that will be sent. * @param {string} request.parent * Required. The resource name of the parent lake: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id} + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. * @param {number} [request.pageSize] * Optional. Maximum number of environments to return. The service may return fewer than * this value. If unspecified, at most 10 environments will be returned. The @@ -5269,14 +5293,14 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listEnvironments']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listEnvironments.createStream( - this.innerApiCalls.listEnvironments as gax.GaxCall, + this.innerApiCalls.listEnvironments as GaxCall, request, callSettings ); @@ -5290,7 +5314,7 @@ export class DataplexServiceClient { * The request object that will be sent. * @param {string} request.parent * Required. The resource name of the parent lake: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id} + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. * @param {number} [request.pageSize] * Optional. Maximum number of environments to return. The service may return fewer than * this value. If unspecified, at most 10 environments will be returned. The @@ -5326,15 +5350,15 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listEnvironments']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listEnvironments.asyncIterate( this.innerApiCalls['listEnvironments'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -5345,7 +5369,7 @@ export class DataplexServiceClient { * The request object that will be sent. * @param {string} request.parent * Required. The resource name of the parent environment: - * projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id} + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. * @param {number} [request.pageSize] * Optional. Maximum number of sessions to return. The service may return fewer than * this value. If unspecified, at most 10 sessions will be returned. The @@ -5355,6 +5379,16 @@ export class DataplexServiceClient { * retrieve the subsequent page. When paginating, all other parameters * provided to `ListSessions` must match the call that provided the page * token. + * @param {string} [request.filter] + * Optional. Filter request. The following `mode` filter is supported to return only the + * sessions belonging to the requester when the mode is USER and return + * sessions of all the users when the mode is ADMIN. When no filter is sent + * default to USER mode. + * NOTE: When the mode is ADMIN, the requester should have + * `dataplex.environments.listAllSessions` permission to list all sessions, + * in absence of the permission, the request fails. + * + * mode = ADMIN | USER * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -5430,8 +5464,8 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listSessions(request, options, callback); @@ -5443,7 +5477,7 @@ export class DataplexServiceClient { * The request object that will be sent. * @param {string} request.parent * Required. The resource name of the parent environment: - * projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id} + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. * @param {number} [request.pageSize] * Optional. Maximum number of sessions to return. The service may return fewer than * this value. If unspecified, at most 10 sessions will be returned. The @@ -5453,6 +5487,16 @@ export class DataplexServiceClient { * retrieve the subsequent page. When paginating, all other parameters * provided to `ListSessions` must match the call that provided the page * token. + * @param {string} [request.filter] + * Optional. Filter request. The following `mode` filter is supported to return only the + * sessions belonging to the requester when the mode is USER and return + * sessions of all the users when the mode is ADMIN. When no filter is sent + * default to USER mode. + * NOTE: When the mode is ADMIN, the requester should have + * `dataplex.environments.listAllSessions` permission to list all sessions, + * in absence of the permission, the request fails. + * + * mode = ADMIN | USER * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -5474,14 +5518,14 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listSessions']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listSessions.createStream( - this.innerApiCalls.listSessions as gax.GaxCall, + this.innerApiCalls.listSessions as GaxCall, request, callSettings ); @@ -5495,7 +5539,7 @@ export class DataplexServiceClient { * The request object that will be sent. * @param {string} request.parent * Required. The resource name of the parent environment: - * projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id} + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. * @param {number} [request.pageSize] * Optional. Maximum number of sessions to return. The service may return fewer than * this value. If unspecified, at most 10 sessions will be returned. The @@ -5505,6 +5549,16 @@ export class DataplexServiceClient { * retrieve the subsequent page. When paginating, all other parameters * provided to `ListSessions` must match the call that provided the page * token. + * @param {string} [request.filter] + * Optional. Filter request. The following `mode` filter is supported to return only the + * sessions belonging to the requester when the mode is USER and return + * sessions of all the users when the mode is ADMIN. When no filter is sent + * default to USER mode. + * NOTE: When the mode is ADMIN, the requester should have + * `dataplex.environments.listAllSessions` permission to list all sessions, + * in absence of the permission, the request fails. + * + * mode = ADMIN | USER * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} @@ -5527,18 +5581,98 @@ export class DataplexServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listSessions']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listSessions.asyncIterate( this.innerApiCalls['listSessions'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } + /** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Location]{@link google.cloud.location.Location}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + + /** + * Lists information about the supported locations for this service. Returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Location]{@link google.cloud.location.Location}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + // -------------------- // -- Path templates -- // -------------------- @@ -6629,6 +6763,7 @@ export class DataplexServiceClient { return this.dataplexServiceStub.then(stub => { this._terminated = true; stub.close(); + this.locationsClient.close(); this.operationsClient.close(); }); } diff --git a/packages/google-cloud-dataplex/src/v1/dataplex_service_client_config.json b/packages/google-cloud-dataplex/src/v1/dataplex_service_client_config.json index 58a91c8cb74..232a178a7cc 100644 --- a/packages/google-cloud-dataplex/src/v1/dataplex_service_client_config.json +++ b/packages/google-cloud-dataplex/src/v1/dataplex_service_client_config.json @@ -163,24 +163,29 @@ "retry_params_name": "default" }, "CreateEnvironment": { + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "UpdateEnvironment": { + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "DeleteEnvironment": { + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "ListEnvironments": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" }, "GetEnvironment": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" }, "ListSessions": { "retry_codes_name": "non_idempotent", diff --git a/packages/google-cloud-dataplex/src/v1/gapic_metadata.json b/packages/google-cloud-dataplex/src/v1/gapic_metadata.json index 20dbc501a8a..85d7970d52b 100644 --- a/packages/google-cloud-dataplex/src/v1/gapic_metadata.json +++ b/packages/google-cloud-dataplex/src/v1/gapic_metadata.json @@ -30,6 +30,21 @@ "getContent" ] }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, "ListContent": { "methods": [ "listContent", @@ -62,6 +77,21 @@ "getContent" ] }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, "ListContent": { "methods": [ "listContent", diff --git a/packages/google-cloud-dataplex/src/v1/metadata_service_client.ts b/packages/google-cloud-dataplex/src/v1/metadata_service_client.ts index 2dbba046ca8..9371dc41fa2 100644 --- a/packages/google-cloud-dataplex/src/v1/metadata_service_client.ts +++ b/packages/google-cloud-dataplex/src/v1/metadata_service_client.ts @@ -17,18 +17,18 @@ // ** All changes to this file may be overwritten. ** /* global window */ -import * as gax from 'google-gax'; -import { +import type * as gax from 'google-gax'; +import type { Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall, + LocationsClient, + LocationProtos, } from 'google-gax'; - import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -37,7 +37,6 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './metadata_service_client_config.json'; - const version = require('../../../package.json').version; /** @@ -63,6 +62,7 @@ export class MetadataServiceClient { }; warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; + locationsClient: LocationsClient; pathTemplates: {[name: string]: gax.PathTemplate}; metadataServiceStub?: Promise<{[name: string]: Function}>; @@ -98,8 +98,18 @@ export class MetadataServiceClient { * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. * For more information, please check the * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. - */ - constructor(opts?: ClientOptions) { + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new MetadataServiceClient({fallback: 'rest'}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { // Ensure that options include all the required fields. const staticMembers = this.constructor as typeof MetadataServiceClient; const servicePath = @@ -119,8 +129,13 @@ export class MetadataServiceClient { opts['scopes'] = staticMembers.scopes; } + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gax.fallback : gax; + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. this._gaxGrpc = new this._gaxModule.GrpcClient(opts); @@ -141,6 +156,10 @@ export class MetadataServiceClient { if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; } + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); // Determine the client header string. const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; @@ -237,7 +256,7 @@ export class MetadataServiceClient { this.innerApiCalls = {}; // Add a warn function to the client constructor so it can be easily tested. - this.warn = gax.warn; + this.warn = this._gaxModule.warn; } /** @@ -302,7 +321,8 @@ export class MetadataServiceClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -449,8 +469,8 @@ export class MetadataServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.createEntity(request, options, callback); @@ -537,8 +557,8 @@ export class MetadataServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - 'entity.name': request.entity!.name || '', + this._gaxModule.routingHeader.fromParams({ + 'entity.name': request.entity!.name ?? '', }); this.initialize(); return this.innerApiCalls.updateEntity(request, options, callback); @@ -552,7 +572,8 @@ export class MetadataServiceClient { * Required. The resource name of the entity: * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. * @param {string} request.etag - * Required. The etag associated with the partition if it was previously retrieved. + * Required. The etag associated with the entity, which can be retrieved with a + * {@link |GetEntity} request. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -625,8 +646,8 @@ export class MetadataServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - name: request.name || '', + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.deleteEntity(request, options, callback); @@ -712,8 +733,8 @@ export class MetadataServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - name: request.name || '', + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getEntity(request, options, callback); @@ -809,8 +830,8 @@ export class MetadataServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.createPartition(request, options, callback); @@ -827,7 +848,7 @@ export class MetadataServiceClient { * The {partition_value_path} segment consists of an ordered sequence of * partition values separated by "/". All values must be provided. * @param {string} [request.etag] - * Optional. The etag associated with the partition if it was previously retrieved. + * Optional. The etag associated with the partition. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -906,8 +927,8 @@ export class MetadataServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - name: request.name || '', + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.deletePartition(request, options, callback); @@ -994,8 +1015,8 @@ export class MetadataServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - name: request.name || '', + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getPartition(request, options, callback); @@ -1027,8 +1048,8 @@ export class MetadataServiceClient { * - Entity ID: ?filter="id=entityID" * - Asset ID: ?filter="asset=assetID" * - Data path ?filter="data_path=gs://my-bucket" - * - Is HIVE compatible: ?filter=”hive_compatible=true” - * - Is BigQuery compatible: ?filter=”bigquery_compatible=true” + * - Is HIVE compatible: ?filter="hive_compatible=true" + * - Is BigQuery compatible: ?filter="bigquery_compatible=true" * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1104,8 +1125,8 @@ export class MetadataServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listEntities(request, options, callback); @@ -1136,8 +1157,8 @@ export class MetadataServiceClient { * - Entity ID: ?filter="id=entityID" * - Asset ID: ?filter="asset=assetID" * - Data path ?filter="data_path=gs://my-bucket" - * - Is HIVE compatible: ?filter=”hive_compatible=true” - * - Is BigQuery compatible: ?filter=”bigquery_compatible=true” + * - Is HIVE compatible: ?filter="hive_compatible=true" + * - Is BigQuery compatible: ?filter="bigquery_compatible=true" * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -1159,14 +1180,14 @@ export class MetadataServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listEntities']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listEntities.createStream( - this.innerApiCalls.listEntities as gax.GaxCall, + this.innerApiCalls.listEntities as GaxCall, request, callSettings ); @@ -1199,8 +1220,8 @@ export class MetadataServiceClient { * - Entity ID: ?filter="id=entityID" * - Asset ID: ?filter="asset=assetID" * - Data path ?filter="data_path=gs://my-bucket" - * - Is HIVE compatible: ?filter=”hive_compatible=true” - * - Is BigQuery compatible: ?filter=”bigquery_compatible=true” + * - Is HIVE compatible: ?filter="hive_compatible=true" + * - Is BigQuery compatible: ?filter="bigquery_compatible=true" * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} @@ -1223,15 +1244,15 @@ export class MetadataServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listEntities']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listEntities.asyncIterate( this.innerApiCalls['listEntities'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -1253,14 +1274,14 @@ export class MetadataServiceClient { * provided to `ListPartitions` must match the call that provided the * page token. * @param {string} [request.filter] - * Optional. Filter the partitions returned to the caller using a key vslue pair - * expression. The filter expression supports: + * Optional. Filter the partitions returned to the caller using a key value pair + * expression. Supported operators and syntax: * - * - logical operators: AND, OR + * - logic operators: AND, OR * - comparison operators: <, >, >=, <= ,=, != * - LIKE operators: - * - The right hand of a LIKE operator supports “.” and - * “*” for wildcard searches, for example "value1 LIKE ".*oo.*" + * - The right hand of a LIKE operator supports "." and + * "*" for wildcard searches, for example "value1 LIKE ".*oo.*" * - parenthetical grouping: ( ) * * Sample filter expression: `?filter="key1 < value1 OR key2 > value2" @@ -1353,8 +1374,8 @@ export class MetadataServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listPartitions(request, options, callback); @@ -1377,14 +1398,14 @@ export class MetadataServiceClient { * provided to `ListPartitions` must match the call that provided the * page token. * @param {string} [request.filter] - * Optional. Filter the partitions returned to the caller using a key vslue pair - * expression. The filter expression supports: + * Optional. Filter the partitions returned to the caller using a key value pair + * expression. Supported operators and syntax: * - * - logical operators: AND, OR + * - logic operators: AND, OR * - comparison operators: <, >, >=, <= ,=, != * - LIKE operators: - * - The right hand of a LIKE operator supports “.” and - * “*” for wildcard searches, for example "value1 LIKE ".*oo.*" + * - The right hand of a LIKE operator supports "." and + * "*" for wildcard searches, for example "value1 LIKE ".*oo.*" * - parenthetical grouping: ( ) * * Sample filter expression: `?filter="key1 < value1 OR key2 > value2" @@ -1417,14 +1438,14 @@ export class MetadataServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listPartitions']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listPartitions.createStream( - this.innerApiCalls.listPartitions as gax.GaxCall, + this.innerApiCalls.listPartitions as GaxCall, request, callSettings ); @@ -1449,14 +1470,14 @@ export class MetadataServiceClient { * provided to `ListPartitions` must match the call that provided the * page token. * @param {string} [request.filter] - * Optional. Filter the partitions returned to the caller using a key vslue pair - * expression. The filter expression supports: + * Optional. Filter the partitions returned to the caller using a key value pair + * expression. Supported operators and syntax: * - * - logical operators: AND, OR + * - logic operators: AND, OR * - comparison operators: <, >, >=, <= ,=, != * - LIKE operators: - * - The right hand of a LIKE operator supports “.” and - * “*” for wildcard searches, for example "value1 LIKE ".*oo.*" + * - The right hand of a LIKE operator supports "." and + * "*" for wildcard searches, for example "value1 LIKE ".*oo.*" * - parenthetical grouping: ( ) * * Sample filter expression: `?filter="key1 < value1 OR key2 > value2" @@ -1490,18 +1511,98 @@ export class MetadataServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listPartitions']; const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listPartitions.asyncIterate( this.innerApiCalls['listPartitions'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } + /** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Location]{@link google.cloud.location.Location}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + + /** + * Lists information about the supported locations for this service. Returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Location]{@link google.cloud.location.Location}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + // -------------------- // -- Path templates -- // -------------------- @@ -2556,6 +2657,7 @@ export class MetadataServiceClient { return this.metadataServiceStub.then(stub => { this._terminated = true; stub.close(); + this.locationsClient.close(); }); } return Promise.resolve(); diff --git a/packages/google-cloud-dataplex/test/gapic_content_service_v1.ts b/packages/google-cloud-dataplex/test/gapic_content_service_v1.ts index a974e92287d..59315d185e2 100644 --- a/packages/google-cloud-dataplex/test/gapic_content_service_v1.ts +++ b/packages/google-cloud-dataplex/test/gapic_content_service_v1.ts @@ -25,7 +25,22 @@ import * as contentserviceModule from '../src'; import {PassThrough} from 'stream'; -import {protobuf} from 'google-gax'; +import {protobuf, LocationProtos} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} function generateSampleMessage(instance: T) { const filledObject = ( @@ -113,101 +128,103 @@ function stubAsyncIterationCall( } describe('v1.ContentServiceClient', () => { - it('has servicePath', () => { - const servicePath = - contentserviceModule.v1.ContentServiceClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - contentserviceModule.v1.ContentServiceClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = contentserviceModule.v1.ContentServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + contentserviceModule.v1.ContentServiceClient.servicePath; + assert(servicePath); + }); - it('should create a client with no option', () => { - const client = new contentserviceModule.v1.ContentServiceClient(); - assert(client); - }); + it('has apiEndpoint', () => { + const apiEndpoint = + contentserviceModule.v1.ContentServiceClient.apiEndpoint; + assert(apiEndpoint); + }); - it('should create a client with gRPC fallback', () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - fallback: true, + it('has port', () => { + const port = contentserviceModule.v1.ContentServiceClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new contentserviceModule.v1.ContentServiceClient(); + assert(client); }); - assert.strictEqual(client.contentServiceStub, undefined); - await client.initialize(); - assert(client.contentServiceStub); - }); - it('has close method for the initialized client', done => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with gRPC fallback', () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + fallback: true, + }); + assert(client); }); - client.initialize(); - assert(client.contentServiceStub); - client.close().then(() => { - done(); + + it('has initialize method and supports deferred initialization', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.contentServiceStub, undefined); + await client.initialize(); + assert(client.contentServiceStub); }); - }); - it('has close method for the non-initialized client', done => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.contentServiceStub); + client.close().then(() => { + done(); + }); }); - assert.strictEqual(client.contentServiceStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the non-initialized client', done => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.contentServiceStub, undefined); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('createContent', () => { @@ -220,26 +237,26 @@ describe('v1.ContentServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateContentRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CreateContentRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataplex.v1.Content() ); client.innerApiCalls.createContent = stubSimpleCall(expectedResponse); const [response] = await client.createContent(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createContent as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createContent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createContent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createContent without error using callback', async () => { @@ -251,15 +268,12 @@ describe('v1.ContentServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateContentRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CreateContentRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataplex.v1.Content() ); @@ -282,11 +296,14 @@ describe('v1.ContentServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createContent as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createContent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createContent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createContent with error', async () => { @@ -298,26 +315,26 @@ describe('v1.ContentServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateContentRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CreateContentRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createContent = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.createContent(request), expectedError); - assert( - (client.innerApiCalls.createContent as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createContent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createContent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createContent with closed client', async () => { @@ -329,7 +346,11 @@ describe('v1.ContentServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateContentRequest() ); - request.parent = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CreateContentRequest', + ['parent'] + ); + request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createContent(request), expectedError); @@ -346,27 +367,27 @@ describe('v1.ContentServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateContentRequest() ); - request.content = {}; - request.content.name = ''; - const expectedHeaderRequestParams = 'content.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.content ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.UpdateContentRequest', + ['content', 'name'] + ); + request.content.name = defaultValue1; + const expectedHeaderRequestParams = `content.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataplex.v1.Content() ); client.innerApiCalls.updateContent = stubSimpleCall(expectedResponse); const [response] = await client.updateContent(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateContent as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateContent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateContent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateContent without error using callback', async () => { @@ -378,16 +399,13 @@ describe('v1.ContentServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateContentRequest() ); - request.content = {}; - request.content.name = ''; - const expectedHeaderRequestParams = 'content.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.content ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.UpdateContentRequest', + ['content', 'name'] + ); + request.content.name = defaultValue1; + const expectedHeaderRequestParams = `content.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataplex.v1.Content() ); @@ -410,11 +428,14 @@ describe('v1.ContentServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateContent as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updateContent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateContent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateContent with error', async () => { @@ -426,27 +447,27 @@ describe('v1.ContentServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateContentRequest() ); - request.content = {}; - request.content.name = ''; - const expectedHeaderRequestParams = 'content.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.content ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.UpdateContentRequest', + ['content', 'name'] + ); + request.content.name = defaultValue1; + const expectedHeaderRequestParams = `content.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateContent = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.updateContent(request), expectedError); - assert( - (client.innerApiCalls.updateContent as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateContent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateContent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateContent with closed client', async () => { @@ -458,8 +479,12 @@ describe('v1.ContentServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateContentRequest() ); - request.content = {}; - request.content.name = ''; + request.content ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.UpdateContentRequest', + ['content', 'name'] + ); + request.content.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.updateContent(request), expectedError); @@ -476,26 +501,26 @@ describe('v1.ContentServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteContentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.DeleteContentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); client.innerApiCalls.deleteContent = stubSimpleCall(expectedResponse); const [response] = await client.deleteContent(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteContent as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteContent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteContent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteContent without error using callback', async () => { @@ -507,15 +532,12 @@ describe('v1.ContentServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteContentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.DeleteContentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -538,11 +560,14 @@ describe('v1.ContentServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteContent as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteContent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteContent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteContent with error', async () => { @@ -554,26 +579,26 @@ describe('v1.ContentServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteContentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.DeleteContentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteContent = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.deleteContent(request), expectedError); - assert( - (client.innerApiCalls.deleteContent as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteContent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteContent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteContent with closed client', async () => { @@ -585,7 +610,11 @@ describe('v1.ContentServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteContentRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.DeleteContentRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.deleteContent(request), expectedError); @@ -602,26 +631,26 @@ describe('v1.ContentServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetContentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetContentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataplex.v1.Content() ); client.innerApiCalls.getContent = stubSimpleCall(expectedResponse); const [response] = await client.getContent(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getContent as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getContent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getContent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getContent without error using callback', async () => { @@ -633,15 +662,12 @@ describe('v1.ContentServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetContentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetContentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataplex.v1.Content() ); @@ -664,11 +690,14 @@ describe('v1.ContentServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getContent as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getContent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getContent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getContent with error', async () => { @@ -680,26 +709,26 @@ describe('v1.ContentServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetContentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetContentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getContent = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getContent(request), expectedError); - assert( - (client.innerApiCalls.getContent as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getContent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getContent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getContent with closed client', async () => { @@ -711,78 +740,75 @@ describe('v1.ContentServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetContentRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetContentRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getContent(request), expectedError); }); }); - describe('listContent', () => { - it('invokes listContent without error', async () => { + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { const client = new contentserviceModule.v1.ContentServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListContentRequest() + new protos.google.iam.v1.GetIamPolicyRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), - ]; - client.innerApiCalls.listContent = stubSimpleCall(expectedResponse); - const [response] = await client.listContent(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listContent as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.GetIamPolicyRequest', + ['resource'] + ); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy() ); + client.innerApiCalls.getIamPolicy = stubSimpleCall(expectedResponse); + const [response] = await client.getIamPolicy(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getIamPolicy as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getIamPolicy as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listContent without error using callback', async () => { + it('invokes getIamPolicy without error using callback', async () => { const client = new contentserviceModule.v1.ContentServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListContentRequest() + new protos.google.iam.v1.GetIamPolicyRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), - ]; - client.innerApiCalls.listContent = + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.GetIamPolicyRequest', + ['resource'] + ); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy() + ); + client.innerApiCalls.getIamPolicy = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listContent( + client.getIamPolicy( request, ( err?: Error | null, - result?: protos.google.cloud.dataplex.v1.IContent[] | null + result?: protos.google.iam.v1.IPolicy | null ) => { if (err) { reject(err); @@ -794,42 +820,440 @@ describe('v1.ContentServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listContent as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getIamPolicy as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getIamPolicy as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listContent with error', async () => { + it('invokes getIamPolicy with error', async () => { const client = new contentserviceModule.v1.ContentServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListContentRequest() + new protos.google.iam.v1.GetIamPolicyRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.GetIamPolicyRequest', + ['resource'] + ); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getIamPolicy = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getIamPolicy(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getIamPolicy as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getIamPolicy as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getIamPolicy with closed client', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.GetIamPolicyRequest', + ['resource'] + ); + request.resource = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getIamPolicy(request), expectedError); + }); + }); + + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.SetIamPolicyRequest', + ['resource'] + ); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy() + ); + client.innerApiCalls.setIamPolicy = stubSimpleCall(expectedResponse); + const [response] = await client.setIamPolicy(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.setIamPolicy as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.setIamPolicy as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setIamPolicy without error using callback', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.SetIamPolicyRequest', + ['resource'] + ); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy() + ); + client.innerApiCalls.setIamPolicy = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setIamPolicy( + request, + ( + err?: Error | null, + result?: protos.google.iam.v1.IPolicy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.setIamPolicy as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.setIamPolicy as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setIamPolicy with error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.SetIamPolicyRequest', + ['resource'] + ); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.setIamPolicy = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.setIamPolicy(request), expectedError); + const actualRequest = ( + client.innerApiCalls.setIamPolicy as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.setIamPolicy as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setIamPolicy with closed client', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.SetIamPolicyRequest', + ['resource'] + ); + request.resource = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.setIamPolicy(request), expectedError); + }); + }); + + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.TestIamPermissionsRequest', + ['resource'] + ); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsResponse() + ); + client.innerApiCalls.testIamPermissions = + stubSimpleCall(expectedResponse); + const [response] = await client.testIamPermissions(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.testIamPermissions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.testIamPermissions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes testIamPermissions without error using callback', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.TestIamPermissionsRequest', + ['resource'] + ); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsResponse() + ); + client.innerApiCalls.testIamPermissions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + ( + err?: Error | null, + result?: protos.google.iam.v1.ITestIamPermissionsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.testIamPermissions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.testIamPermissions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes testIamPermissions with error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.TestIamPermissionsRequest', + ['resource'] + ); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.testIamPermissions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.testIamPermissions(request), expectedError); + const actualRequest = ( + client.innerApiCalls.testIamPermissions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.testIamPermissions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes testIamPermissions with closed client', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.TestIamPermissionsRequest', + ['resource'] + ); + request.resource = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.testIamPermissions(request), expectedError); + }); + }); + + describe('listContent', () => { + it('invokes listContent without error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListContentRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListContentRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), + ]; + client.innerApiCalls.listContent = stubSimpleCall(expectedResponse); + const [response] = await client.listContent(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listContent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listContent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listContent without error using callback', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListContentRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListContentRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), + ]; + client.innerApiCalls.listContent = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listContent( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IContent[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listContent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listContent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listContent with error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListContentRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListContentRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listContent = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listContent(request), expectedError); - assert( - (client.innerApiCalls.listContent as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listContent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listContent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listContentStream without error', async () => { @@ -841,8 +1265,12 @@ describe('v1.ContentServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListContentRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListContentRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), @@ -873,11 +1301,12 @@ describe('v1.ContentServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listContent, request) ); - assert.strictEqual( - (client.descriptors.page.listContent.createStream as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listContent.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -890,8 +1319,12 @@ describe('v1.ContentServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListContentRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListContentRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listContent.createStream = stubPageStreamingCall( undefined, @@ -919,11 +1352,12 @@ describe('v1.ContentServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listContent, request) ); - assert.strictEqual( - (client.descriptors.page.listContent.createStream as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listContent.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -936,8 +1370,12 @@ describe('v1.ContentServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListContentRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListContentRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), @@ -957,11 +1395,12 @@ describe('v1.ContentServiceClient', () => { ).args[1], request ); - assert.strictEqual( - (client.descriptors.page.listContent.asyncIterate as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listContent.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -974,8 +1413,12 @@ describe('v1.ContentServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListContentRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListContentRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listContent.asyncIterate = stubAsyncIterationCall( undefined, @@ -994,11 +1437,210 @@ describe('v1.ContentServiceClient', () => { ).args[1], request ); - assert.strictEqual( - (client.descriptors.page.listContent.asyncIterate as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listContent.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getLocation without error using callback', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub).getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getLocation(request, expectedOptions), + expectedError + ); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); diff --git a/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts b/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts index 1371958796e..d50e47a8481 100644 --- a/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts +++ b/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts @@ -25,7 +25,27 @@ import * as dataplexserviceModule from '../src'; import {PassThrough} from 'stream'; -import {protobuf, LROperation, operationsProtos} from 'google-gax'; +import { + protobuf, + LROperation, + operationsProtos, + LocationProtos, +} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} function generateSampleMessage(instance: T) { const filledObject = ( @@ -145,101 +165,103 @@ function stubAsyncIterationCall( } describe('v1.DataplexServiceClient', () => { - it('has servicePath', () => { - const servicePath = - dataplexserviceModule.v1.DataplexServiceClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - dataplexserviceModule.v1.DataplexServiceClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = dataplexserviceModule.v1.DataplexServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + dataplexserviceModule.v1.DataplexServiceClient.servicePath; + assert(servicePath); + }); - it('should create a client with no option', () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient(); - assert(client); - }); + it('has apiEndpoint', () => { + const apiEndpoint = + dataplexserviceModule.v1.DataplexServiceClient.apiEndpoint; + assert(apiEndpoint); + }); - it('should create a client with gRPC fallback', () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - fallback: true, + it('has port', () => { + const port = dataplexserviceModule.v1.DataplexServiceClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient(); + assert(client); }); - assert.strictEqual(client.dataplexServiceStub, undefined); - await client.initialize(); - assert(client.dataplexServiceStub); - }); - it('has close method for the initialized client', done => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with gRPC fallback', () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + fallback: true, + }); + assert(client); }); - client.initialize(); - assert(client.dataplexServiceStub); - client.close().then(() => { - done(); + + it('has initialize method and supports deferred initialization', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dataplexServiceStub, undefined); + await client.initialize(); + assert(client.dataplexServiceStub); }); - }); - it('has close method for the non-initialized client', done => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.dataplexServiceStub); + client.close().then(() => { + done(); + }); }); - assert.strictEqual(client.dataplexServiceStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the non-initialized client', done => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dataplexServiceStub, undefined); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('getLake', () => { @@ -252,26 +274,26 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetLakeRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetLakeRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataplex.v1.Lake() ); client.innerApiCalls.getLake = stubSimpleCall(expectedResponse); const [response] = await client.getLake(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getLake as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = (client.innerApiCalls.getLake as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getLake as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getLake without error using callback', async () => { @@ -283,15 +305,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetLakeRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetLakeRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataplex.v1.Lake() ); @@ -314,11 +333,14 @@ describe('v1.DataplexServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getLake as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = (client.innerApiCalls.getLake as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getLake as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getLake with error', async () => { @@ -330,23 +352,23 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetLakeRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetLakeRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getLake = stubSimpleCall(undefined, expectedError); await assert.rejects(client.getLake(request), expectedError); - assert( - (client.innerApiCalls.getLake as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = (client.innerApiCalls.getLake as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getLake as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getLake with closed client', async () => { @@ -358,7 +380,11 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetLakeRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetLakeRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getLake(request), expectedError); @@ -375,26 +401,26 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetZoneRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetZoneRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataplex.v1.Zone() ); client.innerApiCalls.getZone = stubSimpleCall(expectedResponse); const [response] = await client.getZone(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getZone as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = (client.innerApiCalls.getZone as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getZone as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getZone without error using callback', async () => { @@ -406,15 +432,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetZoneRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetZoneRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataplex.v1.Zone() ); @@ -437,11 +460,14 @@ describe('v1.DataplexServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getZone as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = (client.innerApiCalls.getZone as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getZone as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getZone with error', async () => { @@ -453,23 +479,23 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetZoneRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetZoneRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getZone = stubSimpleCall(undefined, expectedError); await assert.rejects(client.getZone(request), expectedError); - assert( - (client.innerApiCalls.getZone as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = (client.innerApiCalls.getZone as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getZone as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getZone with closed client', async () => { @@ -481,7 +507,11 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetZoneRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetZoneRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getZone(request), expectedError); @@ -498,26 +528,26 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetAssetRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetAssetRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataplex.v1.Asset() ); client.innerApiCalls.getAsset = stubSimpleCall(expectedResponse); const [response] = await client.getAsset(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getAsset as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getAsset as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAsset as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getAsset without error using callback', async () => { @@ -529,15 +559,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetAssetRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetAssetRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataplex.v1.Asset() ); @@ -560,11 +587,14 @@ describe('v1.DataplexServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getAsset as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getAsset as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAsset as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getAsset with error', async () => { @@ -576,23 +606,23 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetAssetRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetAssetRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getAsset = stubSimpleCall(undefined, expectedError); await assert.rejects(client.getAsset(request), expectedError); - assert( - (client.innerApiCalls.getAsset as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getAsset as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAsset as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getAsset with closed client', async () => { @@ -604,7 +634,11 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetAssetRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetAssetRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getAsset(request), expectedError); @@ -621,26 +655,26 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetTaskRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetTaskRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataplex.v1.Task() ); client.innerApiCalls.getTask = stubSimpleCall(expectedResponse); const [response] = await client.getTask(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getTask as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = (client.innerApiCalls.getTask as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getTask as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getTask without error using callback', async () => { @@ -652,15 +686,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetTaskRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetTaskRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataplex.v1.Task() ); @@ -683,11 +714,14 @@ describe('v1.DataplexServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getTask as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = (client.innerApiCalls.getTask as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getTask as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getTask with error', async () => { @@ -699,23 +733,23 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetTaskRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetTaskRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getTask = stubSimpleCall(undefined, expectedError); await assert.rejects(client.getTask(request), expectedError); - assert( - (client.innerApiCalls.getTask as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = (client.innerApiCalls.getTask as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getTask as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getTask with closed client', async () => { @@ -727,7 +761,11 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetTaskRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetTaskRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getTask(request), expectedError); @@ -744,26 +782,26 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetJobRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetJobRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataplex.v1.Job() ); client.innerApiCalls.getJob = stubSimpleCall(expectedResponse); const [response] = await client.getJob(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getJob as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = (client.innerApiCalls.getJob as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getJob without error using callback', async () => { @@ -775,15 +813,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetJobRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetJobRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataplex.v1.Job() ); @@ -806,11 +841,14 @@ describe('v1.DataplexServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getJob as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = (client.innerApiCalls.getJob as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getJob with error', async () => { @@ -822,23 +860,23 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetJobRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetJobRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getJob = stubSimpleCall(undefined, expectedError); await assert.rejects(client.getJob(request), expectedError); - assert( - (client.innerApiCalls.getJob as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = (client.innerApiCalls.getJob as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getJob with closed client', async () => { @@ -850,7 +888,11 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetJobRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetJobRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getJob(request), expectedError); @@ -867,26 +909,26 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CancelJobRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CancelJobRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); client.innerApiCalls.cancelJob = stubSimpleCall(expectedResponse); const [response] = await client.cancelJob(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.cancelJob as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.cancelJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.cancelJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes cancelJob without error using callback', async () => { @@ -898,15 +940,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CancelJobRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CancelJobRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -929,11 +968,14 @@ describe('v1.DataplexServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.cancelJob as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.cancelJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.cancelJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes cancelJob with error', async () => { @@ -945,23 +987,23 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CancelJobRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CancelJobRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.cancelJob = stubSimpleCall(undefined, expectedError); await assert.rejects(client.cancelJob(request), expectedError); - assert( - (client.innerApiCalls.cancelJob as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.cancelJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.cancelJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes cancelJob with closed client', async () => { @@ -973,7 +1015,11 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CancelJobRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CancelJobRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.cancelJob(request), expectedError); @@ -990,26 +1036,26 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetEnvironmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetEnvironmentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataplex.v1.Environment() ); client.innerApiCalls.getEnvironment = stubSimpleCall(expectedResponse); const [response] = await client.getEnvironment(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getEnvironment without error using callback', async () => { @@ -1021,15 +1067,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetEnvironmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetEnvironmentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataplex.v1.Environment() ); @@ -1052,11 +1095,14 @@ describe('v1.DataplexServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getEnvironment with error', async () => { @@ -1068,26 +1114,26 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetEnvironmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetEnvironmentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getEnvironment = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getEnvironment(request), expectedError); - assert( - (client.innerApiCalls.getEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getEnvironment with closed client', async () => { @@ -1099,7 +1145,11 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetEnvironmentRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetEnvironmentRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getEnvironment(request), expectedError); @@ -1116,15 +1166,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateLakeRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CreateLakeRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1132,11 +1179,14 @@ describe('v1.DataplexServiceClient', () => { const [operation] = await client.createLake(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createLake as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createLake as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createLake as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createLake without error using callback', async () => { @@ -1148,15 +1198,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateLakeRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CreateLakeRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1186,11 +1233,14 @@ describe('v1.DataplexServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createLake as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createLake as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createLake as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createLake with call error', async () => { @@ -1202,26 +1252,26 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateLakeRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CreateLakeRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createLake = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.createLake(request), expectedError); - assert( - (client.innerApiCalls.createLake as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createLake as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createLake as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createLake with LRO error', async () => { @@ -1233,15 +1283,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateLakeRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CreateLakeRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createLake = stubLongRunningCall( undefined, @@ -1250,11 +1297,14 @@ describe('v1.DataplexServiceClient', () => { ); const [operation] = await client.createLake(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.createLake as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createLake as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createLake as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkCreateLakeProgress without error', async () => { @@ -1306,16 +1356,13 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateLakeRequest() ); - request.lake = {}; - request.lake.name = ''; - const expectedHeaderRequestParams = 'lake.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.lake ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.UpdateLakeRequest', + ['lake', 'name'] + ); + request.lake.name = defaultValue1; + const expectedHeaderRequestParams = `lake.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1323,11 +1370,14 @@ describe('v1.DataplexServiceClient', () => { const [operation] = await client.updateLake(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateLake as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateLake as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateLake as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateLake without error using callback', async () => { @@ -1339,16 +1389,13 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateLakeRequest() ); - request.lake = {}; - request.lake.name = ''; - const expectedHeaderRequestParams = 'lake.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.lake ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.UpdateLakeRequest', + ['lake', 'name'] + ); + request.lake.name = defaultValue1; + const expectedHeaderRequestParams = `lake.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1378,11 +1425,14 @@ describe('v1.DataplexServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateLake as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updateLake as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateLake as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateLake with call error', async () => { @@ -1394,27 +1444,27 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateLakeRequest() ); - request.lake = {}; - request.lake.name = ''; - const expectedHeaderRequestParams = 'lake.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.lake ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.UpdateLakeRequest', + ['lake', 'name'] + ); + request.lake.name = defaultValue1; + const expectedHeaderRequestParams = `lake.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateLake = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.updateLake(request), expectedError); - assert( - (client.innerApiCalls.updateLake as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateLake as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateLake as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateLake with LRO error', async () => { @@ -1426,16 +1476,13 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateLakeRequest() ); - request.lake = {}; - request.lake.name = ''; - const expectedHeaderRequestParams = 'lake.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.lake ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.UpdateLakeRequest', + ['lake', 'name'] + ); + request.lake.name = defaultValue1; + const expectedHeaderRequestParams = `lake.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateLake = stubLongRunningCall( undefined, @@ -1444,11 +1491,14 @@ describe('v1.DataplexServiceClient', () => { ); const [operation] = await client.updateLake(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.updateLake as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateLake as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateLake as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkUpdateLakeProgress without error', async () => { @@ -1500,15 +1550,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteLakeRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.DeleteLakeRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1516,11 +1563,14 @@ describe('v1.DataplexServiceClient', () => { const [operation] = await client.deleteLake(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteLake as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteLake as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteLake as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteLake without error using callback', async () => { @@ -1532,15 +1582,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteLakeRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.DeleteLakeRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1570,11 +1617,14 @@ describe('v1.DataplexServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteLake as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteLake as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteLake as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteLake with call error', async () => { @@ -1586,26 +1636,26 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteLakeRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.DeleteLakeRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteLake = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.deleteLake(request), expectedError); - assert( - (client.innerApiCalls.deleteLake as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteLake as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteLake as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteLake with LRO error', async () => { @@ -1617,15 +1667,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteLakeRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.DeleteLakeRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteLake = stubLongRunningCall( undefined, @@ -1634,11 +1681,14 @@ describe('v1.DataplexServiceClient', () => { ); const [operation] = await client.deleteLake(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.deleteLake as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteLake as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteLake as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkDeleteLakeProgress without error', async () => { @@ -1690,15 +1740,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateZoneRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CreateZoneRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1706,11 +1753,14 @@ describe('v1.DataplexServiceClient', () => { const [operation] = await client.createZone(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createZone as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createZone as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createZone as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createZone without error using callback', async () => { @@ -1722,15 +1772,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateZoneRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CreateZoneRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1760,11 +1807,14 @@ describe('v1.DataplexServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createZone as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createZone as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createZone as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createZone with call error', async () => { @@ -1776,26 +1826,26 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateZoneRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CreateZoneRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createZone = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.createZone(request), expectedError); - assert( - (client.innerApiCalls.createZone as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createZone as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createZone as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createZone with LRO error', async () => { @@ -1807,15 +1857,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateZoneRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CreateZoneRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createZone = stubLongRunningCall( undefined, @@ -1824,11 +1871,14 @@ describe('v1.DataplexServiceClient', () => { ); const [operation] = await client.createZone(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.createZone as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createZone as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createZone as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkCreateZoneProgress without error', async () => { @@ -1880,16 +1930,13 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateZoneRequest() ); - request.zone = {}; - request.zone.name = ''; - const expectedHeaderRequestParams = 'zone.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.zone ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.UpdateZoneRequest', + ['zone', 'name'] + ); + request.zone.name = defaultValue1; + const expectedHeaderRequestParams = `zone.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1897,11 +1944,14 @@ describe('v1.DataplexServiceClient', () => { const [operation] = await client.updateZone(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateZone as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateZone as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateZone as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateZone without error using callback', async () => { @@ -1913,16 +1963,13 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateZoneRequest() ); - request.zone = {}; - request.zone.name = ''; - const expectedHeaderRequestParams = 'zone.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.zone ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.UpdateZoneRequest', + ['zone', 'name'] + ); + request.zone.name = defaultValue1; + const expectedHeaderRequestParams = `zone.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1952,11 +1999,14 @@ describe('v1.DataplexServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateZone as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updateZone as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateZone as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateZone with call error', async () => { @@ -1968,27 +2018,27 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateZoneRequest() ); - request.zone = {}; - request.zone.name = ''; - const expectedHeaderRequestParams = 'zone.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.zone ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.UpdateZoneRequest', + ['zone', 'name'] + ); + request.zone.name = defaultValue1; + const expectedHeaderRequestParams = `zone.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateZone = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.updateZone(request), expectedError); - assert( - (client.innerApiCalls.updateZone as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateZone as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateZone as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateZone with LRO error', async () => { @@ -2000,16 +2050,13 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateZoneRequest() ); - request.zone = {}; - request.zone.name = ''; - const expectedHeaderRequestParams = 'zone.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.zone ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.UpdateZoneRequest', + ['zone', 'name'] + ); + request.zone.name = defaultValue1; + const expectedHeaderRequestParams = `zone.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateZone = stubLongRunningCall( undefined, @@ -2018,11 +2065,14 @@ describe('v1.DataplexServiceClient', () => { ); const [operation] = await client.updateZone(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.updateZone as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateZone as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateZone as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkUpdateZoneProgress without error', async () => { @@ -2074,15 +2124,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteZoneRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.DeleteZoneRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2090,11 +2137,14 @@ describe('v1.DataplexServiceClient', () => { const [operation] = await client.deleteZone(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteZone as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteZone as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteZone as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteZone without error using callback', async () => { @@ -2106,15 +2156,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteZoneRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.DeleteZoneRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2144,11 +2191,14 @@ describe('v1.DataplexServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteZone as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteZone as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteZone as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteZone with call error', async () => { @@ -2160,26 +2210,26 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteZoneRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.DeleteZoneRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteZone = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.deleteZone(request), expectedError); - assert( - (client.innerApiCalls.deleteZone as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteZone as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteZone as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteZone with LRO error', async () => { @@ -2191,15 +2241,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteZoneRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.DeleteZoneRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteZone = stubLongRunningCall( undefined, @@ -2208,11 +2255,14 @@ describe('v1.DataplexServiceClient', () => { ); const [operation] = await client.deleteZone(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.deleteZone as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteZone as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteZone as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkDeleteZoneProgress without error', async () => { @@ -2264,15 +2314,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateAssetRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CreateAssetRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2280,11 +2327,14 @@ describe('v1.DataplexServiceClient', () => { const [operation] = await client.createAsset(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createAsset as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createAsset as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAsset as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createAsset without error using callback', async () => { @@ -2296,15 +2346,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateAssetRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CreateAssetRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2334,11 +2381,14 @@ describe('v1.DataplexServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createAsset as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createAsset as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAsset as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createAsset with call error', async () => { @@ -2350,26 +2400,26 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateAssetRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CreateAssetRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createAsset = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.createAsset(request), expectedError); - assert( - (client.innerApiCalls.createAsset as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createAsset as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAsset as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createAsset with LRO error', async () => { @@ -2381,15 +2431,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateAssetRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CreateAssetRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createAsset = stubLongRunningCall( undefined, @@ -2398,11 +2445,14 @@ describe('v1.DataplexServiceClient', () => { ); const [operation] = await client.createAsset(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.createAsset as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createAsset as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAsset as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkCreateAssetProgress without error', async () => { @@ -2454,16 +2504,13 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateAssetRequest() ); - request.asset = {}; - request.asset.name = ''; - const expectedHeaderRequestParams = 'asset.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.asset ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.UpdateAssetRequest', + ['asset', 'name'] + ); + request.asset.name = defaultValue1; + const expectedHeaderRequestParams = `asset.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2471,11 +2518,14 @@ describe('v1.DataplexServiceClient', () => { const [operation] = await client.updateAsset(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateAsset as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateAsset as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateAsset as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateAsset without error using callback', async () => { @@ -2487,16 +2537,13 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateAssetRequest() ); - request.asset = {}; - request.asset.name = ''; - const expectedHeaderRequestParams = 'asset.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.asset ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.UpdateAssetRequest', + ['asset', 'name'] + ); + request.asset.name = defaultValue1; + const expectedHeaderRequestParams = `asset.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2526,11 +2573,14 @@ describe('v1.DataplexServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateAsset as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updateAsset as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateAsset as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateAsset with call error', async () => { @@ -2542,27 +2592,27 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateAssetRequest() ); - request.asset = {}; - request.asset.name = ''; - const expectedHeaderRequestParams = 'asset.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.asset ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.UpdateAssetRequest', + ['asset', 'name'] + ); + request.asset.name = defaultValue1; + const expectedHeaderRequestParams = `asset.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateAsset = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.updateAsset(request), expectedError); - assert( - (client.innerApiCalls.updateAsset as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateAsset as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateAsset as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateAsset with LRO error', async () => { @@ -2574,16 +2624,13 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateAssetRequest() ); - request.asset = {}; - request.asset.name = ''; - const expectedHeaderRequestParams = 'asset.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.asset ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.UpdateAssetRequest', + ['asset', 'name'] + ); + request.asset.name = defaultValue1; + const expectedHeaderRequestParams = `asset.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateAsset = stubLongRunningCall( undefined, @@ -2592,11 +2639,14 @@ describe('v1.DataplexServiceClient', () => { ); const [operation] = await client.updateAsset(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.updateAsset as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateAsset as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateAsset as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkUpdateAssetProgress without error', async () => { @@ -2648,15 +2698,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteAssetRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.DeleteAssetRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2664,11 +2711,14 @@ describe('v1.DataplexServiceClient', () => { const [operation] = await client.deleteAsset(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteAsset as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteAsset as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAsset as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteAsset without error using callback', async () => { @@ -2680,15 +2730,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteAssetRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.DeleteAssetRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2718,11 +2765,14 @@ describe('v1.DataplexServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteAsset as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteAsset as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAsset as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteAsset with call error', async () => { @@ -2734,26 +2784,26 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteAssetRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.DeleteAssetRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteAsset = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.deleteAsset(request), expectedError); - assert( - (client.innerApiCalls.deleteAsset as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteAsset as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAsset as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteAsset with LRO error', async () => { @@ -2765,15 +2815,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteAssetRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.DeleteAssetRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteAsset = stubLongRunningCall( undefined, @@ -2782,11 +2829,14 @@ describe('v1.DataplexServiceClient', () => { ); const [operation] = await client.deleteAsset(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.deleteAsset as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteAsset as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAsset as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkDeleteAssetProgress without error', async () => { @@ -2838,15 +2888,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateTaskRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CreateTaskRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2854,11 +2901,14 @@ describe('v1.DataplexServiceClient', () => { const [operation] = await client.createTask(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createTask as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createTask as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createTask as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createTask without error using callback', async () => { @@ -2870,15 +2920,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateTaskRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CreateTaskRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2908,11 +2955,14 @@ describe('v1.DataplexServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createTask as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createTask as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createTask as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createTask with call error', async () => { @@ -2924,26 +2974,26 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateTaskRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CreateTaskRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createTask = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.createTask(request), expectedError); - assert( - (client.innerApiCalls.createTask as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createTask as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createTask as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createTask with LRO error', async () => { @@ -2955,15 +3005,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateTaskRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CreateTaskRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createTask = stubLongRunningCall( undefined, @@ -2972,11 +3019,14 @@ describe('v1.DataplexServiceClient', () => { ); const [operation] = await client.createTask(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.createTask as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createTask as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createTask as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkCreateTaskProgress without error', async () => { @@ -3028,16 +3078,13 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateTaskRequest() ); - request.task = {}; - request.task.name = ''; - const expectedHeaderRequestParams = 'task.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.task ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.UpdateTaskRequest', + ['task', 'name'] + ); + request.task.name = defaultValue1; + const expectedHeaderRequestParams = `task.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -3045,11 +3092,14 @@ describe('v1.DataplexServiceClient', () => { const [operation] = await client.updateTask(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateTask as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateTask as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateTask as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateTask without error using callback', async () => { @@ -3061,16 +3111,13 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateTaskRequest() ); - request.task = {}; - request.task.name = ''; - const expectedHeaderRequestParams = 'task.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.task ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.UpdateTaskRequest', + ['task', 'name'] + ); + request.task.name = defaultValue1; + const expectedHeaderRequestParams = `task.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -3100,11 +3147,14 @@ describe('v1.DataplexServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateTask as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updateTask as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateTask as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateTask with call error', async () => { @@ -3116,27 +3166,27 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateTaskRequest() ); - request.task = {}; - request.task.name = ''; - const expectedHeaderRequestParams = 'task.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.task ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.UpdateTaskRequest', + ['task', 'name'] + ); + request.task.name = defaultValue1; + const expectedHeaderRequestParams = `task.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateTask = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.updateTask(request), expectedError); - assert( - (client.innerApiCalls.updateTask as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateTask as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateTask as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateTask with LRO error', async () => { @@ -3148,16 +3198,13 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateTaskRequest() ); - request.task = {}; - request.task.name = ''; - const expectedHeaderRequestParams = 'task.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.task ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.UpdateTaskRequest', + ['task', 'name'] + ); + request.task.name = defaultValue1; + const expectedHeaderRequestParams = `task.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateTask = stubLongRunningCall( undefined, @@ -3166,11 +3213,14 @@ describe('v1.DataplexServiceClient', () => { ); const [operation] = await client.updateTask(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.updateTask as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateTask as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateTask as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkUpdateTaskProgress without error', async () => { @@ -3222,15 +3272,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteTaskRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.DeleteTaskRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -3238,11 +3285,14 @@ describe('v1.DataplexServiceClient', () => { const [operation] = await client.deleteTask(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteTask as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteTask as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteTask as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteTask without error using callback', async () => { @@ -3254,15 +3304,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteTaskRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.DeleteTaskRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -3292,11 +3339,14 @@ describe('v1.DataplexServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteTask as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteTask as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteTask as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteTask with call error', async () => { @@ -3308,26 +3358,26 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteTaskRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.DeleteTaskRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteTask = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.deleteTask(request), expectedError); - assert( - (client.innerApiCalls.deleteTask as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteTask as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteTask as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteTask with LRO error', async () => { @@ -3339,15 +3389,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteTaskRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.DeleteTaskRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteTask = stubLongRunningCall( undefined, @@ -3356,11 +3403,14 @@ describe('v1.DataplexServiceClient', () => { ); const [operation] = await client.deleteTask(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.deleteTask as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteTask as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteTask as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkDeleteTaskProgress without error', async () => { @@ -3412,15 +3462,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateEnvironmentRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CreateEnvironmentRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -3429,11 +3476,14 @@ describe('v1.DataplexServiceClient', () => { const [operation] = await client.createEnvironment(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createEnvironment without error using callback', async () => { @@ -3445,15 +3495,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateEnvironmentRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CreateEnvironmentRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -3483,11 +3530,14 @@ describe('v1.DataplexServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createEnvironment with call error', async () => { @@ -3499,26 +3549,26 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateEnvironmentRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CreateEnvironmentRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createEnvironment = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.createEnvironment(request), expectedError); - assert( - (client.innerApiCalls.createEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createEnvironment with LRO error', async () => { @@ -3530,15 +3580,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateEnvironmentRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CreateEnvironmentRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createEnvironment = stubLongRunningCall( undefined, @@ -3547,11 +3594,14 @@ describe('v1.DataplexServiceClient', () => { ); const [operation] = await client.createEnvironment(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.createEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkCreateEnvironmentProgress without error', async () => { @@ -3606,16 +3656,13 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateEnvironmentRequest() ); - request.environment = {}; - request.environment.name = ''; - const expectedHeaderRequestParams = 'environment.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.environment ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.UpdateEnvironmentRequest', + ['environment', 'name'] + ); + request.environment.name = defaultValue1; + const expectedHeaderRequestParams = `environment.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -3624,11 +3671,14 @@ describe('v1.DataplexServiceClient', () => { const [operation] = await client.updateEnvironment(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateEnvironment without error using callback', async () => { @@ -3640,16 +3690,13 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateEnvironmentRequest() ); - request.environment = {}; - request.environment.name = ''; - const expectedHeaderRequestParams = 'environment.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.environment ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.UpdateEnvironmentRequest', + ['environment', 'name'] + ); + request.environment.name = defaultValue1; + const expectedHeaderRequestParams = `environment.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -3679,11 +3726,14 @@ describe('v1.DataplexServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updateEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateEnvironment with call error', async () => { @@ -3695,27 +3745,27 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateEnvironmentRequest() ); - request.environment = {}; - request.environment.name = ''; - const expectedHeaderRequestParams = 'environment.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.environment ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.UpdateEnvironmentRequest', + ['environment', 'name'] + ); + request.environment.name = defaultValue1; + const expectedHeaderRequestParams = `environment.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateEnvironment = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.updateEnvironment(request), expectedError); - assert( - (client.innerApiCalls.updateEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateEnvironment with LRO error', async () => { @@ -3727,16 +3777,13 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateEnvironmentRequest() ); - request.environment = {}; - request.environment.name = ''; - const expectedHeaderRequestParams = 'environment.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.environment ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.UpdateEnvironmentRequest', + ['environment', 'name'] + ); + request.environment.name = defaultValue1; + const expectedHeaderRequestParams = `environment.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateEnvironment = stubLongRunningCall( undefined, @@ -3745,11 +3792,14 @@ describe('v1.DataplexServiceClient', () => { ); const [operation] = await client.updateEnvironment(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.updateEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkUpdateEnvironmentProgress without error', async () => { @@ -3804,15 +3854,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteEnvironmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.DeleteEnvironmentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -3821,11 +3868,14 @@ describe('v1.DataplexServiceClient', () => { const [operation] = await client.deleteEnvironment(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteEnvironment without error using callback', async () => { @@ -3837,15 +3887,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteEnvironmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.DeleteEnvironmentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -3875,11 +3922,14 @@ describe('v1.DataplexServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteEnvironment with call error', async () => { @@ -3891,26 +3941,26 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteEnvironmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.DeleteEnvironmentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteEnvironment = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.deleteEnvironment(request), expectedError); - assert( - (client.innerApiCalls.deleteEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteEnvironment with LRO error', async () => { @@ -3922,15 +3972,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteEnvironmentRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.DeleteEnvironmentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteEnvironment = stubLongRunningCall( undefined, @@ -3939,11 +3986,14 @@ describe('v1.DataplexServiceClient', () => { ); const [operation] = await client.deleteEnvironment(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.deleteEnvironment as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteEnvironment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteEnvironment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkDeleteEnvironmentProgress without error', async () => { @@ -3998,15 +4048,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListLakesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListLakesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), @@ -4015,11 +4062,14 @@ describe('v1.DataplexServiceClient', () => { client.innerApiCalls.listLakes = stubSimpleCall(expectedResponse); const [response] = await client.listLakes(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listLakes as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listLakes as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listLakes as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listLakes without error using callback', async () => { @@ -4031,15 +4081,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListLakesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListLakesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), @@ -4064,11 +4111,14 @@ describe('v1.DataplexServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listLakes as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listLakes as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listLakes as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listLakes with error', async () => { @@ -4080,23 +4130,23 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListLakesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListLakesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listLakes = stubSimpleCall(undefined, expectedError); await assert.rejects(client.listLakes(request), expectedError); - assert( - (client.innerApiCalls.listLakes as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listLakes as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listLakes as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listLakesStream without error', async () => { @@ -4108,8 +4158,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListLakesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListLakesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), @@ -4137,10 +4191,12 @@ describe('v1.DataplexServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listLakes, request) ); - assert.strictEqual( - (client.descriptors.page.listLakes.createStream as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listLakes.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4153,8 +4209,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListLakesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListLakesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listLakes.createStream = stubPageStreamingCall( undefined, @@ -4179,10 +4239,12 @@ describe('v1.DataplexServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listLakes, request) ); - assert.strictEqual( - (client.descriptors.page.listLakes.createStream as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listLakes.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4195,8 +4257,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListLakesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListLakesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), @@ -4215,10 +4281,12 @@ describe('v1.DataplexServiceClient', () => { .args[1], request ); - assert.strictEqual( - (client.descriptors.page.listLakes.asyncIterate as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listLakes.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4231,8 +4299,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListLakesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListLakesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listLakes.asyncIterate = stubAsyncIterationCall( undefined, @@ -4250,10 +4322,12 @@ describe('v1.DataplexServiceClient', () => { .args[1], request ); - assert.strictEqual( - (client.descriptors.page.listLakes.asyncIterate as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listLakes.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -4268,15 +4342,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListLakeActionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), @@ -4285,11 +4356,14 @@ describe('v1.DataplexServiceClient', () => { client.innerApiCalls.listLakeActions = stubSimpleCall(expectedResponse); const [response] = await client.listLakeActions(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listLakeActions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listLakeActions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listLakeActions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listLakeActions without error using callback', async () => { @@ -4301,15 +4375,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListLakeActionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), @@ -4334,11 +4405,14 @@ describe('v1.DataplexServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listLakeActions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listLakeActions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listLakeActions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listLakeActions with error', async () => { @@ -4350,26 +4424,26 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListLakeActionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listLakeActions = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listLakeActions(request), expectedError); - assert( - (client.innerApiCalls.listLakeActions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listLakeActions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listLakeActions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listLakeActionsStream without error', async () => { @@ -4381,8 +4455,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListLakeActionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), @@ -4413,11 +4491,12 @@ describe('v1.DataplexServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listLakeActions, request) ); - assert.strictEqual( - ( - client.descriptors.page.listLakeActions.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listLakeActions.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4430,8 +4509,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListLakeActionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listLakeActions.createStream = stubPageStreamingCall(undefined, expectedError); @@ -4457,11 +4540,12 @@ describe('v1.DataplexServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listLakeActions, request) ); - assert.strictEqual( - ( - client.descriptors.page.listLakeActions.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listLakeActions.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4474,8 +4558,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListLakeActionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), @@ -4495,11 +4583,12 @@ describe('v1.DataplexServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listLakeActions.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listLakeActions.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4512,8 +4601,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListLakeActionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listLakeActions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -4530,11 +4623,12 @@ describe('v1.DataplexServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listLakeActions.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listLakeActions.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -4549,15 +4643,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListZonesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListZonesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), @@ -4566,11 +4657,14 @@ describe('v1.DataplexServiceClient', () => { client.innerApiCalls.listZones = stubSimpleCall(expectedResponse); const [response] = await client.listZones(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listZones as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listZones as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listZones as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listZones without error using callback', async () => { @@ -4582,15 +4676,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListZonesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListZonesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), @@ -4615,11 +4706,14 @@ describe('v1.DataplexServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listZones as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listZones as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listZones as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listZones with error', async () => { @@ -4631,23 +4725,23 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListZonesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListZonesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listZones = stubSimpleCall(undefined, expectedError); await assert.rejects(client.listZones(request), expectedError); - assert( - (client.innerApiCalls.listZones as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listZones as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listZones as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listZonesStream without error', async () => { @@ -4659,8 +4753,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListZonesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListZonesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), @@ -4688,10 +4786,12 @@ describe('v1.DataplexServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listZones, request) ); - assert.strictEqual( - (client.descriptors.page.listZones.createStream as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listZones.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4704,8 +4804,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListZonesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListZonesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listZones.createStream = stubPageStreamingCall( undefined, @@ -4730,10 +4834,12 @@ describe('v1.DataplexServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listZones, request) ); - assert.strictEqual( - (client.descriptors.page.listZones.createStream as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listZones.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4746,8 +4852,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListZonesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListZonesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), @@ -4766,10 +4876,12 @@ describe('v1.DataplexServiceClient', () => { .args[1], request ); - assert.strictEqual( - (client.descriptors.page.listZones.asyncIterate as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listZones.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4782,8 +4894,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListZonesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListZonesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listZones.asyncIterate = stubAsyncIterationCall( undefined, @@ -4801,10 +4917,12 @@ describe('v1.DataplexServiceClient', () => { .args[1], request ); - assert.strictEqual( - (client.descriptors.page.listZones.asyncIterate as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listZones.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -4819,15 +4937,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListZoneActionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), @@ -4836,11 +4951,14 @@ describe('v1.DataplexServiceClient', () => { client.innerApiCalls.listZoneActions = stubSimpleCall(expectedResponse); const [response] = await client.listZoneActions(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listZoneActions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listZoneActions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listZoneActions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listZoneActions without error using callback', async () => { @@ -4852,15 +4970,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListZoneActionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), @@ -4885,11 +5000,14 @@ describe('v1.DataplexServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listZoneActions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listZoneActions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listZoneActions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listZoneActions with error', async () => { @@ -4901,26 +5019,26 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListZoneActionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listZoneActions = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listZoneActions(request), expectedError); - assert( - (client.innerApiCalls.listZoneActions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listZoneActions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listZoneActions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listZoneActionsStream without error', async () => { @@ -4932,8 +5050,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListZoneActionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), @@ -4964,11 +5086,12 @@ describe('v1.DataplexServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listZoneActions, request) ); - assert.strictEqual( - ( - client.descriptors.page.listZoneActions.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listZoneActions.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4981,8 +5104,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListZoneActionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listZoneActions.createStream = stubPageStreamingCall(undefined, expectedError); @@ -5008,11 +5135,12 @@ describe('v1.DataplexServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listZoneActions, request) ); - assert.strictEqual( - ( - client.descriptors.page.listZoneActions.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listZoneActions.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5025,8 +5153,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListZoneActionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), @@ -5046,11 +5178,12 @@ describe('v1.DataplexServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listZoneActions.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listZoneActions.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5063,8 +5196,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListZoneActionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listZoneActions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -5081,11 +5218,12 @@ describe('v1.DataplexServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listZoneActions.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listZoneActions.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -5100,15 +5238,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListAssetsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListAssetsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), @@ -5117,11 +5252,14 @@ describe('v1.DataplexServiceClient', () => { client.innerApiCalls.listAssets = stubSimpleCall(expectedResponse); const [response] = await client.listAssets(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listAssets as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listAssets as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAssets as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listAssets without error using callback', async () => { @@ -5133,15 +5271,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListAssetsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListAssetsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), @@ -5166,11 +5301,14 @@ describe('v1.DataplexServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listAssets as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listAssets as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAssets as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listAssets with error', async () => { @@ -5182,26 +5320,26 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListAssetsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListAssetsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listAssets = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listAssets(request), expectedError); - assert( - (client.innerApiCalls.listAssets as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listAssets as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAssets as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listAssetsStream without error', async () => { @@ -5213,8 +5351,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListAssetsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListAssetsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), @@ -5242,11 +5384,12 @@ describe('v1.DataplexServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listAssets, request) ); - assert.strictEqual( - (client.descriptors.page.listAssets.createStream as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listAssets.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5259,8 +5402,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListAssetsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListAssetsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listAssets.createStream = stubPageStreamingCall( undefined, @@ -5285,11 +5432,12 @@ describe('v1.DataplexServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listAssets, request) ); - assert.strictEqual( - (client.descriptors.page.listAssets.createStream as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listAssets.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5302,8 +5450,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListAssetsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListAssetsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), @@ -5323,11 +5475,12 @@ describe('v1.DataplexServiceClient', () => { ).args[1], request ); - assert.strictEqual( - (client.descriptors.page.listAssets.asyncIterate as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listAssets.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5340,8 +5493,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListAssetsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListAssetsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listAssets.asyncIterate = stubAsyncIterationCall( undefined, @@ -5360,11 +5517,12 @@ describe('v1.DataplexServiceClient', () => { ).args[1], request ); - assert.strictEqual( - (client.descriptors.page.listAssets.asyncIterate as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listAssets.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -5379,15 +5537,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListAssetActionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), @@ -5396,11 +5551,14 @@ describe('v1.DataplexServiceClient', () => { client.innerApiCalls.listAssetActions = stubSimpleCall(expectedResponse); const [response] = await client.listAssetActions(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listAssetActions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listAssetActions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAssetActions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listAssetActions without error using callback', async () => { @@ -5412,15 +5570,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListAssetActionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), @@ -5445,11 +5600,14 @@ describe('v1.DataplexServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listAssetActions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listAssetActions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAssetActions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listAssetActions with error', async () => { @@ -5461,26 +5619,26 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListAssetActionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listAssetActions = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listAssetActions(request), expectedError); - assert( - (client.innerApiCalls.listAssetActions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listAssetActions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAssetActions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listAssetActionsStream without error', async () => { @@ -5492,8 +5650,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListAssetActionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), @@ -5524,11 +5686,12 @@ describe('v1.DataplexServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listAssetActions, request) ); - assert.strictEqual( - ( - client.descriptors.page.listAssetActions.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listAssetActions.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5541,8 +5704,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListAssetActionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listAssetActions.createStream = stubPageStreamingCall(undefined, expectedError); @@ -5568,11 +5735,12 @@ describe('v1.DataplexServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listAssetActions, request) ); - assert.strictEqual( - ( - client.descriptors.page.listAssetActions.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listAssetActions.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5585,8 +5753,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListAssetActionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), @@ -5606,11 +5778,12 @@ describe('v1.DataplexServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listAssetActions.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listAssetActions.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5623,8 +5796,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListAssetActionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listAssetActions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -5641,11 +5818,12 @@ describe('v1.DataplexServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listAssetActions.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listAssetActions.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -5660,15 +5838,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListTasksRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListTasksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), @@ -5677,11 +5852,14 @@ describe('v1.DataplexServiceClient', () => { client.innerApiCalls.listTasks = stubSimpleCall(expectedResponse); const [response] = await client.listTasks(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listTasks as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listTasks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listTasks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listTasks without error using callback', async () => { @@ -5693,15 +5871,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListTasksRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListTasksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), @@ -5726,11 +5901,14 @@ describe('v1.DataplexServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listTasks as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listTasks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listTasks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listTasks with error', async () => { @@ -5742,23 +5920,23 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListTasksRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListTasksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listTasks = stubSimpleCall(undefined, expectedError); await assert.rejects(client.listTasks(request), expectedError); - assert( - (client.innerApiCalls.listTasks as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listTasks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listTasks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listTasksStream without error', async () => { @@ -5770,8 +5948,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListTasksRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListTasksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), @@ -5799,10 +5981,12 @@ describe('v1.DataplexServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listTasks, request) ); - assert.strictEqual( - (client.descriptors.page.listTasks.createStream as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listTasks.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5815,8 +5999,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListTasksRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListTasksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listTasks.createStream = stubPageStreamingCall( undefined, @@ -5841,10 +6029,12 @@ describe('v1.DataplexServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listTasks, request) ); - assert.strictEqual( - (client.descriptors.page.listTasks.createStream as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listTasks.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5857,8 +6047,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListTasksRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListTasksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), @@ -5877,10 +6071,12 @@ describe('v1.DataplexServiceClient', () => { .args[1], request ); - assert.strictEqual( - (client.descriptors.page.listTasks.asyncIterate as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listTasks.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5893,8 +6089,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListTasksRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListTasksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listTasks.asyncIterate = stubAsyncIterationCall( undefined, @@ -5912,10 +6112,12 @@ describe('v1.DataplexServiceClient', () => { .args[1], request ); - assert.strictEqual( - (client.descriptors.page.listTasks.asyncIterate as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listTasks.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -5930,15 +6132,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListJobsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListJobsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), @@ -5947,11 +6146,14 @@ describe('v1.DataplexServiceClient', () => { client.innerApiCalls.listJobs = stubSimpleCall(expectedResponse); const [response] = await client.listJobs(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listJobs as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listJobs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listJobs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listJobs without error using callback', async () => { @@ -5963,15 +6165,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListJobsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListJobsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), @@ -5996,11 +6195,14 @@ describe('v1.DataplexServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listJobs as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listJobs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listJobs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listJobs with error', async () => { @@ -6012,23 +6214,23 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListJobsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListJobsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listJobs = stubSimpleCall(undefined, expectedError); await assert.rejects(client.listJobs(request), expectedError); - assert( - (client.innerApiCalls.listJobs as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listJobs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listJobs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listJobsStream without error', async () => { @@ -6040,8 +6242,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListJobsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListJobsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), @@ -6069,10 +6275,12 @@ describe('v1.DataplexServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listJobs, request) ); - assert.strictEqual( - (client.descriptors.page.listJobs.createStream as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listJobs.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -6085,8 +6293,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListJobsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListJobsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listJobs.createStream = stubPageStreamingCall( undefined, @@ -6111,10 +6323,12 @@ describe('v1.DataplexServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listJobs, request) ); - assert.strictEqual( - (client.descriptors.page.listJobs.createStream as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listJobs.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -6127,8 +6341,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListJobsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListJobsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), @@ -6147,10 +6365,12 @@ describe('v1.DataplexServiceClient', () => { .args[1], request ); - assert.strictEqual( - (client.descriptors.page.listJobs.asyncIterate as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listJobs.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -6163,8 +6383,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListJobsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListJobsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listJobs.asyncIterate = stubAsyncIterationCall( undefined, @@ -6182,10 +6406,12 @@ describe('v1.DataplexServiceClient', () => { .args[1], request ); - assert.strictEqual( - (client.descriptors.page.listJobs.asyncIterate as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listJobs.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -6200,15 +6426,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEnvironmentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListEnvironmentsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataplex.v1.Environment() @@ -6223,11 +6446,14 @@ describe('v1.DataplexServiceClient', () => { client.innerApiCalls.listEnvironments = stubSimpleCall(expectedResponse); const [response] = await client.listEnvironments(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listEnvironments as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listEnvironments as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listEnvironments as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listEnvironments without error using callback', async () => { @@ -6239,15 +6465,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEnvironmentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListEnvironmentsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataplex.v1.Environment() @@ -6278,11 +6501,14 @@ describe('v1.DataplexServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listEnvironments as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listEnvironments as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listEnvironments as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listEnvironments with error', async () => { @@ -6294,26 +6520,26 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEnvironmentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListEnvironmentsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listEnvironments = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listEnvironments(request), expectedError); - assert( - (client.innerApiCalls.listEnvironments as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listEnvironments as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listEnvironments as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listEnvironmentsStream without error', async () => { @@ -6325,8 +6551,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEnvironmentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListEnvironmentsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataplex.v1.Environment() @@ -6363,11 +6593,12 @@ describe('v1.DataplexServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listEnvironments, request) ); - assert.strictEqual( - ( - client.descriptors.page.listEnvironments.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listEnvironments.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -6380,8 +6611,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEnvironmentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListEnvironmentsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listEnvironments.createStream = stubPageStreamingCall(undefined, expectedError); @@ -6407,11 +6642,12 @@ describe('v1.DataplexServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listEnvironments, request) ); - assert.strictEqual( - ( - client.descriptors.page.listEnvironments.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listEnvironments.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -6424,8 +6660,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEnvironmentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListEnvironmentsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.dataplex.v1.Environment() @@ -6451,11 +6691,12 @@ describe('v1.DataplexServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listEnvironments.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listEnvironments.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -6468,8 +6709,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEnvironmentsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListEnvironmentsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listEnvironments.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -6486,11 +6731,12 @@ describe('v1.DataplexServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listEnvironments.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listEnvironments.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -6505,15 +6751,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListSessionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListSessionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), @@ -6522,11 +6765,14 @@ describe('v1.DataplexServiceClient', () => { client.innerApiCalls.listSessions = stubSimpleCall(expectedResponse); const [response] = await client.listSessions(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listSessions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listSessions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listSessions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listSessions without error using callback', async () => { @@ -6538,15 +6784,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListSessionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListSessionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), @@ -6571,11 +6814,14 @@ describe('v1.DataplexServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listSessions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listSessions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listSessions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listSessions with error', async () => { @@ -6587,26 +6833,26 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListSessionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListSessionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listSessions = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listSessions(request), expectedError); - assert( - (client.innerApiCalls.listSessions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listSessions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listSessions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listSessionsStream without error', async () => { @@ -6618,8 +6864,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListSessionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListSessionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), @@ -6650,11 +6900,12 @@ describe('v1.DataplexServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listSessions, request) ); - assert.strictEqual( - ( - client.descriptors.page.listSessions.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listSessions.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -6667,8 +6918,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListSessionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListSessionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listSessions.createStream = stubPageStreamingCall( undefined, @@ -6696,11 +6951,12 @@ describe('v1.DataplexServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listSessions, request) ); - assert.strictEqual( - ( - client.descriptors.page.listSessions.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listSessions.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -6713,8 +6969,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListSessionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListSessionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), @@ -6734,11 +6994,12 @@ describe('v1.DataplexServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listSessions.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listSessions.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -6751,8 +7012,12 @@ describe('v1.DataplexServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListSessionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListSessionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listSessions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -6769,11 +7034,210 @@ describe('v1.DataplexServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( + (client.descriptors.page.listSessions.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getLocation without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub).getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getLocation(request, expectedOptions), + expectedError + ); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( ( - client.descriptors.page.listSessions.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); diff --git a/packages/google-cloud-dataplex/test/gapic_metadata_service_v1.ts b/packages/google-cloud-dataplex/test/gapic_metadata_service_v1.ts index 023b2824e83..4ef46153001 100644 --- a/packages/google-cloud-dataplex/test/gapic_metadata_service_v1.ts +++ b/packages/google-cloud-dataplex/test/gapic_metadata_service_v1.ts @@ -25,7 +25,22 @@ import * as metadataserviceModule from '../src'; import {PassThrough} from 'stream'; -import {protobuf} from 'google-gax'; +import {protobuf, LocationProtos} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} function generateSampleMessage(instance: T) { const filledObject = ( @@ -113,101 +128,103 @@ function stubAsyncIterationCall( } describe('v1.MetadataServiceClient', () => { - it('has servicePath', () => { - const servicePath = - metadataserviceModule.v1.MetadataServiceClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - metadataserviceModule.v1.MetadataServiceClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = metadataserviceModule.v1.MetadataServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + metadataserviceModule.v1.MetadataServiceClient.servicePath; + assert(servicePath); + }); - it('should create a client with no option', () => { - const client = new metadataserviceModule.v1.MetadataServiceClient(); - assert(client); - }); + it('has apiEndpoint', () => { + const apiEndpoint = + metadataserviceModule.v1.MetadataServiceClient.apiEndpoint; + assert(apiEndpoint); + }); - it('should create a client with gRPC fallback', () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - fallback: true, + it('has port', () => { + const port = metadataserviceModule.v1.MetadataServiceClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new metadataserviceModule.v1.MetadataServiceClient(); + assert(client); }); - assert.strictEqual(client.metadataServiceStub, undefined); - await client.initialize(); - assert(client.metadataServiceStub); - }); - it('has close method for the initialized client', done => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with gRPC fallback', () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + fallback: true, + }); + assert(client); }); - client.initialize(); - assert(client.metadataServiceStub); - client.close().then(() => { - done(); + + it('has initialize method and supports deferred initialization', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.metadataServiceStub, undefined); + await client.initialize(); + assert(client.metadataServiceStub); }); - }); - it('has close method for the non-initialized client', done => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.metadataServiceStub); + client.close().then(() => { + done(); + }); }); - assert.strictEqual(client.metadataServiceStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the non-initialized client', done => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.metadataServiceStub, undefined); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('createEntity', () => { @@ -220,26 +237,26 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateEntityRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CreateEntityRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataplex.v1.Entity() ); client.innerApiCalls.createEntity = stubSimpleCall(expectedResponse); const [response] = await client.createEntity(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createEntity as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createEntity as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createEntity as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createEntity without error using callback', async () => { @@ -251,15 +268,12 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateEntityRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CreateEntityRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataplex.v1.Entity() ); @@ -282,11 +296,14 @@ describe('v1.MetadataServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createEntity as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createEntity as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createEntity as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createEntity with error', async () => { @@ -298,26 +315,26 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateEntityRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CreateEntityRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createEntity = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.createEntity(request), expectedError); - assert( - (client.innerApiCalls.createEntity as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createEntity as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createEntity as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createEntity with closed client', async () => { @@ -329,7 +346,11 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateEntityRequest() ); - request.parent = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CreateEntityRequest', + ['parent'] + ); + request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createEntity(request), expectedError); @@ -346,27 +367,27 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateEntityRequest() ); - request.entity = {}; - request.entity.name = ''; - const expectedHeaderRequestParams = 'entity.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.entity ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.UpdateEntityRequest', + ['entity', 'name'] + ); + request.entity.name = defaultValue1; + const expectedHeaderRequestParams = `entity.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataplex.v1.Entity() ); client.innerApiCalls.updateEntity = stubSimpleCall(expectedResponse); const [response] = await client.updateEntity(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateEntity as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateEntity as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateEntity as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateEntity without error using callback', async () => { @@ -378,16 +399,13 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateEntityRequest() ); - request.entity = {}; - request.entity.name = ''; - const expectedHeaderRequestParams = 'entity.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.entity ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.UpdateEntityRequest', + ['entity', 'name'] + ); + request.entity.name = defaultValue1; + const expectedHeaderRequestParams = `entity.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataplex.v1.Entity() ); @@ -410,11 +428,14 @@ describe('v1.MetadataServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateEntity as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updateEntity as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateEntity as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateEntity with error', async () => { @@ -426,27 +447,27 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateEntityRequest() ); - request.entity = {}; - request.entity.name = ''; - const expectedHeaderRequestParams = 'entity.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.entity ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.UpdateEntityRequest', + ['entity', 'name'] + ); + request.entity.name = defaultValue1; + const expectedHeaderRequestParams = `entity.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateEntity = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.updateEntity(request), expectedError); - assert( - (client.innerApiCalls.updateEntity as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateEntity as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateEntity as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateEntity with closed client', async () => { @@ -458,8 +479,12 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateEntityRequest() ); - request.entity = {}; - request.entity.name = ''; + request.entity ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.UpdateEntityRequest', + ['entity', 'name'] + ); + request.entity.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.updateEntity(request), expectedError); @@ -476,26 +501,26 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteEntityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.DeleteEntityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); client.innerApiCalls.deleteEntity = stubSimpleCall(expectedResponse); const [response] = await client.deleteEntity(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteEntity as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteEntity as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteEntity as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteEntity without error using callback', async () => { @@ -507,15 +532,12 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteEntityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.DeleteEntityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -538,11 +560,14 @@ describe('v1.MetadataServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteEntity as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteEntity as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteEntity as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteEntity with error', async () => { @@ -554,26 +579,26 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteEntityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.DeleteEntityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteEntity = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.deleteEntity(request), expectedError); - assert( - (client.innerApiCalls.deleteEntity as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteEntity as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteEntity as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteEntity with closed client', async () => { @@ -585,7 +610,11 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteEntityRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.DeleteEntityRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.deleteEntity(request), expectedError); @@ -602,26 +631,26 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetEntityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetEntityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataplex.v1.Entity() ); client.innerApiCalls.getEntity = stubSimpleCall(expectedResponse); const [response] = await client.getEntity(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getEntity as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getEntity as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getEntity as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getEntity without error using callback', async () => { @@ -633,15 +662,12 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetEntityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetEntityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataplex.v1.Entity() ); @@ -664,11 +690,14 @@ describe('v1.MetadataServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getEntity as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getEntity as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getEntity as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getEntity with error', async () => { @@ -680,23 +709,23 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetEntityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetEntityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getEntity = stubSimpleCall(undefined, expectedError); await assert.rejects(client.getEntity(request), expectedError); - assert( - (client.innerApiCalls.getEntity as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getEntity as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getEntity as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getEntity with closed client', async () => { @@ -708,7 +737,11 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetEntityRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetEntityRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getEntity(request), expectedError); @@ -725,26 +758,26 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreatePartitionRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CreatePartitionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataplex.v1.Partition() ); client.innerApiCalls.createPartition = stubSimpleCall(expectedResponse); const [response] = await client.createPartition(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createPartition as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createPartition as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createPartition as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createPartition without error using callback', async () => { @@ -756,15 +789,12 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreatePartitionRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CreatePartitionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataplex.v1.Partition() ); @@ -787,11 +817,14 @@ describe('v1.MetadataServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createPartition as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createPartition as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createPartition as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createPartition with error', async () => { @@ -803,26 +836,26 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreatePartitionRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CreatePartitionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createPartition = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.createPartition(request), expectedError); - assert( - (client.innerApiCalls.createPartition as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createPartition as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createPartition as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createPartition with closed client', async () => { @@ -834,7 +867,11 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreatePartitionRequest() ); - request.parent = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CreatePartitionRequest', + ['parent'] + ); + request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createPartition(request), expectedError); @@ -851,26 +888,26 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeletePartitionRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.DeletePartitionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); client.innerApiCalls.deletePartition = stubSimpleCall(expectedResponse); const [response] = await client.deletePartition(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deletePartition as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deletePartition as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deletePartition as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deletePartition without error using callback', async () => { @@ -882,15 +919,12 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeletePartitionRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.DeletePartitionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -913,11 +947,14 @@ describe('v1.MetadataServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deletePartition as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deletePartition as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deletePartition as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deletePartition with error', async () => { @@ -929,26 +966,26 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeletePartitionRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.DeletePartitionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deletePartition = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.deletePartition(request), expectedError); - assert( - (client.innerApiCalls.deletePartition as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deletePartition as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deletePartition as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deletePartition with closed client', async () => { @@ -960,7 +997,11 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeletePartitionRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.DeletePartitionRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.deletePartition(request), expectedError); @@ -977,26 +1018,26 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetPartitionRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetPartitionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataplex.v1.Partition() ); client.innerApiCalls.getPartition = stubSimpleCall(expectedResponse); const [response] = await client.getPartition(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getPartition as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getPartition as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getPartition as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getPartition without error using callback', async () => { @@ -1008,15 +1049,12 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetPartitionRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetPartitionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.dataplex.v1.Partition() ); @@ -1039,11 +1077,14 @@ describe('v1.MetadataServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getPartition as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getPartition as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getPartition as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getPartition with error', async () => { @@ -1055,26 +1096,26 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetPartitionRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetPartitionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getPartition = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getPartition(request), expectedError); - assert( - (client.innerApiCalls.getPartition as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getPartition as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getPartition as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getPartition with closed client', async () => { @@ -1086,7 +1127,11 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetPartitionRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetPartitionRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getPartition(request), expectedError); @@ -1103,15 +1148,12 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEntitiesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListEntitiesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), @@ -1120,11 +1162,14 @@ describe('v1.MetadataServiceClient', () => { client.innerApiCalls.listEntities = stubSimpleCall(expectedResponse); const [response] = await client.listEntities(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listEntities as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listEntities as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listEntities as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listEntities without error using callback', async () => { @@ -1136,15 +1181,12 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEntitiesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListEntitiesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), @@ -1169,11 +1211,14 @@ describe('v1.MetadataServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listEntities as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listEntities as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listEntities as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listEntities with error', async () => { @@ -1185,26 +1230,26 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEntitiesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListEntitiesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listEntities = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listEntities(request), expectedError); - assert( - (client.innerApiCalls.listEntities as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listEntities as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listEntities as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listEntitiesStream without error', async () => { @@ -1216,8 +1261,12 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEntitiesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListEntitiesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), @@ -1248,11 +1297,12 @@ describe('v1.MetadataServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listEntities, request) ); - assert.strictEqual( - ( - client.descriptors.page.listEntities.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listEntities.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -1265,8 +1315,12 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEntitiesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListEntitiesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listEntities.createStream = stubPageStreamingCall( undefined, @@ -1294,11 +1348,12 @@ describe('v1.MetadataServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listEntities, request) ); - assert.strictEqual( - ( - client.descriptors.page.listEntities.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listEntities.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -1311,8 +1366,12 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEntitiesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListEntitiesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), @@ -1332,11 +1391,12 @@ describe('v1.MetadataServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listEntities.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listEntities.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -1349,8 +1409,12 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEntitiesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListEntitiesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listEntities.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -1367,11 +1431,12 @@ describe('v1.MetadataServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listEntities.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listEntities.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -1386,15 +1451,12 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListPartitionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListPartitionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), @@ -1403,11 +1465,14 @@ describe('v1.MetadataServiceClient', () => { client.innerApiCalls.listPartitions = stubSimpleCall(expectedResponse); const [response] = await client.listPartitions(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listPartitions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listPartitions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listPartitions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listPartitions without error using callback', async () => { @@ -1419,15 +1484,12 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListPartitionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListPartitionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), @@ -1452,11 +1514,14 @@ describe('v1.MetadataServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listPartitions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listPartitions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listPartitions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listPartitions with error', async () => { @@ -1468,26 +1533,26 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListPartitionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListPartitionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listPartitions = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listPartitions(request), expectedError); - assert( - (client.innerApiCalls.listPartitions as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listPartitions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listPartitions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listPartitionsStream without error', async () => { @@ -1499,8 +1564,12 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListPartitionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListPartitionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), @@ -1531,11 +1600,12 @@ describe('v1.MetadataServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listPartitions, request) ); - assert.strictEqual( - ( - client.descriptors.page.listPartitions.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listPartitions.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -1548,8 +1618,12 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListPartitionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListPartitionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listPartitions.createStream = stubPageStreamingCall(undefined, expectedError); @@ -1575,11 +1649,12 @@ describe('v1.MetadataServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listPartitions, request) ); - assert.strictEqual( - ( - client.descriptors.page.listPartitions.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listPartitions.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -1592,8 +1667,12 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListPartitionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListPartitionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), @@ -1613,11 +1692,12 @@ describe('v1.MetadataServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listPartitions.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listPartitions.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -1630,8 +1710,12 @@ describe('v1.MetadataServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListPartitionsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListPartitionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listPartitions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -1648,11 +1732,210 @@ describe('v1.MetadataServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( + (client.descriptors.page.listPartitions.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getLocation without error using callback', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub).getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getLocation(request, expectedOptions), + expectedError + ); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( ( - client.descriptors.page.listPartitions.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); From 70e658611cf4c65c952f4c1b1fc0463f941a41f1 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 21 Sep 2022 13:39:43 -0700 Subject: [PATCH 238/254] build: use fully qualified request type name in integration tests (#68) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit *build: use fully qualified request type name in tests PiperOrigin-RevId: 475685359 Source-Link: https://github.com/googleapis/googleapis/commit/7a129736313ceb1f277c3b7f7e16d2e04cc901dd Source-Link: https://github.com/googleapis/googleapis-gen/commit/370c729e2ba062a167449c27882ba5f379c5c34d Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzcwYzcyOWUyYmEwNjJhMTY3NDQ5YzI3ODgyYmE1ZjM3OWM1YzM0ZCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../test/gapic_cloud_deploy_v1.ts | 465 +++++++++++------- 1 file changed, 279 insertions(+), 186 deletions(-) diff --git a/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts b/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts index 847def424c3..32d580d2096 100644 --- a/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts +++ b/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts @@ -267,9 +267,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetDeliveryPipelineRequest() ); - const defaultValue1 = getTypeDefaultValue('GetDeliveryPipelineRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.GetDeliveryPipelineRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -298,9 +299,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetDeliveryPipelineRequest() ); - const defaultValue1 = getTypeDefaultValue('GetDeliveryPipelineRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.GetDeliveryPipelineRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -344,9 +346,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetDeliveryPipelineRequest() ); - const defaultValue1 = getTypeDefaultValue('GetDeliveryPipelineRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.GetDeliveryPipelineRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -374,9 +377,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetDeliveryPipelineRequest() ); - const defaultValue1 = getTypeDefaultValue('GetDeliveryPipelineRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.GetDeliveryPipelineRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -394,7 +398,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetTargetRequest() ); - const defaultValue1 = getTypeDefaultValue('GetTargetRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.GetTargetRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -422,7 +429,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetTargetRequest() ); - const defaultValue1 = getTypeDefaultValue('GetTargetRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.GetTargetRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -466,7 +476,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetTargetRequest() ); - const defaultValue1 = getTypeDefaultValue('GetTargetRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.GetTargetRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -491,7 +504,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetTargetRequest() ); - const defaultValue1 = getTypeDefaultValue('GetTargetRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.GetTargetRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -509,7 +525,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetReleaseRequest() ); - const defaultValue1 = getTypeDefaultValue('GetReleaseRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.GetReleaseRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -537,7 +556,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetReleaseRequest() ); - const defaultValue1 = getTypeDefaultValue('GetReleaseRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.GetReleaseRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -581,7 +603,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetReleaseRequest() ); - const defaultValue1 = getTypeDefaultValue('GetReleaseRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.GetReleaseRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -609,7 +634,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetReleaseRequest() ); - const defaultValue1 = getTypeDefaultValue('GetReleaseRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.GetReleaseRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -627,9 +655,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ApproveRolloutRequest() ); - const defaultValue1 = getTypeDefaultValue('ApproveRolloutRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ApproveRolloutRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -657,9 +686,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ApproveRolloutRequest() ); - const defaultValue1 = getTypeDefaultValue('ApproveRolloutRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ApproveRolloutRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -703,9 +733,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ApproveRolloutRequest() ); - const defaultValue1 = getTypeDefaultValue('ApproveRolloutRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ApproveRolloutRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -733,9 +764,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ApproveRolloutRequest() ); - const defaultValue1 = getTypeDefaultValue('ApproveRolloutRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ApproveRolloutRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -753,7 +785,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetRolloutRequest() ); - const defaultValue1 = getTypeDefaultValue('GetRolloutRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.GetRolloutRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -781,7 +816,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetRolloutRequest() ); - const defaultValue1 = getTypeDefaultValue('GetRolloutRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.GetRolloutRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -825,7 +863,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetRolloutRequest() ); - const defaultValue1 = getTypeDefaultValue('GetRolloutRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.GetRolloutRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -853,7 +894,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetRolloutRequest() ); - const defaultValue1 = getTypeDefaultValue('GetRolloutRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.GetRolloutRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -871,7 +915,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetConfigRequest() ); - const defaultValue1 = getTypeDefaultValue('GetConfigRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.GetConfigRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -899,7 +946,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetConfigRequest() ); - const defaultValue1 = getTypeDefaultValue('GetConfigRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.GetConfigRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -943,7 +993,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetConfigRequest() ); - const defaultValue1 = getTypeDefaultValue('GetConfigRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.GetConfigRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -968,7 +1021,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetConfigRequest() ); - const defaultValue1 = getTypeDefaultValue('GetConfigRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.GetConfigRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -987,7 +1043,7 @@ describe('v1.CloudDeployClient', () => { new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateDeliveryPipelineRequest', + '.google.cloud.deploy.v1.CreateDeliveryPipelineRequest', ['parent'] ); request.parent = defaultValue1; @@ -1020,7 +1076,7 @@ describe('v1.CloudDeployClient', () => { new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateDeliveryPipelineRequest', + '.google.cloud.deploy.v1.CreateDeliveryPipelineRequest', ['parent'] ); request.parent = defaultValue1; @@ -1074,7 +1130,7 @@ describe('v1.CloudDeployClient', () => { new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateDeliveryPipelineRequest', + '.google.cloud.deploy.v1.CreateDeliveryPipelineRequest', ['parent'] ); request.parent = defaultValue1; @@ -1108,7 +1164,7 @@ describe('v1.CloudDeployClient', () => { new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateDeliveryPipelineRequest', + '.google.cloud.deploy.v1.CreateDeliveryPipelineRequest', ['parent'] ); request.parent = defaultValue1; @@ -1185,7 +1241,7 @@ describe('v1.CloudDeployClient', () => { ); request.deliveryPipeline ??= {}; const defaultValue1 = getTypeDefaultValue( - 'UpdateDeliveryPipelineRequest', + '.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest', ['deliveryPipeline', 'name'] ); request.deliveryPipeline.name = defaultValue1; @@ -1219,7 +1275,7 @@ describe('v1.CloudDeployClient', () => { ); request.deliveryPipeline ??= {}; const defaultValue1 = getTypeDefaultValue( - 'UpdateDeliveryPipelineRequest', + '.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest', ['deliveryPipeline', 'name'] ); request.deliveryPipeline.name = defaultValue1; @@ -1274,7 +1330,7 @@ describe('v1.CloudDeployClient', () => { ); request.deliveryPipeline ??= {}; const defaultValue1 = getTypeDefaultValue( - 'UpdateDeliveryPipelineRequest', + '.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest', ['deliveryPipeline', 'name'] ); request.deliveryPipeline.name = defaultValue1; @@ -1309,7 +1365,7 @@ describe('v1.CloudDeployClient', () => { ); request.deliveryPipeline ??= {}; const defaultValue1 = getTypeDefaultValue( - 'UpdateDeliveryPipelineRequest', + '.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest', ['deliveryPipeline', 'name'] ); request.deliveryPipeline.name = defaultValue1; @@ -1385,7 +1441,7 @@ describe('v1.CloudDeployClient', () => { new protos.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DeleteDeliveryPipelineRequest', + '.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest', ['name'] ); request.name = defaultValue1; @@ -1418,7 +1474,7 @@ describe('v1.CloudDeployClient', () => { new protos.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DeleteDeliveryPipelineRequest', + '.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest', ['name'] ); request.name = defaultValue1; @@ -1472,7 +1528,7 @@ describe('v1.CloudDeployClient', () => { new protos.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DeleteDeliveryPipelineRequest', + '.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest', ['name'] ); request.name = defaultValue1; @@ -1506,7 +1562,7 @@ describe('v1.CloudDeployClient', () => { new protos.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DeleteDeliveryPipelineRequest', + '.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest', ['name'] ); request.name = defaultValue1; @@ -1581,9 +1637,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateTargetRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateTargetRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.CreateTargetRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1612,9 +1669,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateTargetRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateTargetRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.CreateTargetRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1665,9 +1723,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateTargetRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateTargetRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.CreateTargetRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1695,9 +1754,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateTargetRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateTargetRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.CreateTargetRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1768,10 +1828,10 @@ describe('v1.CloudDeployClient', () => { new protos.google.cloud.deploy.v1.UpdateTargetRequest() ); request.target ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateTargetRequest', [ - 'target', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.UpdateTargetRequest', + ['target', 'name'] + ); request.target.name = defaultValue1; const expectedHeaderRequestParams = `target.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1801,10 +1861,10 @@ describe('v1.CloudDeployClient', () => { new protos.google.cloud.deploy.v1.UpdateTargetRequest() ); request.target ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateTargetRequest', [ - 'target', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.UpdateTargetRequest', + ['target', 'name'] + ); request.target.name = defaultValue1; const expectedHeaderRequestParams = `target.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1856,10 +1916,10 @@ describe('v1.CloudDeployClient', () => { new protos.google.cloud.deploy.v1.UpdateTargetRequest() ); request.target ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateTargetRequest', [ - 'target', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.UpdateTargetRequest', + ['target', 'name'] + ); request.target.name = defaultValue1; const expectedHeaderRequestParams = `target.name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1888,10 +1948,10 @@ describe('v1.CloudDeployClient', () => { new protos.google.cloud.deploy.v1.UpdateTargetRequest() ); request.target ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateTargetRequest', [ - 'target', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.UpdateTargetRequest', + ['target', 'name'] + ); request.target.name = defaultValue1; const expectedHeaderRequestParams = `target.name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1961,9 +2021,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.DeleteTargetRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteTargetRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.DeleteTargetRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1992,9 +2053,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.DeleteTargetRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteTargetRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.DeleteTargetRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2045,9 +2107,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.DeleteTargetRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteTargetRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.DeleteTargetRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2075,9 +2138,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.DeleteTargetRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteTargetRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.DeleteTargetRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2147,9 +2211,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateReleaseRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateReleaseRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.CreateReleaseRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2179,9 +2244,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateReleaseRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateReleaseRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.CreateReleaseRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2232,9 +2298,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateReleaseRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateReleaseRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.CreateReleaseRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2262,9 +2329,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateReleaseRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateReleaseRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.CreateReleaseRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2337,9 +2405,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateRolloutRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateRolloutRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.CreateRolloutRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2369,9 +2438,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateRolloutRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateRolloutRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.CreateRolloutRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2422,9 +2492,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateRolloutRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateRolloutRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.CreateRolloutRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2452,9 +2523,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateRolloutRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateRolloutRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.CreateRolloutRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2528,7 +2600,7 @@ describe('v1.CloudDeployClient', () => { new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListDeliveryPipelinesRequest', + '.google.cloud.deploy.v1.ListDeliveryPipelinesRequest', ['parent'] ); request.parent = defaultValue1; @@ -2568,7 +2640,7 @@ describe('v1.CloudDeployClient', () => { new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListDeliveryPipelinesRequest', + '.google.cloud.deploy.v1.ListDeliveryPipelinesRequest', ['parent'] ); request.parent = defaultValue1; @@ -2623,7 +2695,7 @@ describe('v1.CloudDeployClient', () => { new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListDeliveryPipelinesRequest', + '.google.cloud.deploy.v1.ListDeliveryPipelinesRequest', ['parent'] ); request.parent = defaultValue1; @@ -2657,7 +2729,7 @@ describe('v1.CloudDeployClient', () => { new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListDeliveryPipelinesRequest', + '.google.cloud.deploy.v1.ListDeliveryPipelinesRequest', ['parent'] ); request.parent = defaultValue1; @@ -2723,7 +2795,7 @@ describe('v1.CloudDeployClient', () => { new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListDeliveryPipelinesRequest', + '.google.cloud.deploy.v1.ListDeliveryPipelinesRequest', ['parent'] ); request.parent = defaultValue1; @@ -2778,7 +2850,7 @@ describe('v1.CloudDeployClient', () => { new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListDeliveryPipelinesRequest', + '.google.cloud.deploy.v1.ListDeliveryPipelinesRequest', ['parent'] ); request.parent = defaultValue1; @@ -2831,7 +2903,7 @@ describe('v1.CloudDeployClient', () => { new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListDeliveryPipelinesRequest', + '.google.cloud.deploy.v1.ListDeliveryPipelinesRequest', ['parent'] ); request.parent = defaultValue1; @@ -2876,9 +2948,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListTargetsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListTargetsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListTargetsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -2908,9 +2981,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListTargetsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListTargetsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListTargetsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -2956,9 +3030,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListTargetsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListTargetsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListTargetsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2986,9 +3061,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListTargetsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListTargetsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListTargetsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -3036,9 +3112,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListTargetsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListTargetsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListTargetsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -3083,9 +3160,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListTargetsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListTargetsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListTargetsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -3125,9 +3203,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListTargetsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListTargetsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListTargetsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -3168,9 +3247,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListReleasesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListReleasesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListReleasesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -3200,9 +3280,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListReleasesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListReleasesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListReleasesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -3248,9 +3329,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListReleasesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListReleasesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListReleasesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -3278,9 +3360,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListReleasesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListReleasesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListReleasesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -3328,9 +3411,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListReleasesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListReleasesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListReleasesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -3375,9 +3459,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListReleasesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListReleasesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListReleasesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -3417,9 +3502,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListReleasesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListReleasesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListReleasesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -3458,9 +3544,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListRolloutsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListRolloutsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListRolloutsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -3490,9 +3577,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListRolloutsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListRolloutsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListRolloutsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -3538,9 +3626,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListRolloutsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListRolloutsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListRolloutsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -3568,9 +3657,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListRolloutsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListRolloutsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListRolloutsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -3618,9 +3708,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListRolloutsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListRolloutsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListRolloutsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -3665,9 +3756,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListRolloutsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListRolloutsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListRolloutsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -3707,9 +3799,10 @@ describe('v1.CloudDeployClient', () => { const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListRolloutsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListRolloutsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListRolloutsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); From e5a4795a40cfc042a29dfda3014530659c983642 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 23 Sep 2022 14:22:31 -0700 Subject: [PATCH 239/254] chore(main): release 2.0.4 (#143) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 2.0.4 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- packages/google-cloud-policytroubleshooter/CHANGELOG.md | 7 +++++++ packages/google-cloud-policytroubleshooter/package.json | 2 +- ...ppet_metadata.google.cloud.policytroubleshooter.v1.json | 2 +- .../google-cloud-policytroubleshooter/samples/package.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-policytroubleshooter/CHANGELOG.md b/packages/google-cloud-policytroubleshooter/CHANGELOG.md index ada5091bd45..2e8348126f3 100644 --- a/packages/google-cloud-policytroubleshooter/CHANGELOG.md +++ b/packages/google-cloud-policytroubleshooter/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.0.4](https://github.com/googleapis/nodejs-policy-troubleshooter/compare/v2.0.3...v2.0.4) (2022-09-14) + + +### Bug Fixes + +* Preserve default values in x-goog-request-params header ([#142](https://github.com/googleapis/nodejs-policy-troubleshooter/issues/142)) ([98500d1](https://github.com/googleapis/nodejs-policy-troubleshooter/commit/98500d13ecdfa585aa500d507760c58e52ccf1bc)) + ## [2.0.3](https://github.com/googleapis/nodejs-policy-troubleshooter/compare/v2.0.2...v2.0.3) (2022-09-01) diff --git a/packages/google-cloud-policytroubleshooter/package.json b/packages/google-cloud-policytroubleshooter/package.json index 304090031a3..52cf210b319 100644 --- a/packages/google-cloud-policytroubleshooter/package.json +++ b/packages/google-cloud-policytroubleshooter/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/policy-troubleshooter", - "version": "2.0.3", + "version": "2.0.4", "description": "Policytroubleshooter client for Node.js", "repository": "googleapis/nodejs-policy-troubleshooter", "license": "Apache-2.0", diff --git a/packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata.google.cloud.policytroubleshooter.v1.json b/packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata.google.cloud.policytroubleshooter.v1.json index d7d57e7ca52..357c6a16d46 100644 --- a/packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata.google.cloud.policytroubleshooter.v1.json +++ b/packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata.google.cloud.policytroubleshooter.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-policytroubleshooter", - "version": "2.0.3", + "version": "2.0.4", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-policytroubleshooter/samples/package.json b/packages/google-cloud-policytroubleshooter/samples/package.json index 244411fb345..204f6334b0c 100644 --- a/packages/google-cloud-policytroubleshooter/samples/package.json +++ b/packages/google-cloud-policytroubleshooter/samples/package.json @@ -14,7 +14,7 @@ }, "dependencies": { "@google-cloud/local-auth": "^2.0.0", - "@google-cloud/policy-troubleshooter": "^2.0.3" + "@google-cloud/policy-troubleshooter": "^2.0.4" }, "devDependencies": { "c8": "^7.1.0", From 9db968893c3672085e1293d23e60a9ae3bbd5f91 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 23 Sep 2022 14:31:04 -0700 Subject: [PATCH 240/254] chore(main): release 2.0.3 (#88) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 2.0.3 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- packages/google-cloud-gkeconnect-gateway/CHANGELOG.md | 7 +++++++ packages/google-cloud-gkeconnect-gateway/package.json | 2 +- ...t_metadata.google.cloud.gkeconnect.gateway.v1beta1.json | 2 +- .../google-cloud-gkeconnect-gateway/samples/package.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-gkeconnect-gateway/CHANGELOG.md b/packages/google-cloud-gkeconnect-gateway/CHANGELOG.md index 2150341d535..ab09f9a0934 100644 --- a/packages/google-cloud-gkeconnect-gateway/CHANGELOG.md +++ b/packages/google-cloud-gkeconnect-gateway/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.0.3](https://github.com/googleapis/nodejs-gke-connect-gateway/compare/v2.0.2...v2.0.3) (2022-09-14) + + +### Bug Fixes + +* Preserve default values in x-goog-request-params header ([#87](https://github.com/googleapis/nodejs-gke-connect-gateway/issues/87)) ([99112c8](https://github.com/googleapis/nodejs-gke-connect-gateway/commit/99112c89e562b257cae232cc38d7769d77f04731)) + ## [2.0.2](https://github.com/googleapis/nodejs-gke-connect-gateway/compare/v2.0.1...v2.0.2) (2022-09-01) diff --git a/packages/google-cloud-gkeconnect-gateway/package.json b/packages/google-cloud-gkeconnect-gateway/package.json index 6a178aec6a8..8685b1c6e74 100644 --- a/packages/google-cloud-gkeconnect-gateway/package.json +++ b/packages/google-cloud-gkeconnect-gateway/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/gke-connect-gateway", - "version": "2.0.2", + "version": "2.0.3", "description": "apigateway client for Node.js", "repository": "googleapis/nodejs-gke-connect-gateway", "license": "Apache-2.0", diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/snippet_metadata.google.cloud.gkeconnect.gateway.v1beta1.json b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/snippet_metadata.google.cloud.gkeconnect.gateway.v1beta1.json index 45896f5fcca..33fc2d3fa0b 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/snippet_metadata.google.cloud.gkeconnect.gateway.v1beta1.json +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/snippet_metadata.google.cloud.gkeconnect.gateway.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-gateway", - "version": "2.0.2", + "version": "2.0.3", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-gkeconnect-gateway/samples/package.json b/packages/google-cloud-gkeconnect-gateway/samples/package.json index fb452b6a69b..6fbbadfd143 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/package.json +++ b/packages/google-cloud-gkeconnect-gateway/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/gke-connect-gateway": "^2.0.2" + "@google-cloud/gke-connect-gateway": "^2.0.3" }, "devDependencies": { "c8": "^7.1.0", From d1b5830bb1a355d47b40d187edb141404ea52a6e Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 23 Sep 2022 14:35:06 -0700 Subject: [PATCH 241/254] chore(main): release 2.1.2 (#65) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 2.1.2 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- packages/google-cloud-deploy/CHANGELOG.md | 10 ++++++++++ packages/google-cloud-deploy/package.json | 2 +- .../v1/snippet_metadata.google.cloud.deploy.v1.json | 2 +- packages/google-cloud-deploy/samples/package.json | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-deploy/CHANGELOG.md b/packages/google-cloud-deploy/CHANGELOG.md index 806712a09c0..3bf9b49b8cb 100644 --- a/packages/google-cloud-deploy/CHANGELOG.md +++ b/packages/google-cloud-deploy/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## [2.1.2](https://github.com/googleapis/nodejs-deploy/compare/v2.1.1...v2.1.2) (2022-09-21) + + +### Bug Fixes + +* Allow passing gax instance to client constructor ([#64](https://github.com/googleapis/nodejs-deploy/issues/64)) ([286143f](https://github.com/googleapis/nodejs-deploy/commit/286143f2e7aff409f57b57f58239c21fa16dc230)) +* Do not import the whole google-gax from proto JS ([#1553](https://github.com/googleapis/nodejs-deploy/issues/1553)) ([#63](https://github.com/googleapis/nodejs-deploy/issues/63)) ([024a0e4](https://github.com/googleapis/nodejs-deploy/commit/024a0e4e4902950fc9b40bfed77f2c2ceacf2fce)) +* Preserve default values in x-goog-request-params header ([#66](https://github.com/googleapis/nodejs-deploy/issues/66)) ([be84a26](https://github.com/googleapis/nodejs-deploy/commit/be84a262c1292cd804d7c3b4e0690e21ff122460)) +* use google-gax v3.3.0 ([024a0e4](https://github.com/googleapis/nodejs-deploy/commit/024a0e4e4902950fc9b40bfed77f2c2ceacf2fce)) + ## [2.1.1](https://github.com/googleapis/nodejs-deploy/compare/v2.1.0...v2.1.1) (2022-08-23) diff --git a/packages/google-cloud-deploy/package.json b/packages/google-cloud-deploy/package.json index 4549f1a1e74..d05eb1a59ad 100644 --- a/packages/google-cloud-deploy/package.json +++ b/packages/google-cloud-deploy/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/deploy", - "version": "2.1.1", + "version": "2.1.2", "description": "clouddeploy client for Node.js", "repository": "googleapis/nodejs-deploy", "license": "Apache-2.0", diff --git a/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json b/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json index 199de3e7cea..da4583908aa 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json +++ b/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-deploy", - "version": "2.1.1", + "version": "2.1.2", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-deploy/samples/package.json b/packages/google-cloud-deploy/samples/package.json index df61b0122e2..ec2c76a6175 100644 --- a/packages/google-cloud-deploy/samples/package.json +++ b/packages/google-cloud-deploy/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/deploy": "^2.1.1" + "@google-cloud/deploy": "^2.1.2" }, "devDependencies": { "c8": "^7.1.0", From ecbf956b421aafb69523266163008289a81001f6 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 23 Sep 2022 14:37:37 -0700 Subject: [PATCH 242/254] chore(main): release 2.2.0 (#52) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 2.2.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- packages/google-cloud-dataplex/CHANGELOG.md | 7 +++++++ packages/google-cloud-dataplex/package.json | 2 +- .../v1/snippet_metadata.google.cloud.dataplex.v1.json | 2 +- packages/google-cloud-dataplex/samples/package.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-dataplex/CHANGELOG.md b/packages/google-cloud-dataplex/CHANGELOG.md index 2270e42b0a5..3d934ffb43f 100644 --- a/packages/google-cloud-dataplex/CHANGELOG.md +++ b/packages/google-cloud-dataplex/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.2.0](https://github.com/googleapis/nodejs-dataplex/compare/v2.1.1...v2.2.0) (2022-09-21) + + +### Features + +* Custom container, encryption key, cross project for Task, and more ([#51](https://github.com/googleapis/nodejs-dataplex/issues/51)) ([c6ab09d](https://github.com/googleapis/nodejs-dataplex/commit/c6ab09d06acd14bc182de9afda2d2da683a7a041)) + ## [2.1.1](https://github.com/googleapis/nodejs-dataplex/compare/v2.1.0...v2.1.1) (2022-08-27) diff --git a/packages/google-cloud-dataplex/package.json b/packages/google-cloud-dataplex/package.json index 10c4b584636..bd39592b821 100644 --- a/packages/google-cloud-dataplex/package.json +++ b/packages/google-cloud-dataplex/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/dataplex", - "version": "2.1.1", + "version": "2.2.0", "description": "dataplex client for Node.js", "repository": "googleapis/nodejs-dataplex", "license": "Apache-2.0", diff --git a/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json b/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json index dfb9f6d04e1..bd53a1c4ee4 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json +++ b/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataplex", - "version": "2.1.1", + "version": "2.2.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dataplex/samples/package.json b/packages/google-cloud-dataplex/samples/package.json index 96913dd04a4..6a1dc8e5646 100644 --- a/packages/google-cloud-dataplex/samples/package.json +++ b/packages/google-cloud-dataplex/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/dataplex": "^2.1.1" + "@google-cloud/dataplex": "^2.2.0" }, "devDependencies": { "c8": "^7.1.0", From 3278ba4fc447d4c389ce521d127b61f0ad334d71 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 28 Sep 2022 17:31:43 -0700 Subject: [PATCH 243/254] test: use fully qualified type names (#54) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: override API mixins when needed PiperOrigin-RevId: 477248447 Source-Link: https://github.com/googleapis/googleapis/commit/4689c7380444972caf11fd1b96e7ec1f864b7dfb Source-Link: https://github.com/googleapis/googleapis-gen/commit/c4059786a5cd805a0151d95b477fbc486bcbcedc Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzQwNTk3ODZhNWNkODA1YTAxNTFkOTViNDc3ZmJjNDg2YmNiY2VkYyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../src/v1/content_service_client.ts | 288 ++++++++++++++++ .../src/v1/dataplex_service_client.ts | 177 ++++++++++ .../src/v1/metadata_service_client.ts | 288 ++++++++++++++++ .../test/gapic_content_service_v1.ts | 307 +++++++++++++++++- .../test/gapic_dataplex_service_v1.ts | 305 +++++++++++++++++ .../test/gapic_metadata_service_v1.ts | 307 +++++++++++++++++- 6 files changed, 1670 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-dataplex/src/v1/content_service_client.ts b/packages/google-cloud-dataplex/src/v1/content_service_client.ts index 1896de68bc9..4f4b95b45a5 100644 --- a/packages/google-cloud-dataplex/src/v1/content_service_client.ts +++ b/packages/google-cloud-dataplex/src/v1/content_service_client.ts @@ -23,6 +23,7 @@ import type { CallOptions, Descriptors, ClientOptions, + GrpcClientOptions, PaginationCallback, GaxCall, LocationsClient, @@ -63,6 +64,7 @@ export class ContentServiceClient { innerApiCalls: {[name: string]: Function}; locationsClient: LocationsClient; pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; contentServiceStub?: Promise<{[name: string]: Function}>; /** @@ -236,6 +238,114 @@ export class ContentServiceClient { ), }; + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }; + if (opts.fallback === 'rest') { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [ + { + selector: 'google.cloud.location.Locations.GetLocation', + get: '/v1/{name=projects/*/locations/*}', + }, + { + selector: 'google.cloud.location.Locations.ListLocations', + get: '/v1/{name=projects/*}/locations', + }, + { + selector: 'google.iam.v1.IAMPolicy.GetIamPolicy', + get: '/v1/{resource=projects/*/locations/*/lakes/*}:getIamPolicy', + additional_bindings: [ + { + get: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:getIamPolicy', + }, + ], + }, + { + selector: 'google.iam.v1.IAMPolicy.SetIamPolicy', + post: '/v1/{resource=projects/*/locations/*/lakes/*}:setIamPolicy', + body: '*', + additional_bindings: [ + { + post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:setIamPolicy', + body: '*', + }, + ], + }, + { + selector: 'google.iam.v1.IAMPolicy.TestIamPermissions', + post: '/v1/{resource=projects/*/locations/*/lakes/*}:testIamPermissions', + body: '*', + additional_bindings: [ + { + post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:testIamPermissions', + body: '*', + }, + ], + }, + { + selector: 'google.longrunning.Operations.CancelOperation', + post: '/v1/{name=projects/*/locations/*/operations/*}:cancel', + body: '*', + }, + { + selector: 'google.longrunning.Operations.DeleteOperation', + delete: '/v1/{name=projects/*/locations/*/operations/*}', + }, + { + selector: 'google.longrunning.Operations.GetOperation', + get: '/v1/{name=projects/*/locations/*/operations/*}', + }, + { + selector: 'google.longrunning.Operations.ListOperations', + get: '/v1/{name=projects/*/locations/*}/operations', + }, + ]; + } + this.operationsClient = this._gaxModule + .lro(lroOptions) + .operationsClient(opts); + + this.descriptors.longrunning = {}; + // Put together the default options sent with requests. this._defaults = this._gaxGrpc.constructSettings( 'google.cloud.dataplex.v1.ContentService', @@ -1332,6 +1442,183 @@ export class ContentServiceClient { return this.locationsClient.listLocationsAsync(request, options); } + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * [google.longrunning.Operation]{@link + * external:"google.longrunning.Operation"}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * [google.longrunning.Operation]{@link + * external:"google.longrunning.Operation"}. The promise has a method named + * "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); + } + // -------------------- // -- Path templates -- // -------------------- @@ -2387,6 +2674,7 @@ export class ContentServiceClient { this._terminated = true; stub.close(); this.locationsClient.close(); + this.operationsClient.close(); }); } return Promise.resolve(); diff --git a/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts b/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts index 8b5350c4f6e..9740d49eed1 100644 --- a/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts +++ b/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts @@ -5673,6 +5673,183 @@ export class DataplexServiceClient { return this.locationsClient.listLocationsAsync(request, options); } + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * [google.longrunning.Operation]{@link + * external:"google.longrunning.Operation"}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * [google.longrunning.Operation]{@link + * external:"google.longrunning.Operation"}. The promise has a method named + * "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); + } + // -------------------- // -- Path templates -- // -------------------- diff --git a/packages/google-cloud-dataplex/src/v1/metadata_service_client.ts b/packages/google-cloud-dataplex/src/v1/metadata_service_client.ts index 9371dc41fa2..df7a6cbe206 100644 --- a/packages/google-cloud-dataplex/src/v1/metadata_service_client.ts +++ b/packages/google-cloud-dataplex/src/v1/metadata_service_client.ts @@ -23,6 +23,7 @@ import type { CallOptions, Descriptors, ClientOptions, + GrpcClientOptions, PaginationCallback, GaxCall, LocationsClient, @@ -64,6 +65,7 @@ export class MetadataServiceClient { innerApiCalls: {[name: string]: Function}; locationsClient: LocationsClient; pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; metadataServiceStub?: Promise<{[name: string]: Function}>; /** @@ -242,6 +244,114 @@ export class MetadataServiceClient { ), }; + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }; + if (opts.fallback === 'rest') { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [ + { + selector: 'google.cloud.location.Locations.GetLocation', + get: '/v1/{name=projects/*/locations/*}', + }, + { + selector: 'google.cloud.location.Locations.ListLocations', + get: '/v1/{name=projects/*}/locations', + }, + { + selector: 'google.iam.v1.IAMPolicy.GetIamPolicy', + get: '/v1/{resource=projects/*/locations/*/lakes/*}:getIamPolicy', + additional_bindings: [ + { + get: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:getIamPolicy', + }, + ], + }, + { + selector: 'google.iam.v1.IAMPolicy.SetIamPolicy', + post: '/v1/{resource=projects/*/locations/*/lakes/*}:setIamPolicy', + body: '*', + additional_bindings: [ + { + post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:setIamPolicy', + body: '*', + }, + ], + }, + { + selector: 'google.iam.v1.IAMPolicy.TestIamPermissions', + post: '/v1/{resource=projects/*/locations/*/lakes/*}:testIamPermissions', + body: '*', + additional_bindings: [ + { + post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:testIamPermissions', + body: '*', + }, + ], + }, + { + selector: 'google.longrunning.Operations.CancelOperation', + post: '/v1/{name=projects/*/locations/*/operations/*}:cancel', + body: '*', + }, + { + selector: 'google.longrunning.Operations.DeleteOperation', + delete: '/v1/{name=projects/*/locations/*/operations/*}', + }, + { + selector: 'google.longrunning.Operations.GetOperation', + get: '/v1/{name=projects/*/locations/*/operations/*}', + }, + { + selector: 'google.longrunning.Operations.ListOperations', + get: '/v1/{name=projects/*/locations/*}/operations', + }, + ]; + } + this.operationsClient = this._gaxModule + .lro(lroOptions) + .operationsClient(opts); + + this.descriptors.longrunning = {}; + // Put together the default options sent with requests. this._defaults = this._gaxGrpc.constructSettings( 'google.cloud.dataplex.v1.MetadataService', @@ -1603,6 +1713,183 @@ export class MetadataServiceClient { return this.locationsClient.listLocationsAsync(request, options); } + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * [google.longrunning.Operation]{@link + * external:"google.longrunning.Operation"}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * [google.longrunning.Operation]{@link + * external:"google.longrunning.Operation"}. The promise has a method named + * "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); + } + // -------------------- // -- Path templates -- // -------------------- @@ -2658,6 +2945,7 @@ export class MetadataServiceClient { this._terminated = true; stub.close(); this.locationsClient.close(); + this.operationsClient.close(); }); } return Promise.resolve(); diff --git a/packages/google-cloud-dataplex/test/gapic_content_service_v1.ts b/packages/google-cloud-dataplex/test/gapic_content_service_v1.ts index 59315d185e2..0d2c6ad2576 100644 --- a/packages/google-cloud-dataplex/test/gapic_content_service_v1.ts +++ b/packages/google-cloud-dataplex/test/gapic_content_service_v1.ts @@ -25,7 +25,7 @@ import * as contentserviceModule from '../src'; import {PassThrough} from 'stream'; -import {protobuf, LocationProtos} from 'google-gax'; +import {protobuf, operationsProtos, LocationProtos} from 'google-gax'; // Dynamically loaded proto JSON is needed to get the type information // to fill in default values for request objects @@ -1644,6 +1644,311 @@ describe('v1.ContentServiceClient', () => { ); }); }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.getOperation(request); + }, expectedError); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = + stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub).getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.cancelOperation(request); + }, expectedError); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = + stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub).getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.deleteOperation(request); + }, expectedError); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); describe('Path templates', () => { describe('asset', () => { diff --git a/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts b/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts index d50e47a8481..ee85b6ded00 100644 --- a/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts +++ b/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts @@ -7241,6 +7241,311 @@ describe('v1.DataplexServiceClient', () => { ); }); }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.getOperation(request); + }, expectedError); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = + stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub).getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.cancelOperation(request); + }, expectedError); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = + stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub).getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.deleteOperation(request); + }, expectedError); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); describe('Path templates', () => { describe('asset', () => { diff --git a/packages/google-cloud-dataplex/test/gapic_metadata_service_v1.ts b/packages/google-cloud-dataplex/test/gapic_metadata_service_v1.ts index 4ef46153001..7a63943c87f 100644 --- a/packages/google-cloud-dataplex/test/gapic_metadata_service_v1.ts +++ b/packages/google-cloud-dataplex/test/gapic_metadata_service_v1.ts @@ -25,7 +25,7 @@ import * as metadataserviceModule from '../src'; import {PassThrough} from 'stream'; -import {protobuf, LocationProtos} from 'google-gax'; +import {protobuf, operationsProtos, LocationProtos} from 'google-gax'; // Dynamically loaded proto JSON is needed to get the type information // to fill in default values for request objects @@ -1939,6 +1939,311 @@ describe('v1.MetadataServiceClient', () => { ); }); }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.getOperation(request); + }, expectedError); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = + stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub).getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.cancelOperation(request); + }, expectedError); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = + stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub).getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.deleteOperation(request); + }, expectedError); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); describe('Path templates', () => { describe('asset', () => { From ce2bd147d0c39806a9cfc063f11624237ab5a9cc Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 29 Sep 2022 00:44:17 +0000 Subject: [PATCH 244/254] chore: override API mixins when needed (#70) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 477248447 Source-Link: https://github.com/googleapis/googleapis/commit/4689c7380444972caf11fd1b96e7ec1f864b7dfb Source-Link: https://github.com/googleapis/googleapis-gen/commit/c4059786a5cd805a0151d95b477fbc486bcbcedc Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzQwNTk3ODZhNWNkODA1YTAxNTFkOTViNDc3ZmJjNDg2YmNiY2VkYyJ9 fix!: Fix resource annotations for Cloud Deploy to use common resource name for locations This is technically a breaking change in that it's modifying the type for a resource, but it's a fast-follow fix to the earlier broken definition. PiperOrigin-RevId: 477192133 Source-Link: https://github.com/googleapis/googleapis/commit/f252e11bdab81146c67a7de4eddec412f18cd94f Source-Link: https://github.com/googleapis/googleapis-gen/commit/34ca7cd6da0ac5920011c8bda01e8bc32b7da444 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzRjYTdjZDZkYTBhYzU5MjAwMTFjOGJkYTAxZThiYzMyYjdkYTQ0NCJ9 feat: Publish new JobRun resource and associated methods for Google Cloud Deploy PiperOrigin-RevId: 477144554 Source-Link: https://github.com/googleapis/googleapis/commit/59a30fb00d6142f88c6b9960e195ff33bc66776e Source-Link: https://github.com/googleapis/googleapis-gen/commit/4edce039d3cffaa4202f6112d9caf6fc29dec0be Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGVkY2UwMzlkM2NmZmFhNDIwMmY2MTEyZDljYWY2ZmMyOWRlYzBiZSJ9 --- .../google/cloud/deploy/v1/cloud_deploy.proto | 495 +- .../v1/jobrun_notification_payload.proto | 50 + .../google-cloud-deploy/protos/protos.d.ts | 3174 ++- packages/google-cloud-deploy/protos/protos.js | 18929 ++++++++++------ .../google-cloud-deploy/protos/protos.json | 714 +- .../v1/cloud_deploy.abandon_release.js | 63 + .../generated/v1/cloud_deploy.get_job_run.js | 62 + .../v1/cloud_deploy.list_job_runs.js | 85 + .../generated/v1/cloud_deploy.retry_job.js | 73 + ...ippet_metadata.google.cloud.deploy.v1.json | 184 + .../src/v1/cloud_deploy_client.ts | 1025 +- .../src/v1/cloud_deploy_client_config.json | 20 + .../src/v1/cloud_deploy_proto_list.json | 1 + .../src/v1/gapic_metadata.json | 44 + .../test/gapic_cloud_deploy_v1.ts | 1848 +- 15 files changed, 19918 insertions(+), 6849 deletions(-) create mode 100644 packages/google-cloud-deploy/protos/google/cloud/deploy/v1/jobrun_notification_payload.proto create mode 100644 packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.abandon_release.js create mode 100644 packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_job_run.js create mode 100644 packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_job_runs.js create mode 100644 packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.retry_job.js diff --git a/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/cloud_deploy.proto b/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/cloud_deploy.proto index cf3ebcbe1de..69f8d522208 100644 --- a/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/cloud_deploy.proto +++ b/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/cloud_deploy.proto @@ -21,6 +21,7 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/duration.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "google/type/date.proto"; @@ -193,6 +194,15 @@ service CloudDeploy { }; } + // Abandons a Release in the Delivery Pipeline. + rpc AbandonRelease(AbandonReleaseRequest) returns (AbandonReleaseResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*}:abandon" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + // Approves a Rollout. rpc ApproveRollout(ApproveRolloutRequest) returns (ApproveRolloutResponse) { option (google.api.http) = { @@ -231,6 +241,31 @@ service CloudDeploy { }; } + // Retries the specified Job in a Rollout. + rpc RetryJob(RetryJobRequest) returns (RetryJobResponse) { + option (google.api.http) = { + post: "/v1/{rollout=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}:retryJob" + body: "*" + }; + option (google.api.method_signature) = "rollout,phase_id,job_id"; + } + + // Lists JobRuns in a given project and location. + rpc ListJobRuns(ListJobRunsRequest) returns (ListJobRunsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}/jobRuns" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single JobRun. + rpc GetJobRun(GetJobRunRequest) returns (JobRun) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*/jobRuns/*}" + }; + option (google.api.method_signature) = "name"; + } + // Gets the configuration for a location. rpc GetConfig(GetConfigRequest) returns (Config) { option (google.api.http) = { @@ -261,9 +296,7 @@ message DeliveryPipeline { string description = 3; // User annotations. These attributes can only be set and used by the - // user, and not by Google Cloud Deploy. See - // https://google.aip.dev/128#annotations for more details such as format and - // size limitations. + // user, and not by Google Cloud Deploy. map annotations = 4; // Labels are attributes that can be set and used by both the @@ -300,6 +333,10 @@ message DeliveryPipeline { // fields, and may be sent on update and delete requests to ensure the // client has an up-to-date value before proceeding. string etag = 10; + + // When suspended, no new releases or rollouts can be created, + // but in-progress ones will complete. + bool suspended = 12; } // SerialPipeline defines a sequential set of stages for a `DeliveryPipeline`. @@ -322,6 +359,25 @@ message Stage { // Skaffold profiles to use when rendering the manifest for this stage's // `Target`. repeated string profiles = 2; + + // Optional. The strategy to use for a `Rollout` to this stage. + Strategy strategy = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Strategy contains deployment strategy information. +message Strategy { + // Deployment strategy details. + oneof deployment_strategy { + // Standard deployment strategy executes a single deploy and allows + // verifying the deployment. + Standard standard = 1; + } +} + +// Standard represents the standard deployment strategy. +message Standard { + // Whether to verify a deployment. + bool verify = 1; } // PipelineReadyCondition contains information around the status of the @@ -597,6 +653,9 @@ message Target { // Information specifying an Anthos Cluster. AnthosCluster anthos_cluster = 17; + + // Information specifying a Cloud Run deployment target. + CloudRunLocation run = 18; } // Optional. This checksum is computed by the server based on the value of other @@ -626,6 +685,9 @@ message ExecutionConfig { // Use for deploying and deployment hooks. DEPLOY = 2; + + // Use for deployment verification. + VERIFY = 3; } // Required. Usages when this configuration should be applied. @@ -661,6 +723,11 @@ message ExecutionConfig { // ("gs://my-bucket/my-dir"). // If unspecified, a default bucket located in the same region will be used. string artifact_storage = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Execution timeout for a Cloud Build Execution. This must be between 10m and + // 24h in seconds format. + // If unspecified, a default timeout of 1h is used. + google.protobuf.Duration execution_timeout = 7 [(google.api.field_behavior) = OPTIONAL]; } // Execution using the default Cloud Build pool. @@ -729,6 +796,18 @@ message AnthosCluster { }]; } +// Information specifying where to deploy a Cloud Run Service. +message CloudRunLocation { + // Required. The location for the Cloud Run Service. Format must be + // `projects/{project}/locations/{location}`. + string location = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; +} + // The request object for `ListTargets`. message ListTargetsRequest { // Required. The parent, which owns this collection of targets. Format must be @@ -947,7 +1026,7 @@ message Release { FAILURE_CAUSE_UNSPECIFIED = 0; // Cloud Build is not available, either because it is not enabled or - // because Cloud Deploy has insufficient permissions. See [required + // because Google Cloud Deploy has insufficient permissions. See [required // permission](/deploy/docs/cloud-deploy-service-account#required_permissions). CLOUD_BUILD_UNAVAILABLE = 1; @@ -972,6 +1051,9 @@ message Release { // Output only. Reason this render failed. This will always be unspecified while the // render in progress. FailureCause failure_cause = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information about the render failure, if available. + string failure_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Optional. Name of the `Release`. Format is projects/{project}/ @@ -1005,6 +1087,9 @@ message Release { // Both keys and values are additionally constrained to be <= 128 bytes. map labels = 5; + // Output only. Indicates whether this is an abandoned release. + bool abandoned = 23 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Time at which the `Release` was created. google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -1227,7 +1312,7 @@ message Rollout { PENDING_RELEASE = 7; } - // Well-known deployment failures. + // Well-known rollout failures. enum FailureCause { // No reason for failure is specified. FAILURE_CAUSE_UNSPECIFIED = 0; @@ -1246,6 +1331,12 @@ message Rollout { // Release is in a failed state. RELEASE_FAILED = 4; + + // Release is abandoned. + RELEASE_ABANDONED = 5; + + // No skaffold verify configuration was found. + VERIFICATION_CONFIG_NOT_FOUND = 6; } // Optional. Name of the `Rollout`. Format is projects/{project}/ @@ -1304,7 +1395,7 @@ message Rollout { // Output only. Current state of the `Rollout`. State state = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Reason the build failed. Empty if the build succeeded. + // Output only. Additional information about the rollout failure, if available. string failure_reason = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The resource name of the Cloud Build `Build` object that is used to deploy @@ -1322,9 +1413,148 @@ message Rollout { // client has an up-to-date value before proceeding. string etag = 16; - // Output only. The reason this deploy failed. This will always be unspecified while the - // deploy in progress. + // Output only. The reason this rollout failed. This will always be unspecified while the + // rollout is in progress. FailureCause deploy_failure_cause = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The phases that represent the workflows of this `Rollout`. + repeated Phase phases = 23 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Metadata contains information about the rollout. + Metadata metadata = 24 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Metadata includes information associated with a `Rollout`. +message Metadata { + // Output only. The name of the Cloud Run Service that is associated with a `Rollout`. + CloudRunMetadata cloud_run = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// DeployJobRunMetadata surfaces information associated with a `DeployJobRun` to +// the user. +message DeployJobRunMetadata { + // Output only. The name of the Cloud Run Service that is associated with a `DeployJobRun`. + CloudRunMetadata cloud_run = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// CloudRunMetadata contains information from a Cloud Run deployment. +message CloudRunMetadata { + // Output only. The name of the Cloud Run Service that is associated with a `Rollout`. + // Format is projects/{project}/locations/{location}/services/{service}. + string service = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The Cloud Run Service urls that are associated with a `Rollout`. + repeated string service_urls = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The Cloud Run Revision id associated with a `Rollout`. + string revision = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Phase represents a collection of jobs that are logically grouped together +// for a `Rollout`. +message Phase { + // Valid states of a Phase. + enum State { + // The Phase has an unspecified state. + STATE_UNSPECIFIED = 0; + + // The Phase is waiting for an earlier Phase(s) to complete. + PENDING = 1; + + // The Phase is in progress. + IN_PROGRESS = 2; + + // The Phase has succeeded. + SUCCEEDED = 3; + + // The Phase has failed. + FAILED = 4; + + // The Phase was aborted. + ABORTED = 5; + } + + // Output only. The ID of the Phase. + string id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Current state of the Phase. + State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The job composition of this Phase. + oneof jobs { + // Output only. Deployment job composition. + DeploymentJobs deployment_jobs = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + } +} + +// Deployment job composition. +message DeploymentJobs { + // Output only. The deploy Job. This is the first job run in the phase. + Job deploy_job = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The verify Job. Runs after a deploy if the deploy succeeds. + Job verify_job = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Job represents an operation for a `Rollout`. +message Job { + // Valid states of a Job. + enum State { + // The Job has an unspecified state. + STATE_UNSPECIFIED = 0; + + // The Job is waiting for an earlier Phase(s) or Job(s) to complete. + PENDING = 1; + + // The Job is disabled. + DISABLED = 2; + + // The Job is in progress. + IN_PROGRESS = 3; + + // The Job succeeded. + SUCCEEDED = 4; + + // The Job failed. + FAILED = 5; + + // The Job was aborted. + ABORTED = 6; + } + + // Output only. The ID of the Job. + string id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current state of the Job. + State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The name of the `JobRun` responsible for the most recent invocation of this + // Job. + string job_run = 3 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/JobRun" + } + ]; + + // The type of Job. + oneof job_type { + // Output only. A deploy Job. + DeployJob deploy_job = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A verify Job. + VerifyJob verify_job = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + } +} + +// A deploy Job. +message DeployJob { + +} + +// A verify Job. +message VerifyJob { + } // ListRolloutsRequest is the request object used by `ListRollouts`. @@ -1468,6 +1698,255 @@ message ApproveRolloutResponse { } +// RetryJobRequest is the request object used by `RetryJob`. +message RetryJobRequest { + // Required. Name of the Rollout. Format is + // projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ + // releases/{release}/rollouts/{rollout}. + string rollout = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Rollout" + } + ]; + + // Required. The phase ID the Job to retry belongs to. + string phase_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The job ID for the Job to retry. + string job_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The response object from 'RetryJob'. +message RetryJobResponse { + +} + +// The request object used by `AbandonRelease`. +message AbandonReleaseRequest { + // Required. Name of the Release. Format is + // projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ + // releases/{release}. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Release" + } + ]; +} + +// The response object for `AbandonRelease`. +message AbandonReleaseResponse { + +} + +// A `JobRun` resource in the Google Cloud Deploy API. +// +// A `JobRun` contains information of a single `Rollout` job evaluation. +message JobRun { + option (google.api.resource) = { + type: "clouddeploy.googleapis.com/JobRun" + pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{job_run}" + }; + + // Valid states of a `JobRun`. + enum State { + // The `JobRun` has an unspecified state. + STATE_UNSPECIFIED = 0; + + // The `JobRun` is in progress. + IN_PROGRESS = 1; + + // The `JobRun` has succeeded. + SUCCEEDED = 2; + + // The `JobRun` has failed. + FAILED = 3; + } + + // Optional. Name of the `JobRun`. Format is projects/{project}/locations/{location}/ + // deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/ + // {rollouts}/jobRuns/{uuid}. + string name = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Unique identifier of the `JobRun`. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. ID of the `Rollout` phase this `JobRun` belongs in. + string phase_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. ID of the `Rollout` job this `JobRun` corresponds to. + string job_id = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the `JobRun` was created. + google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the `JobRun` was started. + google.protobuf.Timestamp start_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the `JobRun` ended. + google.protobuf.Timestamp end_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current state of the `JobRun`. + State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The `JobRun` type and the information for that type. + oneof job_run { + // Output only. Information specific to a deploy `JobRun`. + DeployJobRun deploy_job_run = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Information specific to a verify `JobRun`. + VerifyJobRun verify_job_run = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. This checksum is computed by the server based on the value of other + // fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// DeployJobRun contains information specific to a deploy `JobRun`. +message DeployJobRun { + // Well-known deploy failures. + enum FailureCause { + // No reason for failure is specified. + FAILURE_CAUSE_UNSPECIFIED = 0; + + // Cloud Build is not available, either because it is not enabled or because + // Google Cloud Deploy has insufficient permissions. See [Required + // permission](/deploy/docs/cloud-deploy-service-account#required_permissions). + CLOUD_BUILD_UNAVAILABLE = 1; + + // The deploy operation did not complete successfully; check Cloud Build + // logs. + EXECUTION_FAILED = 2; + + // The deploy build did not complete within the alloted time. + DEADLINE_EXCEEDED = 3; + } + + // Output only. The resource name of the Cloud Build `Build` object that is used to deploy. + // Format is projects/{project}/locations/{location}/builds/{build}. + string build = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/Build" + } + ]; + + // Output only. The reason the deploy failed. This will always be unspecified while the + // deploy is in progress or if it succeeded. + FailureCause failure_cause = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information about the deploy failure, if available. + string failure_message = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Metadata containing information about the deploy job run. + DeployJobRunMetadata metadata = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// VerifyJobRun contains information specific to a verify `JobRun`. +message VerifyJobRun { + // Well-known verify failures. + enum FailureCause { + // No reason for failure is specified. + FAILURE_CAUSE_UNSPECIFIED = 0; + + // Cloud Build is not available, either because it is not enabled or because + // Google Cloud Deploy has insufficient permissions. See [required + // permission](/deploy/docs/cloud-deploy-service-account#required_permissions). + CLOUD_BUILD_UNAVAILABLE = 1; + + // The verify operation did not complete successfully; check Cloud Build + // logs. + EXECUTION_FAILED = 2; + + // The verify build did not complete within the alloted time. + DEADLINE_EXCEEDED = 3; + + // No Skaffold verify configuration was found. + VERIFICATION_CONFIG_NOT_FOUND = 4; + } + + // Output only. The resource name of the Cloud Build `Build` object that is used to verify. + // Format is projects/{project}/locations/{location}/builds/{build}. + string build = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/Build" + } + ]; + + // Output only. URI of a directory containing the verify artifacts. This contains the + // Skaffold event log. + string artifact_uri = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. File path of the Skaffold event log relative to the artifact URI. + string event_log_path = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The reason the verify failed. This will always be unspecified while the + // verify is in progress or if it succeeded. + FailureCause failure_cause = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information about the verify failure, if available. + string failure_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// ListJobRunsRequest is the request object used by `ListJobRuns`. +message ListJobRunsRequest { + // Required. The `Rollout` which owns this collection of `JobRun` objects. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Rollout" + } + ]; + + // Optional. The maximum number of `JobRun` objects to return. The service may return + // fewer than this value. If unspecified, at most 50 `JobRun` objects will be + // returned. The maximum value is 1000; values above 1000 will be set to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListJobRuns` call. Provide this + // to retrieve the subsequent page. + // + // When paginating, all other provided parameters match the call that provided + // the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter results to be returned. See https://google.aip.dev/160 for more + // details. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// ListJobRunsResponse is the response object returned by `ListJobRuns`. +message ListJobRunsResponse { + // The `JobRun` objects. + repeated JobRun job_runs = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. If + // this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached + repeated string unreachable = 3; +} + +// GetJobRunRequest is the request object used by `GetJobRun`. +message GetJobRunRequest { + // Required. Name of the `JobRun`. Format must be + // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/JobRun" + } + ]; +} + // Service-wide configuration. message Config { option (google.api.resource) = { diff --git a/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/jobrun_notification_payload.proto b/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/jobrun_notification_payload.proto new file mode 100644 index 00000000000..f1e80d6b325 --- /dev/null +++ b/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/jobrun_notification_payload.proto @@ -0,0 +1,50 @@ +// Copyright 2022 Google LLC +// +// 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. + +syntax = "proto3"; + +package google.cloud.deploy.v1; + +import "google/cloud/deploy/v1/log_enums.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/deploy/v1;deploy"; +option java_multiple_files = true; +option java_outer_classname = "JobRunNotificationPayloadProto"; +option java_package = "com.google.cloud.deploy.v1"; + +// Payload proto for "clouddeploy.googleapis.com/jobrun_notification" +// Platform Log event that describes the failure to send JobRun resource update +// Pub/Sub notification. +message JobRunNotificationEvent { + // Debug message for when a notification fails to send. + string message = 1; + + // The name of the `JobRun`. + string job_run = 2; + + // Unique identifier of the `DeliveryPipeline`. + string pipeline_uid = 3; + + // Unique identifier of the `Release`. + string release_uid = 4; + + // Unique identifier of the `Rollout`. + string rollout_uid = 5; + + // ID of the `Target`. + string target_id = 6; + + // Type of this notification, e.g. for a Pub/Sub failure. + Type type = 7; +} diff --git a/packages/google-cloud-deploy/protos/protos.d.ts b/packages/google-cloud-deploy/protos/protos.d.ts index 7935a117dd1..5abd859ad50 100644 --- a/packages/google-cloud-deploy/protos/protos.d.ts +++ b/packages/google-cloud-deploy/protos/protos.d.ts @@ -228,6 +228,20 @@ export namespace google { */ public createRelease(request: google.cloud.deploy.v1.ICreateReleaseRequest): Promise; + /** + * Calls AbandonRelease. + * @param request AbandonReleaseRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AbandonReleaseResponse + */ + public abandonRelease(request: google.cloud.deploy.v1.IAbandonReleaseRequest, callback: google.cloud.deploy.v1.CloudDeploy.AbandonReleaseCallback): void; + + /** + * Calls AbandonRelease. + * @param request AbandonReleaseRequest message or plain object + * @returns Promise + */ + public abandonRelease(request: google.cloud.deploy.v1.IAbandonReleaseRequest): Promise; + /** * Calls ApproveRollout. * @param request ApproveRolloutRequest message or plain object @@ -284,6 +298,48 @@ export namespace google { */ public createRollout(request: google.cloud.deploy.v1.ICreateRolloutRequest): Promise; + /** + * Calls RetryJob. + * @param request RetryJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RetryJobResponse + */ + public retryJob(request: google.cloud.deploy.v1.IRetryJobRequest, callback: google.cloud.deploy.v1.CloudDeploy.RetryJobCallback): void; + + /** + * Calls RetryJob. + * @param request RetryJobRequest message or plain object + * @returns Promise + */ + public retryJob(request: google.cloud.deploy.v1.IRetryJobRequest): Promise; + + /** + * Calls ListJobRuns. + * @param request ListJobRunsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListJobRunsResponse + */ + public listJobRuns(request: google.cloud.deploy.v1.IListJobRunsRequest, callback: google.cloud.deploy.v1.CloudDeploy.ListJobRunsCallback): void; + + /** + * Calls ListJobRuns. + * @param request ListJobRunsRequest message or plain object + * @returns Promise + */ + public listJobRuns(request: google.cloud.deploy.v1.IListJobRunsRequest): Promise; + + /** + * Calls GetJobRun. + * @param request GetJobRunRequest message or plain object + * @param callback Node-style callback called with the error, if any, and JobRun + */ + public getJobRun(request: google.cloud.deploy.v1.IGetJobRunRequest, callback: google.cloud.deploy.v1.CloudDeploy.GetJobRunCallback): void; + + /** + * Calls GetJobRun. + * @param request GetJobRunRequest message or plain object + * @returns Promise + */ + public getJobRun(request: google.cloud.deploy.v1.IGetJobRunRequest): Promise; + /** * Calls GetConfig. * @param request GetConfigRequest message or plain object @@ -392,6 +448,13 @@ export namespace google { */ type CreateReleaseCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|abandonRelease}. + * @param error Error, if any + * @param [response] AbandonReleaseResponse + */ + type AbandonReleaseCallback = (error: (Error|null), response?: google.cloud.deploy.v1.AbandonReleaseResponse) => void; + /** * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|approveRollout}. * @param error Error, if any @@ -420,6 +483,27 @@ export namespace google { */ type CreateRolloutCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|retryJob}. + * @param error Error, if any + * @param [response] RetryJobResponse + */ + type RetryJobCallback = (error: (Error|null), response?: google.cloud.deploy.v1.RetryJobResponse) => void; + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|listJobRuns}. + * @param error Error, if any + * @param [response] ListJobRunsResponse + */ + type ListJobRunsCallback = (error: (Error|null), response?: google.cloud.deploy.v1.ListJobRunsResponse) => void; + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|getJobRun}. + * @param error Error, if any + * @param [response] JobRun + */ + type GetJobRunCallback = (error: (Error|null), response?: google.cloud.deploy.v1.JobRun) => void; + /** * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|getConfig}. * @param error Error, if any @@ -460,6 +544,9 @@ export namespace google { /** DeliveryPipeline etag */ etag?: (string|null); + + /** DeliveryPipeline suspended */ + suspended?: (boolean|null); } /** Represents a DeliveryPipeline. */ @@ -501,6 +588,9 @@ export namespace google { /** DeliveryPipeline etag. */ public etag: string; + /** DeliveryPipeline suspended. */ + public suspended: boolean; + /** DeliveryPipeline pipeline. */ public pipeline?: "serialPipeline"; @@ -687,6 +777,9 @@ export namespace google { /** Stage profiles */ profiles?: (string[]|null); + + /** Stage strategy */ + strategy?: (google.cloud.deploy.v1.IStrategy|null); } /** Represents a Stage. */ @@ -704,6 +797,9 @@ export namespace google { /** Stage profiles. */ public profiles: string[]; + /** Stage strategy. */ + public strategy?: (google.cloud.deploy.v1.IStrategy|null); + /** * Creates a new Stage instance using the specified properties. * @param [properties] Properties to set @@ -782,6 +878,203 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a Strategy. */ + interface IStrategy { + + /** Strategy standard */ + standard?: (google.cloud.deploy.v1.IStandard|null); + } + + /** Represents a Strategy. */ + class Strategy implements IStrategy { + + /** + * Constructs a new Strategy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IStrategy); + + /** Strategy standard. */ + public standard?: (google.cloud.deploy.v1.IStandard|null); + + /** Strategy deploymentStrategy. */ + public deploymentStrategy?: "standard"; + + /** + * Creates a new Strategy instance using the specified properties. + * @param [properties] Properties to set + * @returns Strategy instance + */ + public static create(properties?: google.cloud.deploy.v1.IStrategy): google.cloud.deploy.v1.Strategy; + + /** + * Encodes the specified Strategy message. Does not implicitly {@link google.cloud.deploy.v1.Strategy.verify|verify} messages. + * @param message Strategy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IStrategy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Strategy message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Strategy.verify|verify} messages. + * @param message Strategy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IStrategy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Strategy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Strategy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.Strategy; + + /** + * Decodes a Strategy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Strategy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.Strategy; + + /** + * Verifies a Strategy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Strategy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Strategy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.Strategy; + + /** + * Creates a plain object from a Strategy message. Also converts values to other types if specified. + * @param message Strategy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.Strategy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Strategy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Strategy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Standard. */ + interface IStandard { + + /** Standard verify */ + verify?: (boolean|null); + } + + /** Represents a Standard. */ + class Standard implements IStandard { + + /** + * Constructs a new Standard. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IStandard); + + /** Standard verify. */ + public verify: boolean; + + /** + * Creates a new Standard instance using the specified properties. + * @param [properties] Properties to set + * @returns Standard instance + */ + public static create(properties?: google.cloud.deploy.v1.IStandard): google.cloud.deploy.v1.Standard; + + /** + * Encodes the specified Standard message. Does not implicitly {@link google.cloud.deploy.v1.Standard.verify|verify} messages. + * @param message Standard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IStandard, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Standard message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Standard.verify|verify} messages. + * @param message Standard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IStandard, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Standard message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Standard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.Standard; + + /** + * Decodes a Standard message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Standard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.Standard; + + /** + * Verifies a Standard message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Standard message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Standard + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.Standard; + + /** + * Creates a plain object from a Standard message. Also converts values to other types if specified. + * @param message Standard + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.Standard, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Standard to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Standard + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a PipelineReadyCondition. */ interface IPipelineReadyCondition { @@ -1829,6 +2122,9 @@ export namespace google { /** Target anthosCluster */ anthosCluster?: (google.cloud.deploy.v1.IAnthosCluster|null); + /** Target run */ + run?: (google.cloud.deploy.v1.ICloudRunLocation|null); + /** Target etag */ etag?: (string|null); @@ -1878,6 +2174,9 @@ export namespace google { /** Target anthosCluster. */ public anthosCluster?: (google.cloud.deploy.v1.IAnthosCluster|null); + /** Target run. */ + public run?: (google.cloud.deploy.v1.ICloudRunLocation|null); + /** Target etag. */ public etag: string; @@ -1885,7 +2184,7 @@ export namespace google { public executionConfigs: google.cloud.deploy.v1.IExecutionConfig[]; /** Target deploymentTarget. */ - public deploymentTarget?: ("gke"|"anthosCluster"); + public deploymentTarget?: ("gke"|"anthosCluster"|"run"); /** * Creates a new Target instance using the specified properties. @@ -1985,6 +2284,9 @@ export namespace google { /** ExecutionConfig artifactStorage */ artifactStorage?: (string|null); + + /** ExecutionConfig executionTimeout */ + executionTimeout?: (google.protobuf.IDuration|null); } /** Represents an ExecutionConfig. */ @@ -2014,6 +2316,9 @@ export namespace google { /** ExecutionConfig artifactStorage. */ public artifactStorage: string; + /** ExecutionConfig executionTimeout. */ + public executionTimeout?: (google.protobuf.IDuration|null); + /** ExecutionConfig executionEnvironment. */ public executionEnvironment?: ("defaultPool"|"privatePool"); @@ -2101,7 +2406,8 @@ export namespace google { enum ExecutionEnvironmentUsage { EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED = 0, RENDER = 1, - DEPLOY = 2 + DEPLOY = 2, + VERIFY = 3 } } @@ -2517,6 +2823,103 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a CloudRunLocation. */ + interface ICloudRunLocation { + + /** CloudRunLocation location */ + location?: (string|null); + } + + /** Represents a CloudRunLocation. */ + class CloudRunLocation implements ICloudRunLocation { + + /** + * Constructs a new CloudRunLocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.ICloudRunLocation); + + /** CloudRunLocation location. */ + public location: string; + + /** + * Creates a new CloudRunLocation instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudRunLocation instance + */ + public static create(properties?: google.cloud.deploy.v1.ICloudRunLocation): google.cloud.deploy.v1.CloudRunLocation; + + /** + * Encodes the specified CloudRunLocation message. Does not implicitly {@link google.cloud.deploy.v1.CloudRunLocation.verify|verify} messages. + * @param message CloudRunLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.ICloudRunLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudRunLocation message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CloudRunLocation.verify|verify} messages. + * @param message CloudRunLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.ICloudRunLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudRunLocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudRunLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.CloudRunLocation; + + /** + * Decodes a CloudRunLocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudRunLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.CloudRunLocation; + + /** + * Verifies a CloudRunLocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudRunLocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudRunLocation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.CloudRunLocation; + + /** + * Creates a plain object from a CloudRunLocation message. Also converts values to other types if specified. + * @param message CloudRunLocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.CloudRunLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudRunLocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudRunLocation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a ListTargetsRequest. */ interface IListTargetsRequest { @@ -3225,6 +3628,9 @@ export namespace google { /** Release labels */ labels?: ({ [k: string]: string }|null); + /** Release abandoned */ + abandoned?: (boolean|null); + /** Release createTime */ createTime?: (google.protobuf.ITimestamp|null); @@ -3289,6 +3695,9 @@ export namespace google { /** Release labels. */ public labels: { [k: string]: string }; + /** Release abandoned. */ + public abandoned: boolean; + /** Release createTime. */ public createTime?: (google.protobuf.ITimestamp|null); @@ -3427,6 +3836,9 @@ export namespace google { /** TargetRender failureCause */ failureCause?: (google.cloud.deploy.v1.Release.TargetRender.FailureCause|keyof typeof google.cloud.deploy.v1.Release.TargetRender.FailureCause|null); + + /** TargetRender failureMessage */ + failureMessage?: (string|null); } /** Represents a TargetRender. */ @@ -3447,6 +3859,9 @@ export namespace google { /** TargetRender failureCause. */ public failureCause: (google.cloud.deploy.v1.Release.TargetRender.FailureCause|keyof typeof google.cloud.deploy.v1.Release.TargetRender.FailureCause); + /** TargetRender failureMessage. */ + public failureMessage: string; + /** * Creates a new TargetRender instance using the specified properties. * @param [properties] Properties to set @@ -4260,6 +4675,12 @@ export namespace google { /** Rollout deployFailureCause */ deployFailureCause?: (google.cloud.deploy.v1.Rollout.FailureCause|keyof typeof google.cloud.deploy.v1.Rollout.FailureCause|null); + + /** Rollout phases */ + phases?: (google.cloud.deploy.v1.IPhase[]|null); + + /** Rollout metadata */ + metadata?: (google.cloud.deploy.v1.IMetadata|null); } /** Represents a Rollout. */ @@ -4322,6 +4743,12 @@ export namespace google { /** Rollout deployFailureCause. */ public deployFailureCause: (google.cloud.deploy.v1.Rollout.FailureCause|keyof typeof google.cloud.deploy.v1.Rollout.FailureCause); + /** Rollout phases. */ + public phases: google.cloud.deploy.v1.IPhase[]; + + /** Rollout metadata. */ + public metadata?: (google.cloud.deploy.v1.IMetadata|null); + /** * Creates a new Rollout instance using the specified properties. * @param [properties] Properties to set @@ -4429,779 +4856,2777 @@ export namespace google { CLOUD_BUILD_UNAVAILABLE = 1, EXECUTION_FAILED = 2, DEADLINE_EXCEEDED = 3, - RELEASE_FAILED = 4 + RELEASE_FAILED = 4, + RELEASE_ABANDONED = 5, + VERIFICATION_CONFIG_NOT_FOUND = 6 } } - /** Properties of a ListRolloutsRequest. */ - interface IListRolloutsRequest { + /** Properties of a Metadata. */ + interface IMetadata { - /** ListRolloutsRequest parent */ - parent?: (string|null); + /** Metadata cloudRun */ + cloudRun?: (google.cloud.deploy.v1.ICloudRunMetadata|null); + } - /** ListRolloutsRequest pageSize */ + /** Represents a Metadata. */ + class Metadata implements IMetadata { + + /** + * Constructs a new Metadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IMetadata); + + /** Metadata cloudRun. */ + public cloudRun?: (google.cloud.deploy.v1.ICloudRunMetadata|null); + + /** + * Creates a new Metadata instance using the specified properties. + * @param [properties] Properties to set + * @returns Metadata instance + */ + public static create(properties?: google.cloud.deploy.v1.IMetadata): google.cloud.deploy.v1.Metadata; + + /** + * Encodes the specified Metadata message. Does not implicitly {@link google.cloud.deploy.v1.Metadata.verify|verify} messages. + * @param message Metadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Metadata.verify|verify} messages. + * @param message Metadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Metadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.Metadata; + + /** + * Decodes a Metadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.Metadata; + + /** + * Verifies a Metadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Metadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Metadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.Metadata; + + /** + * Creates a plain object from a Metadata message. Also converts values to other types if specified. + * @param message Metadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.Metadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Metadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Metadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeployJobRunMetadata. */ + interface IDeployJobRunMetadata { + + /** DeployJobRunMetadata cloudRun */ + cloudRun?: (google.cloud.deploy.v1.ICloudRunMetadata|null); + } + + /** Represents a DeployJobRunMetadata. */ + class DeployJobRunMetadata implements IDeployJobRunMetadata { + + /** + * Constructs a new DeployJobRunMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IDeployJobRunMetadata); + + /** DeployJobRunMetadata cloudRun. */ + public cloudRun?: (google.cloud.deploy.v1.ICloudRunMetadata|null); + + /** + * Creates a new DeployJobRunMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns DeployJobRunMetadata instance + */ + public static create(properties?: google.cloud.deploy.v1.IDeployJobRunMetadata): google.cloud.deploy.v1.DeployJobRunMetadata; + + /** + * Encodes the specified DeployJobRunMetadata message. Does not implicitly {@link google.cloud.deploy.v1.DeployJobRunMetadata.verify|verify} messages. + * @param message DeployJobRunMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IDeployJobRunMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeployJobRunMetadata message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeployJobRunMetadata.verify|verify} messages. + * @param message DeployJobRunMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IDeployJobRunMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeployJobRunMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeployJobRunMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.DeployJobRunMetadata; + + /** + * Decodes a DeployJobRunMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeployJobRunMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.DeployJobRunMetadata; + + /** + * Verifies a DeployJobRunMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeployJobRunMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeployJobRunMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.DeployJobRunMetadata; + + /** + * Creates a plain object from a DeployJobRunMetadata message. Also converts values to other types if specified. + * @param message DeployJobRunMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.DeployJobRunMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeployJobRunMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeployJobRunMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudRunMetadata. */ + interface ICloudRunMetadata { + + /** CloudRunMetadata service */ + service?: (string|null); + + /** CloudRunMetadata serviceUrls */ + serviceUrls?: (string[]|null); + + /** CloudRunMetadata revision */ + revision?: (string|null); + } + + /** Represents a CloudRunMetadata. */ + class CloudRunMetadata implements ICloudRunMetadata { + + /** + * Constructs a new CloudRunMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.ICloudRunMetadata); + + /** CloudRunMetadata service. */ + public service: string; + + /** CloudRunMetadata serviceUrls. */ + public serviceUrls: string[]; + + /** CloudRunMetadata revision. */ + public revision: string; + + /** + * Creates a new CloudRunMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudRunMetadata instance + */ + public static create(properties?: google.cloud.deploy.v1.ICloudRunMetadata): google.cloud.deploy.v1.CloudRunMetadata; + + /** + * Encodes the specified CloudRunMetadata message. Does not implicitly {@link google.cloud.deploy.v1.CloudRunMetadata.verify|verify} messages. + * @param message CloudRunMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.ICloudRunMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudRunMetadata message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CloudRunMetadata.verify|verify} messages. + * @param message CloudRunMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.ICloudRunMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudRunMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudRunMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.CloudRunMetadata; + + /** + * Decodes a CloudRunMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudRunMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.CloudRunMetadata; + + /** + * Verifies a CloudRunMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudRunMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudRunMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.CloudRunMetadata; + + /** + * Creates a plain object from a CloudRunMetadata message. Also converts values to other types if specified. + * @param message CloudRunMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.CloudRunMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudRunMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudRunMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Phase. */ + interface IPhase { + + /** Phase id */ + id?: (string|null); + + /** Phase state */ + state?: (google.cloud.deploy.v1.Phase.State|keyof typeof google.cloud.deploy.v1.Phase.State|null); + + /** Phase deploymentJobs */ + deploymentJobs?: (google.cloud.deploy.v1.IDeploymentJobs|null); + } + + /** Represents a Phase. */ + class Phase implements IPhase { + + /** + * Constructs a new Phase. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IPhase); + + /** Phase id. */ + public id: string; + + /** Phase state. */ + public state: (google.cloud.deploy.v1.Phase.State|keyof typeof google.cloud.deploy.v1.Phase.State); + + /** Phase deploymentJobs. */ + public deploymentJobs?: (google.cloud.deploy.v1.IDeploymentJobs|null); + + /** Phase jobs. */ + public jobs?: "deploymentJobs"; + + /** + * Creates a new Phase instance using the specified properties. + * @param [properties] Properties to set + * @returns Phase instance + */ + public static create(properties?: google.cloud.deploy.v1.IPhase): google.cloud.deploy.v1.Phase; + + /** + * Encodes the specified Phase message. Does not implicitly {@link google.cloud.deploy.v1.Phase.verify|verify} messages. + * @param message Phase message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IPhase, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Phase message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Phase.verify|verify} messages. + * @param message Phase message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IPhase, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Phase message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Phase + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.Phase; + + /** + * Decodes a Phase message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Phase + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.Phase; + + /** + * Verifies a Phase message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Phase message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Phase + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.Phase; + + /** + * Creates a plain object from a Phase message. Also converts values to other types if specified. + * @param message Phase + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.Phase, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Phase to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Phase + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Phase { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + PENDING = 1, + IN_PROGRESS = 2, + SUCCEEDED = 3, + FAILED = 4, + ABORTED = 5 + } + } + + /** Properties of a DeploymentJobs. */ + interface IDeploymentJobs { + + /** DeploymentJobs deployJob */ + deployJob?: (google.cloud.deploy.v1.IJob|null); + + /** DeploymentJobs verifyJob */ + verifyJob?: (google.cloud.deploy.v1.IJob|null); + } + + /** Represents a DeploymentJobs. */ + class DeploymentJobs implements IDeploymentJobs { + + /** + * Constructs a new DeploymentJobs. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IDeploymentJobs); + + /** DeploymentJobs deployJob. */ + public deployJob?: (google.cloud.deploy.v1.IJob|null); + + /** DeploymentJobs verifyJob. */ + public verifyJob?: (google.cloud.deploy.v1.IJob|null); + + /** + * Creates a new DeploymentJobs instance using the specified properties. + * @param [properties] Properties to set + * @returns DeploymentJobs instance + */ + public static create(properties?: google.cloud.deploy.v1.IDeploymentJobs): google.cloud.deploy.v1.DeploymentJobs; + + /** + * Encodes the specified DeploymentJobs message. Does not implicitly {@link google.cloud.deploy.v1.DeploymentJobs.verify|verify} messages. + * @param message DeploymentJobs message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IDeploymentJobs, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeploymentJobs message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeploymentJobs.verify|verify} messages. + * @param message DeploymentJobs message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IDeploymentJobs, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeploymentJobs message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeploymentJobs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.DeploymentJobs; + + /** + * Decodes a DeploymentJobs message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeploymentJobs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.DeploymentJobs; + + /** + * Verifies a DeploymentJobs message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeploymentJobs message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeploymentJobs + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.DeploymentJobs; + + /** + * Creates a plain object from a DeploymentJobs message. Also converts values to other types if specified. + * @param message DeploymentJobs + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.DeploymentJobs, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeploymentJobs to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeploymentJobs + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Job. */ + interface IJob { + + /** Job id */ + id?: (string|null); + + /** Job state */ + state?: (google.cloud.deploy.v1.Job.State|keyof typeof google.cloud.deploy.v1.Job.State|null); + + /** Job jobRun */ + jobRun?: (string|null); + + /** Job deployJob */ + deployJob?: (google.cloud.deploy.v1.IDeployJob|null); + + /** Job verifyJob */ + verifyJob?: (google.cloud.deploy.v1.IVerifyJob|null); + } + + /** Represents a Job. */ + class Job implements IJob { + + /** + * Constructs a new Job. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IJob); + + /** Job id. */ + public id: string; + + /** Job state. */ + public state: (google.cloud.deploy.v1.Job.State|keyof typeof google.cloud.deploy.v1.Job.State); + + /** Job jobRun. */ + public jobRun: string; + + /** Job deployJob. */ + public deployJob?: (google.cloud.deploy.v1.IDeployJob|null); + + /** Job verifyJob. */ + public verifyJob?: (google.cloud.deploy.v1.IVerifyJob|null); + + /** Job jobType. */ + public jobType?: ("deployJob"|"verifyJob"); + + /** + * Creates a new Job instance using the specified properties. + * @param [properties] Properties to set + * @returns Job instance + */ + public static create(properties?: google.cloud.deploy.v1.IJob): google.cloud.deploy.v1.Job; + + /** + * Encodes the specified Job message. Does not implicitly {@link google.cloud.deploy.v1.Job.verify|verify} messages. + * @param message Job message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Job message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Job.verify|verify} messages. + * @param message Job message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Job message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Job + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.Job; + + /** + * Decodes a Job message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Job + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.Job; + + /** + * Verifies a Job message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Job message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Job + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.Job; + + /** + * Creates a plain object from a Job message. Also converts values to other types if specified. + * @param message Job + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.Job, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Job to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Job + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Job { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + PENDING = 1, + DISABLED = 2, + IN_PROGRESS = 3, + SUCCEEDED = 4, + FAILED = 5, + ABORTED = 6 + } + } + + /** Properties of a DeployJob. */ + interface IDeployJob { + } + + /** Represents a DeployJob. */ + class DeployJob implements IDeployJob { + + /** + * Constructs a new DeployJob. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IDeployJob); + + /** + * Creates a new DeployJob instance using the specified properties. + * @param [properties] Properties to set + * @returns DeployJob instance + */ + public static create(properties?: google.cloud.deploy.v1.IDeployJob): google.cloud.deploy.v1.DeployJob; + + /** + * Encodes the specified DeployJob message. Does not implicitly {@link google.cloud.deploy.v1.DeployJob.verify|verify} messages. + * @param message DeployJob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IDeployJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeployJob message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeployJob.verify|verify} messages. + * @param message DeployJob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IDeployJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeployJob message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeployJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.DeployJob; + + /** + * Decodes a DeployJob message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeployJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.DeployJob; + + /** + * Verifies a DeployJob message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeployJob message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeployJob + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.DeployJob; + + /** + * Creates a plain object from a DeployJob message. Also converts values to other types if specified. + * @param message DeployJob + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.DeployJob, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeployJob to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeployJob + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VerifyJob. */ + interface IVerifyJob { + } + + /** Represents a VerifyJob. */ + class VerifyJob implements IVerifyJob { + + /** + * Constructs a new VerifyJob. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IVerifyJob); + + /** + * Creates a new VerifyJob instance using the specified properties. + * @param [properties] Properties to set + * @returns VerifyJob instance + */ + public static create(properties?: google.cloud.deploy.v1.IVerifyJob): google.cloud.deploy.v1.VerifyJob; + + /** + * Encodes the specified VerifyJob message. Does not implicitly {@link google.cloud.deploy.v1.VerifyJob.verify|verify} messages. + * @param message VerifyJob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IVerifyJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VerifyJob message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.VerifyJob.verify|verify} messages. + * @param message VerifyJob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IVerifyJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VerifyJob message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VerifyJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.VerifyJob; + + /** + * Decodes a VerifyJob message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VerifyJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.VerifyJob; + + /** + * Verifies a VerifyJob message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VerifyJob message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VerifyJob + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.VerifyJob; + + /** + * Creates a plain object from a VerifyJob message. Also converts values to other types if specified. + * @param message VerifyJob + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.VerifyJob, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VerifyJob to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VerifyJob + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListRolloutsRequest. */ + interface IListRolloutsRequest { + + /** ListRolloutsRequest parent */ + parent?: (string|null); + + /** ListRolloutsRequest pageSize */ pageSize?: (number|null); - /** ListRolloutsRequest pageToken */ - pageToken?: (string|null); + /** ListRolloutsRequest pageToken */ + pageToken?: (string|null); + + /** ListRolloutsRequest filter */ + filter?: (string|null); + + /** ListRolloutsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListRolloutsRequest. */ + class ListRolloutsRequest implements IListRolloutsRequest { + + /** + * Constructs a new ListRolloutsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IListRolloutsRequest); + + /** ListRolloutsRequest parent. */ + public parent: string; + + /** ListRolloutsRequest pageSize. */ + public pageSize: number; + + /** ListRolloutsRequest pageToken. */ + public pageToken: string; + + /** ListRolloutsRequest filter. */ + public filter: string; + + /** ListRolloutsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListRolloutsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListRolloutsRequest instance + */ + public static create(properties?: google.cloud.deploy.v1.IListRolloutsRequest): google.cloud.deploy.v1.ListRolloutsRequest; + + /** + * Encodes the specified ListRolloutsRequest message. Does not implicitly {@link google.cloud.deploy.v1.ListRolloutsRequest.verify|verify} messages. + * @param message ListRolloutsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IListRolloutsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListRolloutsRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListRolloutsRequest.verify|verify} messages. + * @param message ListRolloutsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IListRolloutsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListRolloutsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListRolloutsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.ListRolloutsRequest; + + /** + * Decodes a ListRolloutsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListRolloutsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.ListRolloutsRequest; + + /** + * Verifies a ListRolloutsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListRolloutsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListRolloutsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.ListRolloutsRequest; + + /** + * Creates a plain object from a ListRolloutsRequest message. Also converts values to other types if specified. + * @param message ListRolloutsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.ListRolloutsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListRolloutsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListRolloutsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListRolloutsResponse. */ + interface IListRolloutsResponse { + + /** ListRolloutsResponse rollouts */ + rollouts?: (google.cloud.deploy.v1.IRollout[]|null); + + /** ListRolloutsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListRolloutsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListRolloutsResponse. */ + class ListRolloutsResponse implements IListRolloutsResponse { + + /** + * Constructs a new ListRolloutsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IListRolloutsResponse); + + /** ListRolloutsResponse rollouts. */ + public rollouts: google.cloud.deploy.v1.IRollout[]; + + /** ListRolloutsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListRolloutsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListRolloutsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListRolloutsResponse instance + */ + public static create(properties?: google.cloud.deploy.v1.IListRolloutsResponse): google.cloud.deploy.v1.ListRolloutsResponse; + + /** + * Encodes the specified ListRolloutsResponse message. Does not implicitly {@link google.cloud.deploy.v1.ListRolloutsResponse.verify|verify} messages. + * @param message ListRolloutsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IListRolloutsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListRolloutsResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListRolloutsResponse.verify|verify} messages. + * @param message ListRolloutsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IListRolloutsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListRolloutsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListRolloutsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.ListRolloutsResponse; + + /** + * Decodes a ListRolloutsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListRolloutsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.ListRolloutsResponse; + + /** + * Verifies a ListRolloutsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListRolloutsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListRolloutsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.ListRolloutsResponse; + + /** + * Creates a plain object from a ListRolloutsResponse message. Also converts values to other types if specified. + * @param message ListRolloutsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.ListRolloutsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListRolloutsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListRolloutsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetRolloutRequest. */ + interface IGetRolloutRequest { + + /** GetRolloutRequest name */ + name?: (string|null); + } + + /** Represents a GetRolloutRequest. */ + class GetRolloutRequest implements IGetRolloutRequest { + + /** + * Constructs a new GetRolloutRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IGetRolloutRequest); + + /** GetRolloutRequest name. */ + public name: string; + + /** + * Creates a new GetRolloutRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetRolloutRequest instance + */ + public static create(properties?: google.cloud.deploy.v1.IGetRolloutRequest): google.cloud.deploy.v1.GetRolloutRequest; + + /** + * Encodes the specified GetRolloutRequest message. Does not implicitly {@link google.cloud.deploy.v1.GetRolloutRequest.verify|verify} messages. + * @param message GetRolloutRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IGetRolloutRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetRolloutRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GetRolloutRequest.verify|verify} messages. + * @param message GetRolloutRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IGetRolloutRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetRolloutRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetRolloutRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.GetRolloutRequest; + + /** + * Decodes a GetRolloutRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetRolloutRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.GetRolloutRequest; + + /** + * Verifies a GetRolloutRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetRolloutRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetRolloutRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.GetRolloutRequest; + + /** + * Creates a plain object from a GetRolloutRequest message. Also converts values to other types if specified. + * @param message GetRolloutRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.GetRolloutRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetRolloutRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetRolloutRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateRolloutRequest. */ + interface ICreateRolloutRequest { + + /** CreateRolloutRequest parent */ + parent?: (string|null); + + /** CreateRolloutRequest rolloutId */ + rolloutId?: (string|null); + + /** CreateRolloutRequest rollout */ + rollout?: (google.cloud.deploy.v1.IRollout|null); + + /** CreateRolloutRequest requestId */ + requestId?: (string|null); + + /** CreateRolloutRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateRolloutRequest. */ + class CreateRolloutRequest implements ICreateRolloutRequest { + + /** + * Constructs a new CreateRolloutRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.ICreateRolloutRequest); + + /** CreateRolloutRequest parent. */ + public parent: string; + + /** CreateRolloutRequest rolloutId. */ + public rolloutId: string; + + /** CreateRolloutRequest rollout. */ + public rollout?: (google.cloud.deploy.v1.IRollout|null); + + /** CreateRolloutRequest requestId. */ + public requestId: string; + + /** CreateRolloutRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateRolloutRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateRolloutRequest instance + */ + public static create(properties?: google.cloud.deploy.v1.ICreateRolloutRequest): google.cloud.deploy.v1.CreateRolloutRequest; + + /** + * Encodes the specified CreateRolloutRequest message. Does not implicitly {@link google.cloud.deploy.v1.CreateRolloutRequest.verify|verify} messages. + * @param message CreateRolloutRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.ICreateRolloutRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateRolloutRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CreateRolloutRequest.verify|verify} messages. + * @param message CreateRolloutRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.ICreateRolloutRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateRolloutRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateRolloutRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.CreateRolloutRequest; + + /** + * Decodes a CreateRolloutRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateRolloutRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.CreateRolloutRequest; + + /** + * Verifies a CreateRolloutRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateRolloutRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateRolloutRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.CreateRolloutRequest; + + /** + * Creates a plain object from a CreateRolloutRequest message. Also converts values to other types if specified. + * @param message CreateRolloutRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.CreateRolloutRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateRolloutRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateRolloutRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OperationMetadata. */ + interface IOperationMetadata { + + /** OperationMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata target */ + target?: (string|null); + + /** OperationMetadata verb */ + verb?: (string|null); + + /** OperationMetadata statusMessage */ + statusMessage?: (string|null); + + /** OperationMetadata requestedCancellation */ + requestedCancellation?: (boolean|null); + + /** OperationMetadata apiVersion */ + apiVersion?: (string|null); + } + + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { + + /** + * Constructs a new OperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IOperationMetadata); + + /** OperationMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata target. */ + public target: string; + + /** OperationMetadata verb. */ + public verb: string; + + /** OperationMetadata statusMessage. */ + public statusMessage: string; + + /** OperationMetadata requestedCancellation. */ + public requestedCancellation: boolean; + + /** OperationMetadata apiVersion. */ + public apiVersion: string; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationMetadata instance + */ + public static create(properties?: google.cloud.deploy.v1.IOperationMetadata): google.cloud.deploy.v1.OperationMetadata; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.deploy.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.OperationMetadata; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.OperationMetadata; + + /** + * Verifies an OperationMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.OperationMetadata; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @param message OperationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ApproveRolloutRequest. */ + interface IApproveRolloutRequest { + + /** ApproveRolloutRequest name */ + name?: (string|null); + + /** ApproveRolloutRequest approved */ + approved?: (boolean|null); + } + + /** Represents an ApproveRolloutRequest. */ + class ApproveRolloutRequest implements IApproveRolloutRequest { + + /** + * Constructs a new ApproveRolloutRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IApproveRolloutRequest); + + /** ApproveRolloutRequest name. */ + public name: string; + + /** ApproveRolloutRequest approved. */ + public approved: boolean; + + /** + * Creates a new ApproveRolloutRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ApproveRolloutRequest instance + */ + public static create(properties?: google.cloud.deploy.v1.IApproveRolloutRequest): google.cloud.deploy.v1.ApproveRolloutRequest; + + /** + * Encodes the specified ApproveRolloutRequest message. Does not implicitly {@link google.cloud.deploy.v1.ApproveRolloutRequest.verify|verify} messages. + * @param message ApproveRolloutRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IApproveRolloutRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ApproveRolloutRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ApproveRolloutRequest.verify|verify} messages. + * @param message ApproveRolloutRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IApproveRolloutRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ApproveRolloutRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ApproveRolloutRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.ApproveRolloutRequest; + + /** + * Decodes an ApproveRolloutRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ApproveRolloutRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.ApproveRolloutRequest; + + /** + * Verifies an ApproveRolloutRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ApproveRolloutRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ApproveRolloutRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.ApproveRolloutRequest; + + /** + * Creates a plain object from an ApproveRolloutRequest message. Also converts values to other types if specified. + * @param message ApproveRolloutRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.ApproveRolloutRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ApproveRolloutRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ApproveRolloutRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ApproveRolloutResponse. */ + interface IApproveRolloutResponse { + } + + /** Represents an ApproveRolloutResponse. */ + class ApproveRolloutResponse implements IApproveRolloutResponse { + + /** + * Constructs a new ApproveRolloutResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IApproveRolloutResponse); + + /** + * Creates a new ApproveRolloutResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ApproveRolloutResponse instance + */ + public static create(properties?: google.cloud.deploy.v1.IApproveRolloutResponse): google.cloud.deploy.v1.ApproveRolloutResponse; + + /** + * Encodes the specified ApproveRolloutResponse message. Does not implicitly {@link google.cloud.deploy.v1.ApproveRolloutResponse.verify|verify} messages. + * @param message ApproveRolloutResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IApproveRolloutResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ApproveRolloutResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ApproveRolloutResponse.verify|verify} messages. + * @param message ApproveRolloutResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IApproveRolloutResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ApproveRolloutResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ApproveRolloutResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.ApproveRolloutResponse; + + /** + * Decodes an ApproveRolloutResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ApproveRolloutResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.ApproveRolloutResponse; + + /** + * Verifies an ApproveRolloutResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ApproveRolloutResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ApproveRolloutResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.ApproveRolloutResponse; + + /** + * Creates a plain object from an ApproveRolloutResponse message. Also converts values to other types if specified. + * @param message ApproveRolloutResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.ApproveRolloutResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ApproveRolloutResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ApproveRolloutResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RetryJobRequest. */ + interface IRetryJobRequest { + + /** RetryJobRequest rollout */ + rollout?: (string|null); + + /** RetryJobRequest phaseId */ + phaseId?: (string|null); + + /** RetryJobRequest jobId */ + jobId?: (string|null); + } + + /** Represents a RetryJobRequest. */ + class RetryJobRequest implements IRetryJobRequest { + + /** + * Constructs a new RetryJobRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IRetryJobRequest); + + /** RetryJobRequest rollout. */ + public rollout: string; + + /** RetryJobRequest phaseId. */ + public phaseId: string; + + /** RetryJobRequest jobId. */ + public jobId: string; + + /** + * Creates a new RetryJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RetryJobRequest instance + */ + public static create(properties?: google.cloud.deploy.v1.IRetryJobRequest): google.cloud.deploy.v1.RetryJobRequest; + + /** + * Encodes the specified RetryJobRequest message. Does not implicitly {@link google.cloud.deploy.v1.RetryJobRequest.verify|verify} messages. + * @param message RetryJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IRetryJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RetryJobRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.RetryJobRequest.verify|verify} messages. + * @param message RetryJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IRetryJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RetryJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RetryJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.RetryJobRequest; + + /** + * Decodes a RetryJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RetryJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.RetryJobRequest; + + /** + * Verifies a RetryJobRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RetryJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RetryJobRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.RetryJobRequest; + + /** + * Creates a plain object from a RetryJobRequest message. Also converts values to other types if specified. + * @param message RetryJobRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.RetryJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RetryJobRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RetryJobRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RetryJobResponse. */ + interface IRetryJobResponse { + } + + /** Represents a RetryJobResponse. */ + class RetryJobResponse implements IRetryJobResponse { + + /** + * Constructs a new RetryJobResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IRetryJobResponse); + + /** + * Creates a new RetryJobResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RetryJobResponse instance + */ + public static create(properties?: google.cloud.deploy.v1.IRetryJobResponse): google.cloud.deploy.v1.RetryJobResponse; + + /** + * Encodes the specified RetryJobResponse message. Does not implicitly {@link google.cloud.deploy.v1.RetryJobResponse.verify|verify} messages. + * @param message RetryJobResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IRetryJobResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RetryJobResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.RetryJobResponse.verify|verify} messages. + * @param message RetryJobResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IRetryJobResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RetryJobResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RetryJobResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.RetryJobResponse; + + /** + * Decodes a RetryJobResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RetryJobResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.RetryJobResponse; + + /** + * Verifies a RetryJobResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RetryJobResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RetryJobResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.RetryJobResponse; + + /** + * Creates a plain object from a RetryJobResponse message. Also converts values to other types if specified. + * @param message RetryJobResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.RetryJobResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RetryJobResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RetryJobResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AbandonReleaseRequest. */ + interface IAbandonReleaseRequest { + + /** AbandonReleaseRequest name */ + name?: (string|null); + } + + /** Represents an AbandonReleaseRequest. */ + class AbandonReleaseRequest implements IAbandonReleaseRequest { + + /** + * Constructs a new AbandonReleaseRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IAbandonReleaseRequest); + + /** AbandonReleaseRequest name. */ + public name: string; + + /** + * Creates a new AbandonReleaseRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns AbandonReleaseRequest instance + */ + public static create(properties?: google.cloud.deploy.v1.IAbandonReleaseRequest): google.cloud.deploy.v1.AbandonReleaseRequest; - /** ListRolloutsRequest filter */ - filter?: (string|null); + /** + * Encodes the specified AbandonReleaseRequest message. Does not implicitly {@link google.cloud.deploy.v1.AbandonReleaseRequest.verify|verify} messages. + * @param message AbandonReleaseRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IAbandonReleaseRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** ListRolloutsRequest orderBy */ - orderBy?: (string|null); - } + /** + * Encodes the specified AbandonReleaseRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AbandonReleaseRequest.verify|verify} messages. + * @param message AbandonReleaseRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IAbandonReleaseRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a ListRolloutsRequest. */ - class ListRolloutsRequest implements IListRolloutsRequest { + /** + * Decodes an AbandonReleaseRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AbandonReleaseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.AbandonReleaseRequest; /** - * Constructs a new ListRolloutsRequest. - * @param [properties] Properties to set + * Decodes an AbandonReleaseRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AbandonReleaseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - constructor(properties?: google.cloud.deploy.v1.IListRolloutsRequest); + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.AbandonReleaseRequest; - /** ListRolloutsRequest parent. */ - public parent: string; + /** + * Verifies an AbandonReleaseRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** ListRolloutsRequest pageSize. */ - public pageSize: number; + /** + * Creates an AbandonReleaseRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AbandonReleaseRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.AbandonReleaseRequest; - /** ListRolloutsRequest pageToken. */ - public pageToken: string; + /** + * Creates a plain object from an AbandonReleaseRequest message. Also converts values to other types if specified. + * @param message AbandonReleaseRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.AbandonReleaseRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ListRolloutsRequest filter. */ - public filter: string; + /** + * Converts this AbandonReleaseRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** ListRolloutsRequest orderBy. */ - public orderBy: string; + /** + * Gets the default type url for AbandonReleaseRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AbandonReleaseResponse. */ + interface IAbandonReleaseResponse { + } + + /** Represents an AbandonReleaseResponse. */ + class AbandonReleaseResponse implements IAbandonReleaseResponse { /** - * Creates a new ListRolloutsRequest instance using the specified properties. + * Constructs a new AbandonReleaseResponse. * @param [properties] Properties to set - * @returns ListRolloutsRequest instance */ - public static create(properties?: google.cloud.deploy.v1.IListRolloutsRequest): google.cloud.deploy.v1.ListRolloutsRequest; + constructor(properties?: google.cloud.deploy.v1.IAbandonReleaseResponse); /** - * Encodes the specified ListRolloutsRequest message. Does not implicitly {@link google.cloud.deploy.v1.ListRolloutsRequest.verify|verify} messages. - * @param message ListRolloutsRequest message or plain object to encode + * Creates a new AbandonReleaseResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns AbandonReleaseResponse instance + */ + public static create(properties?: google.cloud.deploy.v1.IAbandonReleaseResponse): google.cloud.deploy.v1.AbandonReleaseResponse; + + /** + * Encodes the specified AbandonReleaseResponse message. Does not implicitly {@link google.cloud.deploy.v1.AbandonReleaseResponse.verify|verify} messages. + * @param message AbandonReleaseResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.deploy.v1.IListRolloutsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.deploy.v1.IAbandonReleaseResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListRolloutsRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListRolloutsRequest.verify|verify} messages. - * @param message ListRolloutsRequest message or plain object to encode + * Encodes the specified AbandonReleaseResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AbandonReleaseResponse.verify|verify} messages. + * @param message AbandonReleaseResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.deploy.v1.IListRolloutsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.deploy.v1.IAbandonReleaseResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListRolloutsRequest message from the specified reader or buffer. + * Decodes an AbandonReleaseResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListRolloutsRequest + * @returns AbandonReleaseResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.ListRolloutsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.AbandonReleaseResponse; /** - * Decodes a ListRolloutsRequest message from the specified reader or buffer, length delimited. + * Decodes an AbandonReleaseResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListRolloutsRequest + * @returns AbandonReleaseResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.ListRolloutsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.AbandonReleaseResponse; /** - * Verifies a ListRolloutsRequest message. + * Verifies an AbandonReleaseResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListRolloutsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AbandonReleaseResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListRolloutsRequest + * @returns AbandonReleaseResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.ListRolloutsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.AbandonReleaseResponse; /** - * Creates a plain object from a ListRolloutsRequest message. Also converts values to other types if specified. - * @param message ListRolloutsRequest + * Creates a plain object from an AbandonReleaseResponse message. Also converts values to other types if specified. + * @param message AbandonReleaseResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.deploy.v1.ListRolloutsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.deploy.v1.AbandonReleaseResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListRolloutsRequest to JSON. + * Converts this AbandonReleaseResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListRolloutsRequest + * Gets the default type url for AbandonReleaseResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListRolloutsResponse. */ - interface IListRolloutsResponse { + /** Properties of a JobRun. */ + interface IJobRun { - /** ListRolloutsResponse rollouts */ - rollouts?: (google.cloud.deploy.v1.IRollout[]|null); + /** JobRun name */ + name?: (string|null); - /** ListRolloutsResponse nextPageToken */ - nextPageToken?: (string|null); + /** JobRun uid */ + uid?: (string|null); - /** ListRolloutsResponse unreachable */ - unreachable?: (string[]|null); + /** JobRun phaseId */ + phaseId?: (string|null); + + /** JobRun jobId */ + jobId?: (string|null); + + /** JobRun createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** JobRun startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** JobRun endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** JobRun state */ + state?: (google.cloud.deploy.v1.JobRun.State|keyof typeof google.cloud.deploy.v1.JobRun.State|null); + + /** JobRun deployJobRun */ + deployJobRun?: (google.cloud.deploy.v1.IDeployJobRun|null); + + /** JobRun verifyJobRun */ + verifyJobRun?: (google.cloud.deploy.v1.IVerifyJobRun|null); + + /** JobRun etag */ + etag?: (string|null); } - /** Represents a ListRolloutsResponse. */ - class ListRolloutsResponse implements IListRolloutsResponse { + /** Represents a JobRun. */ + class JobRun implements IJobRun { /** - * Constructs a new ListRolloutsResponse. + * Constructs a new JobRun. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.deploy.v1.IListRolloutsResponse); + constructor(properties?: google.cloud.deploy.v1.IJobRun); - /** ListRolloutsResponse rollouts. */ - public rollouts: google.cloud.deploy.v1.IRollout[]; + /** JobRun name. */ + public name: string; - /** ListRolloutsResponse nextPageToken. */ - public nextPageToken: string; + /** JobRun uid. */ + public uid: string; - /** ListRolloutsResponse unreachable. */ - public unreachable: string[]; + /** JobRun phaseId. */ + public phaseId: string; + + /** JobRun jobId. */ + public jobId: string; + + /** JobRun createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** JobRun startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** JobRun endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** JobRun state. */ + public state: (google.cloud.deploy.v1.JobRun.State|keyof typeof google.cloud.deploy.v1.JobRun.State); + + /** JobRun deployJobRun. */ + public deployJobRun?: (google.cloud.deploy.v1.IDeployJobRun|null); + + /** JobRun verifyJobRun. */ + public verifyJobRun?: (google.cloud.deploy.v1.IVerifyJobRun|null); + + /** JobRun etag. */ + public etag: string; + + /** JobRun jobRun. */ + public jobRun?: ("deployJobRun"|"verifyJobRun"); /** - * Creates a new ListRolloutsResponse instance using the specified properties. + * Creates a new JobRun instance using the specified properties. * @param [properties] Properties to set - * @returns ListRolloutsResponse instance + * @returns JobRun instance */ - public static create(properties?: google.cloud.deploy.v1.IListRolloutsResponse): google.cloud.deploy.v1.ListRolloutsResponse; + public static create(properties?: google.cloud.deploy.v1.IJobRun): google.cloud.deploy.v1.JobRun; /** - * Encodes the specified ListRolloutsResponse message. Does not implicitly {@link google.cloud.deploy.v1.ListRolloutsResponse.verify|verify} messages. - * @param message ListRolloutsResponse message or plain object to encode + * Encodes the specified JobRun message. Does not implicitly {@link google.cloud.deploy.v1.JobRun.verify|verify} messages. + * @param message JobRun message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.deploy.v1.IListRolloutsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.deploy.v1.IJobRun, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListRolloutsResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListRolloutsResponse.verify|verify} messages. - * @param message ListRolloutsResponse message or plain object to encode + * Encodes the specified JobRun message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.JobRun.verify|verify} messages. + * @param message JobRun message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.deploy.v1.IListRolloutsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.deploy.v1.IJobRun, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListRolloutsResponse message from the specified reader or buffer. + * Decodes a JobRun message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListRolloutsResponse + * @returns JobRun * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.ListRolloutsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.JobRun; /** - * Decodes a ListRolloutsResponse message from the specified reader or buffer, length delimited. + * Decodes a JobRun message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListRolloutsResponse + * @returns JobRun * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.ListRolloutsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.JobRun; /** - * Verifies a ListRolloutsResponse message. + * Verifies a JobRun message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListRolloutsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a JobRun message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListRolloutsResponse + * @returns JobRun */ - public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.ListRolloutsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.JobRun; /** - * Creates a plain object from a ListRolloutsResponse message. Also converts values to other types if specified. - * @param message ListRolloutsResponse + * Creates a plain object from a JobRun message. Also converts values to other types if specified. + * @param message JobRun * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.deploy.v1.ListRolloutsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.deploy.v1.JobRun, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListRolloutsResponse to JSON. + * Converts this JobRun to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListRolloutsResponse + * Gets the default type url for JobRun * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetRolloutRequest. */ - interface IGetRolloutRequest { + namespace JobRun { - /** GetRolloutRequest name */ - name?: (string|null); + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + IN_PROGRESS = 1, + SUCCEEDED = 2, + FAILED = 3 + } } - /** Represents a GetRolloutRequest. */ - class GetRolloutRequest implements IGetRolloutRequest { + /** Properties of a DeployJobRun. */ + interface IDeployJobRun { + + /** DeployJobRun build */ + build?: (string|null); + + /** DeployJobRun failureCause */ + failureCause?: (google.cloud.deploy.v1.DeployJobRun.FailureCause|keyof typeof google.cloud.deploy.v1.DeployJobRun.FailureCause|null); + + /** DeployJobRun failureMessage */ + failureMessage?: (string|null); + + /** DeployJobRun metadata */ + metadata?: (google.cloud.deploy.v1.IDeployJobRunMetadata|null); + } + + /** Represents a DeployJobRun. */ + class DeployJobRun implements IDeployJobRun { /** - * Constructs a new GetRolloutRequest. + * Constructs a new DeployJobRun. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.deploy.v1.IGetRolloutRequest); + constructor(properties?: google.cloud.deploy.v1.IDeployJobRun); - /** GetRolloutRequest name. */ - public name: string; + /** DeployJobRun build. */ + public build: string; + + /** DeployJobRun failureCause. */ + public failureCause: (google.cloud.deploy.v1.DeployJobRun.FailureCause|keyof typeof google.cloud.deploy.v1.DeployJobRun.FailureCause); + + /** DeployJobRun failureMessage. */ + public failureMessage: string; + + /** DeployJobRun metadata. */ + public metadata?: (google.cloud.deploy.v1.IDeployJobRunMetadata|null); /** - * Creates a new GetRolloutRequest instance using the specified properties. + * Creates a new DeployJobRun instance using the specified properties. * @param [properties] Properties to set - * @returns GetRolloutRequest instance + * @returns DeployJobRun instance */ - public static create(properties?: google.cloud.deploy.v1.IGetRolloutRequest): google.cloud.deploy.v1.GetRolloutRequest; + public static create(properties?: google.cloud.deploy.v1.IDeployJobRun): google.cloud.deploy.v1.DeployJobRun; /** - * Encodes the specified GetRolloutRequest message. Does not implicitly {@link google.cloud.deploy.v1.GetRolloutRequest.verify|verify} messages. - * @param message GetRolloutRequest message or plain object to encode + * Encodes the specified DeployJobRun message. Does not implicitly {@link google.cloud.deploy.v1.DeployJobRun.verify|verify} messages. + * @param message DeployJobRun message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.deploy.v1.IGetRolloutRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.deploy.v1.IDeployJobRun, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetRolloutRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GetRolloutRequest.verify|verify} messages. - * @param message GetRolloutRequest message or plain object to encode + * Encodes the specified DeployJobRun message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeployJobRun.verify|verify} messages. + * @param message DeployJobRun message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.deploy.v1.IGetRolloutRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.deploy.v1.IDeployJobRun, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetRolloutRequest message from the specified reader or buffer. + * Decodes a DeployJobRun message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetRolloutRequest + * @returns DeployJobRun * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.GetRolloutRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.DeployJobRun; /** - * Decodes a GetRolloutRequest message from the specified reader or buffer, length delimited. + * Decodes a DeployJobRun message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetRolloutRequest + * @returns DeployJobRun * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.GetRolloutRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.DeployJobRun; /** - * Verifies a GetRolloutRequest message. + * Verifies a DeployJobRun message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetRolloutRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeployJobRun message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetRolloutRequest + * @returns DeployJobRun */ - public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.GetRolloutRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.DeployJobRun; /** - * Creates a plain object from a GetRolloutRequest message. Also converts values to other types if specified. - * @param message GetRolloutRequest + * Creates a plain object from a DeployJobRun message. Also converts values to other types if specified. + * @param message DeployJobRun * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.deploy.v1.GetRolloutRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.deploy.v1.DeployJobRun, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetRolloutRequest to JSON. + * Converts this DeployJobRun to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetRolloutRequest + * Gets the default type url for DeployJobRun * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateRolloutRequest. */ - interface ICreateRolloutRequest { + namespace DeployJobRun { - /** CreateRolloutRequest parent */ - parent?: (string|null); + /** FailureCause enum. */ + enum FailureCause { + FAILURE_CAUSE_UNSPECIFIED = 0, + CLOUD_BUILD_UNAVAILABLE = 1, + EXECUTION_FAILED = 2, + DEADLINE_EXCEEDED = 3 + } + } - /** CreateRolloutRequest rolloutId */ - rolloutId?: (string|null); + /** Properties of a VerifyJobRun. */ + interface IVerifyJobRun { - /** CreateRolloutRequest rollout */ - rollout?: (google.cloud.deploy.v1.IRollout|null); + /** VerifyJobRun build */ + build?: (string|null); - /** CreateRolloutRequest requestId */ - requestId?: (string|null); + /** VerifyJobRun artifactUri */ + artifactUri?: (string|null); - /** CreateRolloutRequest validateOnly */ - validateOnly?: (boolean|null); + /** VerifyJobRun eventLogPath */ + eventLogPath?: (string|null); + + /** VerifyJobRun failureCause */ + failureCause?: (google.cloud.deploy.v1.VerifyJobRun.FailureCause|keyof typeof google.cloud.deploy.v1.VerifyJobRun.FailureCause|null); + + /** VerifyJobRun failureMessage */ + failureMessage?: (string|null); } - /** Represents a CreateRolloutRequest. */ - class CreateRolloutRequest implements ICreateRolloutRequest { + /** Represents a VerifyJobRun. */ + class VerifyJobRun implements IVerifyJobRun { /** - * Constructs a new CreateRolloutRequest. + * Constructs a new VerifyJobRun. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.deploy.v1.ICreateRolloutRequest); + constructor(properties?: google.cloud.deploy.v1.IVerifyJobRun); - /** CreateRolloutRequest parent. */ - public parent: string; + /** VerifyJobRun build. */ + public build: string; - /** CreateRolloutRequest rolloutId. */ - public rolloutId: string; + /** VerifyJobRun artifactUri. */ + public artifactUri: string; - /** CreateRolloutRequest rollout. */ - public rollout?: (google.cloud.deploy.v1.IRollout|null); + /** VerifyJobRun eventLogPath. */ + public eventLogPath: string; - /** CreateRolloutRequest requestId. */ - public requestId: string; + /** VerifyJobRun failureCause. */ + public failureCause: (google.cloud.deploy.v1.VerifyJobRun.FailureCause|keyof typeof google.cloud.deploy.v1.VerifyJobRun.FailureCause); - /** CreateRolloutRequest validateOnly. */ - public validateOnly: boolean; + /** VerifyJobRun failureMessage. */ + public failureMessage: string; /** - * Creates a new CreateRolloutRequest instance using the specified properties. + * Creates a new VerifyJobRun instance using the specified properties. * @param [properties] Properties to set - * @returns CreateRolloutRequest instance + * @returns VerifyJobRun instance */ - public static create(properties?: google.cloud.deploy.v1.ICreateRolloutRequest): google.cloud.deploy.v1.CreateRolloutRequest; + public static create(properties?: google.cloud.deploy.v1.IVerifyJobRun): google.cloud.deploy.v1.VerifyJobRun; /** - * Encodes the specified CreateRolloutRequest message. Does not implicitly {@link google.cloud.deploy.v1.CreateRolloutRequest.verify|verify} messages. - * @param message CreateRolloutRequest message or plain object to encode + * Encodes the specified VerifyJobRun message. Does not implicitly {@link google.cloud.deploy.v1.VerifyJobRun.verify|verify} messages. + * @param message VerifyJobRun message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.deploy.v1.ICreateRolloutRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.deploy.v1.IVerifyJobRun, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateRolloutRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CreateRolloutRequest.verify|verify} messages. - * @param message CreateRolloutRequest message or plain object to encode + * Encodes the specified VerifyJobRun message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.VerifyJobRun.verify|verify} messages. + * @param message VerifyJobRun message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.deploy.v1.ICreateRolloutRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.deploy.v1.IVerifyJobRun, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateRolloutRequest message from the specified reader or buffer. + * Decodes a VerifyJobRun message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateRolloutRequest + * @returns VerifyJobRun * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.CreateRolloutRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.VerifyJobRun; /** - * Decodes a CreateRolloutRequest message from the specified reader or buffer, length delimited. + * Decodes a VerifyJobRun message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateRolloutRequest + * @returns VerifyJobRun * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.CreateRolloutRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.VerifyJobRun; /** - * Verifies a CreateRolloutRequest message. + * Verifies a VerifyJobRun message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateRolloutRequest message from a plain object. Also converts values to their respective internal types. + * Creates a VerifyJobRun message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateRolloutRequest + * @returns VerifyJobRun */ - public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.CreateRolloutRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.VerifyJobRun; /** - * Creates a plain object from a CreateRolloutRequest message. Also converts values to other types if specified. - * @param message CreateRolloutRequest + * Creates a plain object from a VerifyJobRun message. Also converts values to other types if specified. + * @param message VerifyJobRun * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.deploy.v1.CreateRolloutRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.deploy.v1.VerifyJobRun, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateRolloutRequest to JSON. + * Converts this VerifyJobRun to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateRolloutRequest + * Gets the default type url for VerifyJobRun * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an OperationMetadata. */ - interface IOperationMetadata { + namespace VerifyJobRun { - /** OperationMetadata createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** FailureCause enum. */ + enum FailureCause { + FAILURE_CAUSE_UNSPECIFIED = 0, + CLOUD_BUILD_UNAVAILABLE = 1, + EXECUTION_FAILED = 2, + DEADLINE_EXCEEDED = 3, + VERIFICATION_CONFIG_NOT_FOUND = 4 + } + } - /** OperationMetadata endTime */ - endTime?: (google.protobuf.ITimestamp|null); + /** Properties of a ListJobRunsRequest. */ + interface IListJobRunsRequest { - /** OperationMetadata target */ - target?: (string|null); + /** ListJobRunsRequest parent */ + parent?: (string|null); - /** OperationMetadata verb */ - verb?: (string|null); + /** ListJobRunsRequest pageSize */ + pageSize?: (number|null); - /** OperationMetadata statusMessage */ - statusMessage?: (string|null); + /** ListJobRunsRequest pageToken */ + pageToken?: (string|null); - /** OperationMetadata requestedCancellation */ - requestedCancellation?: (boolean|null); + /** ListJobRunsRequest filter */ + filter?: (string|null); - /** OperationMetadata apiVersion */ - apiVersion?: (string|null); + /** ListJobRunsRequest orderBy */ + orderBy?: (string|null); } - /** Represents an OperationMetadata. */ - class OperationMetadata implements IOperationMetadata { + /** Represents a ListJobRunsRequest. */ + class ListJobRunsRequest implements IListJobRunsRequest { /** - * Constructs a new OperationMetadata. + * Constructs a new ListJobRunsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.deploy.v1.IOperationMetadata); + constructor(properties?: google.cloud.deploy.v1.IListJobRunsRequest); - /** OperationMetadata createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata target. */ - public target: string; + /** ListJobRunsRequest parent. */ + public parent: string; - /** OperationMetadata verb. */ - public verb: string; + /** ListJobRunsRequest pageSize. */ + public pageSize: number; - /** OperationMetadata statusMessage. */ - public statusMessage: string; + /** ListJobRunsRequest pageToken. */ + public pageToken: string; - /** OperationMetadata requestedCancellation. */ - public requestedCancellation: boolean; + /** ListJobRunsRequest filter. */ + public filter: string; - /** OperationMetadata apiVersion. */ - public apiVersion: string; + /** ListJobRunsRequest orderBy. */ + public orderBy: string; /** - * Creates a new OperationMetadata instance using the specified properties. + * Creates a new ListJobRunsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns OperationMetadata instance + * @returns ListJobRunsRequest instance */ - public static create(properties?: google.cloud.deploy.v1.IOperationMetadata): google.cloud.deploy.v1.OperationMetadata; + public static create(properties?: google.cloud.deploy.v1.IListJobRunsRequest): google.cloud.deploy.v1.ListJobRunsRequest; /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.deploy.v1.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode + * Encodes the specified ListJobRunsRequest message. Does not implicitly {@link google.cloud.deploy.v1.ListJobRunsRequest.verify|verify} messages. + * @param message ListJobRunsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.deploy.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.deploy.v1.IListJobRunsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode + * Encodes the specified ListJobRunsRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListJobRunsRequest.verify|verify} messages. + * @param message ListJobRunsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.deploy.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.deploy.v1.IListJobRunsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OperationMetadata message from the specified reader or buffer. + * Decodes a ListJobRunsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OperationMetadata + * @returns ListJobRunsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.OperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.ListJobRunsRequest; /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a ListJobRunsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OperationMetadata + * @returns ListJobRunsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.OperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.ListJobRunsRequest; /** - * Verifies an OperationMetadata message. + * Verifies a ListJobRunsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a ListJobRunsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OperationMetadata + * @returns ListJobRunsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.OperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.ListJobRunsRequest; /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. - * @param message OperationMetadata + * Creates a plain object from a ListJobRunsRequest message. Also converts values to other types if specified. + * @param message ListJobRunsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.deploy.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.deploy.v1.ListJobRunsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OperationMetadata to JSON. + * Converts this ListJobRunsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for OperationMetadata + * Gets the default type url for ListJobRunsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ApproveRolloutRequest. */ - interface IApproveRolloutRequest { + /** Properties of a ListJobRunsResponse. */ + interface IListJobRunsResponse { - /** ApproveRolloutRequest name */ - name?: (string|null); + /** ListJobRunsResponse jobRuns */ + jobRuns?: (google.cloud.deploy.v1.IJobRun[]|null); - /** ApproveRolloutRequest approved */ - approved?: (boolean|null); + /** ListJobRunsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListJobRunsResponse unreachable */ + unreachable?: (string[]|null); } - /** Represents an ApproveRolloutRequest. */ - class ApproveRolloutRequest implements IApproveRolloutRequest { + /** Represents a ListJobRunsResponse. */ + class ListJobRunsResponse implements IListJobRunsResponse { /** - * Constructs a new ApproveRolloutRequest. + * Constructs a new ListJobRunsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.deploy.v1.IApproveRolloutRequest); + constructor(properties?: google.cloud.deploy.v1.IListJobRunsResponse); - /** ApproveRolloutRequest name. */ - public name: string; + /** ListJobRunsResponse jobRuns. */ + public jobRuns: google.cloud.deploy.v1.IJobRun[]; - /** ApproveRolloutRequest approved. */ - public approved: boolean; + /** ListJobRunsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListJobRunsResponse unreachable. */ + public unreachable: string[]; /** - * Creates a new ApproveRolloutRequest instance using the specified properties. + * Creates a new ListJobRunsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ApproveRolloutRequest instance + * @returns ListJobRunsResponse instance */ - public static create(properties?: google.cloud.deploy.v1.IApproveRolloutRequest): google.cloud.deploy.v1.ApproveRolloutRequest; + public static create(properties?: google.cloud.deploy.v1.IListJobRunsResponse): google.cloud.deploy.v1.ListJobRunsResponse; /** - * Encodes the specified ApproveRolloutRequest message. Does not implicitly {@link google.cloud.deploy.v1.ApproveRolloutRequest.verify|verify} messages. - * @param message ApproveRolloutRequest message or plain object to encode + * Encodes the specified ListJobRunsResponse message. Does not implicitly {@link google.cloud.deploy.v1.ListJobRunsResponse.verify|verify} messages. + * @param message ListJobRunsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.deploy.v1.IApproveRolloutRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.deploy.v1.IListJobRunsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ApproveRolloutRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ApproveRolloutRequest.verify|verify} messages. - * @param message ApproveRolloutRequest message or plain object to encode + * Encodes the specified ListJobRunsResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListJobRunsResponse.verify|verify} messages. + * @param message ListJobRunsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.deploy.v1.IApproveRolloutRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.deploy.v1.IListJobRunsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ApproveRolloutRequest message from the specified reader or buffer. + * Decodes a ListJobRunsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ApproveRolloutRequest + * @returns ListJobRunsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.ApproveRolloutRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.ListJobRunsResponse; /** - * Decodes an ApproveRolloutRequest message from the specified reader or buffer, length delimited. + * Decodes a ListJobRunsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ApproveRolloutRequest + * @returns ListJobRunsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.ApproveRolloutRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.ListJobRunsResponse; /** - * Verifies an ApproveRolloutRequest message. + * Verifies a ListJobRunsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ApproveRolloutRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListJobRunsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ApproveRolloutRequest + * @returns ListJobRunsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.ApproveRolloutRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.ListJobRunsResponse; /** - * Creates a plain object from an ApproveRolloutRequest message. Also converts values to other types if specified. - * @param message ApproveRolloutRequest + * Creates a plain object from a ListJobRunsResponse message. Also converts values to other types if specified. + * @param message ListJobRunsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.deploy.v1.ApproveRolloutRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.deploy.v1.ListJobRunsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ApproveRolloutRequest to JSON. + * Converts this ListJobRunsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ApproveRolloutRequest + * Gets the default type url for ListJobRunsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ApproveRolloutResponse. */ - interface IApproveRolloutResponse { + /** Properties of a GetJobRunRequest. */ + interface IGetJobRunRequest { + + /** GetJobRunRequest name */ + name?: (string|null); } - /** Represents an ApproveRolloutResponse. */ - class ApproveRolloutResponse implements IApproveRolloutResponse { + /** Represents a GetJobRunRequest. */ + class GetJobRunRequest implements IGetJobRunRequest { /** - * Constructs a new ApproveRolloutResponse. + * Constructs a new GetJobRunRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.deploy.v1.IApproveRolloutResponse); + constructor(properties?: google.cloud.deploy.v1.IGetJobRunRequest); + + /** GetJobRunRequest name. */ + public name: string; /** - * Creates a new ApproveRolloutResponse instance using the specified properties. + * Creates a new GetJobRunRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ApproveRolloutResponse instance + * @returns GetJobRunRequest instance */ - public static create(properties?: google.cloud.deploy.v1.IApproveRolloutResponse): google.cloud.deploy.v1.ApproveRolloutResponse; + public static create(properties?: google.cloud.deploy.v1.IGetJobRunRequest): google.cloud.deploy.v1.GetJobRunRequest; /** - * Encodes the specified ApproveRolloutResponse message. Does not implicitly {@link google.cloud.deploy.v1.ApproveRolloutResponse.verify|verify} messages. - * @param message ApproveRolloutResponse message or plain object to encode + * Encodes the specified GetJobRunRequest message. Does not implicitly {@link google.cloud.deploy.v1.GetJobRunRequest.verify|verify} messages. + * @param message GetJobRunRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.deploy.v1.IApproveRolloutResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.deploy.v1.IGetJobRunRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ApproveRolloutResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ApproveRolloutResponse.verify|verify} messages. - * @param message ApproveRolloutResponse message or plain object to encode + * Encodes the specified GetJobRunRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GetJobRunRequest.verify|verify} messages. + * @param message GetJobRunRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.deploy.v1.IApproveRolloutResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.deploy.v1.IGetJobRunRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ApproveRolloutResponse message from the specified reader or buffer. + * Decodes a GetJobRunRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ApproveRolloutResponse + * @returns GetJobRunRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.ApproveRolloutResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.GetJobRunRequest; /** - * Decodes an ApproveRolloutResponse message from the specified reader or buffer, length delimited. + * Decodes a GetJobRunRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ApproveRolloutResponse + * @returns GetJobRunRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.ApproveRolloutResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.GetJobRunRequest; /** - * Verifies an ApproveRolloutResponse message. + * Verifies a GetJobRunRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ApproveRolloutResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetJobRunRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ApproveRolloutResponse + * @returns GetJobRunRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.ApproveRolloutResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.GetJobRunRequest; /** - * Creates a plain object from an ApproveRolloutResponse message. Also converts values to other types if specified. - * @param message ApproveRolloutResponse + * Creates a plain object from a GetJobRunRequest message. Also converts values to other types if specified. + * @param message GetJobRunRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.deploy.v1.ApproveRolloutResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.deploy.v1.GetJobRunRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ApproveRolloutResponse to JSON. + * Converts this GetJobRunRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ApproveRolloutResponse + * Gets the default type url for GetJobRunRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -5633,6 +8058,139 @@ export namespace google { TYPE_RENDER_STATUES_CHANGE = 2 } + /** Properties of a JobRunNotificationEvent. */ + interface IJobRunNotificationEvent { + + /** JobRunNotificationEvent message */ + message?: (string|null); + + /** JobRunNotificationEvent jobRun */ + jobRun?: (string|null); + + /** JobRunNotificationEvent pipelineUid */ + pipelineUid?: (string|null); + + /** JobRunNotificationEvent releaseUid */ + releaseUid?: (string|null); + + /** JobRunNotificationEvent rolloutUid */ + rolloutUid?: (string|null); + + /** JobRunNotificationEvent targetId */ + targetId?: (string|null); + + /** JobRunNotificationEvent type */ + type?: (google.cloud.deploy.v1.Type|keyof typeof google.cloud.deploy.v1.Type|null); + } + + /** Represents a JobRunNotificationEvent. */ + class JobRunNotificationEvent implements IJobRunNotificationEvent { + + /** + * Constructs a new JobRunNotificationEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IJobRunNotificationEvent); + + /** JobRunNotificationEvent message. */ + public message: string; + + /** JobRunNotificationEvent jobRun. */ + public jobRun: string; + + /** JobRunNotificationEvent pipelineUid. */ + public pipelineUid: string; + + /** JobRunNotificationEvent releaseUid. */ + public releaseUid: string; + + /** JobRunNotificationEvent rolloutUid. */ + public rolloutUid: string; + + /** JobRunNotificationEvent targetId. */ + public targetId: string; + + /** JobRunNotificationEvent type. */ + public type: (google.cloud.deploy.v1.Type|keyof typeof google.cloud.deploy.v1.Type); + + /** + * Creates a new JobRunNotificationEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns JobRunNotificationEvent instance + */ + public static create(properties?: google.cloud.deploy.v1.IJobRunNotificationEvent): google.cloud.deploy.v1.JobRunNotificationEvent; + + /** + * Encodes the specified JobRunNotificationEvent message. Does not implicitly {@link google.cloud.deploy.v1.JobRunNotificationEvent.verify|verify} messages. + * @param message JobRunNotificationEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IJobRunNotificationEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JobRunNotificationEvent message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.JobRunNotificationEvent.verify|verify} messages. + * @param message JobRunNotificationEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IJobRunNotificationEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JobRunNotificationEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JobRunNotificationEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.JobRunNotificationEvent; + + /** + * Decodes a JobRunNotificationEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JobRunNotificationEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.JobRunNotificationEvent; + + /** + * Verifies a JobRunNotificationEvent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JobRunNotificationEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JobRunNotificationEvent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.JobRunNotificationEvent; + + /** + * Creates a plain object from a JobRunNotificationEvent message. Also converts values to other types if specified. + * @param message JobRunNotificationEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.JobRunNotificationEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JobRunNotificationEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JobRunNotificationEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a ReleaseNotificationEvent. */ interface IReleaseNotificationEvent { diff --git a/packages/google-cloud-deploy/protos/protos.js b/packages/google-cloud-deploy/protos/protos.js index c011d70c8a6..4ff10bf8582 100644 --- a/packages/google-cloud-deploy/protos/protos.js +++ b/packages/google-cloud-deploy/protos/protos.js @@ -527,6 +527,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|abandonRelease}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef AbandonReleaseCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.deploy.v1.AbandonReleaseResponse} [response] AbandonReleaseResponse + */ + + /** + * Calls AbandonRelease. + * @function abandonRelease + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IAbandonReleaseRequest} request AbandonReleaseRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.AbandonReleaseCallback} callback Node-style callback called with the error, if any, and AbandonReleaseResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudDeploy.prototype.abandonRelease = function abandonRelease(request, callback) { + return this.rpcCall(abandonRelease, $root.google.cloud.deploy.v1.AbandonReleaseRequest, $root.google.cloud.deploy.v1.AbandonReleaseResponse, request, callback); + }, "name", { value: "AbandonRelease" }); + + /** + * Calls AbandonRelease. + * @function abandonRelease + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IAbandonReleaseRequest} request AbandonReleaseRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|approveRollout}. * @memberof google.cloud.deploy.v1.CloudDeploy @@ -659,6 +692,105 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|retryJob}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef RetryJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.deploy.v1.RetryJobResponse} [response] RetryJobResponse + */ + + /** + * Calls RetryJob. + * @function retryJob + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IRetryJobRequest} request RetryJobRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.RetryJobCallback} callback Node-style callback called with the error, if any, and RetryJobResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudDeploy.prototype.retryJob = function retryJob(request, callback) { + return this.rpcCall(retryJob, $root.google.cloud.deploy.v1.RetryJobRequest, $root.google.cloud.deploy.v1.RetryJobResponse, request, callback); + }, "name", { value: "RetryJob" }); + + /** + * Calls RetryJob. + * @function retryJob + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IRetryJobRequest} request RetryJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|listJobRuns}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef ListJobRunsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.deploy.v1.ListJobRunsResponse} [response] ListJobRunsResponse + */ + + /** + * Calls ListJobRuns. + * @function listJobRuns + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IListJobRunsRequest} request ListJobRunsRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.ListJobRunsCallback} callback Node-style callback called with the error, if any, and ListJobRunsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudDeploy.prototype.listJobRuns = function listJobRuns(request, callback) { + return this.rpcCall(listJobRuns, $root.google.cloud.deploy.v1.ListJobRunsRequest, $root.google.cloud.deploy.v1.ListJobRunsResponse, request, callback); + }, "name", { value: "ListJobRuns" }); + + /** + * Calls ListJobRuns. + * @function listJobRuns + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IListJobRunsRequest} request ListJobRunsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|getJobRun}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef GetJobRunCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.deploy.v1.JobRun} [response] JobRun + */ + + /** + * Calls GetJobRun. + * @function getJobRun + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IGetJobRunRequest} request GetJobRunRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.GetJobRunCallback} callback Node-style callback called with the error, if any, and JobRun + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudDeploy.prototype.getJobRun = function getJobRun(request, callback) { + return this.rpcCall(getJobRun, $root.google.cloud.deploy.v1.GetJobRunRequest, $root.google.cloud.deploy.v1.JobRun, request, callback); + }, "name", { value: "GetJobRun" }); + + /** + * Calls GetJobRun. + * @function getJobRun + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IGetJobRunRequest} request GetJobRunRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|getConfig}. * @memberof google.cloud.deploy.v1.CloudDeploy @@ -711,6 +843,7 @@ * @property {google.cloud.deploy.v1.ISerialPipeline|null} [serialPipeline] DeliveryPipeline serialPipeline * @property {google.cloud.deploy.v1.IPipelineCondition|null} [condition] DeliveryPipeline condition * @property {string|null} [etag] DeliveryPipeline etag + * @property {boolean|null} [suspended] DeliveryPipeline suspended */ /** @@ -810,6 +943,14 @@ */ DeliveryPipeline.prototype.etag = ""; + /** + * DeliveryPipeline suspended. + * @member {boolean} suspended + * @memberof google.cloud.deploy.v1.DeliveryPipeline + * @instance + */ + DeliveryPipeline.prototype.suspended = false; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -870,6 +1011,8 @@ writer.uint32(/* id 10, wireType 2 =*/82).string(message.etag); if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) $root.google.cloud.deploy.v1.PipelineCondition.encode(message.condition, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.suspended != null && Object.hasOwnProperty.call(message, "suspended")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.suspended); return writer; }; @@ -982,6 +1125,10 @@ message.etag = reader.string(); break; } + case 12: { + message.suspended = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -1069,6 +1216,9 @@ if (message.etag != null && message.hasOwnProperty("etag")) if (!$util.isString(message.etag)) return "etag: string expected"; + if (message.suspended != null && message.hasOwnProperty("suspended")) + if (typeof message.suspended !== "boolean") + return "suspended: boolean expected"; return null; }; @@ -1126,6 +1276,8 @@ } if (object.etag != null) message.etag = String(object.etag); + if (object.suspended != null) + message.suspended = Boolean(object.suspended); return message; }; @@ -1154,6 +1306,7 @@ object.updateTime = null; object.etag = ""; object.condition = null; + object.suspended = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -1185,6 +1338,8 @@ object.etag = message.etag; if (message.condition != null && message.hasOwnProperty("condition")) object.condition = $root.google.cloud.deploy.v1.PipelineCondition.toObject(message.condition, options); + if (message.suspended != null && message.hasOwnProperty("suspended")) + object.suspended = message.suspended; return object; }; @@ -1449,6 +1604,7 @@ * @interface IStage * @property {string|null} [targetId] Stage targetId * @property {Array.|null} [profiles] Stage profiles + * @property {google.cloud.deploy.v1.IStrategy|null} [strategy] Stage strategy */ /** @@ -1483,6 +1639,14 @@ */ Stage.prototype.profiles = $util.emptyArray; + /** + * Stage strategy. + * @member {google.cloud.deploy.v1.IStrategy|null|undefined} strategy + * @memberof google.cloud.deploy.v1.Stage + * @instance + */ + Stage.prototype.strategy = null; + /** * Creates a new Stage instance using the specified properties. * @function create @@ -1512,6 +1676,8 @@ if (message.profiles != null && message.profiles.length) for (var i = 0; i < message.profiles.length; ++i) writer.uint32(/* id 2, wireType 2 =*/18).string(message.profiles[i]); + if (message.strategy != null && Object.hasOwnProperty.call(message, "strategy")) + $root.google.cloud.deploy.v1.Strategy.encode(message.strategy, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -1556,6 +1722,10 @@ message.profiles.push(reader.string()); break; } + case 5: { + message.strategy = $root.google.cloud.deploy.v1.Strategy.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -1601,6 +1771,11 @@ if (!$util.isString(message.profiles[i])) return "profiles: string[] expected"; } + if (message.strategy != null && message.hasOwnProperty("strategy")) { + var error = $root.google.cloud.deploy.v1.Strategy.verify(message.strategy); + if (error) + return "strategy." + error; + } return null; }; @@ -1625,6 +1800,11 @@ for (var i = 0; i < object.profiles.length; ++i) message.profiles[i] = String(object.profiles[i]); } + if (object.strategy != null) { + if (typeof object.strategy !== "object") + throw TypeError(".google.cloud.deploy.v1.Stage.strategy: object expected"); + message.strategy = $root.google.cloud.deploy.v1.Strategy.fromObject(object.strategy); + } return message; }; @@ -1643,8 +1823,10 @@ var object = {}; if (options.arrays || options.defaults) object.profiles = []; - if (options.defaults) + if (options.defaults) { object.targetId = ""; + object.strategy = null; + } if (message.targetId != null && message.hasOwnProperty("targetId")) object.targetId = message.targetId; if (message.profiles && message.profiles.length) { @@ -1652,6 +1834,8 @@ for (var j = 0; j < message.profiles.length; ++j) object.profiles[j] = message.profiles[j]; } + if (message.strategy != null && message.hasOwnProperty("strategy")) + object.strategy = $root.google.cloud.deploy.v1.Strategy.toObject(message.strategy, options); return object; }; @@ -1684,25 +1868,24 @@ return Stage; })(); - v1.PipelineReadyCondition = (function() { + v1.Strategy = (function() { /** - * Properties of a PipelineReadyCondition. + * Properties of a Strategy. * @memberof google.cloud.deploy.v1 - * @interface IPipelineReadyCondition - * @property {boolean|null} [status] PipelineReadyCondition status - * @property {google.protobuf.ITimestamp|null} [updateTime] PipelineReadyCondition updateTime + * @interface IStrategy + * @property {google.cloud.deploy.v1.IStandard|null} [standard] Strategy standard */ /** - * Constructs a new PipelineReadyCondition. + * Constructs a new Strategy. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a PipelineReadyCondition. - * @implements IPipelineReadyCondition + * @classdesc Represents a Strategy. + * @implements IStrategy * @constructor - * @param {google.cloud.deploy.v1.IPipelineReadyCondition=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IStrategy=} [properties] Properties to set */ - function PipelineReadyCondition(properties) { + function Strategy(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1710,89 +1893,89 @@ } /** - * PipelineReadyCondition status. - * @member {boolean} status - * @memberof google.cloud.deploy.v1.PipelineReadyCondition + * Strategy standard. + * @member {google.cloud.deploy.v1.IStandard|null|undefined} standard + * @memberof google.cloud.deploy.v1.Strategy * @instance */ - PipelineReadyCondition.prototype.status = false; + Strategy.prototype.standard = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * PipelineReadyCondition updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.deploy.v1.PipelineReadyCondition + * Strategy deploymentStrategy. + * @member {"standard"|undefined} deploymentStrategy + * @memberof google.cloud.deploy.v1.Strategy * @instance */ - PipelineReadyCondition.prototype.updateTime = null; + Object.defineProperty(Strategy.prototype, "deploymentStrategy", { + get: $util.oneOfGetter($oneOfFields = ["standard"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new PipelineReadyCondition instance using the specified properties. + * Creates a new Strategy instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.PipelineReadyCondition + * @memberof google.cloud.deploy.v1.Strategy * @static - * @param {google.cloud.deploy.v1.IPipelineReadyCondition=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.PipelineReadyCondition} PipelineReadyCondition instance + * @param {google.cloud.deploy.v1.IStrategy=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.Strategy} Strategy instance */ - PipelineReadyCondition.create = function create(properties) { - return new PipelineReadyCondition(properties); + Strategy.create = function create(properties) { + return new Strategy(properties); }; /** - * Encodes the specified PipelineReadyCondition message. Does not implicitly {@link google.cloud.deploy.v1.PipelineReadyCondition.verify|verify} messages. + * Encodes the specified Strategy message. Does not implicitly {@link google.cloud.deploy.v1.Strategy.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.PipelineReadyCondition + * @memberof google.cloud.deploy.v1.Strategy * @static - * @param {google.cloud.deploy.v1.IPipelineReadyCondition} message PipelineReadyCondition message or plain object to encode + * @param {google.cloud.deploy.v1.IStrategy} message Strategy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PipelineReadyCondition.encode = function encode(message, writer) { + Strategy.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.status); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.standard != null && Object.hasOwnProperty.call(message, "standard")) + $root.google.cloud.deploy.v1.Standard.encode(message.standard, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified PipelineReadyCondition message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.PipelineReadyCondition.verify|verify} messages. + * Encodes the specified Strategy message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Strategy.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.PipelineReadyCondition + * @memberof google.cloud.deploy.v1.Strategy * @static - * @param {google.cloud.deploy.v1.IPipelineReadyCondition} message PipelineReadyCondition message or plain object to encode + * @param {google.cloud.deploy.v1.IStrategy} message Strategy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PipelineReadyCondition.encodeDelimited = function encodeDelimited(message, writer) { + Strategy.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PipelineReadyCondition message from the specified reader or buffer. + * Decodes a Strategy message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.PipelineReadyCondition + * @memberof google.cloud.deploy.v1.Strategy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.PipelineReadyCondition} PipelineReadyCondition + * @returns {google.cloud.deploy.v1.Strategy} Strategy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PipelineReadyCondition.decode = function decode(reader, length) { + Strategy.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.PipelineReadyCondition(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Strategy(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: { - message.status = reader.bool(); - break; - } - case 4: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 1: { + message.standard = $root.google.cloud.deploy.v1.Standard.decode(reader, reader.uint32()); break; } default: @@ -1804,139 +1987,132 @@ }; /** - * Decodes a PipelineReadyCondition message from the specified reader or buffer, length delimited. + * Decodes a Strategy message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.PipelineReadyCondition + * @memberof google.cloud.deploy.v1.Strategy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.PipelineReadyCondition} PipelineReadyCondition + * @returns {google.cloud.deploy.v1.Strategy} Strategy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PipelineReadyCondition.decodeDelimited = function decodeDelimited(reader) { + Strategy.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PipelineReadyCondition message. + * Verifies a Strategy message. * @function verify - * @memberof google.cloud.deploy.v1.PipelineReadyCondition + * @memberof google.cloud.deploy.v1.Strategy * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PipelineReadyCondition.verify = function verify(message) { + Strategy.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.status != null && message.hasOwnProperty("status")) - if (typeof message.status !== "boolean") - return "status: boolean expected"; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; + var properties = {}; + if (message.standard != null && message.hasOwnProperty("standard")) { + properties.deploymentStrategy = 1; + { + var error = $root.google.cloud.deploy.v1.Standard.verify(message.standard); + if (error) + return "standard." + error; + } } return null; }; /** - * Creates a PipelineReadyCondition message from a plain object. Also converts values to their respective internal types. + * Creates a Strategy message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.PipelineReadyCondition + * @memberof google.cloud.deploy.v1.Strategy * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.PipelineReadyCondition} PipelineReadyCondition + * @returns {google.cloud.deploy.v1.Strategy} Strategy */ - PipelineReadyCondition.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.PipelineReadyCondition) + Strategy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.Strategy) return object; - var message = new $root.google.cloud.deploy.v1.PipelineReadyCondition(); - if (object.status != null) - message.status = Boolean(object.status); - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.deploy.v1.PipelineReadyCondition.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + var message = new $root.google.cloud.deploy.v1.Strategy(); + if (object.standard != null) { + if (typeof object.standard !== "object") + throw TypeError(".google.cloud.deploy.v1.Strategy.standard: object expected"); + message.standard = $root.google.cloud.deploy.v1.Standard.fromObject(object.standard); } return message; }; /** - * Creates a plain object from a PipelineReadyCondition message. Also converts values to other types if specified. + * Creates a plain object from a Strategy message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.PipelineReadyCondition + * @memberof google.cloud.deploy.v1.Strategy * @static - * @param {google.cloud.deploy.v1.PipelineReadyCondition} message PipelineReadyCondition + * @param {google.cloud.deploy.v1.Strategy} message Strategy * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PipelineReadyCondition.toObject = function toObject(message, options) { + Strategy.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.status = false; - object.updateTime = null; + if (message.standard != null && message.hasOwnProperty("standard")) { + object.standard = $root.google.cloud.deploy.v1.Standard.toObject(message.standard, options); + if (options.oneofs) + object.deploymentStrategy = "standard"; } - if (message.status != null && message.hasOwnProperty("status")) - object.status = message.status; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); return object; }; /** - * Converts this PipelineReadyCondition to JSON. + * Converts this Strategy to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.PipelineReadyCondition + * @memberof google.cloud.deploy.v1.Strategy * @instance * @returns {Object.} JSON object */ - PipelineReadyCondition.prototype.toJSON = function toJSON() { + Strategy.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PipelineReadyCondition + * Gets the default type url for Strategy * @function getTypeUrl - * @memberof google.cloud.deploy.v1.PipelineReadyCondition + * @memberof google.cloud.deploy.v1.Strategy * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PipelineReadyCondition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Strategy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.PipelineReadyCondition"; + return typeUrlPrefix + "/google.cloud.deploy.v1.Strategy"; }; - return PipelineReadyCondition; + return Strategy; })(); - v1.TargetsPresentCondition = (function() { + v1.Standard = (function() { /** - * Properties of a TargetsPresentCondition. + * Properties of a Standard. * @memberof google.cloud.deploy.v1 - * @interface ITargetsPresentCondition - * @property {boolean|null} [status] TargetsPresentCondition status - * @property {Array.|null} [missingTargets] TargetsPresentCondition missingTargets - * @property {google.protobuf.ITimestamp|null} [updateTime] TargetsPresentCondition updateTime + * @interface IStandard + * @property {boolean|null} [verify] Standard verify */ /** - * Constructs a new TargetsPresentCondition. + * Constructs a new Standard. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a TargetsPresentCondition. - * @implements ITargetsPresentCondition + * @classdesc Represents a Standard. + * @implements IStandard * @constructor - * @param {google.cloud.deploy.v1.ITargetsPresentCondition=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IStandard=} [properties] Properties to set */ - function TargetsPresentCondition(properties) { - this.missingTargets = []; + function Standard(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1944,106 +2120,75 @@ } /** - * TargetsPresentCondition status. - * @member {boolean} status - * @memberof google.cloud.deploy.v1.TargetsPresentCondition - * @instance - */ - TargetsPresentCondition.prototype.status = false; - - /** - * TargetsPresentCondition missingTargets. - * @member {Array.} missingTargets - * @memberof google.cloud.deploy.v1.TargetsPresentCondition - * @instance - */ - TargetsPresentCondition.prototype.missingTargets = $util.emptyArray; - - /** - * TargetsPresentCondition updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.deploy.v1.TargetsPresentCondition + * Standard verify. + * @member {boolean} verify + * @memberof google.cloud.deploy.v1.Standard * @instance */ - TargetsPresentCondition.prototype.updateTime = null; + Standard.prototype.verify = false; /** - * Creates a new TargetsPresentCondition instance using the specified properties. + * Creates a new Standard instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.TargetsPresentCondition + * @memberof google.cloud.deploy.v1.Standard * @static - * @param {google.cloud.deploy.v1.ITargetsPresentCondition=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.TargetsPresentCondition} TargetsPresentCondition instance + * @param {google.cloud.deploy.v1.IStandard=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.Standard} Standard instance */ - TargetsPresentCondition.create = function create(properties) { - return new TargetsPresentCondition(properties); + Standard.create = function create(properties) { + return new Standard(properties); }; /** - * Encodes the specified TargetsPresentCondition message. Does not implicitly {@link google.cloud.deploy.v1.TargetsPresentCondition.verify|verify} messages. + * Encodes the specified Standard message. Does not implicitly {@link google.cloud.deploy.v1.Standard.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.TargetsPresentCondition + * @memberof google.cloud.deploy.v1.Standard * @static - * @param {google.cloud.deploy.v1.ITargetsPresentCondition} message TargetsPresentCondition message or plain object to encode + * @param {google.cloud.deploy.v1.IStandard} message Standard message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TargetsPresentCondition.encode = function encode(message, writer) { + Standard.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.status); - if (message.missingTargets != null && message.missingTargets.length) - for (var i = 0; i < message.missingTargets.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.missingTargets[i]); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.verify != null && Object.hasOwnProperty.call(message, "verify")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.verify); return writer; }; /** - * Encodes the specified TargetsPresentCondition message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.TargetsPresentCondition.verify|verify} messages. + * Encodes the specified Standard message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Standard.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.TargetsPresentCondition + * @memberof google.cloud.deploy.v1.Standard * @static - * @param {google.cloud.deploy.v1.ITargetsPresentCondition} message TargetsPresentCondition message or plain object to encode + * @param {google.cloud.deploy.v1.IStandard} message Standard message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TargetsPresentCondition.encodeDelimited = function encodeDelimited(message, writer) { + Standard.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TargetsPresentCondition message from the specified reader or buffer. + * Decodes a Standard message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.TargetsPresentCondition + * @memberof google.cloud.deploy.v1.Standard * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.TargetsPresentCondition} TargetsPresentCondition + * @returns {google.cloud.deploy.v1.Standard} Standard * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TargetsPresentCondition.decode = function decode(reader, length) { + Standard.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.TargetsPresentCondition(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Standard(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.status = reader.bool(); - break; - } - case 2: { - if (!(message.missingTargets && message.missingTargets.length)) - message.missingTargets = []; - message.missingTargets.push(reader.string()); - break; - } - case 4: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.verify = reader.bool(); break; } default: @@ -2055,158 +2200,123 @@ }; /** - * Decodes a TargetsPresentCondition message from the specified reader or buffer, length delimited. + * Decodes a Standard message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.TargetsPresentCondition + * @memberof google.cloud.deploy.v1.Standard * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.TargetsPresentCondition} TargetsPresentCondition + * @returns {google.cloud.deploy.v1.Standard} Standard * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TargetsPresentCondition.decodeDelimited = function decodeDelimited(reader) { + Standard.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TargetsPresentCondition message. + * Verifies a Standard message. * @function verify - * @memberof google.cloud.deploy.v1.TargetsPresentCondition + * @memberof google.cloud.deploy.v1.Standard * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TargetsPresentCondition.verify = function verify(message) { + Standard.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.status != null && message.hasOwnProperty("status")) - if (typeof message.status !== "boolean") - return "status: boolean expected"; - if (message.missingTargets != null && message.hasOwnProperty("missingTargets")) { - if (!Array.isArray(message.missingTargets)) - return "missingTargets: array expected"; - for (var i = 0; i < message.missingTargets.length; ++i) - if (!$util.isString(message.missingTargets[i])) - return "missingTargets: string[] expected"; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } + if (message.verify != null && message.hasOwnProperty("verify")) + if (typeof message.verify !== "boolean") + return "verify: boolean expected"; return null; }; /** - * Creates a TargetsPresentCondition message from a plain object. Also converts values to their respective internal types. + * Creates a Standard message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.TargetsPresentCondition + * @memberof google.cloud.deploy.v1.Standard * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.TargetsPresentCondition} TargetsPresentCondition + * @returns {google.cloud.deploy.v1.Standard} Standard */ - TargetsPresentCondition.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.TargetsPresentCondition) + Standard.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.Standard) return object; - var message = new $root.google.cloud.deploy.v1.TargetsPresentCondition(); - if (object.status != null) - message.status = Boolean(object.status); - if (object.missingTargets) { - if (!Array.isArray(object.missingTargets)) - throw TypeError(".google.cloud.deploy.v1.TargetsPresentCondition.missingTargets: array expected"); - message.missingTargets = []; - for (var i = 0; i < object.missingTargets.length; ++i) - message.missingTargets[i] = String(object.missingTargets[i]); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.deploy.v1.TargetsPresentCondition.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } + var message = new $root.google.cloud.deploy.v1.Standard(); + if (object.verify != null) + message.verify = Boolean(object.verify); return message; }; /** - * Creates a plain object from a TargetsPresentCondition message. Also converts values to other types if specified. + * Creates a plain object from a Standard message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.TargetsPresentCondition + * @memberof google.cloud.deploy.v1.Standard * @static - * @param {google.cloud.deploy.v1.TargetsPresentCondition} message TargetsPresentCondition + * @param {google.cloud.deploy.v1.Standard} message Standard * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TargetsPresentCondition.toObject = function toObject(message, options) { + Standard.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.missingTargets = []; - if (options.defaults) { - object.status = false; - object.updateTime = null; - } - if (message.status != null && message.hasOwnProperty("status")) - object.status = message.status; - if (message.missingTargets && message.missingTargets.length) { - object.missingTargets = []; - for (var j = 0; j < message.missingTargets.length; ++j) - object.missingTargets[j] = message.missingTargets[j]; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (options.defaults) + object.verify = false; + if (message.verify != null && message.hasOwnProperty("verify")) + object.verify = message.verify; return object; }; /** - * Converts this TargetsPresentCondition to JSON. + * Converts this Standard to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.TargetsPresentCondition + * @memberof google.cloud.deploy.v1.Standard * @instance * @returns {Object.} JSON object */ - TargetsPresentCondition.prototype.toJSON = function toJSON() { + Standard.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TargetsPresentCondition + * Gets the default type url for Standard * @function getTypeUrl - * @memberof google.cloud.deploy.v1.TargetsPresentCondition + * @memberof google.cloud.deploy.v1.Standard * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TargetsPresentCondition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Standard.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.TargetsPresentCondition"; + return typeUrlPrefix + "/google.cloud.deploy.v1.Standard"; }; - return TargetsPresentCondition; + return Standard; })(); - v1.PipelineCondition = (function() { + v1.PipelineReadyCondition = (function() { /** - * Properties of a PipelineCondition. + * Properties of a PipelineReadyCondition. * @memberof google.cloud.deploy.v1 - * @interface IPipelineCondition - * @property {google.cloud.deploy.v1.IPipelineReadyCondition|null} [pipelineReadyCondition] PipelineCondition pipelineReadyCondition - * @property {google.cloud.deploy.v1.ITargetsPresentCondition|null} [targetsPresentCondition] PipelineCondition targetsPresentCondition + * @interface IPipelineReadyCondition + * @property {boolean|null} [status] PipelineReadyCondition status + * @property {google.protobuf.ITimestamp|null} [updateTime] PipelineReadyCondition updateTime */ /** - * Constructs a new PipelineCondition. + * Constructs a new PipelineReadyCondition. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a PipelineCondition. - * @implements IPipelineCondition + * @classdesc Represents a PipelineReadyCondition. + * @implements IPipelineReadyCondition * @constructor - * @param {google.cloud.deploy.v1.IPipelineCondition=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IPipelineReadyCondition=} [properties] Properties to set */ - function PipelineCondition(properties) { + function PipelineReadyCondition(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2214,89 +2324,89 @@ } /** - * PipelineCondition pipelineReadyCondition. - * @member {google.cloud.deploy.v1.IPipelineReadyCondition|null|undefined} pipelineReadyCondition - * @memberof google.cloud.deploy.v1.PipelineCondition + * PipelineReadyCondition status. + * @member {boolean} status + * @memberof google.cloud.deploy.v1.PipelineReadyCondition * @instance */ - PipelineCondition.prototype.pipelineReadyCondition = null; + PipelineReadyCondition.prototype.status = false; /** - * PipelineCondition targetsPresentCondition. - * @member {google.cloud.deploy.v1.ITargetsPresentCondition|null|undefined} targetsPresentCondition - * @memberof google.cloud.deploy.v1.PipelineCondition + * PipelineReadyCondition updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.deploy.v1.PipelineReadyCondition * @instance */ - PipelineCondition.prototype.targetsPresentCondition = null; + PipelineReadyCondition.prototype.updateTime = null; /** - * Creates a new PipelineCondition instance using the specified properties. + * Creates a new PipelineReadyCondition instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.PipelineCondition + * @memberof google.cloud.deploy.v1.PipelineReadyCondition * @static - * @param {google.cloud.deploy.v1.IPipelineCondition=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.PipelineCondition} PipelineCondition instance + * @param {google.cloud.deploy.v1.IPipelineReadyCondition=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.PipelineReadyCondition} PipelineReadyCondition instance */ - PipelineCondition.create = function create(properties) { - return new PipelineCondition(properties); + PipelineReadyCondition.create = function create(properties) { + return new PipelineReadyCondition(properties); }; /** - * Encodes the specified PipelineCondition message. Does not implicitly {@link google.cloud.deploy.v1.PipelineCondition.verify|verify} messages. + * Encodes the specified PipelineReadyCondition message. Does not implicitly {@link google.cloud.deploy.v1.PipelineReadyCondition.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.PipelineCondition + * @memberof google.cloud.deploy.v1.PipelineReadyCondition * @static - * @param {google.cloud.deploy.v1.IPipelineCondition} message PipelineCondition message or plain object to encode + * @param {google.cloud.deploy.v1.IPipelineReadyCondition} message PipelineReadyCondition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PipelineCondition.encode = function encode(message, writer) { + PipelineReadyCondition.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.pipelineReadyCondition != null && Object.hasOwnProperty.call(message, "pipelineReadyCondition")) - $root.google.cloud.deploy.v1.PipelineReadyCondition.encode(message.pipelineReadyCondition, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.targetsPresentCondition != null && Object.hasOwnProperty.call(message, "targetsPresentCondition")) - $root.google.cloud.deploy.v1.TargetsPresentCondition.encode(message.targetsPresentCondition, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.status); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified PipelineCondition message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.PipelineCondition.verify|verify} messages. + * Encodes the specified PipelineReadyCondition message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.PipelineReadyCondition.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.PipelineCondition + * @memberof google.cloud.deploy.v1.PipelineReadyCondition * @static - * @param {google.cloud.deploy.v1.IPipelineCondition} message PipelineCondition message or plain object to encode + * @param {google.cloud.deploy.v1.IPipelineReadyCondition} message PipelineReadyCondition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PipelineCondition.encodeDelimited = function encodeDelimited(message, writer) { + PipelineReadyCondition.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PipelineCondition message from the specified reader or buffer. + * Decodes a PipelineReadyCondition message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.PipelineCondition + * @memberof google.cloud.deploy.v1.PipelineReadyCondition * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.PipelineCondition} PipelineCondition + * @returns {google.cloud.deploy.v1.PipelineReadyCondition} PipelineReadyCondition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PipelineCondition.decode = function decode(reader, length) { + PipelineReadyCondition.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.PipelineCondition(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.PipelineReadyCondition(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.pipelineReadyCondition = $root.google.cloud.deploy.v1.PipelineReadyCondition.decode(reader, reader.uint32()); + case 3: { + message.status = reader.bool(); break; } - case 3: { - message.targetsPresentCondition = $root.google.cloud.deploy.v1.TargetsPresentCondition.decode(reader, reader.uint32()); + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } default: @@ -2308,145 +2418,139 @@ }; /** - * Decodes a PipelineCondition message from the specified reader or buffer, length delimited. + * Decodes a PipelineReadyCondition message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.PipelineCondition + * @memberof google.cloud.deploy.v1.PipelineReadyCondition * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.PipelineCondition} PipelineCondition + * @returns {google.cloud.deploy.v1.PipelineReadyCondition} PipelineReadyCondition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PipelineCondition.decodeDelimited = function decodeDelimited(reader) { + PipelineReadyCondition.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PipelineCondition message. + * Verifies a PipelineReadyCondition message. * @function verify - * @memberof google.cloud.deploy.v1.PipelineCondition + * @memberof google.cloud.deploy.v1.PipelineReadyCondition * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PipelineCondition.verify = function verify(message) { + PipelineReadyCondition.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.pipelineReadyCondition != null && message.hasOwnProperty("pipelineReadyCondition")) { - var error = $root.google.cloud.deploy.v1.PipelineReadyCondition.verify(message.pipelineReadyCondition); - if (error) - return "pipelineReadyCondition." + error; - } - if (message.targetsPresentCondition != null && message.hasOwnProperty("targetsPresentCondition")) { - var error = $root.google.cloud.deploy.v1.TargetsPresentCondition.verify(message.targetsPresentCondition); + if (message.status != null && message.hasOwnProperty("status")) + if (typeof message.status !== "boolean") + return "status: boolean expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); if (error) - return "targetsPresentCondition." + error; + return "updateTime." + error; } return null; }; /** - * Creates a PipelineCondition message from a plain object. Also converts values to their respective internal types. + * Creates a PipelineReadyCondition message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.PipelineCondition + * @memberof google.cloud.deploy.v1.PipelineReadyCondition * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.PipelineCondition} PipelineCondition + * @returns {google.cloud.deploy.v1.PipelineReadyCondition} PipelineReadyCondition */ - PipelineCondition.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.PipelineCondition) + PipelineReadyCondition.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.PipelineReadyCondition) return object; - var message = new $root.google.cloud.deploy.v1.PipelineCondition(); - if (object.pipelineReadyCondition != null) { - if (typeof object.pipelineReadyCondition !== "object") - throw TypeError(".google.cloud.deploy.v1.PipelineCondition.pipelineReadyCondition: object expected"); - message.pipelineReadyCondition = $root.google.cloud.deploy.v1.PipelineReadyCondition.fromObject(object.pipelineReadyCondition); - } - if (object.targetsPresentCondition != null) { - if (typeof object.targetsPresentCondition !== "object") - throw TypeError(".google.cloud.deploy.v1.PipelineCondition.targetsPresentCondition: object expected"); - message.targetsPresentCondition = $root.google.cloud.deploy.v1.TargetsPresentCondition.fromObject(object.targetsPresentCondition); + var message = new $root.google.cloud.deploy.v1.PipelineReadyCondition(); + if (object.status != null) + message.status = Boolean(object.status); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.deploy.v1.PipelineReadyCondition.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } return message; }; /** - * Creates a plain object from a PipelineCondition message. Also converts values to other types if specified. + * Creates a plain object from a PipelineReadyCondition message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.PipelineCondition + * @memberof google.cloud.deploy.v1.PipelineReadyCondition * @static - * @param {google.cloud.deploy.v1.PipelineCondition} message PipelineCondition + * @param {google.cloud.deploy.v1.PipelineReadyCondition} message PipelineReadyCondition * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PipelineCondition.toObject = function toObject(message, options) { + PipelineReadyCondition.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.pipelineReadyCondition = null; - object.targetsPresentCondition = null; + object.status = false; + object.updateTime = null; } - if (message.pipelineReadyCondition != null && message.hasOwnProperty("pipelineReadyCondition")) - object.pipelineReadyCondition = $root.google.cloud.deploy.v1.PipelineReadyCondition.toObject(message.pipelineReadyCondition, options); - if (message.targetsPresentCondition != null && message.hasOwnProperty("targetsPresentCondition")) - object.targetsPresentCondition = $root.google.cloud.deploy.v1.TargetsPresentCondition.toObject(message.targetsPresentCondition, options); + if (message.status != null && message.hasOwnProperty("status")) + object.status = message.status; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); return object; }; /** - * Converts this PipelineCondition to JSON. + * Converts this PipelineReadyCondition to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.PipelineCondition + * @memberof google.cloud.deploy.v1.PipelineReadyCondition * @instance * @returns {Object.} JSON object */ - PipelineCondition.prototype.toJSON = function toJSON() { + PipelineReadyCondition.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PipelineCondition + * Gets the default type url for PipelineReadyCondition * @function getTypeUrl - * @memberof google.cloud.deploy.v1.PipelineCondition + * @memberof google.cloud.deploy.v1.PipelineReadyCondition * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PipelineCondition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PipelineReadyCondition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.PipelineCondition"; + return typeUrlPrefix + "/google.cloud.deploy.v1.PipelineReadyCondition"; }; - return PipelineCondition; + return PipelineReadyCondition; })(); - v1.ListDeliveryPipelinesRequest = (function() { + v1.TargetsPresentCondition = (function() { /** - * Properties of a ListDeliveryPipelinesRequest. + * Properties of a TargetsPresentCondition. * @memberof google.cloud.deploy.v1 - * @interface IListDeliveryPipelinesRequest - * @property {string|null} [parent] ListDeliveryPipelinesRequest parent - * @property {number|null} [pageSize] ListDeliveryPipelinesRequest pageSize - * @property {string|null} [pageToken] ListDeliveryPipelinesRequest pageToken - * @property {string|null} [filter] ListDeliveryPipelinesRequest filter - * @property {string|null} [orderBy] ListDeliveryPipelinesRequest orderBy + * @interface ITargetsPresentCondition + * @property {boolean|null} [status] TargetsPresentCondition status + * @property {Array.|null} [missingTargets] TargetsPresentCondition missingTargets + * @property {google.protobuf.ITimestamp|null} [updateTime] TargetsPresentCondition updateTime */ /** - * Constructs a new ListDeliveryPipelinesRequest. + * Constructs a new TargetsPresentCondition. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a ListDeliveryPipelinesRequest. - * @implements IListDeliveryPipelinesRequest + * @classdesc Represents a TargetsPresentCondition. + * @implements ITargetsPresentCondition * @constructor - * @param {google.cloud.deploy.v1.IListDeliveryPipelinesRequest=} [properties] Properties to set + * @param {google.cloud.deploy.v1.ITargetsPresentCondition=} [properties] Properties to set */ - function ListDeliveryPipelinesRequest(properties) { + function TargetsPresentCondition(properties) { + this.missingTargets = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2454,131 +2558,106 @@ } /** - * ListDeliveryPipelinesRequest parent. - * @member {string} parent - * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest - * @instance - */ - ListDeliveryPipelinesRequest.prototype.parent = ""; - - /** - * ListDeliveryPipelinesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest - * @instance - */ - ListDeliveryPipelinesRequest.prototype.pageSize = 0; - - /** - * ListDeliveryPipelinesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest + * TargetsPresentCondition status. + * @member {boolean} status + * @memberof google.cloud.deploy.v1.TargetsPresentCondition * @instance */ - ListDeliveryPipelinesRequest.prototype.pageToken = ""; + TargetsPresentCondition.prototype.status = false; /** - * ListDeliveryPipelinesRequest filter. - * @member {string} filter - * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest + * TargetsPresentCondition missingTargets. + * @member {Array.} missingTargets + * @memberof google.cloud.deploy.v1.TargetsPresentCondition * @instance */ - ListDeliveryPipelinesRequest.prototype.filter = ""; + TargetsPresentCondition.prototype.missingTargets = $util.emptyArray; /** - * ListDeliveryPipelinesRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest + * TargetsPresentCondition updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.deploy.v1.TargetsPresentCondition * @instance */ - ListDeliveryPipelinesRequest.prototype.orderBy = ""; + TargetsPresentCondition.prototype.updateTime = null; /** - * Creates a new ListDeliveryPipelinesRequest instance using the specified properties. + * Creates a new TargetsPresentCondition instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest + * @memberof google.cloud.deploy.v1.TargetsPresentCondition * @static - * @param {google.cloud.deploy.v1.IListDeliveryPipelinesRequest=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.ListDeliveryPipelinesRequest} ListDeliveryPipelinesRequest instance + * @param {google.cloud.deploy.v1.ITargetsPresentCondition=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.TargetsPresentCondition} TargetsPresentCondition instance */ - ListDeliveryPipelinesRequest.create = function create(properties) { - return new ListDeliveryPipelinesRequest(properties); + TargetsPresentCondition.create = function create(properties) { + return new TargetsPresentCondition(properties); }; /** - * Encodes the specified ListDeliveryPipelinesRequest message. Does not implicitly {@link google.cloud.deploy.v1.ListDeliveryPipelinesRequest.verify|verify} messages. + * Encodes the specified TargetsPresentCondition message. Does not implicitly {@link google.cloud.deploy.v1.TargetsPresentCondition.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest + * @memberof google.cloud.deploy.v1.TargetsPresentCondition * @static - * @param {google.cloud.deploy.v1.IListDeliveryPipelinesRequest} message ListDeliveryPipelinesRequest message or plain object to encode + * @param {google.cloud.deploy.v1.ITargetsPresentCondition} message TargetsPresentCondition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeliveryPipelinesRequest.encode = function encode(message, writer) { + TargetsPresentCondition.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.status); + if (message.missingTargets != null && message.missingTargets.length) + for (var i = 0; i < message.missingTargets.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.missingTargets[i]); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListDeliveryPipelinesRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListDeliveryPipelinesRequest.verify|verify} messages. + * Encodes the specified TargetsPresentCondition message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.TargetsPresentCondition.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest + * @memberof google.cloud.deploy.v1.TargetsPresentCondition * @static - * @param {google.cloud.deploy.v1.IListDeliveryPipelinesRequest} message ListDeliveryPipelinesRequest message or plain object to encode + * @param {google.cloud.deploy.v1.ITargetsPresentCondition} message TargetsPresentCondition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeliveryPipelinesRequest.encodeDelimited = function encodeDelimited(message, writer) { + TargetsPresentCondition.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListDeliveryPipelinesRequest message from the specified reader or buffer. + * Decodes a TargetsPresentCondition message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest + * @memberof google.cloud.deploy.v1.TargetsPresentCondition * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.ListDeliveryPipelinesRequest} ListDeliveryPipelinesRequest + * @returns {google.cloud.deploy.v1.TargetsPresentCondition} TargetsPresentCondition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeliveryPipelinesRequest.decode = function decode(reader, length) { + TargetsPresentCondition.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListDeliveryPipelinesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.TargetsPresentCondition(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.status = reader.bool(); break; } case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); + if (!(message.missingTargets && message.missingTargets.length)) + message.missingTargets = []; + message.missingTargets.push(reader.string()); break; } case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } default: @@ -2590,159 +2669,158 @@ }; /** - * Decodes a ListDeliveryPipelinesRequest message from the specified reader or buffer, length delimited. + * Decodes a TargetsPresentCondition message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest + * @memberof google.cloud.deploy.v1.TargetsPresentCondition * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.ListDeliveryPipelinesRequest} ListDeliveryPipelinesRequest + * @returns {google.cloud.deploy.v1.TargetsPresentCondition} TargetsPresentCondition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeliveryPipelinesRequest.decodeDelimited = function decodeDelimited(reader) { + TargetsPresentCondition.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListDeliveryPipelinesRequest message. + * Verifies a TargetsPresentCondition message. * @function verify - * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest + * @memberof google.cloud.deploy.v1.TargetsPresentCondition * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListDeliveryPipelinesRequest.verify = function verify(message) { + TargetsPresentCondition.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; + if (message.status != null && message.hasOwnProperty("status")) + if (typeof message.status !== "boolean") + return "status: boolean expected"; + if (message.missingTargets != null && message.hasOwnProperty("missingTargets")) { + if (!Array.isArray(message.missingTargets)) + return "missingTargets: array expected"; + for (var i = 0; i < message.missingTargets.length; ++i) + if (!$util.isString(message.missingTargets[i])) + return "missingTargets: string[] expected"; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } return null; }; /** - * Creates a ListDeliveryPipelinesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TargetsPresentCondition message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest + * @memberof google.cloud.deploy.v1.TargetsPresentCondition * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.ListDeliveryPipelinesRequest} ListDeliveryPipelinesRequest + * @returns {google.cloud.deploy.v1.TargetsPresentCondition} TargetsPresentCondition */ - ListDeliveryPipelinesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.ListDeliveryPipelinesRequest) + TargetsPresentCondition.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.TargetsPresentCondition) return object; - var message = new $root.google.cloud.deploy.v1.ListDeliveryPipelinesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); + var message = new $root.google.cloud.deploy.v1.TargetsPresentCondition(); + if (object.status != null) + message.status = Boolean(object.status); + if (object.missingTargets) { + if (!Array.isArray(object.missingTargets)) + throw TypeError(".google.cloud.deploy.v1.TargetsPresentCondition.missingTargets: array expected"); + message.missingTargets = []; + for (var i = 0; i < object.missingTargets.length; ++i) + message.missingTargets[i] = String(object.missingTargets[i]); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.deploy.v1.TargetsPresentCondition.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } return message; }; /** - * Creates a plain object from a ListDeliveryPipelinesRequest message. Also converts values to other types if specified. + * Creates a plain object from a TargetsPresentCondition message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest + * @memberof google.cloud.deploy.v1.TargetsPresentCondition * @static - * @param {google.cloud.deploy.v1.ListDeliveryPipelinesRequest} message ListDeliveryPipelinesRequest + * @param {google.cloud.deploy.v1.TargetsPresentCondition} message TargetsPresentCondition * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListDeliveryPipelinesRequest.toObject = function toObject(message, options) { + TargetsPresentCondition.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.missingTargets = []; if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; + object.status = false; + object.updateTime = null; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; - }; - - /** - * Converts this ListDeliveryPipelinesRequest to JSON. + if (message.status != null && message.hasOwnProperty("status")) + object.status = message.status; + if (message.missingTargets && message.missingTargets.length) { + object.missingTargets = []; + for (var j = 0; j < message.missingTargets.length; ++j) + object.missingTargets[j] = message.missingTargets[j]; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + return object; + }; + + /** + * Converts this TargetsPresentCondition to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest + * @memberof google.cloud.deploy.v1.TargetsPresentCondition * @instance * @returns {Object.} JSON object */ - ListDeliveryPipelinesRequest.prototype.toJSON = function toJSON() { + TargetsPresentCondition.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListDeliveryPipelinesRequest + * Gets the default type url for TargetsPresentCondition * @function getTypeUrl - * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest + * @memberof google.cloud.deploy.v1.TargetsPresentCondition * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListDeliveryPipelinesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TargetsPresentCondition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.ListDeliveryPipelinesRequest"; + return typeUrlPrefix + "/google.cloud.deploy.v1.TargetsPresentCondition"; }; - return ListDeliveryPipelinesRequest; + return TargetsPresentCondition; })(); - v1.ListDeliveryPipelinesResponse = (function() { + v1.PipelineCondition = (function() { /** - * Properties of a ListDeliveryPipelinesResponse. + * Properties of a PipelineCondition. * @memberof google.cloud.deploy.v1 - * @interface IListDeliveryPipelinesResponse - * @property {Array.|null} [deliveryPipelines] ListDeliveryPipelinesResponse deliveryPipelines - * @property {string|null} [nextPageToken] ListDeliveryPipelinesResponse nextPageToken - * @property {Array.|null} [unreachable] ListDeliveryPipelinesResponse unreachable + * @interface IPipelineCondition + * @property {google.cloud.deploy.v1.IPipelineReadyCondition|null} [pipelineReadyCondition] PipelineCondition pipelineReadyCondition + * @property {google.cloud.deploy.v1.ITargetsPresentCondition|null} [targetsPresentCondition] PipelineCondition targetsPresentCondition */ /** - * Constructs a new ListDeliveryPipelinesResponse. + * Constructs a new PipelineCondition. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a ListDeliveryPipelinesResponse. - * @implements IListDeliveryPipelinesResponse + * @classdesc Represents a PipelineCondition. + * @implements IPipelineCondition * @constructor - * @param {google.cloud.deploy.v1.IListDeliveryPipelinesResponse=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IPipelineCondition=} [properties] Properties to set */ - function ListDeliveryPipelinesResponse(properties) { - this.deliveryPipelines = []; - this.unreachable = []; + function PipelineCondition(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2750,109 +2828,89 @@ } /** - * ListDeliveryPipelinesResponse deliveryPipelines. - * @member {Array.} deliveryPipelines - * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesResponse - * @instance - */ - ListDeliveryPipelinesResponse.prototype.deliveryPipelines = $util.emptyArray; - - /** - * ListDeliveryPipelinesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesResponse + * PipelineCondition pipelineReadyCondition. + * @member {google.cloud.deploy.v1.IPipelineReadyCondition|null|undefined} pipelineReadyCondition + * @memberof google.cloud.deploy.v1.PipelineCondition * @instance */ - ListDeliveryPipelinesResponse.prototype.nextPageToken = ""; + PipelineCondition.prototype.pipelineReadyCondition = null; /** - * ListDeliveryPipelinesResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesResponse + * PipelineCondition targetsPresentCondition. + * @member {google.cloud.deploy.v1.ITargetsPresentCondition|null|undefined} targetsPresentCondition + * @memberof google.cloud.deploy.v1.PipelineCondition * @instance */ - ListDeliveryPipelinesResponse.prototype.unreachable = $util.emptyArray; + PipelineCondition.prototype.targetsPresentCondition = null; /** - * Creates a new ListDeliveryPipelinesResponse instance using the specified properties. + * Creates a new PipelineCondition instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesResponse + * @memberof google.cloud.deploy.v1.PipelineCondition * @static - * @param {google.cloud.deploy.v1.IListDeliveryPipelinesResponse=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.ListDeliveryPipelinesResponse} ListDeliveryPipelinesResponse instance + * @param {google.cloud.deploy.v1.IPipelineCondition=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.PipelineCondition} PipelineCondition instance */ - ListDeliveryPipelinesResponse.create = function create(properties) { - return new ListDeliveryPipelinesResponse(properties); + PipelineCondition.create = function create(properties) { + return new PipelineCondition(properties); }; /** - * Encodes the specified ListDeliveryPipelinesResponse message. Does not implicitly {@link google.cloud.deploy.v1.ListDeliveryPipelinesResponse.verify|verify} messages. + * Encodes the specified PipelineCondition message. Does not implicitly {@link google.cloud.deploy.v1.PipelineCondition.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesResponse + * @memberof google.cloud.deploy.v1.PipelineCondition * @static - * @param {google.cloud.deploy.v1.IListDeliveryPipelinesResponse} message ListDeliveryPipelinesResponse message or plain object to encode + * @param {google.cloud.deploy.v1.IPipelineCondition} message PipelineCondition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeliveryPipelinesResponse.encode = function encode(message, writer) { + PipelineCondition.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deliveryPipelines != null && message.deliveryPipelines.length) - for (var i = 0; i < message.deliveryPipelines.length; ++i) - $root.google.cloud.deploy.v1.DeliveryPipeline.encode(message.deliveryPipelines[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + if (message.pipelineReadyCondition != null && Object.hasOwnProperty.call(message, "pipelineReadyCondition")) + $root.google.cloud.deploy.v1.PipelineReadyCondition.encode(message.pipelineReadyCondition, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.targetsPresentCondition != null && Object.hasOwnProperty.call(message, "targetsPresentCondition")) + $root.google.cloud.deploy.v1.TargetsPresentCondition.encode(message.targetsPresentCondition, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListDeliveryPipelinesResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListDeliveryPipelinesResponse.verify|verify} messages. + * Encodes the specified PipelineCondition message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.PipelineCondition.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesResponse + * @memberof google.cloud.deploy.v1.PipelineCondition * @static - * @param {google.cloud.deploy.v1.IListDeliveryPipelinesResponse} message ListDeliveryPipelinesResponse message or plain object to encode + * @param {google.cloud.deploy.v1.IPipelineCondition} message PipelineCondition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeliveryPipelinesResponse.encodeDelimited = function encodeDelimited(message, writer) { + PipelineCondition.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListDeliveryPipelinesResponse message from the specified reader or buffer. + * Decodes a PipelineCondition message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesResponse + * @memberof google.cloud.deploy.v1.PipelineCondition * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.ListDeliveryPipelinesResponse} ListDeliveryPipelinesResponse + * @returns {google.cloud.deploy.v1.PipelineCondition} PipelineCondition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeliveryPipelinesResponse.decode = function decode(reader, length) { + PipelineCondition.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListDeliveryPipelinesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.PipelineCondition(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.deliveryPipelines && message.deliveryPipelines.length)) - message.deliveryPipelines = []; - message.deliveryPipelines.push($root.google.cloud.deploy.v1.DeliveryPipeline.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); + message.pipelineReadyCondition = $root.google.cloud.deploy.v1.PipelineReadyCondition.decode(reader, reader.uint32()); break; } case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); + message.targetsPresentCondition = $root.google.cloud.deploy.v1.TargetsPresentCondition.decode(reader, reader.uint32()); break; } default: @@ -2864,169 +2922,145 @@ }; /** - * Decodes a ListDeliveryPipelinesResponse message from the specified reader or buffer, length delimited. + * Decodes a PipelineCondition message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesResponse + * @memberof google.cloud.deploy.v1.PipelineCondition * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.ListDeliveryPipelinesResponse} ListDeliveryPipelinesResponse + * @returns {google.cloud.deploy.v1.PipelineCondition} PipelineCondition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeliveryPipelinesResponse.decodeDelimited = function decodeDelimited(reader) { + PipelineCondition.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListDeliveryPipelinesResponse message. + * Verifies a PipelineCondition message. * @function verify - * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesResponse + * @memberof google.cloud.deploy.v1.PipelineCondition * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListDeliveryPipelinesResponse.verify = function verify(message) { + PipelineCondition.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.deliveryPipelines != null && message.hasOwnProperty("deliveryPipelines")) { - if (!Array.isArray(message.deliveryPipelines)) - return "deliveryPipelines: array expected"; - for (var i = 0; i < message.deliveryPipelines.length; ++i) { - var error = $root.google.cloud.deploy.v1.DeliveryPipeline.verify(message.deliveryPipelines[i]); - if (error) - return "deliveryPipelines." + error; - } + if (message.pipelineReadyCondition != null && message.hasOwnProperty("pipelineReadyCondition")) { + var error = $root.google.cloud.deploy.v1.PipelineReadyCondition.verify(message.pipelineReadyCondition); + if (error) + return "pipelineReadyCondition." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; + if (message.targetsPresentCondition != null && message.hasOwnProperty("targetsPresentCondition")) { + var error = $root.google.cloud.deploy.v1.TargetsPresentCondition.verify(message.targetsPresentCondition); + if (error) + return "targetsPresentCondition." + error; } return null; }; /** - * Creates a ListDeliveryPipelinesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a PipelineCondition message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesResponse + * @memberof google.cloud.deploy.v1.PipelineCondition * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.ListDeliveryPipelinesResponse} ListDeliveryPipelinesResponse + * @returns {google.cloud.deploy.v1.PipelineCondition} PipelineCondition */ - ListDeliveryPipelinesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.ListDeliveryPipelinesResponse) + PipelineCondition.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.PipelineCondition) return object; - var message = new $root.google.cloud.deploy.v1.ListDeliveryPipelinesResponse(); - if (object.deliveryPipelines) { - if (!Array.isArray(object.deliveryPipelines)) - throw TypeError(".google.cloud.deploy.v1.ListDeliveryPipelinesResponse.deliveryPipelines: array expected"); - message.deliveryPipelines = []; - for (var i = 0; i < object.deliveryPipelines.length; ++i) { - if (typeof object.deliveryPipelines[i] !== "object") - throw TypeError(".google.cloud.deploy.v1.ListDeliveryPipelinesResponse.deliveryPipelines: object expected"); - message.deliveryPipelines[i] = $root.google.cloud.deploy.v1.DeliveryPipeline.fromObject(object.deliveryPipelines[i]); - } + var message = new $root.google.cloud.deploy.v1.PipelineCondition(); + if (object.pipelineReadyCondition != null) { + if (typeof object.pipelineReadyCondition !== "object") + throw TypeError(".google.cloud.deploy.v1.PipelineCondition.pipelineReadyCondition: object expected"); + message.pipelineReadyCondition = $root.google.cloud.deploy.v1.PipelineReadyCondition.fromObject(object.pipelineReadyCondition); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.deploy.v1.ListDeliveryPipelinesResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); + if (object.targetsPresentCondition != null) { + if (typeof object.targetsPresentCondition !== "object") + throw TypeError(".google.cloud.deploy.v1.PipelineCondition.targetsPresentCondition: object expected"); + message.targetsPresentCondition = $root.google.cloud.deploy.v1.TargetsPresentCondition.fromObject(object.targetsPresentCondition); } return message; }; /** - * Creates a plain object from a ListDeliveryPipelinesResponse message. Also converts values to other types if specified. + * Creates a plain object from a PipelineCondition message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesResponse + * @memberof google.cloud.deploy.v1.PipelineCondition * @static - * @param {google.cloud.deploy.v1.ListDeliveryPipelinesResponse} message ListDeliveryPipelinesResponse + * @param {google.cloud.deploy.v1.PipelineCondition} message PipelineCondition * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListDeliveryPipelinesResponse.toObject = function toObject(message, options) { + PipelineCondition.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.deliveryPipelines = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.deliveryPipelines && message.deliveryPipelines.length) { - object.deliveryPipelines = []; - for (var j = 0; j < message.deliveryPipelines.length; ++j) - object.deliveryPipelines[j] = $root.google.cloud.deploy.v1.DeliveryPipeline.toObject(message.deliveryPipelines[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; + if (options.defaults) { + object.pipelineReadyCondition = null; + object.targetsPresentCondition = null; } + if (message.pipelineReadyCondition != null && message.hasOwnProperty("pipelineReadyCondition")) + object.pipelineReadyCondition = $root.google.cloud.deploy.v1.PipelineReadyCondition.toObject(message.pipelineReadyCondition, options); + if (message.targetsPresentCondition != null && message.hasOwnProperty("targetsPresentCondition")) + object.targetsPresentCondition = $root.google.cloud.deploy.v1.TargetsPresentCondition.toObject(message.targetsPresentCondition, options); return object; }; /** - * Converts this ListDeliveryPipelinesResponse to JSON. + * Converts this PipelineCondition to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesResponse + * @memberof google.cloud.deploy.v1.PipelineCondition * @instance * @returns {Object.} JSON object */ - ListDeliveryPipelinesResponse.prototype.toJSON = function toJSON() { + PipelineCondition.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListDeliveryPipelinesResponse + * Gets the default type url for PipelineCondition * @function getTypeUrl - * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesResponse + * @memberof google.cloud.deploy.v1.PipelineCondition * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListDeliveryPipelinesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PipelineCondition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.ListDeliveryPipelinesResponse"; + return typeUrlPrefix + "/google.cloud.deploy.v1.PipelineCondition"; }; - return ListDeliveryPipelinesResponse; + return PipelineCondition; })(); - v1.GetDeliveryPipelineRequest = (function() { + v1.ListDeliveryPipelinesRequest = (function() { /** - * Properties of a GetDeliveryPipelineRequest. + * Properties of a ListDeliveryPipelinesRequest. * @memberof google.cloud.deploy.v1 - * @interface IGetDeliveryPipelineRequest - * @property {string|null} [name] GetDeliveryPipelineRequest name + * @interface IListDeliveryPipelinesRequest + * @property {string|null} [parent] ListDeliveryPipelinesRequest parent + * @property {number|null} [pageSize] ListDeliveryPipelinesRequest pageSize + * @property {string|null} [pageToken] ListDeliveryPipelinesRequest pageToken + * @property {string|null} [filter] ListDeliveryPipelinesRequest filter + * @property {string|null} [orderBy] ListDeliveryPipelinesRequest orderBy */ /** - * Constructs a new GetDeliveryPipelineRequest. + * Constructs a new ListDeliveryPipelinesRequest. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a GetDeliveryPipelineRequest. - * @implements IGetDeliveryPipelineRequest + * @classdesc Represents a ListDeliveryPipelinesRequest. + * @implements IListDeliveryPipelinesRequest * @constructor - * @param {google.cloud.deploy.v1.IGetDeliveryPipelineRequest=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IListDeliveryPipelinesRequest=} [properties] Properties to set */ - function GetDeliveryPipelineRequest(properties) { + function ListDeliveryPipelinesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3034,75 +3068,131 @@ } /** - * GetDeliveryPipelineRequest name. - * @member {string} name - * @memberof google.cloud.deploy.v1.GetDeliveryPipelineRequest + * ListDeliveryPipelinesRequest parent. + * @member {string} parent + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest * @instance */ - GetDeliveryPipelineRequest.prototype.name = ""; + ListDeliveryPipelinesRequest.prototype.parent = ""; /** - * Creates a new GetDeliveryPipelineRequest instance using the specified properties. + * ListDeliveryPipelinesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest + * @instance + */ + ListDeliveryPipelinesRequest.prototype.pageSize = 0; + + /** + * ListDeliveryPipelinesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest + * @instance + */ + ListDeliveryPipelinesRequest.prototype.pageToken = ""; + + /** + * ListDeliveryPipelinesRequest filter. + * @member {string} filter + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest + * @instance + */ + ListDeliveryPipelinesRequest.prototype.filter = ""; + + /** + * ListDeliveryPipelinesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest + * @instance + */ + ListDeliveryPipelinesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListDeliveryPipelinesRequest instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.GetDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest * @static - * @param {google.cloud.deploy.v1.IGetDeliveryPipelineRequest=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.GetDeliveryPipelineRequest} GetDeliveryPipelineRequest instance + * @param {google.cloud.deploy.v1.IListDeliveryPipelinesRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ListDeliveryPipelinesRequest} ListDeliveryPipelinesRequest instance */ - GetDeliveryPipelineRequest.create = function create(properties) { - return new GetDeliveryPipelineRequest(properties); + ListDeliveryPipelinesRequest.create = function create(properties) { + return new ListDeliveryPipelinesRequest(properties); }; /** - * Encodes the specified GetDeliveryPipelineRequest message. Does not implicitly {@link google.cloud.deploy.v1.GetDeliveryPipelineRequest.verify|verify} messages. + * Encodes the specified ListDeliveryPipelinesRequest message. Does not implicitly {@link google.cloud.deploy.v1.ListDeliveryPipelinesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.GetDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest * @static - * @param {google.cloud.deploy.v1.IGetDeliveryPipelineRequest} message GetDeliveryPipelineRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IListDeliveryPipelinesRequest} message ListDeliveryPipelinesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetDeliveryPipelineRequest.encode = function encode(message, writer) { + ListDeliveryPipelinesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; /** - * Encodes the specified GetDeliveryPipelineRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GetDeliveryPipelineRequest.verify|verify} messages. + * Encodes the specified ListDeliveryPipelinesRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListDeliveryPipelinesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.GetDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest * @static - * @param {google.cloud.deploy.v1.IGetDeliveryPipelineRequest} message GetDeliveryPipelineRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IListDeliveryPipelinesRequest} message ListDeliveryPipelinesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetDeliveryPipelineRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListDeliveryPipelinesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetDeliveryPipelineRequest message from the specified reader or buffer. + * Decodes a ListDeliveryPipelinesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.GetDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.GetDeliveryPipelineRequest} GetDeliveryPipelineRequest + * @returns {google.cloud.deploy.v1.ListDeliveryPipelinesRequest} ListDeliveryPipelinesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetDeliveryPipelineRequest.decode = function decode(reader, length) { + ListDeliveryPipelinesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.GetDeliveryPipelineRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListDeliveryPipelinesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); break; } default: @@ -3114,126 +3204,159 @@ }; /** - * Decodes a GetDeliveryPipelineRequest message from the specified reader or buffer, length delimited. + * Decodes a ListDeliveryPipelinesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.GetDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.GetDeliveryPipelineRequest} GetDeliveryPipelineRequest + * @returns {google.cloud.deploy.v1.ListDeliveryPipelinesRequest} ListDeliveryPipelinesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetDeliveryPipelineRequest.decodeDelimited = function decodeDelimited(reader) { + ListDeliveryPipelinesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetDeliveryPipelineRequest message. + * Verifies a ListDeliveryPipelinesRequest message. * @function verify - * @memberof google.cloud.deploy.v1.GetDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetDeliveryPipelineRequest.verify = function verify(message) { + ListDeliveryPipelinesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; return null; }; /** - * Creates a GetDeliveryPipelineRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListDeliveryPipelinesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.GetDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.GetDeliveryPipelineRequest} GetDeliveryPipelineRequest + * @returns {google.cloud.deploy.v1.ListDeliveryPipelinesRequest} ListDeliveryPipelinesRequest */ - GetDeliveryPipelineRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.GetDeliveryPipelineRequest) + ListDeliveryPipelinesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ListDeliveryPipelinesRequest) return object; - var message = new $root.google.cloud.deploy.v1.GetDeliveryPipelineRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.deploy.v1.ListDeliveryPipelinesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); return message; }; /** - * Creates a plain object from a GetDeliveryPipelineRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListDeliveryPipelinesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.GetDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest * @static - * @param {google.cloud.deploy.v1.GetDeliveryPipelineRequest} message GetDeliveryPipelineRequest + * @param {google.cloud.deploy.v1.ListDeliveryPipelinesRequest} message ListDeliveryPipelinesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetDeliveryPipelineRequest.toObject = function toObject(message, options) { + ListDeliveryPipelinesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; return object; }; /** - * Converts this GetDeliveryPipelineRequest to JSON. + * Converts this ListDeliveryPipelinesRequest to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.GetDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest * @instance * @returns {Object.} JSON object */ - GetDeliveryPipelineRequest.prototype.toJSON = function toJSON() { + ListDeliveryPipelinesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetDeliveryPipelineRequest + * Gets the default type url for ListDeliveryPipelinesRequest * @function getTypeUrl - * @memberof google.cloud.deploy.v1.GetDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetDeliveryPipelineRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListDeliveryPipelinesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.GetDeliveryPipelineRequest"; + return typeUrlPrefix + "/google.cloud.deploy.v1.ListDeliveryPipelinesRequest"; }; - return GetDeliveryPipelineRequest; + return ListDeliveryPipelinesRequest; })(); - v1.CreateDeliveryPipelineRequest = (function() { + v1.ListDeliveryPipelinesResponse = (function() { /** - * Properties of a CreateDeliveryPipelineRequest. + * Properties of a ListDeliveryPipelinesResponse. * @memberof google.cloud.deploy.v1 - * @interface ICreateDeliveryPipelineRequest - * @property {string|null} [parent] CreateDeliveryPipelineRequest parent - * @property {string|null} [deliveryPipelineId] CreateDeliveryPipelineRequest deliveryPipelineId - * @property {google.cloud.deploy.v1.IDeliveryPipeline|null} [deliveryPipeline] CreateDeliveryPipelineRequest deliveryPipeline - * @property {string|null} [requestId] CreateDeliveryPipelineRequest requestId - * @property {boolean|null} [validateOnly] CreateDeliveryPipelineRequest validateOnly + * @interface IListDeliveryPipelinesResponse + * @property {Array.|null} [deliveryPipelines] ListDeliveryPipelinesResponse deliveryPipelines + * @property {string|null} [nextPageToken] ListDeliveryPipelinesResponse nextPageToken + * @property {Array.|null} [unreachable] ListDeliveryPipelinesResponse unreachable */ /** - * Constructs a new CreateDeliveryPipelineRequest. + * Constructs a new ListDeliveryPipelinesResponse. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a CreateDeliveryPipelineRequest. - * @implements ICreateDeliveryPipelineRequest - * @constructor - * @param {google.cloud.deploy.v1.ICreateDeliveryPipelineRequest=} [properties] Properties to set + * @classdesc Represents a ListDeliveryPipelinesResponse. + * @implements IListDeliveryPipelinesResponse + * @constructor + * @param {google.cloud.deploy.v1.IListDeliveryPipelinesResponse=} [properties] Properties to set */ - function CreateDeliveryPipelineRequest(properties) { + function ListDeliveryPipelinesResponse(properties) { + this.deliveryPipelines = []; + this.unreachable = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3241,131 +3364,109 @@ } /** - * CreateDeliveryPipelineRequest parent. - * @member {string} parent - * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest - * @instance - */ - CreateDeliveryPipelineRequest.prototype.parent = ""; - - /** - * CreateDeliveryPipelineRequest deliveryPipelineId. - * @member {string} deliveryPipelineId - * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest - * @instance - */ - CreateDeliveryPipelineRequest.prototype.deliveryPipelineId = ""; - - /** - * CreateDeliveryPipelineRequest deliveryPipeline. - * @member {google.cloud.deploy.v1.IDeliveryPipeline|null|undefined} deliveryPipeline - * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest + * ListDeliveryPipelinesResponse deliveryPipelines. + * @member {Array.} deliveryPipelines + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesResponse * @instance */ - CreateDeliveryPipelineRequest.prototype.deliveryPipeline = null; + ListDeliveryPipelinesResponse.prototype.deliveryPipelines = $util.emptyArray; /** - * CreateDeliveryPipelineRequest requestId. - * @member {string} requestId - * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest + * ListDeliveryPipelinesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesResponse * @instance */ - CreateDeliveryPipelineRequest.prototype.requestId = ""; + ListDeliveryPipelinesResponse.prototype.nextPageToken = ""; /** - * CreateDeliveryPipelineRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest + * ListDeliveryPipelinesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesResponse * @instance */ - CreateDeliveryPipelineRequest.prototype.validateOnly = false; + ListDeliveryPipelinesResponse.prototype.unreachable = $util.emptyArray; /** - * Creates a new CreateDeliveryPipelineRequest instance using the specified properties. + * Creates a new ListDeliveryPipelinesResponse instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesResponse * @static - * @param {google.cloud.deploy.v1.ICreateDeliveryPipelineRequest=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.CreateDeliveryPipelineRequest} CreateDeliveryPipelineRequest instance + * @param {google.cloud.deploy.v1.IListDeliveryPipelinesResponse=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ListDeliveryPipelinesResponse} ListDeliveryPipelinesResponse instance */ - CreateDeliveryPipelineRequest.create = function create(properties) { - return new CreateDeliveryPipelineRequest(properties); + ListDeliveryPipelinesResponse.create = function create(properties) { + return new ListDeliveryPipelinesResponse(properties); }; /** - * Encodes the specified CreateDeliveryPipelineRequest message. Does not implicitly {@link google.cloud.deploy.v1.CreateDeliveryPipelineRequest.verify|verify} messages. + * Encodes the specified ListDeliveryPipelinesResponse message. Does not implicitly {@link google.cloud.deploy.v1.ListDeliveryPipelinesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesResponse * @static - * @param {google.cloud.deploy.v1.ICreateDeliveryPipelineRequest} message CreateDeliveryPipelineRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IListDeliveryPipelinesResponse} message ListDeliveryPipelinesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateDeliveryPipelineRequest.encode = function encode(message, writer) { + ListDeliveryPipelinesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.deliveryPipelineId != null && Object.hasOwnProperty.call(message, "deliveryPipelineId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.deliveryPipelineId); - if (message.deliveryPipeline != null && Object.hasOwnProperty.call(message, "deliveryPipeline")) - $root.google.cloud.deploy.v1.DeliveryPipeline.encode(message.deliveryPipeline, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); + if (message.deliveryPipelines != null && message.deliveryPipelines.length) + for (var i = 0; i < message.deliveryPipelines.length; ++i) + $root.google.cloud.deploy.v1.DeliveryPipeline.encode(message.deliveryPipelines[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); return writer; }; /** - * Encodes the specified CreateDeliveryPipelineRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CreateDeliveryPipelineRequest.verify|verify} messages. + * Encodes the specified ListDeliveryPipelinesResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListDeliveryPipelinesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesResponse * @static - * @param {google.cloud.deploy.v1.ICreateDeliveryPipelineRequest} message CreateDeliveryPipelineRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IListDeliveryPipelinesResponse} message ListDeliveryPipelinesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateDeliveryPipelineRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListDeliveryPipelinesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateDeliveryPipelineRequest message from the specified reader or buffer. + * Decodes a ListDeliveryPipelinesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.CreateDeliveryPipelineRequest} CreateDeliveryPipelineRequest + * @returns {google.cloud.deploy.v1.ListDeliveryPipelinesResponse} ListDeliveryPipelinesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateDeliveryPipelineRequest.decode = function decode(reader, length) { + ListDeliveryPipelinesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.CreateDeliveryPipelineRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListDeliveryPipelinesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + if (!(message.deliveryPipelines && message.deliveryPipelines.length)) + message.deliveryPipelines = []; + message.deliveryPipelines.push($root.google.cloud.deploy.v1.DeliveryPipeline.decode(reader, reader.uint32())); break; } case 2: { - message.deliveryPipelineId = reader.string(); + message.nextPageToken = reader.string(); break; } case 3: { - message.deliveryPipeline = $root.google.cloud.deploy.v1.DeliveryPipeline.decode(reader, reader.uint32()); - break; - } - case 4: { - message.requestId = reader.string(); - break; - } - case 5: { - message.validateOnly = reader.bool(); + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); break; } default: @@ -3377,164 +3478,169 @@ }; /** - * Decodes a CreateDeliveryPipelineRequest message from the specified reader or buffer, length delimited. + * Decodes a ListDeliveryPipelinesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.CreateDeliveryPipelineRequest} CreateDeliveryPipelineRequest + * @returns {google.cloud.deploy.v1.ListDeliveryPipelinesResponse} ListDeliveryPipelinesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateDeliveryPipelineRequest.decodeDelimited = function decodeDelimited(reader) { + ListDeliveryPipelinesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateDeliveryPipelineRequest message. + * Verifies a ListDeliveryPipelinesResponse message. * @function verify - * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateDeliveryPipelineRequest.verify = function verify(message) { + ListDeliveryPipelinesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.deliveryPipelineId != null && message.hasOwnProperty("deliveryPipelineId")) - if (!$util.isString(message.deliveryPipelineId)) - return "deliveryPipelineId: string expected"; - if (message.deliveryPipeline != null && message.hasOwnProperty("deliveryPipeline")) { - var error = $root.google.cloud.deploy.v1.DeliveryPipeline.verify(message.deliveryPipeline); - if (error) - return "deliveryPipeline." + error; + if (message.deliveryPipelines != null && message.hasOwnProperty("deliveryPipelines")) { + if (!Array.isArray(message.deliveryPipelines)) + return "deliveryPipelines: array expected"; + for (var i = 0; i < message.deliveryPipelines.length; ++i) { + var error = $root.google.cloud.deploy.v1.DeliveryPipeline.verify(message.deliveryPipelines[i]); + if (error) + return "deliveryPipelines." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; return null; }; /** - * Creates a CreateDeliveryPipelineRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListDeliveryPipelinesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.CreateDeliveryPipelineRequest} CreateDeliveryPipelineRequest + * @returns {google.cloud.deploy.v1.ListDeliveryPipelinesResponse} ListDeliveryPipelinesResponse */ - CreateDeliveryPipelineRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.CreateDeliveryPipelineRequest) + ListDeliveryPipelinesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ListDeliveryPipelinesResponse) return object; - var message = new $root.google.cloud.deploy.v1.CreateDeliveryPipelineRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.deliveryPipelineId != null) - message.deliveryPipelineId = String(object.deliveryPipelineId); - if (object.deliveryPipeline != null) { - if (typeof object.deliveryPipeline !== "object") - throw TypeError(".google.cloud.deploy.v1.CreateDeliveryPipelineRequest.deliveryPipeline: object expected"); - message.deliveryPipeline = $root.google.cloud.deploy.v1.DeliveryPipeline.fromObject(object.deliveryPipeline); + var message = new $root.google.cloud.deploy.v1.ListDeliveryPipelinesResponse(); + if (object.deliveryPipelines) { + if (!Array.isArray(object.deliveryPipelines)) + throw TypeError(".google.cloud.deploy.v1.ListDeliveryPipelinesResponse.deliveryPipelines: array expected"); + message.deliveryPipelines = []; + for (var i = 0; i < object.deliveryPipelines.length; ++i) { + if (typeof object.deliveryPipelines[i] !== "object") + throw TypeError(".google.cloud.deploy.v1.ListDeliveryPipelinesResponse.deliveryPipelines: object expected"); + message.deliveryPipelines[i] = $root.google.cloud.deploy.v1.DeliveryPipeline.fromObject(object.deliveryPipelines[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.deploy.v1.ListDeliveryPipelinesResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); } - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a CreateDeliveryPipelineRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListDeliveryPipelinesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesResponse * @static - * @param {google.cloud.deploy.v1.CreateDeliveryPipelineRequest} message CreateDeliveryPipelineRequest + * @param {google.cloud.deploy.v1.ListDeliveryPipelinesResponse} message ListDeliveryPipelinesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateDeliveryPipelineRequest.toObject = function toObject(message, options) { + ListDeliveryPipelinesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.deliveryPipelineId = ""; - object.deliveryPipeline = null; - object.requestId = ""; - object.validateOnly = false; + if (options.arrays || options.defaults) { + object.deliveryPipelines = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.deliveryPipelines && message.deliveryPipelines.length) { + object.deliveryPipelines = []; + for (var j = 0; j < message.deliveryPipelines.length; ++j) + object.deliveryPipelines[j] = $root.google.cloud.deploy.v1.DeliveryPipeline.toObject(message.deliveryPipelines[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.deliveryPipelineId != null && message.hasOwnProperty("deliveryPipelineId")) - object.deliveryPipelineId = message.deliveryPipelineId; - if (message.deliveryPipeline != null && message.hasOwnProperty("deliveryPipeline")) - object.deliveryPipeline = $root.google.cloud.deploy.v1.DeliveryPipeline.toObject(message.deliveryPipeline, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; return object; }; /** - * Converts this CreateDeliveryPipelineRequest to JSON. + * Converts this ListDeliveryPipelinesResponse to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesResponse * @instance * @returns {Object.} JSON object */ - CreateDeliveryPipelineRequest.prototype.toJSON = function toJSON() { + ListDeliveryPipelinesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateDeliveryPipelineRequest + * Gets the default type url for ListDeliveryPipelinesResponse * @function getTypeUrl - * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.ListDeliveryPipelinesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateDeliveryPipelineRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListDeliveryPipelinesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.CreateDeliveryPipelineRequest"; + return typeUrlPrefix + "/google.cloud.deploy.v1.ListDeliveryPipelinesResponse"; }; - return CreateDeliveryPipelineRequest; + return ListDeliveryPipelinesResponse; })(); - v1.UpdateDeliveryPipelineRequest = (function() { + v1.GetDeliveryPipelineRequest = (function() { /** - * Properties of an UpdateDeliveryPipelineRequest. + * Properties of a GetDeliveryPipelineRequest. * @memberof google.cloud.deploy.v1 - * @interface IUpdateDeliveryPipelineRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDeliveryPipelineRequest updateMask - * @property {google.cloud.deploy.v1.IDeliveryPipeline|null} [deliveryPipeline] UpdateDeliveryPipelineRequest deliveryPipeline - * @property {string|null} [requestId] UpdateDeliveryPipelineRequest requestId - * @property {boolean|null} [allowMissing] UpdateDeliveryPipelineRequest allowMissing - * @property {boolean|null} [validateOnly] UpdateDeliveryPipelineRequest validateOnly + * @interface IGetDeliveryPipelineRequest + * @property {string|null} [name] GetDeliveryPipelineRequest name */ /** - * Constructs a new UpdateDeliveryPipelineRequest. + * Constructs a new GetDeliveryPipelineRequest. * @memberof google.cloud.deploy.v1 - * @classdesc Represents an UpdateDeliveryPipelineRequest. - * @implements IUpdateDeliveryPipelineRequest + * @classdesc Represents a GetDeliveryPipelineRequest. + * @implements IGetDeliveryPipelineRequest * @constructor - * @param {google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IGetDeliveryPipelineRequest=} [properties] Properties to set */ - function UpdateDeliveryPipelineRequest(properties) { + function GetDeliveryPipelineRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3542,131 +3648,75 @@ } /** - * UpdateDeliveryPipelineRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest - * @instance - */ - UpdateDeliveryPipelineRequest.prototype.updateMask = null; - - /** - * UpdateDeliveryPipelineRequest deliveryPipeline. - * @member {google.cloud.deploy.v1.IDeliveryPipeline|null|undefined} deliveryPipeline - * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest - * @instance - */ - UpdateDeliveryPipelineRequest.prototype.deliveryPipeline = null; - - /** - * UpdateDeliveryPipelineRequest requestId. - * @member {string} requestId - * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest - * @instance - */ - UpdateDeliveryPipelineRequest.prototype.requestId = ""; - - /** - * UpdateDeliveryPipelineRequest allowMissing. - * @member {boolean} allowMissing - * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest - * @instance - */ - UpdateDeliveryPipelineRequest.prototype.allowMissing = false; - - /** - * UpdateDeliveryPipelineRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest + * GetDeliveryPipelineRequest name. + * @member {string} name + * @memberof google.cloud.deploy.v1.GetDeliveryPipelineRequest * @instance */ - UpdateDeliveryPipelineRequest.prototype.validateOnly = false; + GetDeliveryPipelineRequest.prototype.name = ""; /** - * Creates a new UpdateDeliveryPipelineRequest instance using the specified properties. + * Creates a new GetDeliveryPipelineRequest instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.GetDeliveryPipelineRequest * @static - * @param {google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.UpdateDeliveryPipelineRequest} UpdateDeliveryPipelineRequest instance + * @param {google.cloud.deploy.v1.IGetDeliveryPipelineRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.GetDeliveryPipelineRequest} GetDeliveryPipelineRequest instance */ - UpdateDeliveryPipelineRequest.create = function create(properties) { - return new UpdateDeliveryPipelineRequest(properties); + GetDeliveryPipelineRequest.create = function create(properties) { + return new GetDeliveryPipelineRequest(properties); }; /** - * Encodes the specified UpdateDeliveryPipelineRequest message. Does not implicitly {@link google.cloud.deploy.v1.UpdateDeliveryPipelineRequest.verify|verify} messages. + * Encodes the specified GetDeliveryPipelineRequest message. Does not implicitly {@link google.cloud.deploy.v1.GetDeliveryPipelineRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.GetDeliveryPipelineRequest * @static - * @param {google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest} message UpdateDeliveryPipelineRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IGetDeliveryPipelineRequest} message GetDeliveryPipelineRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateDeliveryPipelineRequest.encode = function encode(message, writer) { + GetDeliveryPipelineRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.deliveryPipeline != null && Object.hasOwnProperty.call(message, "deliveryPipeline")) - $root.google.cloud.deploy.v1.DeliveryPipeline.encode(message.deliveryPipeline, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); - if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.allowMissing); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified UpdateDeliveryPipelineRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.UpdateDeliveryPipelineRequest.verify|verify} messages. + * Encodes the specified GetDeliveryPipelineRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GetDeliveryPipelineRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.GetDeliveryPipelineRequest * @static - * @param {google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest} message UpdateDeliveryPipelineRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IGetDeliveryPipelineRequest} message GetDeliveryPipelineRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateDeliveryPipelineRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetDeliveryPipelineRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateDeliveryPipelineRequest message from the specified reader or buffer. + * Decodes a GetDeliveryPipelineRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.GetDeliveryPipelineRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.UpdateDeliveryPipelineRequest} UpdateDeliveryPipelineRequest + * @returns {google.cloud.deploy.v1.GetDeliveryPipelineRequest} GetDeliveryPipelineRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateDeliveryPipelineRequest.decode = function decode(reader, length) { + GetDeliveryPipelineRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.GetDeliveryPipelineRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 2: { - message.deliveryPipeline = $root.google.cloud.deploy.v1.DeliveryPipeline.decode(reader, reader.uint32()); - break; - } - case 3: { - message.requestId = reader.string(); - break; - } - case 4: { - message.allowMissing = reader.bool(); - break; - } - case 5: { - message.validateOnly = reader.bool(); + message.name = reader.string(); break; } default: @@ -3678,170 +3728,126 @@ }; /** - * Decodes an UpdateDeliveryPipelineRequest message from the specified reader or buffer, length delimited. + * Decodes a GetDeliveryPipelineRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.GetDeliveryPipelineRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.UpdateDeliveryPipelineRequest} UpdateDeliveryPipelineRequest + * @returns {google.cloud.deploy.v1.GetDeliveryPipelineRequest} GetDeliveryPipelineRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateDeliveryPipelineRequest.decodeDelimited = function decodeDelimited(reader) { + GetDeliveryPipelineRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateDeliveryPipelineRequest message. + * Verifies a GetDeliveryPipelineRequest message. * @function verify - * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.GetDeliveryPipelineRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateDeliveryPipelineRequest.verify = function verify(message) { + GetDeliveryPipelineRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.deliveryPipeline != null && message.hasOwnProperty("deliveryPipeline")) { - var error = $root.google.cloud.deploy.v1.DeliveryPipeline.verify(message.deliveryPipeline); - if (error) - return "deliveryPipeline." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) - if (typeof message.allowMissing !== "boolean") - return "allowMissing: boolean expected"; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates an UpdateDeliveryPipelineRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetDeliveryPipelineRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.GetDeliveryPipelineRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.UpdateDeliveryPipelineRequest} UpdateDeliveryPipelineRequest + * @returns {google.cloud.deploy.v1.GetDeliveryPipelineRequest} GetDeliveryPipelineRequest */ - UpdateDeliveryPipelineRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest) + GetDeliveryPipelineRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.GetDeliveryPipelineRequest) return object; - var message = new $root.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.deploy.v1.UpdateDeliveryPipelineRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.deliveryPipeline != null) { - if (typeof object.deliveryPipeline !== "object") - throw TypeError(".google.cloud.deploy.v1.UpdateDeliveryPipelineRequest.deliveryPipeline: object expected"); - message.deliveryPipeline = $root.google.cloud.deploy.v1.DeliveryPipeline.fromObject(object.deliveryPipeline); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.allowMissing != null) - message.allowMissing = Boolean(object.allowMissing); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); + var message = new $root.google.cloud.deploy.v1.GetDeliveryPipelineRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from an UpdateDeliveryPipelineRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetDeliveryPipelineRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.GetDeliveryPipelineRequest * @static - * @param {google.cloud.deploy.v1.UpdateDeliveryPipelineRequest} message UpdateDeliveryPipelineRequest + * @param {google.cloud.deploy.v1.GetDeliveryPipelineRequest} message GetDeliveryPipelineRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateDeliveryPipelineRequest.toObject = function toObject(message, options) { + GetDeliveryPipelineRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.updateMask = null; - object.deliveryPipeline = null; - object.requestId = ""; - object.allowMissing = false; - object.validateOnly = false; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.deliveryPipeline != null && message.hasOwnProperty("deliveryPipeline")) - object.deliveryPipeline = $root.google.cloud.deploy.v1.DeliveryPipeline.toObject(message.deliveryPipeline, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) - object.allowMissing = message.allowMissing; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this UpdateDeliveryPipelineRequest to JSON. + * Converts this GetDeliveryPipelineRequest to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.GetDeliveryPipelineRequest * @instance * @returns {Object.} JSON object */ - UpdateDeliveryPipelineRequest.prototype.toJSON = function toJSON() { + GetDeliveryPipelineRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateDeliveryPipelineRequest + * Gets the default type url for GetDeliveryPipelineRequest * @function getTypeUrl - * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.GetDeliveryPipelineRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateDeliveryPipelineRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetDeliveryPipelineRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.UpdateDeliveryPipelineRequest"; + return typeUrlPrefix + "/google.cloud.deploy.v1.GetDeliveryPipelineRequest"; }; - return UpdateDeliveryPipelineRequest; + return GetDeliveryPipelineRequest; })(); - v1.DeleteDeliveryPipelineRequest = (function() { + v1.CreateDeliveryPipelineRequest = (function() { /** - * Properties of a DeleteDeliveryPipelineRequest. + * Properties of a CreateDeliveryPipelineRequest. * @memberof google.cloud.deploy.v1 - * @interface IDeleteDeliveryPipelineRequest - * @property {string|null} [name] DeleteDeliveryPipelineRequest name - * @property {string|null} [requestId] DeleteDeliveryPipelineRequest requestId - * @property {boolean|null} [allowMissing] DeleteDeliveryPipelineRequest allowMissing - * @property {boolean|null} [validateOnly] DeleteDeliveryPipelineRequest validateOnly - * @property {boolean|null} [force] DeleteDeliveryPipelineRequest force - * @property {string|null} [etag] DeleteDeliveryPipelineRequest etag + * @interface ICreateDeliveryPipelineRequest + * @property {string|null} [parent] CreateDeliveryPipelineRequest parent + * @property {string|null} [deliveryPipelineId] CreateDeliveryPipelineRequest deliveryPipelineId + * @property {google.cloud.deploy.v1.IDeliveryPipeline|null} [deliveryPipeline] CreateDeliveryPipelineRequest deliveryPipeline + * @property {string|null} [requestId] CreateDeliveryPipelineRequest requestId + * @property {boolean|null} [validateOnly] CreateDeliveryPipelineRequest validateOnly */ /** - * Constructs a new DeleteDeliveryPipelineRequest. + * Constructs a new CreateDeliveryPipelineRequest. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a DeleteDeliveryPipelineRequest. - * @implements IDeleteDeliveryPipelineRequest + * @classdesc Represents a CreateDeliveryPipelineRequest. + * @implements ICreateDeliveryPipelineRequest * @constructor - * @param {google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest=} [properties] Properties to set + * @param {google.cloud.deploy.v1.ICreateDeliveryPipelineRequest=} [properties] Properties to set */ - function DeleteDeliveryPipelineRequest(properties) { + function CreateDeliveryPipelineRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3849,145 +3855,131 @@ } /** - * DeleteDeliveryPipelineRequest name. - * @member {string} name - * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest - * @instance - */ - DeleteDeliveryPipelineRequest.prototype.name = ""; - - /** - * DeleteDeliveryPipelineRequest requestId. - * @member {string} requestId - * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest + * CreateDeliveryPipelineRequest parent. + * @member {string} parent + * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest * @instance */ - DeleteDeliveryPipelineRequest.prototype.requestId = ""; + CreateDeliveryPipelineRequest.prototype.parent = ""; /** - * DeleteDeliveryPipelineRequest allowMissing. - * @member {boolean} allowMissing - * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest + * CreateDeliveryPipelineRequest deliveryPipelineId. + * @member {string} deliveryPipelineId + * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest * @instance */ - DeleteDeliveryPipelineRequest.prototype.allowMissing = false; + CreateDeliveryPipelineRequest.prototype.deliveryPipelineId = ""; /** - * DeleteDeliveryPipelineRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest + * CreateDeliveryPipelineRequest deliveryPipeline. + * @member {google.cloud.deploy.v1.IDeliveryPipeline|null|undefined} deliveryPipeline + * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest * @instance */ - DeleteDeliveryPipelineRequest.prototype.validateOnly = false; + CreateDeliveryPipelineRequest.prototype.deliveryPipeline = null; /** - * DeleteDeliveryPipelineRequest force. - * @member {boolean} force - * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest + * CreateDeliveryPipelineRequest requestId. + * @member {string} requestId + * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest * @instance */ - DeleteDeliveryPipelineRequest.prototype.force = false; + CreateDeliveryPipelineRequest.prototype.requestId = ""; /** - * DeleteDeliveryPipelineRequest etag. - * @member {string} etag - * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest + * CreateDeliveryPipelineRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest * @instance */ - DeleteDeliveryPipelineRequest.prototype.etag = ""; + CreateDeliveryPipelineRequest.prototype.validateOnly = false; /** - * Creates a new DeleteDeliveryPipelineRequest instance using the specified properties. + * Creates a new CreateDeliveryPipelineRequest instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest * @static - * @param {google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.DeleteDeliveryPipelineRequest} DeleteDeliveryPipelineRequest instance + * @param {google.cloud.deploy.v1.ICreateDeliveryPipelineRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.CreateDeliveryPipelineRequest} CreateDeliveryPipelineRequest instance */ - DeleteDeliveryPipelineRequest.create = function create(properties) { - return new DeleteDeliveryPipelineRequest(properties); + CreateDeliveryPipelineRequest.create = function create(properties) { + return new CreateDeliveryPipelineRequest(properties); }; /** - * Encodes the specified DeleteDeliveryPipelineRequest message. Does not implicitly {@link google.cloud.deploy.v1.DeleteDeliveryPipelineRequest.verify|verify} messages. + * Encodes the specified CreateDeliveryPipelineRequest message. Does not implicitly {@link google.cloud.deploy.v1.CreateDeliveryPipelineRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest * @static - * @param {google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest} message DeleteDeliveryPipelineRequest message or plain object to encode + * @param {google.cloud.deploy.v1.ICreateDeliveryPipelineRequest} message CreateDeliveryPipelineRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteDeliveryPipelineRequest.encode = function encode(message, writer) { + CreateDeliveryPipelineRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.deliveryPipelineId != null && Object.hasOwnProperty.call(message, "deliveryPipelineId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.deliveryPipelineId); + if (message.deliveryPipeline != null && Object.hasOwnProperty.call(message, "deliveryPipeline")) + $root.google.cloud.deploy.v1.DeliveryPipeline.encode(message.deliveryPipeline, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); - if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowMissing); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.etag); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.force); + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); return writer; }; /** - * Encodes the specified DeleteDeliveryPipelineRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeleteDeliveryPipelineRequest.verify|verify} messages. + * Encodes the specified CreateDeliveryPipelineRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CreateDeliveryPipelineRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest * @static - * @param {google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest} message DeleteDeliveryPipelineRequest message or plain object to encode + * @param {google.cloud.deploy.v1.ICreateDeliveryPipelineRequest} message CreateDeliveryPipelineRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteDeliveryPipelineRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateDeliveryPipelineRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteDeliveryPipelineRequest message from the specified reader or buffer. + * Decodes a CreateDeliveryPipelineRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.DeleteDeliveryPipelineRequest} DeleteDeliveryPipelineRequest + * @returns {google.cloud.deploy.v1.CreateDeliveryPipelineRequest} CreateDeliveryPipelineRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteDeliveryPipelineRequest.decode = function decode(reader, length) { + CreateDeliveryPipelineRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.CreateDeliveryPipelineRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.requestId = reader.string(); + message.deliveryPipelineId = reader.string(); break; } case 3: { - message.allowMissing = reader.bool(); + message.deliveryPipeline = $root.google.cloud.deploy.v1.DeliveryPipeline.decode(reader, reader.uint32()); break; } case 4: { - message.validateOnly = reader.bool(); - break; - } - case 6: { - message.force = reader.bool(); + message.requestId = reader.string(); break; } case 5: { - message.etag = reader.string(); + message.validateOnly = reader.bool(); break; } default: @@ -3999,178 +3991,164 @@ }; /** - * Decodes a DeleteDeliveryPipelineRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateDeliveryPipelineRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.DeleteDeliveryPipelineRequest} DeleteDeliveryPipelineRequest + * @returns {google.cloud.deploy.v1.CreateDeliveryPipelineRequest} CreateDeliveryPipelineRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteDeliveryPipelineRequest.decodeDelimited = function decodeDelimited(reader) { + CreateDeliveryPipelineRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteDeliveryPipelineRequest message. + * Verifies a CreateDeliveryPipelineRequest message. * @function verify - * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteDeliveryPipelineRequest.verify = function verify(message) { + CreateDeliveryPipelineRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.deliveryPipelineId != null && message.hasOwnProperty("deliveryPipelineId")) + if (!$util.isString(message.deliveryPipelineId)) + return "deliveryPipelineId: string expected"; + if (message.deliveryPipeline != null && message.hasOwnProperty("deliveryPipeline")) { + var error = $root.google.cloud.deploy.v1.DeliveryPipeline.verify(message.deliveryPipeline); + if (error) + return "deliveryPipeline." + error; + } if (message.requestId != null && message.hasOwnProperty("requestId")) if (!$util.isString(message.requestId)) return "requestId: string expected"; - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) - if (typeof message.allowMissing !== "boolean") - return "allowMissing: boolean expected"; if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) if (typeof message.validateOnly !== "boolean") return "validateOnly: boolean expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; return null; }; /** - * Creates a DeleteDeliveryPipelineRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateDeliveryPipelineRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.DeleteDeliveryPipelineRequest} DeleteDeliveryPipelineRequest + * @returns {google.cloud.deploy.v1.CreateDeliveryPipelineRequest} CreateDeliveryPipelineRequest */ - DeleteDeliveryPipelineRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest) + CreateDeliveryPipelineRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.CreateDeliveryPipelineRequest) return object; - var message = new $root.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.deploy.v1.CreateDeliveryPipelineRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.deliveryPipelineId != null) + message.deliveryPipelineId = String(object.deliveryPipelineId); + if (object.deliveryPipeline != null) { + if (typeof object.deliveryPipeline !== "object") + throw TypeError(".google.cloud.deploy.v1.CreateDeliveryPipelineRequest.deliveryPipeline: object expected"); + message.deliveryPipeline = $root.google.cloud.deploy.v1.DeliveryPipeline.fromObject(object.deliveryPipeline); + } if (object.requestId != null) message.requestId = String(object.requestId); - if (object.allowMissing != null) - message.allowMissing = Boolean(object.allowMissing); if (object.validateOnly != null) message.validateOnly = Boolean(object.validateOnly); - if (object.force != null) - message.force = Boolean(object.force); - if (object.etag != null) - message.etag = String(object.etag); return message; }; /** - * Creates a plain object from a DeleteDeliveryPipelineRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateDeliveryPipelineRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest * @static - * @param {google.cloud.deploy.v1.DeleteDeliveryPipelineRequest} message DeleteDeliveryPipelineRequest + * @param {google.cloud.deploy.v1.CreateDeliveryPipelineRequest} message CreateDeliveryPipelineRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteDeliveryPipelineRequest.toObject = function toObject(message, options) { + CreateDeliveryPipelineRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; + object.parent = ""; + object.deliveryPipelineId = ""; + object.deliveryPipeline = null; object.requestId = ""; - object.allowMissing = false; object.validateOnly = false; - object.etag = ""; - object.force = false; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.deliveryPipelineId != null && message.hasOwnProperty("deliveryPipelineId")) + object.deliveryPipelineId = message.deliveryPipelineId; + if (message.deliveryPipeline != null && message.hasOwnProperty("deliveryPipeline")) + object.deliveryPipeline = $root.google.cloud.deploy.v1.DeliveryPipeline.toObject(message.deliveryPipeline, options); if (message.requestId != null && message.hasOwnProperty("requestId")) object.requestId = message.requestId; - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) - object.allowMissing = message.allowMissing; if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) object.validateOnly = message.validateOnly; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; return object; }; /** - * Converts this DeleteDeliveryPipelineRequest to JSON. + * Converts this CreateDeliveryPipelineRequest to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest * @instance * @returns {Object.} JSON object */ - DeleteDeliveryPipelineRequest.prototype.toJSON = function toJSON() { + CreateDeliveryPipelineRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteDeliveryPipelineRequest + * Gets the default type url for CreateDeliveryPipelineRequest * @function getTypeUrl - * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest + * @memberof google.cloud.deploy.v1.CreateDeliveryPipelineRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteDeliveryPipelineRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateDeliveryPipelineRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.DeleteDeliveryPipelineRequest"; + return typeUrlPrefix + "/google.cloud.deploy.v1.CreateDeliveryPipelineRequest"; }; - return DeleteDeliveryPipelineRequest; + return CreateDeliveryPipelineRequest; })(); - v1.Target = (function() { + v1.UpdateDeliveryPipelineRequest = (function() { /** - * Properties of a Target. + * Properties of an UpdateDeliveryPipelineRequest. * @memberof google.cloud.deploy.v1 - * @interface ITarget - * @property {string|null} [name] Target name - * @property {string|null} [targetId] Target targetId - * @property {string|null} [uid] Target uid - * @property {string|null} [description] Target description - * @property {Object.|null} [annotations] Target annotations - * @property {Object.|null} [labels] Target labels - * @property {boolean|null} [requireApproval] Target requireApproval - * @property {google.protobuf.ITimestamp|null} [createTime] Target createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Target updateTime - * @property {google.cloud.deploy.v1.IGkeCluster|null} [gke] Target gke - * @property {google.cloud.deploy.v1.IAnthosCluster|null} [anthosCluster] Target anthosCluster - * @property {string|null} [etag] Target etag - * @property {Array.|null} [executionConfigs] Target executionConfigs + * @interface IUpdateDeliveryPipelineRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDeliveryPipelineRequest updateMask + * @property {google.cloud.deploy.v1.IDeliveryPipeline|null} [deliveryPipeline] UpdateDeliveryPipelineRequest deliveryPipeline + * @property {string|null} [requestId] UpdateDeliveryPipelineRequest requestId + * @property {boolean|null} [allowMissing] UpdateDeliveryPipelineRequest allowMissing + * @property {boolean|null} [validateOnly] UpdateDeliveryPipelineRequest validateOnly */ /** - * Constructs a new Target. + * Constructs a new UpdateDeliveryPipelineRequest. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a Target. - * @implements ITarget + * @classdesc Represents an UpdateDeliveryPipelineRequest. + * @implements IUpdateDeliveryPipelineRequest * @constructor - * @param {google.cloud.deploy.v1.ITarget=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest=} [properties] Properties to set */ - function Target(properties) { - this.annotations = {}; - this.labels = {}; - this.executionConfigs = []; + function UpdateDeliveryPipelineRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4178,300 +4156,131 @@ } /** - * Target name. - * @member {string} name - * @memberof google.cloud.deploy.v1.Target - * @instance - */ - Target.prototype.name = ""; - - /** - * Target targetId. - * @member {string} targetId - * @memberof google.cloud.deploy.v1.Target - * @instance - */ - Target.prototype.targetId = ""; - - /** - * Target uid. - * @member {string} uid - * @memberof google.cloud.deploy.v1.Target - * @instance - */ - Target.prototype.uid = ""; - - /** - * Target description. - * @member {string} description - * @memberof google.cloud.deploy.v1.Target - * @instance - */ - Target.prototype.description = ""; - - /** - * Target annotations. - * @member {Object.} annotations - * @memberof google.cloud.deploy.v1.Target - * @instance - */ - Target.prototype.annotations = $util.emptyObject; - - /** - * Target labels. - * @member {Object.} labels - * @memberof google.cloud.deploy.v1.Target - * @instance - */ - Target.prototype.labels = $util.emptyObject; - - /** - * Target requireApproval. - * @member {boolean} requireApproval - * @memberof google.cloud.deploy.v1.Target - * @instance - */ - Target.prototype.requireApproval = false; - - /** - * Target createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.deploy.v1.Target - * @instance - */ - Target.prototype.createTime = null; - - /** - * Target updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.deploy.v1.Target - * @instance - */ - Target.prototype.updateTime = null; - - /** - * Target gke. - * @member {google.cloud.deploy.v1.IGkeCluster|null|undefined} gke - * @memberof google.cloud.deploy.v1.Target + * UpdateDeliveryPipelineRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest * @instance */ - Target.prototype.gke = null; + UpdateDeliveryPipelineRequest.prototype.updateMask = null; /** - * Target anthosCluster. - * @member {google.cloud.deploy.v1.IAnthosCluster|null|undefined} anthosCluster - * @memberof google.cloud.deploy.v1.Target + * UpdateDeliveryPipelineRequest deliveryPipeline. + * @member {google.cloud.deploy.v1.IDeliveryPipeline|null|undefined} deliveryPipeline + * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest * @instance */ - Target.prototype.anthosCluster = null; + UpdateDeliveryPipelineRequest.prototype.deliveryPipeline = null; /** - * Target etag. - * @member {string} etag - * @memberof google.cloud.deploy.v1.Target + * UpdateDeliveryPipelineRequest requestId. + * @member {string} requestId + * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest * @instance */ - Target.prototype.etag = ""; + UpdateDeliveryPipelineRequest.prototype.requestId = ""; /** - * Target executionConfigs. - * @member {Array.} executionConfigs - * @memberof google.cloud.deploy.v1.Target + * UpdateDeliveryPipelineRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest * @instance */ - Target.prototype.executionConfigs = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + UpdateDeliveryPipelineRequest.prototype.allowMissing = false; /** - * Target deploymentTarget. - * @member {"gke"|"anthosCluster"|undefined} deploymentTarget - * @memberof google.cloud.deploy.v1.Target + * UpdateDeliveryPipelineRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest * @instance */ - Object.defineProperty(Target.prototype, "deploymentTarget", { - get: $util.oneOfGetter($oneOfFields = ["gke", "anthosCluster"]), - set: $util.oneOfSetter($oneOfFields) - }); + UpdateDeliveryPipelineRequest.prototype.validateOnly = false; /** - * Creates a new Target instance using the specified properties. + * Creates a new UpdateDeliveryPipelineRequest instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.Target + * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest * @static - * @param {google.cloud.deploy.v1.ITarget=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.Target} Target instance + * @param {google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.UpdateDeliveryPipelineRequest} UpdateDeliveryPipelineRequest instance */ - Target.create = function create(properties) { - return new Target(properties); + UpdateDeliveryPipelineRequest.create = function create(properties) { + return new UpdateDeliveryPipelineRequest(properties); }; /** - * Encodes the specified Target message. Does not implicitly {@link google.cloud.deploy.v1.Target.verify|verify} messages. + * Encodes the specified UpdateDeliveryPipelineRequest message. Does not implicitly {@link google.cloud.deploy.v1.UpdateDeliveryPipelineRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.Target + * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest * @static - * @param {google.cloud.deploy.v1.ITarget} message Target message or plain object to encode + * @param {google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest} message UpdateDeliveryPipelineRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Target.encode = function encode(message, writer) { + UpdateDeliveryPipelineRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.targetId != null && Object.hasOwnProperty.call(message, "targetId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.targetId); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.uid); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); - if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) - for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.etag); - if (message.requireApproval != null && Object.hasOwnProperty.call(message, "requireApproval")) - writer.uint32(/* id 13, wireType 0 =*/104).bool(message.requireApproval); - if (message.gke != null && Object.hasOwnProperty.call(message, "gke")) - $root.google.cloud.deploy.v1.GkeCluster.encode(message.gke, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.executionConfigs != null && message.executionConfigs.length) - for (var i = 0; i < message.executionConfigs.length; ++i) - $root.google.cloud.deploy.v1.ExecutionConfig.encode(message.executionConfigs[i], writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.anthosCluster != null && Object.hasOwnProperty.call(message, "anthosCluster")) - $root.google.cloud.deploy.v1.AnthosCluster.encode(message.anthosCluster, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.deliveryPipeline != null && Object.hasOwnProperty.call(message, "deliveryPipeline")) + $root.google.cloud.deploy.v1.DeliveryPipeline.encode(message.deliveryPipeline, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.allowMissing); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); return writer; }; /** - * Encodes the specified Target message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Target.verify|verify} messages. + * Encodes the specified UpdateDeliveryPipelineRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.UpdateDeliveryPipelineRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.Target + * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest * @static - * @param {google.cloud.deploy.v1.ITarget} message Target message or plain object to encode + * @param {google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest} message UpdateDeliveryPipelineRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Target.encodeDelimited = function encodeDelimited(message, writer) { + UpdateDeliveryPipelineRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Target message from the specified reader or buffer. + * Decodes an UpdateDeliveryPipelineRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.Target + * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.Target} Target + * @returns {google.cloud.deploy.v1.UpdateDeliveryPipelineRequest} UpdateDeliveryPipelineRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Target.decode = function decode(reader, length) { + UpdateDeliveryPipelineRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Target(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } case 2: { - message.targetId = reader.string(); + message.deliveryPipeline = $root.google.cloud.deploy.v1.DeliveryPipeline.decode(reader, reader.uint32()); break; } case 3: { - message.uid = reader.string(); + message.requestId = reader.string(); break; } case 4: { - message.description = reader.string(); + message.allowMissing = reader.bool(); break; } case 5: { - if (message.annotations === $util.emptyObject) - message.annotations = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.annotations[key] = value; - break; - } - case 6: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 13: { - message.requireApproval = reader.bool(); - break; - } - case 8: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 9: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 15: { - message.gke = $root.google.cloud.deploy.v1.GkeCluster.decode(reader, reader.uint32()); - break; - } - case 17: { - message.anthosCluster = $root.google.cloud.deploy.v1.AnthosCluster.decode(reader, reader.uint32()); - break; - } - case 12: { - message.etag = reader.string(); - break; - } - case 16: { - if (!(message.executionConfigs && message.executionConfigs.length)) - message.executionConfigs = []; - message.executionConfigs.push($root.google.cloud.deploy.v1.ExecutionConfig.decode(reader, reader.uint32())); + message.validateOnly = reader.bool(); break; } default: @@ -4483,305 +4292,170 @@ }; /** - * Decodes a Target message from the specified reader or buffer, length delimited. + * Decodes an UpdateDeliveryPipelineRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.Target + * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.Target} Target + * @returns {google.cloud.deploy.v1.UpdateDeliveryPipelineRequest} UpdateDeliveryPipelineRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Target.decodeDelimited = function decodeDelimited(reader) { + UpdateDeliveryPipelineRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Target message. + * Verifies an UpdateDeliveryPipelineRequest message. * @function verify - * @memberof google.cloud.deploy.v1.Target + * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Target.verify = function verify(message) { + UpdateDeliveryPipelineRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.targetId != null && message.hasOwnProperty("targetId")) - if (!$util.isString(message.targetId)) - return "targetId: string expected"; - if (message.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.annotations != null && message.hasOwnProperty("annotations")) { - if (!$util.isObject(message.annotations)) - return "annotations: object expected"; - var key = Object.keys(message.annotations); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.annotations[key[i]])) - return "annotations: string{k:string} expected"; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.requireApproval != null && message.hasOwnProperty("requireApproval")) - if (typeof message.requireApproval !== "boolean") - return "requireApproval: boolean expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); if (error) - return "createTime." + error; + return "updateMask." + error; } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (message.deliveryPipeline != null && message.hasOwnProperty("deliveryPipeline")) { + var error = $root.google.cloud.deploy.v1.DeliveryPipeline.verify(message.deliveryPipeline); if (error) - return "updateTime." + error; - } - if (message.gke != null && message.hasOwnProperty("gke")) { - properties.deploymentTarget = 1; - { - var error = $root.google.cloud.deploy.v1.GkeCluster.verify(message.gke); - if (error) - return "gke." + error; - } - } - if (message.anthosCluster != null && message.hasOwnProperty("anthosCluster")) { - if (properties.deploymentTarget === 1) - return "deploymentTarget: multiple values"; - properties.deploymentTarget = 1; - { - var error = $root.google.cloud.deploy.v1.AnthosCluster.verify(message.anthosCluster); - if (error) - return "anthosCluster." + error; - } - } - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.executionConfigs != null && message.hasOwnProperty("executionConfigs")) { - if (!Array.isArray(message.executionConfigs)) - return "executionConfigs: array expected"; - for (var i = 0; i < message.executionConfigs.length; ++i) { - var error = $root.google.cloud.deploy.v1.ExecutionConfig.verify(message.executionConfigs[i]); - if (error) - return "executionConfigs." + error; - } + return "deliveryPipeline." + error; } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a Target message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateDeliveryPipelineRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.Target + * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.Target} Target + * @returns {google.cloud.deploy.v1.UpdateDeliveryPipelineRequest} UpdateDeliveryPipelineRequest */ - Target.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.Target) + UpdateDeliveryPipelineRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest) return object; - var message = new $root.google.cloud.deploy.v1.Target(); - if (object.name != null) - message.name = String(object.name); - if (object.targetId != null) - message.targetId = String(object.targetId); - if (object.uid != null) - message.uid = String(object.uid); - if (object.description != null) - message.description = String(object.description); - if (object.annotations) { - if (typeof object.annotations !== "object") - throw TypeError(".google.cloud.deploy.v1.Target.annotations: object expected"); - message.annotations = {}; - for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) - message.annotations[keys[i]] = String(object.annotations[keys[i]]); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.deploy.v1.Target.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - if (object.requireApproval != null) - message.requireApproval = Boolean(object.requireApproval); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.deploy.v1.Target.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.deploy.v1.Target.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.gke != null) { - if (typeof object.gke !== "object") - throw TypeError(".google.cloud.deploy.v1.Target.gke: object expected"); - message.gke = $root.google.cloud.deploy.v1.GkeCluster.fromObject(object.gke); - } - if (object.anthosCluster != null) { - if (typeof object.anthosCluster !== "object") - throw TypeError(".google.cloud.deploy.v1.Target.anthosCluster: object expected"); - message.anthosCluster = $root.google.cloud.deploy.v1.AnthosCluster.fromObject(object.anthosCluster); + var message = new $root.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.deploy.v1.UpdateDeliveryPipelineRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.etag != null) - message.etag = String(object.etag); - if (object.executionConfigs) { - if (!Array.isArray(object.executionConfigs)) - throw TypeError(".google.cloud.deploy.v1.Target.executionConfigs: array expected"); - message.executionConfigs = []; - for (var i = 0; i < object.executionConfigs.length; ++i) { - if (typeof object.executionConfigs[i] !== "object") - throw TypeError(".google.cloud.deploy.v1.Target.executionConfigs: object expected"); - message.executionConfigs[i] = $root.google.cloud.deploy.v1.ExecutionConfig.fromObject(object.executionConfigs[i]); - } + if (object.deliveryPipeline != null) { + if (typeof object.deliveryPipeline !== "object") + throw TypeError(".google.cloud.deploy.v1.UpdateDeliveryPipelineRequest.deliveryPipeline: object expected"); + message.deliveryPipeline = $root.google.cloud.deploy.v1.DeliveryPipeline.fromObject(object.deliveryPipeline); } + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a Target message. Also converts values to other types if specified. + * Creates a plain object from an UpdateDeliveryPipelineRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.Target + * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest * @static - * @param {google.cloud.deploy.v1.Target} message Target + * @param {google.cloud.deploy.v1.UpdateDeliveryPipelineRequest} message UpdateDeliveryPipelineRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Target.toObject = function toObject(message, options) { + UpdateDeliveryPipelineRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.executionConfigs = []; - if (options.objects || options.defaults) { - object.annotations = {}; - object.labels = {}; - } if (options.defaults) { - object.name = ""; - object.targetId = ""; - object.uid = ""; - object.description = ""; - object.createTime = null; - object.updateTime = null; - object.etag = ""; - object.requireApproval = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.targetId != null && message.hasOwnProperty("targetId")) - object.targetId = message.targetId; - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - var keys2; - if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { - object.annotations = {}; - for (var j = 0; j < keys2.length; ++j) - object.annotations[keys2[j]] = message.annotations[keys2[j]]; - } - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.requireApproval != null && message.hasOwnProperty("requireApproval")) - object.requireApproval = message.requireApproval; - if (message.gke != null && message.hasOwnProperty("gke")) { - object.gke = $root.google.cloud.deploy.v1.GkeCluster.toObject(message.gke, options); - if (options.oneofs) - object.deploymentTarget = "gke"; - } - if (message.executionConfigs && message.executionConfigs.length) { - object.executionConfigs = []; - for (var j = 0; j < message.executionConfigs.length; ++j) - object.executionConfigs[j] = $root.google.cloud.deploy.v1.ExecutionConfig.toObject(message.executionConfigs[j], options); - } - if (message.anthosCluster != null && message.hasOwnProperty("anthosCluster")) { - object.anthosCluster = $root.google.cloud.deploy.v1.AnthosCluster.toObject(message.anthosCluster, options); - if (options.oneofs) - object.deploymentTarget = "anthosCluster"; + object.updateMask = null; + object.deliveryPipeline = null; + object.requestId = ""; + object.allowMissing = false; + object.validateOnly = false; } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.deliveryPipeline != null && message.hasOwnProperty("deliveryPipeline")) + object.deliveryPipeline = $root.google.cloud.deploy.v1.DeliveryPipeline.toObject(message.deliveryPipeline, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this Target to JSON. + * Converts this UpdateDeliveryPipelineRequest to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.Target + * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest * @instance * @returns {Object.} JSON object */ - Target.prototype.toJSON = function toJSON() { + UpdateDeliveryPipelineRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Target + * Gets the default type url for UpdateDeliveryPipelineRequest * @function getTypeUrl - * @memberof google.cloud.deploy.v1.Target + * @memberof google.cloud.deploy.v1.UpdateDeliveryPipelineRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Target.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateDeliveryPipelineRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.Target"; + return typeUrlPrefix + "/google.cloud.deploy.v1.UpdateDeliveryPipelineRequest"; }; - return Target; + return UpdateDeliveryPipelineRequest; })(); - v1.ExecutionConfig = (function() { + v1.DeleteDeliveryPipelineRequest = (function() { /** - * Properties of an ExecutionConfig. + * Properties of a DeleteDeliveryPipelineRequest. * @memberof google.cloud.deploy.v1 - * @interface IExecutionConfig - * @property {Array.|null} [usages] ExecutionConfig usages - * @property {google.cloud.deploy.v1.IDefaultPool|null} [defaultPool] ExecutionConfig defaultPool - * @property {google.cloud.deploy.v1.IPrivatePool|null} [privatePool] ExecutionConfig privatePool - * @property {string|null} [workerPool] ExecutionConfig workerPool - * @property {string|null} [serviceAccount] ExecutionConfig serviceAccount - * @property {string|null} [artifactStorage] ExecutionConfig artifactStorage + * @interface IDeleteDeliveryPipelineRequest + * @property {string|null} [name] DeleteDeliveryPipelineRequest name + * @property {string|null} [requestId] DeleteDeliveryPipelineRequest requestId + * @property {boolean|null} [allowMissing] DeleteDeliveryPipelineRequest allowMissing + * @property {boolean|null} [validateOnly] DeleteDeliveryPipelineRequest validateOnly + * @property {boolean|null} [force] DeleteDeliveryPipelineRequest force + * @property {string|null} [etag] DeleteDeliveryPipelineRequest etag */ /** - * Constructs a new ExecutionConfig. + * Constructs a new DeleteDeliveryPipelineRequest. * @memberof google.cloud.deploy.v1 - * @classdesc Represents an ExecutionConfig. - * @implements IExecutionConfig + * @classdesc Represents a DeleteDeliveryPipelineRequest. + * @implements IDeleteDeliveryPipelineRequest * @constructor - * @param {google.cloud.deploy.v1.IExecutionConfig=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest=} [properties] Properties to set */ - function ExecutionConfig(properties) { - this.usages = []; + function DeleteDeliveryPipelineRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4789,170 +4463,145 @@ } /** - * ExecutionConfig usages. - * @member {Array.} usages - * @memberof google.cloud.deploy.v1.ExecutionConfig - * @instance - */ - ExecutionConfig.prototype.usages = $util.emptyArray; - - /** - * ExecutionConfig defaultPool. - * @member {google.cloud.deploy.v1.IDefaultPool|null|undefined} defaultPool - * @memberof google.cloud.deploy.v1.ExecutionConfig + * DeleteDeliveryPipelineRequest name. + * @member {string} name + * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest * @instance */ - ExecutionConfig.prototype.defaultPool = null; + DeleteDeliveryPipelineRequest.prototype.name = ""; /** - * ExecutionConfig privatePool. - * @member {google.cloud.deploy.v1.IPrivatePool|null|undefined} privatePool - * @memberof google.cloud.deploy.v1.ExecutionConfig + * DeleteDeliveryPipelineRequest requestId. + * @member {string} requestId + * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest * @instance */ - ExecutionConfig.prototype.privatePool = null; + DeleteDeliveryPipelineRequest.prototype.requestId = ""; /** - * ExecutionConfig workerPool. - * @member {string} workerPool - * @memberof google.cloud.deploy.v1.ExecutionConfig + * DeleteDeliveryPipelineRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest * @instance */ - ExecutionConfig.prototype.workerPool = ""; + DeleteDeliveryPipelineRequest.prototype.allowMissing = false; /** - * ExecutionConfig serviceAccount. - * @member {string} serviceAccount - * @memberof google.cloud.deploy.v1.ExecutionConfig + * DeleteDeliveryPipelineRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest * @instance */ - ExecutionConfig.prototype.serviceAccount = ""; + DeleteDeliveryPipelineRequest.prototype.validateOnly = false; /** - * ExecutionConfig artifactStorage. - * @member {string} artifactStorage - * @memberof google.cloud.deploy.v1.ExecutionConfig + * DeleteDeliveryPipelineRequest force. + * @member {boolean} force + * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest * @instance */ - ExecutionConfig.prototype.artifactStorage = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + DeleteDeliveryPipelineRequest.prototype.force = false; /** - * ExecutionConfig executionEnvironment. - * @member {"defaultPool"|"privatePool"|undefined} executionEnvironment - * @memberof google.cloud.deploy.v1.ExecutionConfig + * DeleteDeliveryPipelineRequest etag. + * @member {string} etag + * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest * @instance */ - Object.defineProperty(ExecutionConfig.prototype, "executionEnvironment", { - get: $util.oneOfGetter($oneOfFields = ["defaultPool", "privatePool"]), - set: $util.oneOfSetter($oneOfFields) - }); + DeleteDeliveryPipelineRequest.prototype.etag = ""; /** - * Creates a new ExecutionConfig instance using the specified properties. + * Creates a new DeleteDeliveryPipelineRequest instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.ExecutionConfig + * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest * @static - * @param {google.cloud.deploy.v1.IExecutionConfig=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.ExecutionConfig} ExecutionConfig instance + * @param {google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.DeleteDeliveryPipelineRequest} DeleteDeliveryPipelineRequest instance */ - ExecutionConfig.create = function create(properties) { - return new ExecutionConfig(properties); + DeleteDeliveryPipelineRequest.create = function create(properties) { + return new DeleteDeliveryPipelineRequest(properties); }; /** - * Encodes the specified ExecutionConfig message. Does not implicitly {@link google.cloud.deploy.v1.ExecutionConfig.verify|verify} messages. + * Encodes the specified DeleteDeliveryPipelineRequest message. Does not implicitly {@link google.cloud.deploy.v1.DeleteDeliveryPipelineRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.ExecutionConfig + * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest * @static - * @param {google.cloud.deploy.v1.IExecutionConfig} message ExecutionConfig message or plain object to encode + * @param {google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest} message DeleteDeliveryPipelineRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecutionConfig.encode = function encode(message, writer) { + DeleteDeliveryPipelineRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.usages != null && message.usages.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.usages.length; ++i) - writer.int32(message.usages[i]); - writer.ldelim(); - } - if (message.defaultPool != null && Object.hasOwnProperty.call(message, "defaultPool")) - $root.google.cloud.deploy.v1.DefaultPool.encode(message.defaultPool, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.privatePool != null && Object.hasOwnProperty.call(message, "privatePool")) - $root.google.cloud.deploy.v1.PrivatePool.encode(message.privatePool, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.workerPool != null && Object.hasOwnProperty.call(message, "workerPool")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.workerPool); - if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.serviceAccount); - if (message.artifactStorage != null && Object.hasOwnProperty.call(message, "artifactStorage")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.artifactStorage); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowMissing); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.etag); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.force); return writer; }; /** - * Encodes the specified ExecutionConfig message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ExecutionConfig.verify|verify} messages. + * Encodes the specified DeleteDeliveryPipelineRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeleteDeliveryPipelineRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.ExecutionConfig + * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest * @static - * @param {google.cloud.deploy.v1.IExecutionConfig} message ExecutionConfig message or plain object to encode + * @param {google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest} message DeleteDeliveryPipelineRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecutionConfig.encodeDelimited = function encodeDelimited(message, writer) { + DeleteDeliveryPipelineRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExecutionConfig message from the specified reader or buffer. + * Decodes a DeleteDeliveryPipelineRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.ExecutionConfig + * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.ExecutionConfig} ExecutionConfig + * @returns {google.cloud.deploy.v1.DeleteDeliveryPipelineRequest} DeleteDeliveryPipelineRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecutionConfig.decode = function decode(reader, length) { + DeleteDeliveryPipelineRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ExecutionConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.usages && message.usages.length)) - message.usages = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.usages.push(reader.int32()); - } else - message.usages.push(reader.int32()); + message.name = reader.string(); break; } case 2: { - message.defaultPool = $root.google.cloud.deploy.v1.DefaultPool.decode(reader, reader.uint32()); + message.requestId = reader.string(); break; } case 3: { - message.privatePool = $root.google.cloud.deploy.v1.PrivatePool.decode(reader, reader.uint32()); + message.allowMissing = reader.bool(); break; } case 4: { - message.workerPool = reader.string(); + message.validateOnly = reader.bool(); break; } - case 5: { - message.serviceAccount = reader.string(); + case 6: { + message.force = reader.bool(); break; } - case 6: { - message.artifactStorage = reader.string(); + case 5: { + message.etag = reader.string(); break; } default: @@ -4964,236 +4613,179 @@ }; /** - * Decodes an ExecutionConfig message from the specified reader or buffer, length delimited. + * Decodes a DeleteDeliveryPipelineRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.ExecutionConfig + * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.ExecutionConfig} ExecutionConfig + * @returns {google.cloud.deploy.v1.DeleteDeliveryPipelineRequest} DeleteDeliveryPipelineRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecutionConfig.decodeDelimited = function decodeDelimited(reader) { + DeleteDeliveryPipelineRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExecutionConfig message. + * Verifies a DeleteDeliveryPipelineRequest message. * @function verify - * @memberof google.cloud.deploy.v1.ExecutionConfig + * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExecutionConfig.verify = function verify(message) { + DeleteDeliveryPipelineRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.usages != null && message.hasOwnProperty("usages")) { - if (!Array.isArray(message.usages)) - return "usages: array expected"; - for (var i = 0; i < message.usages.length; ++i) - switch (message.usages[i]) { - default: - return "usages: enum value[] expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.defaultPool != null && message.hasOwnProperty("defaultPool")) { - properties.executionEnvironment = 1; - { - var error = $root.google.cloud.deploy.v1.DefaultPool.verify(message.defaultPool); - if (error) - return "defaultPool." + error; - } - } - if (message.privatePool != null && message.hasOwnProperty("privatePool")) { - if (properties.executionEnvironment === 1) - return "executionEnvironment: multiple values"; - properties.executionEnvironment = 1; - { - var error = $root.google.cloud.deploy.v1.PrivatePool.verify(message.privatePool); - if (error) - return "privatePool." + error; - } - } - if (message.workerPool != null && message.hasOwnProperty("workerPool")) - if (!$util.isString(message.workerPool)) - return "workerPool: string expected"; - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - if (!$util.isString(message.serviceAccount)) - return "serviceAccount: string expected"; - if (message.artifactStorage != null && message.hasOwnProperty("artifactStorage")) - if (!$util.isString(message.artifactStorage)) - return "artifactStorage: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; return null; }; /** - * Creates an ExecutionConfig message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteDeliveryPipelineRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.ExecutionConfig + * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.ExecutionConfig} ExecutionConfig + * @returns {google.cloud.deploy.v1.DeleteDeliveryPipelineRequest} DeleteDeliveryPipelineRequest */ - ExecutionConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.ExecutionConfig) + DeleteDeliveryPipelineRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest) return object; - var message = new $root.google.cloud.deploy.v1.ExecutionConfig(); - if (object.usages) { - if (!Array.isArray(object.usages)) - throw TypeError(".google.cloud.deploy.v1.ExecutionConfig.usages: array expected"); - message.usages = []; - for (var i = 0; i < object.usages.length; ++i) - switch (object.usages[i]) { - default: - case "EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED": - case 0: - message.usages[i] = 0; - break; - case "RENDER": - case 1: - message.usages[i] = 1; - break; - case "DEPLOY": - case 2: - message.usages[i] = 2; - break; - } - } - if (object.defaultPool != null) { - if (typeof object.defaultPool !== "object") - throw TypeError(".google.cloud.deploy.v1.ExecutionConfig.defaultPool: object expected"); - message.defaultPool = $root.google.cloud.deploy.v1.DefaultPool.fromObject(object.defaultPool); - } - if (object.privatePool != null) { - if (typeof object.privatePool !== "object") - throw TypeError(".google.cloud.deploy.v1.ExecutionConfig.privatePool: object expected"); - message.privatePool = $root.google.cloud.deploy.v1.PrivatePool.fromObject(object.privatePool); - } - if (object.workerPool != null) - message.workerPool = String(object.workerPool); - if (object.serviceAccount != null) - message.serviceAccount = String(object.serviceAccount); - if (object.artifactStorage != null) - message.artifactStorage = String(object.artifactStorage); + var message = new $root.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + if (object.force != null) + message.force = Boolean(object.force); + if (object.etag != null) + message.etag = String(object.etag); return message; }; /** - * Creates a plain object from an ExecutionConfig message. Also converts values to other types if specified. + * Creates a plain object from a DeleteDeliveryPipelineRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.ExecutionConfig + * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest * @static - * @param {google.cloud.deploy.v1.ExecutionConfig} message ExecutionConfig + * @param {google.cloud.deploy.v1.DeleteDeliveryPipelineRequest} message DeleteDeliveryPipelineRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExecutionConfig.toObject = function toObject(message, options) { + DeleteDeliveryPipelineRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.usages = []; if (options.defaults) { - object.workerPool = ""; - object.serviceAccount = ""; - object.artifactStorage = ""; - } - if (message.usages && message.usages.length) { - object.usages = []; - for (var j = 0; j < message.usages.length; ++j) - object.usages[j] = options.enums === String ? $root.google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage[message.usages[j]] : message.usages[j]; - } - if (message.defaultPool != null && message.hasOwnProperty("defaultPool")) { - object.defaultPool = $root.google.cloud.deploy.v1.DefaultPool.toObject(message.defaultPool, options); - if (options.oneofs) - object.executionEnvironment = "defaultPool"; - } - if (message.privatePool != null && message.hasOwnProperty("privatePool")) { - object.privatePool = $root.google.cloud.deploy.v1.PrivatePool.toObject(message.privatePool, options); - if (options.oneofs) - object.executionEnvironment = "privatePool"; + object.name = ""; + object.requestId = ""; + object.allowMissing = false; + object.validateOnly = false; + object.etag = ""; + object.force = false; } - if (message.workerPool != null && message.hasOwnProperty("workerPool")) - object.workerPool = message.workerPool; - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - object.serviceAccount = message.serviceAccount; - if (message.artifactStorage != null && message.hasOwnProperty("artifactStorage")) - object.artifactStorage = message.artifactStorage; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; return object; }; /** - * Converts this ExecutionConfig to JSON. + * Converts this DeleteDeliveryPipelineRequest to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.ExecutionConfig + * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest * @instance * @returns {Object.} JSON object */ - ExecutionConfig.prototype.toJSON = function toJSON() { + DeleteDeliveryPipelineRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExecutionConfig + * Gets the default type url for DeleteDeliveryPipelineRequest * @function getTypeUrl - * @memberof google.cloud.deploy.v1.ExecutionConfig + * @memberof google.cloud.deploy.v1.DeleteDeliveryPipelineRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExecutionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteDeliveryPipelineRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.ExecutionConfig"; + return typeUrlPrefix + "/google.cloud.deploy.v1.DeleteDeliveryPipelineRequest"; }; - /** - * ExecutionEnvironmentUsage enum. - * @name google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage - * @enum {number} - * @property {number} EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED=0 EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED value - * @property {number} RENDER=1 RENDER value - * @property {number} DEPLOY=2 DEPLOY value - */ - ExecutionConfig.ExecutionEnvironmentUsage = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED"] = 0; - values[valuesById[1] = "RENDER"] = 1; - values[valuesById[2] = "DEPLOY"] = 2; - return values; - })(); - - return ExecutionConfig; + return DeleteDeliveryPipelineRequest; })(); - v1.DefaultPool = (function() { + v1.Target = (function() { /** - * Properties of a DefaultPool. + * Properties of a Target. * @memberof google.cloud.deploy.v1 - * @interface IDefaultPool - * @property {string|null} [serviceAccount] DefaultPool serviceAccount - * @property {string|null} [artifactStorage] DefaultPool artifactStorage + * @interface ITarget + * @property {string|null} [name] Target name + * @property {string|null} [targetId] Target targetId + * @property {string|null} [uid] Target uid + * @property {string|null} [description] Target description + * @property {Object.|null} [annotations] Target annotations + * @property {Object.|null} [labels] Target labels + * @property {boolean|null} [requireApproval] Target requireApproval + * @property {google.protobuf.ITimestamp|null} [createTime] Target createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Target updateTime + * @property {google.cloud.deploy.v1.IGkeCluster|null} [gke] Target gke + * @property {google.cloud.deploy.v1.IAnthosCluster|null} [anthosCluster] Target anthosCluster + * @property {google.cloud.deploy.v1.ICloudRunLocation|null} [run] Target run + * @property {string|null} [etag] Target etag + * @property {Array.|null} [executionConfigs] Target executionConfigs */ /** - * Constructs a new DefaultPool. + * Constructs a new Target. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a DefaultPool. - * @implements IDefaultPool + * @classdesc Represents a Target. + * @implements ITarget * @constructor - * @param {google.cloud.deploy.v1.IDefaultPool=} [properties] Properties to set + * @param {google.cloud.deploy.v1.ITarget=} [properties] Properties to set */ - function DefaultPool(properties) { + function Target(properties) { + this.annotations = {}; + this.labels = {}; + this.executionConfigs = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5201,331 +4793,314 @@ } /** - * DefaultPool serviceAccount. - * @member {string} serviceAccount - * @memberof google.cloud.deploy.v1.DefaultPool + * Target name. + * @member {string} name + * @memberof google.cloud.deploy.v1.Target * @instance */ - DefaultPool.prototype.serviceAccount = ""; + Target.prototype.name = ""; /** - * DefaultPool artifactStorage. - * @member {string} artifactStorage - * @memberof google.cloud.deploy.v1.DefaultPool + * Target targetId. + * @member {string} targetId + * @memberof google.cloud.deploy.v1.Target * @instance */ - DefaultPool.prototype.artifactStorage = ""; + Target.prototype.targetId = ""; /** - * Creates a new DefaultPool instance using the specified properties. + * Target uid. + * @member {string} uid + * @memberof google.cloud.deploy.v1.Target + * @instance + */ + Target.prototype.uid = ""; + + /** + * Target description. + * @member {string} description + * @memberof google.cloud.deploy.v1.Target + * @instance + */ + Target.prototype.description = ""; + + /** + * Target annotations. + * @member {Object.} annotations + * @memberof google.cloud.deploy.v1.Target + * @instance + */ + Target.prototype.annotations = $util.emptyObject; + + /** + * Target labels. + * @member {Object.} labels + * @memberof google.cloud.deploy.v1.Target + * @instance + */ + Target.prototype.labels = $util.emptyObject; + + /** + * Target requireApproval. + * @member {boolean} requireApproval + * @memberof google.cloud.deploy.v1.Target + * @instance + */ + Target.prototype.requireApproval = false; + + /** + * Target createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.deploy.v1.Target + * @instance + */ + Target.prototype.createTime = null; + + /** + * Target updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.deploy.v1.Target + * @instance + */ + Target.prototype.updateTime = null; + + /** + * Target gke. + * @member {google.cloud.deploy.v1.IGkeCluster|null|undefined} gke + * @memberof google.cloud.deploy.v1.Target + * @instance + */ + Target.prototype.gke = null; + + /** + * Target anthosCluster. + * @member {google.cloud.deploy.v1.IAnthosCluster|null|undefined} anthosCluster + * @memberof google.cloud.deploy.v1.Target + * @instance + */ + Target.prototype.anthosCluster = null; + + /** + * Target run. + * @member {google.cloud.deploy.v1.ICloudRunLocation|null|undefined} run + * @memberof google.cloud.deploy.v1.Target + * @instance + */ + Target.prototype.run = null; + + /** + * Target etag. + * @member {string} etag + * @memberof google.cloud.deploy.v1.Target + * @instance + */ + Target.prototype.etag = ""; + + /** + * Target executionConfigs. + * @member {Array.} executionConfigs + * @memberof google.cloud.deploy.v1.Target + * @instance + */ + Target.prototype.executionConfigs = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Target deploymentTarget. + * @member {"gke"|"anthosCluster"|"run"|undefined} deploymentTarget + * @memberof google.cloud.deploy.v1.Target + * @instance + */ + Object.defineProperty(Target.prototype, "deploymentTarget", { + get: $util.oneOfGetter($oneOfFields = ["gke", "anthosCluster", "run"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Target instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.DefaultPool + * @memberof google.cloud.deploy.v1.Target * @static - * @param {google.cloud.deploy.v1.IDefaultPool=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.DefaultPool} DefaultPool instance + * @param {google.cloud.deploy.v1.ITarget=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.Target} Target instance */ - DefaultPool.create = function create(properties) { - return new DefaultPool(properties); + Target.create = function create(properties) { + return new Target(properties); }; /** - * Encodes the specified DefaultPool message. Does not implicitly {@link google.cloud.deploy.v1.DefaultPool.verify|verify} messages. + * Encodes the specified Target message. Does not implicitly {@link google.cloud.deploy.v1.Target.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.DefaultPool + * @memberof google.cloud.deploy.v1.Target * @static - * @param {google.cloud.deploy.v1.IDefaultPool} message DefaultPool message or plain object to encode + * @param {google.cloud.deploy.v1.ITarget} message Target message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DefaultPool.encode = function encode(message, writer) { + Target.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.serviceAccount); - if (message.artifactStorage != null && Object.hasOwnProperty.call(message, "artifactStorage")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.artifactStorage); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.targetId != null && Object.hasOwnProperty.call(message, "targetId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.targetId); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.uid); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); + if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) + for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.etag); + if (message.requireApproval != null && Object.hasOwnProperty.call(message, "requireApproval")) + writer.uint32(/* id 13, wireType 0 =*/104).bool(message.requireApproval); + if (message.gke != null && Object.hasOwnProperty.call(message, "gke")) + $root.google.cloud.deploy.v1.GkeCluster.encode(message.gke, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.executionConfigs != null && message.executionConfigs.length) + for (var i = 0; i < message.executionConfigs.length; ++i) + $root.google.cloud.deploy.v1.ExecutionConfig.encode(message.executionConfigs[i], writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.anthosCluster != null && Object.hasOwnProperty.call(message, "anthosCluster")) + $root.google.cloud.deploy.v1.AnthosCluster.encode(message.anthosCluster, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.run != null && Object.hasOwnProperty.call(message, "run")) + $root.google.cloud.deploy.v1.CloudRunLocation.encode(message.run, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); return writer; }; /** - * Encodes the specified DefaultPool message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DefaultPool.verify|verify} messages. + * Encodes the specified Target message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Target.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.DefaultPool + * @memberof google.cloud.deploy.v1.Target * @static - * @param {google.cloud.deploy.v1.IDefaultPool} message DefaultPool message or plain object to encode + * @param {google.cloud.deploy.v1.ITarget} message Target message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DefaultPool.encodeDelimited = function encodeDelimited(message, writer) { + Target.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DefaultPool message from the specified reader or buffer. + * Decodes a Target message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.DefaultPool + * @memberof google.cloud.deploy.v1.Target * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.DefaultPool} DefaultPool + * @returns {google.cloud.deploy.v1.Target} Target * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DefaultPool.decode = function decode(reader, length) { + Target.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.DefaultPool(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Target(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.serviceAccount = reader.string(); + message.name = reader.string(); break; } case 2: { - message.artifactStorage = reader.string(); + message.targetId = reader.string(); break; } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DefaultPool message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.deploy.v1.DefaultPool - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.DefaultPool} DefaultPool - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DefaultPool.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DefaultPool message. - * @function verify - * @memberof google.cloud.deploy.v1.DefaultPool - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DefaultPool.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - if (!$util.isString(message.serviceAccount)) - return "serviceAccount: string expected"; - if (message.artifactStorage != null && message.hasOwnProperty("artifactStorage")) - if (!$util.isString(message.artifactStorage)) - return "artifactStorage: string expected"; - return null; - }; - - /** - * Creates a DefaultPool message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.deploy.v1.DefaultPool - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.DefaultPool} DefaultPool - */ - DefaultPool.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.DefaultPool) - return object; - var message = new $root.google.cloud.deploy.v1.DefaultPool(); - if (object.serviceAccount != null) - message.serviceAccount = String(object.serviceAccount); - if (object.artifactStorage != null) - message.artifactStorage = String(object.artifactStorage); - return message; - }; - - /** - * Creates a plain object from a DefaultPool message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.deploy.v1.DefaultPool - * @static - * @param {google.cloud.deploy.v1.DefaultPool} message DefaultPool - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DefaultPool.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.serviceAccount = ""; - object.artifactStorage = ""; - } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - object.serviceAccount = message.serviceAccount; - if (message.artifactStorage != null && message.hasOwnProperty("artifactStorage")) - object.artifactStorage = message.artifactStorage; - return object; - }; - - /** - * Converts this DefaultPool to JSON. - * @function toJSON - * @memberof google.cloud.deploy.v1.DefaultPool - * @instance - * @returns {Object.} JSON object - */ - DefaultPool.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DefaultPool - * @function getTypeUrl - * @memberof google.cloud.deploy.v1.DefaultPool - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DefaultPool.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.deploy.v1.DefaultPool"; - }; - - return DefaultPool; - })(); - - v1.PrivatePool = (function() { - - /** - * Properties of a PrivatePool. - * @memberof google.cloud.deploy.v1 - * @interface IPrivatePool - * @property {string|null} [workerPool] PrivatePool workerPool - * @property {string|null} [serviceAccount] PrivatePool serviceAccount - * @property {string|null} [artifactStorage] PrivatePool artifactStorage - */ - - /** - * Constructs a new PrivatePool. - * @memberof google.cloud.deploy.v1 - * @classdesc Represents a PrivatePool. - * @implements IPrivatePool - * @constructor - * @param {google.cloud.deploy.v1.IPrivatePool=} [properties] Properties to set - */ - function PrivatePool(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PrivatePool workerPool. - * @member {string} workerPool - * @memberof google.cloud.deploy.v1.PrivatePool - * @instance - */ - PrivatePool.prototype.workerPool = ""; - - /** - * PrivatePool serviceAccount. - * @member {string} serviceAccount - * @memberof google.cloud.deploy.v1.PrivatePool - * @instance - */ - PrivatePool.prototype.serviceAccount = ""; - - /** - * PrivatePool artifactStorage. - * @member {string} artifactStorage - * @memberof google.cloud.deploy.v1.PrivatePool - * @instance - */ - PrivatePool.prototype.artifactStorage = ""; - - /** - * Creates a new PrivatePool instance using the specified properties. - * @function create - * @memberof google.cloud.deploy.v1.PrivatePool - * @static - * @param {google.cloud.deploy.v1.IPrivatePool=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.PrivatePool} PrivatePool instance - */ - PrivatePool.create = function create(properties) { - return new PrivatePool(properties); - }; - - /** - * Encodes the specified PrivatePool message. Does not implicitly {@link google.cloud.deploy.v1.PrivatePool.verify|verify} messages. - * @function encode - * @memberof google.cloud.deploy.v1.PrivatePool - * @static - * @param {google.cloud.deploy.v1.IPrivatePool} message PrivatePool message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PrivatePool.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.workerPool != null && Object.hasOwnProperty.call(message, "workerPool")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.workerPool); - if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.serviceAccount); - if (message.artifactStorage != null && Object.hasOwnProperty.call(message, "artifactStorage")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.artifactStorage); - return writer; - }; - - /** - * Encodes the specified PrivatePool message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.PrivatePool.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.deploy.v1.PrivatePool - * @static - * @param {google.cloud.deploy.v1.IPrivatePool} message PrivatePool message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PrivatePool.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PrivatePool message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.deploy.v1.PrivatePool - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.PrivatePool} PrivatePool - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PrivatePool.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.PrivatePool(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.workerPool = reader.string(); + case 3: { + message.uid = reader.string(); break; } - case 2: { - message.serviceAccount = reader.string(); + case 4: { + message.description = reader.string(); break; } - case 3: { - message.artifactStorage = reader.string(); + case 5: { + if (message.annotations === $util.emptyObject) + message.annotations = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.annotations[key] = value; + break; + } + case 6: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 13: { + message.requireApproval = reader.bool(); + break; + } + case 8: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 15: { + message.gke = $root.google.cloud.deploy.v1.GkeCluster.decode(reader, reader.uint32()); + break; + } + case 17: { + message.anthosCluster = $root.google.cloud.deploy.v1.AnthosCluster.decode(reader, reader.uint32()); + break; + } + case 18: { + message.run = $root.google.cloud.deploy.v1.CloudRunLocation.decode(reader, reader.uint32()); + break; + } + case 12: { + message.etag = reader.string(); + break; + } + case 16: { + if (!(message.executionConfigs && message.executionConfigs.length)) + message.executionConfigs = []; + message.executionConfigs.push($root.google.cloud.deploy.v1.ExecutionConfig.decode(reader, reader.uint32())); break; } default: @@ -5537,140 +5112,326 @@ }; /** - * Decodes a PrivatePool message from the specified reader or buffer, length delimited. + * Decodes a Target message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.PrivatePool + * @memberof google.cloud.deploy.v1.Target * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.PrivatePool} PrivatePool + * @returns {google.cloud.deploy.v1.Target} Target * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PrivatePool.decodeDelimited = function decodeDelimited(reader) { + Target.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PrivatePool message. + * Verifies a Target message. * @function verify - * @memberof google.cloud.deploy.v1.PrivatePool + * @memberof google.cloud.deploy.v1.Target * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PrivatePool.verify = function verify(message) { + Target.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.workerPool != null && message.hasOwnProperty("workerPool")) - if (!$util.isString(message.workerPool)) - return "workerPool: string expected"; - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - if (!$util.isString(message.serviceAccount)) - return "serviceAccount: string expected"; - if (message.artifactStorage != null && message.hasOwnProperty("artifactStorage")) - if (!$util.isString(message.artifactStorage)) - return "artifactStorage: string expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.targetId != null && message.hasOwnProperty("targetId")) + if (!$util.isString(message.targetId)) + return "targetId: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.annotations != null && message.hasOwnProperty("annotations")) { + if (!$util.isObject(message.annotations)) + return "annotations: object expected"; + var key = Object.keys(message.annotations); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.annotations[key[i]])) + return "annotations: string{k:string} expected"; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.requireApproval != null && message.hasOwnProperty("requireApproval")) + if (typeof message.requireApproval !== "boolean") + return "requireApproval: boolean expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.gke != null && message.hasOwnProperty("gke")) { + properties.deploymentTarget = 1; + { + var error = $root.google.cloud.deploy.v1.GkeCluster.verify(message.gke); + if (error) + return "gke." + error; + } + } + if (message.anthosCluster != null && message.hasOwnProperty("anthosCluster")) { + if (properties.deploymentTarget === 1) + return "deploymentTarget: multiple values"; + properties.deploymentTarget = 1; + { + var error = $root.google.cloud.deploy.v1.AnthosCluster.verify(message.anthosCluster); + if (error) + return "anthosCluster." + error; + } + } + if (message.run != null && message.hasOwnProperty("run")) { + if (properties.deploymentTarget === 1) + return "deploymentTarget: multiple values"; + properties.deploymentTarget = 1; + { + var error = $root.google.cloud.deploy.v1.CloudRunLocation.verify(message.run); + if (error) + return "run." + error; + } + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.executionConfigs != null && message.hasOwnProperty("executionConfigs")) { + if (!Array.isArray(message.executionConfigs)) + return "executionConfigs: array expected"; + for (var i = 0; i < message.executionConfigs.length; ++i) { + var error = $root.google.cloud.deploy.v1.ExecutionConfig.verify(message.executionConfigs[i]); + if (error) + return "executionConfigs." + error; + } + } return null; }; /** - * Creates a PrivatePool message from a plain object. Also converts values to their respective internal types. + * Creates a Target message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.PrivatePool + * @memberof google.cloud.deploy.v1.Target * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.PrivatePool} PrivatePool + * @returns {google.cloud.deploy.v1.Target} Target */ - PrivatePool.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.PrivatePool) + Target.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.Target) return object; - var message = new $root.google.cloud.deploy.v1.PrivatePool(); - if (object.workerPool != null) - message.workerPool = String(object.workerPool); - if (object.serviceAccount != null) - message.serviceAccount = String(object.serviceAccount); - if (object.artifactStorage != null) - message.artifactStorage = String(object.artifactStorage); + var message = new $root.google.cloud.deploy.v1.Target(); + if (object.name != null) + message.name = String(object.name); + if (object.targetId != null) + message.targetId = String(object.targetId); + if (object.uid != null) + message.uid = String(object.uid); + if (object.description != null) + message.description = String(object.description); + if (object.annotations) { + if (typeof object.annotations !== "object") + throw TypeError(".google.cloud.deploy.v1.Target.annotations: object expected"); + message.annotations = {}; + for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) + message.annotations[keys[i]] = String(object.annotations[keys[i]]); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.deploy.v1.Target.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.requireApproval != null) + message.requireApproval = Boolean(object.requireApproval); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.deploy.v1.Target.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.deploy.v1.Target.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.gke != null) { + if (typeof object.gke !== "object") + throw TypeError(".google.cloud.deploy.v1.Target.gke: object expected"); + message.gke = $root.google.cloud.deploy.v1.GkeCluster.fromObject(object.gke); + } + if (object.anthosCluster != null) { + if (typeof object.anthosCluster !== "object") + throw TypeError(".google.cloud.deploy.v1.Target.anthosCluster: object expected"); + message.anthosCluster = $root.google.cloud.deploy.v1.AnthosCluster.fromObject(object.anthosCluster); + } + if (object.run != null) { + if (typeof object.run !== "object") + throw TypeError(".google.cloud.deploy.v1.Target.run: object expected"); + message.run = $root.google.cloud.deploy.v1.CloudRunLocation.fromObject(object.run); + } + if (object.etag != null) + message.etag = String(object.etag); + if (object.executionConfigs) { + if (!Array.isArray(object.executionConfigs)) + throw TypeError(".google.cloud.deploy.v1.Target.executionConfigs: array expected"); + message.executionConfigs = []; + for (var i = 0; i < object.executionConfigs.length; ++i) { + if (typeof object.executionConfigs[i] !== "object") + throw TypeError(".google.cloud.deploy.v1.Target.executionConfigs: object expected"); + message.executionConfigs[i] = $root.google.cloud.deploy.v1.ExecutionConfig.fromObject(object.executionConfigs[i]); + } + } return message; }; /** - * Creates a plain object from a PrivatePool message. Also converts values to other types if specified. + * Creates a plain object from a Target message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.PrivatePool + * @memberof google.cloud.deploy.v1.Target * @static - * @param {google.cloud.deploy.v1.PrivatePool} message PrivatePool + * @param {google.cloud.deploy.v1.Target} message Target * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PrivatePool.toObject = function toObject(message, options) { + Target.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.executionConfigs = []; + if (options.objects || options.defaults) { + object.annotations = {}; + object.labels = {}; + } if (options.defaults) { - object.workerPool = ""; - object.serviceAccount = ""; - object.artifactStorage = ""; + object.name = ""; + object.targetId = ""; + object.uid = ""; + object.description = ""; + object.createTime = null; + object.updateTime = null; + object.etag = ""; + object.requireApproval = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.targetId != null && message.hasOwnProperty("targetId")) + object.targetId = message.targetId; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + var keys2; + if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { + object.annotations = {}; + for (var j = 0; j < keys2.length; ++j) + object.annotations[keys2[j]] = message.annotations[keys2[j]]; + } + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.requireApproval != null && message.hasOwnProperty("requireApproval")) + object.requireApproval = message.requireApproval; + if (message.gke != null && message.hasOwnProperty("gke")) { + object.gke = $root.google.cloud.deploy.v1.GkeCluster.toObject(message.gke, options); + if (options.oneofs) + object.deploymentTarget = "gke"; + } + if (message.executionConfigs && message.executionConfigs.length) { + object.executionConfigs = []; + for (var j = 0; j < message.executionConfigs.length; ++j) + object.executionConfigs[j] = $root.google.cloud.deploy.v1.ExecutionConfig.toObject(message.executionConfigs[j], options); + } + if (message.anthosCluster != null && message.hasOwnProperty("anthosCluster")) { + object.anthosCluster = $root.google.cloud.deploy.v1.AnthosCluster.toObject(message.anthosCluster, options); + if (options.oneofs) + object.deploymentTarget = "anthosCluster"; + } + if (message.run != null && message.hasOwnProperty("run")) { + object.run = $root.google.cloud.deploy.v1.CloudRunLocation.toObject(message.run, options); + if (options.oneofs) + object.deploymentTarget = "run"; } - if (message.workerPool != null && message.hasOwnProperty("workerPool")) - object.workerPool = message.workerPool; - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - object.serviceAccount = message.serviceAccount; - if (message.artifactStorage != null && message.hasOwnProperty("artifactStorage")) - object.artifactStorage = message.artifactStorage; return object; }; /** - * Converts this PrivatePool to JSON. + * Converts this Target to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.PrivatePool + * @memberof google.cloud.deploy.v1.Target * @instance * @returns {Object.} JSON object */ - PrivatePool.prototype.toJSON = function toJSON() { + Target.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PrivatePool + * Gets the default type url for Target * @function getTypeUrl - * @memberof google.cloud.deploy.v1.PrivatePool + * @memberof google.cloud.deploy.v1.Target * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PrivatePool.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Target.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.PrivatePool"; + return typeUrlPrefix + "/google.cloud.deploy.v1.Target"; }; - return PrivatePool; + return Target; })(); - v1.GkeCluster = (function() { + v1.ExecutionConfig = (function() { /** - * Properties of a GkeCluster. + * Properties of an ExecutionConfig. * @memberof google.cloud.deploy.v1 - * @interface IGkeCluster - * @property {string|null} [cluster] GkeCluster cluster - * @property {boolean|null} [internalIp] GkeCluster internalIp + * @interface IExecutionConfig + * @property {Array.|null} [usages] ExecutionConfig usages + * @property {google.cloud.deploy.v1.IDefaultPool|null} [defaultPool] ExecutionConfig defaultPool + * @property {google.cloud.deploy.v1.IPrivatePool|null} [privatePool] ExecutionConfig privatePool + * @property {string|null} [workerPool] ExecutionConfig workerPool + * @property {string|null} [serviceAccount] ExecutionConfig serviceAccount + * @property {string|null} [artifactStorage] ExecutionConfig artifactStorage + * @property {google.protobuf.IDuration|null} [executionTimeout] ExecutionConfig executionTimeout */ /** - * Constructs a new GkeCluster. + * Constructs a new ExecutionConfig. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a GkeCluster. - * @implements IGkeCluster + * @classdesc Represents an ExecutionConfig. + * @implements IExecutionConfig * @constructor - * @param {google.cloud.deploy.v1.IGkeCluster=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IExecutionConfig=} [properties] Properties to set */ - function GkeCluster(properties) { + function ExecutionConfig(properties) { + this.usages = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5678,89 +5439,184 @@ } /** - * GkeCluster cluster. - * @member {string} cluster - * @memberof google.cloud.deploy.v1.GkeCluster + * ExecutionConfig usages. + * @member {Array.} usages + * @memberof google.cloud.deploy.v1.ExecutionConfig * @instance */ - GkeCluster.prototype.cluster = ""; + ExecutionConfig.prototype.usages = $util.emptyArray; /** - * GkeCluster internalIp. - * @member {boolean} internalIp - * @memberof google.cloud.deploy.v1.GkeCluster + * ExecutionConfig defaultPool. + * @member {google.cloud.deploy.v1.IDefaultPool|null|undefined} defaultPool + * @memberof google.cloud.deploy.v1.ExecutionConfig * @instance */ - GkeCluster.prototype.internalIp = false; + ExecutionConfig.prototype.defaultPool = null; /** - * Creates a new GkeCluster instance using the specified properties. + * ExecutionConfig privatePool. + * @member {google.cloud.deploy.v1.IPrivatePool|null|undefined} privatePool + * @memberof google.cloud.deploy.v1.ExecutionConfig + * @instance + */ + ExecutionConfig.prototype.privatePool = null; + + /** + * ExecutionConfig workerPool. + * @member {string} workerPool + * @memberof google.cloud.deploy.v1.ExecutionConfig + * @instance + */ + ExecutionConfig.prototype.workerPool = ""; + + /** + * ExecutionConfig serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.deploy.v1.ExecutionConfig + * @instance + */ + ExecutionConfig.prototype.serviceAccount = ""; + + /** + * ExecutionConfig artifactStorage. + * @member {string} artifactStorage + * @memberof google.cloud.deploy.v1.ExecutionConfig + * @instance + */ + ExecutionConfig.prototype.artifactStorage = ""; + + /** + * ExecutionConfig executionTimeout. + * @member {google.protobuf.IDuration|null|undefined} executionTimeout + * @memberof google.cloud.deploy.v1.ExecutionConfig + * @instance + */ + ExecutionConfig.prototype.executionTimeout = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ExecutionConfig executionEnvironment. + * @member {"defaultPool"|"privatePool"|undefined} executionEnvironment + * @memberof google.cloud.deploy.v1.ExecutionConfig + * @instance + */ + Object.defineProperty(ExecutionConfig.prototype, "executionEnvironment", { + get: $util.oneOfGetter($oneOfFields = ["defaultPool", "privatePool"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ExecutionConfig instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.GkeCluster + * @memberof google.cloud.deploy.v1.ExecutionConfig * @static - * @param {google.cloud.deploy.v1.IGkeCluster=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.GkeCluster} GkeCluster instance + * @param {google.cloud.deploy.v1.IExecutionConfig=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ExecutionConfig} ExecutionConfig instance */ - GkeCluster.create = function create(properties) { - return new GkeCluster(properties); + ExecutionConfig.create = function create(properties) { + return new ExecutionConfig(properties); }; /** - * Encodes the specified GkeCluster message. Does not implicitly {@link google.cloud.deploy.v1.GkeCluster.verify|verify} messages. + * Encodes the specified ExecutionConfig message. Does not implicitly {@link google.cloud.deploy.v1.ExecutionConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.GkeCluster + * @memberof google.cloud.deploy.v1.ExecutionConfig * @static - * @param {google.cloud.deploy.v1.IGkeCluster} message GkeCluster message or plain object to encode + * @param {google.cloud.deploy.v1.IExecutionConfig} message ExecutionConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GkeCluster.encode = function encode(message, writer) { + ExecutionConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.cluster != null && Object.hasOwnProperty.call(message, "cluster")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.cluster); - if (message.internalIp != null && Object.hasOwnProperty.call(message, "internalIp")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.internalIp); + if (message.usages != null && message.usages.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.usages.length; ++i) + writer.int32(message.usages[i]); + writer.ldelim(); + } + if (message.defaultPool != null && Object.hasOwnProperty.call(message, "defaultPool")) + $root.google.cloud.deploy.v1.DefaultPool.encode(message.defaultPool, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.privatePool != null && Object.hasOwnProperty.call(message, "privatePool")) + $root.google.cloud.deploy.v1.PrivatePool.encode(message.privatePool, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.workerPool != null && Object.hasOwnProperty.call(message, "workerPool")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.workerPool); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.serviceAccount); + if (message.artifactStorage != null && Object.hasOwnProperty.call(message, "artifactStorage")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.artifactStorage); + if (message.executionTimeout != null && Object.hasOwnProperty.call(message, "executionTimeout")) + $root.google.protobuf.Duration.encode(message.executionTimeout, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; /** - * Encodes the specified GkeCluster message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GkeCluster.verify|verify} messages. + * Encodes the specified ExecutionConfig message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ExecutionConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.GkeCluster + * @memberof google.cloud.deploy.v1.ExecutionConfig * @static - * @param {google.cloud.deploy.v1.IGkeCluster} message GkeCluster message or plain object to encode + * @param {google.cloud.deploy.v1.IExecutionConfig} message ExecutionConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GkeCluster.encodeDelimited = function encodeDelimited(message, writer) { + ExecutionConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GkeCluster message from the specified reader or buffer. + * Decodes an ExecutionConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.GkeCluster + * @memberof google.cloud.deploy.v1.ExecutionConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.GkeCluster} GkeCluster + * @returns {google.cloud.deploy.v1.ExecutionConfig} ExecutionConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GkeCluster.decode = function decode(reader, length) { + ExecutionConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.GkeCluster(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ExecutionConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.cluster = reader.string(); + if (!(message.usages && message.usages.length)) + message.usages = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.usages.push(reader.int32()); + } else + message.usages.push(reader.int32()); break; } case 2: { - message.internalIp = reader.bool(); + message.defaultPool = $root.google.cloud.deploy.v1.DefaultPool.decode(reader, reader.uint32()); + break; + } + case 3: { + message.privatePool = $root.google.cloud.deploy.v1.PrivatePool.decode(reader, reader.uint32()); + break; + } + case 4: { + message.workerPool = reader.string(); + break; + } + case 5: { + message.serviceAccount = reader.string(); + break; + } + case 6: { + message.artifactStorage = reader.string(); + break; + } + case 7: { + message.executionTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } default: @@ -5772,131 +5628,256 @@ }; /** - * Decodes a GkeCluster message from the specified reader or buffer, length delimited. + * Decodes an ExecutionConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.GkeCluster + * @memberof google.cloud.deploy.v1.ExecutionConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.GkeCluster} GkeCluster + * @returns {google.cloud.deploy.v1.ExecutionConfig} ExecutionConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GkeCluster.decodeDelimited = function decodeDelimited(reader) { + ExecutionConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GkeCluster message. + * Verifies an ExecutionConfig message. * @function verify - * @memberof google.cloud.deploy.v1.GkeCluster + * @memberof google.cloud.deploy.v1.ExecutionConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GkeCluster.verify = function verify(message) { + ExecutionConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.cluster != null && message.hasOwnProperty("cluster")) - if (!$util.isString(message.cluster)) - return "cluster: string expected"; - if (message.internalIp != null && message.hasOwnProperty("internalIp")) - if (typeof message.internalIp !== "boolean") - return "internalIp: boolean expected"; + var properties = {}; + if (message.usages != null && message.hasOwnProperty("usages")) { + if (!Array.isArray(message.usages)) + return "usages: array expected"; + for (var i = 0; i < message.usages.length; ++i) + switch (message.usages[i]) { + default: + return "usages: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.defaultPool != null && message.hasOwnProperty("defaultPool")) { + properties.executionEnvironment = 1; + { + var error = $root.google.cloud.deploy.v1.DefaultPool.verify(message.defaultPool); + if (error) + return "defaultPool." + error; + } + } + if (message.privatePool != null && message.hasOwnProperty("privatePool")) { + if (properties.executionEnvironment === 1) + return "executionEnvironment: multiple values"; + properties.executionEnvironment = 1; + { + var error = $root.google.cloud.deploy.v1.PrivatePool.verify(message.privatePool); + if (error) + return "privatePool." + error; + } + } + if (message.workerPool != null && message.hasOwnProperty("workerPool")) + if (!$util.isString(message.workerPool)) + return "workerPool: string expected"; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.artifactStorage != null && message.hasOwnProperty("artifactStorage")) + if (!$util.isString(message.artifactStorage)) + return "artifactStorage: string expected"; + if (message.executionTimeout != null && message.hasOwnProperty("executionTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.executionTimeout); + if (error) + return "executionTimeout." + error; + } return null; }; /** - * Creates a GkeCluster message from a plain object. Also converts values to their respective internal types. + * Creates an ExecutionConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.GkeCluster + * @memberof google.cloud.deploy.v1.ExecutionConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.GkeCluster} GkeCluster + * @returns {google.cloud.deploy.v1.ExecutionConfig} ExecutionConfig */ - GkeCluster.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.GkeCluster) + ExecutionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ExecutionConfig) return object; - var message = new $root.google.cloud.deploy.v1.GkeCluster(); - if (object.cluster != null) - message.cluster = String(object.cluster); - if (object.internalIp != null) - message.internalIp = Boolean(object.internalIp); + var message = new $root.google.cloud.deploy.v1.ExecutionConfig(); + if (object.usages) { + if (!Array.isArray(object.usages)) + throw TypeError(".google.cloud.deploy.v1.ExecutionConfig.usages: array expected"); + message.usages = []; + for (var i = 0; i < object.usages.length; ++i) + switch (object.usages[i]) { + default: + case "EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED": + case 0: + message.usages[i] = 0; + break; + case "RENDER": + case 1: + message.usages[i] = 1; + break; + case "DEPLOY": + case 2: + message.usages[i] = 2; + break; + case "VERIFY": + case 3: + message.usages[i] = 3; + break; + } + } + if (object.defaultPool != null) { + if (typeof object.defaultPool !== "object") + throw TypeError(".google.cloud.deploy.v1.ExecutionConfig.defaultPool: object expected"); + message.defaultPool = $root.google.cloud.deploy.v1.DefaultPool.fromObject(object.defaultPool); + } + if (object.privatePool != null) { + if (typeof object.privatePool !== "object") + throw TypeError(".google.cloud.deploy.v1.ExecutionConfig.privatePool: object expected"); + message.privatePool = $root.google.cloud.deploy.v1.PrivatePool.fromObject(object.privatePool); + } + if (object.workerPool != null) + message.workerPool = String(object.workerPool); + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.artifactStorage != null) + message.artifactStorage = String(object.artifactStorage); + if (object.executionTimeout != null) { + if (typeof object.executionTimeout !== "object") + throw TypeError(".google.cloud.deploy.v1.ExecutionConfig.executionTimeout: object expected"); + message.executionTimeout = $root.google.protobuf.Duration.fromObject(object.executionTimeout); + } return message; }; /** - * Creates a plain object from a GkeCluster message. Also converts values to other types if specified. + * Creates a plain object from an ExecutionConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.GkeCluster + * @memberof google.cloud.deploy.v1.ExecutionConfig * @static - * @param {google.cloud.deploy.v1.GkeCluster} message GkeCluster + * @param {google.cloud.deploy.v1.ExecutionConfig} message ExecutionConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GkeCluster.toObject = function toObject(message, options) { + ExecutionConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.usages = []; if (options.defaults) { - object.cluster = ""; - object.internalIp = false; + object.workerPool = ""; + object.serviceAccount = ""; + object.artifactStorage = ""; + object.executionTimeout = null; } - if (message.cluster != null && message.hasOwnProperty("cluster")) - object.cluster = message.cluster; - if (message.internalIp != null && message.hasOwnProperty("internalIp")) - object.internalIp = message.internalIp; + if (message.usages && message.usages.length) { + object.usages = []; + for (var j = 0; j < message.usages.length; ++j) + object.usages[j] = options.enums === String ? $root.google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage[message.usages[j]] : message.usages[j]; + } + if (message.defaultPool != null && message.hasOwnProperty("defaultPool")) { + object.defaultPool = $root.google.cloud.deploy.v1.DefaultPool.toObject(message.defaultPool, options); + if (options.oneofs) + object.executionEnvironment = "defaultPool"; + } + if (message.privatePool != null && message.hasOwnProperty("privatePool")) { + object.privatePool = $root.google.cloud.deploy.v1.PrivatePool.toObject(message.privatePool, options); + if (options.oneofs) + object.executionEnvironment = "privatePool"; + } + if (message.workerPool != null && message.hasOwnProperty("workerPool")) + object.workerPool = message.workerPool; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.artifactStorage != null && message.hasOwnProperty("artifactStorage")) + object.artifactStorage = message.artifactStorage; + if (message.executionTimeout != null && message.hasOwnProperty("executionTimeout")) + object.executionTimeout = $root.google.protobuf.Duration.toObject(message.executionTimeout, options); return object; }; /** - * Converts this GkeCluster to JSON. + * Converts this ExecutionConfig to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.GkeCluster + * @memberof google.cloud.deploy.v1.ExecutionConfig * @instance * @returns {Object.} JSON object */ - GkeCluster.prototype.toJSON = function toJSON() { + ExecutionConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GkeCluster + * Gets the default type url for ExecutionConfig * @function getTypeUrl - * @memberof google.cloud.deploy.v1.GkeCluster + * @memberof google.cloud.deploy.v1.ExecutionConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GkeCluster.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExecutionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.GkeCluster"; + return typeUrlPrefix + "/google.cloud.deploy.v1.ExecutionConfig"; }; - return GkeCluster; + /** + * ExecutionEnvironmentUsage enum. + * @name google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage + * @enum {number} + * @property {number} EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED=0 EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED value + * @property {number} RENDER=1 RENDER value + * @property {number} DEPLOY=2 DEPLOY value + * @property {number} VERIFY=3 VERIFY value + */ + ExecutionConfig.ExecutionEnvironmentUsage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RENDER"] = 1; + values[valuesById[2] = "DEPLOY"] = 2; + values[valuesById[3] = "VERIFY"] = 3; + return values; + })(); + + return ExecutionConfig; })(); - v1.AnthosCluster = (function() { + v1.DefaultPool = (function() { /** - * Properties of an AnthosCluster. + * Properties of a DefaultPool. * @memberof google.cloud.deploy.v1 - * @interface IAnthosCluster - * @property {string|null} [membership] AnthosCluster membership + * @interface IDefaultPool + * @property {string|null} [serviceAccount] DefaultPool serviceAccount + * @property {string|null} [artifactStorage] DefaultPool artifactStorage */ /** - * Constructs a new AnthosCluster. + * Constructs a new DefaultPool. * @memberof google.cloud.deploy.v1 - * @classdesc Represents an AnthosCluster. - * @implements IAnthosCluster + * @classdesc Represents a DefaultPool. + * @implements IDefaultPool * @constructor - * @param {google.cloud.deploy.v1.IAnthosCluster=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IDefaultPool=} [properties] Properties to set */ - function AnthosCluster(properties) { + function DefaultPool(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5904,75 +5885,89 @@ } /** - * AnthosCluster membership. - * @member {string} membership - * @memberof google.cloud.deploy.v1.AnthosCluster + * DefaultPool serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.deploy.v1.DefaultPool * @instance */ - AnthosCluster.prototype.membership = ""; + DefaultPool.prototype.serviceAccount = ""; /** - * Creates a new AnthosCluster instance using the specified properties. + * DefaultPool artifactStorage. + * @member {string} artifactStorage + * @memberof google.cloud.deploy.v1.DefaultPool + * @instance + */ + DefaultPool.prototype.artifactStorage = ""; + + /** + * Creates a new DefaultPool instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.AnthosCluster + * @memberof google.cloud.deploy.v1.DefaultPool * @static - * @param {google.cloud.deploy.v1.IAnthosCluster=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.AnthosCluster} AnthosCluster instance + * @param {google.cloud.deploy.v1.IDefaultPool=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.DefaultPool} DefaultPool instance */ - AnthosCluster.create = function create(properties) { - return new AnthosCluster(properties); + DefaultPool.create = function create(properties) { + return new DefaultPool(properties); }; /** - * Encodes the specified AnthosCluster message. Does not implicitly {@link google.cloud.deploy.v1.AnthosCluster.verify|verify} messages. + * Encodes the specified DefaultPool message. Does not implicitly {@link google.cloud.deploy.v1.DefaultPool.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.AnthosCluster + * @memberof google.cloud.deploy.v1.DefaultPool * @static - * @param {google.cloud.deploy.v1.IAnthosCluster} message AnthosCluster message or plain object to encode + * @param {google.cloud.deploy.v1.IDefaultPool} message DefaultPool message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnthosCluster.encode = function encode(message, writer) { + DefaultPool.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.membership != null && Object.hasOwnProperty.call(message, "membership")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.membership); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.serviceAccount); + if (message.artifactStorage != null && Object.hasOwnProperty.call(message, "artifactStorage")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.artifactStorage); return writer; }; /** - * Encodes the specified AnthosCluster message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AnthosCluster.verify|verify} messages. + * Encodes the specified DefaultPool message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DefaultPool.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.AnthosCluster + * @memberof google.cloud.deploy.v1.DefaultPool * @static - * @param {google.cloud.deploy.v1.IAnthosCluster} message AnthosCluster message or plain object to encode + * @param {google.cloud.deploy.v1.IDefaultPool} message DefaultPool message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnthosCluster.encodeDelimited = function encodeDelimited(message, writer) { + DefaultPool.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AnthosCluster message from the specified reader or buffer. + * Decodes a DefaultPool message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.AnthosCluster + * @memberof google.cloud.deploy.v1.DefaultPool * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.AnthosCluster} AnthosCluster + * @returns {google.cloud.deploy.v1.DefaultPool} DefaultPool * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnthosCluster.decode = function decode(reader, length) { + DefaultPool.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.AnthosCluster(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.DefaultPool(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.membership = reader.string(); + message.serviceAccount = reader.string(); + break; + } + case 2: { + message.artifactStorage = reader.string(); break; } default: @@ -5984,126 +5979,133 @@ }; /** - * Decodes an AnthosCluster message from the specified reader or buffer, length delimited. + * Decodes a DefaultPool message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.AnthosCluster + * @memberof google.cloud.deploy.v1.DefaultPool * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.AnthosCluster} AnthosCluster + * @returns {google.cloud.deploy.v1.DefaultPool} DefaultPool * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnthosCluster.decodeDelimited = function decodeDelimited(reader) { + DefaultPool.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AnthosCluster message. + * Verifies a DefaultPool message. * @function verify - * @memberof google.cloud.deploy.v1.AnthosCluster + * @memberof google.cloud.deploy.v1.DefaultPool * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AnthosCluster.verify = function verify(message) { + DefaultPool.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.membership != null && message.hasOwnProperty("membership")) - if (!$util.isString(message.membership)) - return "membership: string expected"; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.artifactStorage != null && message.hasOwnProperty("artifactStorage")) + if (!$util.isString(message.artifactStorage)) + return "artifactStorage: string expected"; return null; }; /** - * Creates an AnthosCluster message from a plain object. Also converts values to their respective internal types. + * Creates a DefaultPool message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.AnthosCluster + * @memberof google.cloud.deploy.v1.DefaultPool * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.AnthosCluster} AnthosCluster + * @returns {google.cloud.deploy.v1.DefaultPool} DefaultPool */ - AnthosCluster.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.AnthosCluster) + DefaultPool.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.DefaultPool) return object; - var message = new $root.google.cloud.deploy.v1.AnthosCluster(); - if (object.membership != null) - message.membership = String(object.membership); + var message = new $root.google.cloud.deploy.v1.DefaultPool(); + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.artifactStorage != null) + message.artifactStorage = String(object.artifactStorage); return message; }; /** - * Creates a plain object from an AnthosCluster message. Also converts values to other types if specified. + * Creates a plain object from a DefaultPool message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.AnthosCluster + * @memberof google.cloud.deploy.v1.DefaultPool * @static - * @param {google.cloud.deploy.v1.AnthosCluster} message AnthosCluster + * @param {google.cloud.deploy.v1.DefaultPool} message DefaultPool * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AnthosCluster.toObject = function toObject(message, options) { + DefaultPool.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.membership = ""; - if (message.membership != null && message.hasOwnProperty("membership")) - object.membership = message.membership; + if (options.defaults) { + object.serviceAccount = ""; + object.artifactStorage = ""; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.artifactStorage != null && message.hasOwnProperty("artifactStorage")) + object.artifactStorage = message.artifactStorage; return object; }; /** - * Converts this AnthosCluster to JSON. + * Converts this DefaultPool to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.AnthosCluster + * @memberof google.cloud.deploy.v1.DefaultPool * @instance * @returns {Object.} JSON object */ - AnthosCluster.prototype.toJSON = function toJSON() { + DefaultPool.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AnthosCluster + * Gets the default type url for DefaultPool * @function getTypeUrl - * @memberof google.cloud.deploy.v1.AnthosCluster + * @memberof google.cloud.deploy.v1.DefaultPool * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AnthosCluster.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DefaultPool.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.AnthosCluster"; + return typeUrlPrefix + "/google.cloud.deploy.v1.DefaultPool"; }; - return AnthosCluster; + return DefaultPool; })(); - v1.ListTargetsRequest = (function() { + v1.PrivatePool = (function() { /** - * Properties of a ListTargetsRequest. + * Properties of a PrivatePool. * @memberof google.cloud.deploy.v1 - * @interface IListTargetsRequest - * @property {string|null} [parent] ListTargetsRequest parent - * @property {number|null} [pageSize] ListTargetsRequest pageSize - * @property {string|null} [pageToken] ListTargetsRequest pageToken - * @property {string|null} [filter] ListTargetsRequest filter - * @property {string|null} [orderBy] ListTargetsRequest orderBy + * @interface IPrivatePool + * @property {string|null} [workerPool] PrivatePool workerPool + * @property {string|null} [serviceAccount] PrivatePool serviceAccount + * @property {string|null} [artifactStorage] PrivatePool artifactStorage */ /** - * Constructs a new ListTargetsRequest. + * Constructs a new PrivatePool. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a ListTargetsRequest. - * @implements IListTargetsRequest + * @classdesc Represents a PrivatePool. + * @implements IPrivatePool * @constructor - * @param {google.cloud.deploy.v1.IListTargetsRequest=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IPrivatePool=} [properties] Properties to set */ - function ListTargetsRequest(properties) { + function PrivatePool(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6111,131 +6113,103 @@ } /** - * ListTargetsRequest parent. - * @member {string} parent - * @memberof google.cloud.deploy.v1.ListTargetsRequest - * @instance - */ - ListTargetsRequest.prototype.parent = ""; - - /** - * ListTargetsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.deploy.v1.ListTargetsRequest - * @instance - */ - ListTargetsRequest.prototype.pageSize = 0; - - /** - * ListTargetsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.deploy.v1.ListTargetsRequest + * PrivatePool workerPool. + * @member {string} workerPool + * @memberof google.cloud.deploy.v1.PrivatePool * @instance */ - ListTargetsRequest.prototype.pageToken = ""; + PrivatePool.prototype.workerPool = ""; /** - * ListTargetsRequest filter. - * @member {string} filter - * @memberof google.cloud.deploy.v1.ListTargetsRequest + * PrivatePool serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.deploy.v1.PrivatePool * @instance */ - ListTargetsRequest.prototype.filter = ""; + PrivatePool.prototype.serviceAccount = ""; /** - * ListTargetsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.deploy.v1.ListTargetsRequest + * PrivatePool artifactStorage. + * @member {string} artifactStorage + * @memberof google.cloud.deploy.v1.PrivatePool * @instance */ - ListTargetsRequest.prototype.orderBy = ""; + PrivatePool.prototype.artifactStorage = ""; /** - * Creates a new ListTargetsRequest instance using the specified properties. + * Creates a new PrivatePool instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.ListTargetsRequest + * @memberof google.cloud.deploy.v1.PrivatePool * @static - * @param {google.cloud.deploy.v1.IListTargetsRequest=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.ListTargetsRequest} ListTargetsRequest instance + * @param {google.cloud.deploy.v1.IPrivatePool=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.PrivatePool} PrivatePool instance */ - ListTargetsRequest.create = function create(properties) { - return new ListTargetsRequest(properties); + PrivatePool.create = function create(properties) { + return new PrivatePool(properties); }; /** - * Encodes the specified ListTargetsRequest message. Does not implicitly {@link google.cloud.deploy.v1.ListTargetsRequest.verify|verify} messages. + * Encodes the specified PrivatePool message. Does not implicitly {@link google.cloud.deploy.v1.PrivatePool.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.ListTargetsRequest + * @memberof google.cloud.deploy.v1.PrivatePool * @static - * @param {google.cloud.deploy.v1.IListTargetsRequest} message ListTargetsRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IPrivatePool} message PrivatePool message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTargetsRequest.encode = function encode(message, writer) { + PrivatePool.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + if (message.workerPool != null && Object.hasOwnProperty.call(message, "workerPool")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workerPool); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.serviceAccount); + if (message.artifactStorage != null && Object.hasOwnProperty.call(message, "artifactStorage")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.artifactStorage); return writer; }; /** - * Encodes the specified ListTargetsRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListTargetsRequest.verify|verify} messages. + * Encodes the specified PrivatePool message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.PrivatePool.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.ListTargetsRequest + * @memberof google.cloud.deploy.v1.PrivatePool * @static - * @param {google.cloud.deploy.v1.IListTargetsRequest} message ListTargetsRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IPrivatePool} message PrivatePool message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTargetsRequest.encodeDelimited = function encodeDelimited(message, writer) { + PrivatePool.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListTargetsRequest message from the specified reader or buffer. + * Decodes a PrivatePool message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.ListTargetsRequest + * @memberof google.cloud.deploy.v1.PrivatePool * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.ListTargetsRequest} ListTargetsRequest + * @returns {google.cloud.deploy.v1.PrivatePool} PrivatePool * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTargetsRequest.decode = function decode(reader, length) { + PrivatePool.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListTargetsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.PrivatePool(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.workerPool = reader.string(); break; } case 2: { - message.pageSize = reader.int32(); + message.serviceAccount = reader.string(); break; } case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); + message.artifactStorage = reader.string(); break; } default: @@ -6247,159 +6221,140 @@ }; /** - * Decodes a ListTargetsRequest message from the specified reader or buffer, length delimited. + * Decodes a PrivatePool message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.ListTargetsRequest + * @memberof google.cloud.deploy.v1.PrivatePool * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.ListTargetsRequest} ListTargetsRequest + * @returns {google.cloud.deploy.v1.PrivatePool} PrivatePool * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTargetsRequest.decodeDelimited = function decodeDelimited(reader) { + PrivatePool.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListTargetsRequest message. + * Verifies a PrivatePool message. * @function verify - * @memberof google.cloud.deploy.v1.ListTargetsRequest + * @memberof google.cloud.deploy.v1.PrivatePool * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListTargetsRequest.verify = function verify(message) { + PrivatePool.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; + if (message.workerPool != null && message.hasOwnProperty("workerPool")) + if (!$util.isString(message.workerPool)) + return "workerPool: string expected"; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.artifactStorage != null && message.hasOwnProperty("artifactStorage")) + if (!$util.isString(message.artifactStorage)) + return "artifactStorage: string expected"; return null; }; /** - * Creates a ListTargetsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PrivatePool message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.ListTargetsRequest + * @memberof google.cloud.deploy.v1.PrivatePool * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.ListTargetsRequest} ListTargetsRequest + * @returns {google.cloud.deploy.v1.PrivatePool} PrivatePool */ - ListTargetsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.ListTargetsRequest) + PrivatePool.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.PrivatePool) return object; - var message = new $root.google.cloud.deploy.v1.ListTargetsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); + var message = new $root.google.cloud.deploy.v1.PrivatePool(); + if (object.workerPool != null) + message.workerPool = String(object.workerPool); + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.artifactStorage != null) + message.artifactStorage = String(object.artifactStorage); return message; }; /** - * Creates a plain object from a ListTargetsRequest message. Also converts values to other types if specified. + * Creates a plain object from a PrivatePool message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.ListTargetsRequest + * @memberof google.cloud.deploy.v1.PrivatePool * @static - * @param {google.cloud.deploy.v1.ListTargetsRequest} message ListTargetsRequest + * @param {google.cloud.deploy.v1.PrivatePool} message PrivatePool * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListTargetsRequest.toObject = function toObject(message, options) { + PrivatePool.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; + object.workerPool = ""; + object.serviceAccount = ""; + object.artifactStorage = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; + if (message.workerPool != null && message.hasOwnProperty("workerPool")) + object.workerPool = message.workerPool; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.artifactStorage != null && message.hasOwnProperty("artifactStorage")) + object.artifactStorage = message.artifactStorage; return object; }; /** - * Converts this ListTargetsRequest to JSON. + * Converts this PrivatePool to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.ListTargetsRequest + * @memberof google.cloud.deploy.v1.PrivatePool * @instance * @returns {Object.} JSON object */ - ListTargetsRequest.prototype.toJSON = function toJSON() { + PrivatePool.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListTargetsRequest + * Gets the default type url for PrivatePool * @function getTypeUrl - * @memberof google.cloud.deploy.v1.ListTargetsRequest + * @memberof google.cloud.deploy.v1.PrivatePool * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListTargetsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PrivatePool.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.ListTargetsRequest"; + return typeUrlPrefix + "/google.cloud.deploy.v1.PrivatePool"; }; - return ListTargetsRequest; + return PrivatePool; })(); - v1.ListTargetsResponse = (function() { + v1.GkeCluster = (function() { /** - * Properties of a ListTargetsResponse. + * Properties of a GkeCluster. * @memberof google.cloud.deploy.v1 - * @interface IListTargetsResponse - * @property {Array.|null} [targets] ListTargetsResponse targets - * @property {string|null} [nextPageToken] ListTargetsResponse nextPageToken - * @property {Array.|null} [unreachable] ListTargetsResponse unreachable + * @interface IGkeCluster + * @property {string|null} [cluster] GkeCluster cluster + * @property {boolean|null} [internalIp] GkeCluster internalIp */ /** - * Constructs a new ListTargetsResponse. + * Constructs a new GkeCluster. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a ListTargetsResponse. - * @implements IListTargetsResponse + * @classdesc Represents a GkeCluster. + * @implements IGkeCluster * @constructor - * @param {google.cloud.deploy.v1.IListTargetsResponse=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IGkeCluster=} [properties] Properties to set */ - function ListTargetsResponse(properties) { - this.targets = []; - this.unreachable = []; + function GkeCluster(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6407,109 +6362,89 @@ } /** - * ListTargetsResponse targets. - * @member {Array.} targets - * @memberof google.cloud.deploy.v1.ListTargetsResponse - * @instance - */ - ListTargetsResponse.prototype.targets = $util.emptyArray; - - /** - * ListTargetsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.deploy.v1.ListTargetsResponse + * GkeCluster cluster. + * @member {string} cluster + * @memberof google.cloud.deploy.v1.GkeCluster * @instance */ - ListTargetsResponse.prototype.nextPageToken = ""; + GkeCluster.prototype.cluster = ""; /** - * ListTargetsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.deploy.v1.ListTargetsResponse + * GkeCluster internalIp. + * @member {boolean} internalIp + * @memberof google.cloud.deploy.v1.GkeCluster * @instance */ - ListTargetsResponse.prototype.unreachable = $util.emptyArray; + GkeCluster.prototype.internalIp = false; /** - * Creates a new ListTargetsResponse instance using the specified properties. + * Creates a new GkeCluster instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.ListTargetsResponse + * @memberof google.cloud.deploy.v1.GkeCluster * @static - * @param {google.cloud.deploy.v1.IListTargetsResponse=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.ListTargetsResponse} ListTargetsResponse instance + * @param {google.cloud.deploy.v1.IGkeCluster=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.GkeCluster} GkeCluster instance */ - ListTargetsResponse.create = function create(properties) { - return new ListTargetsResponse(properties); + GkeCluster.create = function create(properties) { + return new GkeCluster(properties); }; /** - * Encodes the specified ListTargetsResponse message. Does not implicitly {@link google.cloud.deploy.v1.ListTargetsResponse.verify|verify} messages. + * Encodes the specified GkeCluster message. Does not implicitly {@link google.cloud.deploy.v1.GkeCluster.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.ListTargetsResponse + * @memberof google.cloud.deploy.v1.GkeCluster * @static - * @param {google.cloud.deploy.v1.IListTargetsResponse} message ListTargetsResponse message or plain object to encode + * @param {google.cloud.deploy.v1.IGkeCluster} message GkeCluster message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTargetsResponse.encode = function encode(message, writer) { + GkeCluster.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.targets != null && message.targets.length) - for (var i = 0; i < message.targets.length; ++i) - $root.google.cloud.deploy.v1.Target.encode(message.targets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + if (message.cluster != null && Object.hasOwnProperty.call(message, "cluster")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cluster); + if (message.internalIp != null && Object.hasOwnProperty.call(message, "internalIp")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.internalIp); return writer; }; /** - * Encodes the specified ListTargetsResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListTargetsResponse.verify|verify} messages. + * Encodes the specified GkeCluster message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GkeCluster.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.ListTargetsResponse + * @memberof google.cloud.deploy.v1.GkeCluster * @static - * @param {google.cloud.deploy.v1.IListTargetsResponse} message ListTargetsResponse message or plain object to encode + * @param {google.cloud.deploy.v1.IGkeCluster} message GkeCluster message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTargetsResponse.encodeDelimited = function encodeDelimited(message, writer) { + GkeCluster.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListTargetsResponse message from the specified reader or buffer. + * Decodes a GkeCluster message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.ListTargetsResponse + * @memberof google.cloud.deploy.v1.GkeCluster * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.ListTargetsResponse} ListTargetsResponse + * @returns {google.cloud.deploy.v1.GkeCluster} GkeCluster * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTargetsResponse.decode = function decode(reader, length) { + GkeCluster.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListTargetsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.GkeCluster(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.targets && message.targets.length)) - message.targets = []; - message.targets.push($root.google.cloud.deploy.v1.Target.decode(reader, reader.uint32())); + message.cluster = reader.string(); break; } case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); + message.internalIp = reader.bool(); break; } default: @@ -6521,169 +6456,131 @@ }; /** - * Decodes a ListTargetsResponse message from the specified reader or buffer, length delimited. + * Decodes a GkeCluster message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.ListTargetsResponse + * @memberof google.cloud.deploy.v1.GkeCluster * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.ListTargetsResponse} ListTargetsResponse + * @returns {google.cloud.deploy.v1.GkeCluster} GkeCluster * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTargetsResponse.decodeDelimited = function decodeDelimited(reader) { + GkeCluster.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListTargetsResponse message. + * Verifies a GkeCluster message. * @function verify - * @memberof google.cloud.deploy.v1.ListTargetsResponse + * @memberof google.cloud.deploy.v1.GkeCluster * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListTargetsResponse.verify = function verify(message) { + GkeCluster.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.targets != null && message.hasOwnProperty("targets")) { - if (!Array.isArray(message.targets)) - return "targets: array expected"; - for (var i = 0; i < message.targets.length; ++i) { - var error = $root.google.cloud.deploy.v1.Target.verify(message.targets[i]); - if (error) - return "targets." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } + if (message.cluster != null && message.hasOwnProperty("cluster")) + if (!$util.isString(message.cluster)) + return "cluster: string expected"; + if (message.internalIp != null && message.hasOwnProperty("internalIp")) + if (typeof message.internalIp !== "boolean") + return "internalIp: boolean expected"; return null; }; /** - * Creates a ListTargetsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GkeCluster message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.ListTargetsResponse + * @memberof google.cloud.deploy.v1.GkeCluster * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.ListTargetsResponse} ListTargetsResponse + * @returns {google.cloud.deploy.v1.GkeCluster} GkeCluster */ - ListTargetsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.ListTargetsResponse) + GkeCluster.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.GkeCluster) return object; - var message = new $root.google.cloud.deploy.v1.ListTargetsResponse(); - if (object.targets) { - if (!Array.isArray(object.targets)) - throw TypeError(".google.cloud.deploy.v1.ListTargetsResponse.targets: array expected"); - message.targets = []; - for (var i = 0; i < object.targets.length; ++i) { - if (typeof object.targets[i] !== "object") - throw TypeError(".google.cloud.deploy.v1.ListTargetsResponse.targets: object expected"); - message.targets[i] = $root.google.cloud.deploy.v1.Target.fromObject(object.targets[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.deploy.v1.ListTargetsResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } + var message = new $root.google.cloud.deploy.v1.GkeCluster(); + if (object.cluster != null) + message.cluster = String(object.cluster); + if (object.internalIp != null) + message.internalIp = Boolean(object.internalIp); return message; }; /** - * Creates a plain object from a ListTargetsResponse message. Also converts values to other types if specified. + * Creates a plain object from a GkeCluster message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.ListTargetsResponse + * @memberof google.cloud.deploy.v1.GkeCluster * @static - * @param {google.cloud.deploy.v1.ListTargetsResponse} message ListTargetsResponse + * @param {google.cloud.deploy.v1.GkeCluster} message GkeCluster * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListTargetsResponse.toObject = function toObject(message, options) { + GkeCluster.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.targets = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.targets && message.targets.length) { - object.targets = []; - for (var j = 0; j < message.targets.length; ++j) - object.targets[j] = $root.google.cloud.deploy.v1.Target.toObject(message.targets[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; + if (options.defaults) { + object.cluster = ""; + object.internalIp = false; } + if (message.cluster != null && message.hasOwnProperty("cluster")) + object.cluster = message.cluster; + if (message.internalIp != null && message.hasOwnProperty("internalIp")) + object.internalIp = message.internalIp; return object; }; /** - * Converts this ListTargetsResponse to JSON. + * Converts this GkeCluster to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.ListTargetsResponse + * @memberof google.cloud.deploy.v1.GkeCluster * @instance * @returns {Object.} JSON object */ - ListTargetsResponse.prototype.toJSON = function toJSON() { + GkeCluster.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListTargetsResponse + * Gets the default type url for GkeCluster * @function getTypeUrl - * @memberof google.cloud.deploy.v1.ListTargetsResponse + * @memberof google.cloud.deploy.v1.GkeCluster * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListTargetsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GkeCluster.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.ListTargetsResponse"; + return typeUrlPrefix + "/google.cloud.deploy.v1.GkeCluster"; }; - return ListTargetsResponse; + return GkeCluster; })(); - v1.GetTargetRequest = (function() { + v1.AnthosCluster = (function() { /** - * Properties of a GetTargetRequest. + * Properties of an AnthosCluster. * @memberof google.cloud.deploy.v1 - * @interface IGetTargetRequest - * @property {string|null} [name] GetTargetRequest name + * @interface IAnthosCluster + * @property {string|null} [membership] AnthosCluster membership */ /** - * Constructs a new GetTargetRequest. + * Constructs a new AnthosCluster. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a GetTargetRequest. - * @implements IGetTargetRequest + * @classdesc Represents an AnthosCluster. + * @implements IAnthosCluster * @constructor - * @param {google.cloud.deploy.v1.IGetTargetRequest=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IAnthosCluster=} [properties] Properties to set */ - function GetTargetRequest(properties) { + function AnthosCluster(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6691,75 +6588,75 @@ } /** - * GetTargetRequest name. - * @member {string} name - * @memberof google.cloud.deploy.v1.GetTargetRequest + * AnthosCluster membership. + * @member {string} membership + * @memberof google.cloud.deploy.v1.AnthosCluster * @instance */ - GetTargetRequest.prototype.name = ""; + AnthosCluster.prototype.membership = ""; /** - * Creates a new GetTargetRequest instance using the specified properties. + * Creates a new AnthosCluster instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.GetTargetRequest + * @memberof google.cloud.deploy.v1.AnthosCluster * @static - * @param {google.cloud.deploy.v1.IGetTargetRequest=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.GetTargetRequest} GetTargetRequest instance + * @param {google.cloud.deploy.v1.IAnthosCluster=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.AnthosCluster} AnthosCluster instance */ - GetTargetRequest.create = function create(properties) { - return new GetTargetRequest(properties); + AnthosCluster.create = function create(properties) { + return new AnthosCluster(properties); }; /** - * Encodes the specified GetTargetRequest message. Does not implicitly {@link google.cloud.deploy.v1.GetTargetRequest.verify|verify} messages. + * Encodes the specified AnthosCluster message. Does not implicitly {@link google.cloud.deploy.v1.AnthosCluster.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.GetTargetRequest + * @memberof google.cloud.deploy.v1.AnthosCluster * @static - * @param {google.cloud.deploy.v1.IGetTargetRequest} message GetTargetRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IAnthosCluster} message AnthosCluster message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTargetRequest.encode = function encode(message, writer) { + AnthosCluster.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.membership != null && Object.hasOwnProperty.call(message, "membership")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.membership); return writer; }; /** - * Encodes the specified GetTargetRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GetTargetRequest.verify|verify} messages. + * Encodes the specified AnthosCluster message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AnthosCluster.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.GetTargetRequest + * @memberof google.cloud.deploy.v1.AnthosCluster * @static - * @param {google.cloud.deploy.v1.IGetTargetRequest} message GetTargetRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IAnthosCluster} message AnthosCluster message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTargetRequest.encodeDelimited = function encodeDelimited(message, writer) { + AnthosCluster.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetTargetRequest message from the specified reader or buffer. + * Decodes an AnthosCluster message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.GetTargetRequest + * @memberof google.cloud.deploy.v1.AnthosCluster * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.GetTargetRequest} GetTargetRequest + * @returns {google.cloud.deploy.v1.AnthosCluster} AnthosCluster * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTargetRequest.decode = function decode(reader, length) { + AnthosCluster.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.GetTargetRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.AnthosCluster(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.membership = reader.string(); break; } default: @@ -6771,126 +6668,122 @@ }; /** - * Decodes a GetTargetRequest message from the specified reader or buffer, length delimited. + * Decodes an AnthosCluster message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.GetTargetRequest + * @memberof google.cloud.deploy.v1.AnthosCluster * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.GetTargetRequest} GetTargetRequest + * @returns {google.cloud.deploy.v1.AnthosCluster} AnthosCluster * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTargetRequest.decodeDelimited = function decodeDelimited(reader) { + AnthosCluster.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetTargetRequest message. + * Verifies an AnthosCluster message. * @function verify - * @memberof google.cloud.deploy.v1.GetTargetRequest + * @memberof google.cloud.deploy.v1.AnthosCluster * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetTargetRequest.verify = function verify(message) { + AnthosCluster.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.membership != null && message.hasOwnProperty("membership")) + if (!$util.isString(message.membership)) + return "membership: string expected"; return null; }; /** - * Creates a GetTargetRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AnthosCluster message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.GetTargetRequest + * @memberof google.cloud.deploy.v1.AnthosCluster * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.GetTargetRequest} GetTargetRequest + * @returns {google.cloud.deploy.v1.AnthosCluster} AnthosCluster */ - GetTargetRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.GetTargetRequest) + AnthosCluster.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.AnthosCluster) return object; - var message = new $root.google.cloud.deploy.v1.GetTargetRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.deploy.v1.AnthosCluster(); + if (object.membership != null) + message.membership = String(object.membership); return message; }; /** - * Creates a plain object from a GetTargetRequest message. Also converts values to other types if specified. + * Creates a plain object from an AnthosCluster message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.GetTargetRequest + * @memberof google.cloud.deploy.v1.AnthosCluster * @static - * @param {google.cloud.deploy.v1.GetTargetRequest} message GetTargetRequest + * @param {google.cloud.deploy.v1.AnthosCluster} message AnthosCluster * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetTargetRequest.toObject = function toObject(message, options) { + AnthosCluster.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + object.membership = ""; + if (message.membership != null && message.hasOwnProperty("membership")) + object.membership = message.membership; return object; }; /** - * Converts this GetTargetRequest to JSON. + * Converts this AnthosCluster to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.GetTargetRequest + * @memberof google.cloud.deploy.v1.AnthosCluster * @instance * @returns {Object.} JSON object */ - GetTargetRequest.prototype.toJSON = function toJSON() { + AnthosCluster.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetTargetRequest + * Gets the default type url for AnthosCluster * @function getTypeUrl - * @memberof google.cloud.deploy.v1.GetTargetRequest + * @memberof google.cloud.deploy.v1.AnthosCluster * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetTargetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AnthosCluster.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.GetTargetRequest"; + return typeUrlPrefix + "/google.cloud.deploy.v1.AnthosCluster"; }; - return GetTargetRequest; + return AnthosCluster; })(); - v1.CreateTargetRequest = (function() { + v1.CloudRunLocation = (function() { /** - * Properties of a CreateTargetRequest. + * Properties of a CloudRunLocation. * @memberof google.cloud.deploy.v1 - * @interface ICreateTargetRequest - * @property {string|null} [parent] CreateTargetRequest parent - * @property {string|null} [targetId] CreateTargetRequest targetId - * @property {google.cloud.deploy.v1.ITarget|null} [target] CreateTargetRequest target - * @property {string|null} [requestId] CreateTargetRequest requestId - * @property {boolean|null} [validateOnly] CreateTargetRequest validateOnly + * @interface ICloudRunLocation + * @property {string|null} [location] CloudRunLocation location */ /** - * Constructs a new CreateTargetRequest. + * Constructs a new CloudRunLocation. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a CreateTargetRequest. - * @implements ICreateTargetRequest + * @classdesc Represents a CloudRunLocation. + * @implements ICloudRunLocation * @constructor - * @param {google.cloud.deploy.v1.ICreateTargetRequest=} [properties] Properties to set + * @param {google.cloud.deploy.v1.ICloudRunLocation=} [properties] Properties to set */ - function CreateTargetRequest(properties) { + function CloudRunLocation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6898,131 +6791,75 @@ } /** - * CreateTargetRequest parent. - * @member {string} parent - * @memberof google.cloud.deploy.v1.CreateTargetRequest - * @instance - */ - CreateTargetRequest.prototype.parent = ""; - - /** - * CreateTargetRequest targetId. - * @member {string} targetId - * @memberof google.cloud.deploy.v1.CreateTargetRequest - * @instance - */ - CreateTargetRequest.prototype.targetId = ""; - - /** - * CreateTargetRequest target. - * @member {google.cloud.deploy.v1.ITarget|null|undefined} target - * @memberof google.cloud.deploy.v1.CreateTargetRequest - * @instance - */ - CreateTargetRequest.prototype.target = null; - - /** - * CreateTargetRequest requestId. - * @member {string} requestId - * @memberof google.cloud.deploy.v1.CreateTargetRequest - * @instance - */ - CreateTargetRequest.prototype.requestId = ""; - - /** - * CreateTargetRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.deploy.v1.CreateTargetRequest + * CloudRunLocation location. + * @member {string} location + * @memberof google.cloud.deploy.v1.CloudRunLocation * @instance */ - CreateTargetRequest.prototype.validateOnly = false; + CloudRunLocation.prototype.location = ""; /** - * Creates a new CreateTargetRequest instance using the specified properties. + * Creates a new CloudRunLocation instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @memberof google.cloud.deploy.v1.CloudRunLocation * @static - * @param {google.cloud.deploy.v1.ICreateTargetRequest=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.CreateTargetRequest} CreateTargetRequest instance + * @param {google.cloud.deploy.v1.ICloudRunLocation=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.CloudRunLocation} CloudRunLocation instance */ - CreateTargetRequest.create = function create(properties) { - return new CreateTargetRequest(properties); + CloudRunLocation.create = function create(properties) { + return new CloudRunLocation(properties); }; /** - * Encodes the specified CreateTargetRequest message. Does not implicitly {@link google.cloud.deploy.v1.CreateTargetRequest.verify|verify} messages. + * Encodes the specified CloudRunLocation message. Does not implicitly {@link google.cloud.deploy.v1.CloudRunLocation.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @memberof google.cloud.deploy.v1.CloudRunLocation * @static - * @param {google.cloud.deploy.v1.ICreateTargetRequest} message CreateTargetRequest message or plain object to encode + * @param {google.cloud.deploy.v1.ICloudRunLocation} message CloudRunLocation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTargetRequest.encode = function encode(message, writer) { + CloudRunLocation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.targetId != null && Object.hasOwnProperty.call(message, "targetId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.targetId); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.google.cloud.deploy.v1.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.location); return writer; }; /** - * Encodes the specified CreateTargetRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CreateTargetRequest.verify|verify} messages. + * Encodes the specified CloudRunLocation message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CloudRunLocation.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @memberof google.cloud.deploy.v1.CloudRunLocation * @static - * @param {google.cloud.deploy.v1.ICreateTargetRequest} message CreateTargetRequest message or plain object to encode + * @param {google.cloud.deploy.v1.ICloudRunLocation} message CloudRunLocation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTargetRequest.encodeDelimited = function encodeDelimited(message, writer) { + CloudRunLocation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateTargetRequest message from the specified reader or buffer. + * Decodes a CloudRunLocation message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @memberof google.cloud.deploy.v1.CloudRunLocation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.CreateTargetRequest} CreateTargetRequest + * @returns {google.cloud.deploy.v1.CloudRunLocation} CloudRunLocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTargetRequest.decode = function decode(reader, length) { + CloudRunLocation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.CreateTargetRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.CloudRunLocation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.targetId = reader.string(); - break; - } - case 3: { - message.target = $root.google.cloud.deploy.v1.Target.decode(reader, reader.uint32()); - break; - } - case 4: { - message.requestId = reader.string(); - break; - } - case 5: { - message.validateOnly = reader.bool(); + message.location = reader.string(); break; } default: @@ -7034,164 +6871,126 @@ }; /** - * Decodes a CreateTargetRequest message from the specified reader or buffer, length delimited. + * Decodes a CloudRunLocation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @memberof google.cloud.deploy.v1.CloudRunLocation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.CreateTargetRequest} CreateTargetRequest + * @returns {google.cloud.deploy.v1.CloudRunLocation} CloudRunLocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTargetRequest.decodeDelimited = function decodeDelimited(reader) { + CloudRunLocation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateTargetRequest message. + * Verifies a CloudRunLocation message. * @function verify - * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @memberof google.cloud.deploy.v1.CloudRunLocation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateTargetRequest.verify = function verify(message) { + CloudRunLocation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.targetId != null && message.hasOwnProperty("targetId")) - if (!$util.isString(message.targetId)) - return "targetId: string expected"; - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.google.cloud.deploy.v1.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; return null; }; /** - * Creates a CreateTargetRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CloudRunLocation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @memberof google.cloud.deploy.v1.CloudRunLocation * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.CreateTargetRequest} CreateTargetRequest + * @returns {google.cloud.deploy.v1.CloudRunLocation} CloudRunLocation */ - CreateTargetRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.CreateTargetRequest) + CloudRunLocation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.CloudRunLocation) return object; - var message = new $root.google.cloud.deploy.v1.CreateTargetRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.targetId != null) - message.targetId = String(object.targetId); - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".google.cloud.deploy.v1.CreateTargetRequest.target: object expected"); - message.target = $root.google.cloud.deploy.v1.Target.fromObject(object.target); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); + var message = new $root.google.cloud.deploy.v1.CloudRunLocation(); + if (object.location != null) + message.location = String(object.location); return message; }; /** - * Creates a plain object from a CreateTargetRequest message. Also converts values to other types if specified. + * Creates a plain object from a CloudRunLocation message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @memberof google.cloud.deploy.v1.CloudRunLocation * @static - * @param {google.cloud.deploy.v1.CreateTargetRequest} message CreateTargetRequest + * @param {google.cloud.deploy.v1.CloudRunLocation} message CloudRunLocation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateTargetRequest.toObject = function toObject(message, options) { + CloudRunLocation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.targetId = ""; - object.target = null; - object.requestId = ""; - object.validateOnly = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.targetId != null && message.hasOwnProperty("targetId")) - object.targetId = message.targetId; - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.google.cloud.deploy.v1.Target.toObject(message.target, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; + if (options.defaults) + object.location = ""; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; return object; }; /** - * Converts this CreateTargetRequest to JSON. + * Converts this CloudRunLocation to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @memberof google.cloud.deploy.v1.CloudRunLocation * @instance * @returns {Object.} JSON object */ - CreateTargetRequest.prototype.toJSON = function toJSON() { + CloudRunLocation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateTargetRequest + * Gets the default type url for CloudRunLocation * @function getTypeUrl - * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @memberof google.cloud.deploy.v1.CloudRunLocation * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateTargetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CloudRunLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.CreateTargetRequest"; + return typeUrlPrefix + "/google.cloud.deploy.v1.CloudRunLocation"; }; - return CreateTargetRequest; + return CloudRunLocation; })(); - v1.UpdateTargetRequest = (function() { + v1.ListTargetsRequest = (function() { /** - * Properties of an UpdateTargetRequest. + * Properties of a ListTargetsRequest. * @memberof google.cloud.deploy.v1 - * @interface IUpdateTargetRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTargetRequest updateMask - * @property {google.cloud.deploy.v1.ITarget|null} [target] UpdateTargetRequest target - * @property {string|null} [requestId] UpdateTargetRequest requestId - * @property {boolean|null} [allowMissing] UpdateTargetRequest allowMissing - * @property {boolean|null} [validateOnly] UpdateTargetRequest validateOnly + * @interface IListTargetsRequest + * @property {string|null} [parent] ListTargetsRequest parent + * @property {number|null} [pageSize] ListTargetsRequest pageSize + * @property {string|null} [pageToken] ListTargetsRequest pageToken + * @property {string|null} [filter] ListTargetsRequest filter + * @property {string|null} [orderBy] ListTargetsRequest orderBy */ /** - * Constructs a new UpdateTargetRequest. + * Constructs a new ListTargetsRequest. * @memberof google.cloud.deploy.v1 - * @classdesc Represents an UpdateTargetRequest. - * @implements IUpdateTargetRequest + * @classdesc Represents a ListTargetsRequest. + * @implements IListTargetsRequest * @constructor - * @param {google.cloud.deploy.v1.IUpdateTargetRequest=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IListTargetsRequest=} [properties] Properties to set */ - function UpdateTargetRequest(properties) { + function ListTargetsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7199,131 +6998,131 @@ } /** - * UpdateTargetRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * ListTargetsRequest parent. + * @member {string} parent + * @memberof google.cloud.deploy.v1.ListTargetsRequest * @instance */ - UpdateTargetRequest.prototype.updateMask = null; + ListTargetsRequest.prototype.parent = ""; /** - * UpdateTargetRequest target. - * @member {google.cloud.deploy.v1.ITarget|null|undefined} target - * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * ListTargetsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.deploy.v1.ListTargetsRequest * @instance */ - UpdateTargetRequest.prototype.target = null; + ListTargetsRequest.prototype.pageSize = 0; /** - * UpdateTargetRequest requestId. - * @member {string} requestId - * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * ListTargetsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.deploy.v1.ListTargetsRequest * @instance */ - UpdateTargetRequest.prototype.requestId = ""; + ListTargetsRequest.prototype.pageToken = ""; /** - * UpdateTargetRequest allowMissing. - * @member {boolean} allowMissing - * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * ListTargetsRequest filter. + * @member {string} filter + * @memberof google.cloud.deploy.v1.ListTargetsRequest * @instance */ - UpdateTargetRequest.prototype.allowMissing = false; + ListTargetsRequest.prototype.filter = ""; /** - * UpdateTargetRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * ListTargetsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.deploy.v1.ListTargetsRequest * @instance */ - UpdateTargetRequest.prototype.validateOnly = false; + ListTargetsRequest.prototype.orderBy = ""; /** - * Creates a new UpdateTargetRequest instance using the specified properties. + * Creates a new ListTargetsRequest instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @memberof google.cloud.deploy.v1.ListTargetsRequest * @static - * @param {google.cloud.deploy.v1.IUpdateTargetRequest=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.UpdateTargetRequest} UpdateTargetRequest instance + * @param {google.cloud.deploy.v1.IListTargetsRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ListTargetsRequest} ListTargetsRequest instance */ - UpdateTargetRequest.create = function create(properties) { - return new UpdateTargetRequest(properties); + ListTargetsRequest.create = function create(properties) { + return new ListTargetsRequest(properties); }; /** - * Encodes the specified UpdateTargetRequest message. Does not implicitly {@link google.cloud.deploy.v1.UpdateTargetRequest.verify|verify} messages. + * Encodes the specified ListTargetsRequest message. Does not implicitly {@link google.cloud.deploy.v1.ListTargetsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @memberof google.cloud.deploy.v1.ListTargetsRequest * @static - * @param {google.cloud.deploy.v1.IUpdateTargetRequest} message UpdateTargetRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IListTargetsRequest} message ListTargetsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateTargetRequest.encode = function encode(message, writer) { + ListTargetsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.google.cloud.deploy.v1.Target.encode(message.target, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); - if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.allowMissing); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; /** - * Encodes the specified UpdateTargetRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.UpdateTargetRequest.verify|verify} messages. + * Encodes the specified ListTargetsRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListTargetsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @memberof google.cloud.deploy.v1.ListTargetsRequest * @static - * @param {google.cloud.deploy.v1.IUpdateTargetRequest} message UpdateTargetRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IListTargetsRequest} message ListTargetsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateTargetRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListTargetsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateTargetRequest message from the specified reader or buffer. + * Decodes a ListTargetsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @memberof google.cloud.deploy.v1.ListTargetsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.UpdateTargetRequest} UpdateTargetRequest + * @returns {google.cloud.deploy.v1.ListTargetsRequest} ListTargetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateTargetRequest.decode = function decode(reader, length) { + ListTargetsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.UpdateTargetRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListTargetsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.parent = reader.string(); break; } case 2: { - message.target = $root.google.cloud.deploy.v1.Target.decode(reader, reader.uint32()); + message.pageSize = reader.int32(); break; } case 3: { - message.requestId = reader.string(); + message.pageToken = reader.string(); break; } case 4: { - message.allowMissing = reader.bool(); + message.filter = reader.string(); break; } case 5: { - message.validateOnly = reader.bool(); + message.orderBy = reader.string(); break; } default: @@ -7335,169 +7134,159 @@ }; /** - * Decodes an UpdateTargetRequest message from the specified reader or buffer, length delimited. + * Decodes a ListTargetsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @memberof google.cloud.deploy.v1.ListTargetsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.UpdateTargetRequest} UpdateTargetRequest + * @returns {google.cloud.deploy.v1.ListTargetsRequest} ListTargetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateTargetRequest.decodeDelimited = function decodeDelimited(reader) { + ListTargetsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateTargetRequest message. + * Verifies a ListTargetsRequest message. * @function verify - * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @memberof google.cloud.deploy.v1.ListTargetsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateTargetRequest.verify = function verify(message) { + ListTargetsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.google.cloud.deploy.v1.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) - if (typeof message.allowMissing !== "boolean") - return "allowMissing: boolean expected"; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; return null; }; /** - * Creates an UpdateTargetRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListTargetsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @memberof google.cloud.deploy.v1.ListTargetsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.UpdateTargetRequest} UpdateTargetRequest + * @returns {google.cloud.deploy.v1.ListTargetsRequest} ListTargetsRequest */ - UpdateTargetRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.UpdateTargetRequest) + ListTargetsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ListTargetsRequest) return object; - var message = new $root.google.cloud.deploy.v1.UpdateTargetRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.deploy.v1.UpdateTargetRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".google.cloud.deploy.v1.UpdateTargetRequest.target: object expected"); - message.target = $root.google.cloud.deploy.v1.Target.fromObject(object.target); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.allowMissing != null) - message.allowMissing = Boolean(object.allowMissing); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from an UpdateTargetRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.deploy.v1.UpdateTargetRequest - * @static - * @param {google.cloud.deploy.v1.UpdateTargetRequest} message UpdateTargetRequest + var message = new $root.google.cloud.deploy.v1.ListTargetsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListTargetsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.ListTargetsRequest + * @static + * @param {google.cloud.deploy.v1.ListTargetsRequest} message ListTargetsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateTargetRequest.toObject = function toObject(message, options) { + ListTargetsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.updateMask = null; - object.target = null; - object.requestId = ""; - object.allowMissing = false; - object.validateOnly = false; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.google.cloud.deploy.v1.Target.toObject(message.target, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) - object.allowMissing = message.allowMissing; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; return object; }; /** - * Converts this UpdateTargetRequest to JSON. + * Converts this ListTargetsRequest to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @memberof google.cloud.deploy.v1.ListTargetsRequest * @instance * @returns {Object.} JSON object */ - UpdateTargetRequest.prototype.toJSON = function toJSON() { + ListTargetsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateTargetRequest + * Gets the default type url for ListTargetsRequest * @function getTypeUrl - * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @memberof google.cloud.deploy.v1.ListTargetsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateTargetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListTargetsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.UpdateTargetRequest"; + return typeUrlPrefix + "/google.cloud.deploy.v1.ListTargetsRequest"; }; - return UpdateTargetRequest; + return ListTargetsRequest; })(); - v1.DeleteTargetRequest = (function() { + v1.ListTargetsResponse = (function() { /** - * Properties of a DeleteTargetRequest. + * Properties of a ListTargetsResponse. * @memberof google.cloud.deploy.v1 - * @interface IDeleteTargetRequest - * @property {string|null} [name] DeleteTargetRequest name - * @property {string|null} [requestId] DeleteTargetRequest requestId - * @property {boolean|null} [allowMissing] DeleteTargetRequest allowMissing - * @property {boolean|null} [validateOnly] DeleteTargetRequest validateOnly - * @property {string|null} [etag] DeleteTargetRequest etag + * @interface IListTargetsResponse + * @property {Array.|null} [targets] ListTargetsResponse targets + * @property {string|null} [nextPageToken] ListTargetsResponse nextPageToken + * @property {Array.|null} [unreachable] ListTargetsResponse unreachable */ /** - * Constructs a new DeleteTargetRequest. + * Constructs a new ListTargetsResponse. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a DeleteTargetRequest. - * @implements IDeleteTargetRequest + * @classdesc Represents a ListTargetsResponse. + * @implements IListTargetsResponse * @constructor - * @param {google.cloud.deploy.v1.IDeleteTargetRequest=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IListTargetsResponse=} [properties] Properties to set */ - function DeleteTargetRequest(properties) { + function ListTargetsResponse(properties) { + this.targets = []; + this.unreachable = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7505,131 +7294,109 @@ } /** - * DeleteTargetRequest name. - * @member {string} name - * @memberof google.cloud.deploy.v1.DeleteTargetRequest - * @instance - */ - DeleteTargetRequest.prototype.name = ""; - - /** - * DeleteTargetRequest requestId. - * @member {string} requestId - * @memberof google.cloud.deploy.v1.DeleteTargetRequest - * @instance - */ - DeleteTargetRequest.prototype.requestId = ""; - - /** - * DeleteTargetRequest allowMissing. - * @member {boolean} allowMissing - * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * ListTargetsResponse targets. + * @member {Array.} targets + * @memberof google.cloud.deploy.v1.ListTargetsResponse * @instance */ - DeleteTargetRequest.prototype.allowMissing = false; + ListTargetsResponse.prototype.targets = $util.emptyArray; /** - * DeleteTargetRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * ListTargetsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.deploy.v1.ListTargetsResponse * @instance */ - DeleteTargetRequest.prototype.validateOnly = false; + ListTargetsResponse.prototype.nextPageToken = ""; /** - * DeleteTargetRequest etag. - * @member {string} etag - * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * ListTargetsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.deploy.v1.ListTargetsResponse * @instance */ - DeleteTargetRequest.prototype.etag = ""; + ListTargetsResponse.prototype.unreachable = $util.emptyArray; /** - * Creates a new DeleteTargetRequest instance using the specified properties. + * Creates a new ListTargetsResponse instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @memberof google.cloud.deploy.v1.ListTargetsResponse * @static - * @param {google.cloud.deploy.v1.IDeleteTargetRequest=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.DeleteTargetRequest} DeleteTargetRequest instance + * @param {google.cloud.deploy.v1.IListTargetsResponse=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ListTargetsResponse} ListTargetsResponse instance */ - DeleteTargetRequest.create = function create(properties) { - return new DeleteTargetRequest(properties); + ListTargetsResponse.create = function create(properties) { + return new ListTargetsResponse(properties); }; /** - * Encodes the specified DeleteTargetRequest message. Does not implicitly {@link google.cloud.deploy.v1.DeleteTargetRequest.verify|verify} messages. + * Encodes the specified ListTargetsResponse message. Does not implicitly {@link google.cloud.deploy.v1.ListTargetsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @memberof google.cloud.deploy.v1.ListTargetsResponse * @static - * @param {google.cloud.deploy.v1.IDeleteTargetRequest} message DeleteTargetRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IListTargetsResponse} message ListTargetsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteTargetRequest.encode = function encode(message, writer) { + ListTargetsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); - if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowMissing); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.etag); + if (message.targets != null && message.targets.length) + for (var i = 0; i < message.targets.length; ++i) + $root.google.cloud.deploy.v1.Target.encode(message.targets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); return writer; }; /** - * Encodes the specified DeleteTargetRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeleteTargetRequest.verify|verify} messages. + * Encodes the specified ListTargetsResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListTargetsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @memberof google.cloud.deploy.v1.ListTargetsResponse * @static - * @param {google.cloud.deploy.v1.IDeleteTargetRequest} message DeleteTargetRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IListTargetsResponse} message ListTargetsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteTargetRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListTargetsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteTargetRequest message from the specified reader or buffer. + * Decodes a ListTargetsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @memberof google.cloud.deploy.v1.ListTargetsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.DeleteTargetRequest} DeleteTargetRequest + * @returns {google.cloud.deploy.v1.ListTargetsResponse} ListTargetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteTargetRequest.decode = function decode(reader, length) { + ListTargetsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.DeleteTargetRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListTargetsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.targets && message.targets.length)) + message.targets = []; + message.targets.push($root.google.cloud.deploy.v1.Target.decode(reader, reader.uint32())); break; } case 2: { - message.requestId = reader.string(); + message.nextPageToken = reader.string(); break; } case 3: { - message.allowMissing = reader.bool(); - break; - } - case 4: { - message.validateOnly = reader.bool(); - break; - } - case 5: { - message.etag = reader.string(); + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); break; } default: @@ -7641,178 +7408,169 @@ }; /** - * Decodes a DeleteTargetRequest message from the specified reader or buffer, length delimited. + * Decodes a ListTargetsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @memberof google.cloud.deploy.v1.ListTargetsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.DeleteTargetRequest} DeleteTargetRequest + * @returns {google.cloud.deploy.v1.ListTargetsResponse} ListTargetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteTargetRequest.decodeDelimited = function decodeDelimited(reader) { + ListTargetsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteTargetRequest message. + * Verifies a ListTargetsResponse message. * @function verify - * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @memberof google.cloud.deploy.v1.ListTargetsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteTargetRequest.verify = function verify(message) { + ListTargetsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) - if (typeof message.allowMissing !== "boolean") - return "allowMissing: boolean expected"; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - return null; - }; - - /** - * Creates a DeleteTargetRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.deploy.v1.DeleteTargetRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.DeleteTargetRequest} DeleteTargetRequest - */ - DeleteTargetRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.DeleteTargetRequest) - return object; - var message = new $root.google.cloud.deploy.v1.DeleteTargetRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.allowMissing != null) - message.allowMissing = Boolean(object.allowMissing); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - if (object.etag != null) - message.etag = String(object.etag); + if (message.targets != null && message.hasOwnProperty("targets")) { + if (!Array.isArray(message.targets)) + return "targets: array expected"; + for (var i = 0; i < message.targets.length; ++i) { + var error = $root.google.cloud.deploy.v1.Target.verify(message.targets[i]); + if (error) + return "targets." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListTargetsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.ListTargetsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.ListTargetsResponse} ListTargetsResponse + */ + ListTargetsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ListTargetsResponse) + return object; + var message = new $root.google.cloud.deploy.v1.ListTargetsResponse(); + if (object.targets) { + if (!Array.isArray(object.targets)) + throw TypeError(".google.cloud.deploy.v1.ListTargetsResponse.targets: array expected"); + message.targets = []; + for (var i = 0; i < object.targets.length; ++i) { + if (typeof object.targets[i] !== "object") + throw TypeError(".google.cloud.deploy.v1.ListTargetsResponse.targets: object expected"); + message.targets[i] = $root.google.cloud.deploy.v1.Target.fromObject(object.targets[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.deploy.v1.ListTargetsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } return message; }; /** - * Creates a plain object from a DeleteTargetRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListTargetsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @memberof google.cloud.deploy.v1.ListTargetsResponse * @static - * @param {google.cloud.deploy.v1.DeleteTargetRequest} message DeleteTargetRequest + * @param {google.cloud.deploy.v1.ListTargetsResponse} message ListTargetsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteTargetRequest.toObject = function toObject(message, options) { + ListTargetsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.requestId = ""; - object.allowMissing = false; - object.validateOnly = false; - object.etag = ""; + if (options.arrays || options.defaults) { + object.targets = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.targets && message.targets.length) { + object.targets = []; + for (var j = 0; j < message.targets.length; ++j) + object.targets[j] = $root.google.cloud.deploy.v1.Target.toObject(message.targets[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) - object.allowMissing = message.allowMissing; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; return object; }; /** - * Converts this DeleteTargetRequest to JSON. + * Converts this ListTargetsResponse to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @memberof google.cloud.deploy.v1.ListTargetsResponse * @instance * @returns {Object.} JSON object */ - DeleteTargetRequest.prototype.toJSON = function toJSON() { + ListTargetsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteTargetRequest + * Gets the default type url for ListTargetsResponse * @function getTypeUrl - * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @memberof google.cloud.deploy.v1.ListTargetsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteTargetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListTargetsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.DeleteTargetRequest"; + return typeUrlPrefix + "/google.cloud.deploy.v1.ListTargetsResponse"; }; - return DeleteTargetRequest; + return ListTargetsResponse; })(); - v1.Release = (function() { + v1.GetTargetRequest = (function() { /** - * Properties of a Release. + * Properties of a GetTargetRequest. * @memberof google.cloud.deploy.v1 - * @interface IRelease - * @property {string|null} [name] Release name - * @property {string|null} [uid] Release uid - * @property {string|null} [description] Release description - * @property {Object.|null} [annotations] Release annotations - * @property {Object.|null} [labels] Release labels - * @property {google.protobuf.ITimestamp|null} [createTime] Release createTime - * @property {google.protobuf.ITimestamp|null} [renderStartTime] Release renderStartTime - * @property {google.protobuf.ITimestamp|null} [renderEndTime] Release renderEndTime - * @property {string|null} [skaffoldConfigUri] Release skaffoldConfigUri - * @property {string|null} [skaffoldConfigPath] Release skaffoldConfigPath - * @property {Array.|null} [buildArtifacts] Release buildArtifacts - * @property {google.cloud.deploy.v1.IDeliveryPipeline|null} [deliveryPipelineSnapshot] Release deliveryPipelineSnapshot - * @property {Array.|null} [targetSnapshots] Release targetSnapshots - * @property {google.cloud.deploy.v1.Release.RenderState|null} [renderState] Release renderState - * @property {string|null} [etag] Release etag - * @property {string|null} [skaffoldVersion] Release skaffoldVersion - * @property {Object.|null} [targetArtifacts] Release targetArtifacts - * @property {Object.|null} [targetRenders] Release targetRenders + * @interface IGetTargetRequest + * @property {string|null} [name] GetTargetRequest name */ /** - * Constructs a new Release. + * Constructs a new GetTargetRequest. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a Release. - * @implements IRelease + * @classdesc Represents a GetTargetRequest. + * @implements IGetTargetRequest * @constructor - * @param {google.cloud.deploy.v1.IRelease=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IGetTargetRequest=} [properties] Properties to set */ - function Release(properties) { - this.annotations = {}; - this.labels = {}; - this.buildArtifacts = []; - this.targetSnapshots = []; - this.targetArtifacts = {}; - this.targetRenders = {}; + function GetTargetRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7820,403 +7578,338 @@ } /** - * Release name. + * GetTargetRequest name. * @member {string} name - * @memberof google.cloud.deploy.v1.Release + * @memberof google.cloud.deploy.v1.GetTargetRequest * @instance */ - Release.prototype.name = ""; + GetTargetRequest.prototype.name = ""; /** - * Release uid. - * @member {string} uid - * @memberof google.cloud.deploy.v1.Release - * @instance + * Creates a new GetTargetRequest instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.GetTargetRequest + * @static + * @param {google.cloud.deploy.v1.IGetTargetRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.GetTargetRequest} GetTargetRequest instance */ - Release.prototype.uid = ""; + GetTargetRequest.create = function create(properties) { + return new GetTargetRequest(properties); + }; /** - * Release description. - * @member {string} description - * @memberof google.cloud.deploy.v1.Release - * @instance + * Encodes the specified GetTargetRequest message. Does not implicitly {@link google.cloud.deploy.v1.GetTargetRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.GetTargetRequest + * @static + * @param {google.cloud.deploy.v1.IGetTargetRequest} message GetTargetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Release.prototype.description = ""; + GetTargetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; /** - * Release annotations. - * @member {Object.} annotations - * @memberof google.cloud.deploy.v1.Release - * @instance + * Encodes the specified GetTargetRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GetTargetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.GetTargetRequest + * @static + * @param {google.cloud.deploy.v1.IGetTargetRequest} message GetTargetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Release.prototype.annotations = $util.emptyObject; + GetTargetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Release labels. - * @member {Object.} labels - * @memberof google.cloud.deploy.v1.Release - * @instance + * Decodes a GetTargetRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.GetTargetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.GetTargetRequest} GetTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Release.prototype.labels = $util.emptyObject; + GetTargetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.GetTargetRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Release createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.deploy.v1.Release - * @instance + * Decodes a GetTargetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.GetTargetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.GetTargetRequest} GetTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Release.prototype.createTime = null; + GetTargetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Release renderStartTime. - * @member {google.protobuf.ITimestamp|null|undefined} renderStartTime - * @memberof google.cloud.deploy.v1.Release - * @instance + * Verifies a GetTargetRequest message. + * @function verify + * @memberof google.cloud.deploy.v1.GetTargetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Release.prototype.renderStartTime = null; + GetTargetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; /** - * Release renderEndTime. - * @member {google.protobuf.ITimestamp|null|undefined} renderEndTime - * @memberof google.cloud.deploy.v1.Release - * @instance + * Creates a GetTargetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.GetTargetRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.GetTargetRequest} GetTargetRequest */ - Release.prototype.renderEndTime = null; + GetTargetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.GetTargetRequest) + return object; + var message = new $root.google.cloud.deploy.v1.GetTargetRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; /** - * Release skaffoldConfigUri. - * @member {string} skaffoldConfigUri - * @memberof google.cloud.deploy.v1.Release - * @instance + * Creates a plain object from a GetTargetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.GetTargetRequest + * @static + * @param {google.cloud.deploy.v1.GetTargetRequest} message GetTargetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Release.prototype.skaffoldConfigUri = ""; + GetTargetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; /** - * Release skaffoldConfigPath. - * @member {string} skaffoldConfigPath - * @memberof google.cloud.deploy.v1.Release + * Converts this GetTargetRequest to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.GetTargetRequest * @instance + * @returns {Object.} JSON object */ - Release.prototype.skaffoldConfigPath = ""; + GetTargetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Release buildArtifacts. - * @member {Array.} buildArtifacts - * @memberof google.cloud.deploy.v1.Release - * @instance + * Gets the default type url for GetTargetRequest + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.GetTargetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - Release.prototype.buildArtifacts = $util.emptyArray; + GetTargetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.GetTargetRequest"; + }; + + return GetTargetRequest; + })(); + + v1.CreateTargetRequest = (function() { /** - * Release deliveryPipelineSnapshot. - * @member {google.cloud.deploy.v1.IDeliveryPipeline|null|undefined} deliveryPipelineSnapshot - * @memberof google.cloud.deploy.v1.Release - * @instance + * Properties of a CreateTargetRequest. + * @memberof google.cloud.deploy.v1 + * @interface ICreateTargetRequest + * @property {string|null} [parent] CreateTargetRequest parent + * @property {string|null} [targetId] CreateTargetRequest targetId + * @property {google.cloud.deploy.v1.ITarget|null} [target] CreateTargetRequest target + * @property {string|null} [requestId] CreateTargetRequest requestId + * @property {boolean|null} [validateOnly] CreateTargetRequest validateOnly */ - Release.prototype.deliveryPipelineSnapshot = null; /** - * Release targetSnapshots. - * @member {Array.} targetSnapshots - * @memberof google.cloud.deploy.v1.Release - * @instance + * Constructs a new CreateTargetRequest. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a CreateTargetRequest. + * @implements ICreateTargetRequest + * @constructor + * @param {google.cloud.deploy.v1.ICreateTargetRequest=} [properties] Properties to set */ - Release.prototype.targetSnapshots = $util.emptyArray; + function CreateTargetRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Release renderState. - * @member {google.cloud.deploy.v1.Release.RenderState} renderState - * @memberof google.cloud.deploy.v1.Release + * CreateTargetRequest parent. + * @member {string} parent + * @memberof google.cloud.deploy.v1.CreateTargetRequest * @instance */ - Release.prototype.renderState = 0; + CreateTargetRequest.prototype.parent = ""; /** - * Release etag. - * @member {string} etag - * @memberof google.cloud.deploy.v1.Release + * CreateTargetRequest targetId. + * @member {string} targetId + * @memberof google.cloud.deploy.v1.CreateTargetRequest * @instance */ - Release.prototype.etag = ""; + CreateTargetRequest.prototype.targetId = ""; /** - * Release skaffoldVersion. - * @member {string} skaffoldVersion - * @memberof google.cloud.deploy.v1.Release + * CreateTargetRequest target. + * @member {google.cloud.deploy.v1.ITarget|null|undefined} target + * @memberof google.cloud.deploy.v1.CreateTargetRequest * @instance */ - Release.prototype.skaffoldVersion = ""; + CreateTargetRequest.prototype.target = null; /** - * Release targetArtifacts. - * @member {Object.} targetArtifacts - * @memberof google.cloud.deploy.v1.Release + * CreateTargetRequest requestId. + * @member {string} requestId + * @memberof google.cloud.deploy.v1.CreateTargetRequest * @instance */ - Release.prototype.targetArtifacts = $util.emptyObject; + CreateTargetRequest.prototype.requestId = ""; /** - * Release targetRenders. - * @member {Object.} targetRenders - * @memberof google.cloud.deploy.v1.Release + * CreateTargetRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.deploy.v1.CreateTargetRequest * @instance */ - Release.prototype.targetRenders = $util.emptyObject; + CreateTargetRequest.prototype.validateOnly = false; /** - * Creates a new Release instance using the specified properties. + * Creates a new CreateTargetRequest instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.Release + * @memberof google.cloud.deploy.v1.CreateTargetRequest * @static - * @param {google.cloud.deploy.v1.IRelease=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.Release} Release instance + * @param {google.cloud.deploy.v1.ICreateTargetRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.CreateTargetRequest} CreateTargetRequest instance */ - Release.create = function create(properties) { - return new Release(properties); + CreateTargetRequest.create = function create(properties) { + return new CreateTargetRequest(properties); }; /** - * Encodes the specified Release message. Does not implicitly {@link google.cloud.deploy.v1.Release.verify|verify} messages. + * Encodes the specified CreateTargetRequest message. Does not implicitly {@link google.cloud.deploy.v1.CreateTargetRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.Release + * @memberof google.cloud.deploy.v1.CreateTargetRequest * @static - * @param {google.cloud.deploy.v1.IRelease} message Release message or plain object to encode + * @param {google.cloud.deploy.v1.ICreateTargetRequest} message CreateTargetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Release.encode = function encode(message, writer) { + CreateTargetRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) - for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.renderStartTime != null && Object.hasOwnProperty.call(message, "renderStartTime")) - $root.google.protobuf.Timestamp.encode(message.renderStartTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.renderEndTime != null && Object.hasOwnProperty.call(message, "renderEndTime")) - $root.google.protobuf.Timestamp.encode(message.renderEndTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.skaffoldConfigPath != null && Object.hasOwnProperty.call(message, "skaffoldConfigPath")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.skaffoldConfigPath); - if (message.buildArtifacts != null && message.buildArtifacts.length) - for (var i = 0; i < message.buildArtifacts.length; ++i) - $root.google.cloud.deploy.v1.BuildArtifact.encode(message.buildArtifacts[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.deliveryPipelineSnapshot != null && Object.hasOwnProperty.call(message, "deliveryPipelineSnapshot")) - $root.google.cloud.deploy.v1.DeliveryPipeline.encode(message.deliveryPipelineSnapshot, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.targetSnapshots != null && message.targetSnapshots.length) - for (var i = 0; i < message.targetSnapshots.length; ++i) - $root.google.cloud.deploy.v1.Target.encode(message.targetSnapshots[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.renderState != null && Object.hasOwnProperty.call(message, "renderState")) - writer.uint32(/* id 13, wireType 0 =*/104).int32(message.renderState); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 16, wireType 2 =*/130).string(message.etag); - if (message.skaffoldConfigUri != null && Object.hasOwnProperty.call(message, "skaffoldConfigUri")) - writer.uint32(/* id 17, wireType 2 =*/138).string(message.skaffoldConfigUri); - if (message.skaffoldVersion != null && Object.hasOwnProperty.call(message, "skaffoldVersion")) - writer.uint32(/* id 19, wireType 2 =*/154).string(message.skaffoldVersion); - if (message.targetArtifacts != null && Object.hasOwnProperty.call(message, "targetArtifacts")) - for (var keys = Object.keys(message.targetArtifacts), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 20, wireType 2 =*/162).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.deploy.v1.TargetArtifact.encode(message.targetArtifacts[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.targetRenders != null && Object.hasOwnProperty.call(message, "targetRenders")) - for (var keys = Object.keys(message.targetRenders), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 22, wireType 2 =*/178).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.deploy.v1.Release.TargetRender.encode(message.targetRenders[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.targetId != null && Object.hasOwnProperty.call(message, "targetId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.targetId); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.google.cloud.deploy.v1.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); return writer; }; /** - * Encodes the specified Release message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Release.verify|verify} messages. + * Encodes the specified CreateTargetRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CreateTargetRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.Release + * @memberof google.cloud.deploy.v1.CreateTargetRequest * @static - * @param {google.cloud.deploy.v1.IRelease} message Release message or plain object to encode + * @param {google.cloud.deploy.v1.ICreateTargetRequest} message CreateTargetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Release.encodeDelimited = function encodeDelimited(message, writer) { + CreateTargetRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Release message from the specified reader or buffer. + * Decodes a CreateTargetRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.Release + * @memberof google.cloud.deploy.v1.CreateTargetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.Release} Release + * @returns {google.cloud.deploy.v1.CreateTargetRequest} CreateTargetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Release.decode = function decode(reader, length) { + CreateTargetRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Release(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.CreateTargetRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.uid = reader.string(); + message.targetId = reader.string(); break; } case 3: { - message.description = reader.string(); + message.target = $root.google.cloud.deploy.v1.Target.decode(reader, reader.uint32()); break; } case 4: { - if (message.annotations === $util.emptyObject) - message.annotations = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.annotations[key] = value; + message.requestId = reader.string(); break; } case 5: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 6: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.renderStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 8: { - message.renderEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 17: { - message.skaffoldConfigUri = reader.string(); - break; - } - case 9: { - message.skaffoldConfigPath = reader.string(); - break; - } - case 10: { - if (!(message.buildArtifacts && message.buildArtifacts.length)) - message.buildArtifacts = []; - message.buildArtifacts.push($root.google.cloud.deploy.v1.BuildArtifact.decode(reader, reader.uint32())); - break; - } - case 11: { - message.deliveryPipelineSnapshot = $root.google.cloud.deploy.v1.DeliveryPipeline.decode(reader, reader.uint32()); - break; - } - case 12: { - if (!(message.targetSnapshots && message.targetSnapshots.length)) - message.targetSnapshots = []; - message.targetSnapshots.push($root.google.cloud.deploy.v1.Target.decode(reader, reader.uint32())); - break; - } - case 13: { - message.renderState = reader.int32(); - break; - } - case 16: { - message.etag = reader.string(); - break; - } - case 19: { - message.skaffoldVersion = reader.string(); - break; - } - case 20: { - if (message.targetArtifacts === $util.emptyObject) - message.targetArtifacts = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.deploy.v1.TargetArtifact.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.targetArtifacts[key] = value; - break; - } - case 22: { - if (message.targetRenders === $util.emptyObject) - message.targetRenders = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.deploy.v1.Release.TargetRender.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.targetRenders[key] = value; + message.validateOnly = reader.bool(); break; } default: @@ -8228,747 +7921,6134 @@ }; /** - * Decodes a Release message from the specified reader or buffer, length delimited. + * Decodes a CreateTargetRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.Release + * @memberof google.cloud.deploy.v1.CreateTargetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.Release} Release + * @returns {google.cloud.deploy.v1.CreateTargetRequest} CreateTargetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Release.decodeDelimited = function decodeDelimited(reader) { + CreateTargetRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Release message. + * Verifies a CreateTargetRequest message. * @function verify - * @memberof google.cloud.deploy.v1.Release + * @memberof google.cloud.deploy.v1.CreateTargetRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Release.verify = function verify(message) { + CreateTargetRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.annotations != null && message.hasOwnProperty("annotations")) { - if (!$util.isObject(message.annotations)) - return "annotations: object expected"; - var key = Object.keys(message.annotations); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.annotations[key[i]])) - return "annotations: string{k:string} expected"; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.renderStartTime != null && message.hasOwnProperty("renderStartTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.renderStartTime); - if (error) - return "renderStartTime." + error; - } - if (message.renderEndTime != null && message.hasOwnProperty("renderEndTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.renderEndTime); + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.targetId != null && message.hasOwnProperty("targetId")) + if (!$util.isString(message.targetId)) + return "targetId: string expected"; + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.google.cloud.deploy.v1.Target.verify(message.target); if (error) - return "renderEndTime." + error; + return "target." + error; } - if (message.skaffoldConfigUri != null && message.hasOwnProperty("skaffoldConfigUri")) - if (!$util.isString(message.skaffoldConfigUri)) - return "skaffoldConfigUri: string expected"; - if (message.skaffoldConfigPath != null && message.hasOwnProperty("skaffoldConfigPath")) - if (!$util.isString(message.skaffoldConfigPath)) - return "skaffoldConfigPath: string expected"; - if (message.buildArtifacts != null && message.hasOwnProperty("buildArtifacts")) { - if (!Array.isArray(message.buildArtifacts)) - return "buildArtifacts: array expected"; - for (var i = 0; i < message.buildArtifacts.length; ++i) { - var error = $root.google.cloud.deploy.v1.BuildArtifact.verify(message.buildArtifacts[i]); - if (error) - return "buildArtifacts." + error; - } - } - if (message.deliveryPipelineSnapshot != null && message.hasOwnProperty("deliveryPipelineSnapshot")) { - var error = $root.google.cloud.deploy.v1.DeliveryPipeline.verify(message.deliveryPipelineSnapshot); - if (error) - return "deliveryPipelineSnapshot." + error; - } - if (message.targetSnapshots != null && message.hasOwnProperty("targetSnapshots")) { - if (!Array.isArray(message.targetSnapshots)) - return "targetSnapshots: array expected"; - for (var i = 0; i < message.targetSnapshots.length; ++i) { - var error = $root.google.cloud.deploy.v1.Target.verify(message.targetSnapshots[i]); - if (error) - return "targetSnapshots." + error; - } - } - if (message.renderState != null && message.hasOwnProperty("renderState")) - switch (message.renderState) { - default: - return "renderState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.skaffoldVersion != null && message.hasOwnProperty("skaffoldVersion")) - if (!$util.isString(message.skaffoldVersion)) - return "skaffoldVersion: string expected"; - if (message.targetArtifacts != null && message.hasOwnProperty("targetArtifacts")) { - if (!$util.isObject(message.targetArtifacts)) - return "targetArtifacts: object expected"; - var key = Object.keys(message.targetArtifacts); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.deploy.v1.TargetArtifact.verify(message.targetArtifacts[key[i]]); - if (error) - return "targetArtifacts." + error; - } - } - if (message.targetRenders != null && message.hasOwnProperty("targetRenders")) { - if (!$util.isObject(message.targetRenders)) - return "targetRenders: object expected"; - var key = Object.keys(message.targetRenders); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.deploy.v1.Release.TargetRender.verify(message.targetRenders[key[i]]); - if (error) - return "targetRenders." + error; - } - } - return null; - }; - - /** - * Creates a Release message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.deploy.v1.Release - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.Release} Release - */ - Release.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.Release) - return object; - var message = new $root.google.cloud.deploy.v1.Release(); - if (object.name != null) - message.name = String(object.name); - if (object.uid != null) - message.uid = String(object.uid); - if (object.description != null) - message.description = String(object.description); - if (object.annotations) { - if (typeof object.annotations !== "object") - throw TypeError(".google.cloud.deploy.v1.Release.annotations: object expected"); - message.annotations = {}; - for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) - message.annotations[keys[i]] = String(object.annotations[keys[i]]); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.deploy.v1.Release.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.deploy.v1.Release.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.renderStartTime != null) { - if (typeof object.renderStartTime !== "object") - throw TypeError(".google.cloud.deploy.v1.Release.renderStartTime: object expected"); - message.renderStartTime = $root.google.protobuf.Timestamp.fromObject(object.renderStartTime); - } - if (object.renderEndTime != null) { - if (typeof object.renderEndTime !== "object") - throw TypeError(".google.cloud.deploy.v1.Release.renderEndTime: object expected"); - message.renderEndTime = $root.google.protobuf.Timestamp.fromObject(object.renderEndTime); - } - if (object.skaffoldConfigUri != null) - message.skaffoldConfigUri = String(object.skaffoldConfigUri); - if (object.skaffoldConfigPath != null) - message.skaffoldConfigPath = String(object.skaffoldConfigPath); - if (object.buildArtifacts) { - if (!Array.isArray(object.buildArtifacts)) - throw TypeError(".google.cloud.deploy.v1.Release.buildArtifacts: array expected"); - message.buildArtifacts = []; - for (var i = 0; i < object.buildArtifacts.length; ++i) { - if (typeof object.buildArtifacts[i] !== "object") - throw TypeError(".google.cloud.deploy.v1.Release.buildArtifacts: object expected"); - message.buildArtifacts[i] = $root.google.cloud.deploy.v1.BuildArtifact.fromObject(object.buildArtifacts[i]); - } - } - if (object.deliveryPipelineSnapshot != null) { - if (typeof object.deliveryPipelineSnapshot !== "object") - throw TypeError(".google.cloud.deploy.v1.Release.deliveryPipelineSnapshot: object expected"); - message.deliveryPipelineSnapshot = $root.google.cloud.deploy.v1.DeliveryPipeline.fromObject(object.deliveryPipelineSnapshot); - } - if (object.targetSnapshots) { - if (!Array.isArray(object.targetSnapshots)) - throw TypeError(".google.cloud.deploy.v1.Release.targetSnapshots: array expected"); - message.targetSnapshots = []; - for (var i = 0; i < object.targetSnapshots.length; ++i) { - if (typeof object.targetSnapshots[i] !== "object") - throw TypeError(".google.cloud.deploy.v1.Release.targetSnapshots: object expected"); - message.targetSnapshots[i] = $root.google.cloud.deploy.v1.Target.fromObject(object.targetSnapshots[i]); - } - } - switch (object.renderState) { - case "RENDER_STATE_UNSPECIFIED": - case 0: - message.renderState = 0; - break; - case "SUCCEEDED": - case 1: - message.renderState = 1; - break; - case "FAILED": - case 2: - message.renderState = 2; - break; - case "IN_PROGRESS": - case 3: - message.renderState = 3; - break; - } - if (object.etag != null) - message.etag = String(object.etag); - if (object.skaffoldVersion != null) - message.skaffoldVersion = String(object.skaffoldVersion); - if (object.targetArtifacts) { - if (typeof object.targetArtifacts !== "object") - throw TypeError(".google.cloud.deploy.v1.Release.targetArtifacts: object expected"); - message.targetArtifacts = {}; - for (var keys = Object.keys(object.targetArtifacts), i = 0; i < keys.length; ++i) { - if (typeof object.targetArtifacts[keys[i]] !== "object") - throw TypeError(".google.cloud.deploy.v1.Release.targetArtifacts: object expected"); - message.targetArtifacts[keys[i]] = $root.google.cloud.deploy.v1.TargetArtifact.fromObject(object.targetArtifacts[keys[i]]); - } - } - if (object.targetRenders) { - if (typeof object.targetRenders !== "object") - throw TypeError(".google.cloud.deploy.v1.Release.targetRenders: object expected"); - message.targetRenders = {}; - for (var keys = Object.keys(object.targetRenders), i = 0; i < keys.length; ++i) { - if (typeof object.targetRenders[keys[i]] !== "object") - throw TypeError(".google.cloud.deploy.v1.Release.targetRenders: object expected"); - message.targetRenders[keys[i]] = $root.google.cloud.deploy.v1.Release.TargetRender.fromObject(object.targetRenders[keys[i]]); - } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateTargetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.CreateTargetRequest} CreateTargetRequest + */ + CreateTargetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.CreateTargetRequest) + return object; + var message = new $root.google.cloud.deploy.v1.CreateTargetRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.targetId != null) + message.targetId = String(object.targetId); + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".google.cloud.deploy.v1.CreateTargetRequest.target: object expected"); + message.target = $root.google.cloud.deploy.v1.Target.fromObject(object.target); } + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a Release message. Also converts values to other types if specified. + * Creates a plain object from a CreateTargetRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.Release + * @memberof google.cloud.deploy.v1.CreateTargetRequest * @static - * @param {google.cloud.deploy.v1.Release} message Release + * @param {google.cloud.deploy.v1.CreateTargetRequest} message CreateTargetRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Release.toObject = function toObject(message, options) { + CreateTargetRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.buildArtifacts = []; - object.targetSnapshots = []; - } - if (options.objects || options.defaults) { - object.annotations = {}; - object.labels = {}; - object.targetArtifacts = {}; - object.targetRenders = {}; - } if (options.defaults) { - object.name = ""; - object.uid = ""; - object.description = ""; - object.createTime = null; - object.renderStartTime = null; - object.renderEndTime = null; - object.skaffoldConfigPath = ""; - object.deliveryPipelineSnapshot = null; - object.renderState = options.enums === String ? "RENDER_STATE_UNSPECIFIED" : 0; - object.etag = ""; - object.skaffoldConfigUri = ""; - object.skaffoldVersion = ""; + object.parent = ""; + object.targetId = ""; + object.target = null; + object.requestId = ""; + object.validateOnly = false; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - var keys2; - if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { - object.annotations = {}; - for (var j = 0; j < keys2.length; ++j) - object.annotations[keys2[j]] = message.annotations[keys2[j]]; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.targetId != null && message.hasOwnProperty("targetId")) + object.targetId = message.targetId; + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.google.cloud.deploy.v1.Target.toObject(message.target, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateTargetRequest to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @instance + * @returns {Object.} JSON object + */ + CreateTargetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateTargetRequest + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateTargetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.renderStartTime != null && message.hasOwnProperty("renderStartTime")) - object.renderStartTime = $root.google.protobuf.Timestamp.toObject(message.renderStartTime, options); - if (message.renderEndTime != null && message.hasOwnProperty("renderEndTime")) - object.renderEndTime = $root.google.protobuf.Timestamp.toObject(message.renderEndTime, options); - if (message.skaffoldConfigPath != null && message.hasOwnProperty("skaffoldConfigPath")) - object.skaffoldConfigPath = message.skaffoldConfigPath; - if (message.buildArtifacts && message.buildArtifacts.length) { - object.buildArtifacts = []; - for (var j = 0; j < message.buildArtifacts.length; ++j) - object.buildArtifacts[j] = $root.google.cloud.deploy.v1.BuildArtifact.toObject(message.buildArtifacts[j], options); - } - if (message.deliveryPipelineSnapshot != null && message.hasOwnProperty("deliveryPipelineSnapshot")) - object.deliveryPipelineSnapshot = $root.google.cloud.deploy.v1.DeliveryPipeline.toObject(message.deliveryPipelineSnapshot, options); - if (message.targetSnapshots && message.targetSnapshots.length) { - object.targetSnapshots = []; - for (var j = 0; j < message.targetSnapshots.length; ++j) - object.targetSnapshots[j] = $root.google.cloud.deploy.v1.Target.toObject(message.targetSnapshots[j], options); - } - if (message.renderState != null && message.hasOwnProperty("renderState")) - object.renderState = options.enums === String ? $root.google.cloud.deploy.v1.Release.RenderState[message.renderState] : message.renderState; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.skaffoldConfigUri != null && message.hasOwnProperty("skaffoldConfigUri")) - object.skaffoldConfigUri = message.skaffoldConfigUri; - if (message.skaffoldVersion != null && message.hasOwnProperty("skaffoldVersion")) - object.skaffoldVersion = message.skaffoldVersion; - if (message.targetArtifacts && (keys2 = Object.keys(message.targetArtifacts)).length) { - object.targetArtifacts = {}; - for (var j = 0; j < keys2.length; ++j) - object.targetArtifacts[keys2[j]] = $root.google.cloud.deploy.v1.TargetArtifact.toObject(message.targetArtifacts[keys2[j]], options); - } - if (message.targetRenders && (keys2 = Object.keys(message.targetRenders)).length) { - object.targetRenders = {}; - for (var j = 0; j < keys2.length; ++j) - object.targetRenders[keys2[j]] = $root.google.cloud.deploy.v1.Release.TargetRender.toObject(message.targetRenders[keys2[j]], options); - } - return object; + return typeUrlPrefix + "/google.cloud.deploy.v1.CreateTargetRequest"; }; + return CreateTargetRequest; + })(); + + v1.UpdateTargetRequest = (function() { + /** - * Converts this Release to JSON. - * @function toJSON - * @memberof google.cloud.deploy.v1.Release - * @instance - * @returns {Object.} JSON object + * Properties of an UpdateTargetRequest. + * @memberof google.cloud.deploy.v1 + * @interface IUpdateTargetRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTargetRequest updateMask + * @property {google.cloud.deploy.v1.ITarget|null} [target] UpdateTargetRequest target + * @property {string|null} [requestId] UpdateTargetRequest requestId + * @property {boolean|null} [allowMissing] UpdateTargetRequest allowMissing + * @property {boolean|null} [validateOnly] UpdateTargetRequest validateOnly */ - Release.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; /** - * Gets the default type url for Release - * @function getTypeUrl - * @memberof google.cloud.deploy.v1.Release - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Constructs a new UpdateTargetRequest. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents an UpdateTargetRequest. + * @implements IUpdateTargetRequest + * @constructor + * @param {google.cloud.deploy.v1.IUpdateTargetRequest=} [properties] Properties to set */ - Release.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.deploy.v1.Release"; - }; + function UpdateTargetRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * RenderState enum. - * @name google.cloud.deploy.v1.Release.RenderState - * @enum {number} - * @property {number} RENDER_STATE_UNSPECIFIED=0 RENDER_STATE_UNSPECIFIED value - * @property {number} SUCCEEDED=1 SUCCEEDED value - * @property {number} FAILED=2 FAILED value - * @property {number} IN_PROGRESS=3 IN_PROGRESS value + * UpdateTargetRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @instance */ - Release.RenderState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RENDER_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SUCCEEDED"] = 1; - values[valuesById[2] = "FAILED"] = 2; - values[valuesById[3] = "IN_PROGRESS"] = 3; - return values; - })(); + UpdateTargetRequest.prototype.updateMask = null; - Release.TargetRender = (function() { + /** + * UpdateTargetRequest target. + * @member {google.cloud.deploy.v1.ITarget|null|undefined} target + * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @instance + */ + UpdateTargetRequest.prototype.target = null; - /** - * Properties of a TargetRender. - * @memberof google.cloud.deploy.v1.Release - * @interface ITargetRender - * @property {string|null} [renderingBuild] TargetRender renderingBuild - * @property {google.cloud.deploy.v1.Release.TargetRender.TargetRenderState|null} [renderingState] TargetRender renderingState - * @property {google.cloud.deploy.v1.Release.TargetRender.FailureCause|null} [failureCause] TargetRender failureCause - */ + /** + * UpdateTargetRequest requestId. + * @member {string} requestId + * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @instance + */ + UpdateTargetRequest.prototype.requestId = ""; - /** - * Constructs a new TargetRender. - * @memberof google.cloud.deploy.v1.Release - * @classdesc Represents a TargetRender. - * @implements ITargetRender - * @constructor - * @param {google.cloud.deploy.v1.Release.ITargetRender=} [properties] Properties to set - */ - function TargetRender(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * UpdateTargetRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @instance + */ + UpdateTargetRequest.prototype.allowMissing = false; - /** - * TargetRender renderingBuild. - * @member {string} renderingBuild - * @memberof google.cloud.deploy.v1.Release.TargetRender - * @instance - */ - TargetRender.prototype.renderingBuild = ""; + /** + * UpdateTargetRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @instance + */ + UpdateTargetRequest.prototype.validateOnly = false; - /** - * TargetRender renderingState. - * @member {google.cloud.deploy.v1.Release.TargetRender.TargetRenderState} renderingState - * @memberof google.cloud.deploy.v1.Release.TargetRender - * @instance - */ - TargetRender.prototype.renderingState = 0; + /** + * Creates a new UpdateTargetRequest instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @static + * @param {google.cloud.deploy.v1.IUpdateTargetRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.UpdateTargetRequest} UpdateTargetRequest instance + */ + UpdateTargetRequest.create = function create(properties) { + return new UpdateTargetRequest(properties); + }; - /** - * TargetRender failureCause. - * @member {google.cloud.deploy.v1.Release.TargetRender.FailureCause} failureCause - * @memberof google.cloud.deploy.v1.Release.TargetRender - * @instance - */ - TargetRender.prototype.failureCause = 0; + /** + * Encodes the specified UpdateTargetRequest message. Does not implicitly {@link google.cloud.deploy.v1.UpdateTargetRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @static + * @param {google.cloud.deploy.v1.IUpdateTargetRequest} message UpdateTargetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateTargetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.google.cloud.deploy.v1.Target.encode(message.target, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.allowMissing); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); + return writer; + }; - /** - * Creates a new TargetRender instance using the specified properties. - * @function create - * @memberof google.cloud.deploy.v1.Release.TargetRender - * @static - * @param {google.cloud.deploy.v1.Release.ITargetRender=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.Release.TargetRender} TargetRender instance - */ - TargetRender.create = function create(properties) { - return new TargetRender(properties); - }; + /** + * Encodes the specified UpdateTargetRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.UpdateTargetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @static + * @param {google.cloud.deploy.v1.IUpdateTargetRequest} message UpdateTargetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateTargetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified TargetRender message. Does not implicitly {@link google.cloud.deploy.v1.Release.TargetRender.verify|verify} messages. - * @function encode - * @memberof google.cloud.deploy.v1.Release.TargetRender - * @static - * @param {google.cloud.deploy.v1.Release.ITargetRender} message TargetRender message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TargetRender.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.renderingBuild != null && Object.hasOwnProperty.call(message, "renderingBuild")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.renderingBuild); - if (message.renderingState != null && Object.hasOwnProperty.call(message, "renderingState")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.renderingState); - if (message.failureCause != null && Object.hasOwnProperty.call(message, "failureCause")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.failureCause); - return writer; + /** + * Decodes an UpdateTargetRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.UpdateTargetRequest} UpdateTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateTargetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.UpdateTargetRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.target = $root.google.cloud.deploy.v1.Target.decode(reader, reader.uint32()); + break; + } + case 3: { + message.requestId = reader.string(); + break; + } + case 4: { + message.allowMissing = reader.bool(); + break; + } + case 5: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateTargetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.UpdateTargetRequest} UpdateTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateTargetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateTargetRequest message. + * @function verify + * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateTargetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.google.cloud.deploy.v1.Target.verify(message.target); + if (error) + return "target." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates an UpdateTargetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.UpdateTargetRequest} UpdateTargetRequest + */ + UpdateTargetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.UpdateTargetRequest) + return object; + var message = new $root.google.cloud.deploy.v1.UpdateTargetRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.deploy.v1.UpdateTargetRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".google.cloud.deploy.v1.UpdateTargetRequest.target: object expected"); + message.target = $root.google.cloud.deploy.v1.Target.fromObject(object.target); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from an UpdateTargetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @static + * @param {google.cloud.deploy.v1.UpdateTargetRequest} message UpdateTargetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateTargetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.target = null; + object.requestId = ""; + object.allowMissing = false; + object.validateOnly = false; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.google.cloud.deploy.v1.Target.toObject(message.target, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this UpdateTargetRequest to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateTargetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateTargetRequest + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateTargetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.UpdateTargetRequest"; + }; + + return UpdateTargetRequest; + })(); + + v1.DeleteTargetRequest = (function() { + + /** + * Properties of a DeleteTargetRequest. + * @memberof google.cloud.deploy.v1 + * @interface IDeleteTargetRequest + * @property {string|null} [name] DeleteTargetRequest name + * @property {string|null} [requestId] DeleteTargetRequest requestId + * @property {boolean|null} [allowMissing] DeleteTargetRequest allowMissing + * @property {boolean|null} [validateOnly] DeleteTargetRequest validateOnly + * @property {string|null} [etag] DeleteTargetRequest etag + */ + + /** + * Constructs a new DeleteTargetRequest. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a DeleteTargetRequest. + * @implements IDeleteTargetRequest + * @constructor + * @param {google.cloud.deploy.v1.IDeleteTargetRequest=} [properties] Properties to set + */ + function DeleteTargetRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteTargetRequest name. + * @member {string} name + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @instance + */ + DeleteTargetRequest.prototype.name = ""; + + /** + * DeleteTargetRequest requestId. + * @member {string} requestId + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @instance + */ + DeleteTargetRequest.prototype.requestId = ""; + + /** + * DeleteTargetRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @instance + */ + DeleteTargetRequest.prototype.allowMissing = false; + + /** + * DeleteTargetRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @instance + */ + DeleteTargetRequest.prototype.validateOnly = false; + + /** + * DeleteTargetRequest etag. + * @member {string} etag + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @instance + */ + DeleteTargetRequest.prototype.etag = ""; + + /** + * Creates a new DeleteTargetRequest instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @static + * @param {google.cloud.deploy.v1.IDeleteTargetRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.DeleteTargetRequest} DeleteTargetRequest instance + */ + DeleteTargetRequest.create = function create(properties) { + return new DeleteTargetRequest(properties); + }; + + /** + * Encodes the specified DeleteTargetRequest message. Does not implicitly {@link google.cloud.deploy.v1.DeleteTargetRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @static + * @param {google.cloud.deploy.v1.IDeleteTargetRequest} message DeleteTargetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteTargetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowMissing); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.etag); + return writer; + }; + + /** + * Encodes the specified DeleteTargetRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeleteTargetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @static + * @param {google.cloud.deploy.v1.IDeleteTargetRequest} message DeleteTargetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteTargetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteTargetRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.DeleteTargetRequest} DeleteTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteTargetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.DeleteTargetRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.requestId = reader.string(); + break; + } + case 3: { + message.allowMissing = reader.bool(); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } + case 5: { + message.etag = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteTargetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.DeleteTargetRequest} DeleteTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteTargetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteTargetRequest message. + * @function verify + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteTargetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; + + /** + * Creates a DeleteTargetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.DeleteTargetRequest} DeleteTargetRequest + */ + DeleteTargetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.DeleteTargetRequest) + return object; + var message = new $root.google.cloud.deploy.v1.DeleteTargetRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; + + /** + * Creates a plain object from a DeleteTargetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @static + * @param {google.cloud.deploy.v1.DeleteTargetRequest} message DeleteTargetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteTargetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.requestId = ""; + object.allowMissing = false; + object.validateOnly = false; + object.etag = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + return object; + }; + + /** + * Converts this DeleteTargetRequest to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteTargetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteTargetRequest + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteTargetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.DeleteTargetRequest"; + }; + + return DeleteTargetRequest; + })(); + + v1.Release = (function() { + + /** + * Properties of a Release. + * @memberof google.cloud.deploy.v1 + * @interface IRelease + * @property {string|null} [name] Release name + * @property {string|null} [uid] Release uid + * @property {string|null} [description] Release description + * @property {Object.|null} [annotations] Release annotations + * @property {Object.|null} [labels] Release labels + * @property {boolean|null} [abandoned] Release abandoned + * @property {google.protobuf.ITimestamp|null} [createTime] Release createTime + * @property {google.protobuf.ITimestamp|null} [renderStartTime] Release renderStartTime + * @property {google.protobuf.ITimestamp|null} [renderEndTime] Release renderEndTime + * @property {string|null} [skaffoldConfigUri] Release skaffoldConfigUri + * @property {string|null} [skaffoldConfigPath] Release skaffoldConfigPath + * @property {Array.|null} [buildArtifacts] Release buildArtifacts + * @property {google.cloud.deploy.v1.IDeliveryPipeline|null} [deliveryPipelineSnapshot] Release deliveryPipelineSnapshot + * @property {Array.|null} [targetSnapshots] Release targetSnapshots + * @property {google.cloud.deploy.v1.Release.RenderState|null} [renderState] Release renderState + * @property {string|null} [etag] Release etag + * @property {string|null} [skaffoldVersion] Release skaffoldVersion + * @property {Object.|null} [targetArtifacts] Release targetArtifacts + * @property {Object.|null} [targetRenders] Release targetRenders + */ + + /** + * Constructs a new Release. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a Release. + * @implements IRelease + * @constructor + * @param {google.cloud.deploy.v1.IRelease=} [properties] Properties to set + */ + function Release(properties) { + this.annotations = {}; + this.labels = {}; + this.buildArtifacts = []; + this.targetSnapshots = []; + this.targetArtifacts = {}; + this.targetRenders = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Release name. + * @member {string} name + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.name = ""; + + /** + * Release uid. + * @member {string} uid + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.uid = ""; + + /** + * Release description. + * @member {string} description + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.description = ""; + + /** + * Release annotations. + * @member {Object.} annotations + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.annotations = $util.emptyObject; + + /** + * Release labels. + * @member {Object.} labels + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.labels = $util.emptyObject; + + /** + * Release abandoned. + * @member {boolean} abandoned + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.abandoned = false; + + /** + * Release createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.createTime = null; + + /** + * Release renderStartTime. + * @member {google.protobuf.ITimestamp|null|undefined} renderStartTime + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.renderStartTime = null; + + /** + * Release renderEndTime. + * @member {google.protobuf.ITimestamp|null|undefined} renderEndTime + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.renderEndTime = null; + + /** + * Release skaffoldConfigUri. + * @member {string} skaffoldConfigUri + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.skaffoldConfigUri = ""; + + /** + * Release skaffoldConfigPath. + * @member {string} skaffoldConfigPath + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.skaffoldConfigPath = ""; + + /** + * Release buildArtifacts. + * @member {Array.} buildArtifacts + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.buildArtifacts = $util.emptyArray; + + /** + * Release deliveryPipelineSnapshot. + * @member {google.cloud.deploy.v1.IDeliveryPipeline|null|undefined} deliveryPipelineSnapshot + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.deliveryPipelineSnapshot = null; + + /** + * Release targetSnapshots. + * @member {Array.} targetSnapshots + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.targetSnapshots = $util.emptyArray; + + /** + * Release renderState. + * @member {google.cloud.deploy.v1.Release.RenderState} renderState + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.renderState = 0; + + /** + * Release etag. + * @member {string} etag + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.etag = ""; + + /** + * Release skaffoldVersion. + * @member {string} skaffoldVersion + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.skaffoldVersion = ""; + + /** + * Release targetArtifacts. + * @member {Object.} targetArtifacts + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.targetArtifacts = $util.emptyObject; + + /** + * Release targetRenders. + * @member {Object.} targetRenders + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.targetRenders = $util.emptyObject; + + /** + * Creates a new Release instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.Release + * @static + * @param {google.cloud.deploy.v1.IRelease=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.Release} Release instance + */ + Release.create = function create(properties) { + return new Release(properties); + }; + + /** + * Encodes the specified Release message. Does not implicitly {@link google.cloud.deploy.v1.Release.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.Release + * @static + * @param {google.cloud.deploy.v1.IRelease} message Release message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Release.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) + for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.renderStartTime != null && Object.hasOwnProperty.call(message, "renderStartTime")) + $root.google.protobuf.Timestamp.encode(message.renderStartTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.renderEndTime != null && Object.hasOwnProperty.call(message, "renderEndTime")) + $root.google.protobuf.Timestamp.encode(message.renderEndTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.skaffoldConfigPath != null && Object.hasOwnProperty.call(message, "skaffoldConfigPath")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.skaffoldConfigPath); + if (message.buildArtifacts != null && message.buildArtifacts.length) + for (var i = 0; i < message.buildArtifacts.length; ++i) + $root.google.cloud.deploy.v1.BuildArtifact.encode(message.buildArtifacts[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.deliveryPipelineSnapshot != null && Object.hasOwnProperty.call(message, "deliveryPipelineSnapshot")) + $root.google.cloud.deploy.v1.DeliveryPipeline.encode(message.deliveryPipelineSnapshot, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.targetSnapshots != null && message.targetSnapshots.length) + for (var i = 0; i < message.targetSnapshots.length; ++i) + $root.google.cloud.deploy.v1.Target.encode(message.targetSnapshots[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.renderState != null && Object.hasOwnProperty.call(message, "renderState")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.renderState); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.etag); + if (message.skaffoldConfigUri != null && Object.hasOwnProperty.call(message, "skaffoldConfigUri")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.skaffoldConfigUri); + if (message.skaffoldVersion != null && Object.hasOwnProperty.call(message, "skaffoldVersion")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.skaffoldVersion); + if (message.targetArtifacts != null && Object.hasOwnProperty.call(message, "targetArtifacts")) + for (var keys = Object.keys(message.targetArtifacts), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 20, wireType 2 =*/162).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.deploy.v1.TargetArtifact.encode(message.targetArtifacts[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.targetRenders != null && Object.hasOwnProperty.call(message, "targetRenders")) + for (var keys = Object.keys(message.targetRenders), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 22, wireType 2 =*/178).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.deploy.v1.Release.TargetRender.encode(message.targetRenders[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.abandoned != null && Object.hasOwnProperty.call(message, "abandoned")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.abandoned); + return writer; + }; + + /** + * Encodes the specified Release message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Release.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.Release + * @static + * @param {google.cloud.deploy.v1.IRelease} message Release message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Release.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Release message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.Release + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.Release} Release + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Release.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Release(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.uid = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + if (message.annotations === $util.emptyObject) + message.annotations = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.annotations[key] = value; + break; + } + case 5: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 23: { + message.abandoned = reader.bool(); + break; + } + case 6: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.renderStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.renderEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 17: { + message.skaffoldConfigUri = reader.string(); + break; + } + case 9: { + message.skaffoldConfigPath = reader.string(); + break; + } + case 10: { + if (!(message.buildArtifacts && message.buildArtifacts.length)) + message.buildArtifacts = []; + message.buildArtifacts.push($root.google.cloud.deploy.v1.BuildArtifact.decode(reader, reader.uint32())); + break; + } + case 11: { + message.deliveryPipelineSnapshot = $root.google.cloud.deploy.v1.DeliveryPipeline.decode(reader, reader.uint32()); + break; + } + case 12: { + if (!(message.targetSnapshots && message.targetSnapshots.length)) + message.targetSnapshots = []; + message.targetSnapshots.push($root.google.cloud.deploy.v1.Target.decode(reader, reader.uint32())); + break; + } + case 13: { + message.renderState = reader.int32(); + break; + } + case 16: { + message.etag = reader.string(); + break; + } + case 19: { + message.skaffoldVersion = reader.string(); + break; + } + case 20: { + if (message.targetArtifacts === $util.emptyObject) + message.targetArtifacts = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.deploy.v1.TargetArtifact.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.targetArtifacts[key] = value; + break; + } + case 22: { + if (message.targetRenders === $util.emptyObject) + message.targetRenders = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.deploy.v1.Release.TargetRender.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.targetRenders[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Release message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.Release + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.Release} Release + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Release.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Release message. + * @function verify + * @memberof google.cloud.deploy.v1.Release + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Release.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.annotations != null && message.hasOwnProperty("annotations")) { + if (!$util.isObject(message.annotations)) + return "annotations: object expected"; + var key = Object.keys(message.annotations); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.annotations[key[i]])) + return "annotations: string{k:string} expected"; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.abandoned != null && message.hasOwnProperty("abandoned")) + if (typeof message.abandoned !== "boolean") + return "abandoned: boolean expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.renderStartTime != null && message.hasOwnProperty("renderStartTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.renderStartTime); + if (error) + return "renderStartTime." + error; + } + if (message.renderEndTime != null && message.hasOwnProperty("renderEndTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.renderEndTime); + if (error) + return "renderEndTime." + error; + } + if (message.skaffoldConfigUri != null && message.hasOwnProperty("skaffoldConfigUri")) + if (!$util.isString(message.skaffoldConfigUri)) + return "skaffoldConfigUri: string expected"; + if (message.skaffoldConfigPath != null && message.hasOwnProperty("skaffoldConfigPath")) + if (!$util.isString(message.skaffoldConfigPath)) + return "skaffoldConfigPath: string expected"; + if (message.buildArtifacts != null && message.hasOwnProperty("buildArtifacts")) { + if (!Array.isArray(message.buildArtifacts)) + return "buildArtifacts: array expected"; + for (var i = 0; i < message.buildArtifacts.length; ++i) { + var error = $root.google.cloud.deploy.v1.BuildArtifact.verify(message.buildArtifacts[i]); + if (error) + return "buildArtifacts." + error; + } + } + if (message.deliveryPipelineSnapshot != null && message.hasOwnProperty("deliveryPipelineSnapshot")) { + var error = $root.google.cloud.deploy.v1.DeliveryPipeline.verify(message.deliveryPipelineSnapshot); + if (error) + return "deliveryPipelineSnapshot." + error; + } + if (message.targetSnapshots != null && message.hasOwnProperty("targetSnapshots")) { + if (!Array.isArray(message.targetSnapshots)) + return "targetSnapshots: array expected"; + for (var i = 0; i < message.targetSnapshots.length; ++i) { + var error = $root.google.cloud.deploy.v1.Target.verify(message.targetSnapshots[i]); + if (error) + return "targetSnapshots." + error; + } + } + if (message.renderState != null && message.hasOwnProperty("renderState")) + switch (message.renderState) { + default: + return "renderState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.skaffoldVersion != null && message.hasOwnProperty("skaffoldVersion")) + if (!$util.isString(message.skaffoldVersion)) + return "skaffoldVersion: string expected"; + if (message.targetArtifacts != null && message.hasOwnProperty("targetArtifacts")) { + if (!$util.isObject(message.targetArtifacts)) + return "targetArtifacts: object expected"; + var key = Object.keys(message.targetArtifacts); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.deploy.v1.TargetArtifact.verify(message.targetArtifacts[key[i]]); + if (error) + return "targetArtifacts." + error; + } + } + if (message.targetRenders != null && message.hasOwnProperty("targetRenders")) { + if (!$util.isObject(message.targetRenders)) + return "targetRenders: object expected"; + var key = Object.keys(message.targetRenders); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.deploy.v1.Release.TargetRender.verify(message.targetRenders[key[i]]); + if (error) + return "targetRenders." + error; + } + } + return null; + }; + + /** + * Creates a Release message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.Release + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.Release} Release + */ + Release.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.Release) + return object; + var message = new $root.google.cloud.deploy.v1.Release(); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.description != null) + message.description = String(object.description); + if (object.annotations) { + if (typeof object.annotations !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.annotations: object expected"); + message.annotations = {}; + for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) + message.annotations[keys[i]] = String(object.annotations[keys[i]]); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.abandoned != null) + message.abandoned = Boolean(object.abandoned); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.renderStartTime != null) { + if (typeof object.renderStartTime !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.renderStartTime: object expected"); + message.renderStartTime = $root.google.protobuf.Timestamp.fromObject(object.renderStartTime); + } + if (object.renderEndTime != null) { + if (typeof object.renderEndTime !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.renderEndTime: object expected"); + message.renderEndTime = $root.google.protobuf.Timestamp.fromObject(object.renderEndTime); + } + if (object.skaffoldConfigUri != null) + message.skaffoldConfigUri = String(object.skaffoldConfigUri); + if (object.skaffoldConfigPath != null) + message.skaffoldConfigPath = String(object.skaffoldConfigPath); + if (object.buildArtifacts) { + if (!Array.isArray(object.buildArtifacts)) + throw TypeError(".google.cloud.deploy.v1.Release.buildArtifacts: array expected"); + message.buildArtifacts = []; + for (var i = 0; i < object.buildArtifacts.length; ++i) { + if (typeof object.buildArtifacts[i] !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.buildArtifacts: object expected"); + message.buildArtifacts[i] = $root.google.cloud.deploy.v1.BuildArtifact.fromObject(object.buildArtifacts[i]); + } + } + if (object.deliveryPipelineSnapshot != null) { + if (typeof object.deliveryPipelineSnapshot !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.deliveryPipelineSnapshot: object expected"); + message.deliveryPipelineSnapshot = $root.google.cloud.deploy.v1.DeliveryPipeline.fromObject(object.deliveryPipelineSnapshot); + } + if (object.targetSnapshots) { + if (!Array.isArray(object.targetSnapshots)) + throw TypeError(".google.cloud.deploy.v1.Release.targetSnapshots: array expected"); + message.targetSnapshots = []; + for (var i = 0; i < object.targetSnapshots.length; ++i) { + if (typeof object.targetSnapshots[i] !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.targetSnapshots: object expected"); + message.targetSnapshots[i] = $root.google.cloud.deploy.v1.Target.fromObject(object.targetSnapshots[i]); + } + } + switch (object.renderState) { + case "RENDER_STATE_UNSPECIFIED": + case 0: + message.renderState = 0; + break; + case "SUCCEEDED": + case 1: + message.renderState = 1; + break; + case "FAILED": + case 2: + message.renderState = 2; + break; + case "IN_PROGRESS": + case 3: + message.renderState = 3; + break; + } + if (object.etag != null) + message.etag = String(object.etag); + if (object.skaffoldVersion != null) + message.skaffoldVersion = String(object.skaffoldVersion); + if (object.targetArtifacts) { + if (typeof object.targetArtifacts !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.targetArtifacts: object expected"); + message.targetArtifacts = {}; + for (var keys = Object.keys(object.targetArtifacts), i = 0; i < keys.length; ++i) { + if (typeof object.targetArtifacts[keys[i]] !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.targetArtifacts: object expected"); + message.targetArtifacts[keys[i]] = $root.google.cloud.deploy.v1.TargetArtifact.fromObject(object.targetArtifacts[keys[i]]); + } + } + if (object.targetRenders) { + if (typeof object.targetRenders !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.targetRenders: object expected"); + message.targetRenders = {}; + for (var keys = Object.keys(object.targetRenders), i = 0; i < keys.length; ++i) { + if (typeof object.targetRenders[keys[i]] !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.targetRenders: object expected"); + message.targetRenders[keys[i]] = $root.google.cloud.deploy.v1.Release.TargetRender.fromObject(object.targetRenders[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from a Release message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.Release + * @static + * @param {google.cloud.deploy.v1.Release} message Release + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Release.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.buildArtifacts = []; + object.targetSnapshots = []; + } + if (options.objects || options.defaults) { + object.annotations = {}; + object.labels = {}; + object.targetArtifacts = {}; + object.targetRenders = {}; + } + if (options.defaults) { + object.name = ""; + object.uid = ""; + object.description = ""; + object.createTime = null; + object.renderStartTime = null; + object.renderEndTime = null; + object.skaffoldConfigPath = ""; + object.deliveryPipelineSnapshot = null; + object.renderState = options.enums === String ? "RENDER_STATE_UNSPECIFIED" : 0; + object.etag = ""; + object.skaffoldConfigUri = ""; + object.skaffoldVersion = ""; + object.abandoned = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + var keys2; + if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { + object.annotations = {}; + for (var j = 0; j < keys2.length; ++j) + object.annotations[keys2[j]] = message.annotations[keys2[j]]; + } + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.renderStartTime != null && message.hasOwnProperty("renderStartTime")) + object.renderStartTime = $root.google.protobuf.Timestamp.toObject(message.renderStartTime, options); + if (message.renderEndTime != null && message.hasOwnProperty("renderEndTime")) + object.renderEndTime = $root.google.protobuf.Timestamp.toObject(message.renderEndTime, options); + if (message.skaffoldConfigPath != null && message.hasOwnProperty("skaffoldConfigPath")) + object.skaffoldConfigPath = message.skaffoldConfigPath; + if (message.buildArtifacts && message.buildArtifacts.length) { + object.buildArtifacts = []; + for (var j = 0; j < message.buildArtifacts.length; ++j) + object.buildArtifacts[j] = $root.google.cloud.deploy.v1.BuildArtifact.toObject(message.buildArtifacts[j], options); + } + if (message.deliveryPipelineSnapshot != null && message.hasOwnProperty("deliveryPipelineSnapshot")) + object.deliveryPipelineSnapshot = $root.google.cloud.deploy.v1.DeliveryPipeline.toObject(message.deliveryPipelineSnapshot, options); + if (message.targetSnapshots && message.targetSnapshots.length) { + object.targetSnapshots = []; + for (var j = 0; j < message.targetSnapshots.length; ++j) + object.targetSnapshots[j] = $root.google.cloud.deploy.v1.Target.toObject(message.targetSnapshots[j], options); + } + if (message.renderState != null && message.hasOwnProperty("renderState")) + object.renderState = options.enums === String ? $root.google.cloud.deploy.v1.Release.RenderState[message.renderState] : message.renderState; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.skaffoldConfigUri != null && message.hasOwnProperty("skaffoldConfigUri")) + object.skaffoldConfigUri = message.skaffoldConfigUri; + if (message.skaffoldVersion != null && message.hasOwnProperty("skaffoldVersion")) + object.skaffoldVersion = message.skaffoldVersion; + if (message.targetArtifacts && (keys2 = Object.keys(message.targetArtifacts)).length) { + object.targetArtifacts = {}; + for (var j = 0; j < keys2.length; ++j) + object.targetArtifacts[keys2[j]] = $root.google.cloud.deploy.v1.TargetArtifact.toObject(message.targetArtifacts[keys2[j]], options); + } + if (message.targetRenders && (keys2 = Object.keys(message.targetRenders)).length) { + object.targetRenders = {}; + for (var j = 0; j < keys2.length; ++j) + object.targetRenders[keys2[j]] = $root.google.cloud.deploy.v1.Release.TargetRender.toObject(message.targetRenders[keys2[j]], options); + } + if (message.abandoned != null && message.hasOwnProperty("abandoned")) + object.abandoned = message.abandoned; + return object; + }; + + /** + * Converts this Release to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.Release + * @instance + * @returns {Object.} JSON object + */ + Release.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Release + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.Release + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Release.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.Release"; + }; + + /** + * RenderState enum. + * @name google.cloud.deploy.v1.Release.RenderState + * @enum {number} + * @property {number} RENDER_STATE_UNSPECIFIED=0 RENDER_STATE_UNSPECIFIED value + * @property {number} SUCCEEDED=1 SUCCEEDED value + * @property {number} FAILED=2 FAILED value + * @property {number} IN_PROGRESS=3 IN_PROGRESS value + */ + Release.RenderState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RENDER_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SUCCEEDED"] = 1; + values[valuesById[2] = "FAILED"] = 2; + values[valuesById[3] = "IN_PROGRESS"] = 3; + return values; + })(); + + Release.TargetRender = (function() { + + /** + * Properties of a TargetRender. + * @memberof google.cloud.deploy.v1.Release + * @interface ITargetRender + * @property {string|null} [renderingBuild] TargetRender renderingBuild + * @property {google.cloud.deploy.v1.Release.TargetRender.TargetRenderState|null} [renderingState] TargetRender renderingState + * @property {google.cloud.deploy.v1.Release.TargetRender.FailureCause|null} [failureCause] TargetRender failureCause + * @property {string|null} [failureMessage] TargetRender failureMessage + */ + + /** + * Constructs a new TargetRender. + * @memberof google.cloud.deploy.v1.Release + * @classdesc Represents a TargetRender. + * @implements ITargetRender + * @constructor + * @param {google.cloud.deploy.v1.Release.ITargetRender=} [properties] Properties to set + */ + function TargetRender(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TargetRender renderingBuild. + * @member {string} renderingBuild + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @instance + */ + TargetRender.prototype.renderingBuild = ""; + + /** + * TargetRender renderingState. + * @member {google.cloud.deploy.v1.Release.TargetRender.TargetRenderState} renderingState + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @instance + */ + TargetRender.prototype.renderingState = 0; + + /** + * TargetRender failureCause. + * @member {google.cloud.deploy.v1.Release.TargetRender.FailureCause} failureCause + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @instance + */ + TargetRender.prototype.failureCause = 0; + + /** + * TargetRender failureMessage. + * @member {string} failureMessage + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @instance + */ + TargetRender.prototype.failureMessage = ""; + + /** + * Creates a new TargetRender instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @static + * @param {google.cloud.deploy.v1.Release.ITargetRender=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.Release.TargetRender} TargetRender instance + */ + TargetRender.create = function create(properties) { + return new TargetRender(properties); + }; + + /** + * Encodes the specified TargetRender message. Does not implicitly {@link google.cloud.deploy.v1.Release.TargetRender.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @static + * @param {google.cloud.deploy.v1.Release.ITargetRender} message TargetRender message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TargetRender.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.renderingBuild != null && Object.hasOwnProperty.call(message, "renderingBuild")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.renderingBuild); + if (message.renderingState != null && Object.hasOwnProperty.call(message, "renderingState")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.renderingState); + if (message.failureCause != null && Object.hasOwnProperty.call(message, "failureCause")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.failureCause); + if (message.failureMessage != null && Object.hasOwnProperty.call(message, "failureMessage")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.failureMessage); + return writer; + }; + + /** + * Encodes the specified TargetRender message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Release.TargetRender.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @static + * @param {google.cloud.deploy.v1.Release.ITargetRender} message TargetRender message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TargetRender.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TargetRender message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.Release.TargetRender} TargetRender + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetRender.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Release.TargetRender(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.renderingBuild = reader.string(); + break; + } + case 2: { + message.renderingState = reader.int32(); + break; + } + case 4: { + message.failureCause = reader.int32(); + break; + } + case 5: { + message.failureMessage = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TargetRender message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.Release.TargetRender} TargetRender + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetRender.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TargetRender message. + * @function verify + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TargetRender.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.renderingBuild != null && message.hasOwnProperty("renderingBuild")) + if (!$util.isString(message.renderingBuild)) + return "renderingBuild: string expected"; + if (message.renderingState != null && message.hasOwnProperty("renderingState")) + switch (message.renderingState) { + default: + return "renderingState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.failureCause != null && message.hasOwnProperty("failureCause")) + switch (message.failureCause) { + default: + return "failureCause: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.failureMessage != null && message.hasOwnProperty("failureMessage")) + if (!$util.isString(message.failureMessage)) + return "failureMessage: string expected"; + return null; + }; + + /** + * Creates a TargetRender message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.Release.TargetRender} TargetRender + */ + TargetRender.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.Release.TargetRender) + return object; + var message = new $root.google.cloud.deploy.v1.Release.TargetRender(); + if (object.renderingBuild != null) + message.renderingBuild = String(object.renderingBuild); + switch (object.renderingState) { + case "TARGET_RENDER_STATE_UNSPECIFIED": + case 0: + message.renderingState = 0; + break; + case "SUCCEEDED": + case 1: + message.renderingState = 1; + break; + case "FAILED": + case 2: + message.renderingState = 2; + break; + case "IN_PROGRESS": + case 3: + message.renderingState = 3; + break; + } + switch (object.failureCause) { + case "FAILURE_CAUSE_UNSPECIFIED": + case 0: + message.failureCause = 0; + break; + case "CLOUD_BUILD_UNAVAILABLE": + case 1: + message.failureCause = 1; + break; + case "EXECUTION_FAILED": + case 2: + message.failureCause = 2; + break; + } + if (object.failureMessage != null) + message.failureMessage = String(object.failureMessage); + return message; + }; + + /** + * Creates a plain object from a TargetRender message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @static + * @param {google.cloud.deploy.v1.Release.TargetRender} message TargetRender + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TargetRender.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.renderingBuild = ""; + object.renderingState = options.enums === String ? "TARGET_RENDER_STATE_UNSPECIFIED" : 0; + object.failureCause = options.enums === String ? "FAILURE_CAUSE_UNSPECIFIED" : 0; + object.failureMessage = ""; + } + if (message.renderingBuild != null && message.hasOwnProperty("renderingBuild")) + object.renderingBuild = message.renderingBuild; + if (message.renderingState != null && message.hasOwnProperty("renderingState")) + object.renderingState = options.enums === String ? $root.google.cloud.deploy.v1.Release.TargetRender.TargetRenderState[message.renderingState] : message.renderingState; + if (message.failureCause != null && message.hasOwnProperty("failureCause")) + object.failureCause = options.enums === String ? $root.google.cloud.deploy.v1.Release.TargetRender.FailureCause[message.failureCause] : message.failureCause; + if (message.failureMessage != null && message.hasOwnProperty("failureMessage")) + object.failureMessage = message.failureMessage; + return object; + }; + + /** + * Converts this TargetRender to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @instance + * @returns {Object.} JSON object + */ + TargetRender.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TargetRender + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TargetRender.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.Release.TargetRender"; }; - /** - * Encodes the specified TargetRender message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Release.TargetRender.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.deploy.v1.Release.TargetRender - * @static - * @param {google.cloud.deploy.v1.Release.ITargetRender} message TargetRender message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TargetRender.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * TargetRenderState enum. + * @name google.cloud.deploy.v1.Release.TargetRender.TargetRenderState + * @enum {number} + * @property {number} TARGET_RENDER_STATE_UNSPECIFIED=0 TARGET_RENDER_STATE_UNSPECIFIED value + * @property {number} SUCCEEDED=1 SUCCEEDED value + * @property {number} FAILED=2 FAILED value + * @property {number} IN_PROGRESS=3 IN_PROGRESS value + */ + TargetRender.TargetRenderState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_RENDER_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SUCCEEDED"] = 1; + values[valuesById[2] = "FAILED"] = 2; + values[valuesById[3] = "IN_PROGRESS"] = 3; + return values; + })(); + + /** + * FailureCause enum. + * @name google.cloud.deploy.v1.Release.TargetRender.FailureCause + * @enum {number} + * @property {number} FAILURE_CAUSE_UNSPECIFIED=0 FAILURE_CAUSE_UNSPECIFIED value + * @property {number} CLOUD_BUILD_UNAVAILABLE=1 CLOUD_BUILD_UNAVAILABLE value + * @property {number} EXECUTION_FAILED=2 EXECUTION_FAILED value + */ + TargetRender.FailureCause = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FAILURE_CAUSE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD_BUILD_UNAVAILABLE"] = 1; + values[valuesById[2] = "EXECUTION_FAILED"] = 2; + return values; + })(); + + return TargetRender; + })(); + + return Release; + })(); + + v1.BuildArtifact = (function() { + + /** + * Properties of a BuildArtifact. + * @memberof google.cloud.deploy.v1 + * @interface IBuildArtifact + * @property {string|null} [image] BuildArtifact image + * @property {string|null} [tag] BuildArtifact tag + */ + + /** + * Constructs a new BuildArtifact. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a BuildArtifact. + * @implements IBuildArtifact + * @constructor + * @param {google.cloud.deploy.v1.IBuildArtifact=} [properties] Properties to set + */ + function BuildArtifact(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BuildArtifact image. + * @member {string} image + * @memberof google.cloud.deploy.v1.BuildArtifact + * @instance + */ + BuildArtifact.prototype.image = ""; + + /** + * BuildArtifact tag. + * @member {string} tag + * @memberof google.cloud.deploy.v1.BuildArtifact + * @instance + */ + BuildArtifact.prototype.tag = ""; + + /** + * Creates a new BuildArtifact instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.BuildArtifact + * @static + * @param {google.cloud.deploy.v1.IBuildArtifact=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.BuildArtifact} BuildArtifact instance + */ + BuildArtifact.create = function create(properties) { + return new BuildArtifact(properties); + }; + + /** + * Encodes the specified BuildArtifact message. Does not implicitly {@link google.cloud.deploy.v1.BuildArtifact.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.BuildArtifact + * @static + * @param {google.cloud.deploy.v1.IBuildArtifact} message BuildArtifact message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BuildArtifact.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.tag); + if (message.image != null && Object.hasOwnProperty.call(message, "image")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.image); + return writer; + }; + + /** + * Encodes the specified BuildArtifact message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.BuildArtifact.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.BuildArtifact + * @static + * @param {google.cloud.deploy.v1.IBuildArtifact} message BuildArtifact message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BuildArtifact.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BuildArtifact message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.BuildArtifact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.BuildArtifact} BuildArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BuildArtifact.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.BuildArtifact(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.image = reader.string(); + break; + } + case 2: { + message.tag = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BuildArtifact message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.BuildArtifact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.BuildArtifact} BuildArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BuildArtifact.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BuildArtifact message. + * @function verify + * @memberof google.cloud.deploy.v1.BuildArtifact + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BuildArtifact.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.image != null && message.hasOwnProperty("image")) + if (!$util.isString(message.image)) + return "image: string expected"; + if (message.tag != null && message.hasOwnProperty("tag")) + if (!$util.isString(message.tag)) + return "tag: string expected"; + return null; + }; + + /** + * Creates a BuildArtifact message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.BuildArtifact + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.BuildArtifact} BuildArtifact + */ + BuildArtifact.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.BuildArtifact) + return object; + var message = new $root.google.cloud.deploy.v1.BuildArtifact(); + if (object.image != null) + message.image = String(object.image); + if (object.tag != null) + message.tag = String(object.tag); + return message; + }; + + /** + * Creates a plain object from a BuildArtifact message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.BuildArtifact + * @static + * @param {google.cloud.deploy.v1.BuildArtifact} message BuildArtifact + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BuildArtifact.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.tag = ""; + object.image = ""; + } + if (message.tag != null && message.hasOwnProperty("tag")) + object.tag = message.tag; + if (message.image != null && message.hasOwnProperty("image")) + object.image = message.image; + return object; + }; + + /** + * Converts this BuildArtifact to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.BuildArtifact + * @instance + * @returns {Object.} JSON object + */ + BuildArtifact.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BuildArtifact + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.BuildArtifact + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BuildArtifact.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.BuildArtifact"; + }; + + return BuildArtifact; + })(); + + v1.TargetArtifact = (function() { + + /** + * Properties of a TargetArtifact. + * @memberof google.cloud.deploy.v1 + * @interface ITargetArtifact + * @property {string|null} [artifactUri] TargetArtifact artifactUri + * @property {string|null} [skaffoldConfigPath] TargetArtifact skaffoldConfigPath + * @property {string|null} [manifestPath] TargetArtifact manifestPath + */ + + /** + * Constructs a new TargetArtifact. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a TargetArtifact. + * @implements ITargetArtifact + * @constructor + * @param {google.cloud.deploy.v1.ITargetArtifact=} [properties] Properties to set + */ + function TargetArtifact(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TargetArtifact artifactUri. + * @member {string|null|undefined} artifactUri + * @memberof google.cloud.deploy.v1.TargetArtifact + * @instance + */ + TargetArtifact.prototype.artifactUri = null; + + /** + * TargetArtifact skaffoldConfigPath. + * @member {string} skaffoldConfigPath + * @memberof google.cloud.deploy.v1.TargetArtifact + * @instance + */ + TargetArtifact.prototype.skaffoldConfigPath = ""; + + /** + * TargetArtifact manifestPath. + * @member {string} manifestPath + * @memberof google.cloud.deploy.v1.TargetArtifact + * @instance + */ + TargetArtifact.prototype.manifestPath = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TargetArtifact uri. + * @member {"artifactUri"|undefined} uri + * @memberof google.cloud.deploy.v1.TargetArtifact + * @instance + */ + Object.defineProperty(TargetArtifact.prototype, "uri", { + get: $util.oneOfGetter($oneOfFields = ["artifactUri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TargetArtifact instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.TargetArtifact + * @static + * @param {google.cloud.deploy.v1.ITargetArtifact=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.TargetArtifact} TargetArtifact instance + */ + TargetArtifact.create = function create(properties) { + return new TargetArtifact(properties); + }; + + /** + * Encodes the specified TargetArtifact message. Does not implicitly {@link google.cloud.deploy.v1.TargetArtifact.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.TargetArtifact + * @static + * @param {google.cloud.deploy.v1.ITargetArtifact} message TargetArtifact message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TargetArtifact.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.skaffoldConfigPath != null && Object.hasOwnProperty.call(message, "skaffoldConfigPath")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.skaffoldConfigPath); + if (message.manifestPath != null && Object.hasOwnProperty.call(message, "manifestPath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.manifestPath); + if (message.artifactUri != null && Object.hasOwnProperty.call(message, "artifactUri")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.artifactUri); + return writer; + }; + + /** + * Encodes the specified TargetArtifact message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.TargetArtifact.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.TargetArtifact + * @static + * @param {google.cloud.deploy.v1.ITargetArtifact} message TargetArtifact message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TargetArtifact.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TargetArtifact message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.TargetArtifact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.TargetArtifact} TargetArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetArtifact.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.TargetArtifact(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: { + message.artifactUri = reader.string(); + break; + } + case 2: { + message.skaffoldConfigPath = reader.string(); + break; + } + case 3: { + message.manifestPath = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TargetArtifact message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.TargetArtifact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.TargetArtifact} TargetArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetArtifact.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TargetArtifact message. + * @function verify + * @memberof google.cloud.deploy.v1.TargetArtifact + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TargetArtifact.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.artifactUri != null && message.hasOwnProperty("artifactUri")) { + properties.uri = 1; + if (!$util.isString(message.artifactUri)) + return "artifactUri: string expected"; + } + if (message.skaffoldConfigPath != null && message.hasOwnProperty("skaffoldConfigPath")) + if (!$util.isString(message.skaffoldConfigPath)) + return "skaffoldConfigPath: string expected"; + if (message.manifestPath != null && message.hasOwnProperty("manifestPath")) + if (!$util.isString(message.manifestPath)) + return "manifestPath: string expected"; + return null; + }; + + /** + * Creates a TargetArtifact message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.TargetArtifact + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.TargetArtifact} TargetArtifact + */ + TargetArtifact.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.TargetArtifact) + return object; + var message = new $root.google.cloud.deploy.v1.TargetArtifact(); + if (object.artifactUri != null) + message.artifactUri = String(object.artifactUri); + if (object.skaffoldConfigPath != null) + message.skaffoldConfigPath = String(object.skaffoldConfigPath); + if (object.manifestPath != null) + message.manifestPath = String(object.manifestPath); + return message; + }; + + /** + * Creates a plain object from a TargetArtifact message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.TargetArtifact + * @static + * @param {google.cloud.deploy.v1.TargetArtifact} message TargetArtifact + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TargetArtifact.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.skaffoldConfigPath = ""; + object.manifestPath = ""; + } + if (message.skaffoldConfigPath != null && message.hasOwnProperty("skaffoldConfigPath")) + object.skaffoldConfigPath = message.skaffoldConfigPath; + if (message.manifestPath != null && message.hasOwnProperty("manifestPath")) + object.manifestPath = message.manifestPath; + if (message.artifactUri != null && message.hasOwnProperty("artifactUri")) { + object.artifactUri = message.artifactUri; + if (options.oneofs) + object.uri = "artifactUri"; + } + return object; + }; + + /** + * Converts this TargetArtifact to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.TargetArtifact + * @instance + * @returns {Object.} JSON object + */ + TargetArtifact.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TargetArtifact + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.TargetArtifact + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TargetArtifact.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.TargetArtifact"; + }; + + return TargetArtifact; + })(); + + v1.ListReleasesRequest = (function() { + + /** + * Properties of a ListReleasesRequest. + * @memberof google.cloud.deploy.v1 + * @interface IListReleasesRequest + * @property {string|null} [parent] ListReleasesRequest parent + * @property {number|null} [pageSize] ListReleasesRequest pageSize + * @property {string|null} [pageToken] ListReleasesRequest pageToken + * @property {string|null} [filter] ListReleasesRequest filter + * @property {string|null} [orderBy] ListReleasesRequest orderBy + */ + + /** + * Constructs a new ListReleasesRequest. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a ListReleasesRequest. + * @implements IListReleasesRequest + * @constructor + * @param {google.cloud.deploy.v1.IListReleasesRequest=} [properties] Properties to set + */ + function ListReleasesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListReleasesRequest parent. + * @member {string} parent + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @instance + */ + ListReleasesRequest.prototype.parent = ""; + + /** + * ListReleasesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @instance + */ + ListReleasesRequest.prototype.pageSize = 0; + + /** + * ListReleasesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @instance + */ + ListReleasesRequest.prototype.pageToken = ""; + + /** + * ListReleasesRequest filter. + * @member {string} filter + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @instance + */ + ListReleasesRequest.prototype.filter = ""; + + /** + * ListReleasesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @instance + */ + ListReleasesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListReleasesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @static + * @param {google.cloud.deploy.v1.IListReleasesRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ListReleasesRequest} ListReleasesRequest instance + */ + ListReleasesRequest.create = function create(properties) { + return new ListReleasesRequest(properties); + }; + + /** + * Encodes the specified ListReleasesRequest message. Does not implicitly {@link google.cloud.deploy.v1.ListReleasesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @static + * @param {google.cloud.deploy.v1.IListReleasesRequest} message ListReleasesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReleasesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListReleasesRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListReleasesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @static + * @param {google.cloud.deploy.v1.IListReleasesRequest} message ListReleasesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReleasesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListReleasesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.ListReleasesRequest} ListReleasesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReleasesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListReleasesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListReleasesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.ListReleasesRequest} ListReleasesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReleasesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListReleasesRequest message. + * @function verify + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListReleasesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListReleasesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.ListReleasesRequest} ListReleasesRequest + */ + ListReleasesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ListReleasesRequest) + return object; + var message = new $root.google.cloud.deploy.v1.ListReleasesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListReleasesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @static + * @param {google.cloud.deploy.v1.ListReleasesRequest} message ListReleasesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListReleasesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListReleasesRequest to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @instance + * @returns {Object.} JSON object + */ + ListReleasesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListReleasesRequest + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListReleasesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.ListReleasesRequest"; + }; + + return ListReleasesRequest; + })(); + + v1.ListReleasesResponse = (function() { + + /** + * Properties of a ListReleasesResponse. + * @memberof google.cloud.deploy.v1 + * @interface IListReleasesResponse + * @property {Array.|null} [releases] ListReleasesResponse releases + * @property {string|null} [nextPageToken] ListReleasesResponse nextPageToken + * @property {Array.|null} [unreachable] ListReleasesResponse unreachable + */ + + /** + * Constructs a new ListReleasesResponse. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a ListReleasesResponse. + * @implements IListReleasesResponse + * @constructor + * @param {google.cloud.deploy.v1.IListReleasesResponse=} [properties] Properties to set + */ + function ListReleasesResponse(properties) { + this.releases = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListReleasesResponse releases. + * @member {Array.} releases + * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @instance + */ + ListReleasesResponse.prototype.releases = $util.emptyArray; + + /** + * ListReleasesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @instance + */ + ListReleasesResponse.prototype.nextPageToken = ""; + + /** + * ListReleasesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @instance + */ + ListReleasesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListReleasesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @static + * @param {google.cloud.deploy.v1.IListReleasesResponse=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ListReleasesResponse} ListReleasesResponse instance + */ + ListReleasesResponse.create = function create(properties) { + return new ListReleasesResponse(properties); + }; + + /** + * Encodes the specified ListReleasesResponse message. Does not implicitly {@link google.cloud.deploy.v1.ListReleasesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @static + * @param {google.cloud.deploy.v1.IListReleasesResponse} message ListReleasesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReleasesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.releases != null && message.releases.length) + for (var i = 0; i < message.releases.length; ++i) + $root.google.cloud.deploy.v1.Release.encode(message.releases[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListReleasesResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListReleasesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @static + * @param {google.cloud.deploy.v1.IListReleasesResponse} message ListReleasesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReleasesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListReleasesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.ListReleasesResponse} ListReleasesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReleasesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListReleasesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.releases && message.releases.length)) + message.releases = []; + message.releases.push($root.google.cloud.deploy.v1.Release.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListReleasesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.ListReleasesResponse} ListReleasesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReleasesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListReleasesResponse message. + * @function verify + * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListReleasesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.releases != null && message.hasOwnProperty("releases")) { + if (!Array.isArray(message.releases)) + return "releases: array expected"; + for (var i = 0; i < message.releases.length; ++i) { + var error = $root.google.cloud.deploy.v1.Release.verify(message.releases[i]); + if (error) + return "releases." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListReleasesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.ListReleasesResponse} ListReleasesResponse + */ + ListReleasesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ListReleasesResponse) + return object; + var message = new $root.google.cloud.deploy.v1.ListReleasesResponse(); + if (object.releases) { + if (!Array.isArray(object.releases)) + throw TypeError(".google.cloud.deploy.v1.ListReleasesResponse.releases: array expected"); + message.releases = []; + for (var i = 0; i < object.releases.length; ++i) { + if (typeof object.releases[i] !== "object") + throw TypeError(".google.cloud.deploy.v1.ListReleasesResponse.releases: object expected"); + message.releases[i] = $root.google.cloud.deploy.v1.Release.fromObject(object.releases[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.deploy.v1.ListReleasesResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListReleasesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @static + * @param {google.cloud.deploy.v1.ListReleasesResponse} message ListReleasesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListReleasesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.releases = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.releases && message.releases.length) { + object.releases = []; + for (var j = 0; j < message.releases.length; ++j) + object.releases[j] = $root.google.cloud.deploy.v1.Release.toObject(message.releases[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListReleasesResponse to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @instance + * @returns {Object.} JSON object + */ + ListReleasesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListReleasesResponse + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListReleasesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.ListReleasesResponse"; + }; + + return ListReleasesResponse; + })(); + + v1.GetReleaseRequest = (function() { + + /** + * Properties of a GetReleaseRequest. + * @memberof google.cloud.deploy.v1 + * @interface IGetReleaseRequest + * @property {string|null} [name] GetReleaseRequest name + */ + + /** + * Constructs a new GetReleaseRequest. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a GetReleaseRequest. + * @implements IGetReleaseRequest + * @constructor + * @param {google.cloud.deploy.v1.IGetReleaseRequest=} [properties] Properties to set + */ + function GetReleaseRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetReleaseRequest name. + * @member {string} name + * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @instance + */ + GetReleaseRequest.prototype.name = ""; + + /** + * Creates a new GetReleaseRequest instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @static + * @param {google.cloud.deploy.v1.IGetReleaseRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.GetReleaseRequest} GetReleaseRequest instance + */ + GetReleaseRequest.create = function create(properties) { + return new GetReleaseRequest(properties); + }; + + /** + * Encodes the specified GetReleaseRequest message. Does not implicitly {@link google.cloud.deploy.v1.GetReleaseRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @static + * @param {google.cloud.deploy.v1.IGetReleaseRequest} message GetReleaseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetReleaseRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetReleaseRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GetReleaseRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @static + * @param {google.cloud.deploy.v1.IGetReleaseRequest} message GetReleaseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetReleaseRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetReleaseRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.GetReleaseRequest} GetReleaseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetReleaseRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.GetReleaseRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetReleaseRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.GetReleaseRequest} GetReleaseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetReleaseRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetReleaseRequest message. + * @function verify + * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetReleaseRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetReleaseRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.GetReleaseRequest} GetReleaseRequest + */ + GetReleaseRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.GetReleaseRequest) + return object; + var message = new $root.google.cloud.deploy.v1.GetReleaseRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetReleaseRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @static + * @param {google.cloud.deploy.v1.GetReleaseRequest} message GetReleaseRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetReleaseRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetReleaseRequest to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @instance + * @returns {Object.} JSON object + */ + GetReleaseRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetReleaseRequest + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetReleaseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.GetReleaseRequest"; + }; + + return GetReleaseRequest; + })(); + + v1.CreateReleaseRequest = (function() { + + /** + * Properties of a CreateReleaseRequest. + * @memberof google.cloud.deploy.v1 + * @interface ICreateReleaseRequest + * @property {string|null} [parent] CreateReleaseRequest parent + * @property {string|null} [releaseId] CreateReleaseRequest releaseId + * @property {google.cloud.deploy.v1.IRelease|null} [release] CreateReleaseRequest release + * @property {string|null} [requestId] CreateReleaseRequest requestId + * @property {boolean|null} [validateOnly] CreateReleaseRequest validateOnly + */ + + /** + * Constructs a new CreateReleaseRequest. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a CreateReleaseRequest. + * @implements ICreateReleaseRequest + * @constructor + * @param {google.cloud.deploy.v1.ICreateReleaseRequest=} [properties] Properties to set + */ + function CreateReleaseRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateReleaseRequest parent. + * @member {string} parent + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @instance + */ + CreateReleaseRequest.prototype.parent = ""; + + /** + * CreateReleaseRequest releaseId. + * @member {string} releaseId + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @instance + */ + CreateReleaseRequest.prototype.releaseId = ""; + + /** + * CreateReleaseRequest release. + * @member {google.cloud.deploy.v1.IRelease|null|undefined} release + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @instance + */ + CreateReleaseRequest.prototype.release = null; + + /** + * CreateReleaseRequest requestId. + * @member {string} requestId + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @instance + */ + CreateReleaseRequest.prototype.requestId = ""; + + /** + * CreateReleaseRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @instance + */ + CreateReleaseRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateReleaseRequest instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @static + * @param {google.cloud.deploy.v1.ICreateReleaseRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.CreateReleaseRequest} CreateReleaseRequest instance + */ + CreateReleaseRequest.create = function create(properties) { + return new CreateReleaseRequest(properties); + }; + + /** + * Encodes the specified CreateReleaseRequest message. Does not implicitly {@link google.cloud.deploy.v1.CreateReleaseRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @static + * @param {google.cloud.deploy.v1.ICreateReleaseRequest} message CreateReleaseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateReleaseRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.releaseId != null && Object.hasOwnProperty.call(message, "releaseId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.releaseId); + if (message.release != null && Object.hasOwnProperty.call(message, "release")) + $root.google.cloud.deploy.v1.Release.encode(message.release, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreateReleaseRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CreateReleaseRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @static + * @param {google.cloud.deploy.v1.ICreateReleaseRequest} message CreateReleaseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateReleaseRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateReleaseRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.CreateReleaseRequest} CreateReleaseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateReleaseRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.CreateReleaseRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.releaseId = reader.string(); + break; + } + case 3: { + message.release = $root.google.cloud.deploy.v1.Release.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + case 5: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateReleaseRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.CreateReleaseRequest} CreateReleaseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateReleaseRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateReleaseRequest message. + * @function verify + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateReleaseRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.releaseId != null && message.hasOwnProperty("releaseId")) + if (!$util.isString(message.releaseId)) + return "releaseId: string expected"; + if (message.release != null && message.hasOwnProperty("release")) { + var error = $root.google.cloud.deploy.v1.Release.verify(message.release); + if (error) + return "release." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateReleaseRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.CreateReleaseRequest} CreateReleaseRequest + */ + CreateReleaseRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.CreateReleaseRequest) + return object; + var message = new $root.google.cloud.deploy.v1.CreateReleaseRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.releaseId != null) + message.releaseId = String(object.releaseId); + if (object.release != null) { + if (typeof object.release !== "object") + throw TypeError(".google.cloud.deploy.v1.CreateReleaseRequest.release: object expected"); + message.release = $root.google.cloud.deploy.v1.Release.fromObject(object.release); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateReleaseRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @static + * @param {google.cloud.deploy.v1.CreateReleaseRequest} message CreateReleaseRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateReleaseRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.releaseId = ""; + object.release = null; + object.requestId = ""; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.releaseId != null && message.hasOwnProperty("releaseId")) + object.releaseId = message.releaseId; + if (message.release != null && message.hasOwnProperty("release")) + object.release = $root.google.cloud.deploy.v1.Release.toObject(message.release, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateReleaseRequest to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @instance + * @returns {Object.} JSON object + */ + CreateReleaseRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateReleaseRequest + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateReleaseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.CreateReleaseRequest"; + }; + + return CreateReleaseRequest; + })(); + + v1.Rollout = (function() { + + /** + * Properties of a Rollout. + * @memberof google.cloud.deploy.v1 + * @interface IRollout + * @property {string|null} [name] Rollout name + * @property {string|null} [uid] Rollout uid + * @property {string|null} [description] Rollout description + * @property {Object.|null} [annotations] Rollout annotations + * @property {Object.|null} [labels] Rollout labels + * @property {google.protobuf.ITimestamp|null} [createTime] Rollout createTime + * @property {google.protobuf.ITimestamp|null} [approveTime] Rollout approveTime + * @property {google.protobuf.ITimestamp|null} [enqueueTime] Rollout enqueueTime + * @property {google.protobuf.ITimestamp|null} [deployStartTime] Rollout deployStartTime + * @property {google.protobuf.ITimestamp|null} [deployEndTime] Rollout deployEndTime + * @property {string|null} [targetId] Rollout targetId + * @property {google.cloud.deploy.v1.Rollout.ApprovalState|null} [approvalState] Rollout approvalState + * @property {google.cloud.deploy.v1.Rollout.State|null} [state] Rollout state + * @property {string|null} [failureReason] Rollout failureReason + * @property {string|null} [deployingBuild] Rollout deployingBuild + * @property {string|null} [etag] Rollout etag + * @property {google.cloud.deploy.v1.Rollout.FailureCause|null} [deployFailureCause] Rollout deployFailureCause + * @property {Array.|null} [phases] Rollout phases + * @property {google.cloud.deploy.v1.IMetadata|null} [metadata] Rollout metadata + */ + + /** + * Constructs a new Rollout. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a Rollout. + * @implements IRollout + * @constructor + * @param {google.cloud.deploy.v1.IRollout=} [properties] Properties to set + */ + function Rollout(properties) { + this.annotations = {}; + this.labels = {}; + this.phases = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Rollout name. + * @member {string} name + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.name = ""; + + /** + * Rollout uid. + * @member {string} uid + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.uid = ""; + + /** + * Rollout description. + * @member {string} description + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.description = ""; + + /** + * Rollout annotations. + * @member {Object.} annotations + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.annotations = $util.emptyObject; + + /** + * Rollout labels. + * @member {Object.} labels + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.labels = $util.emptyObject; + + /** + * Rollout createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.createTime = null; + + /** + * Rollout approveTime. + * @member {google.protobuf.ITimestamp|null|undefined} approveTime + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.approveTime = null; + + /** + * Rollout enqueueTime. + * @member {google.protobuf.ITimestamp|null|undefined} enqueueTime + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.enqueueTime = null; + + /** + * Rollout deployStartTime. + * @member {google.protobuf.ITimestamp|null|undefined} deployStartTime + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.deployStartTime = null; + + /** + * Rollout deployEndTime. + * @member {google.protobuf.ITimestamp|null|undefined} deployEndTime + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.deployEndTime = null; + + /** + * Rollout targetId. + * @member {string} targetId + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.targetId = ""; + + /** + * Rollout approvalState. + * @member {google.cloud.deploy.v1.Rollout.ApprovalState} approvalState + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.approvalState = 0; + + /** + * Rollout state. + * @member {google.cloud.deploy.v1.Rollout.State} state + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.state = 0; + + /** + * Rollout failureReason. + * @member {string} failureReason + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.failureReason = ""; + + /** + * Rollout deployingBuild. + * @member {string} deployingBuild + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.deployingBuild = ""; + + /** + * Rollout etag. + * @member {string} etag + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.etag = ""; + + /** + * Rollout deployFailureCause. + * @member {google.cloud.deploy.v1.Rollout.FailureCause} deployFailureCause + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.deployFailureCause = 0; + + /** + * Rollout phases. + * @member {Array.} phases + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.phases = $util.emptyArray; + + /** + * Rollout metadata. + * @member {google.cloud.deploy.v1.IMetadata|null|undefined} metadata + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.metadata = null; + + /** + * Creates a new Rollout instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.Rollout + * @static + * @param {google.cloud.deploy.v1.IRollout=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.Rollout} Rollout instance + */ + Rollout.create = function create(properties) { + return new Rollout(properties); + }; + + /** + * Encodes the specified Rollout message. Does not implicitly {@link google.cloud.deploy.v1.Rollout.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.Rollout + * @static + * @param {google.cloud.deploy.v1.IRollout} message Rollout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Rollout.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) + for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.approveTime != null && Object.hasOwnProperty.call(message, "approveTime")) + $root.google.protobuf.Timestamp.encode(message.approveTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.enqueueTime != null && Object.hasOwnProperty.call(message, "enqueueTime")) + $root.google.protobuf.Timestamp.encode(message.enqueueTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.deployStartTime != null && Object.hasOwnProperty.call(message, "deployStartTime")) + $root.google.protobuf.Timestamp.encode(message.deployStartTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.deployEndTime != null && Object.hasOwnProperty.call(message, "deployEndTime")) + $root.google.protobuf.Timestamp.encode(message.deployEndTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.approvalState != null && Object.hasOwnProperty.call(message, "approvalState")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.approvalState); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.state); + if (message.failureReason != null && Object.hasOwnProperty.call(message, "failureReason")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.failureReason); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.etag); + if (message.deployingBuild != null && Object.hasOwnProperty.call(message, "deployingBuild")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.deployingBuild); + if (message.targetId != null && Object.hasOwnProperty.call(message, "targetId")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.targetId); + if (message.deployFailureCause != null && Object.hasOwnProperty.call(message, "deployFailureCause")) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.deployFailureCause); + if (message.phases != null && message.phases.length) + for (var i = 0; i < message.phases.length; ++i) + $root.google.cloud.deploy.v1.Phase.encode(message.phases[i], writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.cloud.deploy.v1.Metadata.encode(message.metadata, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Rollout message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Rollout.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.Rollout + * @static + * @param {google.cloud.deploy.v1.IRollout} message Rollout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Rollout.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Rollout message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.Rollout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.Rollout} Rollout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Rollout.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Rollout(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.uid = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + if (message.annotations === $util.emptyObject) + message.annotations = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.annotations[key] = value; + break; + } + case 5: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 6: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.approveTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.enqueueTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.deployStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 10: { + message.deployEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 18: { + message.targetId = reader.string(); + break; + } + case 12: { + message.approvalState = reader.int32(); + break; + } + case 13: { + message.state = reader.int32(); + break; + } + case 14: { + message.failureReason = reader.string(); + break; + } + case 17: { + message.deployingBuild = reader.string(); + break; + } + case 16: { + message.etag = reader.string(); + break; + } + case 19: { + message.deployFailureCause = reader.int32(); + break; + } + case 23: { + if (!(message.phases && message.phases.length)) + message.phases = []; + message.phases.push($root.google.cloud.deploy.v1.Phase.decode(reader, reader.uint32())); + break; + } + case 24: { + message.metadata = $root.google.cloud.deploy.v1.Metadata.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Rollout message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.Rollout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.Rollout} Rollout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Rollout.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Rollout message. + * @function verify + * @memberof google.cloud.deploy.v1.Rollout + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Rollout.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.annotations != null && message.hasOwnProperty("annotations")) { + if (!$util.isObject(message.annotations)) + return "annotations: object expected"; + var key = Object.keys(message.annotations); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.annotations[key[i]])) + return "annotations: string{k:string} expected"; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.approveTime != null && message.hasOwnProperty("approveTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.approveTime); + if (error) + return "approveTime." + error; + } + if (message.enqueueTime != null && message.hasOwnProperty("enqueueTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.enqueueTime); + if (error) + return "enqueueTime." + error; + } + if (message.deployStartTime != null && message.hasOwnProperty("deployStartTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.deployStartTime); + if (error) + return "deployStartTime." + error; + } + if (message.deployEndTime != null && message.hasOwnProperty("deployEndTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.deployEndTime); + if (error) + return "deployEndTime." + error; + } + if (message.targetId != null && message.hasOwnProperty("targetId")) + if (!$util.isString(message.targetId)) + return "targetId: string expected"; + if (message.approvalState != null && message.hasOwnProperty("approvalState")) + switch (message.approvalState) { + default: + return "approvalState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.failureReason != null && message.hasOwnProperty("failureReason")) + if (!$util.isString(message.failureReason)) + return "failureReason: string expected"; + if (message.deployingBuild != null && message.hasOwnProperty("deployingBuild")) + if (!$util.isString(message.deployingBuild)) + return "deployingBuild: string expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.deployFailureCause != null && message.hasOwnProperty("deployFailureCause")) + switch (message.deployFailureCause) { + default: + return "deployFailureCause: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.phases != null && message.hasOwnProperty("phases")) { + if (!Array.isArray(message.phases)) + return "phases: array expected"; + for (var i = 0; i < message.phases.length; ++i) { + var error = $root.google.cloud.deploy.v1.Phase.verify(message.phases[i]); + if (error) + return "phases." + error; + } + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.cloud.deploy.v1.Metadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + return null; + }; + + /** + * Creates a Rollout message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.Rollout + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.Rollout} Rollout + */ + Rollout.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.Rollout) + return object; + var message = new $root.google.cloud.deploy.v1.Rollout(); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.description != null) + message.description = String(object.description); + if (object.annotations) { + if (typeof object.annotations !== "object") + throw TypeError(".google.cloud.deploy.v1.Rollout.annotations: object expected"); + message.annotations = {}; + for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) + message.annotations[keys[i]] = String(object.annotations[keys[i]]); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.deploy.v1.Rollout.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.deploy.v1.Rollout.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.approveTime != null) { + if (typeof object.approveTime !== "object") + throw TypeError(".google.cloud.deploy.v1.Rollout.approveTime: object expected"); + message.approveTime = $root.google.protobuf.Timestamp.fromObject(object.approveTime); + } + if (object.enqueueTime != null) { + if (typeof object.enqueueTime !== "object") + throw TypeError(".google.cloud.deploy.v1.Rollout.enqueueTime: object expected"); + message.enqueueTime = $root.google.protobuf.Timestamp.fromObject(object.enqueueTime); + } + if (object.deployStartTime != null) { + if (typeof object.deployStartTime !== "object") + throw TypeError(".google.cloud.deploy.v1.Rollout.deployStartTime: object expected"); + message.deployStartTime = $root.google.protobuf.Timestamp.fromObject(object.deployStartTime); + } + if (object.deployEndTime != null) { + if (typeof object.deployEndTime !== "object") + throw TypeError(".google.cloud.deploy.v1.Rollout.deployEndTime: object expected"); + message.deployEndTime = $root.google.protobuf.Timestamp.fromObject(object.deployEndTime); + } + if (object.targetId != null) + message.targetId = String(object.targetId); + switch (object.approvalState) { + case "APPROVAL_STATE_UNSPECIFIED": + case 0: + message.approvalState = 0; + break; + case "NEEDS_APPROVAL": + case 1: + message.approvalState = 1; + break; + case "DOES_NOT_NEED_APPROVAL": + case 2: + message.approvalState = 2; + break; + case "APPROVED": + case 3: + message.approvalState = 3; + break; + case "REJECTED": + case 4: + message.approvalState = 4; + break; + } + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "SUCCEEDED": + case 1: + message.state = 1; + break; + case "FAILED": + case 2: + message.state = 2; + break; + case "IN_PROGRESS": + case 3: + message.state = 3; + break; + case "PENDING_APPROVAL": + case 4: + message.state = 4; + break; + case "APPROVAL_REJECTED": + case 5: + message.state = 5; + break; + case "PENDING": + case 6: + message.state = 6; + break; + case "PENDING_RELEASE": + case 7: + message.state = 7; + break; + } + if (object.failureReason != null) + message.failureReason = String(object.failureReason); + if (object.deployingBuild != null) + message.deployingBuild = String(object.deployingBuild); + if (object.etag != null) + message.etag = String(object.etag); + switch (object.deployFailureCause) { + case "FAILURE_CAUSE_UNSPECIFIED": + case 0: + message.deployFailureCause = 0; + break; + case "CLOUD_BUILD_UNAVAILABLE": + case 1: + message.deployFailureCause = 1; + break; + case "EXECUTION_FAILED": + case 2: + message.deployFailureCause = 2; + break; + case "DEADLINE_EXCEEDED": + case 3: + message.deployFailureCause = 3; + break; + case "RELEASE_FAILED": + case 4: + message.deployFailureCause = 4; + break; + case "RELEASE_ABANDONED": + case 5: + message.deployFailureCause = 5; + break; + case "VERIFICATION_CONFIG_NOT_FOUND": + case 6: + message.deployFailureCause = 6; + break; + } + if (object.phases) { + if (!Array.isArray(object.phases)) + throw TypeError(".google.cloud.deploy.v1.Rollout.phases: array expected"); + message.phases = []; + for (var i = 0; i < object.phases.length; ++i) { + if (typeof object.phases[i] !== "object") + throw TypeError(".google.cloud.deploy.v1.Rollout.phases: object expected"); + message.phases[i] = $root.google.cloud.deploy.v1.Phase.fromObject(object.phases[i]); + } + } + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.deploy.v1.Rollout.metadata: object expected"); + message.metadata = $root.google.cloud.deploy.v1.Metadata.fromObject(object.metadata); + } + return message; + }; + + /** + * Creates a plain object from a Rollout message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.Rollout + * @static + * @param {google.cloud.deploy.v1.Rollout} message Rollout + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Rollout.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.phases = []; + if (options.objects || options.defaults) { + object.annotations = {}; + object.labels = {}; + } + if (options.defaults) { + object.name = ""; + object.uid = ""; + object.description = ""; + object.createTime = null; + object.approveTime = null; + object.enqueueTime = null; + object.deployStartTime = null; + object.deployEndTime = null; + object.approvalState = options.enums === String ? "APPROVAL_STATE_UNSPECIFIED" : 0; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.failureReason = ""; + object.etag = ""; + object.deployingBuild = ""; + object.targetId = ""; + object.deployFailureCause = options.enums === String ? "FAILURE_CAUSE_UNSPECIFIED" : 0; + object.metadata = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + var keys2; + if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { + object.annotations = {}; + for (var j = 0; j < keys2.length; ++j) + object.annotations[keys2[j]] = message.annotations[keys2[j]]; + } + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.approveTime != null && message.hasOwnProperty("approveTime")) + object.approveTime = $root.google.protobuf.Timestamp.toObject(message.approveTime, options); + if (message.enqueueTime != null && message.hasOwnProperty("enqueueTime")) + object.enqueueTime = $root.google.protobuf.Timestamp.toObject(message.enqueueTime, options); + if (message.deployStartTime != null && message.hasOwnProperty("deployStartTime")) + object.deployStartTime = $root.google.protobuf.Timestamp.toObject(message.deployStartTime, options); + if (message.deployEndTime != null && message.hasOwnProperty("deployEndTime")) + object.deployEndTime = $root.google.protobuf.Timestamp.toObject(message.deployEndTime, options); + if (message.approvalState != null && message.hasOwnProperty("approvalState")) + object.approvalState = options.enums === String ? $root.google.cloud.deploy.v1.Rollout.ApprovalState[message.approvalState] : message.approvalState; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.deploy.v1.Rollout.State[message.state] : message.state; + if (message.failureReason != null && message.hasOwnProperty("failureReason")) + object.failureReason = message.failureReason; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.deployingBuild != null && message.hasOwnProperty("deployingBuild")) + object.deployingBuild = message.deployingBuild; + if (message.targetId != null && message.hasOwnProperty("targetId")) + object.targetId = message.targetId; + if (message.deployFailureCause != null && message.hasOwnProperty("deployFailureCause")) + object.deployFailureCause = options.enums === String ? $root.google.cloud.deploy.v1.Rollout.FailureCause[message.deployFailureCause] : message.deployFailureCause; + if (message.phases && message.phases.length) { + object.phases = []; + for (var j = 0; j < message.phases.length; ++j) + object.phases[j] = $root.google.cloud.deploy.v1.Phase.toObject(message.phases[j], options); + } + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.cloud.deploy.v1.Metadata.toObject(message.metadata, options); + return object; + }; + + /** + * Converts this Rollout to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.Rollout + * @instance + * @returns {Object.} JSON object + */ + Rollout.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Rollout + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.Rollout + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Rollout.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.Rollout"; + }; + + /** + * ApprovalState enum. + * @name google.cloud.deploy.v1.Rollout.ApprovalState + * @enum {number} + * @property {number} APPROVAL_STATE_UNSPECIFIED=0 APPROVAL_STATE_UNSPECIFIED value + * @property {number} NEEDS_APPROVAL=1 NEEDS_APPROVAL value + * @property {number} DOES_NOT_NEED_APPROVAL=2 DOES_NOT_NEED_APPROVAL value + * @property {number} APPROVED=3 APPROVED value + * @property {number} REJECTED=4 REJECTED value + */ + Rollout.ApprovalState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "APPROVAL_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NEEDS_APPROVAL"] = 1; + values[valuesById[2] = "DOES_NOT_NEED_APPROVAL"] = 2; + values[valuesById[3] = "APPROVED"] = 3; + values[valuesById[4] = "REJECTED"] = 4; + return values; + })(); + + /** + * State enum. + * @name google.cloud.deploy.v1.Rollout.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} SUCCEEDED=1 SUCCEEDED value + * @property {number} FAILED=2 FAILED value + * @property {number} IN_PROGRESS=3 IN_PROGRESS value + * @property {number} PENDING_APPROVAL=4 PENDING_APPROVAL value + * @property {number} APPROVAL_REJECTED=5 APPROVAL_REJECTED value + * @property {number} PENDING=6 PENDING value + * @property {number} PENDING_RELEASE=7 PENDING_RELEASE value + */ + Rollout.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SUCCEEDED"] = 1; + values[valuesById[2] = "FAILED"] = 2; + values[valuesById[3] = "IN_PROGRESS"] = 3; + values[valuesById[4] = "PENDING_APPROVAL"] = 4; + values[valuesById[5] = "APPROVAL_REJECTED"] = 5; + values[valuesById[6] = "PENDING"] = 6; + values[valuesById[7] = "PENDING_RELEASE"] = 7; + return values; + })(); + + /** + * FailureCause enum. + * @name google.cloud.deploy.v1.Rollout.FailureCause + * @enum {number} + * @property {number} FAILURE_CAUSE_UNSPECIFIED=0 FAILURE_CAUSE_UNSPECIFIED value + * @property {number} CLOUD_BUILD_UNAVAILABLE=1 CLOUD_BUILD_UNAVAILABLE value + * @property {number} EXECUTION_FAILED=2 EXECUTION_FAILED value + * @property {number} DEADLINE_EXCEEDED=3 DEADLINE_EXCEEDED value + * @property {number} RELEASE_FAILED=4 RELEASE_FAILED value + * @property {number} RELEASE_ABANDONED=5 RELEASE_ABANDONED value + * @property {number} VERIFICATION_CONFIG_NOT_FOUND=6 VERIFICATION_CONFIG_NOT_FOUND value + */ + Rollout.FailureCause = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FAILURE_CAUSE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD_BUILD_UNAVAILABLE"] = 1; + values[valuesById[2] = "EXECUTION_FAILED"] = 2; + values[valuesById[3] = "DEADLINE_EXCEEDED"] = 3; + values[valuesById[4] = "RELEASE_FAILED"] = 4; + values[valuesById[5] = "RELEASE_ABANDONED"] = 5; + values[valuesById[6] = "VERIFICATION_CONFIG_NOT_FOUND"] = 6; + return values; + })(); + + return Rollout; + })(); + + v1.Metadata = (function() { + + /** + * Properties of a Metadata. + * @memberof google.cloud.deploy.v1 + * @interface IMetadata + * @property {google.cloud.deploy.v1.ICloudRunMetadata|null} [cloudRun] Metadata cloudRun + */ + + /** + * Constructs a new Metadata. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a Metadata. + * @implements IMetadata + * @constructor + * @param {google.cloud.deploy.v1.IMetadata=} [properties] Properties to set + */ + function Metadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Metadata cloudRun. + * @member {google.cloud.deploy.v1.ICloudRunMetadata|null|undefined} cloudRun + * @memberof google.cloud.deploy.v1.Metadata + * @instance + */ + Metadata.prototype.cloudRun = null; + + /** + * Creates a new Metadata instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.Metadata + * @static + * @param {google.cloud.deploy.v1.IMetadata=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.Metadata} Metadata instance + */ + Metadata.create = function create(properties) { + return new Metadata(properties); + }; + + /** + * Encodes the specified Metadata message. Does not implicitly {@link google.cloud.deploy.v1.Metadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.Metadata + * @static + * @param {google.cloud.deploy.v1.IMetadata} message Metadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cloudRun != null && Object.hasOwnProperty.call(message, "cloudRun")) + $root.google.cloud.deploy.v1.CloudRunMetadata.encode(message.cloudRun, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Metadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.Metadata + * @static + * @param {google.cloud.deploy.v1.IMetadata} message Metadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Metadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.Metadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.Metadata} Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Metadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cloudRun = $root.google.cloud.deploy.v1.CloudRunMetadata.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Metadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.Metadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.Metadata} Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Metadata message. + * @function verify + * @memberof google.cloud.deploy.v1.Metadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cloudRun != null && message.hasOwnProperty("cloudRun")) { + var error = $root.google.cloud.deploy.v1.CloudRunMetadata.verify(message.cloudRun); + if (error) + return "cloudRun." + error; + } + return null; + }; + + /** + * Creates a Metadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.Metadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.Metadata} Metadata + */ + Metadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.Metadata) + return object; + var message = new $root.google.cloud.deploy.v1.Metadata(); + if (object.cloudRun != null) { + if (typeof object.cloudRun !== "object") + throw TypeError(".google.cloud.deploy.v1.Metadata.cloudRun: object expected"); + message.cloudRun = $root.google.cloud.deploy.v1.CloudRunMetadata.fromObject(object.cloudRun); + } + return message; + }; + + /** + * Creates a plain object from a Metadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.Metadata + * @static + * @param {google.cloud.deploy.v1.Metadata} message Metadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.cloudRun = null; + if (message.cloudRun != null && message.hasOwnProperty("cloudRun")) + object.cloudRun = $root.google.cloud.deploy.v1.CloudRunMetadata.toObject(message.cloudRun, options); + return object; + }; + + /** + * Converts this Metadata to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.Metadata + * @instance + * @returns {Object.} JSON object + */ + Metadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Metadata + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.Metadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Metadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.Metadata"; + }; + + return Metadata; + })(); + + v1.DeployJobRunMetadata = (function() { + + /** + * Properties of a DeployJobRunMetadata. + * @memberof google.cloud.deploy.v1 + * @interface IDeployJobRunMetadata + * @property {google.cloud.deploy.v1.ICloudRunMetadata|null} [cloudRun] DeployJobRunMetadata cloudRun + */ + + /** + * Constructs a new DeployJobRunMetadata. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a DeployJobRunMetadata. + * @implements IDeployJobRunMetadata + * @constructor + * @param {google.cloud.deploy.v1.IDeployJobRunMetadata=} [properties] Properties to set + */ + function DeployJobRunMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeployJobRunMetadata cloudRun. + * @member {google.cloud.deploy.v1.ICloudRunMetadata|null|undefined} cloudRun + * @memberof google.cloud.deploy.v1.DeployJobRunMetadata + * @instance + */ + DeployJobRunMetadata.prototype.cloudRun = null; + + /** + * Creates a new DeployJobRunMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.DeployJobRunMetadata + * @static + * @param {google.cloud.deploy.v1.IDeployJobRunMetadata=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.DeployJobRunMetadata} DeployJobRunMetadata instance + */ + DeployJobRunMetadata.create = function create(properties) { + return new DeployJobRunMetadata(properties); + }; + + /** + * Encodes the specified DeployJobRunMetadata message. Does not implicitly {@link google.cloud.deploy.v1.DeployJobRunMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.DeployJobRunMetadata + * @static + * @param {google.cloud.deploy.v1.IDeployJobRunMetadata} message DeployJobRunMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeployJobRunMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cloudRun != null && Object.hasOwnProperty.call(message, "cloudRun")) + $root.google.cloud.deploy.v1.CloudRunMetadata.encode(message.cloudRun, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DeployJobRunMetadata message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeployJobRunMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.DeployJobRunMetadata + * @static + * @param {google.cloud.deploy.v1.IDeployJobRunMetadata} message DeployJobRunMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeployJobRunMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeployJobRunMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.DeployJobRunMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.DeployJobRunMetadata} DeployJobRunMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeployJobRunMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.DeployJobRunMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cloudRun = $root.google.cloud.deploy.v1.CloudRunMetadata.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeployJobRunMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.DeployJobRunMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.DeployJobRunMetadata} DeployJobRunMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeployJobRunMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeployJobRunMetadata message. + * @function verify + * @memberof google.cloud.deploy.v1.DeployJobRunMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeployJobRunMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cloudRun != null && message.hasOwnProperty("cloudRun")) { + var error = $root.google.cloud.deploy.v1.CloudRunMetadata.verify(message.cloudRun); + if (error) + return "cloudRun." + error; + } + return null; + }; + + /** + * Creates a DeployJobRunMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.DeployJobRunMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.DeployJobRunMetadata} DeployJobRunMetadata + */ + DeployJobRunMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.DeployJobRunMetadata) + return object; + var message = new $root.google.cloud.deploy.v1.DeployJobRunMetadata(); + if (object.cloudRun != null) { + if (typeof object.cloudRun !== "object") + throw TypeError(".google.cloud.deploy.v1.DeployJobRunMetadata.cloudRun: object expected"); + message.cloudRun = $root.google.cloud.deploy.v1.CloudRunMetadata.fromObject(object.cloudRun); + } + return message; + }; + + /** + * Creates a plain object from a DeployJobRunMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.DeployJobRunMetadata + * @static + * @param {google.cloud.deploy.v1.DeployJobRunMetadata} message DeployJobRunMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeployJobRunMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.cloudRun = null; + if (message.cloudRun != null && message.hasOwnProperty("cloudRun")) + object.cloudRun = $root.google.cloud.deploy.v1.CloudRunMetadata.toObject(message.cloudRun, options); + return object; + }; + + /** + * Converts this DeployJobRunMetadata to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.DeployJobRunMetadata + * @instance + * @returns {Object.} JSON object + */ + DeployJobRunMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeployJobRunMetadata + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.DeployJobRunMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeployJobRunMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.DeployJobRunMetadata"; + }; + + return DeployJobRunMetadata; + })(); + + v1.CloudRunMetadata = (function() { + + /** + * Properties of a CloudRunMetadata. + * @memberof google.cloud.deploy.v1 + * @interface ICloudRunMetadata + * @property {string|null} [service] CloudRunMetadata service + * @property {Array.|null} [serviceUrls] CloudRunMetadata serviceUrls + * @property {string|null} [revision] CloudRunMetadata revision + */ + + /** + * Constructs a new CloudRunMetadata. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a CloudRunMetadata. + * @implements ICloudRunMetadata + * @constructor + * @param {google.cloud.deploy.v1.ICloudRunMetadata=} [properties] Properties to set + */ + function CloudRunMetadata(properties) { + this.serviceUrls = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudRunMetadata service. + * @member {string} service + * @memberof google.cloud.deploy.v1.CloudRunMetadata + * @instance + */ + CloudRunMetadata.prototype.service = ""; + + /** + * CloudRunMetadata serviceUrls. + * @member {Array.} serviceUrls + * @memberof google.cloud.deploy.v1.CloudRunMetadata + * @instance + */ + CloudRunMetadata.prototype.serviceUrls = $util.emptyArray; + + /** + * CloudRunMetadata revision. + * @member {string} revision + * @memberof google.cloud.deploy.v1.CloudRunMetadata + * @instance + */ + CloudRunMetadata.prototype.revision = ""; + + /** + * Creates a new CloudRunMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.CloudRunMetadata + * @static + * @param {google.cloud.deploy.v1.ICloudRunMetadata=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.CloudRunMetadata} CloudRunMetadata instance + */ + CloudRunMetadata.create = function create(properties) { + return new CloudRunMetadata(properties); + }; + + /** + * Encodes the specified CloudRunMetadata message. Does not implicitly {@link google.cloud.deploy.v1.CloudRunMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.CloudRunMetadata + * @static + * @param {google.cloud.deploy.v1.ICloudRunMetadata} message CloudRunMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudRunMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); + if (message.serviceUrls != null && message.serviceUrls.length) + for (var i = 0; i < message.serviceUrls.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.serviceUrls[i]); + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.revision); + return writer; + }; + + /** + * Encodes the specified CloudRunMetadata message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CloudRunMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.CloudRunMetadata + * @static + * @param {google.cloud.deploy.v1.ICloudRunMetadata} message CloudRunMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudRunMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudRunMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.CloudRunMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.CloudRunMetadata} CloudRunMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudRunMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.CloudRunMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.service = reader.string(); + break; + } + case 2: { + if (!(message.serviceUrls && message.serviceUrls.length)) + message.serviceUrls = []; + message.serviceUrls.push(reader.string()); + break; + } + case 3: { + message.revision = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudRunMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.CloudRunMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.CloudRunMetadata} CloudRunMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudRunMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudRunMetadata message. + * @function verify + * @memberof google.cloud.deploy.v1.CloudRunMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudRunMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + if (message.serviceUrls != null && message.hasOwnProperty("serviceUrls")) { + if (!Array.isArray(message.serviceUrls)) + return "serviceUrls: array expected"; + for (var i = 0; i < message.serviceUrls.length; ++i) + if (!$util.isString(message.serviceUrls[i])) + return "serviceUrls: string[] expected"; + } + if (message.revision != null && message.hasOwnProperty("revision")) + if (!$util.isString(message.revision)) + return "revision: string expected"; + return null; + }; + + /** + * Creates a CloudRunMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.CloudRunMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.CloudRunMetadata} CloudRunMetadata + */ + CloudRunMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.CloudRunMetadata) + return object; + var message = new $root.google.cloud.deploy.v1.CloudRunMetadata(); + if (object.service != null) + message.service = String(object.service); + if (object.serviceUrls) { + if (!Array.isArray(object.serviceUrls)) + throw TypeError(".google.cloud.deploy.v1.CloudRunMetadata.serviceUrls: array expected"); + message.serviceUrls = []; + for (var i = 0; i < object.serviceUrls.length; ++i) + message.serviceUrls[i] = String(object.serviceUrls[i]); + } + if (object.revision != null) + message.revision = String(object.revision); + return message; + }; + + /** + * Creates a plain object from a CloudRunMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.CloudRunMetadata + * @static + * @param {google.cloud.deploy.v1.CloudRunMetadata} message CloudRunMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudRunMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.serviceUrls = []; + if (options.defaults) { + object.service = ""; + object.revision = ""; + } + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + if (message.serviceUrls && message.serviceUrls.length) { + object.serviceUrls = []; + for (var j = 0; j < message.serviceUrls.length; ++j) + object.serviceUrls[j] = message.serviceUrls[j]; + } + if (message.revision != null && message.hasOwnProperty("revision")) + object.revision = message.revision; + return object; + }; + + /** + * Converts this CloudRunMetadata to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.CloudRunMetadata + * @instance + * @returns {Object.} JSON object + */ + CloudRunMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudRunMetadata + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.CloudRunMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudRunMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.CloudRunMetadata"; + }; + + return CloudRunMetadata; + })(); + + v1.Phase = (function() { + + /** + * Properties of a Phase. + * @memberof google.cloud.deploy.v1 + * @interface IPhase + * @property {string|null} [id] Phase id + * @property {google.cloud.deploy.v1.Phase.State|null} [state] Phase state + * @property {google.cloud.deploy.v1.IDeploymentJobs|null} [deploymentJobs] Phase deploymentJobs + */ + + /** + * Constructs a new Phase. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a Phase. + * @implements IPhase + * @constructor + * @param {google.cloud.deploy.v1.IPhase=} [properties] Properties to set + */ + function Phase(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Phase id. + * @member {string} id + * @memberof google.cloud.deploy.v1.Phase + * @instance + */ + Phase.prototype.id = ""; + + /** + * Phase state. + * @member {google.cloud.deploy.v1.Phase.State} state + * @memberof google.cloud.deploy.v1.Phase + * @instance + */ + Phase.prototype.state = 0; + + /** + * Phase deploymentJobs. + * @member {google.cloud.deploy.v1.IDeploymentJobs|null|undefined} deploymentJobs + * @memberof google.cloud.deploy.v1.Phase + * @instance + */ + Phase.prototype.deploymentJobs = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Phase jobs. + * @member {"deploymentJobs"|undefined} jobs + * @memberof google.cloud.deploy.v1.Phase + * @instance + */ + Object.defineProperty(Phase.prototype, "jobs", { + get: $util.oneOfGetter($oneOfFields = ["deploymentJobs"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Phase instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.Phase + * @static + * @param {google.cloud.deploy.v1.IPhase=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.Phase} Phase instance + */ + Phase.create = function create(properties) { + return new Phase(properties); + }; + + /** + * Encodes the specified Phase message. Does not implicitly {@link google.cloud.deploy.v1.Phase.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.Phase + * @static + * @param {google.cloud.deploy.v1.IPhase} message Phase message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Phase.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.deploymentJobs != null && Object.hasOwnProperty.call(message, "deploymentJobs")) + $root.google.cloud.deploy.v1.DeploymentJobs.encode(message.deploymentJobs, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Phase message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Phase.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.Phase + * @static + * @param {google.cloud.deploy.v1.IPhase} message Phase message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Phase.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Phase message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.Phase + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.Phase} Phase + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Phase.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Phase(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + case 3: { + message.state = reader.int32(); + break; + } + case 4: { + message.deploymentJobs = $root.google.cloud.deploy.v1.DeploymentJobs.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Phase message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.Phase + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.Phase} Phase + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Phase.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Phase message. + * @function verify + * @memberof google.cloud.deploy.v1.Phase + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Phase.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.deploymentJobs != null && message.hasOwnProperty("deploymentJobs")) { + properties.jobs = 1; + { + var error = $root.google.cloud.deploy.v1.DeploymentJobs.verify(message.deploymentJobs); + if (error) + return "deploymentJobs." + error; + } + } + return null; + }; + + /** + * Creates a Phase message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.Phase + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.Phase} Phase + */ + Phase.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.Phase) + return object; + var message = new $root.google.cloud.deploy.v1.Phase(); + if (object.id != null) + message.id = String(object.id); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "PENDING": + case 1: + message.state = 1; + break; + case "IN_PROGRESS": + case 2: + message.state = 2; + break; + case "SUCCEEDED": + case 3: + message.state = 3; + break; + case "FAILED": + case 4: + message.state = 4; + break; + case "ABORTED": + case 5: + message.state = 5; + break; + } + if (object.deploymentJobs != null) { + if (typeof object.deploymentJobs !== "object") + throw TypeError(".google.cloud.deploy.v1.Phase.deploymentJobs: object expected"); + message.deploymentJobs = $root.google.cloud.deploy.v1.DeploymentJobs.fromObject(object.deploymentJobs); + } + return message; + }; + + /** + * Creates a plain object from a Phase message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.Phase + * @static + * @param {google.cloud.deploy.v1.Phase} message Phase + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Phase.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.deploy.v1.Phase.State[message.state] : message.state; + if (message.deploymentJobs != null && message.hasOwnProperty("deploymentJobs")) { + object.deploymentJobs = $root.google.cloud.deploy.v1.DeploymentJobs.toObject(message.deploymentJobs, options); + if (options.oneofs) + object.jobs = "deploymentJobs"; + } + return object; + }; + + /** + * Converts this Phase to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.Phase + * @instance + * @returns {Object.} JSON object + */ + Phase.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Phase + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.Phase + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Phase.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.Phase"; + }; + + /** + * State enum. + * @name google.cloud.deploy.v1.Phase.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} PENDING=1 PENDING value + * @property {number} IN_PROGRESS=2 IN_PROGRESS value + * @property {number} SUCCEEDED=3 SUCCEEDED value + * @property {number} FAILED=4 FAILED value + * @property {number} ABORTED=5 ABORTED value + */ + Phase.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PENDING"] = 1; + values[valuesById[2] = "IN_PROGRESS"] = 2; + values[valuesById[3] = "SUCCEEDED"] = 3; + values[valuesById[4] = "FAILED"] = 4; + values[valuesById[5] = "ABORTED"] = 5; + return values; + })(); + + return Phase; + })(); + + v1.DeploymentJobs = (function() { + + /** + * Properties of a DeploymentJobs. + * @memberof google.cloud.deploy.v1 + * @interface IDeploymentJobs + * @property {google.cloud.deploy.v1.IJob|null} [deployJob] DeploymentJobs deployJob + * @property {google.cloud.deploy.v1.IJob|null} [verifyJob] DeploymentJobs verifyJob + */ + + /** + * Constructs a new DeploymentJobs. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a DeploymentJobs. + * @implements IDeploymentJobs + * @constructor + * @param {google.cloud.deploy.v1.IDeploymentJobs=} [properties] Properties to set + */ + function DeploymentJobs(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeploymentJobs deployJob. + * @member {google.cloud.deploy.v1.IJob|null|undefined} deployJob + * @memberof google.cloud.deploy.v1.DeploymentJobs + * @instance + */ + DeploymentJobs.prototype.deployJob = null; + + /** + * DeploymentJobs verifyJob. + * @member {google.cloud.deploy.v1.IJob|null|undefined} verifyJob + * @memberof google.cloud.deploy.v1.DeploymentJobs + * @instance + */ + DeploymentJobs.prototype.verifyJob = null; + + /** + * Creates a new DeploymentJobs instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.DeploymentJobs + * @static + * @param {google.cloud.deploy.v1.IDeploymentJobs=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.DeploymentJobs} DeploymentJobs instance + */ + DeploymentJobs.create = function create(properties) { + return new DeploymentJobs(properties); + }; + + /** + * Encodes the specified DeploymentJobs message. Does not implicitly {@link google.cloud.deploy.v1.DeploymentJobs.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.DeploymentJobs + * @static + * @param {google.cloud.deploy.v1.IDeploymentJobs} message DeploymentJobs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeploymentJobs.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deployJob != null && Object.hasOwnProperty.call(message, "deployJob")) + $root.google.cloud.deploy.v1.Job.encode(message.deployJob, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.verifyJob != null && Object.hasOwnProperty.call(message, "verifyJob")) + $root.google.cloud.deploy.v1.Job.encode(message.verifyJob, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DeploymentJobs message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeploymentJobs.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.DeploymentJobs + * @static + * @param {google.cloud.deploy.v1.IDeploymentJobs} message DeploymentJobs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeploymentJobs.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeploymentJobs message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.DeploymentJobs + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.DeploymentJobs} DeploymentJobs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeploymentJobs.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.DeploymentJobs(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.deployJob = $root.google.cloud.deploy.v1.Job.decode(reader, reader.uint32()); + break; + } + case 2: { + message.verifyJob = $root.google.cloud.deploy.v1.Job.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeploymentJobs message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.DeploymentJobs + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.DeploymentJobs} DeploymentJobs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeploymentJobs.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeploymentJobs message. + * @function verify + * @memberof google.cloud.deploy.v1.DeploymentJobs + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeploymentJobs.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deployJob != null && message.hasOwnProperty("deployJob")) { + var error = $root.google.cloud.deploy.v1.Job.verify(message.deployJob); + if (error) + return "deployJob." + error; + } + if (message.verifyJob != null && message.hasOwnProperty("verifyJob")) { + var error = $root.google.cloud.deploy.v1.Job.verify(message.verifyJob); + if (error) + return "verifyJob." + error; + } + return null; + }; + + /** + * Creates a DeploymentJobs message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.DeploymentJobs + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.DeploymentJobs} DeploymentJobs + */ + DeploymentJobs.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.DeploymentJobs) + return object; + var message = new $root.google.cloud.deploy.v1.DeploymentJobs(); + if (object.deployJob != null) { + if (typeof object.deployJob !== "object") + throw TypeError(".google.cloud.deploy.v1.DeploymentJobs.deployJob: object expected"); + message.deployJob = $root.google.cloud.deploy.v1.Job.fromObject(object.deployJob); + } + if (object.verifyJob != null) { + if (typeof object.verifyJob !== "object") + throw TypeError(".google.cloud.deploy.v1.DeploymentJobs.verifyJob: object expected"); + message.verifyJob = $root.google.cloud.deploy.v1.Job.fromObject(object.verifyJob); + } + return message; + }; + + /** + * Creates a plain object from a DeploymentJobs message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.DeploymentJobs + * @static + * @param {google.cloud.deploy.v1.DeploymentJobs} message DeploymentJobs + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeploymentJobs.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.deployJob = null; + object.verifyJob = null; + } + if (message.deployJob != null && message.hasOwnProperty("deployJob")) + object.deployJob = $root.google.cloud.deploy.v1.Job.toObject(message.deployJob, options); + if (message.verifyJob != null && message.hasOwnProperty("verifyJob")) + object.verifyJob = $root.google.cloud.deploy.v1.Job.toObject(message.verifyJob, options); + return object; + }; + + /** + * Converts this DeploymentJobs to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.DeploymentJobs + * @instance + * @returns {Object.} JSON object + */ + DeploymentJobs.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeploymentJobs + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.DeploymentJobs + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeploymentJobs.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.DeploymentJobs"; + }; + + return DeploymentJobs; + })(); + + v1.Job = (function() { + + /** + * Properties of a Job. + * @memberof google.cloud.deploy.v1 + * @interface IJob + * @property {string|null} [id] Job id + * @property {google.cloud.deploy.v1.Job.State|null} [state] Job state + * @property {string|null} [jobRun] Job jobRun + * @property {google.cloud.deploy.v1.IDeployJob|null} [deployJob] Job deployJob + * @property {google.cloud.deploy.v1.IVerifyJob|null} [verifyJob] Job verifyJob + */ + + /** + * Constructs a new Job. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a Job. + * @implements IJob + * @constructor + * @param {google.cloud.deploy.v1.IJob=} [properties] Properties to set + */ + function Job(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Job id. + * @member {string} id + * @memberof google.cloud.deploy.v1.Job + * @instance + */ + Job.prototype.id = ""; + + /** + * Job state. + * @member {google.cloud.deploy.v1.Job.State} state + * @memberof google.cloud.deploy.v1.Job + * @instance + */ + Job.prototype.state = 0; + + /** + * Job jobRun. + * @member {string} jobRun + * @memberof google.cloud.deploy.v1.Job + * @instance + */ + Job.prototype.jobRun = ""; + + /** + * Job deployJob. + * @member {google.cloud.deploy.v1.IDeployJob|null|undefined} deployJob + * @memberof google.cloud.deploy.v1.Job + * @instance + */ + Job.prototype.deployJob = null; + + /** + * Job verifyJob. + * @member {google.cloud.deploy.v1.IVerifyJob|null|undefined} verifyJob + * @memberof google.cloud.deploy.v1.Job + * @instance + */ + Job.prototype.verifyJob = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Job jobType. + * @member {"deployJob"|"verifyJob"|undefined} jobType + * @memberof google.cloud.deploy.v1.Job + * @instance + */ + Object.defineProperty(Job.prototype, "jobType", { + get: $util.oneOfGetter($oneOfFields = ["deployJob", "verifyJob"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Job instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.Job + * @static + * @param {google.cloud.deploy.v1.IJob=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.Job} Job instance + */ + Job.create = function create(properties) { + return new Job(properties); + }; + + /** + * Encodes the specified Job message. Does not implicitly {@link google.cloud.deploy.v1.Job.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.Job + * @static + * @param {google.cloud.deploy.v1.IJob} message Job message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Job.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); + if (message.jobRun != null && Object.hasOwnProperty.call(message, "jobRun")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.jobRun); + if (message.deployJob != null && Object.hasOwnProperty.call(message, "deployJob")) + $root.google.cloud.deploy.v1.DeployJob.encode(message.deployJob, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.verifyJob != null && Object.hasOwnProperty.call(message, "verifyJob")) + $root.google.cloud.deploy.v1.VerifyJob.encode(message.verifyJob, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; - /** - * Decodes a TargetRender message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.deploy.v1.Release.TargetRender - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.Release.TargetRender} TargetRender - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TargetRender.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Release.TargetRender(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.renderingBuild = reader.string(); - break; - } - case 2: { - message.renderingState = reader.int32(); - break; - } - case 4: { - message.failureCause = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Encodes the specified Job message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Job.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.Job + * @static + * @param {google.cloud.deploy.v1.IJob} message Job message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Job.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Job message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.Job + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.Job} Job + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Job.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Job(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); break; } - } - return message; - }; - - /** - * Decodes a TargetRender message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.deploy.v1.Release.TargetRender - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.Release.TargetRender} TargetRender - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TargetRender.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TargetRender message. - * @function verify - * @memberof google.cloud.deploy.v1.Release.TargetRender - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TargetRender.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.renderingBuild != null && message.hasOwnProperty("renderingBuild")) - if (!$util.isString(message.renderingBuild)) - return "renderingBuild: string expected"; - if (message.renderingState != null && message.hasOwnProperty("renderingState")) - switch (message.renderingState) { - default: - return "renderingState: enum value expected"; - case 0: - case 1: - case 2: - case 3: + case 2: { + message.state = reader.int32(); break; } - if (message.failureCause != null && message.hasOwnProperty("failureCause")) - switch (message.failureCause) { - default: - return "failureCause: enum value expected"; - case 0: - case 1: - case 2: + case 3: { + message.jobRun = reader.string(); break; } - return null; - }; + case 4: { + message.deployJob = $root.google.cloud.deploy.v1.DeployJob.decode(reader, reader.uint32()); + break; + } + case 5: { + message.verifyJob = $root.google.cloud.deploy.v1.VerifyJob.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a TargetRender message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.deploy.v1.Release.TargetRender - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.Release.TargetRender} TargetRender - */ - TargetRender.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.Release.TargetRender) - return object; - var message = new $root.google.cloud.deploy.v1.Release.TargetRender(); - if (object.renderingBuild != null) - message.renderingBuild = String(object.renderingBuild); - switch (object.renderingState) { - case "TARGET_RENDER_STATE_UNSPECIFIED": + /** + * Decodes a Job message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.Job + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.Job} Job + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Job.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Job message. + * @function verify + * @memberof google.cloud.deploy.v1.Job + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Job.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; case 0: - message.renderingState = 0; - break; - case "SUCCEEDED": case 1: - message.renderingState = 1; - break; - case "FAILED": case 2: - message.renderingState = 2; - break; - case "IN_PROGRESS": case 3: - message.renderingState = 3; + case 4: + case 5: + case 6: break; } - switch (object.failureCause) { - case "FAILURE_CAUSE_UNSPECIFIED": - case 0: - message.failureCause = 0; - break; - case "CLOUD_BUILD_UNAVAILABLE": - case 1: - message.failureCause = 1; - break; - case "EXECUTION_FAILED": - case 2: - message.failureCause = 2; - break; + if (message.jobRun != null && message.hasOwnProperty("jobRun")) + if (!$util.isString(message.jobRun)) + return "jobRun: string expected"; + if (message.deployJob != null && message.hasOwnProperty("deployJob")) { + properties.jobType = 1; + { + var error = $root.google.cloud.deploy.v1.DeployJob.verify(message.deployJob); + if (error) + return "deployJob." + error; } - return message; - }; - - /** - * Creates a plain object from a TargetRender message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.deploy.v1.Release.TargetRender - * @static - * @param {google.cloud.deploy.v1.Release.TargetRender} message TargetRender - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TargetRender.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.renderingBuild = ""; - object.renderingState = options.enums === String ? "TARGET_RENDER_STATE_UNSPECIFIED" : 0; - object.failureCause = options.enums === String ? "FAILURE_CAUSE_UNSPECIFIED" : 0; + } + if (message.verifyJob != null && message.hasOwnProperty("verifyJob")) { + if (properties.jobType === 1) + return "jobType: multiple values"; + properties.jobType = 1; + { + var error = $root.google.cloud.deploy.v1.VerifyJob.verify(message.verifyJob); + if (error) + return "verifyJob." + error; } - if (message.renderingBuild != null && message.hasOwnProperty("renderingBuild")) - object.renderingBuild = message.renderingBuild; - if (message.renderingState != null && message.hasOwnProperty("renderingState")) - object.renderingState = options.enums === String ? $root.google.cloud.deploy.v1.Release.TargetRender.TargetRenderState[message.renderingState] : message.renderingState; - if (message.failureCause != null && message.hasOwnProperty("failureCause")) - object.failureCause = options.enums === String ? $root.google.cloud.deploy.v1.Release.TargetRender.FailureCause[message.failureCause] : message.failureCause; - return object; - }; + } + return null; + }; - /** - * Converts this TargetRender to JSON. - * @function toJSON - * @memberof google.cloud.deploy.v1.Release.TargetRender - * @instance - * @returns {Object.} JSON object - */ - TargetRender.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a Job message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.Job + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.Job} Job + */ + Job.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.Job) + return object; + var message = new $root.google.cloud.deploy.v1.Job(); + if (object.id != null) + message.id = String(object.id); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "PENDING": + case 1: + message.state = 1; + break; + case "DISABLED": + case 2: + message.state = 2; + break; + case "IN_PROGRESS": + case 3: + message.state = 3; + break; + case "SUCCEEDED": + case 4: + message.state = 4; + break; + case "FAILED": + case 5: + message.state = 5; + break; + case "ABORTED": + case 6: + message.state = 6; + break; + } + if (object.jobRun != null) + message.jobRun = String(object.jobRun); + if (object.deployJob != null) { + if (typeof object.deployJob !== "object") + throw TypeError(".google.cloud.deploy.v1.Job.deployJob: object expected"); + message.deployJob = $root.google.cloud.deploy.v1.DeployJob.fromObject(object.deployJob); + } + if (object.verifyJob != null) { + if (typeof object.verifyJob !== "object") + throw TypeError(".google.cloud.deploy.v1.Job.verifyJob: object expected"); + message.verifyJob = $root.google.cloud.deploy.v1.VerifyJob.fromObject(object.verifyJob); + } + return message; + }; - /** - * Gets the default type url for TargetRender - * @function getTypeUrl - * @memberof google.cloud.deploy.v1.Release.TargetRender - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TargetRender.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.deploy.v1.Release.TargetRender"; - }; + /** + * Creates a plain object from a Job message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.Job + * @static + * @param {google.cloud.deploy.v1.Job} message Job + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Job.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.jobRun = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.deploy.v1.Job.State[message.state] : message.state; + if (message.jobRun != null && message.hasOwnProperty("jobRun")) + object.jobRun = message.jobRun; + if (message.deployJob != null && message.hasOwnProperty("deployJob")) { + object.deployJob = $root.google.cloud.deploy.v1.DeployJob.toObject(message.deployJob, options); + if (options.oneofs) + object.jobType = "deployJob"; + } + if (message.verifyJob != null && message.hasOwnProperty("verifyJob")) { + object.verifyJob = $root.google.cloud.deploy.v1.VerifyJob.toObject(message.verifyJob, options); + if (options.oneofs) + object.jobType = "verifyJob"; + } + return object; + }; - /** - * TargetRenderState enum. - * @name google.cloud.deploy.v1.Release.TargetRender.TargetRenderState - * @enum {number} - * @property {number} TARGET_RENDER_STATE_UNSPECIFIED=0 TARGET_RENDER_STATE_UNSPECIFIED value - * @property {number} SUCCEEDED=1 SUCCEEDED value - * @property {number} FAILED=2 FAILED value - * @property {number} IN_PROGRESS=3 IN_PROGRESS value - */ - TargetRender.TargetRenderState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TARGET_RENDER_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SUCCEEDED"] = 1; - values[valuesById[2] = "FAILED"] = 2; - values[valuesById[3] = "IN_PROGRESS"] = 3; - return values; - })(); + /** + * Converts this Job to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.Job + * @instance + * @returns {Object.} JSON object + */ + Job.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * FailureCause enum. - * @name google.cloud.deploy.v1.Release.TargetRender.FailureCause - * @enum {number} - * @property {number} FAILURE_CAUSE_UNSPECIFIED=0 FAILURE_CAUSE_UNSPECIFIED value - * @property {number} CLOUD_BUILD_UNAVAILABLE=1 CLOUD_BUILD_UNAVAILABLE value - * @property {number} EXECUTION_FAILED=2 EXECUTION_FAILED value - */ - TargetRender.FailureCause = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FAILURE_CAUSE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CLOUD_BUILD_UNAVAILABLE"] = 1; - values[valuesById[2] = "EXECUTION_FAILED"] = 2; - return values; - })(); + /** + * Gets the default type url for Job + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.Job + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Job.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.Job"; + }; - return TargetRender; + /** + * State enum. + * @name google.cloud.deploy.v1.Job.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} PENDING=1 PENDING value + * @property {number} DISABLED=2 DISABLED value + * @property {number} IN_PROGRESS=3 IN_PROGRESS value + * @property {number} SUCCEEDED=4 SUCCEEDED value + * @property {number} FAILED=5 FAILED value + * @property {number} ABORTED=6 ABORTED value + */ + Job.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PENDING"] = 1; + values[valuesById[2] = "DISABLED"] = 2; + values[valuesById[3] = "IN_PROGRESS"] = 3; + values[valuesById[4] = "SUCCEEDED"] = 4; + values[valuesById[5] = "FAILED"] = 5; + values[valuesById[6] = "ABORTED"] = 6; + return values; })(); - return Release; + return Job; })(); - v1.BuildArtifact = (function() { + v1.DeployJob = (function() { /** - * Properties of a BuildArtifact. + * Properties of a DeployJob. * @memberof google.cloud.deploy.v1 - * @interface IBuildArtifact - * @property {string|null} [image] BuildArtifact image - * @property {string|null} [tag] BuildArtifact tag + * @interface IDeployJob */ /** - * Constructs a new BuildArtifact. + * Constructs a new DeployJob. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a BuildArtifact. - * @implements IBuildArtifact + * @classdesc Represents a DeployJob. + * @implements IDeployJob * @constructor - * @param {google.cloud.deploy.v1.IBuildArtifact=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IDeployJob=} [properties] Properties to set */ - function BuildArtifact(properties) { + function DeployJob(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8976,91 +14056,238 @@ } /** - * BuildArtifact image. - * @member {string} image - * @memberof google.cloud.deploy.v1.BuildArtifact - * @instance + * Creates a new DeployJob instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.DeployJob + * @static + * @param {google.cloud.deploy.v1.IDeployJob=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.DeployJob} DeployJob instance */ - BuildArtifact.prototype.image = ""; + DeployJob.create = function create(properties) { + return new DeployJob(properties); + }; /** - * BuildArtifact tag. - * @member {string} tag - * @memberof google.cloud.deploy.v1.BuildArtifact + * Encodes the specified DeployJob message. Does not implicitly {@link google.cloud.deploy.v1.DeployJob.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.DeployJob + * @static + * @param {google.cloud.deploy.v1.IDeployJob} message DeployJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeployJob.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified DeployJob message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeployJob.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.DeployJob + * @static + * @param {google.cloud.deploy.v1.IDeployJob} message DeployJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeployJob.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeployJob message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.DeployJob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.DeployJob} DeployJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeployJob.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.DeployJob(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeployJob message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.DeployJob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.DeployJob} DeployJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeployJob.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeployJob message. + * @function verify + * @memberof google.cloud.deploy.v1.DeployJob + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeployJob.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a DeployJob message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.DeployJob + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.DeployJob} DeployJob + */ + DeployJob.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.DeployJob) + return object; + return new $root.google.cloud.deploy.v1.DeployJob(); + }; + + /** + * Creates a plain object from a DeployJob message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.DeployJob + * @static + * @param {google.cloud.deploy.v1.DeployJob} message DeployJob + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeployJob.toObject = function toObject() { + return {}; + }; + + /** + * Converts this DeployJob to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.DeployJob * @instance + * @returns {Object.} JSON object */ - BuildArtifact.prototype.tag = ""; + DeployJob.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Creates a new BuildArtifact instance using the specified properties. + * Gets the default type url for DeployJob + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.DeployJob + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeployJob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.DeployJob"; + }; + + return DeployJob; + })(); + + v1.VerifyJob = (function() { + + /** + * Properties of a VerifyJob. + * @memberof google.cloud.deploy.v1 + * @interface IVerifyJob + */ + + /** + * Constructs a new VerifyJob. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a VerifyJob. + * @implements IVerifyJob + * @constructor + * @param {google.cloud.deploy.v1.IVerifyJob=} [properties] Properties to set + */ + function VerifyJob(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new VerifyJob instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.BuildArtifact + * @memberof google.cloud.deploy.v1.VerifyJob * @static - * @param {google.cloud.deploy.v1.IBuildArtifact=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.BuildArtifact} BuildArtifact instance + * @param {google.cloud.deploy.v1.IVerifyJob=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.VerifyJob} VerifyJob instance */ - BuildArtifact.create = function create(properties) { - return new BuildArtifact(properties); + VerifyJob.create = function create(properties) { + return new VerifyJob(properties); }; /** - * Encodes the specified BuildArtifact message. Does not implicitly {@link google.cloud.deploy.v1.BuildArtifact.verify|verify} messages. + * Encodes the specified VerifyJob message. Does not implicitly {@link google.cloud.deploy.v1.VerifyJob.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.BuildArtifact + * @memberof google.cloud.deploy.v1.VerifyJob * @static - * @param {google.cloud.deploy.v1.IBuildArtifact} message BuildArtifact message or plain object to encode + * @param {google.cloud.deploy.v1.IVerifyJob} message VerifyJob message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BuildArtifact.encode = function encode(message, writer) { + VerifyJob.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.tag); - if (message.image != null && Object.hasOwnProperty.call(message, "image")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.image); return writer; }; /** - * Encodes the specified BuildArtifact message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.BuildArtifact.verify|verify} messages. + * Encodes the specified VerifyJob message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.VerifyJob.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.BuildArtifact + * @memberof google.cloud.deploy.v1.VerifyJob * @static - * @param {google.cloud.deploy.v1.IBuildArtifact} message BuildArtifact message or plain object to encode + * @param {google.cloud.deploy.v1.IVerifyJob} message VerifyJob message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BuildArtifact.encodeDelimited = function encodeDelimited(message, writer) { + VerifyJob.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BuildArtifact message from the specified reader or buffer. + * Decodes a VerifyJob message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.BuildArtifact + * @memberof google.cloud.deploy.v1.VerifyJob * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.BuildArtifact} BuildArtifact + * @returns {google.cloud.deploy.v1.VerifyJob} VerifyJob * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BuildArtifact.decode = function decode(reader, length) { + VerifyJob.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.BuildArtifact(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.VerifyJob(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: { - message.image = reader.string(); - break; - } - case 2: { - message.tag = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -9070,133 +14297,113 @@ }; /** - * Decodes a BuildArtifact message from the specified reader or buffer, length delimited. + * Decodes a VerifyJob message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.BuildArtifact + * @memberof google.cloud.deploy.v1.VerifyJob * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.BuildArtifact} BuildArtifact + * @returns {google.cloud.deploy.v1.VerifyJob} VerifyJob * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BuildArtifact.decodeDelimited = function decodeDelimited(reader) { + VerifyJob.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BuildArtifact message. + * Verifies a VerifyJob message. * @function verify - * @memberof google.cloud.deploy.v1.BuildArtifact + * @memberof google.cloud.deploy.v1.VerifyJob * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BuildArtifact.verify = function verify(message) { + VerifyJob.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.image != null && message.hasOwnProperty("image")) - if (!$util.isString(message.image)) - return "image: string expected"; - if (message.tag != null && message.hasOwnProperty("tag")) - if (!$util.isString(message.tag)) - return "tag: string expected"; return null; }; /** - * Creates a BuildArtifact message from a plain object. Also converts values to their respective internal types. + * Creates a VerifyJob message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.BuildArtifact + * @memberof google.cloud.deploy.v1.VerifyJob * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.BuildArtifact} BuildArtifact + * @returns {google.cloud.deploy.v1.VerifyJob} VerifyJob */ - BuildArtifact.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.BuildArtifact) + VerifyJob.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.VerifyJob) return object; - var message = new $root.google.cloud.deploy.v1.BuildArtifact(); - if (object.image != null) - message.image = String(object.image); - if (object.tag != null) - message.tag = String(object.tag); - return message; + return new $root.google.cloud.deploy.v1.VerifyJob(); }; /** - * Creates a plain object from a BuildArtifact message. Also converts values to other types if specified. + * Creates a plain object from a VerifyJob message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.BuildArtifact + * @memberof google.cloud.deploy.v1.VerifyJob * @static - * @param {google.cloud.deploy.v1.BuildArtifact} message BuildArtifact + * @param {google.cloud.deploy.v1.VerifyJob} message VerifyJob * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BuildArtifact.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.tag = ""; - object.image = ""; - } - if (message.tag != null && message.hasOwnProperty("tag")) - object.tag = message.tag; - if (message.image != null && message.hasOwnProperty("image")) - object.image = message.image; - return object; + VerifyJob.toObject = function toObject() { + return {}; }; /** - * Converts this BuildArtifact to JSON. + * Converts this VerifyJob to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.BuildArtifact + * @memberof google.cloud.deploy.v1.VerifyJob * @instance * @returns {Object.} JSON object */ - BuildArtifact.prototype.toJSON = function toJSON() { + VerifyJob.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BuildArtifact + * Gets the default type url for VerifyJob * @function getTypeUrl - * @memberof google.cloud.deploy.v1.BuildArtifact + * @memberof google.cloud.deploy.v1.VerifyJob * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BuildArtifact.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + VerifyJob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.BuildArtifact"; + return typeUrlPrefix + "/google.cloud.deploy.v1.VerifyJob"; }; - return BuildArtifact; + return VerifyJob; })(); - v1.TargetArtifact = (function() { + v1.ListRolloutsRequest = (function() { /** - * Properties of a TargetArtifact. + * Properties of a ListRolloutsRequest. * @memberof google.cloud.deploy.v1 - * @interface ITargetArtifact - * @property {string|null} [artifactUri] TargetArtifact artifactUri - * @property {string|null} [skaffoldConfigPath] TargetArtifact skaffoldConfigPath - * @property {string|null} [manifestPath] TargetArtifact manifestPath + * @interface IListRolloutsRequest + * @property {string|null} [parent] ListRolloutsRequest parent + * @property {number|null} [pageSize] ListRolloutsRequest pageSize + * @property {string|null} [pageToken] ListRolloutsRequest pageToken + * @property {string|null} [filter] ListRolloutsRequest filter + * @property {string|null} [orderBy] ListRolloutsRequest orderBy */ /** - * Constructs a new TargetArtifact. + * Constructs a new ListRolloutsRequest. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a TargetArtifact. - * @implements ITargetArtifact + * @classdesc Represents a ListRolloutsRequest. + * @implements IListRolloutsRequest * @constructor - * @param {google.cloud.deploy.v1.ITargetArtifact=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IListRolloutsRequest=} [properties] Properties to set */ - function TargetArtifact(properties) { + function ListRolloutsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9204,117 +14411,131 @@ } /** - * TargetArtifact artifactUri. - * @member {string|null|undefined} artifactUri - * @memberof google.cloud.deploy.v1.TargetArtifact + * ListRolloutsRequest parent. + * @member {string} parent + * @memberof google.cloud.deploy.v1.ListRolloutsRequest * @instance */ - TargetArtifact.prototype.artifactUri = null; + ListRolloutsRequest.prototype.parent = ""; /** - * TargetArtifact skaffoldConfigPath. - * @member {string} skaffoldConfigPath - * @memberof google.cloud.deploy.v1.TargetArtifact + * ListRolloutsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.deploy.v1.ListRolloutsRequest * @instance */ - TargetArtifact.prototype.skaffoldConfigPath = ""; + ListRolloutsRequest.prototype.pageSize = 0; /** - * TargetArtifact manifestPath. - * @member {string} manifestPath - * @memberof google.cloud.deploy.v1.TargetArtifact + * ListRolloutsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.deploy.v1.ListRolloutsRequest * @instance */ - TargetArtifact.prototype.manifestPath = ""; + ListRolloutsRequest.prototype.pageToken = ""; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * ListRolloutsRequest filter. + * @member {string} filter + * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @instance + */ + ListRolloutsRequest.prototype.filter = ""; /** - * TargetArtifact uri. - * @member {"artifactUri"|undefined} uri - * @memberof google.cloud.deploy.v1.TargetArtifact + * ListRolloutsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.deploy.v1.ListRolloutsRequest * @instance */ - Object.defineProperty(TargetArtifact.prototype, "uri", { - get: $util.oneOfGetter($oneOfFields = ["artifactUri"]), - set: $util.oneOfSetter($oneOfFields) - }); + ListRolloutsRequest.prototype.orderBy = ""; /** - * Creates a new TargetArtifact instance using the specified properties. + * Creates a new ListRolloutsRequest instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.TargetArtifact + * @memberof google.cloud.deploy.v1.ListRolloutsRequest * @static - * @param {google.cloud.deploy.v1.ITargetArtifact=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.TargetArtifact} TargetArtifact instance + * @param {google.cloud.deploy.v1.IListRolloutsRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ListRolloutsRequest} ListRolloutsRequest instance */ - TargetArtifact.create = function create(properties) { - return new TargetArtifact(properties); + ListRolloutsRequest.create = function create(properties) { + return new ListRolloutsRequest(properties); }; /** - * Encodes the specified TargetArtifact message. Does not implicitly {@link google.cloud.deploy.v1.TargetArtifact.verify|verify} messages. + * Encodes the specified ListRolloutsRequest message. Does not implicitly {@link google.cloud.deploy.v1.ListRolloutsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.TargetArtifact + * @memberof google.cloud.deploy.v1.ListRolloutsRequest * @static - * @param {google.cloud.deploy.v1.ITargetArtifact} message TargetArtifact message or plain object to encode + * @param {google.cloud.deploy.v1.IListRolloutsRequest} message ListRolloutsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TargetArtifact.encode = function encode(message, writer) { + ListRolloutsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.skaffoldConfigPath != null && Object.hasOwnProperty.call(message, "skaffoldConfigPath")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.skaffoldConfigPath); - if (message.manifestPath != null && Object.hasOwnProperty.call(message, "manifestPath")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.manifestPath); - if (message.artifactUri != null && Object.hasOwnProperty.call(message, "artifactUri")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.artifactUri); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; /** - * Encodes the specified TargetArtifact message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.TargetArtifact.verify|verify} messages. + * Encodes the specified ListRolloutsRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListRolloutsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.TargetArtifact + * @memberof google.cloud.deploy.v1.ListRolloutsRequest * @static - * @param {google.cloud.deploy.v1.ITargetArtifact} message TargetArtifact message or plain object to encode + * @param {google.cloud.deploy.v1.IListRolloutsRequest} message ListRolloutsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TargetArtifact.encodeDelimited = function encodeDelimited(message, writer) { + ListRolloutsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TargetArtifact message from the specified reader or buffer. + * Decodes a ListRolloutsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.TargetArtifact + * @memberof google.cloud.deploy.v1.ListRolloutsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.TargetArtifact} TargetArtifact + * @returns {google.cloud.deploy.v1.ListRolloutsRequest} ListRolloutsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TargetArtifact.decode = function decode(reader, length) { + ListRolloutsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.TargetArtifact(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListRolloutsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: { - message.artifactUri = reader.string(); + case 1: { + message.parent = reader.string(); break; } case 2: { - message.skaffoldConfigPath = reader.string(); + message.pageSize = reader.int32(); break; } case 3: { - message.manifestPath = reader.string(); + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); break; } default: @@ -9326,148 +14547,159 @@ }; /** - * Decodes a TargetArtifact message from the specified reader or buffer, length delimited. + * Decodes a ListRolloutsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.TargetArtifact + * @memberof google.cloud.deploy.v1.ListRolloutsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.TargetArtifact} TargetArtifact + * @returns {google.cloud.deploy.v1.ListRolloutsRequest} ListRolloutsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TargetArtifact.decodeDelimited = function decodeDelimited(reader) { + ListRolloutsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TargetArtifact message. + * Verifies a ListRolloutsRequest message. * @function verify - * @memberof google.cloud.deploy.v1.TargetArtifact + * @memberof google.cloud.deploy.v1.ListRolloutsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TargetArtifact.verify = function verify(message) { + ListRolloutsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.artifactUri != null && message.hasOwnProperty("artifactUri")) { - properties.uri = 1; - if (!$util.isString(message.artifactUri)) - return "artifactUri: string expected"; - } - if (message.skaffoldConfigPath != null && message.hasOwnProperty("skaffoldConfigPath")) - if (!$util.isString(message.skaffoldConfigPath)) - return "skaffoldConfigPath: string expected"; - if (message.manifestPath != null && message.hasOwnProperty("manifestPath")) - if (!$util.isString(message.manifestPath)) - return "manifestPath: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; return null; }; /** - * Creates a TargetArtifact message from a plain object. Also converts values to their respective internal types. + * Creates a ListRolloutsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.TargetArtifact + * @memberof google.cloud.deploy.v1.ListRolloutsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.TargetArtifact} TargetArtifact + * @returns {google.cloud.deploy.v1.ListRolloutsRequest} ListRolloutsRequest */ - TargetArtifact.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.TargetArtifact) + ListRolloutsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ListRolloutsRequest) return object; - var message = new $root.google.cloud.deploy.v1.TargetArtifact(); - if (object.artifactUri != null) - message.artifactUri = String(object.artifactUri); - if (object.skaffoldConfigPath != null) - message.skaffoldConfigPath = String(object.skaffoldConfigPath); - if (object.manifestPath != null) - message.manifestPath = String(object.manifestPath); + var message = new $root.google.cloud.deploy.v1.ListRolloutsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); return message; }; /** - * Creates a plain object from a TargetArtifact message. Also converts values to other types if specified. + * Creates a plain object from a ListRolloutsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.TargetArtifact + * @memberof google.cloud.deploy.v1.ListRolloutsRequest * @static - * @param {google.cloud.deploy.v1.TargetArtifact} message TargetArtifact + * @param {google.cloud.deploy.v1.ListRolloutsRequest} message ListRolloutsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TargetArtifact.toObject = function toObject(message, options) { + ListRolloutsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.skaffoldConfigPath = ""; - object.manifestPath = ""; - } - if (message.skaffoldConfigPath != null && message.hasOwnProperty("skaffoldConfigPath")) - object.skaffoldConfigPath = message.skaffoldConfigPath; - if (message.manifestPath != null && message.hasOwnProperty("manifestPath")) - object.manifestPath = message.manifestPath; - if (message.artifactUri != null && message.hasOwnProperty("artifactUri")) { - object.artifactUri = message.artifactUri; - if (options.oneofs) - object.uri = "artifactUri"; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; return object; }; /** - * Converts this TargetArtifact to JSON. + * Converts this ListRolloutsRequest to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.TargetArtifact + * @memberof google.cloud.deploy.v1.ListRolloutsRequest * @instance * @returns {Object.} JSON object */ - TargetArtifact.prototype.toJSON = function toJSON() { + ListRolloutsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TargetArtifact + * Gets the default type url for ListRolloutsRequest * @function getTypeUrl - * @memberof google.cloud.deploy.v1.TargetArtifact + * @memberof google.cloud.deploy.v1.ListRolloutsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TargetArtifact.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListRolloutsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.TargetArtifact"; + return typeUrlPrefix + "/google.cloud.deploy.v1.ListRolloutsRequest"; }; - return TargetArtifact; + return ListRolloutsRequest; })(); - v1.ListReleasesRequest = (function() { + v1.ListRolloutsResponse = (function() { /** - * Properties of a ListReleasesRequest. + * Properties of a ListRolloutsResponse. * @memberof google.cloud.deploy.v1 - * @interface IListReleasesRequest - * @property {string|null} [parent] ListReleasesRequest parent - * @property {number|null} [pageSize] ListReleasesRequest pageSize - * @property {string|null} [pageToken] ListReleasesRequest pageToken - * @property {string|null} [filter] ListReleasesRequest filter - * @property {string|null} [orderBy] ListReleasesRequest orderBy + * @interface IListRolloutsResponse + * @property {Array.|null} [rollouts] ListRolloutsResponse rollouts + * @property {string|null} [nextPageToken] ListRolloutsResponse nextPageToken + * @property {Array.|null} [unreachable] ListRolloutsResponse unreachable */ /** - * Constructs a new ListReleasesRequest. + * Constructs a new ListRolloutsResponse. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a ListReleasesRequest. - * @implements IListReleasesRequest + * @classdesc Represents a ListRolloutsResponse. + * @implements IListRolloutsResponse * @constructor - * @param {google.cloud.deploy.v1.IListReleasesRequest=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IListRolloutsResponse=} [properties] Properties to set */ - function ListReleasesRequest(properties) { + function ListRolloutsResponse(properties) { + this.rollouts = []; + this.unreachable = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9475,131 +14707,109 @@ } /** - * ListReleasesRequest parent. - * @member {string} parent - * @memberof google.cloud.deploy.v1.ListReleasesRequest - * @instance - */ - ListReleasesRequest.prototype.parent = ""; - - /** - * ListReleasesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.deploy.v1.ListReleasesRequest - * @instance - */ - ListReleasesRequest.prototype.pageSize = 0; - - /** - * ListReleasesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.deploy.v1.ListReleasesRequest + * ListRolloutsResponse rollouts. + * @member {Array.} rollouts + * @memberof google.cloud.deploy.v1.ListRolloutsResponse * @instance */ - ListReleasesRequest.prototype.pageToken = ""; + ListRolloutsResponse.prototype.rollouts = $util.emptyArray; /** - * ListReleasesRequest filter. - * @member {string} filter - * @memberof google.cloud.deploy.v1.ListReleasesRequest + * ListRolloutsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.deploy.v1.ListRolloutsResponse * @instance */ - ListReleasesRequest.prototype.filter = ""; + ListRolloutsResponse.prototype.nextPageToken = ""; /** - * ListReleasesRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.deploy.v1.ListReleasesRequest + * ListRolloutsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.deploy.v1.ListRolloutsResponse * @instance */ - ListReleasesRequest.prototype.orderBy = ""; + ListRolloutsResponse.prototype.unreachable = $util.emptyArray; /** - * Creates a new ListReleasesRequest instance using the specified properties. + * Creates a new ListRolloutsResponse instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @memberof google.cloud.deploy.v1.ListRolloutsResponse * @static - * @param {google.cloud.deploy.v1.IListReleasesRequest=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.ListReleasesRequest} ListReleasesRequest instance + * @param {google.cloud.deploy.v1.IListRolloutsResponse=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ListRolloutsResponse} ListRolloutsResponse instance */ - ListReleasesRequest.create = function create(properties) { - return new ListReleasesRequest(properties); + ListRolloutsResponse.create = function create(properties) { + return new ListRolloutsResponse(properties); }; /** - * Encodes the specified ListReleasesRequest message. Does not implicitly {@link google.cloud.deploy.v1.ListReleasesRequest.verify|verify} messages. + * Encodes the specified ListRolloutsResponse message. Does not implicitly {@link google.cloud.deploy.v1.ListRolloutsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @memberof google.cloud.deploy.v1.ListRolloutsResponse * @static - * @param {google.cloud.deploy.v1.IListReleasesRequest} message ListReleasesRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IListRolloutsResponse} message ListRolloutsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListReleasesRequest.encode = function encode(message, writer) { + ListRolloutsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + if (message.rollouts != null && message.rollouts.length) + for (var i = 0; i < message.rollouts.length; ++i) + $root.google.cloud.deploy.v1.Rollout.encode(message.rollouts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); return writer; }; /** - * Encodes the specified ListReleasesRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListReleasesRequest.verify|verify} messages. + * Encodes the specified ListRolloutsResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListRolloutsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @memberof google.cloud.deploy.v1.ListRolloutsResponse * @static - * @param {google.cloud.deploy.v1.IListReleasesRequest} message ListReleasesRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IListRolloutsResponse} message ListRolloutsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListReleasesRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListRolloutsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListReleasesRequest message from the specified reader or buffer. + * Decodes a ListRolloutsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @memberof google.cloud.deploy.v1.ListRolloutsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.ListReleasesRequest} ListReleasesRequest + * @returns {google.cloud.deploy.v1.ListRolloutsResponse} ListRolloutsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListReleasesRequest.decode = function decode(reader, length) { + ListRolloutsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListReleasesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListRolloutsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + if (!(message.rollouts && message.rollouts.length)) + message.rollouts = []; + message.rollouts.push($root.google.cloud.deploy.v1.Rollout.decode(reader, reader.uint32())); break; } case 2: { - message.pageSize = reader.int32(); + message.nextPageToken = reader.string(); break; } case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); break; } default: @@ -9611,159 +14821,169 @@ }; /** - * Decodes a ListReleasesRequest message from the specified reader or buffer, length delimited. + * Decodes a ListRolloutsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @memberof google.cloud.deploy.v1.ListRolloutsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.ListReleasesRequest} ListReleasesRequest + * @returns {google.cloud.deploy.v1.ListRolloutsResponse} ListRolloutsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListReleasesRequest.decodeDelimited = function decodeDelimited(reader) { + ListRolloutsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListReleasesRequest message. + * Verifies a ListRolloutsResponse message. * @function verify - * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @memberof google.cloud.deploy.v1.ListRolloutsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListReleasesRequest.verify = function verify(message) { + ListRolloutsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; + if (message.rollouts != null && message.hasOwnProperty("rollouts")) { + if (!Array.isArray(message.rollouts)) + return "rollouts: array expected"; + for (var i = 0; i < message.rollouts.length; ++i) { + var error = $root.google.cloud.deploy.v1.Rollout.verify(message.rollouts[i]); + if (error) + return "rollouts." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } return null; }; /** - * Creates a ListReleasesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListRolloutsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @memberof google.cloud.deploy.v1.ListRolloutsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.ListReleasesRequest} ListReleasesRequest + * @returns {google.cloud.deploy.v1.ListRolloutsResponse} ListRolloutsResponse */ - ListReleasesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.ListReleasesRequest) + ListRolloutsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ListRolloutsResponse) return object; - var message = new $root.google.cloud.deploy.v1.ListReleasesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); + var message = new $root.google.cloud.deploy.v1.ListRolloutsResponse(); + if (object.rollouts) { + if (!Array.isArray(object.rollouts)) + throw TypeError(".google.cloud.deploy.v1.ListRolloutsResponse.rollouts: array expected"); + message.rollouts = []; + for (var i = 0; i < object.rollouts.length; ++i) { + if (typeof object.rollouts[i] !== "object") + throw TypeError(".google.cloud.deploy.v1.ListRolloutsResponse.rollouts: object expected"); + message.rollouts[i] = $root.google.cloud.deploy.v1.Rollout.fromObject(object.rollouts[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.deploy.v1.ListRolloutsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } return message; }; /** - * Creates a plain object from a ListReleasesRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListRolloutsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @memberof google.cloud.deploy.v1.ListRolloutsResponse * @static - * @param {google.cloud.deploy.v1.ListReleasesRequest} message ListReleasesRequest + * @param {google.cloud.deploy.v1.ListRolloutsResponse} message ListRolloutsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListReleasesRequest.toObject = function toObject(message, options) { + ListRolloutsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; + if (options.arrays || options.defaults) { + object.rollouts = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.rollouts && message.rollouts.length) { + object.rollouts = []; + for (var j = 0; j < message.rollouts.length; ++j) + object.rollouts[j] = $root.google.cloud.deploy.v1.Rollout.toObject(message.rollouts[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; return object; }; /** - * Converts this ListReleasesRequest to JSON. + * Converts this ListRolloutsResponse to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @memberof google.cloud.deploy.v1.ListRolloutsResponse * @instance * @returns {Object.} JSON object */ - ListReleasesRequest.prototype.toJSON = function toJSON() { + ListRolloutsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListReleasesRequest + * Gets the default type url for ListRolloutsResponse * @function getTypeUrl - * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @memberof google.cloud.deploy.v1.ListRolloutsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListReleasesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListRolloutsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.ListReleasesRequest"; + return typeUrlPrefix + "/google.cloud.deploy.v1.ListRolloutsResponse"; }; - return ListReleasesRequest; + return ListRolloutsResponse; })(); - v1.ListReleasesResponse = (function() { + v1.GetRolloutRequest = (function() { /** - * Properties of a ListReleasesResponse. + * Properties of a GetRolloutRequest. * @memberof google.cloud.deploy.v1 - * @interface IListReleasesResponse - * @property {Array.|null} [releases] ListReleasesResponse releases - * @property {string|null} [nextPageToken] ListReleasesResponse nextPageToken - * @property {Array.|null} [unreachable] ListReleasesResponse unreachable + * @interface IGetRolloutRequest + * @property {string|null} [name] GetRolloutRequest name */ /** - * Constructs a new ListReleasesResponse. + * Constructs a new GetRolloutRequest. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a ListReleasesResponse. - * @implements IListReleasesResponse + * @classdesc Represents a GetRolloutRequest. + * @implements IGetRolloutRequest * @constructor - * @param {google.cloud.deploy.v1.IListReleasesResponse=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IGetRolloutRequest=} [properties] Properties to set */ - function ListReleasesResponse(properties) { - this.releases = []; - this.unreachable = []; + function GetRolloutRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9771,109 +14991,75 @@ } /** - * ListReleasesResponse releases. - * @member {Array.} releases - * @memberof google.cloud.deploy.v1.ListReleasesResponse - * @instance - */ - ListReleasesResponse.prototype.releases = $util.emptyArray; - - /** - * ListReleasesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.deploy.v1.ListReleasesResponse - * @instance - */ - ListReleasesResponse.prototype.nextPageToken = ""; - - /** - * ListReleasesResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.deploy.v1.ListReleasesResponse + * GetRolloutRequest name. + * @member {string} name + * @memberof google.cloud.deploy.v1.GetRolloutRequest * @instance */ - ListReleasesResponse.prototype.unreachable = $util.emptyArray; + GetRolloutRequest.prototype.name = ""; /** - * Creates a new ListReleasesResponse instance using the specified properties. + * Creates a new GetRolloutRequest instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @memberof google.cloud.deploy.v1.GetRolloutRequest * @static - * @param {google.cloud.deploy.v1.IListReleasesResponse=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.ListReleasesResponse} ListReleasesResponse instance + * @param {google.cloud.deploy.v1.IGetRolloutRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.GetRolloutRequest} GetRolloutRequest instance */ - ListReleasesResponse.create = function create(properties) { - return new ListReleasesResponse(properties); + GetRolloutRequest.create = function create(properties) { + return new GetRolloutRequest(properties); }; /** - * Encodes the specified ListReleasesResponse message. Does not implicitly {@link google.cloud.deploy.v1.ListReleasesResponse.verify|verify} messages. + * Encodes the specified GetRolloutRequest message. Does not implicitly {@link google.cloud.deploy.v1.GetRolloutRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @memberof google.cloud.deploy.v1.GetRolloutRequest * @static - * @param {google.cloud.deploy.v1.IListReleasesResponse} message ListReleasesResponse message or plain object to encode + * @param {google.cloud.deploy.v1.IGetRolloutRequest} message GetRolloutRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListReleasesResponse.encode = function encode(message, writer) { + GetRolloutRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.releases != null && message.releases.length) - for (var i = 0; i < message.releases.length; ++i) - $root.google.cloud.deploy.v1.Release.encode(message.releases[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListReleasesResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListReleasesResponse.verify|verify} messages. + * Encodes the specified GetRolloutRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GetRolloutRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @memberof google.cloud.deploy.v1.GetRolloutRequest * @static - * @param {google.cloud.deploy.v1.IListReleasesResponse} message ListReleasesResponse message or plain object to encode + * @param {google.cloud.deploy.v1.IGetRolloutRequest} message GetRolloutRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListReleasesResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetRolloutRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListReleasesResponse message from the specified reader or buffer. + * Decodes a GetRolloutRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @memberof google.cloud.deploy.v1.GetRolloutRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.ListReleasesResponse} ListReleasesResponse + * @returns {google.cloud.deploy.v1.GetRolloutRequest} GetRolloutRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListReleasesResponse.decode = function decode(reader, length) { + GetRolloutRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListReleasesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.GetRolloutRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.releases && message.releases.length)) - message.releases = []; - message.releases.push($root.google.cloud.deploy.v1.Release.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); + message.name = reader.string(); break; } default: @@ -9885,169 +15071,126 @@ }; /** - * Decodes a ListReleasesResponse message from the specified reader or buffer, length delimited. + * Decodes a GetRolloutRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @memberof google.cloud.deploy.v1.GetRolloutRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.ListReleasesResponse} ListReleasesResponse + * @returns {google.cloud.deploy.v1.GetRolloutRequest} GetRolloutRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListReleasesResponse.decodeDelimited = function decodeDelimited(reader) { + GetRolloutRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListReleasesResponse message. + * Verifies a GetRolloutRequest message. * @function verify - * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @memberof google.cloud.deploy.v1.GetRolloutRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListReleasesResponse.verify = function verify(message) { + GetRolloutRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.releases != null && message.hasOwnProperty("releases")) { - if (!Array.isArray(message.releases)) - return "releases: array expected"; - for (var i = 0; i < message.releases.length; ++i) { - var error = $root.google.cloud.deploy.v1.Release.verify(message.releases[i]); - if (error) - return "releases." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListReleasesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetRolloutRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @memberof google.cloud.deploy.v1.GetRolloutRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.ListReleasesResponse} ListReleasesResponse + * @returns {google.cloud.deploy.v1.GetRolloutRequest} GetRolloutRequest */ - ListReleasesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.ListReleasesResponse) + GetRolloutRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.GetRolloutRequest) return object; - var message = new $root.google.cloud.deploy.v1.ListReleasesResponse(); - if (object.releases) { - if (!Array.isArray(object.releases)) - throw TypeError(".google.cloud.deploy.v1.ListReleasesResponse.releases: array expected"); - message.releases = []; - for (var i = 0; i < object.releases.length; ++i) { - if (typeof object.releases[i] !== "object") - throw TypeError(".google.cloud.deploy.v1.ListReleasesResponse.releases: object expected"); - message.releases[i] = $root.google.cloud.deploy.v1.Release.fromObject(object.releases[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.deploy.v1.ListReleasesResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } + var message = new $root.google.cloud.deploy.v1.GetRolloutRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListReleasesResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetRolloutRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @memberof google.cloud.deploy.v1.GetRolloutRequest * @static - * @param {google.cloud.deploy.v1.ListReleasesResponse} message ListReleasesResponse + * @param {google.cloud.deploy.v1.GetRolloutRequest} message GetRolloutRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListReleasesResponse.toObject = function toObject(message, options) { + GetRolloutRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.releases = []; - object.unreachable = []; - } if (options.defaults) - object.nextPageToken = ""; - if (message.releases && message.releases.length) { - object.releases = []; - for (var j = 0; j < message.releases.length; ++j) - object.releases[j] = $root.google.cloud.deploy.v1.Release.toObject(message.releases[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListReleasesResponse to JSON. + * Converts this GetRolloutRequest to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @memberof google.cloud.deploy.v1.GetRolloutRequest * @instance * @returns {Object.} JSON object */ - ListReleasesResponse.prototype.toJSON = function toJSON() { + GetRolloutRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListReleasesResponse + * Gets the default type url for GetRolloutRequest * @function getTypeUrl - * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @memberof google.cloud.deploy.v1.GetRolloutRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListReleasesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetRolloutRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.ListReleasesResponse"; + return typeUrlPrefix + "/google.cloud.deploy.v1.GetRolloutRequest"; }; - return ListReleasesResponse; + return GetRolloutRequest; })(); - v1.GetReleaseRequest = (function() { + v1.CreateRolloutRequest = (function() { /** - * Properties of a GetReleaseRequest. + * Properties of a CreateRolloutRequest. * @memberof google.cloud.deploy.v1 - * @interface IGetReleaseRequest - * @property {string|null} [name] GetReleaseRequest name + * @interface ICreateRolloutRequest + * @property {string|null} [parent] CreateRolloutRequest parent + * @property {string|null} [rolloutId] CreateRolloutRequest rolloutId + * @property {google.cloud.deploy.v1.IRollout|null} [rollout] CreateRolloutRequest rollout + * @property {string|null} [requestId] CreateRolloutRequest requestId + * @property {boolean|null} [validateOnly] CreateRolloutRequest validateOnly */ /** - * Constructs a new GetReleaseRequest. + * Constructs a new CreateRolloutRequest. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a GetReleaseRequest. - * @implements IGetReleaseRequest + * @classdesc Represents a CreateRolloutRequest. + * @implements ICreateRolloutRequest * @constructor - * @param {google.cloud.deploy.v1.IGetReleaseRequest=} [properties] Properties to set + * @param {google.cloud.deploy.v1.ICreateRolloutRequest=} [properties] Properties to set */ - function GetReleaseRequest(properties) { + function CreateRolloutRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10055,75 +15198,131 @@ } /** - * GetReleaseRequest name. - * @member {string} name - * @memberof google.cloud.deploy.v1.GetReleaseRequest + * CreateRolloutRequest parent. + * @member {string} parent + * @memberof google.cloud.deploy.v1.CreateRolloutRequest * @instance */ - GetReleaseRequest.prototype.name = ""; + CreateRolloutRequest.prototype.parent = ""; /** - * Creates a new GetReleaseRequest instance using the specified properties. + * CreateRolloutRequest rolloutId. + * @member {string} rolloutId + * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @instance + */ + CreateRolloutRequest.prototype.rolloutId = ""; + + /** + * CreateRolloutRequest rollout. + * @member {google.cloud.deploy.v1.IRollout|null|undefined} rollout + * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @instance + */ + CreateRolloutRequest.prototype.rollout = null; + + /** + * CreateRolloutRequest requestId. + * @member {string} requestId + * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @instance + */ + CreateRolloutRequest.prototype.requestId = ""; + + /** + * CreateRolloutRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @instance + */ + CreateRolloutRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateRolloutRequest instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @memberof google.cloud.deploy.v1.CreateRolloutRequest * @static - * @param {google.cloud.deploy.v1.IGetReleaseRequest=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.GetReleaseRequest} GetReleaseRequest instance + * @param {google.cloud.deploy.v1.ICreateRolloutRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.CreateRolloutRequest} CreateRolloutRequest instance */ - GetReleaseRequest.create = function create(properties) { - return new GetReleaseRequest(properties); + CreateRolloutRequest.create = function create(properties) { + return new CreateRolloutRequest(properties); }; /** - * Encodes the specified GetReleaseRequest message. Does not implicitly {@link google.cloud.deploy.v1.GetReleaseRequest.verify|verify} messages. + * Encodes the specified CreateRolloutRequest message. Does not implicitly {@link google.cloud.deploy.v1.CreateRolloutRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @memberof google.cloud.deploy.v1.CreateRolloutRequest * @static - * @param {google.cloud.deploy.v1.IGetReleaseRequest} message GetReleaseRequest message or plain object to encode + * @param {google.cloud.deploy.v1.ICreateRolloutRequest} message CreateRolloutRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetReleaseRequest.encode = function encode(message, writer) { + CreateRolloutRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.rolloutId != null && Object.hasOwnProperty.call(message, "rolloutId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.rolloutId); + if (message.rollout != null && Object.hasOwnProperty.call(message, "rollout")) + $root.google.cloud.deploy.v1.Rollout.encode(message.rollout, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); return writer; }; /** - * Encodes the specified GetReleaseRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GetReleaseRequest.verify|verify} messages. + * Encodes the specified CreateRolloutRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CreateRolloutRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @memberof google.cloud.deploy.v1.CreateRolloutRequest * @static - * @param {google.cloud.deploy.v1.IGetReleaseRequest} message GetReleaseRequest message or plain object to encode + * @param {google.cloud.deploy.v1.ICreateRolloutRequest} message CreateRolloutRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetReleaseRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateRolloutRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetReleaseRequest message from the specified reader or buffer. + * Decodes a CreateRolloutRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @memberof google.cloud.deploy.v1.CreateRolloutRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.GetReleaseRequest} GetReleaseRequest + * @returns {google.cloud.deploy.v1.CreateRolloutRequest} CreateRolloutRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetReleaseRequest.decode = function decode(reader, length) { + CreateRolloutRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.GetReleaseRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.CreateRolloutRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); + break; + } + case 2: { + message.rolloutId = reader.string(); + break; + } + case 3: { + message.rollout = $root.google.cloud.deploy.v1.Rollout.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + case 5: { + message.validateOnly = reader.bool(); break; } default: @@ -10135,126 +15334,166 @@ }; /** - * Decodes a GetReleaseRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateRolloutRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @memberof google.cloud.deploy.v1.CreateRolloutRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.GetReleaseRequest} GetReleaseRequest + * @returns {google.cloud.deploy.v1.CreateRolloutRequest} CreateRolloutRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetReleaseRequest.decodeDelimited = function decodeDelimited(reader) { + CreateRolloutRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetReleaseRequest message. + * Verifies a CreateRolloutRequest message. * @function verify - * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @memberof google.cloud.deploy.v1.CreateRolloutRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetReleaseRequest.verify = function verify(message) { + CreateRolloutRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.rolloutId != null && message.hasOwnProperty("rolloutId")) + if (!$util.isString(message.rolloutId)) + return "rolloutId: string expected"; + if (message.rollout != null && message.hasOwnProperty("rollout")) { + var error = $root.google.cloud.deploy.v1.Rollout.verify(message.rollout); + if (error) + return "rollout." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a GetReleaseRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateRolloutRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @memberof google.cloud.deploy.v1.CreateRolloutRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.GetReleaseRequest} GetReleaseRequest + * @returns {google.cloud.deploy.v1.CreateRolloutRequest} CreateRolloutRequest */ - GetReleaseRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.GetReleaseRequest) + CreateRolloutRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.CreateRolloutRequest) return object; - var message = new $root.google.cloud.deploy.v1.GetReleaseRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.deploy.v1.CreateRolloutRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.rolloutId != null) + message.rolloutId = String(object.rolloutId); + if (object.rollout != null) { + if (typeof object.rollout !== "object") + throw TypeError(".google.cloud.deploy.v1.CreateRolloutRequest.rollout: object expected"); + message.rollout = $root.google.cloud.deploy.v1.Rollout.fromObject(object.rollout); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a GetReleaseRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateRolloutRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @memberof google.cloud.deploy.v1.CreateRolloutRequest * @static - * @param {google.cloud.deploy.v1.GetReleaseRequest} message GetReleaseRequest + * @param {google.cloud.deploy.v1.CreateRolloutRequest} message CreateRolloutRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetReleaseRequest.toObject = function toObject(message, options) { + CreateRolloutRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.parent = ""; + object.rolloutId = ""; + object.rollout = null; + object.requestId = ""; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.rolloutId != null && message.hasOwnProperty("rolloutId")) + object.rolloutId = message.rolloutId; + if (message.rollout != null && message.hasOwnProperty("rollout")) + object.rollout = $root.google.cloud.deploy.v1.Rollout.toObject(message.rollout, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this GetReleaseRequest to JSON. + * Converts this CreateRolloutRequest to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @memberof google.cloud.deploy.v1.CreateRolloutRequest * @instance * @returns {Object.} JSON object */ - GetReleaseRequest.prototype.toJSON = function toJSON() { + CreateRolloutRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetReleaseRequest + * Gets the default type url for CreateRolloutRequest * @function getTypeUrl - * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @memberof google.cloud.deploy.v1.CreateRolloutRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetReleaseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateRolloutRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.GetReleaseRequest"; + return typeUrlPrefix + "/google.cloud.deploy.v1.CreateRolloutRequest"; }; - return GetReleaseRequest; + return CreateRolloutRequest; })(); - v1.CreateReleaseRequest = (function() { + v1.OperationMetadata = (function() { /** - * Properties of a CreateReleaseRequest. + * Properties of an OperationMetadata. * @memberof google.cloud.deploy.v1 - * @interface ICreateReleaseRequest - * @property {string|null} [parent] CreateReleaseRequest parent - * @property {string|null} [releaseId] CreateReleaseRequest releaseId - * @property {google.cloud.deploy.v1.IRelease|null} [release] CreateReleaseRequest release - * @property {string|null} [requestId] CreateReleaseRequest requestId - * @property {boolean|null} [validateOnly] CreateReleaseRequest validateOnly + * @interface IOperationMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime + * @property {string|null} [target] OperationMetadata target + * @property {string|null} [verb] OperationMetadata verb + * @property {string|null} [statusMessage] OperationMetadata statusMessage + * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation + * @property {string|null} [apiVersion] OperationMetadata apiVersion */ /** - * Constructs a new CreateReleaseRequest. + * Constructs a new OperationMetadata. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a CreateReleaseRequest. - * @implements ICreateReleaseRequest + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata * @constructor - * @param {google.cloud.deploy.v1.ICreateReleaseRequest=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IOperationMetadata=} [properties] Properties to set */ - function CreateReleaseRequest(properties) { + function OperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10262,131 +15501,159 @@ } /** - * CreateReleaseRequest parent. - * @member {string} parent - * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * OperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.deploy.v1.OperationMetadata * @instance */ - CreateReleaseRequest.prototype.parent = ""; + OperationMetadata.prototype.createTime = null; /** - * CreateReleaseRequest releaseId. - * @member {string} releaseId - * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.deploy.v1.OperationMetadata * @instance */ - CreateReleaseRequest.prototype.releaseId = ""; + OperationMetadata.prototype.endTime = null; /** - * CreateReleaseRequest release. - * @member {google.cloud.deploy.v1.IRelease|null|undefined} release - * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * OperationMetadata target. + * @member {string} target + * @memberof google.cloud.deploy.v1.OperationMetadata * @instance */ - CreateReleaseRequest.prototype.release = null; + OperationMetadata.prototype.target = ""; /** - * CreateReleaseRequest requestId. - * @member {string} requestId - * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * OperationMetadata verb. + * @member {string} verb + * @memberof google.cloud.deploy.v1.OperationMetadata * @instance */ - CreateReleaseRequest.prototype.requestId = ""; + OperationMetadata.prototype.verb = ""; /** - * CreateReleaseRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * OperationMetadata statusMessage. + * @member {string} statusMessage + * @memberof google.cloud.deploy.v1.OperationMetadata * @instance */ - CreateReleaseRequest.prototype.validateOnly = false; + OperationMetadata.prototype.statusMessage = ""; /** - * Creates a new CreateReleaseRequest instance using the specified properties. + * OperationMetadata requestedCancellation. + * @member {boolean} requestedCancellation + * @memberof google.cloud.deploy.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.requestedCancellation = false; + + /** + * OperationMetadata apiVersion. + * @member {string} apiVersion + * @memberof google.cloud.deploy.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.apiVersion = ""; + + /** + * Creates a new OperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @memberof google.cloud.deploy.v1.OperationMetadata * @static - * @param {google.cloud.deploy.v1.ICreateReleaseRequest=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.CreateReleaseRequest} CreateReleaseRequest instance + * @param {google.cloud.deploy.v1.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.OperationMetadata} OperationMetadata instance */ - CreateReleaseRequest.create = function create(properties) { - return new CreateReleaseRequest(properties); + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); }; /** - * Encodes the specified CreateReleaseRequest message. Does not implicitly {@link google.cloud.deploy.v1.CreateReleaseRequest.verify|verify} messages. + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.deploy.v1.OperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @memberof google.cloud.deploy.v1.OperationMetadata * @static - * @param {google.cloud.deploy.v1.ICreateReleaseRequest} message CreateReleaseRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IOperationMetadata} message OperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateReleaseRequest.encode = function encode(message, writer) { + OperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.releaseId != null && Object.hasOwnProperty.call(message, "releaseId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.releaseId); - if (message.release != null && Object.hasOwnProperty.call(message, "release")) - $root.google.cloud.deploy.v1.Release.encode(message.release, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); + if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); + if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); + if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.requestedCancellation); + if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); return writer; }; /** - * Encodes the specified CreateReleaseRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CreateReleaseRequest.verify|verify} messages. + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.OperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @memberof google.cloud.deploy.v1.OperationMetadata * @static - * @param {google.cloud.deploy.v1.ICreateReleaseRequest} message CreateReleaseRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IOperationMetadata} message OperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateReleaseRequest.encodeDelimited = function encodeDelimited(message, writer) { + OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateReleaseRequest message from the specified reader or buffer. + * Decodes an OperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @memberof google.cloud.deploy.v1.OperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.CreateReleaseRequest} CreateReleaseRequest + * @returns {google.cloud.deploy.v1.OperationMetadata} OperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateReleaseRequest.decode = function decode(reader, length) { + OperationMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.CreateReleaseRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.OperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 2: { - message.releaseId = reader.string(); + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 3: { - message.release = $root.google.cloud.deploy.v1.Release.decode(reader, reader.uint32()); + message.target = reader.string(); break; } case 4: { - message.requestId = reader.string(); + message.verb = reader.string(); break; } case 5: { - message.validateOnly = reader.bool(); + message.statusMessage = reader.string(); + break; + } + case 6: { + message.requestedCancellation = reader.bool(); + break; + } + case 7: { + message.apiVersion = reader.string(); break; } default: @@ -10398,518 +15665,272 @@ }; /** - * Decodes a CreateReleaseRequest message from the specified reader or buffer, length delimited. + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @memberof google.cloud.deploy.v1.OperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.CreateReleaseRequest} CreateReleaseRequest + * @returns {google.cloud.deploy.v1.OperationMetadata} OperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateReleaseRequest.decodeDelimited = function decodeDelimited(reader) { + OperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateReleaseRequest message. + * Verifies an OperationMetadata message. * @function verify - * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @memberof google.cloud.deploy.v1.OperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateReleaseRequest.verify = function verify(message) { + OperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.releaseId != null && message.hasOwnProperty("releaseId")) - if (!$util.isString(message.releaseId)) - return "releaseId: string expected"; - if (message.release != null && message.hasOwnProperty("release")) { - var error = $root.google.cloud.deploy.v1.Release.verify(message.release); + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) - return "release." + error; + return "createTime." + error; } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.target != null && message.hasOwnProperty("target")) + if (!$util.isString(message.target)) + return "target: string expected"; + if (message.verb != null && message.hasOwnProperty("verb")) + if (!$util.isString(message.verb)) + return "verb: string expected"; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + if (!$util.isString(message.statusMessage)) + return "statusMessage: string expected"; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + if (typeof message.requestedCancellation !== "boolean") + return "requestedCancellation: boolean expected"; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + if (!$util.isString(message.apiVersion)) + return "apiVersion: string expected"; return null; }; /** - * Creates a CreateReleaseRequest message from a plain object. Also converts values to their respective internal types. + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @memberof google.cloud.deploy.v1.OperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.CreateReleaseRequest} CreateReleaseRequest + * @returns {google.cloud.deploy.v1.OperationMetadata} OperationMetadata */ - CreateReleaseRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.CreateReleaseRequest) + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.OperationMetadata) return object; - var message = new $root.google.cloud.deploy.v1.CreateReleaseRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.releaseId != null) - message.releaseId = String(object.releaseId); - if (object.release != null) { - if (typeof object.release !== "object") - throw TypeError(".google.cloud.deploy.v1.CreateReleaseRequest.release: object expected"); - message.release = $root.google.cloud.deploy.v1.Release.fromObject(object.release); + var message = new $root.google.cloud.deploy.v1.OperationMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.deploy.v1.OperationMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.deploy.v1.OperationMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.target != null) + message.target = String(object.target); + if (object.verb != null) + message.verb = String(object.verb); + if (object.statusMessage != null) + message.statusMessage = String(object.statusMessage); + if (object.requestedCancellation != null) + message.requestedCancellation = Boolean(object.requestedCancellation); + if (object.apiVersion != null) + message.apiVersion = String(object.apiVersion); return message; }; /** - * Creates a plain object from a CreateReleaseRequest message. Also converts values to other types if specified. + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @memberof google.cloud.deploy.v1.OperationMetadata * @static - * @param {google.cloud.deploy.v1.CreateReleaseRequest} message CreateReleaseRequest + * @param {google.cloud.deploy.v1.OperationMetadata} message OperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateReleaseRequest.toObject = function toObject(message, options) { + OperationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.releaseId = ""; - object.release = null; - object.requestId = ""; - object.validateOnly = false; + object.createTime = null; + object.endTime = null; + object.target = ""; + object.verb = ""; + object.statusMessage = ""; + object.requestedCancellation = false; + object.apiVersion = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.releaseId != null && message.hasOwnProperty("releaseId")) - object.releaseId = message.releaseId; - if (message.release != null && message.hasOwnProperty("release")) - object.release = $root.google.cloud.deploy.v1.Release.toObject(message.release, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = message.target; + if (message.verb != null && message.hasOwnProperty("verb")) + object.verb = message.verb; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + object.statusMessage = message.statusMessage; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + object.requestedCancellation = message.requestedCancellation; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + object.apiVersion = message.apiVersion; return object; }; /** - * Converts this CreateReleaseRequest to JSON. + * Converts this OperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.CreateReleaseRequest - * @instance - * @returns {Object.} JSON object - */ - CreateReleaseRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateReleaseRequest - * @function getTypeUrl - * @memberof google.cloud.deploy.v1.CreateReleaseRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateReleaseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.deploy.v1.CreateReleaseRequest"; - }; - - return CreateReleaseRequest; - })(); - - v1.Rollout = (function() { - - /** - * Properties of a Rollout. - * @memberof google.cloud.deploy.v1 - * @interface IRollout - * @property {string|null} [name] Rollout name - * @property {string|null} [uid] Rollout uid - * @property {string|null} [description] Rollout description - * @property {Object.|null} [annotations] Rollout annotations - * @property {Object.|null} [labels] Rollout labels - * @property {google.protobuf.ITimestamp|null} [createTime] Rollout createTime - * @property {google.protobuf.ITimestamp|null} [approveTime] Rollout approveTime - * @property {google.protobuf.ITimestamp|null} [enqueueTime] Rollout enqueueTime - * @property {google.protobuf.ITimestamp|null} [deployStartTime] Rollout deployStartTime - * @property {google.protobuf.ITimestamp|null} [deployEndTime] Rollout deployEndTime - * @property {string|null} [targetId] Rollout targetId - * @property {google.cloud.deploy.v1.Rollout.ApprovalState|null} [approvalState] Rollout approvalState - * @property {google.cloud.deploy.v1.Rollout.State|null} [state] Rollout state - * @property {string|null} [failureReason] Rollout failureReason - * @property {string|null} [deployingBuild] Rollout deployingBuild - * @property {string|null} [etag] Rollout etag - * @property {google.cloud.deploy.v1.Rollout.FailureCause|null} [deployFailureCause] Rollout deployFailureCause - */ - - /** - * Constructs a new Rollout. - * @memberof google.cloud.deploy.v1 - * @classdesc Represents a Rollout. - * @implements IRollout - * @constructor - * @param {google.cloud.deploy.v1.IRollout=} [properties] Properties to set - */ - function Rollout(properties) { - this.annotations = {}; - this.labels = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Rollout name. - * @member {string} name - * @memberof google.cloud.deploy.v1.Rollout - * @instance - */ - Rollout.prototype.name = ""; - - /** - * Rollout uid. - * @member {string} uid - * @memberof google.cloud.deploy.v1.Rollout - * @instance - */ - Rollout.prototype.uid = ""; - - /** - * Rollout description. - * @member {string} description - * @memberof google.cloud.deploy.v1.Rollout - * @instance - */ - Rollout.prototype.description = ""; - - /** - * Rollout annotations. - * @member {Object.} annotations - * @memberof google.cloud.deploy.v1.Rollout - * @instance - */ - Rollout.prototype.annotations = $util.emptyObject; - - /** - * Rollout labels. - * @member {Object.} labels - * @memberof google.cloud.deploy.v1.Rollout - * @instance - */ - Rollout.prototype.labels = $util.emptyObject; - - /** - * Rollout createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.deploy.v1.Rollout - * @instance - */ - Rollout.prototype.createTime = null; - - /** - * Rollout approveTime. - * @member {google.protobuf.ITimestamp|null|undefined} approveTime - * @memberof google.cloud.deploy.v1.Rollout - * @instance - */ - Rollout.prototype.approveTime = null; - - /** - * Rollout enqueueTime. - * @member {google.protobuf.ITimestamp|null|undefined} enqueueTime - * @memberof google.cloud.deploy.v1.Rollout - * @instance - */ - Rollout.prototype.enqueueTime = null; - - /** - * Rollout deployStartTime. - * @member {google.protobuf.ITimestamp|null|undefined} deployStartTime - * @memberof google.cloud.deploy.v1.Rollout - * @instance - */ - Rollout.prototype.deployStartTime = null; - - /** - * Rollout deployEndTime. - * @member {google.protobuf.ITimestamp|null|undefined} deployEndTime - * @memberof google.cloud.deploy.v1.Rollout - * @instance - */ - Rollout.prototype.deployEndTime = null; - - /** - * Rollout targetId. - * @member {string} targetId - * @memberof google.cloud.deploy.v1.Rollout - * @instance - */ - Rollout.prototype.targetId = ""; - - /** - * Rollout approvalState. - * @member {google.cloud.deploy.v1.Rollout.ApprovalState} approvalState - * @memberof google.cloud.deploy.v1.Rollout + * @memberof google.cloud.deploy.v1.OperationMetadata * @instance + * @returns {Object.} JSON object */ - Rollout.prototype.approvalState = 0; + OperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Rollout state. - * @member {google.cloud.deploy.v1.Rollout.State} state - * @memberof google.cloud.deploy.v1.Rollout - * @instance + * Gets the default type url for OperationMetadata + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.OperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - Rollout.prototype.state = 0; + OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.OperationMetadata"; + }; + + return OperationMetadata; + })(); + + v1.ApproveRolloutRequest = (function() { /** - * Rollout failureReason. - * @member {string} failureReason - * @memberof google.cloud.deploy.v1.Rollout - * @instance + * Properties of an ApproveRolloutRequest. + * @memberof google.cloud.deploy.v1 + * @interface IApproveRolloutRequest + * @property {string|null} [name] ApproveRolloutRequest name + * @property {boolean|null} [approved] ApproveRolloutRequest approved */ - Rollout.prototype.failureReason = ""; /** - * Rollout deployingBuild. - * @member {string} deployingBuild - * @memberof google.cloud.deploy.v1.Rollout - * @instance + * Constructs a new ApproveRolloutRequest. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents an ApproveRolloutRequest. + * @implements IApproveRolloutRequest + * @constructor + * @param {google.cloud.deploy.v1.IApproveRolloutRequest=} [properties] Properties to set */ - Rollout.prototype.deployingBuild = ""; + function ApproveRolloutRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Rollout etag. - * @member {string} etag - * @memberof google.cloud.deploy.v1.Rollout + * ApproveRolloutRequest name. + * @member {string} name + * @memberof google.cloud.deploy.v1.ApproveRolloutRequest * @instance */ - Rollout.prototype.etag = ""; + ApproveRolloutRequest.prototype.name = ""; /** - * Rollout deployFailureCause. - * @member {google.cloud.deploy.v1.Rollout.FailureCause} deployFailureCause - * @memberof google.cloud.deploy.v1.Rollout + * ApproveRolloutRequest approved. + * @member {boolean} approved + * @memberof google.cloud.deploy.v1.ApproveRolloutRequest * @instance */ - Rollout.prototype.deployFailureCause = 0; + ApproveRolloutRequest.prototype.approved = false; /** - * Creates a new Rollout instance using the specified properties. + * Creates a new ApproveRolloutRequest instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.Rollout + * @memberof google.cloud.deploy.v1.ApproveRolloutRequest * @static - * @param {google.cloud.deploy.v1.IRollout=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.Rollout} Rollout instance + * @param {google.cloud.deploy.v1.IApproveRolloutRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ApproveRolloutRequest} ApproveRolloutRequest instance */ - Rollout.create = function create(properties) { - return new Rollout(properties); + ApproveRolloutRequest.create = function create(properties) { + return new ApproveRolloutRequest(properties); }; /** - * Encodes the specified Rollout message. Does not implicitly {@link google.cloud.deploy.v1.Rollout.verify|verify} messages. + * Encodes the specified ApproveRolloutRequest message. Does not implicitly {@link google.cloud.deploy.v1.ApproveRolloutRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.Rollout + * @memberof google.cloud.deploy.v1.ApproveRolloutRequest * @static - * @param {google.cloud.deploy.v1.IRollout} message Rollout message or plain object to encode + * @param {google.cloud.deploy.v1.IApproveRolloutRequest} message ApproveRolloutRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Rollout.encode = function encode(message, writer) { + ApproveRolloutRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) - for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.approveTime != null && Object.hasOwnProperty.call(message, "approveTime")) - $root.google.protobuf.Timestamp.encode(message.approveTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.enqueueTime != null && Object.hasOwnProperty.call(message, "enqueueTime")) - $root.google.protobuf.Timestamp.encode(message.enqueueTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.deployStartTime != null && Object.hasOwnProperty.call(message, "deployStartTime")) - $root.google.protobuf.Timestamp.encode(message.deployStartTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.deployEndTime != null && Object.hasOwnProperty.call(message, "deployEndTime")) - $root.google.protobuf.Timestamp.encode(message.deployEndTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.approvalState != null && Object.hasOwnProperty.call(message, "approvalState")) - writer.uint32(/* id 12, wireType 0 =*/96).int32(message.approvalState); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 13, wireType 0 =*/104).int32(message.state); - if (message.failureReason != null && Object.hasOwnProperty.call(message, "failureReason")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.failureReason); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 16, wireType 2 =*/130).string(message.etag); - if (message.deployingBuild != null && Object.hasOwnProperty.call(message, "deployingBuild")) - writer.uint32(/* id 17, wireType 2 =*/138).string(message.deployingBuild); - if (message.targetId != null && Object.hasOwnProperty.call(message, "targetId")) - writer.uint32(/* id 18, wireType 2 =*/146).string(message.targetId); - if (message.deployFailureCause != null && Object.hasOwnProperty.call(message, "deployFailureCause")) - writer.uint32(/* id 19, wireType 0 =*/152).int32(message.deployFailureCause); + if (message.approved != null && Object.hasOwnProperty.call(message, "approved")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.approved); return writer; }; /** - * Encodes the specified Rollout message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Rollout.verify|verify} messages. + * Encodes the specified ApproveRolloutRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ApproveRolloutRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.Rollout + * @memberof google.cloud.deploy.v1.ApproveRolloutRequest * @static - * @param {google.cloud.deploy.v1.IRollout} message Rollout message or plain object to encode + * @param {google.cloud.deploy.v1.IApproveRolloutRequest} message ApproveRolloutRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Rollout.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Rollout message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.deploy.v1.Rollout - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.Rollout} Rollout - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Rollout.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Rollout(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.uid = reader.string(); - break; - } - case 3: { - message.description = reader.string(); - break; - } - case 4: { - if (message.annotations === $util.emptyObject) - message.annotations = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.annotations[key] = value; - break; - } - case 5: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 6: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.approveTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 8: { - message.enqueueTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 9: { - message.deployStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 10: { - message.deployEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 18: { - message.targetId = reader.string(); - break; - } - case 12: { - message.approvalState = reader.int32(); - break; - } - case 13: { - message.state = reader.int32(); - break; - } - case 14: { - message.failureReason = reader.string(); - break; - } - case 17: { - message.deployingBuild = reader.string(); - break; - } - case 16: { - message.etag = reader.string(); + ApproveRolloutRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ApproveRolloutRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.ApproveRolloutRequest} ApproveRolloutRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ApproveRolloutRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ApproveRolloutRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); break; } - case 19: { - message.deployFailureCause = reader.int32(); + case 2: { + message.approved = reader.bool(); break; } default: @@ -10921,474 +15942,731 @@ }; /** - * Decodes a Rollout message from the specified reader or buffer, length delimited. + * Decodes an ApproveRolloutRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.Rollout + * @memberof google.cloud.deploy.v1.ApproveRolloutRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.Rollout} Rollout + * @returns {google.cloud.deploy.v1.ApproveRolloutRequest} ApproveRolloutRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Rollout.decodeDelimited = function decodeDelimited(reader) { + ApproveRolloutRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Rollout message. + * Verifies an ApproveRolloutRequest message. * @function verify - * @memberof google.cloud.deploy.v1.Rollout + * @memberof google.cloud.deploy.v1.ApproveRolloutRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Rollout.verify = function verify(message) { + ApproveRolloutRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.annotations != null && message.hasOwnProperty("annotations")) { - if (!$util.isObject(message.annotations)) - return "annotations: object expected"; - var key = Object.keys(message.annotations); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.annotations[key[i]])) - return "annotations: string{k:string} expected"; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.approveTime != null && message.hasOwnProperty("approveTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.approveTime); - if (error) - return "approveTime." + error; - } - if (message.enqueueTime != null && message.hasOwnProperty("enqueueTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.enqueueTime); - if (error) - return "enqueueTime." + error; - } - if (message.deployStartTime != null && message.hasOwnProperty("deployStartTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.deployStartTime); - if (error) - return "deployStartTime." + error; + if (message.approved != null && message.hasOwnProperty("approved")) + if (typeof message.approved !== "boolean") + return "approved: boolean expected"; + return null; + }; + + /** + * Creates an ApproveRolloutRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.ApproveRolloutRequest} ApproveRolloutRequest + */ + ApproveRolloutRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ApproveRolloutRequest) + return object; + var message = new $root.google.cloud.deploy.v1.ApproveRolloutRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.approved != null) + message.approved = Boolean(object.approved); + return message; + }; + + /** + * Creates a plain object from an ApproveRolloutRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * @static + * @param {google.cloud.deploy.v1.ApproveRolloutRequest} message ApproveRolloutRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ApproveRolloutRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.approved = false; } - if (message.deployEndTime != null && message.hasOwnProperty("deployEndTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.deployEndTime); - if (error) - return "deployEndTime." + error; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.approved != null && message.hasOwnProperty("approved")) + object.approved = message.approved; + return object; + }; + + /** + * Converts this ApproveRolloutRequest to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * @instance + * @returns {Object.} JSON object + */ + ApproveRolloutRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ApproveRolloutRequest + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ApproveRolloutRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - if (message.targetId != null && message.hasOwnProperty("targetId")) - if (!$util.isString(message.targetId)) - return "targetId: string expected"; - if (message.approvalState != null && message.hasOwnProperty("approvalState")) - switch (message.approvalState) { - default: - return "approvalState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.failureReason != null && message.hasOwnProperty("failureReason")) - if (!$util.isString(message.failureReason)) - return "failureReason: string expected"; - if (message.deployingBuild != null && message.hasOwnProperty("deployingBuild")) - if (!$util.isString(message.deployingBuild)) - return "deployingBuild: string expected"; - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.deployFailureCause != null && message.hasOwnProperty("deployFailureCause")) - switch (message.deployFailureCause) { + return typeUrlPrefix + "/google.cloud.deploy.v1.ApproveRolloutRequest"; + }; + + return ApproveRolloutRequest; + })(); + + v1.ApproveRolloutResponse = (function() { + + /** + * Properties of an ApproveRolloutResponse. + * @memberof google.cloud.deploy.v1 + * @interface IApproveRolloutResponse + */ + + /** + * Constructs a new ApproveRolloutResponse. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents an ApproveRolloutResponse. + * @implements IApproveRolloutResponse + * @constructor + * @param {google.cloud.deploy.v1.IApproveRolloutResponse=} [properties] Properties to set + */ + function ApproveRolloutResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new ApproveRolloutResponse instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.ApproveRolloutResponse + * @static + * @param {google.cloud.deploy.v1.IApproveRolloutResponse=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ApproveRolloutResponse} ApproveRolloutResponse instance + */ + ApproveRolloutResponse.create = function create(properties) { + return new ApproveRolloutResponse(properties); + }; + + /** + * Encodes the specified ApproveRolloutResponse message. Does not implicitly {@link google.cloud.deploy.v1.ApproveRolloutResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.ApproveRolloutResponse + * @static + * @param {google.cloud.deploy.v1.IApproveRolloutResponse} message ApproveRolloutResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ApproveRolloutResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified ApproveRolloutResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ApproveRolloutResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.ApproveRolloutResponse + * @static + * @param {google.cloud.deploy.v1.IApproveRolloutResponse} message ApproveRolloutResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ApproveRolloutResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ApproveRolloutResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.ApproveRolloutResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.ApproveRolloutResponse} ApproveRolloutResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ApproveRolloutResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ApproveRolloutResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { default: - return "deployFailureCause: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: + reader.skipType(tag & 7); break; } + } + return message; + }; + + /** + * Decodes an ApproveRolloutResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.ApproveRolloutResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.ApproveRolloutResponse} ApproveRolloutResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ApproveRolloutResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ApproveRolloutResponse message. + * @function verify + * @memberof google.cloud.deploy.v1.ApproveRolloutResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ApproveRolloutResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; return null; }; /** - * Creates a Rollout message from a plain object. Also converts values to their respective internal types. + * Creates an ApproveRolloutResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.Rollout + * @memberof google.cloud.deploy.v1.ApproveRolloutResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.Rollout} Rollout + * @returns {google.cloud.deploy.v1.ApproveRolloutResponse} ApproveRolloutResponse */ - Rollout.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.Rollout) + ApproveRolloutResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ApproveRolloutResponse) return object; - var message = new $root.google.cloud.deploy.v1.Rollout(); - if (object.name != null) - message.name = String(object.name); - if (object.uid != null) - message.uid = String(object.uid); - if (object.description != null) - message.description = String(object.description); - if (object.annotations) { - if (typeof object.annotations !== "object") - throw TypeError(".google.cloud.deploy.v1.Rollout.annotations: object expected"); - message.annotations = {}; - for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) - message.annotations[keys[i]] = String(object.annotations[keys[i]]); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.deploy.v1.Rollout.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.deploy.v1.Rollout.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.approveTime != null) { - if (typeof object.approveTime !== "object") - throw TypeError(".google.cloud.deploy.v1.Rollout.approveTime: object expected"); - message.approveTime = $root.google.protobuf.Timestamp.fromObject(object.approveTime); - } - if (object.enqueueTime != null) { - if (typeof object.enqueueTime !== "object") - throw TypeError(".google.cloud.deploy.v1.Rollout.enqueueTime: object expected"); - message.enqueueTime = $root.google.protobuf.Timestamp.fromObject(object.enqueueTime); - } - if (object.deployStartTime != null) { - if (typeof object.deployStartTime !== "object") - throw TypeError(".google.cloud.deploy.v1.Rollout.deployStartTime: object expected"); - message.deployStartTime = $root.google.protobuf.Timestamp.fromObject(object.deployStartTime); - } - if (object.deployEndTime != null) { - if (typeof object.deployEndTime !== "object") - throw TypeError(".google.cloud.deploy.v1.Rollout.deployEndTime: object expected"); - message.deployEndTime = $root.google.protobuf.Timestamp.fromObject(object.deployEndTime); - } - if (object.targetId != null) - message.targetId = String(object.targetId); - switch (object.approvalState) { - case "APPROVAL_STATE_UNSPECIFIED": - case 0: - message.approvalState = 0; - break; - case "NEEDS_APPROVAL": - case 1: - message.approvalState = 1; - break; - case "DOES_NOT_NEED_APPROVAL": - case 2: - message.approvalState = 2; - break; - case "APPROVED": - case 3: - message.approvalState = 3; - break; - case "REJECTED": - case 4: - message.approvalState = 4; - break; - } - switch (object.state) { - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "SUCCEEDED": - case 1: - message.state = 1; - break; - case "FAILED": - case 2: - message.state = 2; - break; - case "IN_PROGRESS": - case 3: - message.state = 3; - break; - case "PENDING_APPROVAL": - case 4: - message.state = 4; - break; - case "APPROVAL_REJECTED": - case 5: - message.state = 5; - break; - case "PENDING": - case 6: - message.state = 6; - break; - case "PENDING_RELEASE": - case 7: - message.state = 7; - break; + return new $root.google.cloud.deploy.v1.ApproveRolloutResponse(); + }; + + /** + * Creates a plain object from an ApproveRolloutResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.ApproveRolloutResponse + * @static + * @param {google.cloud.deploy.v1.ApproveRolloutResponse} message ApproveRolloutResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ApproveRolloutResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this ApproveRolloutResponse to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.ApproveRolloutResponse + * @instance + * @returns {Object.} JSON object + */ + ApproveRolloutResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ApproveRolloutResponse + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.ApproveRolloutResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ApproveRolloutResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - if (object.failureReason != null) - message.failureReason = String(object.failureReason); - if (object.deployingBuild != null) - message.deployingBuild = String(object.deployingBuild); - if (object.etag != null) - message.etag = String(object.etag); - switch (object.deployFailureCause) { - case "FAILURE_CAUSE_UNSPECIFIED": - case 0: - message.deployFailureCause = 0; - break; - case "CLOUD_BUILD_UNAVAILABLE": - case 1: - message.deployFailureCause = 1; - break; - case "EXECUTION_FAILED": - case 2: - message.deployFailureCause = 2; - break; - case "DEADLINE_EXCEEDED": - case 3: - message.deployFailureCause = 3; - break; - case "RELEASE_FAILED": - case 4: - message.deployFailureCause = 4; - break; + return typeUrlPrefix + "/google.cloud.deploy.v1.ApproveRolloutResponse"; + }; + + return ApproveRolloutResponse; + })(); + + v1.RetryJobRequest = (function() { + + /** + * Properties of a RetryJobRequest. + * @memberof google.cloud.deploy.v1 + * @interface IRetryJobRequest + * @property {string|null} [rollout] RetryJobRequest rollout + * @property {string|null} [phaseId] RetryJobRequest phaseId + * @property {string|null} [jobId] RetryJobRequest jobId + */ + + /** + * Constructs a new RetryJobRequest. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a RetryJobRequest. + * @implements IRetryJobRequest + * @constructor + * @param {google.cloud.deploy.v1.IRetryJobRequest=} [properties] Properties to set + */ + function RetryJobRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RetryJobRequest rollout. + * @member {string} rollout + * @memberof google.cloud.deploy.v1.RetryJobRequest + * @instance + */ + RetryJobRequest.prototype.rollout = ""; + + /** + * RetryJobRequest phaseId. + * @member {string} phaseId + * @memberof google.cloud.deploy.v1.RetryJobRequest + * @instance + */ + RetryJobRequest.prototype.phaseId = ""; + + /** + * RetryJobRequest jobId. + * @member {string} jobId + * @memberof google.cloud.deploy.v1.RetryJobRequest + * @instance + */ + RetryJobRequest.prototype.jobId = ""; + + /** + * Creates a new RetryJobRequest instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.RetryJobRequest + * @static + * @param {google.cloud.deploy.v1.IRetryJobRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.RetryJobRequest} RetryJobRequest instance + */ + RetryJobRequest.create = function create(properties) { + return new RetryJobRequest(properties); + }; + + /** + * Encodes the specified RetryJobRequest message. Does not implicitly {@link google.cloud.deploy.v1.RetryJobRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.RetryJobRequest + * @static + * @param {google.cloud.deploy.v1.IRetryJobRequest} message RetryJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RetryJobRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rollout != null && Object.hasOwnProperty.call(message, "rollout")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.rollout); + if (message.phaseId != null && Object.hasOwnProperty.call(message, "phaseId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.phaseId); + if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.jobId); + return writer; + }; + + /** + * Encodes the specified RetryJobRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.RetryJobRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.RetryJobRequest + * @static + * @param {google.cloud.deploy.v1.IRetryJobRequest} message RetryJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RetryJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RetryJobRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.RetryJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.RetryJobRequest} RetryJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RetryJobRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.RetryJobRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rollout = reader.string(); + break; + } + case 2: { + message.phaseId = reader.string(); + break; + } + case 3: { + message.jobId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } } return message; }; /** - * Creates a plain object from a Rollout message. Also converts values to other types if specified. + * Decodes a RetryJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.RetryJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.RetryJobRequest} RetryJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RetryJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RetryJobRequest message. + * @function verify + * @memberof google.cloud.deploy.v1.RetryJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RetryJobRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rollout != null && message.hasOwnProperty("rollout")) + if (!$util.isString(message.rollout)) + return "rollout: string expected"; + if (message.phaseId != null && message.hasOwnProperty("phaseId")) + if (!$util.isString(message.phaseId)) + return "phaseId: string expected"; + if (message.jobId != null && message.hasOwnProperty("jobId")) + if (!$util.isString(message.jobId)) + return "jobId: string expected"; + return null; + }; + + /** + * Creates a RetryJobRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.RetryJobRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.RetryJobRequest} RetryJobRequest + */ + RetryJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.RetryJobRequest) + return object; + var message = new $root.google.cloud.deploy.v1.RetryJobRequest(); + if (object.rollout != null) + message.rollout = String(object.rollout); + if (object.phaseId != null) + message.phaseId = String(object.phaseId); + if (object.jobId != null) + message.jobId = String(object.jobId); + return message; + }; + + /** + * Creates a plain object from a RetryJobRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.Rollout + * @memberof google.cloud.deploy.v1.RetryJobRequest * @static - * @param {google.cloud.deploy.v1.Rollout} message Rollout + * @param {google.cloud.deploy.v1.RetryJobRequest} message RetryJobRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Rollout.toObject = function toObject(message, options) { + RetryJobRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) { - object.annotations = {}; - object.labels = {}; - } if (options.defaults) { - object.name = ""; - object.uid = ""; - object.description = ""; - object.createTime = null; - object.approveTime = null; - object.enqueueTime = null; - object.deployStartTime = null; - object.deployEndTime = null; - object.approvalState = options.enums === String ? "APPROVAL_STATE_UNSPECIFIED" : 0; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.failureReason = ""; - object.etag = ""; - object.deployingBuild = ""; - object.targetId = ""; - object.deployFailureCause = options.enums === String ? "FAILURE_CAUSE_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - var keys2; - if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { - object.annotations = {}; - for (var j = 0; j < keys2.length; ++j) - object.annotations[keys2[j]] = message.annotations[keys2[j]]; - } - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; + object.rollout = ""; + object.phaseId = ""; + object.jobId = ""; } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.approveTime != null && message.hasOwnProperty("approveTime")) - object.approveTime = $root.google.protobuf.Timestamp.toObject(message.approveTime, options); - if (message.enqueueTime != null && message.hasOwnProperty("enqueueTime")) - object.enqueueTime = $root.google.protobuf.Timestamp.toObject(message.enqueueTime, options); - if (message.deployStartTime != null && message.hasOwnProperty("deployStartTime")) - object.deployStartTime = $root.google.protobuf.Timestamp.toObject(message.deployStartTime, options); - if (message.deployEndTime != null && message.hasOwnProperty("deployEndTime")) - object.deployEndTime = $root.google.protobuf.Timestamp.toObject(message.deployEndTime, options); - if (message.approvalState != null && message.hasOwnProperty("approvalState")) - object.approvalState = options.enums === String ? $root.google.cloud.deploy.v1.Rollout.ApprovalState[message.approvalState] : message.approvalState; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.deploy.v1.Rollout.State[message.state] : message.state; - if (message.failureReason != null && message.hasOwnProperty("failureReason")) - object.failureReason = message.failureReason; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.deployingBuild != null && message.hasOwnProperty("deployingBuild")) - object.deployingBuild = message.deployingBuild; - if (message.targetId != null && message.hasOwnProperty("targetId")) - object.targetId = message.targetId; - if (message.deployFailureCause != null && message.hasOwnProperty("deployFailureCause")) - object.deployFailureCause = options.enums === String ? $root.google.cloud.deploy.v1.Rollout.FailureCause[message.deployFailureCause] : message.deployFailureCause; + if (message.rollout != null && message.hasOwnProperty("rollout")) + object.rollout = message.rollout; + if (message.phaseId != null && message.hasOwnProperty("phaseId")) + object.phaseId = message.phaseId; + if (message.jobId != null && message.hasOwnProperty("jobId")) + object.jobId = message.jobId; return object; }; /** - * Converts this Rollout to JSON. + * Converts this RetryJobRequest to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.RetryJobRequest + * @instance + * @returns {Object.} JSON object + */ + RetryJobRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RetryJobRequest + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.RetryJobRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RetryJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.RetryJobRequest"; + }; + + return RetryJobRequest; + })(); + + v1.RetryJobResponse = (function() { + + /** + * Properties of a RetryJobResponse. + * @memberof google.cloud.deploy.v1 + * @interface IRetryJobResponse + */ + + /** + * Constructs a new RetryJobResponse. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a RetryJobResponse. + * @implements IRetryJobResponse + * @constructor + * @param {google.cloud.deploy.v1.IRetryJobResponse=} [properties] Properties to set + */ + function RetryJobResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new RetryJobResponse instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.RetryJobResponse + * @static + * @param {google.cloud.deploy.v1.IRetryJobResponse=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.RetryJobResponse} RetryJobResponse instance + */ + RetryJobResponse.create = function create(properties) { + return new RetryJobResponse(properties); + }; + + /** + * Encodes the specified RetryJobResponse message. Does not implicitly {@link google.cloud.deploy.v1.RetryJobResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.RetryJobResponse + * @static + * @param {google.cloud.deploy.v1.IRetryJobResponse} message RetryJobResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RetryJobResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified RetryJobResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.RetryJobResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.RetryJobResponse + * @static + * @param {google.cloud.deploy.v1.IRetryJobResponse} message RetryJobResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RetryJobResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RetryJobResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.RetryJobResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.RetryJobResponse} RetryJobResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RetryJobResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.RetryJobResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RetryJobResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.RetryJobResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.RetryJobResponse} RetryJobResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RetryJobResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RetryJobResponse message. + * @function verify + * @memberof google.cloud.deploy.v1.RetryJobResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RetryJobResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a RetryJobResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.RetryJobResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.RetryJobResponse} RetryJobResponse + */ + RetryJobResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.RetryJobResponse) + return object; + return new $root.google.cloud.deploy.v1.RetryJobResponse(); + }; + + /** + * Creates a plain object from a RetryJobResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.RetryJobResponse + * @static + * @param {google.cloud.deploy.v1.RetryJobResponse} message RetryJobResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RetryJobResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this RetryJobResponse to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.Rollout + * @memberof google.cloud.deploy.v1.RetryJobResponse * @instance * @returns {Object.} JSON object */ - Rollout.prototype.toJSON = function toJSON() { + RetryJobResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Rollout + * Gets the default type url for RetryJobResponse * @function getTypeUrl - * @memberof google.cloud.deploy.v1.Rollout + * @memberof google.cloud.deploy.v1.RetryJobResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Rollout.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RetryJobResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.Rollout"; + return typeUrlPrefix + "/google.cloud.deploy.v1.RetryJobResponse"; }; - /** - * ApprovalState enum. - * @name google.cloud.deploy.v1.Rollout.ApprovalState - * @enum {number} - * @property {number} APPROVAL_STATE_UNSPECIFIED=0 APPROVAL_STATE_UNSPECIFIED value - * @property {number} NEEDS_APPROVAL=1 NEEDS_APPROVAL value - * @property {number} DOES_NOT_NEED_APPROVAL=2 DOES_NOT_NEED_APPROVAL value - * @property {number} APPROVED=3 APPROVED value - * @property {number} REJECTED=4 REJECTED value - */ - Rollout.ApprovalState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "APPROVAL_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "NEEDS_APPROVAL"] = 1; - values[valuesById[2] = "DOES_NOT_NEED_APPROVAL"] = 2; - values[valuesById[3] = "APPROVED"] = 3; - values[valuesById[4] = "REJECTED"] = 4; - return values; - })(); - - /** - * State enum. - * @name google.cloud.deploy.v1.Rollout.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} SUCCEEDED=1 SUCCEEDED value - * @property {number} FAILED=2 FAILED value - * @property {number} IN_PROGRESS=3 IN_PROGRESS value - * @property {number} PENDING_APPROVAL=4 PENDING_APPROVAL value - * @property {number} APPROVAL_REJECTED=5 APPROVAL_REJECTED value - * @property {number} PENDING=6 PENDING value - * @property {number} PENDING_RELEASE=7 PENDING_RELEASE value - */ - Rollout.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SUCCEEDED"] = 1; - values[valuesById[2] = "FAILED"] = 2; - values[valuesById[3] = "IN_PROGRESS"] = 3; - values[valuesById[4] = "PENDING_APPROVAL"] = 4; - values[valuesById[5] = "APPROVAL_REJECTED"] = 5; - values[valuesById[6] = "PENDING"] = 6; - values[valuesById[7] = "PENDING_RELEASE"] = 7; - return values; - })(); - - /** - * FailureCause enum. - * @name google.cloud.deploy.v1.Rollout.FailureCause - * @enum {number} - * @property {number} FAILURE_CAUSE_UNSPECIFIED=0 FAILURE_CAUSE_UNSPECIFIED value - * @property {number} CLOUD_BUILD_UNAVAILABLE=1 CLOUD_BUILD_UNAVAILABLE value - * @property {number} EXECUTION_FAILED=2 EXECUTION_FAILED value - * @property {number} DEADLINE_EXCEEDED=3 DEADLINE_EXCEEDED value - * @property {number} RELEASE_FAILED=4 RELEASE_FAILED value - */ - Rollout.FailureCause = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FAILURE_CAUSE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CLOUD_BUILD_UNAVAILABLE"] = 1; - values[valuesById[2] = "EXECUTION_FAILED"] = 2; - values[valuesById[3] = "DEADLINE_EXCEEDED"] = 3; - values[valuesById[4] = "RELEASE_FAILED"] = 4; - return values; - })(); - - return Rollout; + return RetryJobResponse; })(); - v1.ListRolloutsRequest = (function() { + v1.AbandonReleaseRequest = (function() { /** - * Properties of a ListRolloutsRequest. + * Properties of an AbandonReleaseRequest. * @memberof google.cloud.deploy.v1 - * @interface IListRolloutsRequest - * @property {string|null} [parent] ListRolloutsRequest parent - * @property {number|null} [pageSize] ListRolloutsRequest pageSize - * @property {string|null} [pageToken] ListRolloutsRequest pageToken - * @property {string|null} [filter] ListRolloutsRequest filter - * @property {string|null} [orderBy] ListRolloutsRequest orderBy + * @interface IAbandonReleaseRequest + * @property {string|null} [name] AbandonReleaseRequest name */ /** - * Constructs a new ListRolloutsRequest. + * Constructs a new AbandonReleaseRequest. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a ListRolloutsRequest. - * @implements IListRolloutsRequest + * @classdesc Represents an AbandonReleaseRequest. + * @implements IAbandonReleaseRequest * @constructor - * @param {google.cloud.deploy.v1.IListRolloutsRequest=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IAbandonReleaseRequest=} [properties] Properties to set */ - function ListRolloutsRequest(properties) { + function AbandonReleaseRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11396,133 +16674,265 @@ } /** - * ListRolloutsRequest parent. - * @member {string} parent - * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * AbandonReleaseRequest name. + * @member {string} name + * @memberof google.cloud.deploy.v1.AbandonReleaseRequest * @instance */ - ListRolloutsRequest.prototype.parent = ""; + AbandonReleaseRequest.prototype.name = ""; /** - * ListRolloutsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.deploy.v1.ListRolloutsRequest - * @instance + * Creates a new AbandonReleaseRequest instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.AbandonReleaseRequest + * @static + * @param {google.cloud.deploy.v1.IAbandonReleaseRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.AbandonReleaseRequest} AbandonReleaseRequest instance */ - ListRolloutsRequest.prototype.pageSize = 0; + AbandonReleaseRequest.create = function create(properties) { + return new AbandonReleaseRequest(properties); + }; /** - * ListRolloutsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * Encodes the specified AbandonReleaseRequest message. Does not implicitly {@link google.cloud.deploy.v1.AbandonReleaseRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.AbandonReleaseRequest + * @static + * @param {google.cloud.deploy.v1.IAbandonReleaseRequest} message AbandonReleaseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AbandonReleaseRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified AbandonReleaseRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AbandonReleaseRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.AbandonReleaseRequest + * @static + * @param {google.cloud.deploy.v1.IAbandonReleaseRequest} message AbandonReleaseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AbandonReleaseRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AbandonReleaseRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.AbandonReleaseRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.AbandonReleaseRequest} AbandonReleaseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AbandonReleaseRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.AbandonReleaseRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AbandonReleaseRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.AbandonReleaseRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.AbandonReleaseRequest} AbandonReleaseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AbandonReleaseRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AbandonReleaseRequest message. + * @function verify + * @memberof google.cloud.deploy.v1.AbandonReleaseRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AbandonReleaseRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates an AbandonReleaseRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.AbandonReleaseRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.AbandonReleaseRequest} AbandonReleaseRequest + */ + AbandonReleaseRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.AbandonReleaseRequest) + return object; + var message = new $root.google.cloud.deploy.v1.AbandonReleaseRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from an AbandonReleaseRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.AbandonReleaseRequest + * @static + * @param {google.cloud.deploy.v1.AbandonReleaseRequest} message AbandonReleaseRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AbandonReleaseRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this AbandonReleaseRequest to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.AbandonReleaseRequest * @instance + * @returns {Object.} JSON object + */ + AbandonReleaseRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AbandonReleaseRequest + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.AbandonReleaseRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - ListRolloutsRequest.prototype.pageToken = ""; + AbandonReleaseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.AbandonReleaseRequest"; + }; + + return AbandonReleaseRequest; + })(); + + v1.AbandonReleaseResponse = (function() { /** - * ListRolloutsRequest filter. - * @member {string} filter - * @memberof google.cloud.deploy.v1.ListRolloutsRequest - * @instance + * Properties of an AbandonReleaseResponse. + * @memberof google.cloud.deploy.v1 + * @interface IAbandonReleaseResponse */ - ListRolloutsRequest.prototype.filter = ""; /** - * ListRolloutsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.deploy.v1.ListRolloutsRequest - * @instance + * Constructs a new AbandonReleaseResponse. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents an AbandonReleaseResponse. + * @implements IAbandonReleaseResponse + * @constructor + * @param {google.cloud.deploy.v1.IAbandonReleaseResponse=} [properties] Properties to set */ - ListRolloutsRequest.prototype.orderBy = ""; + function AbandonReleaseResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Creates a new ListRolloutsRequest instance using the specified properties. + * Creates a new AbandonReleaseResponse instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @memberof google.cloud.deploy.v1.AbandonReleaseResponse * @static - * @param {google.cloud.deploy.v1.IListRolloutsRequest=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.ListRolloutsRequest} ListRolloutsRequest instance + * @param {google.cloud.deploy.v1.IAbandonReleaseResponse=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.AbandonReleaseResponse} AbandonReleaseResponse instance */ - ListRolloutsRequest.create = function create(properties) { - return new ListRolloutsRequest(properties); + AbandonReleaseResponse.create = function create(properties) { + return new AbandonReleaseResponse(properties); }; /** - * Encodes the specified ListRolloutsRequest message. Does not implicitly {@link google.cloud.deploy.v1.ListRolloutsRequest.verify|verify} messages. + * Encodes the specified AbandonReleaseResponse message. Does not implicitly {@link google.cloud.deploy.v1.AbandonReleaseResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @memberof google.cloud.deploy.v1.AbandonReleaseResponse * @static - * @param {google.cloud.deploy.v1.IListRolloutsRequest} message ListRolloutsRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IAbandonReleaseResponse} message AbandonReleaseResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListRolloutsRequest.encode = function encode(message, writer) { + AbandonReleaseResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; /** - * Encodes the specified ListRolloutsRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListRolloutsRequest.verify|verify} messages. + * Encodes the specified AbandonReleaseResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AbandonReleaseResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @memberof google.cloud.deploy.v1.AbandonReleaseResponse * @static - * @param {google.cloud.deploy.v1.IListRolloutsRequest} message ListRolloutsRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IAbandonReleaseResponse} message AbandonReleaseResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListRolloutsRequest.encodeDelimited = function encodeDelimited(message, writer) { + AbandonReleaseResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListRolloutsRequest message from the specified reader or buffer. + * Decodes an AbandonReleaseResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @memberof google.cloud.deploy.v1.AbandonReleaseResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.ListRolloutsRequest} ListRolloutsRequest + * @returns {google.cloud.deploy.v1.AbandonReleaseResponse} AbandonReleaseResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListRolloutsRequest.decode = function decode(reader, length) { + AbandonReleaseResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListRolloutsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.AbandonReleaseResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -11532,159 +16942,119 @@ }; /** - * Decodes a ListRolloutsRequest message from the specified reader or buffer, length delimited. + * Decodes an AbandonReleaseResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @memberof google.cloud.deploy.v1.AbandonReleaseResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.ListRolloutsRequest} ListRolloutsRequest + * @returns {google.cloud.deploy.v1.AbandonReleaseResponse} AbandonReleaseResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListRolloutsRequest.decodeDelimited = function decodeDelimited(reader) { + AbandonReleaseResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListRolloutsRequest message. + * Verifies an AbandonReleaseResponse message. * @function verify - * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @memberof google.cloud.deploy.v1.AbandonReleaseResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListRolloutsRequest.verify = function verify(message) { + AbandonReleaseResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; return null; }; /** - * Creates a ListRolloutsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AbandonReleaseResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @memberof google.cloud.deploy.v1.AbandonReleaseResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.ListRolloutsRequest} ListRolloutsRequest + * @returns {google.cloud.deploy.v1.AbandonReleaseResponse} AbandonReleaseResponse */ - ListRolloutsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.ListRolloutsRequest) + AbandonReleaseResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.AbandonReleaseResponse) return object; - var message = new $root.google.cloud.deploy.v1.ListRolloutsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; + return new $root.google.cloud.deploy.v1.AbandonReleaseResponse(); }; /** - * Creates a plain object from a ListRolloutsRequest message. Also converts values to other types if specified. + * Creates a plain object from an AbandonReleaseResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @memberof google.cloud.deploy.v1.AbandonReleaseResponse * @static - * @param {google.cloud.deploy.v1.ListRolloutsRequest} message ListRolloutsRequest + * @param {google.cloud.deploy.v1.AbandonReleaseResponse} message AbandonReleaseResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListRolloutsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; + AbandonReleaseResponse.toObject = function toObject() { + return {}; }; /** - * Converts this ListRolloutsRequest to JSON. + * Converts this AbandonReleaseResponse to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @memberof google.cloud.deploy.v1.AbandonReleaseResponse * @instance * @returns {Object.} JSON object */ - ListRolloutsRequest.prototype.toJSON = function toJSON() { + AbandonReleaseResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListRolloutsRequest + * Gets the default type url for AbandonReleaseResponse * @function getTypeUrl - * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @memberof google.cloud.deploy.v1.AbandonReleaseResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListRolloutsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AbandonReleaseResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.ListRolloutsRequest"; + return typeUrlPrefix + "/google.cloud.deploy.v1.AbandonReleaseResponse"; }; - return ListRolloutsRequest; + return AbandonReleaseResponse; })(); - v1.ListRolloutsResponse = (function() { + v1.JobRun = (function() { /** - * Properties of a ListRolloutsResponse. + * Properties of a JobRun. * @memberof google.cloud.deploy.v1 - * @interface IListRolloutsResponse - * @property {Array.|null} [rollouts] ListRolloutsResponse rollouts - * @property {string|null} [nextPageToken] ListRolloutsResponse nextPageToken - * @property {Array.|null} [unreachable] ListRolloutsResponse unreachable - */ - - /** - * Constructs a new ListRolloutsResponse. + * @interface IJobRun + * @property {string|null} [name] JobRun name + * @property {string|null} [uid] JobRun uid + * @property {string|null} [phaseId] JobRun phaseId + * @property {string|null} [jobId] JobRun jobId + * @property {google.protobuf.ITimestamp|null} [createTime] JobRun createTime + * @property {google.protobuf.ITimestamp|null} [startTime] JobRun startTime + * @property {google.protobuf.ITimestamp|null} [endTime] JobRun endTime + * @property {google.cloud.deploy.v1.JobRun.State|null} [state] JobRun state + * @property {google.cloud.deploy.v1.IDeployJobRun|null} [deployJobRun] JobRun deployJobRun + * @property {google.cloud.deploy.v1.IVerifyJobRun|null} [verifyJobRun] JobRun verifyJobRun + * @property {string|null} [etag] JobRun etag + */ + + /** + * Constructs a new JobRun. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a ListRolloutsResponse. - * @implements IListRolloutsResponse + * @classdesc Represents a JobRun. + * @implements IJobRun * @constructor - * @param {google.cloud.deploy.v1.IListRolloutsResponse=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IJobRun=} [properties] Properties to set */ - function ListRolloutsResponse(properties) { - this.rollouts = []; - this.unreachable = []; + function JobRun(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11692,109 +17062,229 @@ } /** - * ListRolloutsResponse rollouts. - * @member {Array.} rollouts - * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * JobRun name. + * @member {string} name + * @memberof google.cloud.deploy.v1.JobRun * @instance */ - ListRolloutsResponse.prototype.rollouts = $util.emptyArray; + JobRun.prototype.name = ""; /** - * ListRolloutsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * JobRun uid. + * @member {string} uid + * @memberof google.cloud.deploy.v1.JobRun * @instance */ - ListRolloutsResponse.prototype.nextPageToken = ""; + JobRun.prototype.uid = ""; /** - * ListRolloutsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * JobRun phaseId. + * @member {string} phaseId + * @memberof google.cloud.deploy.v1.JobRun * @instance */ - ListRolloutsResponse.prototype.unreachable = $util.emptyArray; + JobRun.prototype.phaseId = ""; /** - * Creates a new ListRolloutsResponse instance using the specified properties. + * JobRun jobId. + * @member {string} jobId + * @memberof google.cloud.deploy.v1.JobRun + * @instance + */ + JobRun.prototype.jobId = ""; + + /** + * JobRun createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.deploy.v1.JobRun + * @instance + */ + JobRun.prototype.createTime = null; + + /** + * JobRun startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.deploy.v1.JobRun + * @instance + */ + JobRun.prototype.startTime = null; + + /** + * JobRun endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.deploy.v1.JobRun + * @instance + */ + JobRun.prototype.endTime = null; + + /** + * JobRun state. + * @member {google.cloud.deploy.v1.JobRun.State} state + * @memberof google.cloud.deploy.v1.JobRun + * @instance + */ + JobRun.prototype.state = 0; + + /** + * JobRun deployJobRun. + * @member {google.cloud.deploy.v1.IDeployJobRun|null|undefined} deployJobRun + * @memberof google.cloud.deploy.v1.JobRun + * @instance + */ + JobRun.prototype.deployJobRun = null; + + /** + * JobRun verifyJobRun. + * @member {google.cloud.deploy.v1.IVerifyJobRun|null|undefined} verifyJobRun + * @memberof google.cloud.deploy.v1.JobRun + * @instance + */ + JobRun.prototype.verifyJobRun = null; + + /** + * JobRun etag. + * @member {string} etag + * @memberof google.cloud.deploy.v1.JobRun + * @instance + */ + JobRun.prototype.etag = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * JobRun jobRun. + * @member {"deployJobRun"|"verifyJobRun"|undefined} jobRun + * @memberof google.cloud.deploy.v1.JobRun + * @instance + */ + Object.defineProperty(JobRun.prototype, "jobRun", { + get: $util.oneOfGetter($oneOfFields = ["deployJobRun", "verifyJobRun"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new JobRun instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @memberof google.cloud.deploy.v1.JobRun * @static - * @param {google.cloud.deploy.v1.IListRolloutsResponse=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.ListRolloutsResponse} ListRolloutsResponse instance + * @param {google.cloud.deploy.v1.IJobRun=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.JobRun} JobRun instance */ - ListRolloutsResponse.create = function create(properties) { - return new ListRolloutsResponse(properties); + JobRun.create = function create(properties) { + return new JobRun(properties); }; /** - * Encodes the specified ListRolloutsResponse message. Does not implicitly {@link google.cloud.deploy.v1.ListRolloutsResponse.verify|verify} messages. + * Encodes the specified JobRun message. Does not implicitly {@link google.cloud.deploy.v1.JobRun.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @memberof google.cloud.deploy.v1.JobRun * @static - * @param {google.cloud.deploy.v1.IListRolloutsResponse} message ListRolloutsResponse message or plain object to encode + * @param {google.cloud.deploy.v1.IJobRun} message JobRun message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListRolloutsResponse.encode = function encode(message, writer) { + JobRun.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rollouts != null && message.rollouts.length) - for (var i = 0; i < message.rollouts.length; ++i) - $root.google.cloud.deploy.v1.Rollout.encode(message.rollouts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.phaseId != null && Object.hasOwnProperty.call(message, "phaseId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.phaseId); + if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.jobId); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); + if (message.deployJobRun != null && Object.hasOwnProperty.call(message, "deployJobRun")) + $root.google.cloud.deploy.v1.DeployJobRun.encode(message.deployJobRun, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.verifyJobRun != null && Object.hasOwnProperty.call(message, "verifyJobRun")) + $root.google.cloud.deploy.v1.VerifyJobRun.encode(message.verifyJobRun, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.etag); return writer; }; /** - * Encodes the specified ListRolloutsResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListRolloutsResponse.verify|verify} messages. + * Encodes the specified JobRun message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.JobRun.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @memberof google.cloud.deploy.v1.JobRun * @static - * @param {google.cloud.deploy.v1.IListRolloutsResponse} message ListRolloutsResponse message or plain object to encode + * @param {google.cloud.deploy.v1.IJobRun} message JobRun message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListRolloutsResponse.encodeDelimited = function encodeDelimited(message, writer) { + JobRun.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListRolloutsResponse message from the specified reader or buffer. + * Decodes a JobRun message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @memberof google.cloud.deploy.v1.JobRun * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.ListRolloutsResponse} ListRolloutsResponse + * @returns {google.cloud.deploy.v1.JobRun} JobRun * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListRolloutsResponse.decode = function decode(reader, length) { + JobRun.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListRolloutsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.JobRun(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.rollouts && message.rollouts.length)) - message.rollouts = []; - message.rollouts.push($root.google.cloud.deploy.v1.Rollout.decode(reader, reader.uint32())); + message.name = reader.string(); break; } case 2: { - message.nextPageToken = reader.string(); + message.uid = reader.string(); break; } case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); + message.phaseId = reader.string(); + break; + } + case 4: { + message.jobId = reader.string(); + break; + } + case 5: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.state = reader.int32(); + break; + } + case 9: { + message.deployJobRun = $root.google.cloud.deploy.v1.DeployJobRun.decode(reader, reader.uint32()); + break; + } + case 10: { + message.verifyJobRun = $root.google.cloud.deploy.v1.VerifyJobRun.decode(reader, reader.uint32()); + break; + } + case 11: { + message.etag = reader.string(); break; } default: @@ -11806,169 +17296,285 @@ }; /** - * Decodes a ListRolloutsResponse message from the specified reader or buffer, length delimited. + * Decodes a JobRun message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @memberof google.cloud.deploy.v1.JobRun * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.ListRolloutsResponse} ListRolloutsResponse + * @returns {google.cloud.deploy.v1.JobRun} JobRun * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListRolloutsResponse.decodeDelimited = function decodeDelimited(reader) { + JobRun.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListRolloutsResponse message. + * Verifies a JobRun message. * @function verify - * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @memberof google.cloud.deploy.v1.JobRun * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListRolloutsResponse.verify = function verify(message) { + JobRun.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rollouts != null && message.hasOwnProperty("rollouts")) { - if (!Array.isArray(message.rollouts)) - return "rollouts: array expected"; - for (var i = 0; i < message.rollouts.length; ++i) { - var error = $root.google.cloud.deploy.v1.Rollout.verify(message.rollouts[i]); + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.phaseId != null && message.hasOwnProperty("phaseId")) + if (!$util.isString(message.phaseId)) + return "phaseId: string expected"; + if (message.jobId != null && message.hasOwnProperty("jobId")) + if (!$util.isString(message.jobId)) + return "jobId: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.deployJobRun != null && message.hasOwnProperty("deployJobRun")) { + properties.jobRun = 1; + { + var error = $root.google.cloud.deploy.v1.DeployJobRun.verify(message.deployJobRun); if (error) - return "rollouts." + error; + return "deployJobRun." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; + if (message.verifyJobRun != null && message.hasOwnProperty("verifyJobRun")) { + if (properties.jobRun === 1) + return "jobRun: multiple values"; + properties.jobRun = 1; + { + var error = $root.google.cloud.deploy.v1.VerifyJobRun.verify(message.verifyJobRun); + if (error) + return "verifyJobRun." + error; + } } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; return null; }; /** - * Creates a ListRolloutsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a JobRun message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @memberof google.cloud.deploy.v1.JobRun * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.ListRolloutsResponse} ListRolloutsResponse + * @returns {google.cloud.deploy.v1.JobRun} JobRun */ - ListRolloutsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.ListRolloutsResponse) + JobRun.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.JobRun) return object; - var message = new $root.google.cloud.deploy.v1.ListRolloutsResponse(); - if (object.rollouts) { - if (!Array.isArray(object.rollouts)) - throw TypeError(".google.cloud.deploy.v1.ListRolloutsResponse.rollouts: array expected"); - message.rollouts = []; - for (var i = 0; i < object.rollouts.length; ++i) { - if (typeof object.rollouts[i] !== "object") - throw TypeError(".google.cloud.deploy.v1.ListRolloutsResponse.rollouts: object expected"); - message.rollouts[i] = $root.google.cloud.deploy.v1.Rollout.fromObject(object.rollouts[i]); - } + var message = new $root.google.cloud.deploy.v1.JobRun(); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.phaseId != null) + message.phaseId = String(object.phaseId); + if (object.jobId != null) + message.jobId = String(object.jobId); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.deploy.v1.JobRun.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.deploy.v1.ListRolloutsResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.deploy.v1.JobRun.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.deploy.v1.JobRun.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "IN_PROGRESS": + case 1: + message.state = 1; + break; + case "SUCCEEDED": + case 2: + message.state = 2; + break; + case "FAILED": + case 3: + message.state = 3; + break; + } + if (object.deployJobRun != null) { + if (typeof object.deployJobRun !== "object") + throw TypeError(".google.cloud.deploy.v1.JobRun.deployJobRun: object expected"); + message.deployJobRun = $root.google.cloud.deploy.v1.DeployJobRun.fromObject(object.deployJobRun); } + if (object.verifyJobRun != null) { + if (typeof object.verifyJobRun !== "object") + throw TypeError(".google.cloud.deploy.v1.JobRun.verifyJobRun: object expected"); + message.verifyJobRun = $root.google.cloud.deploy.v1.VerifyJobRun.fromObject(object.verifyJobRun); + } + if (object.etag != null) + message.etag = String(object.etag); return message; }; /** - * Creates a plain object from a ListRolloutsResponse message. Also converts values to other types if specified. + * Creates a plain object from a JobRun message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @memberof google.cloud.deploy.v1.JobRun * @static - * @param {google.cloud.deploy.v1.ListRolloutsResponse} message ListRolloutsResponse + * @param {google.cloud.deploy.v1.JobRun} message JobRun * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListRolloutsResponse.toObject = function toObject(message, options) { + JobRun.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.rollouts = []; - object.unreachable = []; + if (options.defaults) { + object.name = ""; + object.uid = ""; + object.phaseId = ""; + object.jobId = ""; + object.createTime = null; + object.startTime = null; + object.endTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.etag = ""; } - if (options.defaults) - object.nextPageToken = ""; - if (message.rollouts && message.rollouts.length) { - object.rollouts = []; - for (var j = 0; j < message.rollouts.length; ++j) - object.rollouts[j] = $root.google.cloud.deploy.v1.Rollout.toObject(message.rollouts[j], options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.phaseId != null && message.hasOwnProperty("phaseId")) + object.phaseId = message.phaseId; + if (message.jobId != null && message.hasOwnProperty("jobId")) + object.jobId = message.jobId; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.deploy.v1.JobRun.State[message.state] : message.state; + if (message.deployJobRun != null && message.hasOwnProperty("deployJobRun")) { + object.deployJobRun = $root.google.cloud.deploy.v1.DeployJobRun.toObject(message.deployJobRun, options); + if (options.oneofs) + object.jobRun = "deployJobRun"; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; + if (message.verifyJobRun != null && message.hasOwnProperty("verifyJobRun")) { + object.verifyJobRun = $root.google.cloud.deploy.v1.VerifyJobRun.toObject(message.verifyJobRun, options); + if (options.oneofs) + object.jobRun = "verifyJobRun"; } + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; return object; }; /** - * Converts this ListRolloutsResponse to JSON. + * Converts this JobRun to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @memberof google.cloud.deploy.v1.JobRun * @instance * @returns {Object.} JSON object */ - ListRolloutsResponse.prototype.toJSON = function toJSON() { + JobRun.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListRolloutsResponse + * Gets the default type url for JobRun * @function getTypeUrl - * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @memberof google.cloud.deploy.v1.JobRun * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListRolloutsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + JobRun.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.ListRolloutsResponse"; + return typeUrlPrefix + "/google.cloud.deploy.v1.JobRun"; }; - return ListRolloutsResponse; + /** + * State enum. + * @name google.cloud.deploy.v1.JobRun.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} IN_PROGRESS=1 IN_PROGRESS value + * @property {number} SUCCEEDED=2 SUCCEEDED value + * @property {number} FAILED=3 FAILED value + */ + JobRun.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "IN_PROGRESS"] = 1; + values[valuesById[2] = "SUCCEEDED"] = 2; + values[valuesById[3] = "FAILED"] = 3; + return values; + })(); + + return JobRun; })(); - v1.GetRolloutRequest = (function() { + v1.DeployJobRun = (function() { /** - * Properties of a GetRolloutRequest. + * Properties of a DeployJobRun. * @memberof google.cloud.deploy.v1 - * @interface IGetRolloutRequest - * @property {string|null} [name] GetRolloutRequest name + * @interface IDeployJobRun + * @property {string|null} [build] DeployJobRun build + * @property {google.cloud.deploy.v1.DeployJobRun.FailureCause|null} [failureCause] DeployJobRun failureCause + * @property {string|null} [failureMessage] DeployJobRun failureMessage + * @property {google.cloud.deploy.v1.IDeployJobRunMetadata|null} [metadata] DeployJobRun metadata */ /** - * Constructs a new GetRolloutRequest. + * Constructs a new DeployJobRun. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a GetRolloutRequest. - * @implements IGetRolloutRequest + * @classdesc Represents a DeployJobRun. + * @implements IDeployJobRun * @constructor - * @param {google.cloud.deploy.v1.IGetRolloutRequest=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IDeployJobRun=} [properties] Properties to set */ - function GetRolloutRequest(properties) { + function DeployJobRun(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11976,75 +17582,117 @@ } /** - * GetRolloutRequest name. - * @member {string} name - * @memberof google.cloud.deploy.v1.GetRolloutRequest + * DeployJobRun build. + * @member {string} build + * @memberof google.cloud.deploy.v1.DeployJobRun * @instance */ - GetRolloutRequest.prototype.name = ""; + DeployJobRun.prototype.build = ""; /** - * Creates a new GetRolloutRequest instance using the specified properties. + * DeployJobRun failureCause. + * @member {google.cloud.deploy.v1.DeployJobRun.FailureCause} failureCause + * @memberof google.cloud.deploy.v1.DeployJobRun + * @instance + */ + DeployJobRun.prototype.failureCause = 0; + + /** + * DeployJobRun failureMessage. + * @member {string} failureMessage + * @memberof google.cloud.deploy.v1.DeployJobRun + * @instance + */ + DeployJobRun.prototype.failureMessage = ""; + + /** + * DeployJobRun metadata. + * @member {google.cloud.deploy.v1.IDeployJobRunMetadata|null|undefined} metadata + * @memberof google.cloud.deploy.v1.DeployJobRun + * @instance + */ + DeployJobRun.prototype.metadata = null; + + /** + * Creates a new DeployJobRun instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @memberof google.cloud.deploy.v1.DeployJobRun * @static - * @param {google.cloud.deploy.v1.IGetRolloutRequest=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.GetRolloutRequest} GetRolloutRequest instance + * @param {google.cloud.deploy.v1.IDeployJobRun=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.DeployJobRun} DeployJobRun instance */ - GetRolloutRequest.create = function create(properties) { - return new GetRolloutRequest(properties); + DeployJobRun.create = function create(properties) { + return new DeployJobRun(properties); }; /** - * Encodes the specified GetRolloutRequest message. Does not implicitly {@link google.cloud.deploy.v1.GetRolloutRequest.verify|verify} messages. + * Encodes the specified DeployJobRun message. Does not implicitly {@link google.cloud.deploy.v1.DeployJobRun.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @memberof google.cloud.deploy.v1.DeployJobRun * @static - * @param {google.cloud.deploy.v1.IGetRolloutRequest} message GetRolloutRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IDeployJobRun} message DeployJobRun message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetRolloutRequest.encode = function encode(message, writer) { + DeployJobRun.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.build != null && Object.hasOwnProperty.call(message, "build")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.build); + if (message.failureCause != null && Object.hasOwnProperty.call(message, "failureCause")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.failureCause); + if (message.failureMessage != null && Object.hasOwnProperty.call(message, "failureMessage")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.failureMessage); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.cloud.deploy.v1.DeployJobRunMetadata.encode(message.metadata, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetRolloutRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GetRolloutRequest.verify|verify} messages. + * Encodes the specified DeployJobRun message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeployJobRun.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @memberof google.cloud.deploy.v1.DeployJobRun * @static - * @param {google.cloud.deploy.v1.IGetRolloutRequest} message GetRolloutRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IDeployJobRun} message DeployJobRun message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetRolloutRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeployJobRun.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetRolloutRequest message from the specified reader or buffer. + * Decodes a DeployJobRun message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @memberof google.cloud.deploy.v1.DeployJobRun * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.GetRolloutRequest} GetRolloutRequest + * @returns {google.cloud.deploy.v1.DeployJobRun} DeployJobRun * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetRolloutRequest.decode = function decode(reader, length) { + DeployJobRun.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.GetRolloutRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.DeployJobRun(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.build = reader.string(); + break; + } + case 2: { + message.failureCause = reader.int32(); + break; + } + case 3: { + message.failureMessage = reader.string(); + break; + } + case 4: { + message.metadata = $root.google.cloud.deploy.v1.DeployJobRunMetadata.decode(reader, reader.uint32()); break; } default: @@ -12056,126 +17704,197 @@ }; /** - * Decodes a GetRolloutRequest message from the specified reader or buffer, length delimited. + * Decodes a DeployJobRun message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @memberof google.cloud.deploy.v1.DeployJobRun * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.GetRolloutRequest} GetRolloutRequest + * @returns {google.cloud.deploy.v1.DeployJobRun} DeployJobRun * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetRolloutRequest.decodeDelimited = function decodeDelimited(reader) { + DeployJobRun.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetRolloutRequest message. + * Verifies a DeployJobRun message. * @function verify - * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @memberof google.cloud.deploy.v1.DeployJobRun * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetRolloutRequest.verify = function verify(message) { + DeployJobRun.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.build != null && message.hasOwnProperty("build")) + if (!$util.isString(message.build)) + return "build: string expected"; + if (message.failureCause != null && message.hasOwnProperty("failureCause")) + switch (message.failureCause) { + default: + return "failureCause: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.failureMessage != null && message.hasOwnProperty("failureMessage")) + if (!$util.isString(message.failureMessage)) + return "failureMessage: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.cloud.deploy.v1.DeployJobRunMetadata.verify(message.metadata); + if (error) + return "metadata." + error; + } return null; }; /** - * Creates a GetRolloutRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeployJobRun message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @memberof google.cloud.deploy.v1.DeployJobRun * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.GetRolloutRequest} GetRolloutRequest + * @returns {google.cloud.deploy.v1.DeployJobRun} DeployJobRun */ - GetRolloutRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.GetRolloutRequest) + DeployJobRun.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.DeployJobRun) return object; - var message = new $root.google.cloud.deploy.v1.GetRolloutRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.deploy.v1.DeployJobRun(); + if (object.build != null) + message.build = String(object.build); + switch (object.failureCause) { + case "FAILURE_CAUSE_UNSPECIFIED": + case 0: + message.failureCause = 0; + break; + case "CLOUD_BUILD_UNAVAILABLE": + case 1: + message.failureCause = 1; + break; + case "EXECUTION_FAILED": + case 2: + message.failureCause = 2; + break; + case "DEADLINE_EXCEEDED": + case 3: + message.failureCause = 3; + break; + } + if (object.failureMessage != null) + message.failureMessage = String(object.failureMessage); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.deploy.v1.DeployJobRun.metadata: object expected"); + message.metadata = $root.google.cloud.deploy.v1.DeployJobRunMetadata.fromObject(object.metadata); + } return message; }; /** - * Creates a plain object from a GetRolloutRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeployJobRun message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @memberof google.cloud.deploy.v1.DeployJobRun * @static - * @param {google.cloud.deploy.v1.GetRolloutRequest} message GetRolloutRequest + * @param {google.cloud.deploy.v1.DeployJobRun} message DeployJobRun * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetRolloutRequest.toObject = function toObject(message, options) { + DeployJobRun.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.build = ""; + object.failureCause = options.enums === String ? "FAILURE_CAUSE_UNSPECIFIED" : 0; + object.failureMessage = ""; + object.metadata = null; + } + if (message.build != null && message.hasOwnProperty("build")) + object.build = message.build; + if (message.failureCause != null && message.hasOwnProperty("failureCause")) + object.failureCause = options.enums === String ? $root.google.cloud.deploy.v1.DeployJobRun.FailureCause[message.failureCause] : message.failureCause; + if (message.failureMessage != null && message.hasOwnProperty("failureMessage")) + object.failureMessage = message.failureMessage; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.cloud.deploy.v1.DeployJobRunMetadata.toObject(message.metadata, options); return object; }; /** - * Converts this GetRolloutRequest to JSON. + * Converts this DeployJobRun to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @memberof google.cloud.deploy.v1.DeployJobRun * @instance * @returns {Object.} JSON object */ - GetRolloutRequest.prototype.toJSON = function toJSON() { + DeployJobRun.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetRolloutRequest + * Gets the default type url for DeployJobRun * @function getTypeUrl - * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @memberof google.cloud.deploy.v1.DeployJobRun * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetRolloutRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeployJobRun.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.GetRolloutRequest"; + return typeUrlPrefix + "/google.cloud.deploy.v1.DeployJobRun"; }; - return GetRolloutRequest; + /** + * FailureCause enum. + * @name google.cloud.deploy.v1.DeployJobRun.FailureCause + * @enum {number} + * @property {number} FAILURE_CAUSE_UNSPECIFIED=0 FAILURE_CAUSE_UNSPECIFIED value + * @property {number} CLOUD_BUILD_UNAVAILABLE=1 CLOUD_BUILD_UNAVAILABLE value + * @property {number} EXECUTION_FAILED=2 EXECUTION_FAILED value + * @property {number} DEADLINE_EXCEEDED=3 DEADLINE_EXCEEDED value + */ + DeployJobRun.FailureCause = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FAILURE_CAUSE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD_BUILD_UNAVAILABLE"] = 1; + values[valuesById[2] = "EXECUTION_FAILED"] = 2; + values[valuesById[3] = "DEADLINE_EXCEEDED"] = 3; + return values; + })(); + + return DeployJobRun; })(); - v1.CreateRolloutRequest = (function() { + v1.VerifyJobRun = (function() { /** - * Properties of a CreateRolloutRequest. + * Properties of a VerifyJobRun. * @memberof google.cloud.deploy.v1 - * @interface ICreateRolloutRequest - * @property {string|null} [parent] CreateRolloutRequest parent - * @property {string|null} [rolloutId] CreateRolloutRequest rolloutId - * @property {google.cloud.deploy.v1.IRollout|null} [rollout] CreateRolloutRequest rollout - * @property {string|null} [requestId] CreateRolloutRequest requestId - * @property {boolean|null} [validateOnly] CreateRolloutRequest validateOnly + * @interface IVerifyJobRun + * @property {string|null} [build] VerifyJobRun build + * @property {string|null} [artifactUri] VerifyJobRun artifactUri + * @property {string|null} [eventLogPath] VerifyJobRun eventLogPath + * @property {google.cloud.deploy.v1.VerifyJobRun.FailureCause|null} [failureCause] VerifyJobRun failureCause + * @property {string|null} [failureMessage] VerifyJobRun failureMessage */ /** - * Constructs a new CreateRolloutRequest. + * Constructs a new VerifyJobRun. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a CreateRolloutRequest. - * @implements ICreateRolloutRequest + * @classdesc Represents a VerifyJobRun. + * @implements IVerifyJobRun * @constructor - * @param {google.cloud.deploy.v1.ICreateRolloutRequest=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IVerifyJobRun=} [properties] Properties to set */ - function CreateRolloutRequest(properties) { + function VerifyJobRun(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12183,131 +17902,131 @@ } /** - * CreateRolloutRequest parent. - * @member {string} parent - * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * VerifyJobRun build. + * @member {string} build + * @memberof google.cloud.deploy.v1.VerifyJobRun * @instance */ - CreateRolloutRequest.prototype.parent = ""; + VerifyJobRun.prototype.build = ""; /** - * CreateRolloutRequest rolloutId. - * @member {string} rolloutId - * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * VerifyJobRun artifactUri. + * @member {string} artifactUri + * @memberof google.cloud.deploy.v1.VerifyJobRun * @instance */ - CreateRolloutRequest.prototype.rolloutId = ""; + VerifyJobRun.prototype.artifactUri = ""; /** - * CreateRolloutRequest rollout. - * @member {google.cloud.deploy.v1.IRollout|null|undefined} rollout - * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * VerifyJobRun eventLogPath. + * @member {string} eventLogPath + * @memberof google.cloud.deploy.v1.VerifyJobRun * @instance */ - CreateRolloutRequest.prototype.rollout = null; + VerifyJobRun.prototype.eventLogPath = ""; /** - * CreateRolloutRequest requestId. - * @member {string} requestId - * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * VerifyJobRun failureCause. + * @member {google.cloud.deploy.v1.VerifyJobRun.FailureCause} failureCause + * @memberof google.cloud.deploy.v1.VerifyJobRun * @instance */ - CreateRolloutRequest.prototype.requestId = ""; + VerifyJobRun.prototype.failureCause = 0; /** - * CreateRolloutRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * VerifyJobRun failureMessage. + * @member {string} failureMessage + * @memberof google.cloud.deploy.v1.VerifyJobRun * @instance */ - CreateRolloutRequest.prototype.validateOnly = false; + VerifyJobRun.prototype.failureMessage = ""; /** - * Creates a new CreateRolloutRequest instance using the specified properties. + * Creates a new VerifyJobRun instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @memberof google.cloud.deploy.v1.VerifyJobRun * @static - * @param {google.cloud.deploy.v1.ICreateRolloutRequest=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.CreateRolloutRequest} CreateRolloutRequest instance + * @param {google.cloud.deploy.v1.IVerifyJobRun=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.VerifyJobRun} VerifyJobRun instance */ - CreateRolloutRequest.create = function create(properties) { - return new CreateRolloutRequest(properties); + VerifyJobRun.create = function create(properties) { + return new VerifyJobRun(properties); }; /** - * Encodes the specified CreateRolloutRequest message. Does not implicitly {@link google.cloud.deploy.v1.CreateRolloutRequest.verify|verify} messages. + * Encodes the specified VerifyJobRun message. Does not implicitly {@link google.cloud.deploy.v1.VerifyJobRun.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @memberof google.cloud.deploy.v1.VerifyJobRun * @static - * @param {google.cloud.deploy.v1.ICreateRolloutRequest} message CreateRolloutRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IVerifyJobRun} message VerifyJobRun message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateRolloutRequest.encode = function encode(message, writer) { + VerifyJobRun.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.rolloutId != null && Object.hasOwnProperty.call(message, "rolloutId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.rolloutId); - if (message.rollout != null && Object.hasOwnProperty.call(message, "rollout")) - $root.google.cloud.deploy.v1.Rollout.encode(message.rollout, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); + if (message.build != null && Object.hasOwnProperty.call(message, "build")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.build); + if (message.artifactUri != null && Object.hasOwnProperty.call(message, "artifactUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.artifactUri); + if (message.eventLogPath != null && Object.hasOwnProperty.call(message, "eventLogPath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.eventLogPath); + if (message.failureCause != null && Object.hasOwnProperty.call(message, "failureCause")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.failureCause); + if (message.failureMessage != null && Object.hasOwnProperty.call(message, "failureMessage")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.failureMessage); return writer; }; /** - * Encodes the specified CreateRolloutRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CreateRolloutRequest.verify|verify} messages. + * Encodes the specified VerifyJobRun message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.VerifyJobRun.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @memberof google.cloud.deploy.v1.VerifyJobRun * @static - * @param {google.cloud.deploy.v1.ICreateRolloutRequest} message CreateRolloutRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IVerifyJobRun} message VerifyJobRun message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateRolloutRequest.encodeDelimited = function encodeDelimited(message, writer) { + VerifyJobRun.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateRolloutRequest message from the specified reader or buffer. + * Decodes a VerifyJobRun message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @memberof google.cloud.deploy.v1.VerifyJobRun * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.CreateRolloutRequest} CreateRolloutRequest + * @returns {google.cloud.deploy.v1.VerifyJobRun} VerifyJobRun * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateRolloutRequest.decode = function decode(reader, length) { + VerifyJobRun.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.CreateRolloutRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.VerifyJobRun(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.build = reader.string(); break; } case 2: { - message.rolloutId = reader.string(); + message.artifactUri = reader.string(); break; } case 3: { - message.rollout = $root.google.cloud.deploy.v1.Rollout.decode(reader, reader.uint32()); + message.eventLogPath = reader.string(); break; } case 4: { - message.requestId = reader.string(); + message.failureCause = reader.int32(); break; } case 5: { - message.validateOnly = reader.bool(); + message.failureMessage = reader.string(); break; } default: @@ -12319,166 +18038,207 @@ }; /** - * Decodes a CreateRolloutRequest message from the specified reader or buffer, length delimited. + * Decodes a VerifyJobRun message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @memberof google.cloud.deploy.v1.VerifyJobRun * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.CreateRolloutRequest} CreateRolloutRequest + * @returns {google.cloud.deploy.v1.VerifyJobRun} VerifyJobRun * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateRolloutRequest.decodeDelimited = function decodeDelimited(reader) { + VerifyJobRun.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateRolloutRequest message. + * Verifies a VerifyJobRun message. * @function verify - * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @memberof google.cloud.deploy.v1.VerifyJobRun * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateRolloutRequest.verify = function verify(message) { + VerifyJobRun.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.rolloutId != null && message.hasOwnProperty("rolloutId")) - if (!$util.isString(message.rolloutId)) - return "rolloutId: string expected"; - if (message.rollout != null && message.hasOwnProperty("rollout")) { - var error = $root.google.cloud.deploy.v1.Rollout.verify(message.rollout); - if (error) - return "rollout." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; + if (message.build != null && message.hasOwnProperty("build")) + if (!$util.isString(message.build)) + return "build: string expected"; + if (message.artifactUri != null && message.hasOwnProperty("artifactUri")) + if (!$util.isString(message.artifactUri)) + return "artifactUri: string expected"; + if (message.eventLogPath != null && message.hasOwnProperty("eventLogPath")) + if (!$util.isString(message.eventLogPath)) + return "eventLogPath: string expected"; + if (message.failureCause != null && message.hasOwnProperty("failureCause")) + switch (message.failureCause) { + default: + return "failureCause: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.failureMessage != null && message.hasOwnProperty("failureMessage")) + if (!$util.isString(message.failureMessage)) + return "failureMessage: string expected"; return null; }; /** - * Creates a CreateRolloutRequest message from a plain object. Also converts values to their respective internal types. + * Creates a VerifyJobRun message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @memberof google.cloud.deploy.v1.VerifyJobRun * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.CreateRolloutRequest} CreateRolloutRequest + * @returns {google.cloud.deploy.v1.VerifyJobRun} VerifyJobRun */ - CreateRolloutRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.CreateRolloutRequest) + VerifyJobRun.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.VerifyJobRun) return object; - var message = new $root.google.cloud.deploy.v1.CreateRolloutRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.rolloutId != null) - message.rolloutId = String(object.rolloutId); - if (object.rollout != null) { - if (typeof object.rollout !== "object") - throw TypeError(".google.cloud.deploy.v1.CreateRolloutRequest.rollout: object expected"); - message.rollout = $root.google.cloud.deploy.v1.Rollout.fromObject(object.rollout); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from a CreateRolloutRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.deploy.v1.CreateRolloutRequest - * @static - * @param {google.cloud.deploy.v1.CreateRolloutRequest} message CreateRolloutRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateRolloutRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.rolloutId = ""; - object.rollout = null; - object.requestId = ""; - object.validateOnly = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.rolloutId != null && message.hasOwnProperty("rolloutId")) - object.rolloutId = message.rolloutId; - if (message.rollout != null && message.hasOwnProperty("rollout")) - object.rollout = $root.google.cloud.deploy.v1.Rollout.toObject(message.rollout, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; + var message = new $root.google.cloud.deploy.v1.VerifyJobRun(); + if (object.build != null) + message.build = String(object.build); + if (object.artifactUri != null) + message.artifactUri = String(object.artifactUri); + if (object.eventLogPath != null) + message.eventLogPath = String(object.eventLogPath); + switch (object.failureCause) { + case "FAILURE_CAUSE_UNSPECIFIED": + case 0: + message.failureCause = 0; + break; + case "CLOUD_BUILD_UNAVAILABLE": + case 1: + message.failureCause = 1; + break; + case "EXECUTION_FAILED": + case 2: + message.failureCause = 2; + break; + case "DEADLINE_EXCEEDED": + case 3: + message.failureCause = 3; + break; + case "VERIFICATION_CONFIG_NOT_FOUND": + case 4: + message.failureCause = 4; + break; + } + if (object.failureMessage != null) + message.failureMessage = String(object.failureMessage); + return message; + }; + + /** + * Creates a plain object from a VerifyJobRun message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.VerifyJobRun + * @static + * @param {google.cloud.deploy.v1.VerifyJobRun} message VerifyJobRun + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VerifyJobRun.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.build = ""; + object.artifactUri = ""; + object.eventLogPath = ""; + object.failureCause = options.enums === String ? "FAILURE_CAUSE_UNSPECIFIED" : 0; + object.failureMessage = ""; + } + if (message.build != null && message.hasOwnProperty("build")) + object.build = message.build; + if (message.artifactUri != null && message.hasOwnProperty("artifactUri")) + object.artifactUri = message.artifactUri; + if (message.eventLogPath != null && message.hasOwnProperty("eventLogPath")) + object.eventLogPath = message.eventLogPath; + if (message.failureCause != null && message.hasOwnProperty("failureCause")) + object.failureCause = options.enums === String ? $root.google.cloud.deploy.v1.VerifyJobRun.FailureCause[message.failureCause] : message.failureCause; + if (message.failureMessage != null && message.hasOwnProperty("failureMessage")) + object.failureMessage = message.failureMessage; return object; }; /** - * Converts this CreateRolloutRequest to JSON. + * Converts this VerifyJobRun to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @memberof google.cloud.deploy.v1.VerifyJobRun * @instance * @returns {Object.} JSON object */ - CreateRolloutRequest.prototype.toJSON = function toJSON() { + VerifyJobRun.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateRolloutRequest + * Gets the default type url for VerifyJobRun * @function getTypeUrl - * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @memberof google.cloud.deploy.v1.VerifyJobRun * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateRolloutRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + VerifyJobRun.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.CreateRolloutRequest"; + return typeUrlPrefix + "/google.cloud.deploy.v1.VerifyJobRun"; }; - return CreateRolloutRequest; + /** + * FailureCause enum. + * @name google.cloud.deploy.v1.VerifyJobRun.FailureCause + * @enum {number} + * @property {number} FAILURE_CAUSE_UNSPECIFIED=0 FAILURE_CAUSE_UNSPECIFIED value + * @property {number} CLOUD_BUILD_UNAVAILABLE=1 CLOUD_BUILD_UNAVAILABLE value + * @property {number} EXECUTION_FAILED=2 EXECUTION_FAILED value + * @property {number} DEADLINE_EXCEEDED=3 DEADLINE_EXCEEDED value + * @property {number} VERIFICATION_CONFIG_NOT_FOUND=4 VERIFICATION_CONFIG_NOT_FOUND value + */ + VerifyJobRun.FailureCause = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FAILURE_CAUSE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD_BUILD_UNAVAILABLE"] = 1; + values[valuesById[2] = "EXECUTION_FAILED"] = 2; + values[valuesById[3] = "DEADLINE_EXCEEDED"] = 3; + values[valuesById[4] = "VERIFICATION_CONFIG_NOT_FOUND"] = 4; + return values; + })(); + + return VerifyJobRun; })(); - v1.OperationMetadata = (function() { + v1.ListJobRunsRequest = (function() { /** - * Properties of an OperationMetadata. + * Properties of a ListJobRunsRequest. * @memberof google.cloud.deploy.v1 - * @interface IOperationMetadata - * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime - * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime - * @property {string|null} [target] OperationMetadata target - * @property {string|null} [verb] OperationMetadata verb - * @property {string|null} [statusMessage] OperationMetadata statusMessage - * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation - * @property {string|null} [apiVersion] OperationMetadata apiVersion + * @interface IListJobRunsRequest + * @property {string|null} [parent] ListJobRunsRequest parent + * @property {number|null} [pageSize] ListJobRunsRequest pageSize + * @property {string|null} [pageToken] ListJobRunsRequest pageToken + * @property {string|null} [filter] ListJobRunsRequest filter + * @property {string|null} [orderBy] ListJobRunsRequest orderBy */ /** - * Constructs a new OperationMetadata. + * Constructs a new ListJobRunsRequest. * @memberof google.cloud.deploy.v1 - * @classdesc Represents an OperationMetadata. - * @implements IOperationMetadata + * @classdesc Represents a ListJobRunsRequest. + * @implements IListJobRunsRequest * @constructor - * @param {google.cloud.deploy.v1.IOperationMetadata=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IListJobRunsRequest=} [properties] Properties to set */ - function OperationMetadata(properties) { + function ListJobRunsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12486,159 +18246,131 @@ } /** - * OperationMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.deploy.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.createTime = null; - - /** - * OperationMetadata endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.deploy.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.endTime = null; - - /** - * OperationMetadata target. - * @member {string} target - * @memberof google.cloud.deploy.v1.OperationMetadata + * ListJobRunsRequest parent. + * @member {string} parent + * @memberof google.cloud.deploy.v1.ListJobRunsRequest * @instance */ - OperationMetadata.prototype.target = ""; + ListJobRunsRequest.prototype.parent = ""; /** - * OperationMetadata verb. - * @member {string} verb - * @memberof google.cloud.deploy.v1.OperationMetadata + * ListJobRunsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.deploy.v1.ListJobRunsRequest * @instance */ - OperationMetadata.prototype.verb = ""; + ListJobRunsRequest.prototype.pageSize = 0; /** - * OperationMetadata statusMessage. - * @member {string} statusMessage - * @memberof google.cloud.deploy.v1.OperationMetadata + * ListJobRunsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.deploy.v1.ListJobRunsRequest * @instance */ - OperationMetadata.prototype.statusMessage = ""; + ListJobRunsRequest.prototype.pageToken = ""; /** - * OperationMetadata requestedCancellation. - * @member {boolean} requestedCancellation - * @memberof google.cloud.deploy.v1.OperationMetadata + * ListJobRunsRequest filter. + * @member {string} filter + * @memberof google.cloud.deploy.v1.ListJobRunsRequest * @instance */ - OperationMetadata.prototype.requestedCancellation = false; + ListJobRunsRequest.prototype.filter = ""; /** - * OperationMetadata apiVersion. - * @member {string} apiVersion - * @memberof google.cloud.deploy.v1.OperationMetadata + * ListJobRunsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.deploy.v1.ListJobRunsRequest * @instance */ - OperationMetadata.prototype.apiVersion = ""; + ListJobRunsRequest.prototype.orderBy = ""; /** - * Creates a new OperationMetadata instance using the specified properties. + * Creates a new ListJobRunsRequest instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.OperationMetadata + * @memberof google.cloud.deploy.v1.ListJobRunsRequest * @static - * @param {google.cloud.deploy.v1.IOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.OperationMetadata} OperationMetadata instance + * @param {google.cloud.deploy.v1.IListJobRunsRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ListJobRunsRequest} ListJobRunsRequest instance */ - OperationMetadata.create = function create(properties) { - return new OperationMetadata(properties); + ListJobRunsRequest.create = function create(properties) { + return new ListJobRunsRequest(properties); }; /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.deploy.v1.OperationMetadata.verify|verify} messages. + * Encodes the specified ListJobRunsRequest message. Does not implicitly {@link google.cloud.deploy.v1.ListJobRunsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.OperationMetadata + * @memberof google.cloud.deploy.v1.ListJobRunsRequest * @static - * @param {google.cloud.deploy.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {google.cloud.deploy.v1.IListJobRunsRequest} message ListJobRunsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationMetadata.encode = function encode(message, writer) { + ListJobRunsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); - if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); - if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); - if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.requestedCancellation); - if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.OperationMetadata.verify|verify} messages. + * Encodes the specified ListJobRunsRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListJobRunsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.OperationMetadata + * @memberof google.cloud.deploy.v1.ListJobRunsRequest * @static - * @param {google.cloud.deploy.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {google.cloud.deploy.v1.IListJobRunsRequest} message ListJobRunsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + ListJobRunsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OperationMetadata message from the specified reader or buffer. + * Decodes a ListJobRunsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.OperationMetadata + * @memberof google.cloud.deploy.v1.ListJobRunsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.OperationMetadata} OperationMetadata + * @returns {google.cloud.deploy.v1.ListJobRunsRequest} ListJobRunsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OperationMetadata.decode = function decode(reader, length) { + ListJobRunsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.OperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListJobRunsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.parent = reader.string(); break; } case 2: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.pageSize = reader.int32(); break; } case 3: { - message.target = reader.string(); + message.pageToken = reader.string(); break; } case 4: { - message.verb = reader.string(); + message.filter = reader.string(); break; } case 5: { - message.statusMessage = reader.string(); - break; - } - case 6: { - message.requestedCancellation = reader.bool(); - break; - } - case 7: { - message.apiVersion = reader.string(); + message.orderBy = reader.string(); break; } default: @@ -12650,182 +18382,159 @@ }; /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a ListJobRunsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.OperationMetadata + * @memberof google.cloud.deploy.v1.ListJobRunsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.OperationMetadata} OperationMetadata + * @returns {google.cloud.deploy.v1.ListJobRunsRequest} ListJobRunsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OperationMetadata.decodeDelimited = function decodeDelimited(reader) { + ListJobRunsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OperationMetadata message. + * Verifies a ListJobRunsRequest message. * @function verify - * @memberof google.cloud.deploy.v1.OperationMetadata + * @memberof google.cloud.deploy.v1.ListJobRunsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OperationMetadata.verify = function verify(message) { + ListJobRunsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.target != null && message.hasOwnProperty("target")) - if (!$util.isString(message.target)) - return "target: string expected"; - if (message.verb != null && message.hasOwnProperty("verb")) - if (!$util.isString(message.verb)) - return "verb: string expected"; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - if (!$util.isString(message.statusMessage)) - return "statusMessage: string expected"; - if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) - if (typeof message.requestedCancellation !== "boolean") - return "requestedCancellation: boolean expected"; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - if (!$util.isString(message.apiVersion)) - return "apiVersion: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; return null; }; /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a ListJobRunsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.OperationMetadata + * @memberof google.cloud.deploy.v1.ListJobRunsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.OperationMetadata} OperationMetadata + * @returns {google.cloud.deploy.v1.ListJobRunsRequest} ListJobRunsRequest */ - OperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.OperationMetadata) + ListJobRunsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ListJobRunsRequest) return object; - var message = new $root.google.cloud.deploy.v1.OperationMetadata(); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.deploy.v1.OperationMetadata.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.deploy.v1.OperationMetadata.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - if (object.target != null) - message.target = String(object.target); - if (object.verb != null) - message.verb = String(object.verb); - if (object.statusMessage != null) - message.statusMessage = String(object.statusMessage); - if (object.requestedCancellation != null) - message.requestedCancellation = Boolean(object.requestedCancellation); - if (object.apiVersion != null) - message.apiVersion = String(object.apiVersion); + var message = new $root.google.cloud.deploy.v1.ListJobRunsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); return message; }; /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * Creates a plain object from a ListJobRunsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.OperationMetadata + * @memberof google.cloud.deploy.v1.ListJobRunsRequest * @static - * @param {google.cloud.deploy.v1.OperationMetadata} message OperationMetadata + * @param {google.cloud.deploy.v1.ListJobRunsRequest} message ListJobRunsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object - */ - OperationMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.createTime = null; - object.endTime = null; - object.target = ""; - object.verb = ""; - object.statusMessage = ""; - object.requestedCancellation = false; - object.apiVersion = ""; + */ + ListJobRunsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = message.target; - if (message.verb != null && message.hasOwnProperty("verb")) - object.verb = message.verb; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - object.statusMessage = message.statusMessage; - if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) - object.requestedCancellation = message.requestedCancellation; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - object.apiVersion = message.apiVersion; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; return object; }; /** - * Converts this OperationMetadata to JSON. + * Converts this ListJobRunsRequest to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.OperationMetadata + * @memberof google.cloud.deploy.v1.ListJobRunsRequest * @instance * @returns {Object.} JSON object */ - OperationMetadata.prototype.toJSON = function toJSON() { + ListJobRunsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for OperationMetadata + * Gets the default type url for ListJobRunsRequest * @function getTypeUrl - * @memberof google.cloud.deploy.v1.OperationMetadata + * @memberof google.cloud.deploy.v1.ListJobRunsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListJobRunsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.OperationMetadata"; + return typeUrlPrefix + "/google.cloud.deploy.v1.ListJobRunsRequest"; }; - return OperationMetadata; + return ListJobRunsRequest; })(); - v1.ApproveRolloutRequest = (function() { + v1.ListJobRunsResponse = (function() { /** - * Properties of an ApproveRolloutRequest. + * Properties of a ListJobRunsResponse. * @memberof google.cloud.deploy.v1 - * @interface IApproveRolloutRequest - * @property {string|null} [name] ApproveRolloutRequest name - * @property {boolean|null} [approved] ApproveRolloutRequest approved + * @interface IListJobRunsResponse + * @property {Array.|null} [jobRuns] ListJobRunsResponse jobRuns + * @property {string|null} [nextPageToken] ListJobRunsResponse nextPageToken + * @property {Array.|null} [unreachable] ListJobRunsResponse unreachable */ /** - * Constructs a new ApproveRolloutRequest. + * Constructs a new ListJobRunsResponse. * @memberof google.cloud.deploy.v1 - * @classdesc Represents an ApproveRolloutRequest. - * @implements IApproveRolloutRequest + * @classdesc Represents a ListJobRunsResponse. + * @implements IListJobRunsResponse * @constructor - * @param {google.cloud.deploy.v1.IApproveRolloutRequest=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IListJobRunsResponse=} [properties] Properties to set */ - function ApproveRolloutRequest(properties) { + function ListJobRunsResponse(properties) { + this.jobRuns = []; + this.unreachable = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12833,89 +18542,109 @@ } /** - * ApproveRolloutRequest name. - * @member {string} name - * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * ListJobRunsResponse jobRuns. + * @member {Array.} jobRuns + * @memberof google.cloud.deploy.v1.ListJobRunsResponse * @instance */ - ApproveRolloutRequest.prototype.name = ""; + ListJobRunsResponse.prototype.jobRuns = $util.emptyArray; /** - * ApproveRolloutRequest approved. - * @member {boolean} approved - * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * ListJobRunsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.deploy.v1.ListJobRunsResponse * @instance */ - ApproveRolloutRequest.prototype.approved = false; + ListJobRunsResponse.prototype.nextPageToken = ""; /** - * Creates a new ApproveRolloutRequest instance using the specified properties. + * ListJobRunsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.deploy.v1.ListJobRunsResponse + * @instance + */ + ListJobRunsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListJobRunsResponse instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * @memberof google.cloud.deploy.v1.ListJobRunsResponse * @static - * @param {google.cloud.deploy.v1.IApproveRolloutRequest=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.ApproveRolloutRequest} ApproveRolloutRequest instance + * @param {google.cloud.deploy.v1.IListJobRunsResponse=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ListJobRunsResponse} ListJobRunsResponse instance */ - ApproveRolloutRequest.create = function create(properties) { - return new ApproveRolloutRequest(properties); + ListJobRunsResponse.create = function create(properties) { + return new ListJobRunsResponse(properties); }; /** - * Encodes the specified ApproveRolloutRequest message. Does not implicitly {@link google.cloud.deploy.v1.ApproveRolloutRequest.verify|verify} messages. + * Encodes the specified ListJobRunsResponse message. Does not implicitly {@link google.cloud.deploy.v1.ListJobRunsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * @memberof google.cloud.deploy.v1.ListJobRunsResponse * @static - * @param {google.cloud.deploy.v1.IApproveRolloutRequest} message ApproveRolloutRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IListJobRunsResponse} message ListJobRunsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ApproveRolloutRequest.encode = function encode(message, writer) { + ListJobRunsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.approved != null && Object.hasOwnProperty.call(message, "approved")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.approved); + if (message.jobRuns != null && message.jobRuns.length) + for (var i = 0; i < message.jobRuns.length; ++i) + $root.google.cloud.deploy.v1.JobRun.encode(message.jobRuns[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); return writer; }; /** - * Encodes the specified ApproveRolloutRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ApproveRolloutRequest.verify|verify} messages. + * Encodes the specified ListJobRunsResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListJobRunsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * @memberof google.cloud.deploy.v1.ListJobRunsResponse * @static - * @param {google.cloud.deploy.v1.IApproveRolloutRequest} message ApproveRolloutRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IListJobRunsResponse} message ListJobRunsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ApproveRolloutRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListJobRunsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ApproveRolloutRequest message from the specified reader or buffer. + * Decodes a ListJobRunsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * @memberof google.cloud.deploy.v1.ListJobRunsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.ApproveRolloutRequest} ApproveRolloutRequest + * @returns {google.cloud.deploy.v1.ListJobRunsResponse} ListJobRunsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ApproveRolloutRequest.decode = function decode(reader, length) { + ListJobRunsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ApproveRolloutRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListJobRunsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.jobRuns && message.jobRuns.length)) + message.jobRuns = []; + message.jobRuns.push($root.google.cloud.deploy.v1.JobRun.decode(reader, reader.uint32())); break; } case 2: { - message.approved = reader.bool(); + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); break; } default: @@ -12927,130 +18656,169 @@ }; /** - * Decodes an ApproveRolloutRequest message from the specified reader or buffer, length delimited. + * Decodes a ListJobRunsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * @memberof google.cloud.deploy.v1.ListJobRunsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.ApproveRolloutRequest} ApproveRolloutRequest + * @returns {google.cloud.deploy.v1.ListJobRunsResponse} ListJobRunsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ApproveRolloutRequest.decodeDelimited = function decodeDelimited(reader) { + ListJobRunsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ApproveRolloutRequest message. + * Verifies a ListJobRunsResponse message. * @function verify - * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * @memberof google.cloud.deploy.v1.ListJobRunsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ApproveRolloutRequest.verify = function verify(message) { + ListJobRunsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.approved != null && message.hasOwnProperty("approved")) - if (typeof message.approved !== "boolean") - return "approved: boolean expected"; + if (message.jobRuns != null && message.hasOwnProperty("jobRuns")) { + if (!Array.isArray(message.jobRuns)) + return "jobRuns: array expected"; + for (var i = 0; i < message.jobRuns.length; ++i) { + var error = $root.google.cloud.deploy.v1.JobRun.verify(message.jobRuns[i]); + if (error) + return "jobRuns." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } return null; }; /** - * Creates an ApproveRolloutRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListJobRunsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * @memberof google.cloud.deploy.v1.ListJobRunsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.ApproveRolloutRequest} ApproveRolloutRequest + * @returns {google.cloud.deploy.v1.ListJobRunsResponse} ListJobRunsResponse */ - ApproveRolloutRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.ApproveRolloutRequest) + ListJobRunsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ListJobRunsResponse) return object; - var message = new $root.google.cloud.deploy.v1.ApproveRolloutRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.approved != null) - message.approved = Boolean(object.approved); + var message = new $root.google.cloud.deploy.v1.ListJobRunsResponse(); + if (object.jobRuns) { + if (!Array.isArray(object.jobRuns)) + throw TypeError(".google.cloud.deploy.v1.ListJobRunsResponse.jobRuns: array expected"); + message.jobRuns = []; + for (var i = 0; i < object.jobRuns.length; ++i) { + if (typeof object.jobRuns[i] !== "object") + throw TypeError(".google.cloud.deploy.v1.ListJobRunsResponse.jobRuns: object expected"); + message.jobRuns[i] = $root.google.cloud.deploy.v1.JobRun.fromObject(object.jobRuns[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.deploy.v1.ListJobRunsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } return message; }; /** - * Creates a plain object from an ApproveRolloutRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListJobRunsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * @memberof google.cloud.deploy.v1.ListJobRunsResponse * @static - * @param {google.cloud.deploy.v1.ApproveRolloutRequest} message ApproveRolloutRequest + * @param {google.cloud.deploy.v1.ListJobRunsResponse} message ListJobRunsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ApproveRolloutRequest.toObject = function toObject(message, options) { + ListJobRunsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.approved = false; + if (options.arrays || options.defaults) { + object.jobRuns = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.jobRuns && message.jobRuns.length) { + object.jobRuns = []; + for (var j = 0; j < message.jobRuns.length; ++j) + object.jobRuns[j] = $root.google.cloud.deploy.v1.JobRun.toObject(message.jobRuns[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.approved != null && message.hasOwnProperty("approved")) - object.approved = message.approved; return object; }; /** - * Converts this ApproveRolloutRequest to JSON. + * Converts this ListJobRunsResponse to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * @memberof google.cloud.deploy.v1.ListJobRunsResponse * @instance * @returns {Object.} JSON object */ - ApproveRolloutRequest.prototype.toJSON = function toJSON() { + ListJobRunsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ApproveRolloutRequest + * Gets the default type url for ListJobRunsResponse * @function getTypeUrl - * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * @memberof google.cloud.deploy.v1.ListJobRunsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ApproveRolloutRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListJobRunsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.ApproveRolloutRequest"; + return typeUrlPrefix + "/google.cloud.deploy.v1.ListJobRunsResponse"; }; - return ApproveRolloutRequest; + return ListJobRunsResponse; })(); - v1.ApproveRolloutResponse = (function() { + v1.GetJobRunRequest = (function() { /** - * Properties of an ApproveRolloutResponse. + * Properties of a GetJobRunRequest. * @memberof google.cloud.deploy.v1 - * @interface IApproveRolloutResponse + * @interface IGetJobRunRequest + * @property {string|null} [name] GetJobRunRequest name */ /** - * Constructs a new ApproveRolloutResponse. + * Constructs a new GetJobRunRequest. * @memberof google.cloud.deploy.v1 - * @classdesc Represents an ApproveRolloutResponse. - * @implements IApproveRolloutResponse + * @classdesc Represents a GetJobRunRequest. + * @implements IGetJobRunRequest * @constructor - * @param {google.cloud.deploy.v1.IApproveRolloutResponse=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IGetJobRunRequest=} [properties] Properties to set */ - function ApproveRolloutResponse(properties) { + function GetJobRunRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13058,63 +18826,77 @@ } /** - * Creates a new ApproveRolloutResponse instance using the specified properties. + * GetJobRunRequest name. + * @member {string} name + * @memberof google.cloud.deploy.v1.GetJobRunRequest + * @instance + */ + GetJobRunRequest.prototype.name = ""; + + /** + * Creates a new GetJobRunRequest instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.ApproveRolloutResponse + * @memberof google.cloud.deploy.v1.GetJobRunRequest * @static - * @param {google.cloud.deploy.v1.IApproveRolloutResponse=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.ApproveRolloutResponse} ApproveRolloutResponse instance + * @param {google.cloud.deploy.v1.IGetJobRunRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.GetJobRunRequest} GetJobRunRequest instance */ - ApproveRolloutResponse.create = function create(properties) { - return new ApproveRolloutResponse(properties); + GetJobRunRequest.create = function create(properties) { + return new GetJobRunRequest(properties); }; /** - * Encodes the specified ApproveRolloutResponse message. Does not implicitly {@link google.cloud.deploy.v1.ApproveRolloutResponse.verify|verify} messages. + * Encodes the specified GetJobRunRequest message. Does not implicitly {@link google.cloud.deploy.v1.GetJobRunRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.ApproveRolloutResponse + * @memberof google.cloud.deploy.v1.GetJobRunRequest * @static - * @param {google.cloud.deploy.v1.IApproveRolloutResponse} message ApproveRolloutResponse message or plain object to encode + * @param {google.cloud.deploy.v1.IGetJobRunRequest} message GetJobRunRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ApproveRolloutResponse.encode = function encode(message, writer) { + GetJobRunRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ApproveRolloutResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ApproveRolloutResponse.verify|verify} messages. + * Encodes the specified GetJobRunRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GetJobRunRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.ApproveRolloutResponse + * @memberof google.cloud.deploy.v1.GetJobRunRequest * @static - * @param {google.cloud.deploy.v1.IApproveRolloutResponse} message ApproveRolloutResponse message or plain object to encode + * @param {google.cloud.deploy.v1.IGetJobRunRequest} message GetJobRunRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ApproveRolloutResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetJobRunRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ApproveRolloutResponse message from the specified reader or buffer. + * Decodes a GetJobRunRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.ApproveRolloutResponse + * @memberof google.cloud.deploy.v1.GetJobRunRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.ApproveRolloutResponse} ApproveRolloutResponse + * @returns {google.cloud.deploy.v1.GetJobRunRequest} GetJobRunRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ApproveRolloutResponse.decode = function decode(reader, length) { + GetJobRunRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ApproveRolloutResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.GetJobRunRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -13124,89 +18906,102 @@ }; /** - * Decodes an ApproveRolloutResponse message from the specified reader or buffer, length delimited. + * Decodes a GetJobRunRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.ApproveRolloutResponse + * @memberof google.cloud.deploy.v1.GetJobRunRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.ApproveRolloutResponse} ApproveRolloutResponse + * @returns {google.cloud.deploy.v1.GetJobRunRequest} GetJobRunRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ApproveRolloutResponse.decodeDelimited = function decodeDelimited(reader) { + GetJobRunRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ApproveRolloutResponse message. + * Verifies a GetJobRunRequest message. * @function verify - * @memberof google.cloud.deploy.v1.ApproveRolloutResponse + * @memberof google.cloud.deploy.v1.GetJobRunRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ApproveRolloutResponse.verify = function verify(message) { + GetJobRunRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates an ApproveRolloutResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetJobRunRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.ApproveRolloutResponse + * @memberof google.cloud.deploy.v1.GetJobRunRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.ApproveRolloutResponse} ApproveRolloutResponse + * @returns {google.cloud.deploy.v1.GetJobRunRequest} GetJobRunRequest */ - ApproveRolloutResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.ApproveRolloutResponse) + GetJobRunRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.GetJobRunRequest) return object; - return new $root.google.cloud.deploy.v1.ApproveRolloutResponse(); + var message = new $root.google.cloud.deploy.v1.GetJobRunRequest(); + if (object.name != null) + message.name = String(object.name); + return message; }; /** - * Creates a plain object from an ApproveRolloutResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetJobRunRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.ApproveRolloutResponse + * @memberof google.cloud.deploy.v1.GetJobRunRequest * @static - * @param {google.cloud.deploy.v1.ApproveRolloutResponse} message ApproveRolloutResponse + * @param {google.cloud.deploy.v1.GetJobRunRequest} message GetJobRunRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ApproveRolloutResponse.toObject = function toObject() { - return {}; + GetJobRunRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; }; /** - * Converts this ApproveRolloutResponse to JSON. + * Converts this GetJobRunRequest to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.ApproveRolloutResponse + * @memberof google.cloud.deploy.v1.GetJobRunRequest * @instance * @returns {Object.} JSON object */ - ApproveRolloutResponse.prototype.toJSON = function toJSON() { + GetJobRunRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ApproveRolloutResponse + * Gets the default type url for GetJobRunRequest * @function getTypeUrl - * @memberof google.cloud.deploy.v1.ApproveRolloutResponse + * @memberof google.cloud.deploy.v1.GetJobRunRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ApproveRolloutResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetJobRunRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.ApproveRolloutResponse"; + return typeUrlPrefix + "/google.cloud.deploy.v1.GetJobRunRequest"; }; - return ApproveRolloutResponse; + return GetJobRunRequest; })(); v1.Config = (function() { @@ -14200,6 +19995,366 @@ return values; })(); + v1.JobRunNotificationEvent = (function() { + + /** + * Properties of a JobRunNotificationEvent. + * @memberof google.cloud.deploy.v1 + * @interface IJobRunNotificationEvent + * @property {string|null} [message] JobRunNotificationEvent message + * @property {string|null} [jobRun] JobRunNotificationEvent jobRun + * @property {string|null} [pipelineUid] JobRunNotificationEvent pipelineUid + * @property {string|null} [releaseUid] JobRunNotificationEvent releaseUid + * @property {string|null} [rolloutUid] JobRunNotificationEvent rolloutUid + * @property {string|null} [targetId] JobRunNotificationEvent targetId + * @property {google.cloud.deploy.v1.Type|null} [type] JobRunNotificationEvent type + */ + + /** + * Constructs a new JobRunNotificationEvent. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a JobRunNotificationEvent. + * @implements IJobRunNotificationEvent + * @constructor + * @param {google.cloud.deploy.v1.IJobRunNotificationEvent=} [properties] Properties to set + */ + function JobRunNotificationEvent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JobRunNotificationEvent message. + * @member {string} message + * @memberof google.cloud.deploy.v1.JobRunNotificationEvent + * @instance + */ + JobRunNotificationEvent.prototype.message = ""; + + /** + * JobRunNotificationEvent jobRun. + * @member {string} jobRun + * @memberof google.cloud.deploy.v1.JobRunNotificationEvent + * @instance + */ + JobRunNotificationEvent.prototype.jobRun = ""; + + /** + * JobRunNotificationEvent pipelineUid. + * @member {string} pipelineUid + * @memberof google.cloud.deploy.v1.JobRunNotificationEvent + * @instance + */ + JobRunNotificationEvent.prototype.pipelineUid = ""; + + /** + * JobRunNotificationEvent releaseUid. + * @member {string} releaseUid + * @memberof google.cloud.deploy.v1.JobRunNotificationEvent + * @instance + */ + JobRunNotificationEvent.prototype.releaseUid = ""; + + /** + * JobRunNotificationEvent rolloutUid. + * @member {string} rolloutUid + * @memberof google.cloud.deploy.v1.JobRunNotificationEvent + * @instance + */ + JobRunNotificationEvent.prototype.rolloutUid = ""; + + /** + * JobRunNotificationEvent targetId. + * @member {string} targetId + * @memberof google.cloud.deploy.v1.JobRunNotificationEvent + * @instance + */ + JobRunNotificationEvent.prototype.targetId = ""; + + /** + * JobRunNotificationEvent type. + * @member {google.cloud.deploy.v1.Type} type + * @memberof google.cloud.deploy.v1.JobRunNotificationEvent + * @instance + */ + JobRunNotificationEvent.prototype.type = 0; + + /** + * Creates a new JobRunNotificationEvent instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.JobRunNotificationEvent + * @static + * @param {google.cloud.deploy.v1.IJobRunNotificationEvent=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.JobRunNotificationEvent} JobRunNotificationEvent instance + */ + JobRunNotificationEvent.create = function create(properties) { + return new JobRunNotificationEvent(properties); + }; + + /** + * Encodes the specified JobRunNotificationEvent message. Does not implicitly {@link google.cloud.deploy.v1.JobRunNotificationEvent.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.JobRunNotificationEvent + * @static + * @param {google.cloud.deploy.v1.IJobRunNotificationEvent} message JobRunNotificationEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JobRunNotificationEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + if (message.jobRun != null && Object.hasOwnProperty.call(message, "jobRun")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.jobRun); + if (message.pipelineUid != null && Object.hasOwnProperty.call(message, "pipelineUid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pipelineUid); + if (message.releaseUid != null && Object.hasOwnProperty.call(message, "releaseUid")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.releaseUid); + if (message.rolloutUid != null && Object.hasOwnProperty.call(message, "rolloutUid")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.rolloutUid); + if (message.targetId != null && Object.hasOwnProperty.call(message, "targetId")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.targetId); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.type); + return writer; + }; + + /** + * Encodes the specified JobRunNotificationEvent message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.JobRunNotificationEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.JobRunNotificationEvent + * @static + * @param {google.cloud.deploy.v1.IJobRunNotificationEvent} message JobRunNotificationEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JobRunNotificationEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JobRunNotificationEvent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.JobRunNotificationEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.JobRunNotificationEvent} JobRunNotificationEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JobRunNotificationEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.JobRunNotificationEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.message = reader.string(); + break; + } + case 2: { + message.jobRun = reader.string(); + break; + } + case 3: { + message.pipelineUid = reader.string(); + break; + } + case 4: { + message.releaseUid = reader.string(); + break; + } + case 5: { + message.rolloutUid = reader.string(); + break; + } + case 6: { + message.targetId = reader.string(); + break; + } + case 7: { + message.type = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JobRunNotificationEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.JobRunNotificationEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.JobRunNotificationEvent} JobRunNotificationEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JobRunNotificationEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JobRunNotificationEvent message. + * @function verify + * @memberof google.cloud.deploy.v1.JobRunNotificationEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JobRunNotificationEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.jobRun != null && message.hasOwnProperty("jobRun")) + if (!$util.isString(message.jobRun)) + return "jobRun: string expected"; + if (message.pipelineUid != null && message.hasOwnProperty("pipelineUid")) + if (!$util.isString(message.pipelineUid)) + return "pipelineUid: string expected"; + if (message.releaseUid != null && message.hasOwnProperty("releaseUid")) + if (!$util.isString(message.releaseUid)) + return "releaseUid: string expected"; + if (message.rolloutUid != null && message.hasOwnProperty("rolloutUid")) + if (!$util.isString(message.rolloutUid)) + return "rolloutUid: string expected"; + if (message.targetId != null && message.hasOwnProperty("targetId")) + if (!$util.isString(message.targetId)) + return "targetId: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a JobRunNotificationEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.JobRunNotificationEvent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.JobRunNotificationEvent} JobRunNotificationEvent + */ + JobRunNotificationEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.JobRunNotificationEvent) + return object; + var message = new $root.google.cloud.deploy.v1.JobRunNotificationEvent(); + if (object.message != null) + message.message = String(object.message); + if (object.jobRun != null) + message.jobRun = String(object.jobRun); + if (object.pipelineUid != null) + message.pipelineUid = String(object.pipelineUid); + if (object.releaseUid != null) + message.releaseUid = String(object.releaseUid); + if (object.rolloutUid != null) + message.rolloutUid = String(object.rolloutUid); + if (object.targetId != null) + message.targetId = String(object.targetId); + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "TYPE_PUBSUB_NOTIFICATION_FAILURE": + case 1: + message.type = 1; + break; + case "TYPE_RENDER_STATUES_CHANGE": + case 2: + message.type = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a JobRunNotificationEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.JobRunNotificationEvent + * @static + * @param {google.cloud.deploy.v1.JobRunNotificationEvent} message JobRunNotificationEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JobRunNotificationEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.message = ""; + object.jobRun = ""; + object.pipelineUid = ""; + object.releaseUid = ""; + object.rolloutUid = ""; + object.targetId = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + } + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.jobRun != null && message.hasOwnProperty("jobRun")) + object.jobRun = message.jobRun; + if (message.pipelineUid != null && message.hasOwnProperty("pipelineUid")) + object.pipelineUid = message.pipelineUid; + if (message.releaseUid != null && message.hasOwnProperty("releaseUid")) + object.releaseUid = message.releaseUid; + if (message.rolloutUid != null && message.hasOwnProperty("rolloutUid")) + object.rolloutUid = message.rolloutUid; + if (message.targetId != null && message.hasOwnProperty("targetId")) + object.targetId = message.targetId; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.deploy.v1.Type[message.type] : message.type; + return object; + }; + + /** + * Converts this JobRunNotificationEvent to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.JobRunNotificationEvent + * @instance + * @returns {Object.} JSON object + */ + JobRunNotificationEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for JobRunNotificationEvent + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.JobRunNotificationEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JobRunNotificationEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.JobRunNotificationEvent"; + }; + + return JobRunNotificationEvent; + })(); + v1.ReleaseNotificationEvent = (function() { /** diff --git a/packages/google-cloud-deploy/protos/protos.json b/packages/google-cloud-deploy/protos/protos.json index f191ff68a03..85547b0e1f5 100644 --- a/packages/google-cloud-deploy/protos/protos.json +++ b/packages/google-cloud-deploy/protos/protos.json @@ -322,6 +322,26 @@ } ] }, + "AbandonRelease": { + "requestType": "AbandonReleaseRequest", + "responseType": "AbandonReleaseResponse", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*}:abandon", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*}:abandon", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, "ApproveRollout": { "requestType": "ApproveRolloutRequest", "responseType": "ApproveRolloutResponse", @@ -406,6 +426,62 @@ } ] }, + "RetryJob": { + "requestType": "RetryJobRequest", + "responseType": "RetryJobResponse", + "options": { + "(google.api.http).post": "/v1/{rollout=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}:retryJob", + "(google.api.http).body": "*", + "(google.api.method_signature)": "rollout,phase_id,job_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{rollout=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}:retryJob", + "body": "*" + } + }, + { + "(google.api.method_signature)": "rollout,phase_id,job_id" + } + ] + }, + "ListJobRuns": { + "requestType": "ListJobRunsRequest", + "responseType": "ListJobRunsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}/jobRuns", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}/jobRuns" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetJobRun": { + "requestType": "GetJobRunRequest", + "responseType": "JobRun", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*/jobRuns/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*/jobRuns/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, "GetConfig": { "requestType": "GetConfigRequest", "responseType": "Config", @@ -495,6 +571,10 @@ "etag": { "type": "string", "id": 10 + }, + "suspended": { + "type": "bool", + "id": 12 } } }, @@ -517,6 +597,36 @@ "rule": "repeated", "type": "string", "id": 2 + }, + "strategy": { + "type": "Strategy", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Strategy": { + "oneofs": { + "deploymentStrategy": { + "oneof": [ + "standard" + ] + } + }, + "fields": { + "standard": { + "type": "Standard", + "id": 1 + } + } + }, + "Standard": { + "fields": { + "verify": { + "type": "bool", + "id": 1 } } }, @@ -757,7 +867,8 @@ "deploymentTarget": { "oneof": [ "gke", - "anthosCluster" + "anthosCluster", + "run" ] } }, @@ -835,6 +946,10 @@ "type": "AnthosCluster", "id": 17 }, + "run": { + "type": "CloudRunLocation", + "id": 18 + }, "etag": { "type": "string", "id": 12, @@ -902,6 +1017,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "executionTimeout": { + "type": "google.protobuf.Duration", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -909,7 +1031,8 @@ "values": { "EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED": 0, "RENDER": 1, - "DEPLOY": 2 + "DEPLOY": 2, + "VERIFY": 3 } } } @@ -987,6 +1110,18 @@ } } }, + "CloudRunLocation": { + "fields": { + "location": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + } + } + }, "ListTargetsRequest": { "fields": { "parent": { @@ -1210,6 +1345,13 @@ "type": "string", "id": 5 }, + "abandoned": { + "type": "bool", + "id": 23, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, "createTime": { "type": "google.protobuf.Timestamp", "id": 6, @@ -1323,6 +1465,13 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "failureMessage": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { @@ -1614,6 +1763,21 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "phases": { + "rule": "repeated", + "type": "Phase", + "id": 23, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "metadata": { + "type": "Metadata", + "id": 24, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { @@ -1644,11 +1808,190 @@ "CLOUD_BUILD_UNAVAILABLE": 1, "EXECUTION_FAILED": 2, "DEADLINE_EXCEEDED": 3, - "RELEASE_FAILED": 4 + "RELEASE_FAILED": 4, + "RELEASE_ABANDONED": 5, + "VERIFICATION_CONFIG_NOT_FOUND": 6 + } + } + } + }, + "Metadata": { + "fields": { + "cloudRun": { + "type": "CloudRunMetadata", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "DeployJobRunMetadata": { + "fields": { + "cloudRun": { + "type": "CloudRunMetadata", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "CloudRunMetadata": { + "fields": { + "service": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "serviceUrls": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "revision": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "Phase": { + "oneofs": { + "jobs": { + "oneof": [ + "deploymentJobs" + ] + } + }, + "fields": { + "id": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "deploymentJobs": { + "type": "DeploymentJobs", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "PENDING": 1, + "IN_PROGRESS": 2, + "SUCCEEDED": 3, + "FAILED": 4, + "ABORTED": 5 + } + } + } + }, + "DeploymentJobs": { + "fields": { + "deployJob": { + "type": "Job", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "verifyJob": { + "type": "Job", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "Job": { + "oneofs": { + "jobType": { + "oneof": [ + "deployJob", + "verifyJob" + ] + } + }, + "fields": { + "id": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "jobRun": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "clouddeploy.googleapis.com/JobRun" + } + }, + "deployJob": { + "type": "DeployJob", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "verifyJob": { + "type": "VerifyJob", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "PENDING": 1, + "DISABLED": 2, + "IN_PROGRESS": 3, + "SUCCEEDED": 4, + "FAILED": 5, + "ABORTED": 6 } } } }, + "DeployJob": { + "fields": {} + }, + "VerifyJob": { + "fields": {} + }, "ListRolloutsRequest": { "fields": { "parent": { @@ -1834,19 +2177,330 @@ "ApproveRolloutResponse": { "fields": {} }, - "Config": { - "options": { - "(google.api.resource).type": "clouddeploy.googleapis.com/Config", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/config" - }, + "RetryJobRequest": { "fields": { - "name": { + "rollout": { "type": "string", - "id": 1 - }, - "supportedVersions": { - "rule": "repeated", - "type": "SkaffoldVersion", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "clouddeploy.googleapis.com/Rollout" + } + }, + "phaseId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "jobId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "RetryJobResponse": { + "fields": {} + }, + "AbandonReleaseRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "clouddeploy.googleapis.com/Release" + } + } + } + }, + "AbandonReleaseResponse": { + "fields": {} + }, + "JobRun": { + "options": { + "(google.api.resource).type": "clouddeploy.googleapis.com/JobRun", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{job_run}" + }, + "oneofs": { + "jobRun": { + "oneof": [ + "deployJobRun", + "verifyJobRun" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "uid": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "phaseId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "jobId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "deployJobRun": { + "type": "DeployJobRun", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "verifyJobRun": { + "type": "VerifyJobRun", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "etag": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "IN_PROGRESS": 1, + "SUCCEEDED": 2, + "FAILED": 3 + } + } + } + }, + "DeployJobRun": { + "fields": { + "build": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "cloudbuild.googleapis.com/Build" + } + }, + "failureCause": { + "type": "FailureCause", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "failureMessage": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "metadata": { + "type": "DeployJobRunMetadata", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "FailureCause": { + "values": { + "FAILURE_CAUSE_UNSPECIFIED": 0, + "CLOUD_BUILD_UNAVAILABLE": 1, + "EXECUTION_FAILED": 2, + "DEADLINE_EXCEEDED": 3 + } + } + } + }, + "VerifyJobRun": { + "fields": { + "build": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "cloudbuild.googleapis.com/Build" + } + }, + "artifactUri": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "eventLogPath": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "failureCause": { + "type": "FailureCause", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "failureMessage": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "FailureCause": { + "values": { + "FAILURE_CAUSE_UNSPECIFIED": 0, + "CLOUD_BUILD_UNAVAILABLE": 1, + "EXECUTION_FAILED": 2, + "DEADLINE_EXCEEDED": 3, + "VERIFICATION_CONFIG_NOT_FOUND": 4 + } + } + } + }, + "ListJobRunsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "clouddeploy.googleapis.com/Rollout" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListJobRunsResponse": { + "fields": { + "jobRuns": { + "rule": "repeated", + "type": "JobRun", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetJobRunRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "clouddeploy.googleapis.com/JobRun" + } + } + } + }, + "Config": { + "options": { + "(google.api.resource).type": "clouddeploy.googleapis.com/Config", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/config" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "supportedVersions": { + "rule": "repeated", + "type": "SkaffoldVersion", "id": 2, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" @@ -1908,6 +2562,38 @@ "TYPE_RENDER_STATUES_CHANGE": 2 } }, + "JobRunNotificationEvent": { + "fields": { + "message": { + "type": "string", + "id": 1 + }, + "jobRun": { + "type": "string", + "id": 2 + }, + "pipelineUid": { + "type": "string", + "id": 3 + }, + "releaseUid": { + "type": "string", + "id": 4 + }, + "rolloutUid": { + "type": "string", + "id": 5 + }, + "targetId": { + "type": "string", + "id": 6 + }, + "type": { + "type": "Type", + "id": 7 + } + } + }, "ReleaseNotificationEvent": { "fields": { "message": { diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.abandon_release.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.abandon_release.js new file mode 100644 index 00000000000..efbb667979a --- /dev/null +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.abandon_release.js @@ -0,0 +1,63 @@ +// Copyright 2022 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START clouddeploy_v1_generated_CloudDeploy_AbandonRelease_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the Release. Format is + * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ + * releases/{release}. + */ + // const name = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function callAbandonRelease() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await deployClient.abandonRelease(request); + console.log(response); + } + + callAbandonRelease(); + // [END clouddeploy_v1_generated_CloudDeploy_AbandonRelease_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_job_run.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_job_run.js new file mode 100644 index 00000000000..e7e9147e027 --- /dev/null +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_job_run.js @@ -0,0 +1,62 @@ +// Copyright 2022 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START clouddeploy_v1_generated_CloudDeploy_GetJobRun_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the `JobRun`. Format must be + * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}. + */ + // const name = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function callGetJobRun() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await deployClient.getJobRun(request); + console.log(response); + } + + callGetJobRun(); + // [END clouddeploy_v1_generated_CloudDeploy_GetJobRun_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_job_runs.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_job_runs.js new file mode 100644 index 00000000000..0bc1c0a6669 --- /dev/null +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_job_runs.js @@ -0,0 +1,85 @@ +// Copyright 2022 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START clouddeploy_v1_generated_CloudDeploy_ListJobRuns_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The `Rollout` which owns this collection of `JobRun` objects. + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of `JobRun` objects to return. The service may return + * fewer than this value. If unspecified, at most 50 `JobRun` objects will be + * returned. The maximum value is 1000; values above 1000 will be set to 1000. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListJobRuns` call. Provide this + * to retrieve the subsequent page. + * When paginating, all other provided parameters match the call that provided + * the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter results to be returned. See https://google.aip.dev/160 for more + * details. + */ + // const filter = 'abc123' + /** + * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details. + */ + // const orderBy = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function callListJobRuns() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await deployClient.listJobRunsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListJobRuns(); + // [END clouddeploy_v1_generated_CloudDeploy_ListJobRuns_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.retry_job.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.retry_job.js new file mode 100644 index 00000000000..94725595566 --- /dev/null +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.retry_job.js @@ -0,0 +1,73 @@ +// Copyright 2022 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(rollout, phaseId, jobId) { + // [START clouddeploy_v1_generated_CloudDeploy_RetryJob_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the Rollout. Format is + * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ + * releases/{release}/rollouts/{rollout}. + */ + // const rollout = 'abc123' + /** + * Required. The phase ID the Job to retry belongs to. + */ + // const phaseId = 'abc123' + /** + * Required. The job ID for the Job to retry. + */ + // const jobId = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function callRetryJob() { + // Construct request + const request = { + rollout, + phaseId, + jobId, + }; + + // Run request + const response = await deployClient.retryJob(request); + console.log(response); + } + + callRetryJob(); + // [END clouddeploy_v1_generated_CloudDeploy_RetryJob_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json b/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json index da4583908aa..3b7384b9f6e 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json +++ b/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json @@ -695,6 +695,46 @@ } } }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_AbandonRelease_async", + "title": "CloudDeploy abandonRelease Sample", + "origin": "API_DEFINITION", + "description": " Abandons a Release in the Delivery Pipeline.", + "canonical": true, + "file": "cloud_deploy.abandon_release.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AbandonRelease", + "fullName": "google.cloud.deploy.v1.CloudDeploy.AbandonRelease", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.AbandonReleaseResponse", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "AbandonRelease", + "fullName": "google.cloud.deploy.v1.CloudDeploy.AbandonRelease", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, { "regionTag": "clouddeploy_v1_generated_CloudDeploy_ApproveRollout_async", "title": "CloudDeploy approveRollout Sample", @@ -891,6 +931,150 @@ } } }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_RetryJob_async", + "title": "CloudDeploy retryJob Sample", + "origin": "API_DEFINITION", + "description": " Retries the specified Job in a Rollout.", + "canonical": true, + "file": "cloud_deploy.retry_job.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RetryJob", + "fullName": "google.cloud.deploy.v1.CloudDeploy.RetryJob", + "async": true, + "parameters": [ + { + "name": "rollout", + "type": "TYPE_STRING" + }, + { + "name": "phase_id", + "type": "TYPE_STRING" + }, + { + "name": "job_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.RetryJobResponse", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "RetryJob", + "fullName": "google.cloud.deploy.v1.CloudDeploy.RetryJob", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_ListJobRuns_async", + "title": "CloudDeploy listJobRuns Sample", + "origin": "API_DEFINITION", + "description": " Lists JobRuns in a given project and location.", + "canonical": true, + "file": "cloud_deploy.list_job_runs.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListJobRuns", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ListJobRuns", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.ListJobRunsResponse", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "ListJobRuns", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ListJobRuns", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_GetJobRun_async", + "title": "CloudDeploy getJobRun Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single JobRun.", + "canonical": true, + "file": "cloud_deploy.get_job_run.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetJobRun", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetJobRun", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.JobRun", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "GetJobRun", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetJobRun", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, { "regionTag": "clouddeploy_v1_generated_CloudDeploy_GetConfig_async", "title": "CloudDeploy getConfig Sample", diff --git a/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts b/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts index 619f948d9d6..581b14d6c4f 100644 --- a/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts +++ b/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts @@ -27,6 +27,10 @@ import type { LROperation, PaginationCallback, GaxCall, + IamClient, + IamProtos, + LocationsClient, + LocationProtos, } from 'google-gax'; import {Transform} from 'stream'; import * as protos from '../../protos/protos'; @@ -62,6 +66,8 @@ export class CloudDeployClient { }; warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; + iamClient: IamClient; + locationsClient: LocationsClient; pathTemplates: {[name: string]: gax.PathTemplate}; operationsClient: gax.OperationsClient; cloudDeployStub?: Promise<{[name: string]: Function}>; @@ -156,6 +162,12 @@ export class CloudDeployClient { if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; } + this.iamClient = new this._gaxModule.IamClient(this._gaxGrpc, opts); + + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); // Determine the client header string. const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; @@ -191,6 +203,9 @@ export class CloudDeployClient { deliveryPipelinePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}' ), + jobRunPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{job_run}' + ), locationPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}' ), @@ -238,6 +253,11 @@ export class CloudDeployClient { 'nextPageToken', 'rollouts' ), + listJobRuns: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'jobRuns' + ), }; const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); @@ -479,10 +499,14 @@ export class CloudDeployClient { 'listReleases', 'getRelease', 'createRelease', + 'abandonRelease', 'approveRollout', 'listRollouts', 'getRollout', 'createRollout', + 'retryJob', + 'listJobRuns', + 'getJobRun', 'getConfig', ]; for (const methodName of cloudDeployStubMethods) { @@ -830,6 +854,93 @@ export class CloudDeployClient { this.initialize(); return this.innerApiCalls.getRelease(request, options, callback); } + /** + * Abandons a Release in the Delivery Pipeline. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the Release. Format is + * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ + * releases/{release}. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AbandonReleaseResponse]{@link google.cloud.deploy.v1.AbandonReleaseResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.abandon_release.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_AbandonRelease_async + */ + abandonRelease( + request?: protos.google.cloud.deploy.v1.IAbandonReleaseRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.deploy.v1.IAbandonReleaseResponse, + protos.google.cloud.deploy.v1.IAbandonReleaseRequest | undefined, + {} | undefined + ] + >; + abandonRelease( + request: protos.google.cloud.deploy.v1.IAbandonReleaseRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.deploy.v1.IAbandonReleaseResponse, + protos.google.cloud.deploy.v1.IAbandonReleaseRequest | null | undefined, + {} | null | undefined + > + ): void; + abandonRelease( + request: protos.google.cloud.deploy.v1.IAbandonReleaseRequest, + callback: Callback< + protos.google.cloud.deploy.v1.IAbandonReleaseResponse, + protos.google.cloud.deploy.v1.IAbandonReleaseRequest | null | undefined, + {} | null | undefined + > + ): void; + abandonRelease( + request?: protos.google.cloud.deploy.v1.IAbandonReleaseRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.deploy.v1.IAbandonReleaseResponse, + | protos.google.cloud.deploy.v1.IAbandonReleaseRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.deploy.v1.IAbandonReleaseResponse, + protos.google.cloud.deploy.v1.IAbandonReleaseRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.deploy.v1.IAbandonReleaseResponse, + protos.google.cloud.deploy.v1.IAbandonReleaseRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.abandonRelease(request, options, callback); + } /** * Approves a Rollout. * @@ -1003,6 +1114,179 @@ export class CloudDeployClient { this.initialize(); return this.innerApiCalls.getRollout(request, options, callback); } + /** + * Retries the specified Job in a Rollout. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.rollout + * Required. Name of the Rollout. Format is + * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ + * releases/{release}/rollouts/{rollout}. + * @param {string} request.phaseId + * Required. The phase ID the Job to retry belongs to. + * @param {string} request.jobId + * Required. The job ID for the Job to retry. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [RetryJobResponse]{@link google.cloud.deploy.v1.RetryJobResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.retry_job.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_RetryJob_async + */ + retryJob( + request?: protos.google.cloud.deploy.v1.IRetryJobRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.deploy.v1.IRetryJobResponse, + protos.google.cloud.deploy.v1.IRetryJobRequest | undefined, + {} | undefined + ] + >; + retryJob( + request: protos.google.cloud.deploy.v1.IRetryJobRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.deploy.v1.IRetryJobResponse, + protos.google.cloud.deploy.v1.IRetryJobRequest | null | undefined, + {} | null | undefined + > + ): void; + retryJob( + request: protos.google.cloud.deploy.v1.IRetryJobRequest, + callback: Callback< + protos.google.cloud.deploy.v1.IRetryJobResponse, + protos.google.cloud.deploy.v1.IRetryJobRequest | null | undefined, + {} | null | undefined + > + ): void; + retryJob( + request?: protos.google.cloud.deploy.v1.IRetryJobRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.deploy.v1.IRetryJobResponse, + protos.google.cloud.deploy.v1.IRetryJobRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.deploy.v1.IRetryJobResponse, + protos.google.cloud.deploy.v1.IRetryJobRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.deploy.v1.IRetryJobResponse, + protos.google.cloud.deploy.v1.IRetryJobRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + rollout: request.rollout ?? '', + }); + this.initialize(); + return this.innerApiCalls.retryJob(request, options, callback); + } + /** + * Gets details of a single JobRun. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the `JobRun`. Format must be + * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [JobRun]{@link google.cloud.deploy.v1.JobRun}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.get_job_run.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_GetJobRun_async + */ + getJobRun( + request?: protos.google.cloud.deploy.v1.IGetJobRunRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.deploy.v1.IJobRun, + protos.google.cloud.deploy.v1.IGetJobRunRequest | undefined, + {} | undefined + ] + >; + getJobRun( + request: protos.google.cloud.deploy.v1.IGetJobRunRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.deploy.v1.IJobRun, + protos.google.cloud.deploy.v1.IGetJobRunRequest | null | undefined, + {} | null | undefined + > + ): void; + getJobRun( + request: protos.google.cloud.deploy.v1.IGetJobRunRequest, + callback: Callback< + protos.google.cloud.deploy.v1.IJobRun, + protos.google.cloud.deploy.v1.IGetJobRunRequest | null | undefined, + {} | null | undefined + > + ): void; + getJobRun( + request?: protos.google.cloud.deploy.v1.IGetJobRunRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.deploy.v1.IJobRun, + protos.google.cloud.deploy.v1.IGetJobRunRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.deploy.v1.IJobRun, + protos.google.cloud.deploy.v1.IGetJobRunRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.deploy.v1.IJobRun, + protos.google.cloud.deploy.v1.IGetJobRunRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getJobRun(request, options, callback); + } /** * Gets the configuration for a location. * @@ -3277,28 +3561,639 @@ export class CloudDeployClient { callSettings ) as AsyncIterable; } - // -------------------- - // -- Path templates -- - // -------------------- - /** - * Return a fully-qualified build resource name string. + * Lists JobRuns in a given project and location. * - * @param {string} project - * @param {string} location - * @param {string} build - * @returns {string} Resource name string. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The `Rollout` which owns this collection of `JobRun` objects. + * @param {number} [request.pageSize] + * Optional. The maximum number of `JobRun` objects to return. The service may return + * fewer than this value. If unspecified, at most 50 `JobRun` objects will be + * returned. The maximum value is 1000; values above 1000 will be set to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListJobRuns` call. Provide this + * to retrieve the subsequent page. + * + * When paginating, all other provided parameters match the call that provided + * the page token. + * @param {string} [request.filter] + * Optional. Filter results to be returned. See https://google.aip.dev/160 for more + * details. + * @param {string} [request.orderBy] + * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [JobRun]{@link google.cloud.deploy.v1.JobRun}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listJobRunsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. */ - buildPath(project: string, location: string, build: string) { - return this.pathTemplates.buildPathTemplate.render({ - project: project, - location: location, - build: build, - }); + listJobRuns( + request?: protos.google.cloud.deploy.v1.IListJobRunsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.deploy.v1.IJobRun[], + protos.google.cloud.deploy.v1.IListJobRunsRequest | null, + protos.google.cloud.deploy.v1.IListJobRunsResponse + ] + >; + listJobRuns( + request: protos.google.cloud.deploy.v1.IListJobRunsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.deploy.v1.IListJobRunsRequest, + protos.google.cloud.deploy.v1.IListJobRunsResponse | null | undefined, + protos.google.cloud.deploy.v1.IJobRun + > + ): void; + listJobRuns( + request: protos.google.cloud.deploy.v1.IListJobRunsRequest, + callback: PaginationCallback< + protos.google.cloud.deploy.v1.IListJobRunsRequest, + protos.google.cloud.deploy.v1.IListJobRunsResponse | null | undefined, + protos.google.cloud.deploy.v1.IJobRun + > + ): void; + listJobRuns( + request?: protos.google.cloud.deploy.v1.IListJobRunsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.deploy.v1.IListJobRunsRequest, + protos.google.cloud.deploy.v1.IListJobRunsResponse | null | undefined, + protos.google.cloud.deploy.v1.IJobRun + >, + callback?: PaginationCallback< + protos.google.cloud.deploy.v1.IListJobRunsRequest, + protos.google.cloud.deploy.v1.IListJobRunsResponse | null | undefined, + protos.google.cloud.deploy.v1.IJobRun + > + ): Promise< + [ + protos.google.cloud.deploy.v1.IJobRun[], + protos.google.cloud.deploy.v1.IListJobRunsRequest | null, + protos.google.cloud.deploy.v1.IListJobRunsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listJobRuns(request, options, callback); } /** - * Parse the project from Build resource. + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The `Rollout` which owns this collection of `JobRun` objects. + * @param {number} [request.pageSize] + * Optional. The maximum number of `JobRun` objects to return. The service may return + * fewer than this value. If unspecified, at most 50 `JobRun` objects will be + * returned. The maximum value is 1000; values above 1000 will be set to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListJobRuns` call. Provide this + * to retrieve the subsequent page. + * + * When paginating, all other provided parameters match the call that provided + * the page token. + * @param {string} [request.filter] + * Optional. Filter results to be returned. See https://google.aip.dev/160 for more + * details. + * @param {string} [request.orderBy] + * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [JobRun]{@link google.cloud.deploy.v1.JobRun} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listJobRunsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listJobRunsStream( + request?: protos.google.cloud.deploy.v1.IListJobRunsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listJobRuns']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listJobRuns.createStream( + this.innerApiCalls.listJobRuns as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listJobRuns`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The `Rollout` which owns this collection of `JobRun` objects. + * @param {number} [request.pageSize] + * Optional. The maximum number of `JobRun` objects to return. The service may return + * fewer than this value. If unspecified, at most 50 `JobRun` objects will be + * returned. The maximum value is 1000; values above 1000 will be set to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListJobRuns` call. Provide this + * to retrieve the subsequent page. + * + * When paginating, all other provided parameters match the call that provided + * the page token. + * @param {string} [request.filter] + * Optional. Filter results to be returned. See https://google.aip.dev/160 for more + * details. + * @param {string} [request.orderBy] + * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [JobRun]{@link google.cloud.deploy.v1.JobRun}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.list_job_runs.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_ListJobRuns_async + */ + listJobRunsAsync( + request?: protos.google.cloud.deploy.v1.IListJobRunsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listJobRuns']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listJobRuns.asyncIterate( + this.innerApiCalls['listJobRuns'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Gets the access control policy for a resource. Returns an empty policy + * if the resource exists and does not have a policy set. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {Object} [request.options] + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + * + * This object should have the same structure as [GetPolicyOptions]{@link google.iam.v1.GetPolicyOptions} + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [Policy]{@link google.iam.v1.Policy}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Policy]{@link google.iam.v1.Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getIamPolicy( + request: IamProtos.google.iam.v1.GetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.getIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + setIamPolicy( + request: IamProtos.google.iam.v1.SetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.setIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + */ + testIamPermissions( + request: IamProtos.google.iam.v1.TestIamPermissionsRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.testIamPermissions(request, options, callback); + } + + /** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Location]{@link google.cloud.location.Location}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + + /** + * Lists information about the supported locations for this service. Returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Location]{@link google.cloud.location.Location}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * [google.longrunning.Operation]{@link + * external:"google.longrunning.Operation"}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * [google.longrunning.Operation]{@link + * external:"google.longrunning.Operation"}. The promise has a method named + * "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified build resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} build + * @returns {string} Resource name string. + */ + buildPath(project: string, location: string, build: string) { + return this.pathTemplates.buildPathTemplate.render({ + project: project, + location: location, + build: build, + }); + } + + /** + * Parse the project from Build resource. * * @param {string} buildName * A fully-qualified path representing Build resource. @@ -3474,6 +4369,102 @@ export class CloudDeployClient { ).delivery_pipeline; } + /** + * Return a fully-qualified jobRun resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} delivery_pipeline + * @param {string} release + * @param {string} rollout + * @param {string} job_run + * @returns {string} Resource name string. + */ + jobRunPath( + project: string, + location: string, + deliveryPipeline: string, + release: string, + rollout: string, + jobRun: string + ) { + return this.pathTemplates.jobRunPathTemplate.render({ + project: project, + location: location, + delivery_pipeline: deliveryPipeline, + release: release, + rollout: rollout, + job_run: jobRun, + }); + } + + /** + * Parse the project from JobRun resource. + * + * @param {string} jobRunName + * A fully-qualified path representing JobRun resource. + * @returns {string} A string representing the project. + */ + matchProjectFromJobRunName(jobRunName: string) { + return this.pathTemplates.jobRunPathTemplate.match(jobRunName).project; + } + + /** + * Parse the location from JobRun resource. + * + * @param {string} jobRunName + * A fully-qualified path representing JobRun resource. + * @returns {string} A string representing the location. + */ + matchLocationFromJobRunName(jobRunName: string) { + return this.pathTemplates.jobRunPathTemplate.match(jobRunName).location; + } + + /** + * Parse the delivery_pipeline from JobRun resource. + * + * @param {string} jobRunName + * A fully-qualified path representing JobRun resource. + * @returns {string} A string representing the delivery_pipeline. + */ + matchDeliveryPipelineFromJobRunName(jobRunName: string) { + return this.pathTemplates.jobRunPathTemplate.match(jobRunName) + .delivery_pipeline; + } + + /** + * Parse the release from JobRun resource. + * + * @param {string} jobRunName + * A fully-qualified path representing JobRun resource. + * @returns {string} A string representing the release. + */ + matchReleaseFromJobRunName(jobRunName: string) { + return this.pathTemplates.jobRunPathTemplate.match(jobRunName).release; + } + + /** + * Parse the rollout from JobRun resource. + * + * @param {string} jobRunName + * A fully-qualified path representing JobRun resource. + * @returns {string} A string representing the rollout. + */ + matchRolloutFromJobRunName(jobRunName: string) { + return this.pathTemplates.jobRunPathTemplate.match(jobRunName).rollout; + } + + /** + * Parse the job_run from JobRun resource. + * + * @param {string} jobRunName + * A fully-qualified path representing JobRun resource. + * @returns {string} A string representing the job_run. + */ + matchJobRunFromJobRunName(jobRunName: string) { + return this.pathTemplates.jobRunPathTemplate.match(jobRunName).job_run; + } + /** * Return a fully-qualified location resource name string. * @@ -3847,6 +4838,8 @@ export class CloudDeployClient { return this.cloudDeployStub.then(stub => { this._terminated = true; stub.close(); + this.iamClient.close(); + this.locationsClient.close(); this.operationsClient.close(); }); } diff --git a/packages/google-cloud-deploy/src/v1/cloud_deploy_client_config.json b/packages/google-cloud-deploy/src/v1/cloud_deploy_client_config.json index 66d903ee9ea..b859d23be00 100644 --- a/packages/google-cloud-deploy/src/v1/cloud_deploy_client_config.json +++ b/packages/google-cloud-deploy/src/v1/cloud_deploy_client_config.json @@ -97,6 +97,11 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, + "AbandonRelease": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "ApproveRollout": { "timeout_millis": 60000, "retry_codes_name": "non_idempotent", @@ -117,6 +122,21 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, + "RetryJob": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListJobRuns": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetJobRun": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, "GetConfig": { "timeout_millis": 60000, "retry_codes_name": "unavailable", diff --git a/packages/google-cloud-deploy/src/v1/cloud_deploy_proto_list.json b/packages/google-cloud-deploy/src/v1/cloud_deploy_proto_list.json index 11f13dd4f69..fcfe1749c31 100644 --- a/packages/google-cloud-deploy/src/v1/cloud_deploy_proto_list.json +++ b/packages/google-cloud-deploy/src/v1/cloud_deploy_proto_list.json @@ -1,6 +1,7 @@ [ "../../protos/google/cloud/deploy/v1/cloud_deploy.proto", "../../protos/google/cloud/deploy/v1/deliverypipeline_notification_payload.proto", + "../../protos/google/cloud/deploy/v1/jobrun_notification_payload.proto", "../../protos/google/cloud/deploy/v1/log_enums.proto", "../../protos/google/cloud/deploy/v1/release_notification_payload.proto", "../../protos/google/cloud/deploy/v1/release_render_payload.proto", diff --git a/packages/google-cloud-deploy/src/v1/gapic_metadata.json b/packages/google-cloud-deploy/src/v1/gapic_metadata.json index 70fe48dec2c..6dceb363634 100644 --- a/packages/google-cloud-deploy/src/v1/gapic_metadata.json +++ b/packages/google-cloud-deploy/src/v1/gapic_metadata.json @@ -25,6 +25,11 @@ "getRelease" ] }, + "AbandonRelease": { + "methods": [ + "abandonRelease" + ] + }, "ApproveRollout": { "methods": [ "approveRollout" @@ -35,6 +40,16 @@ "getRollout" ] }, + "RetryJob": { + "methods": [ + "retryJob" + ] + }, + "GetJobRun": { + "methods": [ + "getJobRun" + ] + }, "GetConfig": { "methods": [ "getConfig" @@ -107,6 +122,13 @@ "listRolloutsStream", "listRolloutsAsync" ] + }, + "ListJobRuns": { + "methods": [ + "listJobRuns", + "listJobRunsStream", + "listJobRunsAsync" + ] } } }, @@ -128,6 +150,11 @@ "getRelease" ] }, + "AbandonRelease": { + "methods": [ + "abandonRelease" + ] + }, "ApproveRollout": { "methods": [ "approveRollout" @@ -138,6 +165,16 @@ "getRollout" ] }, + "RetryJob": { + "methods": [ + "retryJob" + ] + }, + "GetJobRun": { + "methods": [ + "getJobRun" + ] + }, "GetConfig": { "methods": [ "getConfig" @@ -210,6 +247,13 @@ "listRolloutsStream", "listRolloutsAsync" ] + }, + "ListJobRuns": { + "methods": [ + "listJobRuns", + "listJobRunsStream", + "listJobRunsAsync" + ] } } } diff --git a/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts b/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts index 32d580d2096..a383c7a807c 100644 --- a/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts +++ b/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts @@ -25,7 +25,13 @@ import * as clouddeployModule from '../src'; import {PassThrough} from 'stream'; -import {protobuf, LROperation, operationsProtos} from 'google-gax'; +import { + protobuf, + LROperation, + operationsProtos, + IamProtos, + LocationProtos, +} from 'google-gax'; // Dynamically loaded proto JSON is needed to get the type information // to fill in default values for request objects @@ -645,6 +651,136 @@ describe('v1.CloudDeployClient', () => { }); }); + describe('abandonRelease', () => { + it('invokes abandonRelease without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.AbandonReleaseRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.AbandonReleaseRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.AbandonReleaseResponse() + ); + client.innerApiCalls.abandonRelease = stubSimpleCall(expectedResponse); + const [response] = await client.abandonRelease(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.abandonRelease as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.abandonRelease as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes abandonRelease without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.AbandonReleaseRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.AbandonReleaseRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.AbandonReleaseResponse() + ); + client.innerApiCalls.abandonRelease = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.abandonRelease( + request, + ( + err?: Error | null, + result?: protos.google.cloud.deploy.v1.IAbandonReleaseResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.abandonRelease as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.abandonRelease as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes abandonRelease with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.AbandonReleaseRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.AbandonReleaseRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.abandonRelease = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.abandonRelease(request), expectedError); + const actualRequest = ( + client.innerApiCalls.abandonRelease as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.abandonRelease as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes abandonRelease with closed client', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.AbandonReleaseRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.AbandonReleaseRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.abandonRelease(request), expectedError); + }); + }); + describe('approveRollout', () => { it('invokes approveRollout without error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ @@ -905,64 +1041,64 @@ describe('v1.CloudDeployClient', () => { }); }); - describe('getConfig', () => { - it('invokes getConfig without error', async () => { + describe('retryJob', () => { + it('invokes retryJob without error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.GetConfigRequest() + new protos.google.cloud.deploy.v1.RetryJobRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.GetConfigRequest', - ['name'] + '.google.cloud.deploy.v1.RetryJobRequest', + ['rollout'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.rollout = defaultValue1; + const expectedHeaderRequestParams = `rollout=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.deploy.v1.Config() + new protos.google.cloud.deploy.v1.RetryJobResponse() ); - client.innerApiCalls.getConfig = stubSimpleCall(expectedResponse); - const [response] = await client.getConfig(request); + client.innerApiCalls.retryJob = stubSimpleCall(expectedResponse); + const [response] = await client.retryJob(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.getConfig as SinonStub + client.innerApiCalls.retryJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getConfig as SinonStub + client.innerApiCalls.retryJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getConfig without error using callback', async () => { + it('invokes retryJob without error using callback', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.GetConfigRequest() + new protos.google.cloud.deploy.v1.RetryJobRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.GetConfigRequest', - ['name'] + '.google.cloud.deploy.v1.RetryJobRequest', + ['rollout'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.rollout = defaultValue1; + const expectedHeaderRequestParams = `rollout=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.deploy.v1.Config() + new protos.google.cloud.deploy.v1.RetryJobResponse() ); - client.innerApiCalls.getConfig = + client.innerApiCalls.retryJob = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.getConfig( + client.retryJob( request, ( err?: Error | null, - result?: protos.google.cloud.deploy.v1.IConfig | null + result?: protos.google.cloud.deploy.v1.IRetryJobResponse | null ) => { if (err) { reject(err); @@ -975,126 +1111,121 @@ describe('v1.CloudDeployClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.getConfig as SinonStub + client.innerApiCalls.retryJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getConfig as SinonStub + client.innerApiCalls.retryJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getConfig with error', async () => { + it('invokes retryJob with error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.GetConfigRequest() + new protos.google.cloud.deploy.v1.RetryJobRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.GetConfigRequest', - ['name'] + '.google.cloud.deploy.v1.RetryJobRequest', + ['rollout'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.rollout = defaultValue1; + const expectedHeaderRequestParams = `rollout=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.getConfig = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getConfig(request), expectedError); + client.innerApiCalls.retryJob = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.retryJob(request), expectedError); const actualRequest = ( - client.innerApiCalls.getConfig as SinonStub + client.innerApiCalls.retryJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getConfig as SinonStub + client.innerApiCalls.retryJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getConfig with closed client', async () => { + it('invokes retryJob with closed client', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.GetConfigRequest() + new protos.google.cloud.deploy.v1.RetryJobRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.GetConfigRequest', - ['name'] + '.google.cloud.deploy.v1.RetryJobRequest', + ['rollout'] ); - request.name = defaultValue1; + request.rollout = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); - await assert.rejects(client.getConfig(request), expectedError); + await assert.rejects(client.retryJob(request), expectedError); }); }); - describe('createDeliveryPipeline', () => { - it('invokes createDeliveryPipeline without error', async () => { + describe('getJobRun', () => { + it('invokes getJobRun without error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() + new protos.google.cloud.deploy.v1.GetJobRunRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.CreateDeliveryPipelineRequest', - ['parent'] + '.google.cloud.deploy.v1.GetJobRunRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.deploy.v1.JobRun() ); - client.innerApiCalls.createDeliveryPipeline = - stubLongRunningCall(expectedResponse); - const [operation] = await client.createDeliveryPipeline(request); - const [response] = await operation.promise(); + client.innerApiCalls.getJobRun = stubSimpleCall(expectedResponse); + const [response] = await client.getJobRun(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createDeliveryPipeline as SinonStub + client.innerApiCalls.getJobRun as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createDeliveryPipeline as SinonStub + client.innerApiCalls.getJobRun as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createDeliveryPipeline without error using callback', async () => { + it('invokes getJobRun without error using callback', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() + new protos.google.cloud.deploy.v1.GetJobRunRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.CreateDeliveryPipelineRequest', - ['parent'] + '.google.cloud.deploy.v1.GetJobRunRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.deploy.v1.JobRun() ); - client.innerApiCalls.createDeliveryPipeline = - stubLongRunningCallWithCallback(expectedResponse); + client.innerApiCalls.getJobRun = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.createDeliveryPipeline( + client.getJobRun( request, ( err?: Error | null, - result?: LROperation< - protos.google.cloud.deploy.v1.IDeliveryPipeline, - protos.google.cloud.deploy.v1.IOperationMetadata - > | null + result?: protos.google.cloud.deploy.v1.IJobRun | null ) => { if (err) { reject(err); @@ -1104,100 +1235,359 @@ describe('v1.CloudDeployClient', () => { } ); }); - const operation = (await promise) as LROperation< - protos.google.cloud.deploy.v1.IDeliveryPipeline, - protos.google.cloud.deploy.v1.IOperationMetadata - >; - const [response] = await operation.promise(); + const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createDeliveryPipeline as SinonStub + client.innerApiCalls.getJobRun as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createDeliveryPipeline as SinonStub + client.innerApiCalls.getJobRun as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createDeliveryPipeline with call error', async () => { + it('invokes getJobRun with error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() + new protos.google.cloud.deploy.v1.GetJobRunRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.CreateDeliveryPipelineRequest', - ['parent'] + '.google.cloud.deploy.v1.GetJobRunRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.createDeliveryPipeline = stubLongRunningCall( - undefined, - expectedError - ); - await assert.rejects( - client.createDeliveryPipeline(request), - expectedError - ); + client.innerApiCalls.getJobRun = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getJobRun(request), expectedError); const actualRequest = ( - client.innerApiCalls.createDeliveryPipeline as SinonStub + client.innerApiCalls.getJobRun as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createDeliveryPipeline as SinonStub + client.innerApiCalls.getJobRun as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createDeliveryPipeline with LRO error', async () => { + it('invokes getJobRun with closed client', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() + new protos.google.cloud.deploy.v1.GetJobRunRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.CreateDeliveryPipelineRequest', - ['parent'] + '.google.cloud.deploy.v1.GetJobRunRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createDeliveryPipeline = stubLongRunningCall( - undefined, - undefined, - expectedError + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getJobRun(request), expectedError); + }); + }); + + describe('getConfig', () => { + it('invokes getConfig without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetConfigRequest() ); - const [operation] = await client.createDeliveryPipeline(request); - await assert.rejects(operation.promise(), expectedError); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.GetConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.Config() + ); + client.innerApiCalls.getConfig = stubSimpleCall(expectedResponse); + const [response] = await client.getConfig(request); + assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createDeliveryPipeline as SinonStub + client.innerApiCalls.getConfig as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createDeliveryPipeline as SinonStub + client.innerApiCalls.getConfig as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkCreateDeliveryPipelineProgress without error', async () => { + it('invokes getConfig without error using callback', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetConfigRequest() ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.GetConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.Config() + ); + client.innerApiCalls.getConfig = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getConfig( + request, + ( + err?: Error | null, + result?: protos.google.cloud.deploy.v1.IConfig | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConfig with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.GetConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getConfig = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getConfig(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConfig with closed client', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.GetConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getConfig(request), expectedError); + }); + }); + + describe('createDeliveryPipeline', () => { + it('invokes createDeliveryPipeline without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.CreateDeliveryPipelineRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createDeliveryPipeline = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createDeliveryPipeline(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createDeliveryPipeline as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDeliveryPipeline as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDeliveryPipeline without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.CreateDeliveryPipelineRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createDeliveryPipeline = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createDeliveryPipeline( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.deploy.v1.IDeliveryPipeline, + protos.google.cloud.deploy.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.deploy.v1.IDeliveryPipeline, + protos.google.cloud.deploy.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createDeliveryPipeline as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDeliveryPipeline as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDeliveryPipeline with call error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.CreateDeliveryPipelineRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createDeliveryPipeline = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.createDeliveryPipeline(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.createDeliveryPipeline as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDeliveryPipeline as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDeliveryPipeline with LRO error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.CreateDeliveryPipelineRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createDeliveryPipeline = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createDeliveryPipeline(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createDeliveryPipeline as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDeliveryPipeline as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateDeliveryPipelineProgress without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); @@ -3831,10 +4221,1136 @@ describe('v1.CloudDeployClient', () => { }); }); - describe('Path templates', () => { - describe('build', () => { - const fakePath = '/rendered/path/build'; - const expectedParameters = { + describe('listJobRuns', () => { + it('invokes listJobRuns without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListJobRunsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListJobRunsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), + generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), + generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), + ]; + client.innerApiCalls.listJobRuns = stubSimpleCall(expectedResponse); + const [response] = await client.listJobRuns(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listJobRuns as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listJobRuns as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listJobRuns without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListJobRunsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListJobRunsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), + generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), + generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), + ]; + client.innerApiCalls.listJobRuns = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listJobRuns( + request, + ( + err?: Error | null, + result?: protos.google.cloud.deploy.v1.IJobRun[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listJobRuns as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listJobRuns as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listJobRuns with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListJobRunsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListJobRunsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listJobRuns = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listJobRuns(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listJobRuns as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listJobRuns as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listJobRunsStream without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListJobRunsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListJobRunsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), + generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), + generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), + ]; + client.descriptors.page.listJobRuns.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listJobRunsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.deploy.v1.JobRun[] = []; + stream.on('data', (response: protos.google.cloud.deploy.v1.JobRun) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listJobRuns.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listJobRuns, request) + ); + assert( + (client.descriptors.page.listJobRuns.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listJobRunsStream with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListJobRunsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListJobRunsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listJobRuns.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listJobRunsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.deploy.v1.JobRun[] = []; + stream.on('data', (response: protos.google.cloud.deploy.v1.JobRun) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listJobRuns.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listJobRuns, request) + ); + assert( + (client.descriptors.page.listJobRuns.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listJobRuns without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListJobRunsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListJobRunsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), + generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), + generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), + ]; + client.descriptors.page.listJobRuns.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.deploy.v1.IJobRun[] = []; + const iterable = client.listJobRunsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listJobRuns.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert( + (client.descriptors.page.listJobRuns.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listJobRuns with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListJobRunsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListJobRunsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listJobRuns.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listJobRunsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.deploy.v1.IJobRun[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listJobRuns.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert( + (client.descriptors.page.listJobRuns.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.getIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getIamPolicy without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.getIamPolicy as SinonStub).getCall(0)); + }); + it('invokes getIamPolicy with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.getIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.getIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.setIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes setIamPolicy without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.setIamPolicy as SinonStub).getCall(0)); + }); + it('invokes setIamPolicy with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.setIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.setIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = stubSimpleCall(expectedResponse); + const response = await client.testIamPermissions( + request, + expectedOptions + ); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes testIamPermissions without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.TestIamPermissionsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.testIamPermissions as SinonStub).getCall(0)); + }); + it('invokes testIamPermissions with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.testIamPermissions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.testIamPermissions(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getLocation without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub).getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getLocation(request, expectedOptions), + expectedError + ); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.getOperation(request); + }, expectedError); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = + stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub).getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.cancelOperation(request); + }, expectedError); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = + stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub).getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.deleteOperation(request); + }, expectedError); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); + + describe('Path templates', () => { + describe('build', () => { + const fakePath = '/rendered/path/build'; + const expectedParameters = { project: 'projectValue', location: 'locationValue', build: 'buildValue', @@ -4077,6 +5593,106 @@ describe('v1.CloudDeployClient', () => { }); }); + describe('jobRun', () => { + const fakePath = '/rendered/path/jobRun'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + delivery_pipeline: 'deliveryPipelineValue', + release: 'releaseValue', + rollout: 'rolloutValue', + job_run: 'jobRunValue', + }; + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.jobRunPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.jobRunPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('jobRunPath', () => { + const result = client.jobRunPath( + 'projectValue', + 'locationValue', + 'deliveryPipelineValue', + 'releaseValue', + 'rolloutValue', + 'jobRunValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.jobRunPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromJobRunName', () => { + const result = client.matchProjectFromJobRunName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.jobRunPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromJobRunName', () => { + const result = client.matchLocationFromJobRunName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.jobRunPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDeliveryPipelineFromJobRunName', () => { + const result = client.matchDeliveryPipelineFromJobRunName(fakePath); + assert.strictEqual(result, 'deliveryPipelineValue'); + assert( + (client.pathTemplates.jobRunPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchReleaseFromJobRunName', () => { + const result = client.matchReleaseFromJobRunName(fakePath); + assert.strictEqual(result, 'releaseValue'); + assert( + (client.pathTemplates.jobRunPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRolloutFromJobRunName', () => { + const result = client.matchRolloutFromJobRunName(fakePath); + assert.strictEqual(result, 'rolloutValue'); + assert( + (client.pathTemplates.jobRunPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchJobRunFromJobRunName', () => { + const result = client.matchJobRunFromJobRunName(fakePath); + assert.strictEqual(result, 'jobRunValue'); + assert( + (client.pathTemplates.jobRunPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('location', () => { const fakePath = '/rendered/path/location'; const expectedParameters = { From 78e1cc51fac57c34f507a20c5cdd9790d692085f Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 29 Sep 2022 13:24:21 -0400 Subject: [PATCH 245/254] chore(main): release 2.2.0 (#71) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 2.2.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- packages/google-cloud-deploy/CHANGELOG.md | 7 +++++++ packages/google-cloud-deploy/package.json | 2 +- .../v1/snippet_metadata.google.cloud.deploy.v1.json | 2 +- packages/google-cloud-deploy/samples/package.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-deploy/CHANGELOG.md b/packages/google-cloud-deploy/CHANGELOG.md index 3bf9b49b8cb..dbc84ff1f59 100644 --- a/packages/google-cloud-deploy/CHANGELOG.md +++ b/packages/google-cloud-deploy/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.2.0](https://github.com/googleapis/nodejs-deploy/compare/v2.1.2...v2.2.0) (2022-09-29) + + +### Features + +* Publish new JobRun resource and associated methods for Google Cloud Deploy ([8183015](https://github.com/googleapis/nodejs-deploy/commit/8183015c907f932346fde8c3b6dc981a3e561efe)) + ## [2.1.2](https://github.com/googleapis/nodejs-deploy/compare/v2.1.1...v2.1.2) (2022-09-21) diff --git a/packages/google-cloud-deploy/package.json b/packages/google-cloud-deploy/package.json index d05eb1a59ad..5e9f21f2cb7 100644 --- a/packages/google-cloud-deploy/package.json +++ b/packages/google-cloud-deploy/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/deploy", - "version": "2.1.2", + "version": "2.2.0", "description": "clouddeploy client for Node.js", "repository": "googleapis/nodejs-deploy", "license": "Apache-2.0", diff --git a/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json b/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json index 3b7384b9f6e..98bb9f40d25 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json +++ b/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-deploy", - "version": "2.1.2", + "version": "2.2.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-deploy/samples/package.json b/packages/google-cloud-deploy/samples/package.json index ec2c76a6175..ce386e55197 100644 --- a/packages/google-cloud-deploy/samples/package.json +++ b/packages/google-cloud-deploy/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/deploy": "^2.1.2" + "@google-cloud/deploy": "^2.2.0" }, "devDependencies": { "c8": "^7.1.0", From 0a85add5edf1aca7362e9f72de0df30f6f70b9aa Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 6 Oct 2022 11:33:03 -0700 Subject: [PATCH 246/254] chore: rename warm_pool_enabled to fast_startup_enabled (#55) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Add support for notebook tasks PiperOrigin-RevId: 477935449 Source-Link: https://github.com/googleapis/googleapis/commit/9e3a1dd591e5a5ace521726f79a265eaab52843b Source-Link: https://github.com/googleapis/googleapis-gen/commit/a5443ab48e30bdd608ae7ae1d6cf2fabc17b6dca Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYTU0NDNhYjQ4ZTMwYmRkNjA4YWU3YWUxZDZjZjJmYWJjMTdiNmRjYSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: rename warm_pool_enabled to fast_startup_enabled While this would normally be a breaking change, libraries haven't been released yet with the old value warm_pool_enabled. PiperOrigin-RevId: 479215286 Source-Link: https://github.com/googleapis/googleapis/commit/767dc45050047fd0e6a9ceb3a56ed6cdb4cb3ed2 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d497faaa460ae68eb9e87f1471f2ea300d426145 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZDQ5N2ZhYWE0NjBhZTY4ZWI5ZTg3ZjE0NzFmMmVhMzAwZDQyNjE0NSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../google/cloud/dataplex/v1/logs.proto | 20 +- .../google/cloud/dataplex/v1/tasks.proto | 24 + .../google-cloud-dataplex/protos/protos.d.ts | 144 +++++- .../google-cloud-dataplex/protos/protos.js | 432 +++++++++++++++++- .../google-cloud-dataplex/protos/protos.json | 56 ++- 5 files changed, 668 insertions(+), 8 deletions(-) diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/logs.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/logs.proto index 51e48e46e70..0cec184809b 100644 --- a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/logs.proto +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/logs.proto @@ -16,6 +16,7 @@ syntax = "proto3"; package google.cloud.dataplex.v1; +import "google/api/resource.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; @@ -221,7 +222,7 @@ message SessionEvent { // An unspecified event type. EVENT_TYPE_UNSPECIFIED = 0; - // Event for start of a session. + // Event when the session is assigned to a user. START = 1; // Event for stop of a session. @@ -229,6 +230,10 @@ message SessionEvent { // Query events in the session. QUERY = 3; + + // Event for creation of a cluster. It is not yet assigned to a user. + // This comes before START in the sequence + CREATE = 4; } // Execution details of the query. @@ -267,7 +272,8 @@ message SessionEvent { // The log message. string message = 1; - // The information about the user that created the session. + // The information about the user that created the session. It will be the + // email address of the user. string user_id = 2; // Unique identifier for the session. @@ -281,4 +287,14 @@ message SessionEvent { // The execution details of the query. QueryDetail query = 5; } + + // The status of the event. + bool event_succeeded = 6; + + // If the session is associated with an Environment with fast startup enabled, + // and was pre-created before being assigned to a user. + bool fast_startup_enabled = 7; + + // The idle duration of a warm pooled session before it is assigned to user. + google.protobuf.Duration unassigned_duration = 8; } diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/tasks.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/tasks.proto index 8ca33dac1ba..214be25582e 100644 --- a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/tasks.proto +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/tasks.proto @@ -238,6 +238,27 @@ message Task { InfrastructureSpec infrastructure_spec = 6 [(google.api.field_behavior) = OPTIONAL]; } + // Config for running scheduled notebooks. + message NotebookTaskConfig { + // Required. Path to input notebook. This can be the Cloud Storage URI of the notebook + // file or the path to a Notebook Content. The execution args are accessible + // as environment variables + // (`TASK_key=value`). + string notebook = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Infrastructure specification for the execution. + InfrastructureSpec infrastructure_spec = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Cloud Storage URIs of files to be placed in the working directory of each + // executor. + repeated string file_uris = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Cloud Storage URIs of archives to be extracted into the working directory + // of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and + // .zip. + repeated string archive_uris = 6 [(google.api.field_behavior) = OPTIONAL]; + } + // Status of the task execution (e.g. Jobs). message ExecutionStatus { // Output only. Last update time of the status. @@ -292,6 +313,9 @@ message Task { oneof config { // Config related to running custom Spark tasks. SparkTaskConfig spark = 300; + + // Config related to running scheduled Notebooks. + NotebookTaskConfig notebook = 302; } } diff --git a/packages/google-cloud-dataplex/protos/protos.d.ts b/packages/google-cloud-dataplex/protos/protos.d.ts index 6e9a9b63df4..99f6b00514f 100644 --- a/packages/google-cloud-dataplex/protos/protos.d.ts +++ b/packages/google-cloud-dataplex/protos/protos.d.ts @@ -6208,6 +6208,15 @@ export namespace google { /** SessionEvent query */ query?: (google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null); + + /** SessionEvent eventSucceeded */ + eventSucceeded?: (boolean|null); + + /** SessionEvent fastStartupEnabled */ + fastStartupEnabled?: (boolean|null); + + /** SessionEvent unassignedDuration */ + unassignedDuration?: (google.protobuf.IDuration|null); } /** Represents a SessionEvent. */ @@ -6234,6 +6243,15 @@ export namespace google { /** SessionEvent query. */ public query?: (google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null); + /** SessionEvent eventSucceeded. */ + public eventSucceeded: boolean; + + /** SessionEvent fastStartupEnabled. */ + public fastStartupEnabled: boolean; + + /** SessionEvent unassignedDuration. */ + public unassignedDuration?: (google.protobuf.IDuration|null); + /** SessionEvent detail. */ public detail?: "query"; @@ -6322,7 +6340,8 @@ export namespace google { EVENT_TYPE_UNSPECIFIED = 0, START = 1, STOP = 2, - QUERY = 3 + QUERY = 3, + CREATE = 4 } /** Properties of a QueryDetail. */ @@ -14276,6 +14295,9 @@ export namespace google { /** Task spark */ spark?: (google.cloud.dataplex.v1.Task.ISparkTaskConfig|null); + + /** Task notebook */ + notebook?: (google.cloud.dataplex.v1.Task.INotebookTaskConfig|null); } /** Represents a Task. */ @@ -14323,8 +14345,11 @@ export namespace google { /** Task spark. */ public spark?: (google.cloud.dataplex.v1.Task.ISparkTaskConfig|null); + /** Task notebook. */ + public notebook?: (google.cloud.dataplex.v1.Task.INotebookTaskConfig|null); + /** Task config. */ - public config?: "spark"; + public config?: ("spark"|"notebook"); /** * Creates a new Task instance using the specified properties. @@ -15254,6 +15279,121 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a NotebookTaskConfig. */ + interface INotebookTaskConfig { + + /** NotebookTaskConfig notebook */ + notebook?: (string|null); + + /** NotebookTaskConfig infrastructureSpec */ + infrastructureSpec?: (google.cloud.dataplex.v1.Task.IInfrastructureSpec|null); + + /** NotebookTaskConfig fileUris */ + fileUris?: (string[]|null); + + /** NotebookTaskConfig archiveUris */ + archiveUris?: (string[]|null); + } + + /** Represents a NotebookTaskConfig. */ + class NotebookTaskConfig implements INotebookTaskConfig { + + /** + * Constructs a new NotebookTaskConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Task.INotebookTaskConfig); + + /** NotebookTaskConfig notebook. */ + public notebook: string; + + /** NotebookTaskConfig infrastructureSpec. */ + public infrastructureSpec?: (google.cloud.dataplex.v1.Task.IInfrastructureSpec|null); + + /** NotebookTaskConfig fileUris. */ + public fileUris: string[]; + + /** NotebookTaskConfig archiveUris. */ + public archiveUris: string[]; + + /** + * Creates a new NotebookTaskConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NotebookTaskConfig instance + */ + public static create(properties?: google.cloud.dataplex.v1.Task.INotebookTaskConfig): google.cloud.dataplex.v1.Task.NotebookTaskConfig; + + /** + * Encodes the specified NotebookTaskConfig message. Does not implicitly {@link google.cloud.dataplex.v1.Task.NotebookTaskConfig.verify|verify} messages. + * @param message NotebookTaskConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Task.INotebookTaskConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NotebookTaskConfig message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.NotebookTaskConfig.verify|verify} messages. + * @param message NotebookTaskConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Task.INotebookTaskConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NotebookTaskConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NotebookTaskConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Task.NotebookTaskConfig; + + /** + * Decodes a NotebookTaskConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NotebookTaskConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Task.NotebookTaskConfig; + + /** + * Verifies a NotebookTaskConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NotebookTaskConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NotebookTaskConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.NotebookTaskConfig; + + /** + * Creates a plain object from a NotebookTaskConfig message. Also converts values to other types if specified. + * @param message NotebookTaskConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Task.NotebookTaskConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NotebookTaskConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NotebookTaskConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of an ExecutionStatus. */ interface IExecutionStatus { diff --git a/packages/google-cloud-dataplex/protos/protos.js b/packages/google-cloud-dataplex/protos/protos.js index f7cf043673e..46481b77013 100644 --- a/packages/google-cloud-dataplex/protos/protos.js +++ b/packages/google-cloud-dataplex/protos/protos.js @@ -15827,6 +15827,9 @@ * @property {string|null} [sessionId] SessionEvent sessionId * @property {google.cloud.dataplex.v1.SessionEvent.EventType|null} [type] SessionEvent type * @property {google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null} [query] SessionEvent query + * @property {boolean|null} [eventSucceeded] SessionEvent eventSucceeded + * @property {boolean|null} [fastStartupEnabled] SessionEvent fastStartupEnabled + * @property {google.protobuf.IDuration|null} [unassignedDuration] SessionEvent unassignedDuration */ /** @@ -15884,6 +15887,30 @@ */ SessionEvent.prototype.query = null; + /** + * SessionEvent eventSucceeded. + * @member {boolean} eventSucceeded + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + SessionEvent.prototype.eventSucceeded = false; + + /** + * SessionEvent fastStartupEnabled. + * @member {boolean} fastStartupEnabled + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + SessionEvent.prototype.fastStartupEnabled = false; + + /** + * SessionEvent unassignedDuration. + * @member {google.protobuf.IDuration|null|undefined} unassignedDuration + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + SessionEvent.prototype.unassignedDuration = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -15932,6 +15959,12 @@ writer.uint32(/* id 4, wireType 0 =*/32).int32(message.type); if (message.query != null && Object.hasOwnProperty.call(message, "query")) $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.encode(message.query, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.eventSucceeded != null && Object.hasOwnProperty.call(message, "eventSucceeded")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.eventSucceeded); + if (message.fastStartupEnabled != null && Object.hasOwnProperty.call(message, "fastStartupEnabled")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.fastStartupEnabled); + if (message.unassignedDuration != null && Object.hasOwnProperty.call(message, "unassignedDuration")) + $root.google.protobuf.Duration.encode(message.unassignedDuration, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; @@ -15986,6 +16019,18 @@ message.query = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.decode(reader, reader.uint32()); break; } + case 6: { + message.eventSucceeded = reader.bool(); + break; + } + case 7: { + message.fastStartupEnabled = reader.bool(); + break; + } + case 8: { + message.unassignedDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -16039,6 +16084,7 @@ case 1: case 2: case 3: + case 4: break; } if (message.query != null && message.hasOwnProperty("query")) { @@ -16049,6 +16095,17 @@ return "query." + error; } } + if (message.eventSucceeded != null && message.hasOwnProperty("eventSucceeded")) + if (typeof message.eventSucceeded !== "boolean") + return "eventSucceeded: boolean expected"; + if (message.fastStartupEnabled != null && message.hasOwnProperty("fastStartupEnabled")) + if (typeof message.fastStartupEnabled !== "boolean") + return "fastStartupEnabled: boolean expected"; + if (message.unassignedDuration != null && message.hasOwnProperty("unassignedDuration")) { + var error = $root.google.protobuf.Duration.verify(message.unassignedDuration); + if (error) + return "unassignedDuration." + error; + } return null; }; @@ -16087,12 +16144,25 @@ case 3: message.type = 3; break; + case "CREATE": + case 4: + message.type = 4; + break; } if (object.query != null) { if (typeof object.query !== "object") throw TypeError(".google.cloud.dataplex.v1.SessionEvent.query: object expected"); message.query = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.fromObject(object.query); } + if (object.eventSucceeded != null) + message.eventSucceeded = Boolean(object.eventSucceeded); + if (object.fastStartupEnabled != null) + message.fastStartupEnabled = Boolean(object.fastStartupEnabled); + if (object.unassignedDuration != null) { + if (typeof object.unassignedDuration !== "object") + throw TypeError(".google.cloud.dataplex.v1.SessionEvent.unassignedDuration: object expected"); + message.unassignedDuration = $root.google.protobuf.Duration.fromObject(object.unassignedDuration); + } return message; }; @@ -16114,6 +16184,9 @@ object.userId = ""; object.sessionId = ""; object.type = options.enums === String ? "EVENT_TYPE_UNSPECIFIED" : 0; + object.eventSucceeded = false; + object.fastStartupEnabled = false; + object.unassignedDuration = null; } if (message.message != null && message.hasOwnProperty("message")) object.message = message.message; @@ -16128,6 +16201,12 @@ if (options.oneofs) object.detail = "query"; } + if (message.eventSucceeded != null && message.hasOwnProperty("eventSucceeded")) + object.eventSucceeded = message.eventSucceeded; + if (message.fastStartupEnabled != null && message.hasOwnProperty("fastStartupEnabled")) + object.fastStartupEnabled = message.fastStartupEnabled; + if (message.unassignedDuration != null && message.hasOwnProperty("unassignedDuration")) + object.unassignedDuration = $root.google.protobuf.Duration.toObject(message.unassignedDuration, options); return object; }; @@ -16165,6 +16244,7 @@ * @property {number} START=1 START value * @property {number} STOP=2 STOP value * @property {number} QUERY=3 QUERY value + * @property {number} CREATE=4 CREATE value */ SessionEvent.EventType = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -16172,6 +16252,7 @@ values[valuesById[1] = "START"] = 1; values[valuesById[2] = "STOP"] = 2; values[valuesById[3] = "QUERY"] = 3; + values[valuesById[4] = "CREATE"] = 4; return values; })(); @@ -34547,6 +34628,7 @@ * @property {google.cloud.dataplex.v1.Task.IExecutionSpec|null} [executionSpec] Task executionSpec * @property {google.cloud.dataplex.v1.Task.IExecutionStatus|null} [executionStatus] Task executionStatus * @property {google.cloud.dataplex.v1.Task.ISparkTaskConfig|null} [spark] Task spark + * @property {google.cloud.dataplex.v1.Task.INotebookTaskConfig|null} [notebook] Task notebook */ /** @@ -34661,17 +34743,25 @@ */ Task.prototype.spark = null; + /** + * Task notebook. + * @member {google.cloud.dataplex.v1.Task.INotebookTaskConfig|null|undefined} notebook + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.notebook = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; /** * Task config. - * @member {"spark"|undefined} config + * @member {"spark"|"notebook"|undefined} config * @memberof google.cloud.dataplex.v1.Task * @instance */ Object.defineProperty(Task.prototype, "config", { - get: $util.oneOfGetter($oneOfFields = ["spark"]), + get: $util.oneOfGetter($oneOfFields = ["spark", "notebook"]), set: $util.oneOfSetter($oneOfFields) }); @@ -34724,6 +34814,8 @@ $root.google.cloud.dataplex.v1.Task.ExecutionStatus.encode(message.executionStatus, writer.uint32(/* id 201, wireType 2 =*/1610).fork()).ldelim(); if (message.spark != null && Object.hasOwnProperty.call(message, "spark")) $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.encode(message.spark, writer.uint32(/* id 300, wireType 2 =*/2402).fork()).ldelim(); + if (message.notebook != null && Object.hasOwnProperty.call(message, "notebook")) + $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig.encode(message.notebook, writer.uint32(/* id 302, wireType 2 =*/2418).fork()).ldelim(); return writer; }; @@ -34825,6 +34917,10 @@ message.spark = $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.decode(reader, reader.uint32()); break; } + case 302: { + message.notebook = $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -34925,6 +35021,16 @@ return "spark." + error; } } + if (message.notebook != null && message.hasOwnProperty("notebook")) { + if (properties.config === 1) + return "config: multiple values"; + properties.config = 1; + { + var error = $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig.verify(message.notebook); + if (error) + return "notebook." + error; + } + } return null; }; @@ -35007,6 +35113,11 @@ throw TypeError(".google.cloud.dataplex.v1.Task.spark: object expected"); message.spark = $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.fromObject(object.spark); } + if (object.notebook != null) { + if (typeof object.notebook !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.notebook: object expected"); + message.notebook = $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig.fromObject(object.notebook); + } return message; }; @@ -35068,6 +35179,11 @@ if (options.oneofs) object.config = "spark"; } + if (message.notebook != null && message.hasOwnProperty("notebook")) { + object.notebook = $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig.toObject(message.notebook, options); + if (options.oneofs) + object.config = "notebook"; + } return object; }; @@ -37408,6 +37524,318 @@ return SparkTaskConfig; })(); + Task.NotebookTaskConfig = (function() { + + /** + * Properties of a NotebookTaskConfig. + * @memberof google.cloud.dataplex.v1.Task + * @interface INotebookTaskConfig + * @property {string|null} [notebook] NotebookTaskConfig notebook + * @property {google.cloud.dataplex.v1.Task.IInfrastructureSpec|null} [infrastructureSpec] NotebookTaskConfig infrastructureSpec + * @property {Array.|null} [fileUris] NotebookTaskConfig fileUris + * @property {Array.|null} [archiveUris] NotebookTaskConfig archiveUris + */ + + /** + * Constructs a new NotebookTaskConfig. + * @memberof google.cloud.dataplex.v1.Task + * @classdesc Represents a NotebookTaskConfig. + * @implements INotebookTaskConfig + * @constructor + * @param {google.cloud.dataplex.v1.Task.INotebookTaskConfig=} [properties] Properties to set + */ + function NotebookTaskConfig(properties) { + this.fileUris = []; + this.archiveUris = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NotebookTaskConfig notebook. + * @member {string} notebook + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @instance + */ + NotebookTaskConfig.prototype.notebook = ""; + + /** + * NotebookTaskConfig infrastructureSpec. + * @member {google.cloud.dataplex.v1.Task.IInfrastructureSpec|null|undefined} infrastructureSpec + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @instance + */ + NotebookTaskConfig.prototype.infrastructureSpec = null; + + /** + * NotebookTaskConfig fileUris. + * @member {Array.} fileUris + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @instance + */ + NotebookTaskConfig.prototype.fileUris = $util.emptyArray; + + /** + * NotebookTaskConfig archiveUris. + * @member {Array.} archiveUris + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @instance + */ + NotebookTaskConfig.prototype.archiveUris = $util.emptyArray; + + /** + * Creates a new NotebookTaskConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @static + * @param {google.cloud.dataplex.v1.Task.INotebookTaskConfig=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.NotebookTaskConfig} NotebookTaskConfig instance + */ + NotebookTaskConfig.create = function create(properties) { + return new NotebookTaskConfig(properties); + }; + + /** + * Encodes the specified NotebookTaskConfig message. Does not implicitly {@link google.cloud.dataplex.v1.Task.NotebookTaskConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @static + * @param {google.cloud.dataplex.v1.Task.INotebookTaskConfig} message NotebookTaskConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NotebookTaskConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.infrastructureSpec != null && Object.hasOwnProperty.call(message, "infrastructureSpec")) + $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.encode(message.infrastructureSpec, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.notebook != null && Object.hasOwnProperty.call(message, "notebook")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.notebook); + if (message.fileUris != null && message.fileUris.length) + for (var i = 0; i < message.fileUris.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.fileUris[i]); + if (message.archiveUris != null && message.archiveUris.length) + for (var i = 0; i < message.archiveUris.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.archiveUris[i]); + return writer; + }; + + /** + * Encodes the specified NotebookTaskConfig message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.NotebookTaskConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @static + * @param {google.cloud.dataplex.v1.Task.INotebookTaskConfig} message NotebookTaskConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NotebookTaskConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NotebookTaskConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.NotebookTaskConfig} NotebookTaskConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NotebookTaskConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: { + message.notebook = reader.string(); + break; + } + case 3: { + message.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.decode(reader, reader.uint32()); + break; + } + case 5: { + if (!(message.fileUris && message.fileUris.length)) + message.fileUris = []; + message.fileUris.push(reader.string()); + break; + } + case 6: { + if (!(message.archiveUris && message.archiveUris.length)) + message.archiveUris = []; + message.archiveUris.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NotebookTaskConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.NotebookTaskConfig} NotebookTaskConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NotebookTaskConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NotebookTaskConfig message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NotebookTaskConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.notebook != null && message.hasOwnProperty("notebook")) + if (!$util.isString(message.notebook)) + return "notebook: string expected"; + if (message.infrastructureSpec != null && message.hasOwnProperty("infrastructureSpec")) { + var error = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.verify(message.infrastructureSpec); + if (error) + return "infrastructureSpec." + error; + } + if (message.fileUris != null && message.hasOwnProperty("fileUris")) { + if (!Array.isArray(message.fileUris)) + return "fileUris: array expected"; + for (var i = 0; i < message.fileUris.length; ++i) + if (!$util.isString(message.fileUris[i])) + return "fileUris: string[] expected"; + } + if (message.archiveUris != null && message.hasOwnProperty("archiveUris")) { + if (!Array.isArray(message.archiveUris)) + return "archiveUris: array expected"; + for (var i = 0; i < message.archiveUris.length; ++i) + if (!$util.isString(message.archiveUris[i])) + return "archiveUris: string[] expected"; + } + return null; + }; + + /** + * Creates a NotebookTaskConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.NotebookTaskConfig} NotebookTaskConfig + */ + NotebookTaskConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig(); + if (object.notebook != null) + message.notebook = String(object.notebook); + if (object.infrastructureSpec != null) { + if (typeof object.infrastructureSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.NotebookTaskConfig.infrastructureSpec: object expected"); + message.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.fromObject(object.infrastructureSpec); + } + if (object.fileUris) { + if (!Array.isArray(object.fileUris)) + throw TypeError(".google.cloud.dataplex.v1.Task.NotebookTaskConfig.fileUris: array expected"); + message.fileUris = []; + for (var i = 0; i < object.fileUris.length; ++i) + message.fileUris[i] = String(object.fileUris[i]); + } + if (object.archiveUris) { + if (!Array.isArray(object.archiveUris)) + throw TypeError(".google.cloud.dataplex.v1.Task.NotebookTaskConfig.archiveUris: array expected"); + message.archiveUris = []; + for (var i = 0; i < object.archiveUris.length; ++i) + message.archiveUris[i] = String(object.archiveUris[i]); + } + return message; + }; + + /** + * Creates a plain object from a NotebookTaskConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @static + * @param {google.cloud.dataplex.v1.Task.NotebookTaskConfig} message NotebookTaskConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NotebookTaskConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.fileUris = []; + object.archiveUris = []; + } + if (options.defaults) { + object.infrastructureSpec = null; + object.notebook = ""; + } + if (message.infrastructureSpec != null && message.hasOwnProperty("infrastructureSpec")) + object.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.toObject(message.infrastructureSpec, options); + if (message.notebook != null && message.hasOwnProperty("notebook")) + object.notebook = message.notebook; + if (message.fileUris && message.fileUris.length) { + object.fileUris = []; + for (var j = 0; j < message.fileUris.length; ++j) + object.fileUris[j] = message.fileUris[j]; + } + if (message.archiveUris && message.archiveUris.length) { + object.archiveUris = []; + for (var j = 0; j < message.archiveUris.length; ++j) + object.archiveUris[j] = message.archiveUris[j]; + } + return object; + }; + + /** + * Converts this NotebookTaskConfig to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @instance + * @returns {Object.} JSON object + */ + NotebookTaskConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NotebookTaskConfig + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NotebookTaskConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.NotebookTaskConfig"; + }; + + return NotebookTaskConfig; + })(); + Task.ExecutionStatus = (function() { /** diff --git a/packages/google-cloud-dataplex/protos/protos.json b/packages/google-cloud-dataplex/protos/protos.json index f5fb6c0d56f..bd794d65777 100644 --- a/packages/google-cloud-dataplex/protos/protos.json +++ b/packages/google-cloud-dataplex/protos/protos.json @@ -1900,6 +1900,18 @@ "query": { "type": "QueryDetail", "id": 5 + }, + "eventSucceeded": { + "type": "bool", + "id": 6 + }, + "fastStartupEnabled": { + "type": "bool", + "id": 7 + }, + "unassignedDuration": { + "type": "google.protobuf.Duration", + "id": 8 } }, "nested": { @@ -1908,7 +1920,8 @@ "EVENT_TYPE_UNSPECIFIED": 0, "START": 1, "STOP": 2, - "QUERY": 3 + "QUERY": 3, + "CREATE": 4 } }, "QueryDetail": { @@ -4510,7 +4523,8 @@ "oneofs": { "config": { "oneof": [ - "spark" + "spark", + "notebook" ] } }, @@ -4597,6 +4611,10 @@ "spark": { "type": "SparkTaskConfig", "id": 300 + }, + "notebook": { + "type": "NotebookTaskConfig", + "id": 302 } }, "nested": { @@ -4875,6 +4893,40 @@ } } }, + "NotebookTaskConfig": { + "fields": { + "notebook": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "infrastructureSpec": { + "type": "InfrastructureSpec", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "fileUris": { + "rule": "repeated", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "archiveUris": { + "rule": "repeated", + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, "ExecutionStatus": { "fields": { "updateTime": { From 980bc8df85921ecd7e21b81a4568aa9ba9eb84fd Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Wed, 12 Oct 2022 21:35:06 -0700 Subject: [PATCH 247/254] build: add release-please config, fix owlbot-config --- .release-please-manifest.json | 1 + .../{.github => }/.OwlBot.yaml | 6 +-- .../.mocharc.js | 2 +- .../.prettierrc.js | 2 +- .../.repo-metadata.json | 4 +- .../README.md | 16 ++++--- .../package.json | 4 +- .../samples/README.md | 48 ++++++++++++++++--- .../src/index.ts | 2 +- release-please-config.json | 1 + 10 files changed, 62 insertions(+), 24 deletions(-) rename packages/google-cloud-policytroubleshooter/{.github => }/.OwlBot.yaml (78%) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a4aac6fae6f..79d638b8413 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -14,6 +14,7 @@ "packages/google-cloud-language": "5.1.0", "packages/google-cloud-oslogin": "4.0.2", "packages/google-cloud-phishingprotection": "3.0.4", + "packages/google-cloud-policytroubleshooter": "2.0.4", "packages/google-cloud-recommender": "5.0.2", "packages/google-cloud-redis": "3.1.3", "packages/google-cloud-resourcemanager": "4.1.1", diff --git a/packages/google-cloud-policytroubleshooter/.github/.OwlBot.yaml b/packages/google-cloud-policytroubleshooter/.OwlBot.yaml similarity index 78% rename from packages/google-cloud-policytroubleshooter/.github/.OwlBot.yaml rename to packages/google-cloud-policytroubleshooter/.OwlBot.yaml index 3d79186b3e6..39b2ec41fbc 100644 --- a/packages/google-cloud-policytroubleshooter/.github/.OwlBot.yaml +++ b/packages/google-cloud-policytroubleshooter/.OwlBot.yaml @@ -11,13 +11,11 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -docker: - image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest deep-remove-regex: - /owl-bot-staging deep-copy-regex: - - source: /google/cloud/policytroubleshooter/(.*)/.*-nodejs/(.*) - dest: /owl-bot-staging/$1/$2 + - source: /google/cloud/policytroubleshooter/(.*)/.*-nodejs + dest: /owl-bot-staging/google-cloud-policytroubleshooter/$1 diff --git a/packages/google-cloud-policytroubleshooter/.mocharc.js b/packages/google-cloud-policytroubleshooter/.mocharc.js index 0b600509bed..cdb7b752160 100644 --- a/packages/google-cloud-policytroubleshooter/.mocharc.js +++ b/packages/google-cloud-policytroubleshooter/.mocharc.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-policytroubleshooter/.prettierrc.js b/packages/google-cloud-policytroubleshooter/.prettierrc.js index d1b95106f4c..d546a4ad546 100644 --- a/packages/google-cloud-policytroubleshooter/.prettierrc.js +++ b/packages/google-cloud-policytroubleshooter/.prettierrc.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-policytroubleshooter/.repo-metadata.json b/packages/google-cloud-policytroubleshooter/.repo-metadata.json index 85b83be5a28..9572fbdd315 100644 --- a/packages/google-cloud-policytroubleshooter/.repo-metadata.json +++ b/packages/google-cloud-policytroubleshooter/.repo-metadata.json @@ -6,11 +6,11 @@ "default_version": "v1", "language": "nodejs", "name_pretty": "IAM Policy Troubleshooter API", - "repo": "googleapis/nodejs-policy-troubleshooter", + "repo": "googleapis/google-cloud-node", "product_documentation": "https://cloud.google.com/iam/docs/troubleshooting-access#rest-api/", "requires_billing": true, "name": "policytroubleshooter", - "issue_tracker": "https://github.com/googleapis/nodejs-policy-troubleshooter/issues", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", "api_shortname": "policytroubleshooter", "library_type": "GAPIC_AUTO" } diff --git a/packages/google-cloud-policytroubleshooter/README.md b/packages/google-cloud-policytroubleshooter/README.md index 396d2898f05..d4a8234ec43 100644 --- a/packages/google-cloud-policytroubleshooter/README.md +++ b/packages/google-cloud-policytroubleshooter/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [IAM Policy Troubleshooter API: Node.js Client](https://github.com/googleapis/nodejs-policy-troubleshooter) +# [IAM Policy Troubleshooter API: Node.js Client](https://github.com/googleapis/google-cloud-node) [![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/policy-troubleshooter.svg)](https://www.npmjs.org/package/@google-cloud/policy-troubleshooter) @@ -14,11 +14,11 @@ Policytroubleshooter client for Node.js A comprehensive list of changes in each version may be found in -[the CHANGELOG](https://github.com/googleapis/nodejs-policy-troubleshooter/blob/main/CHANGELOG.md). +[the CHANGELOG](https://github.com/googleapis/google-cloud-node/blob/main/CHANGELOG.md). * [IAM Policy Troubleshooter API Node.js Client API Reference][client-docs] * [IAM Policy Troubleshooter API Documentation][product-docs] -* [github.com/googleapis/nodejs-policy-troubleshooter](https://github.com/googleapis/nodejs-policy-troubleshooter) +* [github.com/googleapis/google-cloud-node](https://github.com/googleapis/google-cloud-node) Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in [Client Libraries Explained][explained]. @@ -86,11 +86,13 @@ troubelshootPolicy(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-policy-troubleshooter/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Quickstart | [source code](https://github.com/googleapis/nodejs-policy-troubleshooter/blob/main/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-policy-troubleshooter&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | +| Iam_checker.troubleshoot_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-policytroubleshooter/samples/generated/v1/iam_checker.troubleshoot_iam_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-policytroubleshooter/samples/generated/v1/iam_checker.troubleshoot_iam_policy.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-policytroubleshooter/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-policytroubleshooter/samples/quickstart.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-policytroubleshooter/samples/test/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-policytroubleshooter/samples/test/quickstart.js,samples/README.md) | @@ -140,7 +142,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-policy-troubleshooter/blob/main/CONTRIBUTING.md). +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md). Please note that this `README.md`, the `samples/README.md`, and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) @@ -152,7 +154,7 @@ to its templates in Apache Version 2.0 -See [LICENSE](https://github.com/googleapis/nodejs-policy-troubleshooter/blob/main/LICENSE) +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/policy-troubleshooter/latest [product-docs]: https://cloud.google.com/iam/docs/troubleshooting-access#rest-api/ diff --git a/packages/google-cloud-policytroubleshooter/package.json b/packages/google-cloud-policytroubleshooter/package.json index 52cf210b319..2ba59a087b9 100644 --- a/packages/google-cloud-policytroubleshooter/package.json +++ b/packages/google-cloud-policytroubleshooter/package.json @@ -33,9 +33,9 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "c8 mocha build/system-test", + "system-test": "npm run compile && c8 mocha build/system-test", "test": "c8 mocha build/test", - "samples-test": "cd samples/ && npm link ../ && npm test", + "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { diff --git a/packages/google-cloud-policytroubleshooter/samples/README.md b/packages/google-cloud-policytroubleshooter/samples/README.md index 39d1ad9856f..223b92d392e 100644 --- a/packages/google-cloud-policytroubleshooter/samples/README.md +++ b/packages/google-cloud-policytroubleshooter/samples/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [IAM Policy Troubleshooter API: Node.js Samples](https://github.com/googleapis/nodejs-policy-troubleshooter) +# [IAM Policy Troubleshooter API: Node.js Samples](https://github.com/googleapis/google-cloud-node) [![Open in Cloud Shell][shell_img]][shell_link] @@ -12,12 +12,14 @@ * [Before you begin](#before-you-begin) * [Samples](#samples) + * [Iam_checker.troubleshoot_iam_policy](#iam_checker.troubleshoot_iam_policy) + * [Quickstart](#quickstart) * [Quickstart](#quickstart) ## Before you begin Before running the samples, make sure you've followed the steps outlined in -[Using the client library](https://github.com/googleapis/nodejs-policy-troubleshooter#using-the-client-library). +[Using the client library](https://github.com/googleapis/google-cloud-node#using-the-client-library). `cd samples` @@ -29,16 +31,50 @@ Before running the samples, make sure you've followed the steps outlined in +### Iam_checker.troubleshoot_iam_policy + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-policytroubleshooter/samples/generated/v1/iam_checker.troubleshoot_iam_policy.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-policytroubleshooter/samples/generated/v1/iam_checker.troubleshoot_iam_policy.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-policytroubleshooter/samples/generated/v1/iam_checker.troubleshoot_iam_policy.js` + + +----- + + + + +### Quickstart + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-policytroubleshooter/samples/quickstart.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-policytroubleshooter/samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-policytroubleshooter/samples/quickstart.js` + + +----- + + + + ### Quickstart -View the [source code](https://github.com/googleapis/nodejs-policy-troubleshooter/blob/main/samples/quickstart.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-policytroubleshooter/samples/test/quickstart.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-policy-troubleshooter&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-policytroubleshooter/samples/test/quickstart.js,samples/README.md) __Usage:__ -`node samples/quickstart.js` +`node packages/google-cloud-policytroubleshooter/samples/test/quickstart.js` @@ -46,5 +82,5 @@ __Usage:__ [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png -[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-policy-troubleshooter&page=editor&open_in_editor=samples/README.md +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=samples/README.md [product-docs]: https://cloud.google.com/iam/docs/troubleshooting-access#rest-api/ diff --git a/packages/google-cloud-policytroubleshooter/src/index.ts b/packages/google-cloud-policytroubleshooter/src/index.ts index da90a392672..f0e845925b6 100644 --- a/packages/google-cloud-policytroubleshooter/src/index.ts +++ b/packages/google-cloud-policytroubleshooter/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/release-please-config.json b/release-please-config.json index 231ec839fd4..e1a9e22a4c1 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -14,6 +14,7 @@ "packages/google-cloud-language": {}, "packages/google-cloud-oslogin": {}, "packages/google-cloud-phishingprotection": {}, + "packages/google-cloud-policytroubleshooter": {}, "packages/google-cloud-recommender": {}, "packages/google-cloud-redis": {}, "packages/google-cloud-resourcemanager": {}, From 92db71c47da4824cb099086eb48ec8890fac50d3 Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Wed, 12 Oct 2022 21:35:16 -0700 Subject: [PATCH 248/254] build: add release-please config, fix owlbot-config --- .release-please-manifest.json | 1 + .../{.github => }/.OwlBot.yaml | 6 ++-- packages/google-cloud-shell/.mocharc.js | 2 +- packages/google-cloud-shell/.prettierrc.js | 2 +- .../google-cloud-shell/.repo-metadata.json | 4 +-- packages/google-cloud-shell/README.md | 15 +++++----- packages/google-cloud-shell/package.json | 4 +-- packages/google-cloud-shell/samples/README.md | 30 +++++++++++++++---- packages/google-cloud-shell/src/index.ts | 2 +- release-please-config.json | 1 + 10 files changed, 43 insertions(+), 24 deletions(-) rename packages/google-cloud-shell/{.github => }/.OwlBot.yaml (79%) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a4aac6fae6f..56ca7aac863 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -18,6 +18,7 @@ "packages/google-cloud-redis": "3.1.3", "packages/google-cloud-resourcemanager": "4.1.1", "packages/google-cloud-security-publicca": "0.1.1", + "packages/google-cloud-shell": "2.0.1", "packages/google-devtools-artifactregistry": "2.0.0", "packages/google-iam": "0.2.0", "packages/google-maps-routing": "0.1.1", diff --git a/packages/google-cloud-shell/.github/.OwlBot.yaml b/packages/google-cloud-shell/.OwlBot.yaml similarity index 79% rename from packages/google-cloud-shell/.github/.OwlBot.yaml rename to packages/google-cloud-shell/.OwlBot.yaml index 48848c007f0..fde389e13e0 100644 --- a/packages/google-cloud-shell/.github/.OwlBot.yaml +++ b/packages/google-cloud-shell/.OwlBot.yaml @@ -11,12 +11,10 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -docker: - image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest deep-remove-regex: - /owl-bot-staging deep-copy-regex: - - source: /google/cloud/shell/(.*)/.*-nodejs/(.*) - dest: /owl-bot-staging/$1/$2 + - source: /google/cloud/shell/(.*)/.*-nodejs + dest: /owl-bot-staging/google-cloud-shell/$1 diff --git a/packages/google-cloud-shell/.mocharc.js b/packages/google-cloud-shell/.mocharc.js index 0b600509bed..cdb7b752160 100644 --- a/packages/google-cloud-shell/.mocharc.js +++ b/packages/google-cloud-shell/.mocharc.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-shell/.prettierrc.js b/packages/google-cloud-shell/.prettierrc.js index d1b95106f4c..d546a4ad546 100644 --- a/packages/google-cloud-shell/.prettierrc.js +++ b/packages/google-cloud-shell/.prettierrc.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-shell/.repo-metadata.json b/packages/google-cloud-shell/.repo-metadata.json index 28783c45638..4fcf5c7868d 100644 --- a/packages/google-cloud-shell/.repo-metadata.json +++ b/packages/google-cloud-shell/.repo-metadata.json @@ -3,10 +3,10 @@ "name_pretty": "Cloud Shell", "product_documentation": "https://cloud.google.com/shell/", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/shell/latest", - "issue_tracker": "https://github.com/googleapis/nodejs-cloud-shell/issues", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", "release_level": "stable", "language": "nodejs", - "repo": "googleapis/nodejs-cloud-shell", + "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/shell", "api_id": "shell.googleapis.com", "default_version": "v1", diff --git a/packages/google-cloud-shell/README.md b/packages/google-cloud-shell/README.md index 9df0f4b74c8..9cc649b3a12 100644 --- a/packages/google-cloud-shell/README.md +++ b/packages/google-cloud-shell/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Cloud Shell: Node.js Client](https://github.com/googleapis/nodejs-cloud-shell) +# [Cloud Shell: Node.js Client](https://github.com/googleapis/google-cloud-node) [![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/shell.svg)](https://www.npmjs.org/package/@google-cloud/shell) @@ -14,11 +14,11 @@ cloudshell client for Node.js A comprehensive list of changes in each version may be found in -[the CHANGELOG](https://github.com/googleapis/nodejs-cloud-shell/blob/main/CHANGELOG.md). +[the CHANGELOG](https://github.com/googleapis/google-cloud-node/blob/main/CHANGELOG.md). * [Cloud Shell Node.js Client API Reference][client-docs] * [Cloud Shell Documentation][product-docs] -* [github.com/googleapis/nodejs-cloud-shell](https://github.com/googleapis/nodejs-cloud-shell) +* [github.com/googleapis/google-cloud-node](https://github.com/googleapis/google-cloud-node) Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in [Client Libraries Explained][explained]. @@ -83,11 +83,12 @@ initializeClient(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-cloud-shell/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Quickstart | [source code](https://github.com/googleapis/nodejs-cloud-shell/blob/main/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-cloud-shell&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-shell/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-shell/samples/quickstart.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-shell/samples/test/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-shell/samples/test/quickstart.js,samples/README.md) | @@ -137,7 +138,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-cloud-shell/blob/main/CONTRIBUTING.md). +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md). Please note that this `README.md`, the `samples/README.md`, and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) @@ -149,7 +150,7 @@ to its templates in Apache Version 2.0 -See [LICENSE](https://github.com/googleapis/nodejs-cloud-shell/blob/main/LICENSE) +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/shell/latest [product-docs]: https://cloud.google.com/shell/ diff --git a/packages/google-cloud-shell/package.json b/packages/google-cloud-shell/package.json index 14b20a56e5e..ea132294bb9 100644 --- a/packages/google-cloud-shell/package.json +++ b/packages/google-cloud-shell/package.json @@ -33,9 +33,9 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "c8 mocha build/system-test", + "system-test": "npm run compile && c8 mocha build/system-test", "test": "c8 mocha build/test", - "samples-test": "cd samples/ && npm link ../ && npm test", + "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { diff --git a/packages/google-cloud-shell/samples/README.md b/packages/google-cloud-shell/samples/README.md index ab33be31c80..6faeb3cff52 100644 --- a/packages/google-cloud-shell/samples/README.md +++ b/packages/google-cloud-shell/samples/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Cloud Shell: Node.js Samples](https://github.com/googleapis/nodejs-cloud-shell) +# [Cloud Shell: Node.js Samples](https://github.com/googleapis/google-cloud-node) [![Open in Cloud Shell][shell_img]][shell_link] @@ -13,11 +13,12 @@ * [Before you begin](#before-you-begin) * [Samples](#samples) * [Quickstart](#quickstart) + * [Quickstart](#quickstart) ## Before you begin Before running the samples, make sure you've followed the steps outlined in -[Using the client library](https://github.com/googleapis/nodejs-cloud-shell#using-the-client-library). +[Using the client library](https://github.com/googleapis/google-cloud-node#using-the-client-library). `cd samples` @@ -31,14 +32,31 @@ Before running the samples, make sure you've followed the steps outlined in ### Quickstart -View the [source code](https://github.com/googleapis/nodejs-cloud-shell/blob/main/samples/quickstart.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-shell/samples/quickstart.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-shell/samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-shell/samples/quickstart.js` + + +----- + + + + +### Quickstart + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-shell/samples/test/quickstart.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-cloud-shell&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-shell/samples/test/quickstart.js,samples/README.md) __Usage:__ -`node samples/quickstart.js` +`node packages/google-cloud-shell/samples/test/quickstart.js` @@ -46,5 +64,5 @@ __Usage:__ [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png -[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-cloud-shell&page=editor&open_in_editor=samples/README.md +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=samples/README.md [product-docs]: https://cloud.google.com/shell/ diff --git a/packages/google-cloud-shell/src/index.ts b/packages/google-cloud-shell/src/index.ts index 505ffea9d7a..58c1968a833 100644 --- a/packages/google-cloud-shell/src/index.ts +++ b/packages/google-cloud-shell/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/release-please-config.json b/release-please-config.json index 231ec839fd4..357a03d8917 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -18,6 +18,7 @@ "packages/google-cloud-redis": {}, "packages/google-cloud-resourcemanager": {}, "packages/google-cloud-security-publicca": {}, + "packages/google-cloud-shell": {}, "packages/google-devtools-artifactregistry": {}, "packages/google-iam": {}, "packages/google-maps-routing": {}, From 27157eb9bec4dc879e6cb38c4b23498ee08e380c Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Wed, 12 Oct 2022 21:35:38 -0700 Subject: [PATCH 249/254] build: add release-please config, fix owlbot-config --- .release-please-manifest.json | 1 + .../{.github => }/.OwlBot.yaml | 6 +- .../.mocharc.js | 2 +- .../.prettierrc.js | 2 +- .../.repo-metadata.json | 4 +- .../google-cloud-gkeconnect-gateway/README.md | 20 ++- .../package.json | 4 +- .../samples/README.md | 120 +++++++++++++++++- .../src/index.ts | 2 +- release-please-config.json | 1 + 10 files changed, 138 insertions(+), 24 deletions(-) rename packages/google-cloud-gkeconnect-gateway/{.github => }/.OwlBot.yaml (78%) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a4aac6fae6f..51295e3deae 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -10,6 +10,7 @@ "packages/google-cloud-bigquery-analyticshub": "0.1.0", "packages/google-cloud-bigquery-datapolicies": "0.1.0", "packages/google-cloud-bigquery-datatransfer": "3.1.3", + "packages/google-cloud-gkeconnect-gateway": "2.0.3", "packages/google-cloud-gkemulticloud": "0.1.2", "packages/google-cloud-language": "5.1.0", "packages/google-cloud-oslogin": "4.0.2", diff --git a/packages/google-cloud-gkeconnect-gateway/.github/.OwlBot.yaml b/packages/google-cloud-gkeconnect-gateway/.OwlBot.yaml similarity index 78% rename from packages/google-cloud-gkeconnect-gateway/.github/.OwlBot.yaml rename to packages/google-cloud-gkeconnect-gateway/.OwlBot.yaml index c89dac7e60c..f71f879592f 100644 --- a/packages/google-cloud-gkeconnect-gateway/.github/.OwlBot.yaml +++ b/packages/google-cloud-gkeconnect-gateway/.OwlBot.yaml @@ -11,12 +11,10 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -docker: - image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest deep-remove-regex: - /owl-bot-staging deep-copy-regex: - - source: /google/cloud/gkeconnect/gateway/(.*)/.*-nodejs/(.*) - dest: /owl-bot-staging/$1/$2 + - source: /google/cloud/gkeconnect/gateway/(.*)/.*-nodejs + dest: /owl-bot-staging/google-cloud-gkeconnect-gateway/$1 diff --git a/packages/google-cloud-gkeconnect-gateway/.mocharc.js b/packages/google-cloud-gkeconnect-gateway/.mocharc.js index 0b600509bed..cdb7b752160 100644 --- a/packages/google-cloud-gkeconnect-gateway/.mocharc.js +++ b/packages/google-cloud-gkeconnect-gateway/.mocharc.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-gkeconnect-gateway/.prettierrc.js b/packages/google-cloud-gkeconnect-gateway/.prettierrc.js index d1b95106f4c..d546a4ad546 100644 --- a/packages/google-cloud-gkeconnect-gateway/.prettierrc.js +++ b/packages/google-cloud-gkeconnect-gateway/.prettierrc.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-gkeconnect-gateway/.repo-metadata.json b/packages/google-cloud-gkeconnect-gateway/.repo-metadata.json index 29ba65ba5a5..425eaab7ccb 100644 --- a/packages/google-cloud-gkeconnect-gateway/.repo-metadata.json +++ b/packages/google-cloud-gkeconnect-gateway/.repo-metadata.json @@ -3,10 +3,10 @@ "name_pretty": "GKE Connect Gateway", "product_documentation": "https://cloud.google.com/anthos/multicluster-management/gateway", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/gke-connect-gateway/latest", - "issue_tracker": "https://github.com/googleapis/nodejs-gke-connect-gateway/issues", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", "release_level": "preview", "language": "nodejs", - "repo": "googleapis/nodejs-gke-connect-gateway", + "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/gke-connect-gateway", "api_id": "connectgateway.googleapis.com", "default_version": "v1beta1", diff --git a/packages/google-cloud-gkeconnect-gateway/README.md b/packages/google-cloud-gkeconnect-gateway/README.md index b0101c6f775..b66af932528 100644 --- a/packages/google-cloud-gkeconnect-gateway/README.md +++ b/packages/google-cloud-gkeconnect-gateway/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [GKE Connect Gateway: Node.js Client](https://github.com/googleapis/nodejs-gke-connect-gateway) +# [GKE Connect Gateway: Node.js Client](https://github.com/googleapis/google-cloud-node) [![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/gke-connect-gateway.svg)](https://www.npmjs.org/package/@google-cloud/gke-connect-gateway) @@ -14,11 +14,11 @@ apigateway client for Node.js A comprehensive list of changes in each version may be found in -[the CHANGELOG](https://github.com/googleapis/nodejs-gke-connect-gateway/blob/main/CHANGELOG.md). +[the CHANGELOG](https://github.com/googleapis/google-cloud-node/blob/main/CHANGELOG.md). * [GKE Connect Gateway Node.js Client API Reference][client-docs] * [GKE Connect Gateway Documentation][product-docs] -* [github.com/googleapis/nodejs-gke-connect-gateway](https://github.com/googleapis/nodejs-gke-connect-gateway) +* [github.com/googleapis/google-cloud-node](https://github.com/googleapis/google-cloud-node) Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in [Client Libraries Explained][explained]. @@ -70,11 +70,17 @@ new GatewayServiceClient(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-gke-connect-gateway/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Quickstart | [source code](https://github.com/googleapis/nodejs-gke-connect-gateway/blob/main/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-gke-connect-gateway&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | +| Gateway_service.delete_resource | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.delete_resource.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.delete_resource.js,samples/README.md) | +| Gateway_service.get_resource | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.get_resource.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.get_resource.js,samples/README.md) | +| Gateway_service.patch_resource | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.patch_resource.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.patch_resource.js,samples/README.md) | +| Gateway_service.post_resource | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.post_resource.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.post_resource.js,samples/README.md) | +| Gateway_service.put_resource | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.put_resource.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.put_resource.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkeconnect-gateway/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkeconnect-gateway/samples/quickstart.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkeconnect-gateway/samples/test/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkeconnect-gateway/samples/test/quickstart.js,samples/README.md) | @@ -123,7 +129,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-gke-connect-gateway/blob/main/CONTRIBUTING.md). +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md). Please note that this `README.md`, the `samples/README.md`, and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) @@ -135,7 +141,7 @@ to its templates in Apache Version 2.0 -See [LICENSE](https://github.com/googleapis/nodejs-gke-connect-gateway/blob/main/LICENSE) +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/gke-connect-gateway/latest [product-docs]: https://cloud.google.com/anthos/multicluster-management/gateway diff --git a/packages/google-cloud-gkeconnect-gateway/package.json b/packages/google-cloud-gkeconnect-gateway/package.json index 8685b1c6e74..9c110ffa26e 100644 --- a/packages/google-cloud-gkeconnect-gateway/package.json +++ b/packages/google-cloud-gkeconnect-gateway/package.json @@ -33,9 +33,9 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "c8 mocha build/system-test", + "system-test": "npm run compile && c8 mocha build/system-test", "test": "c8 mocha build/test", - "samples-test": "cd samples/ && npm link ../ && npm test", + "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { diff --git a/packages/google-cloud-gkeconnect-gateway/samples/README.md b/packages/google-cloud-gkeconnect-gateway/samples/README.md index 59cf64c1fa4..04000cd00f6 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/README.md +++ b/packages/google-cloud-gkeconnect-gateway/samples/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [GKE Connect Gateway: Node.js Samples](https://github.com/googleapis/nodejs-gke-connect-gateway) +# [GKE Connect Gateway: Node.js Samples](https://github.com/googleapis/google-cloud-node) [![Open in Cloud Shell][shell_img]][shell_link] @@ -12,12 +12,18 @@ * [Before you begin](#before-you-begin) * [Samples](#samples) + * [Gateway_service.delete_resource](#gateway_service.delete_resource) + * [Gateway_service.get_resource](#gateway_service.get_resource) + * [Gateway_service.patch_resource](#gateway_service.patch_resource) + * [Gateway_service.post_resource](#gateway_service.post_resource) + * [Gateway_service.put_resource](#gateway_service.put_resource) + * [Quickstart](#quickstart) * [Quickstart](#quickstart) ## Before you begin Before running the samples, make sure you've followed the steps outlined in -[Using the client library](https://github.com/googleapis/nodejs-gke-connect-gateway#using-the-client-library). +[Using the client library](https://github.com/googleapis/google-cloud-node#using-the-client-library). `cd samples` @@ -29,16 +35,118 @@ Before running the samples, make sure you've followed the steps outlined in +### Gateway_service.delete_resource + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.delete_resource.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.delete_resource.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.delete_resource.js` + + +----- + + + + +### Gateway_service.get_resource + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.get_resource.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.get_resource.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.get_resource.js` + + +----- + + + + +### Gateway_service.patch_resource + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.patch_resource.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.patch_resource.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.patch_resource.js` + + +----- + + + + +### Gateway_service.post_resource + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.post_resource.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.post_resource.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.post_resource.js` + + +----- + + + + +### Gateway_service.put_resource + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.put_resource.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.put_resource.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/gateway_service.put_resource.js` + + +----- + + + + +### Quickstart + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkeconnect-gateway/samples/quickstart.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkeconnect-gateway/samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-gkeconnect-gateway/samples/quickstart.js` + + +----- + + + + ### Quickstart -View the [source code](https://github.com/googleapis/nodejs-gke-connect-gateway/blob/main/samples/quickstart.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkeconnect-gateway/samples/test/quickstart.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-gke-connect-gateway&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkeconnect-gateway/samples/test/quickstart.js,samples/README.md) __Usage:__ -`node samples/quickstart.js` +`node packages/google-cloud-gkeconnect-gateway/samples/test/quickstart.js` @@ -46,5 +154,5 @@ __Usage:__ [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png -[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-gke-connect-gateway&page=editor&open_in_editor=samples/README.md +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=samples/README.md [product-docs]: https://cloud.google.com/anthos/multicluster-management/gateway diff --git a/packages/google-cloud-gkeconnect-gateway/src/index.ts b/packages/google-cloud-gkeconnect-gateway/src/index.ts index 71ea0d415d6..8a4bcebbfa4 100644 --- a/packages/google-cloud-gkeconnect-gateway/src/index.ts +++ b/packages/google-cloud-gkeconnect-gateway/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/release-please-config.json b/release-please-config.json index 231ec839fd4..8edd3353cd9 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -10,6 +10,7 @@ "packages/google-cloud-bigquery-analyticshub": {}, "packages/google-cloud-bigquery-datapolicies": {}, "packages/google-cloud-bigquery-datatransfer": {}, + "packages/google-cloud-gkeconnect-gateway": {}, "packages/google-cloud-gkemulticloud": {}, "packages/google-cloud-language": {}, "packages/google-cloud-oslogin": {}, From 895c974aa283045049f1964d9f0af610e11cfeb6 Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Wed, 12 Oct 2022 22:20:35 -0700 Subject: [PATCH 250/254] build: add release-please config, fix owlbot-config --- .release-please-manifest.json | 1 + .../{.github => }/.OwlBot.yaml | 6 +- packages/google-cloud-deploy/.mocharc.js | 2 +- packages/google-cloud-deploy/.prettierrc.js | 2 +- .../google-cloud-deploy/.repo-metadata.json | 4 +- packages/google-cloud-deploy/README.md | 37 +- packages/google-cloud-deploy/package.json | 4 +- .../google-cloud-deploy/samples/README.md | 426 +++++++++++++++++- packages/google-cloud-deploy/src/index.ts | 2 +- release-please-config.json | 1 + 10 files changed, 461 insertions(+), 24 deletions(-) rename packages/google-cloud-deploy/{.github => }/.OwlBot.yaml (79%) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a4aac6fae6f..15f62f46a23 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -10,6 +10,7 @@ "packages/google-cloud-bigquery-analyticshub": "0.1.0", "packages/google-cloud-bigquery-datapolicies": "0.1.0", "packages/google-cloud-bigquery-datatransfer": "3.1.3", + "packages/google-cloud-deploy": "2.2.0", "packages/google-cloud-gkemulticloud": "0.1.2", "packages/google-cloud-language": "5.1.0", "packages/google-cloud-oslogin": "4.0.2", diff --git a/packages/google-cloud-deploy/.github/.OwlBot.yaml b/packages/google-cloud-deploy/.OwlBot.yaml similarity index 79% rename from packages/google-cloud-deploy/.github/.OwlBot.yaml rename to packages/google-cloud-deploy/.OwlBot.yaml index 9ca7b092bd6..c7c8d263f94 100644 --- a/packages/google-cloud-deploy/.github/.OwlBot.yaml +++ b/packages/google-cloud-deploy/.OwlBot.yaml @@ -11,12 +11,10 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -docker: - image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest deep-remove-regex: - /owl-bot-staging deep-copy-regex: - - source: /google/cloud/deploy/(.*)/.*-nodejs/(.*) - dest: /owl-bot-staging/$1/$2 + - source: /google/cloud/deploy/(.*)/.*-nodejs + dest: /owl-bot-staging/google-cloud-deploy/$1 diff --git a/packages/google-cloud-deploy/.mocharc.js b/packages/google-cloud-deploy/.mocharc.js index 0b600509bed..cdb7b752160 100644 --- a/packages/google-cloud-deploy/.mocharc.js +++ b/packages/google-cloud-deploy/.mocharc.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-deploy/.prettierrc.js b/packages/google-cloud-deploy/.prettierrc.js index d1b95106f4c..d546a4ad546 100644 --- a/packages/google-cloud-deploy/.prettierrc.js +++ b/packages/google-cloud-deploy/.prettierrc.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-deploy/.repo-metadata.json b/packages/google-cloud-deploy/.repo-metadata.json index 75202e31889..f2a4830c7ee 100644 --- a/packages/google-cloud-deploy/.repo-metadata.json +++ b/packages/google-cloud-deploy/.repo-metadata.json @@ -3,10 +3,10 @@ "name_pretty": "Google Cloud Deploy", "product_documentation": "https://cloud.google.com/deploy/", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/deploy/latest", - "issue_tracker": "https://github.com/googleapis/nodejs-deploy/issues", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", "release_level": "stable", "language": "nodejs", - "repo": "googleapis/nodejs-deploy", + "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/deploy", "api_id": "clouddeploy.googleapis.com", "default_version": "v1", diff --git a/packages/google-cloud-deploy/README.md b/packages/google-cloud-deploy/README.md index 4bfa59f4398..7bc3e533d88 100644 --- a/packages/google-cloud-deploy/README.md +++ b/packages/google-cloud-deploy/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Google Cloud Deploy: Node.js Client](https://github.com/googleapis/nodejs-deploy) +# [Google Cloud Deploy: Node.js Client](https://github.com/googleapis/google-cloud-node) [![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/deploy.svg)](https://www.npmjs.org/package/@google-cloud/deploy) @@ -14,11 +14,11 @@ clouddeploy client for Node.js A comprehensive list of changes in each version may be found in -[the CHANGELOG](https://github.com/googleapis/nodejs-deploy/blob/main/CHANGELOG.md). +[the CHANGELOG](https://github.com/googleapis/google-cloud-node/blob/main/CHANGELOG.md). * [Google Cloud Deploy Node.js Client API Reference][client-docs] * [Google Cloud Deploy Documentation][product-docs] -* [github.com/googleapis/nodejs-deploy](https://github.com/googleapis/nodejs-deploy) +* [github.com/googleapis/google-cloud-node](https://github.com/googleapis/google-cloud-node) Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in [Client Libraries Explained][explained]. @@ -116,11 +116,34 @@ listDeliveryPipelines(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-deploy/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Quickstart | [source code](https://github.com/googleapis/nodejs-deploy/blob/main/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-deploy&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | +| Cloud_deploy.abandon_release | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.abandon_release.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.abandon_release.js,samples/README.md) | +| Cloud_deploy.approve_rollout | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.approve_rollout.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.approve_rollout.js,samples/README.md) | +| Cloud_deploy.create_delivery_pipeline | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js,samples/README.md) | +| Cloud_deploy.create_release | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_release.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_release.js,samples/README.md) | +| Cloud_deploy.create_rollout | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_rollout.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_rollout.js,samples/README.md) | +| Cloud_deploy.create_target | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_target.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_target.js,samples/README.md) | +| Cloud_deploy.delete_delivery_pipeline | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js,samples/README.md) | +| Cloud_deploy.delete_target | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_target.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_target.js,samples/README.md) | +| Cloud_deploy.get_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_config.js,samples/README.md) | +| Cloud_deploy.get_delivery_pipeline | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_delivery_pipeline.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_delivery_pipeline.js,samples/README.md) | +| Cloud_deploy.get_job_run | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_job_run.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_job_run.js,samples/README.md) | +| Cloud_deploy.get_release | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_release.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_release.js,samples/README.md) | +| Cloud_deploy.get_rollout | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_rollout.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_rollout.js,samples/README.md) | +| Cloud_deploy.get_target | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_target.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_target.js,samples/README.md) | +| Cloud_deploy.list_delivery_pipelines | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js,samples/README.md) | +| Cloud_deploy.list_job_runs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_job_runs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_job_runs.js,samples/README.md) | +| Cloud_deploy.list_releases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_releases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_releases.js,samples/README.md) | +| Cloud_deploy.list_rollouts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_rollouts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_rollouts.js,samples/README.md) | +| Cloud_deploy.list_targets | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_targets.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_targets.js,samples/README.md) | +| Cloud_deploy.retry_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.retry_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.retry_job.js,samples/README.md) | +| Cloud_deploy.update_delivery_pipeline | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js,samples/README.md) | +| Cloud_deploy.update_target | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_target.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_target.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/quickstart.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/test/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/test/quickstart.js,samples/README.md) | @@ -170,7 +193,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-deploy/blob/main/CONTRIBUTING.md). +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md). Please note that this `README.md`, the `samples/README.md`, and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) @@ -182,7 +205,7 @@ to its templates in Apache Version 2.0 -See [LICENSE](https://github.com/googleapis/nodejs-deploy/blob/main/LICENSE) +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/deploy/latest [product-docs]: https://cloud.google.com/deploy/ diff --git a/packages/google-cloud-deploy/package.json b/packages/google-cloud-deploy/package.json index 5e9f21f2cb7..68390f871d9 100644 --- a/packages/google-cloud-deploy/package.json +++ b/packages/google-cloud-deploy/package.json @@ -33,9 +33,9 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "c8 mocha build/system-test", + "system-test": "npm run compile && c8 mocha build/system-test", "test": "c8 mocha build/test", - "samples-test": "cd samples/ && npm link ../ && npm test", + "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { diff --git a/packages/google-cloud-deploy/samples/README.md b/packages/google-cloud-deploy/samples/README.md index dd19d7e5697..abc48423577 100644 --- a/packages/google-cloud-deploy/samples/README.md +++ b/packages/google-cloud-deploy/samples/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Google Cloud Deploy: Node.js Samples](https://github.com/googleapis/nodejs-deploy) +# [Google Cloud Deploy: Node.js Samples](https://github.com/googleapis/google-cloud-node) [![Open in Cloud Shell][shell_img]][shell_link] @@ -12,12 +12,35 @@ * [Before you begin](#before-you-begin) * [Samples](#samples) + * [Cloud_deploy.abandon_release](#cloud_deploy.abandon_release) + * [Cloud_deploy.approve_rollout](#cloud_deploy.approve_rollout) + * [Cloud_deploy.create_delivery_pipeline](#cloud_deploy.create_delivery_pipeline) + * [Cloud_deploy.create_release](#cloud_deploy.create_release) + * [Cloud_deploy.create_rollout](#cloud_deploy.create_rollout) + * [Cloud_deploy.create_target](#cloud_deploy.create_target) + * [Cloud_deploy.delete_delivery_pipeline](#cloud_deploy.delete_delivery_pipeline) + * [Cloud_deploy.delete_target](#cloud_deploy.delete_target) + * [Cloud_deploy.get_config](#cloud_deploy.get_config) + * [Cloud_deploy.get_delivery_pipeline](#cloud_deploy.get_delivery_pipeline) + * [Cloud_deploy.get_job_run](#cloud_deploy.get_job_run) + * [Cloud_deploy.get_release](#cloud_deploy.get_release) + * [Cloud_deploy.get_rollout](#cloud_deploy.get_rollout) + * [Cloud_deploy.get_target](#cloud_deploy.get_target) + * [Cloud_deploy.list_delivery_pipelines](#cloud_deploy.list_delivery_pipelines) + * [Cloud_deploy.list_job_runs](#cloud_deploy.list_job_runs) + * [Cloud_deploy.list_releases](#cloud_deploy.list_releases) + * [Cloud_deploy.list_rollouts](#cloud_deploy.list_rollouts) + * [Cloud_deploy.list_targets](#cloud_deploy.list_targets) + * [Cloud_deploy.retry_job](#cloud_deploy.retry_job) + * [Cloud_deploy.update_delivery_pipeline](#cloud_deploy.update_delivery_pipeline) + * [Cloud_deploy.update_target](#cloud_deploy.update_target) + * [Quickstart](#quickstart) * [Quickstart](#quickstart) ## Before you begin Before running the samples, make sure you've followed the steps outlined in -[Using the client library](https://github.com/googleapis/nodejs-deploy#using-the-client-library). +[Using the client library](https://github.com/googleapis/google-cloud-node#using-the-client-library). `cd samples` @@ -29,16 +52,407 @@ Before running the samples, make sure you've followed the steps outlined in +### Cloud_deploy.abandon_release + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.abandon_release.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.abandon_release.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.abandon_release.js` + + +----- + + + + +### Cloud_deploy.approve_rollout + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.approve_rollout.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.approve_rollout.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.approve_rollout.js` + + +----- + + + + +### Cloud_deploy.create_delivery_pipeline + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js` + + +----- + + + + +### Cloud_deploy.create_release + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_release.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_release.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_release.js` + + +----- + + + + +### Cloud_deploy.create_rollout + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_rollout.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_rollout.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_rollout.js` + + +----- + + + + +### Cloud_deploy.create_target + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_target.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_target.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_target.js` + + +----- + + + + +### Cloud_deploy.delete_delivery_pipeline + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js` + + +----- + + + + +### Cloud_deploy.delete_target + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_target.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_target.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_target.js` + + +----- + + + + +### Cloud_deploy.get_config + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_config.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_config.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_config.js` + + +----- + + + + +### Cloud_deploy.get_delivery_pipeline + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_delivery_pipeline.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_delivery_pipeline.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_delivery_pipeline.js` + + +----- + + + + +### Cloud_deploy.get_job_run + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_job_run.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_job_run.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_job_run.js` + + +----- + + + + +### Cloud_deploy.get_release + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_release.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_release.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_release.js` + + +----- + + + + +### Cloud_deploy.get_rollout + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_rollout.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_rollout.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_rollout.js` + + +----- + + + + +### Cloud_deploy.get_target + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_target.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_target.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_target.js` + + +----- + + + + +### Cloud_deploy.list_delivery_pipelines + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js` + + +----- + + + + +### Cloud_deploy.list_job_runs + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_job_runs.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_job_runs.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_job_runs.js` + + +----- + + + + +### Cloud_deploy.list_releases + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_releases.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_releases.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_releases.js` + + +----- + + + + +### Cloud_deploy.list_rollouts + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_rollouts.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_rollouts.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_rollouts.js` + + +----- + + + + +### Cloud_deploy.list_targets + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_targets.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_targets.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_targets.js` + + +----- + + + + +### Cloud_deploy.retry_job + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.retry_job.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.retry_job.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.retry_job.js` + + +----- + + + + +### Cloud_deploy.update_delivery_pipeline + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js` + + +----- + + + + +### Cloud_deploy.update_target + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_target.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_target.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_target.js` + + +----- + + + + +### Quickstart + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/quickstart.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-deploy/samples/quickstart.js` + + +----- + + + + ### Quickstart -View the [source code](https://github.com/googleapis/nodejs-deploy/blob/main/samples/quickstart.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/test/quickstart.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-deploy&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/test/quickstart.js,samples/README.md) __Usage:__ -`node samples/quickstart.js` +`node packages/google-cloud-deploy/samples/test/quickstart.js` @@ -46,5 +460,5 @@ __Usage:__ [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png -[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-deploy&page=editor&open_in_editor=samples/README.md +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=samples/README.md [product-docs]: https://cloud.google.com/deploy/ diff --git a/packages/google-cloud-deploy/src/index.ts b/packages/google-cloud-deploy/src/index.ts index 8fcb5c66e0d..50fdb29ebeb 100644 --- a/packages/google-cloud-deploy/src/index.ts +++ b/packages/google-cloud-deploy/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/release-please-config.json b/release-please-config.json index 231ec839fd4..9a0b8be119b 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -10,6 +10,7 @@ "packages/google-cloud-bigquery-analyticshub": {}, "packages/google-cloud-bigquery-datapolicies": {}, "packages/google-cloud-bigquery-datatransfer": {}, + "packages/google-cloud-deploy": {}, "packages/google-cloud-gkemulticloud": {}, "packages/google-cloud-language": {}, "packages/google-cloud-oslogin": {}, From c6a1ac5235f632aa9a16da99b097a34b9f034655 Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Wed, 12 Oct 2022 22:50:01 -0700 Subject: [PATCH 251/254] build: add release-please config, fix owlbot-config --- .release-please-manifest.json | 1 + .../{.github => }/.OwlBot.yaml | 6 +- packages/google-cloud-dataplex/.mocharc.js | 2 +- packages/google-cloud-dataplex/.prettierrc.js | 2 +- .../google-cloud-dataplex/.repo-metadata.json | 4 +- packages/google-cloud-dataplex/README.md | 64 +- packages/google-cloud-dataplex/package.json | 4 +- .../google-cloud-dataplex/samples/README.md | 912 +++++++++++++++++- packages/google-cloud-dataplex/src/index.ts | 2 +- release-please-config.json | 1 + 10 files changed, 974 insertions(+), 24 deletions(-) rename packages/google-cloud-dataplex/{.github => }/.OwlBot.yaml (79%) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a4aac6fae6f..46ec46664c9 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -10,6 +10,7 @@ "packages/google-cloud-bigquery-analyticshub": "0.1.0", "packages/google-cloud-bigquery-datapolicies": "0.1.0", "packages/google-cloud-bigquery-datatransfer": "3.1.3", + "packages/google-cloud-dataplex": "2.2.0", "packages/google-cloud-gkemulticloud": "0.1.2", "packages/google-cloud-language": "5.1.0", "packages/google-cloud-oslogin": "4.0.2", diff --git a/packages/google-cloud-dataplex/.github/.OwlBot.yaml b/packages/google-cloud-dataplex/.OwlBot.yaml similarity index 79% rename from packages/google-cloud-dataplex/.github/.OwlBot.yaml rename to packages/google-cloud-dataplex/.OwlBot.yaml index 8b2097bf7f4..7356a0314e2 100644 --- a/packages/google-cloud-dataplex/.github/.OwlBot.yaml +++ b/packages/google-cloud-dataplex/.OwlBot.yaml @@ -11,12 +11,10 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -docker: - image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest deep-remove-regex: - /owl-bot-staging deep-copy-regex: - - source: /google/cloud/dataplex/(.*)/.*-nodejs/(.*) - dest: /owl-bot-staging/$1/$2 + - source: /google/cloud/dataplex/(.*)/.*-nodejs + dest: /owl-bot-staging/google-cloud-dataplex/$1 diff --git a/packages/google-cloud-dataplex/.mocharc.js b/packages/google-cloud-dataplex/.mocharc.js index 0b600509bed..cdb7b752160 100644 --- a/packages/google-cloud-dataplex/.mocharc.js +++ b/packages/google-cloud-dataplex/.mocharc.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataplex/.prettierrc.js b/packages/google-cloud-dataplex/.prettierrc.js index d1b95106f4c..d546a4ad546 100644 --- a/packages/google-cloud-dataplex/.prettierrc.js +++ b/packages/google-cloud-dataplex/.prettierrc.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-dataplex/.repo-metadata.json b/packages/google-cloud-dataplex/.repo-metadata.json index 9c3f4dcabb9..b2ed29676d8 100644 --- a/packages/google-cloud-dataplex/.repo-metadata.json +++ b/packages/google-cloud-dataplex/.repo-metadata.json @@ -3,10 +3,10 @@ "name_pretty": "Cloud Dataplex", "product_documentation": "https://cloud.google.com/dataplex/", "client_documentation": "https://cloud.google.com/dataplex", - "issue_tracker": "https://github.com/googleapis/nodejs-dataplex/issues", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", "release_level": "stable", "language": "nodejs", - "repo": "googleapis/nodejs-dataplex", + "repo": "googleapis/google-cloud-node", "distribution_name": "@google-cloud/dataplex", "api_id": "dataplex.googleapis.com", "default_version": "v1", diff --git a/packages/google-cloud-dataplex/README.md b/packages/google-cloud-dataplex/README.md index cff34e25d08..90002399119 100644 --- a/packages/google-cloud-dataplex/README.md +++ b/packages/google-cloud-dataplex/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Cloud Dataplex: Node.js Client](https://github.com/googleapis/nodejs-dataplex) +# [Cloud Dataplex: Node.js Client](https://github.com/googleapis/google-cloud-node) [![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/dataplex.svg)](https://www.npmjs.org/package/@google-cloud/dataplex) @@ -14,11 +14,11 @@ dataplex client for Node.js A comprehensive list of changes in each version may be found in -[the CHANGELOG](https://github.com/googleapis/nodejs-dataplex/blob/main/CHANGELOG.md). +[the CHANGELOG](https://github.com/googleapis/google-cloud-node/blob/main/CHANGELOG.md). * [Cloud Dataplex Node.js Client API Reference][client-docs] * [Cloud Dataplex Documentation][product-docs] -* [github.com/googleapis/nodejs-dataplex](https://github.com/googleapis/nodejs-dataplex) +* [github.com/googleapis/google-cloud-node](https://github.com/googleapis/google-cloud-node) Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in [Client Libraries Explained][explained]. @@ -84,11 +84,61 @@ listLakes(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-dataplex/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Quickstart | [source code](https://github.com/googleapis/nodejs-dataplex/blob/main/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-dataplex&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | +| Content_service.create_content | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/content_service.create_content.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/content_service.create_content.js,samples/README.md) | +| Content_service.delete_content | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/content_service.delete_content.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/content_service.delete_content.js,samples/README.md) | +| Content_service.get_content | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/content_service.get_content.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/content_service.get_content.js,samples/README.md) | +| Content_service.get_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/content_service.get_iam_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/content_service.get_iam_policy.js,samples/README.md) | +| Content_service.list_content | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/content_service.list_content.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/content_service.list_content.js,samples/README.md) | +| Content_service.set_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/content_service.set_iam_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/content_service.set_iam_policy.js,samples/README.md) | +| Content_service.test_iam_permissions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/content_service.test_iam_permissions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/content_service.test_iam_permissions.js,samples/README.md) | +| Content_service.update_content | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/content_service.update_content.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/content_service.update_content.js,samples/README.md) | +| Dataplex_service.cancel_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.cancel_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.cancel_job.js,samples/README.md) | +| Dataplex_service.create_asset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_asset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_asset.js,samples/README.md) | +| Dataplex_service.create_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_environment.js,samples/README.md) | +| Dataplex_service.create_lake | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_lake.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_lake.js,samples/README.md) | +| Dataplex_service.create_task | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_task.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_task.js,samples/README.md) | +| Dataplex_service.create_zone | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_zone.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_zone.js,samples/README.md) | +| Dataplex_service.delete_asset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_asset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_asset.js,samples/README.md) | +| Dataplex_service.delete_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_environment.js,samples/README.md) | +| Dataplex_service.delete_lake | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_lake.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_lake.js,samples/README.md) | +| Dataplex_service.delete_task | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_task.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_task.js,samples/README.md) | +| Dataplex_service.delete_zone | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_zone.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_zone.js,samples/README.md) | +| Dataplex_service.get_asset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_asset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_asset.js,samples/README.md) | +| Dataplex_service.get_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_environment.js,samples/README.md) | +| Dataplex_service.get_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_job.js,samples/README.md) | +| Dataplex_service.get_lake | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_lake.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_lake.js,samples/README.md) | +| Dataplex_service.get_task | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_task.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_task.js,samples/README.md) | +| Dataplex_service.get_zone | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_zone.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_zone.js,samples/README.md) | +| Dataplex_service.list_asset_actions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_asset_actions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_asset_actions.js,samples/README.md) | +| Dataplex_service.list_assets | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_assets.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_assets.js,samples/README.md) | +| Dataplex_service.list_environments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_environments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_environments.js,samples/README.md) | +| Dataplex_service.list_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_jobs.js,samples/README.md) | +| Dataplex_service.list_lake_actions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lake_actions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lake_actions.js,samples/README.md) | +| Dataplex_service.list_lakes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lakes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lakes.js,samples/README.md) | +| Dataplex_service.list_sessions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_sessions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_sessions.js,samples/README.md) | +| Dataplex_service.list_tasks | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_tasks.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_tasks.js,samples/README.md) | +| Dataplex_service.list_zone_actions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zone_actions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zone_actions.js,samples/README.md) | +| Dataplex_service.list_zones | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zones.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zones.js,samples/README.md) | +| Dataplex_service.update_asset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_asset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_asset.js,samples/README.md) | +| Dataplex_service.update_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_environment.js,samples/README.md) | +| Dataplex_service.update_lake | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_lake.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_lake.js,samples/README.md) | +| Dataplex_service.update_task | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_task.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_task.js,samples/README.md) | +| Dataplex_service.update_zone | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_zone.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_zone.js,samples/README.md) | +| Metadata_service.create_entity | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.create_entity.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/metadata_service.create_entity.js,samples/README.md) | +| Metadata_service.create_partition | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.create_partition.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/metadata_service.create_partition.js,samples/README.md) | +| Metadata_service.delete_entity | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.delete_entity.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/metadata_service.delete_entity.js,samples/README.md) | +| Metadata_service.delete_partition | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.delete_partition.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/metadata_service.delete_partition.js,samples/README.md) | +| Metadata_service.get_entity | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_entity.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_entity.js,samples/README.md) | +| Metadata_service.get_partition | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_partition.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_partition.js,samples/README.md) | +| Metadata_service.list_entities | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_entities.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_entities.js,samples/README.md) | +| Metadata_service.list_partitions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_partitions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_partitions.js,samples/README.md) | +| Metadata_service.update_entity | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.update_entity.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/metadata_service.update_entity.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/quickstart.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/test/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/test/quickstart.js,samples/README.md) | @@ -138,7 +188,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-dataplex/blob/main/CONTRIBUTING.md). +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md). Please note that this `README.md`, the `samples/README.md`, and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) @@ -150,7 +200,7 @@ to its templates in Apache Version 2.0 -See [LICENSE](https://github.com/googleapis/nodejs-dataplex/blob/main/LICENSE) +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) [client-docs]: https://cloud.google.com/dataplex [product-docs]: https://cloud.google.com/dataplex/ diff --git a/packages/google-cloud-dataplex/package.json b/packages/google-cloud-dataplex/package.json index bd39592b821..fea3e5359c0 100644 --- a/packages/google-cloud-dataplex/package.json +++ b/packages/google-cloud-dataplex/package.json @@ -24,7 +24,7 @@ "dataplex service" ], "scripts": { - "samples-test": "c8 npm run samples-test-suite", + "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", "samples-test-suite": "cd samples/ && npm link ../ && npm test && cd ../", "clean": "gts clean", "compile": "tsc -p . && cp -r protos build/", @@ -35,7 +35,7 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "c8 mocha build/system-test", + "system-test": "npm run compile && c8 mocha build/system-test", "test": "c8 mocha build/test" }, "dependencies": { diff --git a/packages/google-cloud-dataplex/samples/README.md b/packages/google-cloud-dataplex/samples/README.md index 71f4c0bdedf..070b4ee4751 100644 --- a/packages/google-cloud-dataplex/samples/README.md +++ b/packages/google-cloud-dataplex/samples/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Cloud Dataplex: Node.js Samples](https://github.com/googleapis/nodejs-dataplex) +# [Cloud Dataplex: Node.js Samples](https://github.com/googleapis/google-cloud-node) [![Open in Cloud Shell][shell_img]][shell_link] @@ -12,12 +12,62 @@ * [Before you begin](#before-you-begin) * [Samples](#samples) + * [Content_service.create_content](#content_service.create_content) + * [Content_service.delete_content](#content_service.delete_content) + * [Content_service.get_content](#content_service.get_content) + * [Content_service.get_iam_policy](#content_service.get_iam_policy) + * [Content_service.list_content](#content_service.list_content) + * [Content_service.set_iam_policy](#content_service.set_iam_policy) + * [Content_service.test_iam_permissions](#content_service.test_iam_permissions) + * [Content_service.update_content](#content_service.update_content) + * [Dataplex_service.cancel_job](#dataplex_service.cancel_job) + * [Dataplex_service.create_asset](#dataplex_service.create_asset) + * [Dataplex_service.create_environment](#dataplex_service.create_environment) + * [Dataplex_service.create_lake](#dataplex_service.create_lake) + * [Dataplex_service.create_task](#dataplex_service.create_task) + * [Dataplex_service.create_zone](#dataplex_service.create_zone) + * [Dataplex_service.delete_asset](#dataplex_service.delete_asset) + * [Dataplex_service.delete_environment](#dataplex_service.delete_environment) + * [Dataplex_service.delete_lake](#dataplex_service.delete_lake) + * [Dataplex_service.delete_task](#dataplex_service.delete_task) + * [Dataplex_service.delete_zone](#dataplex_service.delete_zone) + * [Dataplex_service.get_asset](#dataplex_service.get_asset) + * [Dataplex_service.get_environment](#dataplex_service.get_environment) + * [Dataplex_service.get_job](#dataplex_service.get_job) + * [Dataplex_service.get_lake](#dataplex_service.get_lake) + * [Dataplex_service.get_task](#dataplex_service.get_task) + * [Dataplex_service.get_zone](#dataplex_service.get_zone) + * [Dataplex_service.list_asset_actions](#dataplex_service.list_asset_actions) + * [Dataplex_service.list_assets](#dataplex_service.list_assets) + * [Dataplex_service.list_environments](#dataplex_service.list_environments) + * [Dataplex_service.list_jobs](#dataplex_service.list_jobs) + * [Dataplex_service.list_lake_actions](#dataplex_service.list_lake_actions) + * [Dataplex_service.list_lakes](#dataplex_service.list_lakes) + * [Dataplex_service.list_sessions](#dataplex_service.list_sessions) + * [Dataplex_service.list_tasks](#dataplex_service.list_tasks) + * [Dataplex_service.list_zone_actions](#dataplex_service.list_zone_actions) + * [Dataplex_service.list_zones](#dataplex_service.list_zones) + * [Dataplex_service.update_asset](#dataplex_service.update_asset) + * [Dataplex_service.update_environment](#dataplex_service.update_environment) + * [Dataplex_service.update_lake](#dataplex_service.update_lake) + * [Dataplex_service.update_task](#dataplex_service.update_task) + * [Dataplex_service.update_zone](#dataplex_service.update_zone) + * [Metadata_service.create_entity](#metadata_service.create_entity) + * [Metadata_service.create_partition](#metadata_service.create_partition) + * [Metadata_service.delete_entity](#metadata_service.delete_entity) + * [Metadata_service.delete_partition](#metadata_service.delete_partition) + * [Metadata_service.get_entity](#metadata_service.get_entity) + * [Metadata_service.get_partition](#metadata_service.get_partition) + * [Metadata_service.list_entities](#metadata_service.list_entities) + * [Metadata_service.list_partitions](#metadata_service.list_partitions) + * [Metadata_service.update_entity](#metadata_service.update_entity) + * [Quickstart](#quickstart) * [Quickstart](#quickstart) ## Before you begin Before running the samples, make sure you've followed the steps outlined in -[Using the client library](https://github.com/googleapis/nodejs-dataplex#using-the-client-library). +[Using the client library](https://github.com/googleapis/google-cloud-node#using-the-client-library). `cd samples` @@ -29,16 +79,866 @@ Before running the samples, make sure you've followed the steps outlined in +### Content_service.create_content + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/content_service.create_content.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/content_service.create_content.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/content_service.create_content.js` + + +----- + + + + +### Content_service.delete_content + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/content_service.delete_content.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/content_service.delete_content.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/content_service.delete_content.js` + + +----- + + + + +### Content_service.get_content + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/content_service.get_content.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/content_service.get_content.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/content_service.get_content.js` + + +----- + + + + +### Content_service.get_iam_policy + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/content_service.get_iam_policy.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/content_service.get_iam_policy.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/content_service.get_iam_policy.js` + + +----- + + + + +### Content_service.list_content + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/content_service.list_content.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/content_service.list_content.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/content_service.list_content.js` + + +----- + + + + +### Content_service.set_iam_policy + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/content_service.set_iam_policy.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/content_service.set_iam_policy.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/content_service.set_iam_policy.js` + + +----- + + + + +### Content_service.test_iam_permissions + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/content_service.test_iam_permissions.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/content_service.test_iam_permissions.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/content_service.test_iam_permissions.js` + + +----- + + + + +### Content_service.update_content + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/content_service.update_content.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/content_service.update_content.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/content_service.update_content.js` + + +----- + + + + +### Dataplex_service.cancel_job + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.cancel_job.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.cancel_job.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.cancel_job.js` + + +----- + + + + +### Dataplex_service.create_asset + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_asset.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_asset.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_asset.js` + + +----- + + + + +### Dataplex_service.create_environment + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_environment.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_environment.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_environment.js` + + +----- + + + + +### Dataplex_service.create_lake + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_lake.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_lake.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_lake.js` + + +----- + + + + +### Dataplex_service.create_task + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_task.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_task.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_task.js` + + +----- + + + + +### Dataplex_service.create_zone + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_zone.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_zone.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_zone.js` + + +----- + + + + +### Dataplex_service.delete_asset + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_asset.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_asset.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_asset.js` + + +----- + + + + +### Dataplex_service.delete_environment + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_environment.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_environment.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_environment.js` + + +----- + + + + +### Dataplex_service.delete_lake + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_lake.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_lake.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_lake.js` + + +----- + + + + +### Dataplex_service.delete_task + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_task.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_task.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_task.js` + + +----- + + + + +### Dataplex_service.delete_zone + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_zone.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_zone.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.delete_zone.js` + + +----- + + + + +### Dataplex_service.get_asset + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_asset.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_asset.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_asset.js` + + +----- + + + + +### Dataplex_service.get_environment + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_environment.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_environment.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_environment.js` + + +----- + + + + +### Dataplex_service.get_job + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_job.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_job.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_job.js` + + +----- + + + + +### Dataplex_service.get_lake + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_lake.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_lake.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_lake.js` + + +----- + + + + +### Dataplex_service.get_task + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_task.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_task.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_task.js` + + +----- + + + + +### Dataplex_service.get_zone + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_zone.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_zone.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.get_zone.js` + + +----- + + + + +### Dataplex_service.list_asset_actions + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_asset_actions.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_asset_actions.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_asset_actions.js` + + +----- + + + + +### Dataplex_service.list_assets + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_assets.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_assets.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_assets.js` + + +----- + + + + +### Dataplex_service.list_environments + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_environments.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_environments.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_environments.js` + + +----- + + + + +### Dataplex_service.list_jobs + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_jobs.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_jobs.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_jobs.js` + + +----- + + + + +### Dataplex_service.list_lake_actions + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lake_actions.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lake_actions.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lake_actions.js` + + +----- + + + + +### Dataplex_service.list_lakes + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lakes.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lakes.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_lakes.js` + + +----- + + + + +### Dataplex_service.list_sessions + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_sessions.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_sessions.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_sessions.js` + + +----- + + + + +### Dataplex_service.list_tasks + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_tasks.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_tasks.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_tasks.js` + + +----- + + + + +### Dataplex_service.list_zone_actions + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zone_actions.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zone_actions.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zone_actions.js` + + +----- + + + + +### Dataplex_service.list_zones + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zones.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zones.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zones.js` + + +----- + + + + +### Dataplex_service.update_asset + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_asset.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_asset.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_asset.js` + + +----- + + + + +### Dataplex_service.update_environment + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_environment.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_environment.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_environment.js` + + +----- + + + + +### Dataplex_service.update_lake + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_lake.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_lake.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_lake.js` + + +----- + + + + +### Dataplex_service.update_task + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_task.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_task.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_task.js` + + +----- + + + + +### Dataplex_service.update_zone + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_zone.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_zone.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_zone.js` + + +----- + + + + +### Metadata_service.create_entity + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.create_entity.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/metadata_service.create_entity.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/metadata_service.create_entity.js` + + +----- + + + + +### Metadata_service.create_partition + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.create_partition.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/metadata_service.create_partition.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/metadata_service.create_partition.js` + + +----- + + + + +### Metadata_service.delete_entity + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.delete_entity.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/metadata_service.delete_entity.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/metadata_service.delete_entity.js` + + +----- + + + + +### Metadata_service.delete_partition + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.delete_partition.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/metadata_service.delete_partition.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/metadata_service.delete_partition.js` + + +----- + + + + +### Metadata_service.get_entity + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_entity.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_entity.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_entity.js` + + +----- + + + + +### Metadata_service.get_partition + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_partition.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_partition.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/metadata_service.get_partition.js` + + +----- + + + + +### Metadata_service.list_entities + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_entities.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_entities.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_entities.js` + + +----- + + + + +### Metadata_service.list_partitions + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_partitions.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_partitions.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/metadata_service.list_partitions.js` + + +----- + + + + +### Metadata_service.update_entity + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/metadata_service.update_entity.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/metadata_service.update_entity.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/metadata_service.update_entity.js` + + +----- + + + + +### Quickstart + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/quickstart.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/quickstart.js` + + +----- + + + + ### Quickstart -View the [source code](https://github.com/googleapis/nodejs-dataplex/blob/main/samples/quickstart.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/test/quickstart.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-dataplex&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/test/quickstart.js,samples/README.md) __Usage:__ -`node samples/quickstart.js` +`node packages/google-cloud-dataplex/samples/test/quickstart.js` @@ -46,5 +946,5 @@ __Usage:__ [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png -[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-dataplex&page=editor&open_in_editor=samples/README.md +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=samples/README.md [product-docs]: https://cloud.google.com/dataplex/ diff --git a/packages/google-cloud-dataplex/src/index.ts b/packages/google-cloud-dataplex/src/index.ts index ca4e274c1be..f44a72d6237 100644 --- a/packages/google-cloud-dataplex/src/index.ts +++ b/packages/google-cloud-dataplex/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/release-please-config.json b/release-please-config.json index 231ec839fd4..996be91139f 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -10,6 +10,7 @@ "packages/google-cloud-bigquery-analyticshub": {}, "packages/google-cloud-bigquery-datapolicies": {}, "packages/google-cloud-bigquery-datatransfer": {}, + "packages/google-cloud-dataplex": {}, "packages/google-cloud-gkemulticloud": {}, "packages/google-cloud-language": {}, "packages/google-cloud-oslogin": {}, From 36425571f135a8dfbd2d1a759ea0f0adcc0f3b29 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 13 Oct 2022 07:38:44 +0000 Subject: [PATCH 252/254] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot?= =?UTF-8?q?=20post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- packages/google-cloud-bigquery-dataexchange/README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-bigquery-dataexchange/README.md b/packages/google-cloud-bigquery-dataexchange/README.md index 65b66e7eb39..6d5368f71cc 100644 --- a/packages/google-cloud-bigquery-dataexchange/README.md +++ b/packages/google-cloud-bigquery-dataexchange/README.md @@ -4,7 +4,7 @@ # [Analytics Hub API: Node.js Client](https://github.com/googleapis/google-cloud-node) -[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/bigquery-data-exchange.svg)](https://www.npmjs.org/package/@google-cloud/bigquery-data-exchange) @@ -159,13 +159,12 @@ This library follows [Semantic Versioning](http://semver.org/). -This library is considered to be in **beta**. This means it is expected to be -mostly stable while we work toward a general availability release; however, -complete stability is not guaranteed. We will address issues and requests -against beta libraries with a high priority. +This library is considered to be in **preview**. This means it is still a +work-in-progress and under active development. Any release is subject to +backwards-incompatible changes at any time. More Information: [Google Cloud Platform Launch Stages][launch_stages] From ad45865b4b9a1bb9e7a81d9064971050d50032b0 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 13 Oct 2022 07:42:04 +0000 Subject: [PATCH 253/254] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot?= =?UTF-8?q?=20post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- packages/google-cloud-bigquery-dataexchange/README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-bigquery-dataexchange/README.md b/packages/google-cloud-bigquery-dataexchange/README.md index 65b66e7eb39..6d5368f71cc 100644 --- a/packages/google-cloud-bigquery-dataexchange/README.md +++ b/packages/google-cloud-bigquery-dataexchange/README.md @@ -4,7 +4,7 @@ # [Analytics Hub API: Node.js Client](https://github.com/googleapis/google-cloud-node) -[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/bigquery-data-exchange.svg)](https://www.npmjs.org/package/@google-cloud/bigquery-data-exchange) @@ -159,13 +159,12 @@ This library follows [Semantic Versioning](http://semver.org/). -This library is considered to be in **beta**. This means it is expected to be -mostly stable while we work toward a general availability release; however, -complete stability is not guaranteed. We will address issues and requests -against beta libraries with a high priority. +This library is considered to be in **preview**. This means it is still a +work-in-progress and under active development. Any release is subject to +backwards-incompatible changes at any time. More Information: [Google Cloud Platform Launch Stages][launch_stages] From fffc8144e519ca34de58d2eea9189682ccc52deb Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 13 Oct 2022 07:42:39 +0000 Subject: [PATCH 254/254] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot?= =?UTF-8?q?=20post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- packages/google-cloud-bigquery-dataexchange/README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-bigquery-dataexchange/README.md b/packages/google-cloud-bigquery-dataexchange/README.md index 65b66e7eb39..6d5368f71cc 100644 --- a/packages/google-cloud-bigquery-dataexchange/README.md +++ b/packages/google-cloud-bigquery-dataexchange/README.md @@ -4,7 +4,7 @@ # [Analytics Hub API: Node.js Client](https://github.com/googleapis/google-cloud-node) -[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/bigquery-data-exchange.svg)](https://www.npmjs.org/package/@google-cloud/bigquery-data-exchange) @@ -159,13 +159,12 @@ This library follows [Semantic Versioning](http://semver.org/). -This library is considered to be in **beta**. This means it is expected to be -mostly stable while we work toward a general availability release; however, -complete stability is not guaranteed. We will address issues and requests -against beta libraries with a high priority. +This library is considered to be in **preview**. This means it is still a +work-in-progress and under active development. Any release is subject to +backwards-incompatible changes at any time. More Information: [Google Cloud Platform Launch Stages][launch_stages]